/*!
 * jQuery JavaScript Library v1.12.1
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2016-02-22T19:07Z
 */


(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 have a `window` with a `document`
		// (such as Node.js), expose a 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 ) {

// Support: Firefox 18+
// Can't be in strict mode, several libs including ASP.NET trace
// the stack via arguments.caller.callee and Firefox dies if
// you try to trace through "use strict" call chains. (#13335)
//"use strict";
var deletedIds = [];

var document = window.document;

var slice = deletedIds.slice;

var concat = deletedIds.concat;

var push = deletedIds.push;

var indexOf = deletedIds.indexOf;

var class2type = {};

var toString = class2type.toString;

var hasOwn = class2type.hasOwnProperty;

var support = {};



var
	version = "1.12.1",

	// 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 );
	},

	// Support: Android<4.1, IE<9
	// Make sure we trim BOM and NBSP
	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,

	// 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 just the one element from the set
			( num < 0 ? this[ num + this.length ] : this[ num ] ) :

			// Return all the elements in a clean array
			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.
	each: function( callback ) {
		return jQuery.each( this, callback );
	},

	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();
	},

	// For internal use only.
	// Behaves like an Array's method, not like a jQuery method.
	push: push,
	sort: deletedIds.sort,
	splice: deletedIds.splice
};

jQuery.extend = jQuery.fn.extend = function() {
	var src, copyIsArray, copy, name, options, 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 || function( obj ) {
		return jQuery.type( obj ) === "array";
	},

	isWindow: function( obj ) {
		/* jshint eqeqeq: false */
		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
		// adding 1 corrects loss of precision from parseFloat (#15100)
		var realStringObj = obj && obj.toString();
		return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
	},

	isEmptyObject: function( obj ) {
		var name;
		for ( name in obj ) {
			return false;
		}
		return true;
	},

	isPlainObject: function( obj ) {
		var key;

		// Must be an Object.
		// Because of IE, we also have to check the presence of the constructor property.
		// Make sure that DOM nodes and window objects don't pass through, as well
		if ( !obj || jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
			return false;
		}

		try {

			// Not own constructor property must be Object
			if ( obj.constructor &&
				!hasOwn.call( obj, "constructor" ) &&
				!hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
				return false;
			}
		} catch ( e ) {

			// IE8,9 Will throw exceptions on certain host objects #9897
			return false;
		}

		// Support: IE<9
		// Handle iteration over inherited properties before own properties.
		if ( !support.ownFirst ) {
			for ( key in obj ) {
				return hasOwn.call( obj, key );
			}
		}

		// Own properties are enumerated firstly, so to speed up,
		// if last one is own, then all properties are own.
		for ( key in obj ) {}

		return key === undefined || hasOwn.call( obj, key );
	},

	type: function( obj ) {
		if ( obj == null ) {
			return obj + "";
		}
		return typeof obj === "object" || typeof obj === "function" ?
			class2type[ toString.call( obj ) ] || "object" :
			typeof obj;
	},

	// Workarounds based on findings by Jim Driscoll
	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
	globalEval: function( data ) {
		if ( data && jQuery.trim( data ) ) {

			// We use execScript on Internet Explorer
			// We use an anonymous function so that context is window
			// rather than jQuery in Firefox
			( window.execScript || function( data ) {
				window[ "eval" ].call( window, data ); // jscs:ignore requireDotNotation
			} )( data );
		}
	},

	// 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();
	},

	each: function( obj, callback ) {
		var length, i = 0;

		if ( isArrayLike( obj ) ) {
			length = obj.length;
			for ( ; i < length; i++ ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		} else {
			for ( i in obj ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		}

		return obj;
	},

	// Support: Android<4.1, IE<9
	trim: function( text ) {
		return text == null ?
			"" :
			( text + "" ).replace( rtrim, "" );
	},

	// 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 ) {
		var len;

		if ( arr ) {
			if ( indexOf ) {
				return indexOf.call( arr, elem, i );
			}

			len = arr.length;
			i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;

			for ( ; i < len; i++ ) {

				// Skip accessing in sparse arrays
				if ( i in arr && arr[ i ] === elem ) {
					return i;
				}
			}
		}

		return -1;
	},

	merge: function( first, second ) {
		var len = +second.length,
			j = 0,
			i = first.length;

		while ( j < len ) {
			first[ i++ ] = second[ j++ ];
		}

		// Support: IE<9
		// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)
		if ( len !== len ) {
			while ( second[ j ] !== undefined ) {
				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 length, value,
			i = 0,
			ret = [];

		// Go through the array, translating each of the items to their new values
		if ( isArrayLike( elems ) ) {
			length = elems.length;
			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 args, proxy, tmp;

		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: function() {
		return +( new Date() );
	},

	// jQuery.support is not used in Core but other projects attach their
	// properties to it so it needs to exist.
	support: support
} );

// JSHint would error on this code due to the Symbol not being defined in ES5.
// Defining this global in .jshintrc would create a danger of using the global
// unguarded in another place, it seems safer to just disable JSHint for these
// three lines.
/* jshint ignore: start */
if ( typeof Symbol === "function" ) {
	jQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ];
}
/* jshint ignore: end */

// Populate the class2type map
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
function( i, name ) {
	class2type[ "[object " + name + "]" ] = name.toLowerCase();
} );

function isArrayLike( obj ) {

	// Support: iOS 8.2 (not reproducible in simulator)
	// `in` check used to prevent JIT error (gh-2145)
	// hasOwn isn't used here due to false negatives
	// regarding Nodelist length in IE
	var length = !!obj && "length" in obj && obj.length,
		type = jQuery.type( obj );

	if ( type === "function" || jQuery.isWindow( obj ) ) {
		return false;
	}

	return type === "array" || length === 0 ||
		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}
var Sizzle =
/*!
 * Sizzle CSS Selector Engine v2.2.1
 * http://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2015-10-17
 */
(function( window ) {

var i,
	support,
	Expr,
	getText,
	isXML,
	tokenize,
	compile,
	select,
	outermostContext,
	sortInput,
	hasDuplicate,

	// Local document vars
	setDocument,
	document,
	docElem,
	documentIsHTML,
	rbuggyQSA,
	rbuggyMatches,
	matches,
	contains,

	// Instance-specific data
	expando = "sizzle" + 1 * 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
	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 as it's faster than native
	// http://jsperf.com/thor-indexof-vs-for/5
	indexOf = function( list, elem ) {
		var i = 0,
			len = list.length;
		for ( ; i < len; i++ ) {
			if ( list[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

	// http://www.w3.org/TR/css3-selectors/#whitespace
	whitespace = "[\\x20\\t\\r\\n\\f]",

	// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
	identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",

	// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
	attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
		// Operator (capture 2)
		"*([*^$|!~]?=)" + whitespace +
		// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
		"*\\]",

	pseudos = ":(" + identifier + ")(?:\\((" +
		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
		// 1. quoted (capture 3; capture 4 or capture 5)
		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
		// 2. simple (capture 6)
		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
		// 3. anything else (capture 2)
		".*" +
		")\\)|)",

	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
	rwhitespace = new RegExp( whitespace + "+", "g" ),
	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( "^#(" + identifier + ")" ),
		"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
		"TAG": new RegExp( "^(" + identifier + "|[*])" ),
		"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<24
		// 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 );
	},

	// Used for iframes
	// See setDocument()
	// Removing the function wrapper causes a "Permission Denied"
	// error in IE
	unloadHandler = function() {
		setDocument();
	};

// 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 m, i, elem, nid, nidselect, match, groups, newSelector,
		newContext = context && context.ownerDocument,

		// nodeType defaults to 9, since context defaults to document
		nodeType = context ? context.nodeType : 9;

	results = results || [];

	// Return early from calls with invalid selector or context
	if ( typeof selector !== "string" || !selector ||
		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {

		return results;
	}

	// Try to shortcut find operations (as opposed to filters) in HTML documents
	if ( !seed ) {

		if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
			setDocument( context );
		}
		context = context || document;

		if ( documentIsHTML ) {

			// If the selector is sufficiently simple, try using a "get*By*" DOM method
			// (excepting DocumentFragment context, where the methods don't exist)
			if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {

				// ID selector
				if ( (m = match[1]) ) {

					// Document context
					if ( nodeType === 9 ) {
						if ( (elem = context.getElementById( m )) ) {

							// Support: IE, Opera, Webkit
							// TODO: identify versions
							// getElementById can match elements by name instead of ID
							if ( elem.id === m ) {
								results.push( elem );
								return results;
							}
						} else {
							return results;
						}

					// Element context
					} else {

						// Support: IE, Opera, Webkit
						// TODO: identify versions
						// getElementById can match elements by name instead of ID
						if ( newContext && (elem = newContext.getElementById( m )) &&
							contains( context, elem ) &&
							elem.id === m ) {

							results.push( elem );
							return results;
						}
					}

				// Type selector
				} else if ( match[2] ) {
					push.apply( results, context.getElementsByTagName( selector ) );
					return results;

				// Class selector
				} else if ( (m = match[3]) && support.getElementsByClassName &&
					context.getElementsByClassName ) {

					push.apply( results, context.getElementsByClassName( m ) );
					return results;
				}
			}

			// Take advantage of querySelectorAll
			if ( support.qsa &&
				!compilerCache[ selector + " " ] &&
				(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {

				if ( nodeType !== 1 ) {
					newContext = context;
					newSelector = selector;

				// qSA looks outside Element context, which is not what we want
				// Thanks to Andrew Dupont for this workaround technique
				// Support: IE <=8
				// Exclude object elements
				} else if ( context.nodeName.toLowerCase() !== "object" ) {

					// Capture the context ID, setting it first if necessary
					if ( (nid = context.getAttribute( "id" )) ) {
						nid = nid.replace( rescape, "\\$&" );
					} else {
						context.setAttribute( "id", (nid = expando) );
					}

					// Prefix every selector in the list
					groups = tokenize( selector );
					i = groups.length;
					nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']";
					while ( i-- ) {
						groups[i] = nidselect + " " + toSelector( groups[i] );
					}
					newSelector = groups.join( "," );

					// Expand context for sibling selectors
					newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
						context;
				}

				if ( newSelector ) {
					try {
						push.apply( results,
							newContext.querySelectorAll( newSelector )
						);
						return results;
					} catch ( qsaError ) {
					} finally {
						if ( nid === expando ) {
							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 = arr.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 !== "undefined" && 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, parent,
		doc = node ? node.ownerDocument || node : preferredDoc;

	// Return early if doc is invalid or already selected
	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
		return document;
	}

	// Update global variables
	document = doc;
	docElem = document.documentElement;
	documentIsHTML = !isXML( document );

	// Support: IE 9-11, Edge
	// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
	if ( (parent = document.defaultView) && parent.top !== parent ) {
		// Support: IE 11
		if ( parent.addEventListener ) {
			parent.addEventListener( "unload", unloadHandler, false );

		// Support: IE 9 - 10 only
		} else if ( parent.attachEvent ) {
			parent.attachEvent( "onunload", unloadHandler );
		}
	}

	/* 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( document.createComment("") );
		return !div.getElementsByTagName("*").length;
	});

	// Support: IE<9
	support.getElementsByClassName = rnative.test( document.getElementsByClassName );

	// 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 !document.getElementsByName || !document.getElementsByName( expando ).length;
	});

	// ID find and filter
	if ( support.getById ) {
		Expr.find["ID"] = function( id, context ) {
			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
				var m = context.getElementById( id );
				return m ? [ 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 !== "undefined" &&
					elem.getAttributeNode("id");
				return node && node.value === attrId;
			};
		};
	}

	// Tag
	Expr.find["TAG"] = support.getElementsByTagName ?
		function( tag, context ) {
			if ( typeof context.getElementsByTagName !== "undefined" ) {
				return context.getElementsByTagName( tag );

			// DocumentFragment nodes don't have gEBTN
			} else if ( support.qsa ) {
				return context.querySelectorAll( tag );
			}
		} :

		function( tag, context ) {
			var elem,
				tmp = [],
				i = 0,
				// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
				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 !== "undefined" && 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 http://bugs.jquery.com/ticket/13378
	rbuggyQSA = [];

	if ( (support.qsa = rnative.test( document.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
			// http://bugs.jquery.com/ticket/12359
			docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
				"<select id='" + expando + "-\r\\' msallowcapture=''>" +
				"<option selected=''></option></select>";

			// Support: IE8, Opera 11-12.16
			// Nothing should be selected when empty strings follow ^= or $= or *=
			// The test attribute must be unknown in Opera but "safe" for WinRT
			// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
			if ( div.querySelectorAll("[msallowcapture^='']").length ) {
				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
			}

			// Support: IE8
			// Boolean attributes and "value" are not treated correctly
			if ( !div.querySelectorAll("[selected]").length ) {
				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
			}

			// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
			if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
				rbuggyQSA.push("~=");
			}

			// 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");
			}

			// Support: Safari 8+, iOS 8+
			// https://bugs.webkit.org/show_bug.cgi?id=136851
			// In-page `selector#id sibing-combinator selector` fails
			if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
				rbuggyQSA.push(".#.+[+~]");
			}
		});

		assert(function( div ) {
			// Support: Windows 8 Native Apps
			// The type and name attributes are restricted during .innerHTML assignment
			var input = document.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.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 self-exclusive
	// 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 === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
				return -1;
			}
			if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
				return 1;
			}

			// Maintain original order
			return sortInput ?
				( indexOf( sortInput, a ) - indexOf( 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 === document ? -1 :
				b === document ? 1 :
				aup ? -1 :
				bup ? 1 :
				sortInput ?
				( indexOf( sortInput, a ) - indexOf( 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 document;
};

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 &&
		!compilerCache[ expr + " " ] &&
		( !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[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[6] && match[2];

			if ( matchExpr["CHILD"].test( match[0] ) ) {
				return null;
			}

			// Accept quoted arguments as-is
			if ( match[3] ) {
				match[2] = match[4] || match[5] || "";

			// 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 !== "undefined" && 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.replace( rwhitespace, " " ) + " " ).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, uniqueCache, outerCache, node, nodeIndex, start,
						dir = simple !== forward ? "nextSibling" : "previousSibling",
						parent = elem.parentNode,
						name = ofType && elem.nodeName.toLowerCase(),
						useCache = !xml && !ofType,
						diff = false;

					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

							// ...in a gzip-friendly way
							node = parent;
							outerCache = node[ expando ] || (node[ expando ] = {});

							// Support: IE <9 only
							// Defend against cloned attroperties (jQuery gh-1709)
							uniqueCache = outerCache[ node.uniqueID ] ||
								(outerCache[ node.uniqueID ] = {});

							cache = uniqueCache[ type ] || [];
							nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
							diff = nodeIndex && 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 ) {
									uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
									break;
								}
							}

						} else {
							// Use previously-cached element index if available
							if ( useCache ) {
								// ...in a gzip-friendly way
								node = elem;
								outerCache = node[ expando ] || (node[ expando ] = {});

								// Support: IE <9 only
								// Defend against cloned attroperties (jQuery gh-1709)
								uniqueCache = outerCache[ node.uniqueID ] ||
									(outerCache[ node.uniqueID ] = {});

								cache = uniqueCache[ type ] || [];
								nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
								diff = nodeIndex;
							}

							// xml :nth-child(...)
							// or :nth-last-child(...) or :nth(-last)?-of-type(...)
							if ( diff === false ) {
								// 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 ) {
											outerCache = node[ expando ] || (node[ expando ] = {});

											// Support: IE <9 only
											// Defend against cloned attroperties (jQuery gh-1709)
											uniqueCache = outerCache[ node.uniqueID ] ||
												(outerCache[ node.uniqueID ] = {});

											uniqueCache[ 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( 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 );
					// Don't keep the element (issue #299)
					input[0] = null;
					return !results.pop();
				};
		}),

		"has": markFunction(function( selector ) {
			return function( elem ) {
				return Sizzle( selector, elem ).length > 0;
			};
		}),

		"contains": markFunction(function( text ) {
			text = text.replace( runescape, funescape );
			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();

tokenize = Sizzle.tokenize = function( 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, uniqueCache, outerCache,
				newCache = [ dirruns, doneName ];

			// We can't set arbitrary data on XML nodes, so they don't benefit from combinator 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 ] = {});

						// Support: IE <9 only
						// Defend against cloned attroperties (jQuery gh-1709)
						uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});

						if ( (oldCache = uniqueCache[ 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
							uniqueCache[ 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 multipleContexts( selector, contexts, results ) {
	var i = 0,
		len = contexts.length;
	for ( ; i < len; i++ ) {
		Sizzle( selector, contexts[i], results );
	}
	return results;
}

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( 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( checkContext, elem ) > -1;
		}, implicitRelative, true ),
		matchers = [ function( elem, context, xml ) {
			var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
				(checkContext = context).nodeType ?
					matchContext( elem, context, xml ) :
					matchAnyContext( elem, context, xml ) );
			// Avoid hanging onto element (issue #299)
			checkContext = null;
			return ret;
		} ];

	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 || outermost;
			}

			// Add elements passing elementMatchers directly to results
			// 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;
					if ( !context && elem.ownerDocument !== document ) {
						setDocument( elem );
						xml = !documentIsHTML;
					}
					while ( (matcher = elementMatchers[j++]) ) {
						if ( matcher( elem, context || document, 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 );
					}
				}
			}

			// `i` is now the count of elements visited above, and adding it to `matchedCount`
			// makes the latter nonnegative.
			matchedCount += i;

			// Apply set filters to unmatched elements
			// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
			// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
			// no element matchers and no seed.
			// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
			// case, which will result in a "00" `matchedCount` that differs from `i` but is also
			// numerically zero.
			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, match /* 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 ( !match ) {
			match = tokenize( selector );
		}
		i = match.length;
		while ( i-- ) {
			cached = matcherFromTokens( match[i] );
			if ( cached[ expando ] ) {
				setMatchers.push( cached );
			} else {
				elementMatchers.push( cached );
			}
		}

		// Cache the compiled function
		cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );

		// Save selector and tokenization
		cached.selector = selector;
	}
	return cached;
};

/**
 * A low-level selection function that works with Sizzle's compiled
 *  selector functions
 * @param {String|Function} selector A selector or a pre-compiled
 *  selector function built with Sizzle.compile
 * @param {Element} context
 * @param {Array} [results]
 * @param {Array} [seed] A set of elements to match against
 */
select = Sizzle.select = function( selector, context, results, seed ) {
	var i, tokens, token, type, find,
		compiled = typeof selector === "function" && selector,
		match = !seed && tokenize( (selector = compiled.selector || selector) );

	results = results || [];

	// Try to minimize operations if there is only one selector in the list and no seed
	// (the latter of which guarantees us context)
	if ( match.length === 1 ) {

		// Reduce context if the leading compound 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;

			// Precompiled matchers will still verify ancestry, so step up a level
			} else if ( compiled ) {
				context = context.parentNode;
			}

			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 if one is not provided
	// Provide `match` to avoid retokenization if we modified the selector above
	( compiled || compile( selector, match ) )(
		seed,
		context,
		!documentIsHTML,
		results,
		!context || 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-35+
// 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"
// http://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.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
jQuery.text = Sizzle.getText;
jQuery.isXMLDoc = Sizzle.isXML;
jQuery.contains = Sizzle.contains;



var 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;
};


var siblings = function( n, elem ) {
	var matched = [];

	for ( ; n; n = n.nextSibling ) {
		if ( n.nodeType === 1 && n !== elem ) {
			matched.push( n );
		}
	}

	return matched;
};


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 ( jQuery.inArray( elem, qualifier ) > -1 ) !== 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,
			ret = [],
			self = this,
			len = self.length;

		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, root ) {
		var match, elem;

		// HANDLE: $(""), $(null), $(undefined), $(false)
		if ( !selector ) {
			return this;
		}

		// init accepts an alternate rootjQuery
		// so migrate can support jQuery.sub (gh-2101)
		root = root || rootjQuery;

		// Handle HTML strings
		if ( typeof selector === "string" ) {
			if ( selector.charAt( 0 ) === "<" &&
				selector.charAt( 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 ) {

						// Handle the case where IE and Opera return items
						// by name instead of ID
						if ( elem.id !== match[ 2 ] ) {
							return rootjQuery.find( selector );
						}

						// Otherwise, we 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 || root ).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 root.ready !== "undefined" ?
				root.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.fn.extend( {
	has: function( target ) {
		var i,
			targets = jQuery( target, this ),
			len = targets.length;

		return this.filter( function() {
			for ( i = 0; i < len; 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.uniqueSort( 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 jQuery.inArray( this[ 0 ], jQuery( elem ) );
		}

		// Locate the position of the desired element
		return jQuery.inArray(

			// If it receives a jQuery object, the first element is used
			elem.jquery ? elem[ 0 ] : elem, this );
	},

	add: function( selector, context ) {
		return this.pushStack(
			jQuery.uniqueSort(
				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 ) {
	do {
		cur = cur[ dir ];
	} while ( cur && 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 dir( elem, "parentNode" );
	},
	parentsUntil: function( elem, i, until ) {
		return dir( elem, "parentNode", until );
	},
	next: function( elem ) {
		return sibling( elem, "nextSibling" );
	},
	prev: function( elem ) {
		return sibling( elem, "previousSibling" );
	},
	nextAll: function( elem ) {
		return dir( elem, "nextSibling" );
	},
	prevAll: function( elem ) {
		return dir( elem, "previousSibling" );
	},
	nextUntil: function( elem, i, until ) {
		return dir( elem, "nextSibling", until );
	},
	prevUntil: function( elem, i, until ) {
		return dir( elem, "previousSibling", until );
	},
	siblings: function( elem ) {
		return siblings( ( elem.parentNode || {} ).firstChild, elem );
	},
	children: function( elem ) {
		return siblings( elem.firstChild );
	},
	contents: function( elem ) {
		return jQuery.nodeName( elem, "iframe" ) ?
			elem.contentDocument || elem.contentWindow.document :
			jQuery.merge( [], elem.childNodes );
	}
}, function( name, fn ) {
	jQuery.fn[ name ] = function( until, selector ) {
		var ret = jQuery.map( this, fn, until );

		if ( name.slice( -5 ) !== "Until" ) {
			selector = until;
		}

		if ( selector && typeof selector === "string" ) {
			ret = jQuery.filter( selector, ret );
		}

		if ( this.length > 1 ) {

			// Remove duplicates
			if ( !guaranteedUnique[ name ] ) {
				ret = jQuery.uniqueSort( ret );
			}

			// Reverse order for parents* and prev-derivatives
			if ( rparentsprev.test( name ) ) {
				ret = ret.reverse();
			}
		}

		return this.pushStack( ret );
	};
} );
var rnotwhite = ( /\S+/g );



// Convert String-formatted options into Object-formatted ones
function createOptions( options ) {
	var object = {};
	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" ?
		createOptions( options ) :
		jQuery.extend( {}, options );

	var // Flag to know if list is currently firing
		firing,

		// Last fire value for non-forgettable lists
		memory,

		// Flag to know if list was already fired
		fired,

		// Flag to prevent firing
		locked,

		// Actual callback list
		list = [],

		// Queue of execution data for repeatable lists
		queue = [],

		// Index of currently firing callback (modified by add/remove as needed)
		firingIndex = -1,

		// Fire callbacks
		fire = function() {

			// Enforce single-firing
			locked = options.once;

			// Execute callbacks for all pending executions,
			// respecting firingIndex overrides and runtime changes
			fired = firing = true;
			for ( ; queue.length; firingIndex = -1 ) {
				memory = queue.shift();
				while ( ++firingIndex < list.length ) {

					// Run callback and check for early termination
					if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
						options.stopOnFalse ) {

						// Jump to end and forget the data so .add doesn't re-fire
						firingIndex = list.length;
						memory = false;
					}
				}
			}

			// Forget the data if we're done with it
			if ( !options.memory ) {
				memory = false;
			}

			firing = false;

			// Clean up if we're done firing for good
			if ( locked ) {

				// Keep an empty list if we have data for future add calls
				if ( memory ) {
					list = [];

				// Otherwise, this object is spent
				} else {
					list = "";
				}
			}
		},

		// Actual Callbacks object
		self = {

			// Add a callback or a collection of callbacks to the list
			add: function() {
				if ( list ) {

					// If we have memory from a past run, we should fire after adding
					if ( memory && !firing ) {
						firingIndex = list.length - 1;
						queue.push( memory );
					}

					( function add( args ) {
						jQuery.each( args, function( _, arg ) {
							if ( jQuery.isFunction( arg ) ) {
								if ( !options.unique || !self.has( arg ) ) {
									list.push( arg );
								}
							} else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {

								// Inspect recursively
								add( arg );
							}
						} );
					} )( arguments );

					if ( memory && !firing ) {
						fire();
					}
				}
				return this;
			},

			// Remove a callback from the list
			remove: function() {
				jQuery.each( arguments, function( _, arg ) {
					var index;
					while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
						list.splice( index, 1 );

						// Handle firing indexes
						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.length > 0;
			},

			// Remove all callbacks from the list
			empty: function() {
				if ( list ) {
					list = [];
				}
				return this;
			},

			// Disable .fire and .add
			// Abort any current/pending executions
			// Clear all callbacks and values
			disable: function() {
				locked = queue = [];
				list = memory = "";
				return this;
			},
			disabled: function() {
				return !list;
			},

			// Disable .fire
			// Also disable .add unless we have memory (since it would have no effect)
			// Abort any pending executions
			lock: function() {
				locked = true;
				if ( !memory ) {
					self.disable();
				}
				return this;
			},
			locked: function() {
				return !!locked;
			},

			// Call all callbacks with the given context and arguments
			fireWith: function( context, args ) {
				if ( !locked ) {
					args = args || [];
					args = [ context, args.slice ? args.slice() : args ];
					queue.push( args );
					if ( !firing ) {
						fire();
					}
				}
				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()
										.progress( newDefer.notify )
										.done( newDefer.resolve )
										.fail( newDefer.reject );
								} 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()
						.progress( updateFunc( i, progressContexts, progressValues ) )
						.done( updateFunc( i, resolveContexts, resolveValues ) )
						.fail( deferred.reject );
				} 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.triggerHandler ) {
			jQuery( document ).triggerHandler( "ready" );
			jQuery( document ).off( "ready" );
		}
	}
} );

/**
 * Clean-up method for dom ready events
 */
function detach() {
	if ( document.addEventListener ) {
		document.removeEventListener( "DOMContentLoaded", completed );
		window.removeEventListener( "load", completed );

	} else {
		document.detachEvent( "onreadystatechange", completed );
		window.detachEvent( "onload", completed );
	}
}

/**
 * The ready event handler and self cleanup method
 */
function completed() {

	// readyState === "complete" is good enough for us to call the dom ready in oldIE
	if ( document.addEventListener ||
		window.event.type === "load" ||
		document.readyState === "complete" ) {

		detach();
		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.
		// Support: IE6-10
		// Older IE sometimes signals "interactive" too soon
		if ( document.readyState === "complete" ||
			( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {

			// Handle it asynchronously to allow scripts the opportunity to delay ready
			window.setTimeout( jQuery.ready );

		// Standards-based browsers support DOMContentLoaded
		} else if ( document.addEventListener ) {

			// Use the handy event callback
			document.addEventListener( "DOMContentLoaded", completed );

			// A fallback to window.onload, that will always work
			window.addEventListener( "load", completed );

		// If IE event model is used
		} else {

			// Ensure firing before onload, maybe late but safe also for iframes
			document.attachEvent( "onreadystatechange", completed );

			// A fallback to window.onload, that will always work
			window.attachEvent( "onload", completed );

			// If IE and not a frame
			// continually check to see if the document is ready
			var top = false;

			try {
				top = window.frameElement == null && document.documentElement;
			} catch ( e ) {}

			if ( top && top.doScroll ) {
				( function doScrollCheck() {
					if ( !jQuery.isReady ) {

						try {

							// Use the trick by Diego Perini
							// http://javascript.nwbox.com/IEContentLoaded/
							top.doScroll( "left" );
						} catch ( e ) {
							return window.setTimeout( doScrollCheck, 50 );
						}

						// detach all dom ready events
						detach();

						// and execute any waiting functions
						jQuery.ready();
					}
				} )();
			}
		}
	}
	return readyList.promise( obj );
};

// Kick off the DOM ready check even if the user does not
jQuery.ready.promise();




// Support: IE<9
// Iteration over object's inherited properties before its own
var i;
for ( i in jQuery( support ) ) {
	break;
}
support.ownFirst = i === "0";

// Note: most support tests are defined in their respective modules.
// false until the test is run
support.inlineBlockNeedsLayout = false;

// Execute ASAP in case we need to set body.style.zoom
jQuery( function() {

	// Minified: var a,b,c,d
	var val, div, body, container;

	body = document.getElementsByTagName( "body" )[ 0 ];
	if ( !body || !body.style ) {

		// Return for frameset docs that don't have a body
		return;
	}

	// Setup
	div = document.createElement( "div" );
	container = document.createElement( "div" );
	container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
	body.appendChild( container ).appendChild( div );

	if ( typeof div.style.zoom !== "undefined" ) {

		// Support: IE<8
		// Check if natively block-level elements act like inline-block
		// elements when setting their display to 'inline' and giving
		// them layout
		div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";

		support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;
		if ( val ) {

			// Prevent IE 6 from affecting layout for positioned elements #11048
			// Prevent IE from shrinking the body in IE 7 mode #12869
			// Support: IE<8
			body.style.zoom = 1;
		}
	}

	body.removeChild( container );
} );


( function() {
	var div = document.createElement( "div" );

	// Support: IE<9
	support.deleteExpando = true;
	try {
		delete div.test;
	} catch ( e ) {
		support.deleteExpando = false;
	}

	// Null elements to avoid leaks in IE.
	div = null;
} )();
var acceptData = function( elem ) {
	var noData = jQuery.noData[ ( elem.nodeName + " " ).toLowerCase() ],
		nodeType = +elem.nodeType || 1;

	// Do not set data on non-element DOM nodes because it will not be cleared (#8335).
	return nodeType !== 1 && nodeType !== 9 ?
		false :

		// Nodes accept data unless otherwise specified; rejection can be conditional
		!noData || noData !== true && elem.getAttribute( "classid" ) === noData;
};




var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
	rmultiDash = /([A-Z])/g;

function dataAttr( elem, key, data ) {

	// If nothing was found internally, try to fetch any
	// data from the HTML5 data-* attribute
	if ( data === undefined && elem.nodeType === 1 ) {

		var 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
			jQuery.data( elem, key, data );

		} else {
			data = undefined;
		}
	}

	return data;
}

// checks a cache object for emptiness
function isEmptyDataObject( obj ) {
	var name;
	for ( name in obj ) {

		// if the public data object is empty, the private is still empty
		if ( name === "data" && jQuery.isEmptyObject( obj[ name ] ) ) {
			continue;
		}
		if ( name !== "toJSON" ) {
			return false;
		}
	}

	return true;
}

function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
	if ( !acceptData( elem ) ) {
		return;
	}

	var ret, thisCache,
		internalKey = jQuery.expando,

		// We have to handle DOM nodes and JS objects differently because IE6-7
		// can't GC object references properly across the DOM-JS boundary
		isNode = elem.nodeType,

		// Only DOM nodes need the global jQuery cache; JS object data is
		// attached directly to the object so GC can occur automatically
		cache = isNode ? jQuery.cache : elem,

		// Only defining an ID for JS objects if its cache already exists allows
		// the code to shortcut on the same path as a DOM node with no cache
		id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;

	// Avoid doing any more work than we need to when trying to get data on an
	// object that has no data at all
	if ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) &&
		data === undefined && typeof name === "string" ) {
		return;
	}

	if ( !id ) {

		// Only DOM nodes need a new unique ID for each element since their data
		// ends up in the global cache
		if ( isNode ) {
			id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;
		} else {
			id = internalKey;
		}
	}

	if ( !cache[ id ] ) {

		// Avoid exposing jQuery metadata on plain JS objects when the object
		// is serialized using JSON.stringify
		cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
	}

	// An object can be passed to jQuery.data instead of a key/value pair; this gets
	// shallow copied over onto the existing cache
	if ( typeof name === "object" || typeof name === "function" ) {
		if ( pvt ) {
			cache[ id ] = jQuery.extend( cache[ id ], name );
		} else {
			cache[ id ].data = jQuery.extend( cache[ id ].data, name );
		}
	}

	thisCache = cache[ id ];

	// jQuery data() is stored in a separate object inside the object's internal data
	// cache in order to avoid key collisions between internal data and user-defined
	// data.
	if ( !pvt ) {
		if ( !thisCache.data ) {
			thisCache.data = {};
		}

		thisCache = thisCache.data;
	}

	if ( data !== undefined ) {
		thisCache[ jQuery.camelCase( name ) ] = data;
	}

	// Check for both converted-to-camel and non-converted data property names
	// If a data property was specified
	if ( typeof name === "string" ) {

		// First Try to find as-is property data
		ret = thisCache[ name ];

		// Test for null|undefined property data
		if ( ret == null ) {

			// Try to find the camelCased property
			ret = thisCache[ jQuery.camelCase( name ) ];
		}
	} else {
		ret = thisCache;
	}

	return ret;
}

function internalRemoveData( elem, name, pvt ) {
	if ( !acceptData( elem ) ) {
		return;
	}

	var thisCache, i,
		isNode = elem.nodeType,

		// See jQuery.data for more information
		cache = isNode ? jQuery.cache : elem,
		id = isNode ? elem[ jQuery.expando ] : jQuery.expando;

	// If there is already no cache entry for this object, there is no
	// purpose in continuing
	if ( !cache[ id ] ) {
		return;
	}

	if ( name ) {

		thisCache = pvt ? cache[ id ] : cache[ id ].data;

		if ( thisCache ) {

			// Support array or space separated string names for data keys
			if ( !jQuery.isArray( name ) ) {

				// try the string as a key before any manipulation
				if ( name in thisCache ) {
					name = [ name ];
				} else {

					// split the camel cased version by spaces unless a key with the spaces exists
					name = jQuery.camelCase( name );
					if ( name in thisCache ) {
						name = [ name ];
					} else {
						name = name.split( " " );
					}
				}
			} else {

				// 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 = name.concat( jQuery.map( name, jQuery.camelCase ) );
			}

			i = name.length;
			while ( i-- ) {
				delete thisCache[ name[ i ] ];
			}

			// If there is no data left in the cache, we want to continue
			// and let the cache object itself get destroyed
			if ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) {
				return;
			}
		}
	}

	// See jQuery.data for more information
	if ( !pvt ) {
		delete cache[ id ].data;

		// Don't destroy the parent cache unless the internal data object
		// had been the only thing left in it
		if ( !isEmptyDataObject( cache[ id ] ) ) {
			return;
		}
	}

	// Destroy the cache
	if ( isNode ) {
		jQuery.cleanData( [ elem ], true );

	// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
	/* jshint eqeqeq: false */
	} else if ( support.deleteExpando || cache != cache.window ) {
		/* jshint eqeqeq: true */
		delete cache[ id ];

	// When all else fails, undefined
	} else {
		cache[ id ] = undefined;
	}
}

jQuery.extend( {
	cache: {},

	// The following elements (space-suffixed to avoid Object.prototype collisions)
	// throw uncatchable exceptions if you attempt to set expando properties
	noData: {
		"applet ": true,
		"embed ": true,

		// ...but Flash objects (which have this classid) *can* handle expandos
		"object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
	},

	hasData: function( elem ) {
		elem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ];
		return !!elem && !isEmptyDataObject( elem );
	},

	data: function( elem, name, data ) {
		return internalData( elem, name, data );
	},

	removeData: function( elem, name ) {
		return internalRemoveData( elem, name );
	},

	// For internal use only.
	_data: function( elem, name, data ) {
		return internalData( elem, name, data, true );
	},

	_removeData: function( elem, name ) {
		return internalRemoveData( elem, name, true );
	}
} );

jQuery.fn.extend( {
	data: function( key, value ) {
		var i, name, data,
			elem = this[ 0 ],
			attrs = elem && elem.attributes;

		// Special expections of .data basically thwart jQuery.access,
		// so implement the relevant behavior ourselves

		// Gets all values
		if ( key === undefined ) {
			if ( this.length ) {
				data = jQuery.data( elem );

				if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
					i = attrs.length;
					while ( i-- ) {

						// Support: IE11+
						// The attrs elements can be null (#14894)
						if ( attrs[ i ] ) {
							name = attrs[ i ].name;
							if ( name.indexOf( "data-" ) === 0 ) {
								name = jQuery.camelCase( name.slice( 5 ) );
								dataAttr( elem, name, data[ name ] );
							}
						}
					}
					jQuery._data( elem, "parsedAttrs", true );
				}
			}

			return data;
		}

		// Sets multiple values
		if ( typeof key === "object" ) {
			return this.each( function() {
				jQuery.data( this, key );
			} );
		}

		return arguments.length > 1 ?

			// Sets one value
			this.each( function() {
				jQuery.data( this, key, value );
			} ) :

			// Gets one value
			// Try to fetch any internally stored data first
			elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;
	},

	removeData: function( key ) {
		return this.each( function() {
			jQuery.removeData( this, key );
		} );
	}
} );


jQuery.extend( {
	queue: function( elem, type, data ) {
		var queue;

		if ( elem ) {
			type = ( type || "fx" ) + "queue";
			queue = jQuery._data( elem, type );

			// Speed up dequeue by getting out quickly if this is just a lookup
			if ( data ) {
				if ( !queue || jQuery.isArray( data ) ) {
					queue = jQuery._data( 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 jQuery._data( elem, key ) || jQuery._data( elem, key, {
			empty: jQuery.Callbacks( "once memory" ).add( function() {
				jQuery._removeData( elem, type + "queue" );
				jQuery._removeData( elem, 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 = jQuery._data( elements[ i ], type + "queueHooks" );
			if ( tmp && tmp.empty ) {
				count++;
				tmp.empty.add( resolve );
			}
		}
		resolve();
		return defer.promise( obj );
	}
} );


( function() {
	var shrinkWrapBlocksVal;

	support.shrinkWrapBlocks = function() {
		if ( shrinkWrapBlocksVal != null ) {
			return shrinkWrapBlocksVal;
		}

		// Will be changed later if needed.
		shrinkWrapBlocksVal = false;

		// Minified: var b,c,d
		var div, body, container;

		body = document.getElementsByTagName( "body" )[ 0 ];
		if ( !body || !body.style ) {

			// Test fired too early or in an unsupported environment, exit.
			return;
		}

		// Setup
		div = document.createElement( "div" );
		container = document.createElement( "div" );
		container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
		body.appendChild( container ).appendChild( div );

		// Support: IE6
		// Check if elements with layout shrink-wrap their children
		if ( typeof div.style.zoom !== "undefined" ) {

			// Reset CSS: box-sizing; display; margin; border
			div.style.cssText =

				// Support: Firefox<29, Android 2.3
				// Vendor-prefix box-sizing
				"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
				"box-sizing:content-box;display:block;margin:0;border:0;" +
				"padding:1px;width:1px;zoom:1";
			div.appendChild( document.createElement( "div" ) ).style.width = "5px";
			shrinkWrapBlocksVal = div.offsetWidth !== 3;
		}

		body.removeChild( container );

		return shrinkWrapBlocksVal;
	};

} )();
var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;

var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );


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 );
	};



function adjustCSS( elem, prop, valueParts, tween ) {
	var adjusted,
		scale = 1,
		maxIterations = 20,
		currentValue = tween ?
			function() { return tween.cur(); } :
			function() { return jQuery.css( elem, prop, "" ); },
		initial = currentValue(),
		unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),

		// Starting value computation is required for potential unit mismatches
		initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
			rcssNum.exec( jQuery.css( elem, prop ) );

	if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {

		// Trust units reported by jQuery.css
		unit = unit || initialInUnit[ 3 ];

		// Make sure we update the tween properties later on
		valueParts = valueParts || [];

		// Iteratively approximate from a nonzero starting point
		initialInUnit = +initial || 1;

		do {

			// If previous iteration zeroed out, double until we get *something*.
			// Use string for doubling so we don't accidentally see scale as unchanged below
			scale = scale || ".5";

			// Adjust and apply
			initialInUnit = initialInUnit / scale;
			jQuery.style( elem, prop, initialInUnit + unit );

		// Update scale, tolerating zero or NaN from tween.cur()
		// Break the loop if scale is unchanged or perfect, or if we've just had enough.
		} while (
			scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
		);
	}

	if ( valueParts ) {
		initialInUnit = +initialInUnit || +initial || 0;

		// Apply relative offset (+=/-=) if specified
		adjusted = valueParts[ 1 ] ?
			initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
			+valueParts[ 2 ];
		if ( tween ) {
			tween.unit = unit;
			tween.start = initialInUnit;
			tween.end = adjusted;
		}
	}
	return adjusted;
}


// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
	var i = 0,
		length = elems.length,
		bulk = key == null;

	// Sets many values
	if ( jQuery.type( key ) === "object" ) {
		chainable = true;
		for ( i in key ) {
			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 < length; i++ ) {
				fn(
					elems[ i ],
					key,
					raw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) )
				);
			}
		}
	}

	return chainable ?
		elems :

		// Gets
		bulk ?
			fn.call( elems ) :
			length ? fn( elems[ 0 ], key ) : emptyGet;
};
var rcheckableType = ( /^(?:checkbox|radio)$/i );

var rtagName = ( /<([\w:-]+)/ );

var rscriptType = ( /^$|\/(?:java|ecma)script/i );

var rleadingWhitespace = ( /^\s+/ );

var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|" +
		"details|dialog|figcaption|figure|footer|header|hgroup|main|" +
		"mark|meter|nav|output|picture|progress|section|summary|template|time|video";



function createSafeFragment( document ) {
	var list = nodeNames.split( "|" ),
		safeFrag = document.createDocumentFragment();

	if ( safeFrag.createElement ) {
		while ( list.length ) {
			safeFrag.createElement(
				list.pop()
			);
		}
	}
	return safeFrag;
}


( function() {
	var div = document.createElement( "div" ),
		fragment = document.createDocumentFragment(),
		input = document.createElement( "input" );

	// Setup
	div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";

	// IE strips leading whitespace when .innerHTML is used
	support.leadingWhitespace = div.firstChild.nodeType === 3;

	// Make sure that tbody elements aren't automatically inserted
	// IE will insert them into empty tables
	support.tbody = !div.getElementsByTagName( "tbody" ).length;

	// Make sure that link elements get serialized correctly by innerHTML
	// This requires a wrapper element in IE
	support.htmlSerialize = !!div.getElementsByTagName( "link" ).length;

	// Makes sure cloning an html5 element does not cause problems
	// Where outerHTML is undefined, this still works
	support.html5Clone =
		document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>";

	// Check if a disconnected checkbox will retain its checked
	// value of true after appended to the DOM (IE6/7)
	input.type = "checkbox";
	input.checked = true;
	fragment.appendChild( input );
	support.appendChecked = input.checked;

	// Make sure textarea (and checkbox) defaultValue is properly cloned
	// Support: IE6-IE11+
	div.innerHTML = "<textarea>x</textarea>";
	support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;

	// #11217 - WebKit loses check when the name is after the checked attribute
	fragment.appendChild( div );

	// Support: Windows Web Apps (WWA)
	// `name` and `type` must use .setAttribute for WWA (#14901)
	input = document.createElement( "input" );
	input.setAttribute( "type", "radio" );
	input.setAttribute( "checked", "checked" );
	input.setAttribute( "name", "t" );

	div.appendChild( input );

	// 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;

	// Support: IE<9
	// Cloned elements keep attachEvent handlers, we use addEventListener on IE9+
	support.noCloneEvent = !!div.addEventListener;

	// Support: IE<9
	// Since attributes and properties are the same in IE,
	// cleanData must set properties to undefined rather than use removeAttribute
	div[ jQuery.expando ] = 1;
	support.attributes = !div.getAttribute( jQuery.expando );
} )();


// We have to close these tags to support XHTML (#13200)
var wrapMap = {
	option: [ 1, "<select multiple='multiple'>", "</select>" ],
	legend: [ 1, "<fieldset>", "</fieldset>" ],
	area: [ 1, "<map>", "</map>" ],

	// Support: IE8
	param: [ 1, "<object>", "</object>" ],
	thead: [ 1, "<table>", "</table>" ],
	tr: [ 2, "<table><tbody>", "</tbody></table>" ],
	col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
	td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],

	// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
	// unless wrapped in a div with non-breaking characters in front of it.
	_default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
};

// Support: IE8-IE9
wrapMap.optgroup = wrapMap.option;

wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;


function getAll( context, tag ) {
	var elems, elem,
		i = 0,
		found = typeof context.getElementsByTagName !== "undefined" ?
			context.getElementsByTagName( tag || "*" ) :
			typeof context.querySelectorAll !== "undefined" ?
				context.querySelectorAll( tag || "*" ) :
				undefined;

	if ( !found ) {
		for ( found = [], elems = context.childNodes || context;
			( elem = elems[ i ] ) != null;
			i++
		) {
			if ( !tag || jQuery.nodeName( elem, tag ) ) {
				found.push( elem );
			} else {
				jQuery.merge( found, getAll( elem, tag ) );
			}
		}
	}

	return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
		jQuery.merge( [ context ], found ) :
		found;
}


// Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) {
	var elem,
		i = 0;
	for ( ; ( elem = elems[ i ] ) != null; i++ ) {
		jQuery._data(
			elem,
			"globalEval",
			!refElements || jQuery._data( refElements[ i ], "globalEval" )
		);
	}
}


var rhtml = /<|&#?\w+;/,
	rtbody = /<tbody/i;

function fixDefaultChecked( elem ) {
	if ( rcheckableType.test( elem.type ) ) {
		elem.defaultChecked = elem.checked;
	}
}

function buildFragment( elems, context, scripts, selection, ignored ) {
	var j, elem, contains,
		tmp, tag, tbody, wrap,
		l = elems.length,

		// Ensure a safe fragment
		safe = createSafeFragment( context ),

		nodes = [],
		i = 0;

	for ( ; i < l; i++ ) {
		elem = elems[ i ];

		if ( elem || elem === 0 ) {

			// Add nodes directly
			if ( jQuery.type( elem ) === "object" ) {
				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 || safe.appendChild( context.createElement( "div" ) );

				// Deserialize a standard representation
				tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
				wrap = wrapMap[ tag ] || wrapMap._default;

				tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];

				// Descend through wrappers to the right content
				j = wrap[ 0 ];
				while ( j-- ) {
					tmp = tmp.lastChild;
				}

				// Manually add leading whitespace removed by IE
				if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
					nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[ 0 ] ) );
				}

				// Remove IE's autoinserted <tbody> from table fragments
				if ( !support.tbody ) {

					// String was a <table>, *may* have spurious <tbody>
					elem = tag === "table" && !rtbody.test( elem ) ?
						tmp.firstChild :

						// String was a bare <thead> or <tfoot>
						wrap[ 1 ] === "<table>" && !rtbody.test( elem ) ?
							tmp :
							0;

					j = elem && elem.childNodes.length;
					while ( j-- ) {
						if ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), "tbody" ) &&
							!tbody.childNodes.length ) {

							elem.removeChild( tbody );
						}
					}
				}

				jQuery.merge( nodes, tmp.childNodes );

				// Fix #12392 for WebKit and IE > 9
				tmp.textContent = "";

				// Fix #12392 for oldIE
				while ( tmp.firstChild ) {
					tmp.removeChild( tmp.firstChild );
				}

				// Remember the top-level container for proper cleanup
				tmp = safe.lastChild;
			}
		}
	}

	// Fix #11356: Clear elements from fragment
	if ( tmp ) {
		safe.removeChild( tmp );
	}

	// Reset defaultChecked for any radios and checkboxes
	// about to be appended to the DOM in IE 6/7 (#8060)
	if ( !support.appendChecked ) {
		jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
	}

	i = 0;
	while ( ( elem = nodes[ i++ ] ) ) {

		// Skip elements already in the context collection (trac-4087)
		if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
			if ( ignored ) {
				ignored.push( elem );
			}

			continue;
		}

		contains = jQuery.contains( elem.ownerDocument, elem );

		// Append to fragment
		tmp = getAll( safe.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 );
				}
			}
		}
	}

	tmp = null;

	return safe;
}


( function() {
	var i, eventName,
		div = document.createElement( "div" );

	// Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events)
	for ( i in { submit: true, change: true, focusin: true } ) {
		eventName = "on" + i;

		if ( !( support[ i ] = eventName in window ) ) {

			// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
			div.setAttribute( eventName, "t" );
			support[ i ] = div.attributes[ eventName ].expando === false;
		}
	}

	// Null elements to avoid leaks in IE.
	div = null;
} )();


var rformElems = /^(?:input|select|textarea)$/i,
	rkeyEvent = /^key/,
	rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
	rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
	rtypenamespace = /^([^.]*)(?:\.(.+)|)/;

function returnTrue() {
	return true;
}

function returnFalse() {
	return false;
}

// Support: IE9
// See #13393 for more info
function safeActiveElement() {
	try {
		return document.activeElement;
	} catch ( err ) { }
}

function on( elem, types, selector, data, fn, 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 ) {
			on( elem, type, selector, data, types[ type ], one );
		}
		return elem;
	}

	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 elem;
	}

	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 elem.each( function() {
		jQuery.event.add( this, types, fn, data, selector );
	} );
}

/*
 * 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 tmp, events, t, handleObjIn,
			special, eventHandle, handleObj,
			handlers, type, namespaces, origType,
			elemData = jQuery._data( 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 !== "undefined" &&
					( !e || jQuery.event.triggered !== e.type ) ?
					jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
					undefined;
			};

			// Add elem as a property of the handle fn to prevent a memory leak
			// with IE non-native events
			eventHandle.elem = elem;
		}

		// 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/attachEvent if the special events handler returns false
				if ( !special.setup ||
					special.setup.call( elem, data, namespaces, eventHandle ) === false ) {

					// Bind the global event handler to the element
					if ( elem.addEventListener ) {
						elem.addEventListener( type, eventHandle, false );

					} else if ( elem.attachEvent ) {
						elem.attachEvent( "on" + type, eventHandle );
					}
				}
			}

			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;
		}

		// Nullify elem to prevent memory leaks in IE
		elem = null;
	},

	// Detach an event or set of events from an element
	remove: function( elem, types, handler, selector, mappedTypes ) {
		var j, handleObj, tmp,
			origCount, t, events,
			special, handlers, type,
			namespaces, origType,
			elemData = jQuery.hasData( elem ) && jQuery._data( 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;

			// removeData also checks for emptiness and clears the expando if empty
			// so use it instead of delete
			jQuery._removeData( elem, "events" );
		}
	},

	trigger: function( event, data, elem, onlyHandlers ) {
		var handle, ontype, cur,
			bubbleType, special, tmp, i,
			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( "." ) > -1 ) {

			// 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.rnamespace = 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 = ( jQuery._data( cur, "events" ) || {} )[ event.type ] &&
				jQuery._data( cur, "handle" );

			if ( handle ) {
				handle.apply( cur, data );
			}

			// Native handler
			handle = ontype && cur[ ontype ];
			if ( handle && handle.apply && 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
				) && acceptData( elem )
			) {

				// Call a native DOM method on the target with the same name name as the event.
				// Can't use an .isFunction() check here because IE6/7 fails that test.
				// Don't do default actions on window, that's where global variables be (#6170)
				if ( ontype && 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;
					try {
						elem[ type ]();
					} catch ( e ) {

						// IE<9 dies on focus/blur to hidden element (#1486,#12518)
						// only reproducible on winXP IE8 native, not IE9 in IE8 mode
					}
					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 = ( jQuery._data( 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.rnamespace || event.rnamespace.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;

		// Support (at least): Chrome, IE9
		// Find delegate handlers
		// Black-hole SVG <use> instance trees (#13180)
		//
		// Support: Firefox<=42+
		// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
		if ( delegateCount && cur.nodeType &&
			( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {

			/* jshint eqeqeq: false */
			for ( ; cur != this; cur = cur.parentNode || this ) {
				/* jshint eqeqeq: true */

				// Don't check non-elements (#13208)
				// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
				if ( cur.nodeType === 1 && ( 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 ) > -1 :
								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;
	},

	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: IE<9
		// Fix target property (#1925)
		if ( !event.target ) {
			event.target = originalEvent.srcElement || document;
		}

		// Support: Safari 6-8+
		// Target should not be a text node (#504, #13143)
		if ( event.target.nodeType === 3 ) {
			event.target = event.target.parentNode;
		}

		// Support: IE<9
		// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
		event.metaKey = !!event.metaKey;

		return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
	},

	// Includes some event props shared by KeyEvent and MouseEvent
	props: ( "altKey bubbles cancelable ctrlKey currentTarget detail 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 fromElement offsetX offsetY " +
			"pageX pageY screenX screenY toElement" ).split( " " ),
		filter: function( event, original ) {
			var body, eventDoc, doc,
				button = original.button,
				fromElement = original.fromElement;

			// 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 relatedTarget, if necessary
			if ( !event.relatedTarget && fromElement ) {
				event.relatedTarget = fromElement === event.target ?
					original.toElement :
					fromElement;
			}

			// 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;
		}
	},

	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 ) {
					try {
						this.focus();
						return false;
					} catch ( e ) {

						// Support: IE<9
						// If we error on focus to hidden element (#1486, #12518),
						// let .trigger() run the handlers
					}
				}
			},
			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 ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
					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 ) {
					event.originalEvent.returnValue = event.result;
				}
			}
		}
	},

	// Piggyback on a donor event to simulate a different one
	simulate: function( type, elem, event ) {
		var e = jQuery.extend(
			new jQuery.Event(),
			event,
			{
				type: type,
				isSimulated: true

				// Previously, `originalEvent: {}` was set here, so stopPropagation call
				// would not be triggered on donor event, since in our own
				// jQuery.event.stopPropagation function we had a check for existence of
				// originalEvent.stopPropagation method, so, consequently it would be a noop.
				//
				// Guard for simulated events was moved to jQuery.event.stopPropagation function
				// since `originalEvent` should point to the original event for the
				// constancy with other events and for more focused logic
			}
		);

		jQuery.event.trigger( e, null, elem );

		if ( e.isDefaultPrevented() ) {
			event.preventDefault();
		}
	}
};

jQuery.removeEvent = document.removeEventListener ?
	function( elem, type, handle ) {

		// This "if" is needed for plain objects
		if ( elem.removeEventListener ) {
			elem.removeEventListener( type, handle );
		}
	} :
	function( elem, type, handle ) {
		var name = "on" + type;

		if ( elem.detachEvent ) {

			// #8545, #7054, preventing memory leaks for custom events in IE6-8
			// detachEvent needed property on element, by name of that event,
			// to properly expose it to GC
			if ( typeof elem[ name ] === "undefined" ) {
				elem[ name ] = null;
			}

			elem.detachEvent( name, handle );
		}
	};

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 ||
				src.defaultPrevented === undefined &&

				// Support: IE < 9, Android < 4.0
				src.returnValue === false ?
			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 = {
	constructor: jQuery.Event,
	isDefaultPrevented: returnFalse,
	isPropagationStopped: returnFalse,
	isImmediatePropagationStopped: returnFalse,

	preventDefault: function() {
		var e = this.originalEvent;

		this.isDefaultPrevented = returnTrue;
		if ( !e ) {
			return;
		}

		// If preventDefault exists, run it on the original event
		if ( e.preventDefault ) {
			e.preventDefault();

		// Support: IE
		// Otherwise set the returnValue property of the original event to false
		} else {
			e.returnValue = false;
		}
	},
	stopPropagation: function() {
		var e = this.originalEvent;

		this.isPropagationStopped = returnTrue;

		if ( !e || this.isSimulated ) {
			return;
		}

		// If stopPropagation exists, run it on the original event
		if ( e.stopPropagation ) {
			e.stopPropagation();
		}

		// Support: IE
		// Set the cancelBubble property of the original event to true
		e.cancelBubble = true;
	},
	stopImmediatePropagation: function() {
		var e = this.originalEvent;

		this.isImmediatePropagationStopped = returnTrue;

		if ( e && e.stopImmediatePropagation ) {
			e.stopImmediatePropagation();
		}

		this.stopPropagation();
	}
};

// Create mouseenter/leave events using mouseover/out and event-time checks
// so that event delegation works in jQuery.
// Do the same for pointerenter/pointerleave and pointerover/pointerout
//
// Support: Safari 7 only
// Safari sends mouseenter too often; see:
// https://code.google.com/p/chromium/issues/detail?id=470258
// for the description of the bug (it existed in older Chrome versions as well).
jQuery.each( {
	mouseenter: "mouseover",
	mouseleave: "mouseout",
	pointerenter: "pointerover",
	pointerleave: "pointerout"
}, 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 mouseenter/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;
		}
	};
} );

// IE submit delegation
if ( !support.submit ) {

	jQuery.event.special.submit = {
		setup: function() {

			// Only need this for delegated form submit events
			if ( jQuery.nodeName( this, "form" ) ) {
				return false;
			}

			// Lazy-add a submit handler when a descendant form may potentially be submitted
			jQuery.event.add( this, "click._submit keypress._submit", function( e ) {

				// Node name check avoids a VML-related crash in IE (#9807)
				var elem = e.target,
					form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ?

						// Support: IE <=8
						// We use jQuery.prop instead of elem.form
						// to allow fixing the IE8 delegated submit issue (gh-2332)
						// by 3rd party polyfills/workarounds.
						jQuery.prop( elem, "form" ) :
						undefined;

				if ( form && !jQuery._data( form, "submit" ) ) {
					jQuery.event.add( form, "submit._submit", function( event ) {
						event._submitBubble = true;
					} );
					jQuery._data( form, "submit", true );
				}
			} );

			// return undefined since we don't need an event listener
		},

		postDispatch: function( event ) {

			// If form was submitted by the user, bubble the event up the tree
			if ( event._submitBubble ) {
				delete event._submitBubble;
				if ( this.parentNode && !event.isTrigger ) {
					jQuery.event.simulate( "submit", this.parentNode, event );
				}
			}
		},

		teardown: function() {

			// Only need this for delegated form submit events
			if ( jQuery.nodeName( this, "form" ) ) {
				return false;
			}

			// Remove delegated handlers; cleanData eventually reaps submit handlers attached above
			jQuery.event.remove( this, "._submit" );
		}
	};
}

// IE change delegation and checkbox/radio fix
if ( !support.change ) {

	jQuery.event.special.change = {

		setup: function() {

			if ( rformElems.test( this.nodeName ) ) {

				// IE doesn't fire change on a check/radio until blur; trigger it on click
				// after a propertychange. Eat the blur-change in special.change.handle.
				// This still fires onchange a second time for check/radio after blur.
				if ( this.type === "checkbox" || this.type === "radio" ) {
					jQuery.event.add( this, "propertychange._change", function( event ) {
						if ( event.originalEvent.propertyName === "checked" ) {
							this._justChanged = true;
						}
					} );
					jQuery.event.add( this, "click._change", function( event ) {
						if ( this._justChanged && !event.isTrigger ) {
							this._justChanged = false;
						}

						// Allow triggered, simulated change events (#11500)
						jQuery.event.simulate( "change", this, event );
					} );
				}
				return false;
			}

			// Delegated event; lazy-add a change handler on descendant inputs
			jQuery.event.add( this, "beforeactivate._change", function( e ) {
				var elem = e.target;

				if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "change" ) ) {
					jQuery.event.add( elem, "change._change", function( event ) {
						if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
							jQuery.event.simulate( "change", this.parentNode, event );
						}
					} );
					jQuery._data( elem, "change", true );
				}
			} );
		},

		handle: function( event ) {
			var elem = event.target;

			// Swallow native change events from checkbox/radio, we already triggered them above
			if ( this !== elem || event.isSimulated || event.isTrigger ||
				( elem.type !== "radio" && elem.type !== "checkbox" ) ) {

				return event.handleObj.handler.apply( this, arguments );
			}
		},

		teardown: function() {
			jQuery.event.remove( this, "._change" );

			return !rformElems.test( this.nodeName );
		}
	};
}

// Support: Firefox
// Firefox doesn't have focus(in | out) events
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
//
// Support: Chrome, Safari
// focus(in | out) events fire after focus & blur events,
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857
if ( !support.focusin ) {
	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 ) );
		};

		jQuery.event.special[ fix ] = {
			setup: function() {
				var doc = this.ownerDocument || this,
					attaches = jQuery._data( doc, fix );

				if ( !attaches ) {
					doc.addEventListener( orig, handler, true );
				}
				jQuery._data( doc, fix, ( attaches || 0 ) + 1 );
			},
			teardown: function() {
				var doc = this.ownerDocument || this,
					attaches = jQuery._data( doc, fix ) - 1;

				if ( !attaches ) {
					doc.removeEventListener( orig, handler, true );
					jQuery._removeData( doc, fix );
				} else {
					jQuery._data( doc, fix, attaches );
				}
			}
		};
	} );
}

jQuery.fn.extend( {

	on: function( types, selector, data, fn ) {
		return on( this, types, selector, data, fn );
	},
	one: function( types, selector, data, fn ) {
		return on( this, 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 rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
	rnoshimcache = new RegExp( "<(?:" + nodeNames + ")[\\s/>]", "i" ),
	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,

	// Support: IE 10-11, Edge 10240+
	// In IE/Edge using regex groups here causes severe slowdowns.
	// See https://connect.microsoft.com/IE/feedback/details/1736512/
	rnoInnerhtml = /<script|<style|<link/i,

	// checked="checked" or checked
	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
	rscriptTypeMasked = /^true\/(.*)/,
	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
	safeFragment = createSafeFragment( document ),
	fragmentDiv = safeFragment.appendChild( document.createElement( "div" ) );

// Support: IE<8
// 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 = ( jQuery.find.attr( elem, "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;
}

function cloneCopyEvent( src, dest ) {
	if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
		return;
	}

	var type, i, l,
		oldData = jQuery._data( src ),
		curData = jQuery._data( dest, oldData ),
		events = oldData.events;

	if ( events ) {
		delete curData.handle;
		curData.events = {};

		for ( type in events ) {
			for ( i = 0, l = events[ type ].length; i < l; i++ ) {
				jQuery.event.add( dest, type, events[ type ][ i ] );
			}
		}
	}

	// make the cloned public data object a copy from the original
	if ( curData.data ) {
		curData.data = jQuery.extend( {}, curData.data );
	}
}

function fixCloneNodeIssues( src, dest ) {
	var nodeName, e, data;

	// We do not need to do anything for non-Elements
	if ( dest.nodeType !== 1 ) {
		return;
	}

	nodeName = dest.nodeName.toLowerCase();

	// IE6-8 copies events bound via attachEvent when using cloneNode.
	if ( !support.noCloneEvent && dest[ jQuery.expando ] ) {
		data = jQuery._data( dest );

		for ( e in data.events ) {
			jQuery.removeEvent( dest, e, data.handle );
		}

		// Event data gets referenced instead of copied if the expando gets copied too
		dest.removeAttribute( jQuery.expando );
	}

	// IE blanks contents when cloning scripts, and tries to evaluate newly-set text
	if ( nodeName === "script" && dest.text !== src.text ) {
		disableScript( dest ).text = src.text;
		restoreScript( dest );

	// IE6-10 improperly clones children of object elements using classid.
	// IE10 throws NoModificationAllowedError if parent is null, #12132.
	} else if ( nodeName === "object" ) {
		if ( dest.parentNode ) {
			dest.outerHTML = src.outerHTML;
		}

		// This path appears unavoidable for IE9. When cloning an object
		// element in IE9, the outerHTML strategy above is not sufficient.
		// If the src has innerHTML and the destination does not,
		// copy the src.innerHTML into the dest.innerHTML. #10324
		if ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) {
			dest.innerHTML = src.innerHTML;
		}

	} else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {

		// IE6-8 fails to persist the checked state of a cloned checkbox
		// or radio button. Worse, IE6-7 fail to give the cloned element
		// a checked appearance if the defaultChecked value isn't also set

		dest.defaultChecked = dest.checked = src.checked;

		// IE6-7 get confused and end up setting the value of a cloned
		// checkbox/radio button to an empty string instead of "on"
		if ( dest.value !== src.value ) {
			dest.value = src.value;
		}

	// IE6-8 fails to return the selected option to the default selected
	// state when cloning options
	} else if ( nodeName === "option" ) {
		dest.defaultSelected = dest.selected = src.defaultSelected;

	// IE6-8 fails to set the defaultValue to the correct value when
	// cloning other types of input fields
	} else if ( nodeName === "input" || nodeName === "textarea" ) {
		dest.defaultValue = src.defaultValue;
	}
}

function domManip( collection, args, callback, ignored ) {

	// Flatten any nested arrays
	args = concat.apply( [], args );

	var first, node, hasScripts,
		scripts, doc, fragment,
		i = 0,
		l = collection.length,
		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 collection.each( function( index ) {
			var self = collection.eq( index );
			if ( isFunction ) {
				args[ 0 ] = value.call( this, index, self.html() );
			}
			domManip( self, args, callback, ignored );
		} );
	}

	if ( l ) {
		fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
		first = fragment.firstChild;

		if ( fragment.childNodes.length === 1 ) {
			fragment = first;
		}

		// Require either new content or an interest in ignored elements to invoke the callback
		if ( first || ignored ) {
			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: Android<4.1, PhantomJS<2
						// push.apply(_, arraylike) throws on ancient WebKit
						jQuery.merge( scripts, getAll( node, "script" ) );
					}
				}

				callback.call( collection[ 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 || "" ) &&
						!jQuery._data( 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.text || node.textContent || node.innerHTML || "" )
									.replace( rcleanScript, "" )
							);
						}
					}
				}
			}

			// Fix #11809: Avoid leaking memory
			fragment = first = null;
		}
	}

	return collection;
}

function remove( elem, selector, keepData ) {
	var node,
		elems = selector ? jQuery.filter( selector, elem ) : elem,
		i = 0;

	for ( ; ( node = elems[ i ] ) != null; i++ ) {

		if ( !keepData && node.nodeType === 1 ) {
			jQuery.cleanData( getAll( node ) );
		}

		if ( node.parentNode ) {
			if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
				setGlobalEval( getAll( node, "script" ) );
			}
			node.parentNode.removeChild( node );
		}
	}

	return elem;
}

jQuery.extend( {
	htmlPrefilter: function( html ) {
		return html.replace( rxhtmlTag, "<$1></$2>" );
	},

	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
		var destElements, node, clone, i, srcElements,
			inPage = jQuery.contains( elem.ownerDocument, elem );

		if ( support.html5Clone || jQuery.isXMLDoc( elem ) ||
			!rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {

			clone = elem.cloneNode( true );

		// IE<=8 does not properly clone detached, unknown element nodes
		} else {
			fragmentDiv.innerHTML = elem.outerHTML;
			fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
		}

		if ( ( !support.noCloneEvent || !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 );

			// Fix all IE cloning issues
			for ( i = 0; ( node = srcElements[ i ] ) != null; ++i ) {

				// Ensure that the destination node is not null; Fixes #9587
				if ( destElements[ i ] ) {
					fixCloneNodeIssues( node, 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; ( node = srcElements[ i ] ) != null; i++ ) {
					cloneCopyEvent( node, destElements[ i ] );
				}
			} else {
				cloneCopyEvent( elem, clone );
			}
		}

		// Preserve script evaluation history
		destElements = getAll( clone, "script" );
		if ( destElements.length > 0 ) {
			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
		}

		destElements = srcElements = node = null;

		// Return the cloned set
		return clone;
	},

	cleanData: function( elems, /* internal */ forceAcceptData ) {
		var elem, type, id, data,
			i = 0,
			internalKey = jQuery.expando,
			cache = jQuery.cache,
			attributes = support.attributes,
			special = jQuery.event.special;

		for ( ; ( elem = elems[ i ] ) != null; i++ ) {
			if ( forceAcceptData || acceptData( elem ) ) {

				id = elem[ internalKey ];
				data = id && cache[ id ];

				if ( data ) {
					if ( data.events ) {
						for ( type in data.events ) {
							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 );
							}
						}
					}

					// Remove cache only if it was not already removed by jQuery.event.remove
					if ( cache[ id ] ) {

						delete cache[ id ];

						// Support: IE<9
						// IE does not allow us to delete expando properties from nodes
						// IE creates expando attributes along with the property
						// IE does not have a removeAttribute function on Document nodes
						if ( !attributes && typeof elem.removeAttribute !== "undefined" ) {
							elem.removeAttribute( internalKey );

						// Webkit & Blink performance suffers when deleting properties
						// from DOM nodes, so set to undefined instead
						// https://code.google.com/p/chromium/issues/detail?id=378607
						} else {
							elem[ internalKey ] = undefined;
						}

						deletedIds.push( id );
					}
				}
			}
		}
	}
} );

jQuery.fn.extend( {

	// Keep domManip exposed until 3.0 (gh-2225)
	domManip: domManip,

	detach: function( selector ) {
		return remove( this, selector, true );
	},

	remove: function( selector ) {
		return remove( this, selector );
	},

	text: function( value ) {
		return access( this, function( value ) {
			return value === undefined ?
				jQuery.text( this ) :
				this.empty().append(
					( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value )
				);
		}, null, value, arguments.length );
	},

	append: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.appendChild( elem );
			}
		} );
	},

	prepend: function() {
		return domManip( this, 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 domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this );
			}
		} );
	},

	after: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this.nextSibling );
			}
		} );
	},

	empty: function() {
		var elem,
			i = 0;

		for ( ; ( elem = this[ i ] ) != null; i++ ) {

			// Remove element nodes and prevent memory leaks
			if ( elem.nodeType === 1 ) {
				jQuery.cleanData( getAll( elem, false ) );
			}

			// Remove any remaining nodes
			while ( elem.firstChild ) {
				elem.removeChild( elem.firstChild );
			}

			// If this is a select, ensure that it displays empty (#12336)
			// Support: IE<9
			if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
				elem.options.length = 0;
			}
		}

		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 ) {
				return elem.nodeType === 1 ?
					elem.innerHTML.replace( rinlinejQuery, "" ) :
					undefined;
			}

			// See if we can take a shortcut and just use innerHTML
			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
				( support.htmlSerialize || !rnoshimcache.test( value )  ) &&
				( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
				!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {

				value = jQuery.htmlPrefilter( value );

				try {
					for ( ; i < l; i++ ) {

						// Remove element nodes and prevent memory leaks
						elem = this[ i ] || {};
						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 ignored = [];

		// Make the changes, replacing each non-ignored context element with the new content
		return domManip( this, arguments, function( elem ) {
			var parent = this.parentNode;

			if ( jQuery.inArray( this, ignored ) < 0 ) {
				jQuery.cleanData( getAll( this ) );
				if ( parent ) {
					parent.replaceChild( elem, this );
				}
			}

		// Force callback invocation
		}, ignored );
	}
} );

jQuery.each( {
	appendTo: "append",
	prependTo: "prepend",
	insertBefore: "before",
	insertAfter: "after",
	replaceAll: "replaceWith"
}, function( name, original ) {
	jQuery.fn[ name ] = function( selector ) {
		var elems,
			i = 0,
			ret = [],
			insert = jQuery( selector ),
			last = insert.length - 1;

		for ( ; i <= last; i++ ) {
			elems = i === last ? this : this.clone( true );
			jQuery( insert[ i ] )[ original ]( elems );

			// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
			push.apply( ret, elems.get() );
		}

		return this.pushStack( ret );
	};
} );


var iframe,
	elemdisplay = {

		// Support: Firefox
		// We have to pre-define these values for FF (#10227)
		HTML: "block",
		BODY: "block"
	};

/**
 * 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 ),

		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 ].contentWindow || iframe[ 0 ].contentDocument ).document;

			// 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 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 documentElement = document.documentElement;



( function() {
	var pixelPositionVal, pixelMarginRightVal, boxSizingReliableVal,
		reliableHiddenOffsetsVal, reliableMarginRightVal, reliableMarginLeftVal,
		container = document.createElement( "div" ),
		div = document.createElement( "div" );

	// Finish early in limited (non-browser) environments
	if ( !div.style ) {
		return;
	}

	div.style.cssText = "float:left;opacity:.5";

	// Support: IE<9
	// Make sure that element opacity exists (as opposed to filter)
	support.opacity = div.style.opacity === "0.5";

	// Verify style float existence
	// (IE uses styleFloat instead of cssFloat)
	support.cssFloat = !!div.style.cssFloat;

	div.style.backgroundClip = "content-box";
	div.cloneNode( true ).style.backgroundClip = "";
	support.clearCloneStyle = div.style.backgroundClip === "content-box";

	container = document.createElement( "div" );
	container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
		"padding:0;margin-top:1px;position:absolute";
	div.innerHTML = "";
	container.appendChild( div );

	// Support: Firefox<29, Android 2.3
	// Vendor-prefix box-sizing
	support.boxSizing = div.style.boxSizing === "" || div.style.MozBoxSizing === "" ||
		div.style.WebkitBoxSizing === "";

	jQuery.extend( support, {
		reliableHiddenOffsets: function() {
			if ( pixelPositionVal == null ) {
				computeStyleTests();
			}
			return reliableHiddenOffsetsVal;
		},

		boxSizingReliable: function() {

			// We're checking for pixelPositionVal here instead of boxSizingReliableVal
			// since that compresses better and they're computed together anyway.
			if ( pixelPositionVal == null ) {
				computeStyleTests();
			}
			return boxSizingReliableVal;
		},

		pixelMarginRight: function() {

			// Support: Android 4.0-4.3
			if ( pixelPositionVal == null ) {
				computeStyleTests();
			}
			return pixelMarginRightVal;
		},

		pixelPosition: function() {
			if ( pixelPositionVal == null ) {
				computeStyleTests();
			}
			return pixelPositionVal;
		},

		reliableMarginRight: function() {

			// Support: Android 2.3
			if ( pixelPositionVal == null ) {
				computeStyleTests();
			}
			return reliableMarginRightVal;
		},

		reliableMarginLeft: function() {

			// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37
			if ( pixelPositionVal == null ) {
				computeStyleTests();
			}
			return reliableMarginLeftVal;
		}
	} );

	function computeStyleTests() {
		var contents, divStyle,
			documentElement = document.documentElement;

		// Setup
		documentElement.appendChild( container );

		div.style.cssText =

			// Support: Android 2.3
			// Vendor-prefix box-sizing
			"-webkit-box-sizing:border-box;box-sizing:border-box;" +
			"position:relative;display:block;" +
			"margin:auto;border:1px;padding:1px;" +
			"top:1%;width:50%";

		// Support: IE<9
		// Assume reasonable values in the absence of getComputedStyle
		pixelPositionVal = boxSizingReliableVal = reliableMarginLeftVal = false;
		pixelMarginRightVal = reliableMarginRightVal = true;

		// Check for getComputedStyle so that this code is not run in IE<9.
		if ( window.getComputedStyle ) {
			divStyle = window.getComputedStyle( div );
			pixelPositionVal = ( divStyle || {} ).top !== "1%";
			reliableMarginLeftVal = ( divStyle || {} ).marginLeft === "2px";
			boxSizingReliableVal = ( divStyle || { width: "4px" } ).width === "4px";

			// Support: Android 4.0 - 4.3 only
			// Some styles come back with percentage values, even though they shouldn't
			div.style.marginRight = "50%";
			pixelMarginRightVal = ( divStyle || { marginRight: "4px" } ).marginRight === "4px";

			// Support: Android 2.3 only
			// 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
			contents = div.appendChild( document.createElement( "div" ) );

			// Reset CSS: box-sizing; display; margin; border; padding
			contents.style.cssText = div.style.cssText =

				// Support: Android 2.3
				// Vendor-prefix box-sizing
				"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
				"box-sizing:content-box;display:block;margin:0;border:0;padding:0";
			contents.style.marginRight = contents.style.width = "0";
			div.style.width = "1px";

			reliableMarginRightVal =
				!parseFloat( ( window.getComputedStyle( contents ) || {} ).marginRight );

			div.removeChild( contents );
		}

		// Support: IE6-8
		// First check that getClientRects works as expected
		// Check if table cells still have offsetWidth/Height when they are set
		// to display:none and there are still other visible table cells in a
		// table row; if so, offsetWidth/Height are not reliable for use when
		// determining if an element has been hidden directly using
		// display:none (it is still safe to use offsets if a parent element is
		// hidden; don safety goggles and see bug #4512 for more information).
		div.style.display = "none";
		reliableHiddenOffsetsVal = div.getClientRects().length === 0;
		if ( reliableHiddenOffsetsVal ) {
			div.style.display = "";
			div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
			contents = div.getElementsByTagName( "td" );
			contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none";
			reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
			if ( reliableHiddenOffsetsVal ) {
				contents[ 0 ].style.display = "";
				contents[ 1 ].style.display = "none";
				reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
			}
		}

		// Teardown
		documentElement.removeChild( container );
	}

} )();


var getStyles, curCSS,
	rposition = /^(top|right|bottom|left)$/;

if ( window.getComputedStyle ) {
	getStyles = function( elem ) {

		// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
		// IE throws on elements created in popups
		// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
		var view = elem.ownerDocument.defaultView;

		if ( !view || !view.opener ) {
			view = window;
		}

		return view.getComputedStyle( elem );
	};

	curCSS = function( elem, name, computed ) {
		var width, minWidth, maxWidth, ret,
			style = elem.style;

		computed = computed || getStyles( elem );

		// getPropertyValue is only needed for .css('filter') in IE9, see #12537
		ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;

		// Support: Opera 12.1x only
		// Fall back to style even without computed
		// computed is undefined for elems on document fragments
		if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {
			ret = jQuery.style( elem, name );
		}

		if ( computed ) {

			// A tribute to the "awesome hack by Dean Edwards"
			// Chrome < 17 and Safari 5.0 uses "computed value"
			// instead of "used value" for margin-right
			// Safari 5.1.7 (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 ( !support.pixelMarginRight() && 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;
			}
		}

		// Support: IE
		// IE returns zIndex value as an integer.
		return ret === undefined ?
			ret :
			ret + "";
	};
} else if ( documentElement.currentStyle ) {
	getStyles = function( elem ) {
		return elem.currentStyle;
	};

	curCSS = function( elem, name, computed ) {
		var left, rs, rsLeft, ret,
			style = elem.style;

		computed = computed || getStyles( elem );
		ret = computed ? computed[ name ] : undefined;

		// Avoid setting ret to empty string here
		// so we don't default to auto
		if ( ret == null && style && style[ name ] ) {
			ret = style[ name ];
		}

		// From the awesome hack by Dean Edwards
		// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291

		// If we're not dealing with a regular pixel number
		// but a number that has a weird ending, we need to convert it to pixels
		// but not position css attributes, as those are
		// proportional to the parent element instead
		// and we can't measure the parent instead because it
		// might trigger a "stacking dolls" problem
		if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {

			// Remember the original values
			left = style.left;
			rs = elem.runtimeStyle;
			rsLeft = rs && rs.left;

			// Put in the new values to get a computed value out
			if ( rsLeft ) {
				rs.left = elem.currentStyle.left;
			}
			style.left = name === "fontSize" ? "1em" : ret;
			ret = style.pixelLeft + "px";

			// Revert the changed values
			style.left = left;
			if ( rsLeft ) {
				rs.left = rsLeft;
			}
		}

		// Support: IE
		// IE returns zIndex value as an integer.
		return ret === undefined ?
			ret :
			ret + "" || "auto";
	};
}




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.
				delete this.get;
				return;
			}

			// Hook needed; redefine it so that the support test is not executed again.
			return ( this.get = hookFn ).apply( this, arguments );
		}
	};
}


var

		ralpha = /alpha\([^)]*\)/i,
	ropacity = /opacity\s*=\s*([^)]*)/i,

	// 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" ),

	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
	cssNormalTransform = {
		letterSpacing: "0",
		fontWeight: "400"
	},

	cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
	emptyStyle = document.createElement( "div" ).style;


// return a css property mapped to a potentially vendor prefixed property
function vendorPropName( name ) {

	// shortcut for names that are not vendor prefixed
	if ( name in emptyStyle ) {
		return name;
	}

	// check for vendor prefixed names
	var capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),
		i = cssPrefixes.length;

	while ( i-- ) {
		name = cssPrefixes[ i ] + capName;
		if ( name in emptyStyle ) {
			return name;
		}
	}
}

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 ] = jQuery._data( 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 ] =
					jQuery._data( elem, "olddisplay", defaultDisplay( elem.nodeName ) );
			}
		} else {
			hidden = isHidden( elem );

			if ( display && display !== "none" || !hidden ) {
				jQuery._data(
					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;
}

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 = support.boxSizing &&
			jQuery.css( elem, "boxSizing", false, styles ) === "border-box";

	// Support: IE11 only
	// In IE 11 fullscreen elements inside of an iframe have
	// 100x too small dimensions (gh-1764).
	if ( document.msFullscreenElement && window.top !== window ) {

		// Support: IE11 only
		// Running getBoundingClientRect on a disconnected node
		// in IE throws an error.
		if ( elem.getClientRects().length ) {
			val = Math.round( elem.getBoundingClientRect()[ name ] * 100 );
		}
	}

	// 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";
}

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: {
		"animationIterationCount": true,
		"columnCount": true,
		"fillOpacity": true,
		"flexGrow": true,
		"flexShrink": 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": support.cssFloat ? "cssFloat" : "styleFloat"
	},

	// 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( origName ) || 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 "+=" or "-=" to relative numbers (#7345)
			if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
				value = adjustCSS( elem, name, ret );

				// 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 the unit (except for certain CSS properties)
			if ( type === "number" ) {
				value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
			}

			// Fixes #8908, it can be done more correctly by specifing 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: IE
				// Swallow errors from 'invalid' CSS values (#5509)
				try {
					style[ name ] = value;
				} catch ( e ) {}
			}

		} 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 num, val, hooks,
			origName = jQuery.camelCase( name );

		// Make sure that we're working with the right name
		name = jQuery.cssProps[ origName ] ||
			( jQuery.cssProps[ origName ] = vendorPropName( origName ) || 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 || isFinite( 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 rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
					elem.offsetWidth === 0 ?
						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,
					support.boxSizing &&
						jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
					styles
				) : 0
			);
		}
	};
} );

if ( !support.opacity ) {
	jQuery.cssHooks.opacity = {
		get: function( elem, computed ) {

			// IE uses filters for opacity
			return ropacity.test( ( computed && elem.currentStyle ?
				elem.currentStyle.filter :
				elem.style.filter ) || "" ) ?
					( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
					computed ? "1" : "";
		},

		set: function( elem, value ) {
			var style = elem.style,
				currentStyle = elem.currentStyle,
				opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
				filter = currentStyle && currentStyle.filter || style.filter || "";

			// IE has trouble with opacity if it does not have layout
			// Force it by setting the zoom level
			style.zoom = 1;

			// if setting opacity to 1, and no other filters exist -
			// attempt to remove filter attribute #6652
			// if value === "", then remove inline opacity #12685
			if ( ( value >= 1 || value === "" ) &&
					jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
					style.removeAttribute ) {

				// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
				// if "filter:" is present at all, clearType is disabled, we want to avoid this
				// style.removeAttribute is IE Only, but so apparently is this code path...
				style.removeAttribute( "filter" );

				// if there is no filter style applied in a css rule
				// or unset inline opacity, we are done
				if ( value === "" || currentStyle && !currentStyle.filter ) {
					return;
				}
			}

			// otherwise, set new filter values
			style.filter = ralpha.test( filter ) ?
				filter.replace( ralpha, opacity ) :
				filter + " " + opacity;
		}
	};
}

jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
	function( elem, computed ) {
		if ( computed ) {
			return swap( elem, { "display": "inline-block" },
				curCSS, [ elem, "marginRight" ] );
		}
	}
);

jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
	function( elem, computed ) {
		if ( computed ) {
			return (
				parseFloat( curCSS( elem, "marginLeft" ) ) ||

				// Support: IE<=11+
				// Running getBoundingClientRect on a disconnected node in IE throws an error
				// Support: IE8 only
				// getClientRects() errors on disconnected elems
				( jQuery.contains( elem.ownerDocument, elem ) ?
					elem.getBoundingClientRect().left -
						swap( elem, { marginLeft: 0 }, function() {
							return elem.getBoundingClientRect().left;
						} ) :
					0
				)
			) + "px";
		}
	}
);

// 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 || jQuery.easing._default;
		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;

			// Use a property on the element directly when it is not a DOM element,
			// or when there is no matching style property that exists.
			if ( tween.elem.nodeType !== 1 ||
				tween.elem[ tween.prop ] != null && 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.nodeType === 1 &&
				( 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: IE <=9
// 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;
	},
	_default: "swing"
};

jQuery.fx = Tween.prototype.init;

// Back Compat <1.8 extension point
jQuery.fx.step = {};




var
	fxNow, timerId,
	rfxtypes = /^(?:toggle|show|hide)$/,
	rrun = /queueHooks$/;

// Animations created synchronously will run synchronously
function createFxNow() {
	window.setTimeout( function() {
		fxNow = undefined;
	} );
	return ( fxNow = jQuery.now() );
}

// Generate parameters to create a standard animation
function genFx( type, includeWidth ) {
	var which,
		attrs = { height: type },
		i = 0;

	// 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 = ( Animation.tweeners[ prop ] || [] ).concat( Animation.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, checkDisplay,
		anim = this,
		orig = {},
		style = elem.style,
		hidden = elem.nodeType && isHidden( elem ),
		dataShow = jQuery._data( 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 IE does 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" );

		// Test default display if display is currently "none"
		checkDisplay = display === "none" ?
			jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;

		if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {

			// inline-level elements accept inline-block;
			// block-level elements need to be inline with layout
			if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {
				style.display = "inline-block";
			} else {
				style.zoom = 1;
			}
		}
	}

	if ( opts.overflow ) {
		style.overflow = "hidden";
		if ( !support.shrinkWrapBlocks() ) {
			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 );

		// Any non-fx value stops us from restoring the original display value
		} else {
			display = undefined;
		}
	}

	if ( !jQuery.isEmptyObject( orig ) ) {
		if ( dataShow ) {
			if ( "hidden" in dataShow ) {
				hidden = dataShow.hidden;
			}
		} else {
			dataShow = jQuery._data( 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;
			jQuery._removeData( 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;
				}
			}
		}

	// If this is a noop like .hide().hide(), restore an overwritten display value
	} else if ( ( display === "none" ? defaultDisplay( elem.nodeName ) : display ) === "inline" ) {
		style.display = display;
	}
}

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 = Animation.prefilters.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 ),

				// Support: Android 2.3
				// 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: {},
				easing: jQuery.easing._default
			}, 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.notifyWith( elem, [ animation, 1, 0 ] );
					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 = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
		if ( result ) {
			if ( jQuery.isFunction( result.stop ) ) {
				jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
					jQuery.proxy( result.stop, 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, {

	tweeners: {
		"*": [ function( prop, value ) {
			var tween = this.createTween( prop, value );
			adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
			return tween;
		} ]
	},

	tweener: function( props, callback ) {
		if ( jQuery.isFunction( props ) ) {
			callback = props;
			props = [ "*" ];
		} else {
			props = props.match( rnotwhite );
		}

		var prop,
			index = 0,
			length = props.length;

		for ( ; index < length ; index++ ) {
			prop = props[ index ];
			Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
			Animation.tweeners[ prop ].unshift( callback );
		}
	},

	prefilters: [ defaultPrefilter ],

	prefilter: function( callback, prepend ) {
		if ( prepend ) {
			Animation.prefilters.unshift( callback );
		} else {
			Animation.prefilters.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 || jQuery._data( 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 = jQuery._data( 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 = jQuery._data( 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,
		timers = jQuery.timers,
		i = 0;

	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 = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
	}
};

jQuery.fx.stop = function() {
	window.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://web.archive.org/web/20100324014747/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 = window.setTimeout( next, time );
		hooks.stop = function() {
			window.clearTimeout( timeout );
		};
	} );
};


( function() {
	var a,
		input = document.createElement( "input" ),
		div = document.createElement( "div" ),
		select = document.createElement( "select" ),
		opt = select.appendChild( document.createElement( "option" ) );

	// Setup
	div = document.createElement( "div" );
	div.setAttribute( "className", "t" );
	div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
	a = div.getElementsByTagName( "a" )[ 0 ];

	// Support: Windows Web Apps (WWA)
	// `type` must use .setAttribute for WWA (#14901)
	input.setAttribute( "type", "checkbox" );
	div.appendChild( input );

	a = div.getElementsByTagName( "a" )[ 0 ];

	// First batch of tests.
	a.style.cssText = "top:1px";

	// Test setAttribute on camelCase class.
	// If it works, we need attrFixes when doing get/setAttribute (ie6/7)
	support.getSetAttribute = div.className !== "t";

	// Get the style information from getAttribute
	// (IE uses .cssText instead)
	support.style = /top/.test( a.getAttribute( "style" ) );

	// Make sure that URLs aren't manipulated
	// (IE normalizes it by default)
	support.hrefNormalized = a.getAttribute( "href" ) === "/a";

	// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
	support.checkOn = !!input.value;

	// Make sure that a selected-by-default option has a working selected property.
	// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
	support.optSelected = opt.selected;

	// Tests for enctype support on a form (#6743)
	support.enctype = !!document.createElement( "form" ).enctype;

	// 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;

	// Support: IE8 only
	// Check if we can trust getAttribute("value")
	input = document.createElement( "input" );
	input.setAttribute( "value", "" );
	support.input = input.getAttribute( "value" ) === "";

	// Check if an input maintains its value after becoming a radio
	input.value = "t";
	input.setAttribute( "type", "radio" );
	support.radioValue = input.value === "t";
} )();


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: {
		option: {
			get: function( elem ) {
				var val = jQuery.find.attr( elem, "value" );
				return val != null ?
					val :

					// Support: IE10-11+
					// option.text throws exceptions (#14686, #14858)
					jQuery.trim( jQuery.text( elem ) );
			}
		},
		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 ];

					// oldIE 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 ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) {

						// Support: IE6
						// When new option element is added to select box we need to
						// force reflow of newly added node in order to workaround delay
						// of initialization properties
						try {
							option.selected = optionSet = true;

						} catch ( _ ) {

							// Will be executed only in IE6
							option.scrollHeight;
						}

					} else {
						option.selected = false;
					}
				}

				// Force browsers to behave consistently when non-matching value is set
				if ( !optionSet ) {
					elem.selectedIndex = -1;
				}

				return options;
			}
		}
	}
} );

// 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 ) > -1 );
			}
		}
	};
	if ( !support.checkOn ) {
		jQuery.valHooks[ this ].get = function( elem ) {
			return elem.getAttribute( "value" ) === null ? "on" : elem.value;
		};
	}
} );




var nodeHook, boolHook,
	attrHandle = jQuery.expr.attrHandle,
	ruseDefault = /^(?:checked|selected)$/i,
	getSetAttribute = support.getSetAttribute,
	getSetInput = support.input;

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 ret, hooks,
			nType = elem.nodeType;

		// Don't get/set attributes on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		// Fallback to prop when attributes are not supported
		if ( typeof elem.getAttribute === "undefined" ) {
			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 );
				return;
			}

			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			elem.setAttribute( name, value + "" );
			return value;
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		ret = jQuery.find.attr( elem, name );

		// Non-existent attributes return null, we normalize to undefined
		return ret == null ? undefined : ret;
	},

	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 IE8-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;
				}
			}
		}
	},

	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
					if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
						elem[ propName ] = false;

					// Support: IE<9
					// Also clear defaultChecked/defaultSelected (if appropriate)
					} else {
						elem[ jQuery.camelCase( "default-" + name ) ] =
							elem[ propName ] = false;
					}

				// See #9699 for explanation of this approach (setting first, then removal)
				} else {
					jQuery.attr( elem, name, "" );
				}

				elem.removeAttribute( getSetAttribute ? name : propName );
			}
		}
	}
} );

// 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 if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {

			// IE<8 needs the *property* name
			elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );

		} else {

			// Support: IE<9
			// Use defaultChecked and defaultSelected for oldIE
			elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
		}
		return name;
	}
};

jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
	var getter = attrHandle[ name ] || jQuery.find.attr;

	if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
		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;
		};
	} else {
		attrHandle[ name ] = function( elem, name, isXML ) {
			if ( !isXML ) {
				return elem[ jQuery.camelCase( "default-" + name ) ] ?
					name.toLowerCase() :
					null;
			}
		};
	}
} );

// fix oldIE attroperties
if ( !getSetInput || !getSetAttribute ) {
	jQuery.attrHooks.value = {
		set: function( elem, value, name ) {
			if ( jQuery.nodeName( elem, "input" ) ) {

				// Does not return so that setAttribute is also used
				elem.defaultValue = value;
			} else {

				// Use nodeHook if defined (#1954); otherwise setAttribute is fine
				return nodeHook && nodeHook.set( elem, value, name );
			}
		}
	};
}

// IE6/7 do not support getting/setting some attributes with get/setAttribute
if ( !getSetAttribute ) {

	// Use this for any attribute in IE6/7
	// This fixes almost every IE6/7 issue
	nodeHook = {
		set: function( elem, value, name ) {

			// Set the existing or create a new attribute node
			var ret = elem.getAttributeNode( name );
			if ( !ret ) {
				elem.setAttributeNode(
					( ret = elem.ownerDocument.createAttribute( name ) )
				);
			}

			ret.value = value += "";

			// Break association with cloned elements by also using setAttribute (#9646)
			if ( name === "value" || value === elem.getAttribute( name ) ) {
				return value;
			}
		}
	};

	// Some attributes are constructed with empty-string values when not defined
	attrHandle.id = attrHandle.name = attrHandle.coords =
		function( elem, name, isXML ) {
			var ret;
			if ( !isXML ) {
				return ( ret = elem.getAttributeNode( name ) ) && ret.value !== "" ?
					ret.value :
					null;
			}
		};

	// Fixing value retrieval on a button requires this module
	jQuery.valHooks.button = {
		get: function( elem, name ) {
			var ret = elem.getAttributeNode( name );
			if ( ret && ret.specified ) {
				return ret.value;
			}
		},
		set: nodeHook.set
	};

	// Set contenteditable to false on removals(#10429)
	// Setting to empty string throws an error as an invalid value
	jQuery.attrHooks.contenteditable = {
		set: function( elem, value, name ) {
			nodeHook.set( elem, value === "" ? false : value, name );
		}
	};

	// Set width and height to auto instead of 0 on empty string( Bug #8150 )
	// This is for removals
	jQuery.each( [ "width", "height" ], function( i, name ) {
		jQuery.attrHooks[ name ] = {
			set: function( elem, value ) {
				if ( value === "" ) {
					elem.setAttribute( name, "auto" );
					return value;
				}
			}
		};
	} );
}

if ( !support.style ) {
	jQuery.attrHooks.style = {
		get: function( elem ) {

			// Return undefined in the case of empty string
			// Note: IE uppercases css property names, but if we were to .toLowerCase()
			// .cssText, that would destroy case sensitivity in URL's, like in "background"
			return elem.style.cssText || undefined;
		},
		set: function( elem, value ) {
			return ( elem.style.cssText = value + "" );
		}
	};
}




var rfocusable = /^(?:input|select|textarea|button|object)$/i,
	rclickable = /^(?:a|area)$/i;

jQuery.fn.extend( {
	prop: function( name, value ) {
		return access( this, jQuery.prop, name, value, arguments.length > 1 );
	},

	removeProp: function( name ) {
		name = jQuery.propFix[ name ] || name;
		return this.each( function() {

			// try/catch handles cases where IE balks (such as removing a property on window)
			try {
				this[ name ] = undefined;
				delete this[ name ];
			} catch ( e ) {}
		} );
	}
} );

jQuery.extend( {
	prop: function( elem, name, value ) {
		var ret, hooks,
			nType = elem.nodeType;

		// Don't get/set properties on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {

			// Fix name and attach hooks
			name = jQuery.propFix[ name ] || name;
			hooks = jQuery.propHooks[ name ];
		}

		if ( value !== undefined ) {
			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			return ( elem[ name ] = value );
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		return elem[ name ];
	},

	propHooks: {
		tabIndex: {
			get: function( elem ) {

				// elem.tabIndex doesn't always return the
				// correct value when it hasn't been explicitly set
				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
				// Use proper attribute retrieval(#12072)
				var tabindex = jQuery.find.attr( elem, "tabindex" );

				return tabindex ?
					parseInt( tabindex, 10 ) :
					rfocusable.test( elem.nodeName ) ||
						rclickable.test( elem.nodeName ) && elem.href ?
							0 :
							-1;
			}
		}
	},

	propFix: {
		"for": "htmlFor",
		"class": "className"
	}
} );

// Some attributes require a special call on IE
// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
if ( !support.hrefNormalized ) {

	// href/src property should get the full normalized URL (#10299/#12915)
	jQuery.each( [ "href", "src" ], function( i, name ) {
		jQuery.propHooks[ name ] = {
			get: function( elem ) {
				return elem.getAttribute( name, 4 );
			}
		};
	} );
}

// Support: Safari, IE9+
// mis-reports the default selected property of an option
// Accessing the parent's selectedIndex property fixes it
if ( !support.optSelected ) {
	jQuery.propHooks.selected = {
		get: function( elem ) {
			var parent = elem.parentNode;

			if ( parent ) {
				parent.selectedIndex;

				// Make sure that it also works with optgroups, see #5701
				if ( 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;
} );

// IE6/7 call enctype encoding
if ( !support.enctype ) {
	jQuery.propFix.enctype = "encoding";
}




var rclass = /[\t\r\n\f]/g;

function getClass( elem ) {
	return jQuery.attr( elem, "class" ) || "";
}

jQuery.fn.extend( {
	addClass: function( value ) {
		var classes, elem, cur, curValue, clazz, j, finalValue,
			i = 0;

		if ( jQuery.isFunction( value ) ) {
			return this.each( function( j ) {
				jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		if ( typeof value === "string" && value ) {
			classes = value.match( rnotwhite ) || [];

			while ( ( elem = this[ i++ ] ) ) {
				curValue = getClass( elem );
				cur = elem.nodeType === 1 &&
					( " " + curValue + " " ).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 ( curValue !== finalValue ) {
						jQuery.attr( elem, "class", finalValue );
					}
				}
			}
		}

		return this;
	},

	removeClass: function( value ) {
		var classes, elem, cur, curValue, clazz, j, finalValue,
			i = 0;

		if ( jQuery.isFunction( value ) ) {
			return this.each( function( j ) {
				jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		if ( !arguments.length ) {
			return this.attr( "class", "" );
		}

		if ( typeof value === "string" && value ) {
			classes = value.match( rnotwhite ) || [];

			while ( ( elem = this[ i++ ] ) ) {
				curValue = getClass( elem );

				// This expression is here for better compressibility (see addClass)
				cur = elem.nodeType === 1 &&
					( " " + curValue + " " ).replace( rclass, " " );

				if ( cur ) {
					j = 0;
					while ( ( clazz = classes[ j++ ] ) ) {

						// Remove *all* instances
						while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
							cur = cur.replace( " " + clazz + " ", " " );
						}
					}

					// Only assign if different to avoid unneeded rendering.
					finalValue = jQuery.trim( cur );
					if ( curValue !== finalValue ) {
						jQuery.attr( elem, "class", 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, getClass( this ), stateVal ),
					stateVal
				);
			} );
		}

		return this.each( function() {
			var className, i, self, classNames;

			if ( type === "string" ) {

				// Toggle individual class names
				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 ( value === undefined || type === "boolean" ) {
				className = getClass( this );
				if ( className ) {

					// store className if set
					jQuery._data( this, "__className__", 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.
				jQuery.attr( this, "class",
					className || value === false ?
					"" :
					jQuery._data( this, "__className__" ) || ""
				);
			}
		} );
	},

	hasClass: function( selector ) {
		var className, elem,
			i = 0;

		className = " " + selector + " ";
		while ( ( elem = this[ i++ ] ) ) {
			if ( elem.nodeType === 1 &&
				( " " + getClass( elem ) + " " ).replace( rclass, " " )
					.indexOf( className ) > -1
			) {
				return true;
			}
		}

		return false;
	}
} );




// 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 );
	}
} );


var location = window.location;

var nonce = jQuery.now();

var rquery = ( /\?/ );



var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;

jQuery.parseJSON = function( data ) {

	// Attempt to parse using the native JSON parser first
	if ( window.JSON && window.JSON.parse ) {

		// Support: Android 2.3
		// Workaround failure to string-cast null input
		return window.JSON.parse( data + "" );
	}

	var requireNonComma,
		depth = null,
		str = jQuery.trim( data + "" );

	// Guard against invalid (and possibly dangerous) input by ensuring that nothing remains
	// after removing valid tokens
	return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {

		// Force termination if we see a misplaced comma
		if ( requireNonComma && comma ) {
			depth = 0;
		}

		// Perform no more replacements after returning to outermost depth
		if ( depth === 0 ) {
			return token;
		}

		// Commas must not follow "[", "{", or ","
		requireNonComma = open || comma;

		// Determine new depth
		// array/object open ("[" or "{"): depth += true - false (increment)
		// array/object close ("]" or "}"): depth += false - true (decrement)
		// other cases ("," or primitive): depth += true - true (numeric cast)
		depth += !close - !open;

		// Remove this token
		return "";
	} ) ) ?
		( Function( "return " + str ) )() :
		jQuery.error( "Invalid JSON: " + data );
};


// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
	var xml, tmp;
	if ( !data || typeof data !== "string" ) {
		return null;
	}
	try {
		if ( window.DOMParser ) { // Standard
			tmp = new window.DOMParser();
			xml = tmp.parseFromString( data, "text/xml" );
		} else { // IE
			xml = new window.ActiveXObject( "Microsoft.XMLDOM" );
			xml.async = "false";
			xml.loadXML( data );
		}
	} catch ( e ) {
		xml = undefined;
	}
	if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
		jQuery.error( "Invalid XML: " + data );
	}
	return xml;
};


var
	rhash = /#.*$/,
	rts = /([?&])_=[^&]*/,

	// IE leaves an \r character at EOL
	rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/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( "*" ),

	// Document location
	ajaxLocation = location.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.charAt( 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 deep, key,
		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 firstDataType, ct, finalDataType, type,
		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" ] ) { // jscs:ignore requireDotNotation
						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: /\bxml\b/,
			html: /\bhtml/,
			json: /\bjson\b/
		},

		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

			// Cross-domain detection vars
			parts,

			// Loop variable
			i,

			// URL without anti-cache param
			cacheURL,

			// Response headers as string
			responseHeadersString,

			// timeout handle
			timeoutTimer,

			// To know if global events are to be dispatched
			fireGlobals,

			transport,

			// Response headers
			responseHeaders,

			// 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 (#5866: IE7 issue with protocol-less urls)
		// 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
		// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
		fireGlobals = jQuery.event && 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 ] );
			}

			// If request was aborted inside ajaxSend, stop there
			if ( state === 2 ) {
				return jqXHR;
			}

			// Timeout
			if ( s.async && s.timeout > 0 ) {
				timeoutTimer = window.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 ) {
				window.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;
		}

		// The url can be an options object (which then must have .url)
		return jQuery.ajax( jQuery.extend( {
			url: url,
			type: method,
			dataType: type,
			data: data,
			success: callback
		}, jQuery.isPlainObject( url ) && url ) );
	};
} );


jQuery._evalUrl = function( url ) {
	return jQuery.ajax( {
		url: url,

		// Make this explicit, since user can override this through ajaxSetup (#11264)
		type: "GET",
		dataType: "script",
		cache: true,
		async: false,
		global: false,
		"throws": true
	} );
};


jQuery.fn.extend( {
	wrapAll: function( html ) {
		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
			var 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.firstChild && elem.firstChild.nodeType === 1 ) {
					elem = elem.firstChild;
				}

				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();
	}
} );


function getDisplay( elem ) {
	return elem.style && elem.style.display || jQuery.css( elem, "display" );
}

function filterHidden( elem ) {
	while ( elem && elem.nodeType === 1 ) {
		if ( getDisplay( elem ) === "none" || elem.type === "hidden" ) {
			return true;
		}
		elem = elem.parentNode;
	}
	return false;
}

jQuery.expr.filters.hidden = function( elem ) {

	// Support: Opera <= 12.12
	// Opera reports offsetWidths and offsetHeights less than zero on some elements
	return support.reliableHiddenOffsets() ?
		( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 &&
			!elem.getClientRects().length ) :
			filterHidden( elem );
};

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" && v != null ? 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();
	}
} );


// Create the request object
// (This is still attached to ajaxSettings for backward compatibility)
jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?

	// Support: IE6-IE8
	function() {

		// XHR cannot access local files, always use ActiveX for that case
		if ( this.isLocal ) {
			return createActiveXHR();
		}

		// Support: IE 9-11
		// IE seems to error on cross-domain PATCH requests when ActiveX XHR
		// is used. In IE 9+ always use the native XHR.
		// Note: this condition won't catch Edge as it doesn't define
		// document.documentMode but it also doesn't support ActiveX so it won't
		// reach this code.
		if ( document.documentMode > 8 ) {
			return createStandardXHR();
		}

		// Support: IE<9
		// oldIE XHR does not support non-RFC2616 methods (#13240)
		// See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx
		// and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9
		// Although this check for six methods instead of eight
		// since IE also does not support "trace" and "connect"
		return /^(get|post|head|put|delete|options)$/i.test( this.type ) &&
			createStandardXHR() || createActiveXHR();
	} :

	// For all other browsers, use the standard XMLHttpRequest object
	createStandardXHR;

var xhrId = 0,
	xhrCallbacks = {},
	xhrSupported = jQuery.ajaxSettings.xhr();

// Support: IE<10
// Open requests must be manually aborted on unload (#5280)
// See https://support.microsoft.com/kb/2856746 for more info
if ( window.attachEvent ) {
	window.attachEvent( "onunload", function() {
		for ( var key in xhrCallbacks ) {
			xhrCallbacks[ key ]( undefined, true );
		}
	} );
}

// Determine support properties
support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
xhrSupported = support.ajax = !!xhrSupported;

// Create transport if the browser can provide an xhr
if ( xhrSupported ) {

	jQuery.ajaxTransport( function( options ) {

		// Cross domain only allowed if supported through XMLHttpRequest
		if ( !options.crossDomain || support.cors ) {

			var callback;

			return {
				send: function( headers, complete ) {
					var i,
						xhr = options.xhr(),
						id = ++xhrId;

					// Open the socket
					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 ) {

						// Support: IE<9
						// IE's ActiveXObject throws a 'Type Mismatch' exception when setting
						// request header to a null-value.
						//
						// To keep consistent with other XHR implementations, cast the value
						// to string and ignore `undefined`.
						if ( headers[ i ] !== undefined ) {
							xhr.setRequestHeader( i, headers[ i ] + "" );
						}
					}

					// 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 );

					// Listener
					callback = function( _, isAbort ) {
						var status, statusText, responses;

						// Was never called and is aborted or complete
						if ( callback && ( isAbort || xhr.readyState === 4 ) ) {

							// Clean up
							delete xhrCallbacks[ id ];
							callback = undefined;
							xhr.onreadystatechange = jQuery.noop;

							// Abort manually if needed
							if ( isAbort ) {
								if ( xhr.readyState !== 4 ) {
									xhr.abort();
								}
							} else {
								responses = {};
								status = xhr.status;

								// Support: IE<10
								// Accessing binary-data responseText throws an exception
								// (#11426)
								if ( typeof xhr.responseText === "string" ) {
									responses.text = xhr.responseText;
								}

								// Firefox throws an exception when accessing
								// statusText for faulty cross-domain requests
								try {
									statusText = xhr.statusText;
								} catch ( e ) {

									// We normalize with Webkit giving an empty statusText
									statusText = "";
								}

								// Filter status for non standard behaviors

								// If the request is local and we have data: assume a success
								// (success with no data won't get notified, that's the best we
								// can do given current implementations)
								if ( !status && options.isLocal && !options.crossDomain ) {
									status = responses.text ? 200 : 404;

								// IE - #1450: sometimes returns 1223 when it should be 204
								} else if ( status === 1223 ) {
									status = 204;
								}
							}
						}

						// Call complete if needed
						if ( responses ) {
							complete( status, statusText, responses, xhr.getAllResponseHeaders() );
						}
					};

					// Do send the request
					// `xhr.send` may raise an exception, but it will be
					// handled in jQuery.ajax (so no try/catch here)
					if ( !options.async ) {

						// If we're in sync mode we fire the callback
						callback();
					} else if ( xhr.readyState === 4 ) {

						// (IE6 & IE7) if it's in cache and has been
						// retrieved directly we need to fire the callback
						window.setTimeout( callback );
					} else {

						// Register the callback, but delay it in case `xhr.send` throws
						// Add to the list of active xhr callbacks
						xhr.onreadystatechange = xhrCallbacks[ id ] = callback;
					}
				},

				abort: function() {
					if ( callback ) {
						callback( undefined, true );
					}
				}
			};
		}
	} );
}

// Functions to create xhrs
function createStandardXHR() {
	try {
		return new window.XMLHttpRequest();
	} catch ( e ) {}
}

function createActiveXHR() {
	try {
		return new window.ActiveXObject( "Microsoft.XMLHTTP" );
	} catch ( e ) {}
}




// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
jQuery.ajaxPrefilter( function( s ) {
	if ( s.crossDomain ) {
		s.contents.script = false;
	}
} );

// Install script dataType
jQuery.ajaxSetup( {
	accepts: {
		script: "text/javascript, application/javascript, " +
			"application/ecmascript, application/x-ecmascript"
	},
	contents: {
		script: /\b(?:java|ecma)script\b/
	},
	converters: {
		"text script": function( text ) {
			jQuery.globalEval( text );
			return text;
		}
	}
} );

// Handle cache's special case and global
jQuery.ajaxPrefilter( "script", function( s ) {
	if ( s.cache === undefined ) {
		s.cache = false;
	}
	if ( s.crossDomain ) {
		s.type = "GET";
		s.global = false;
	}
} );

// Bind script tag hack transport
jQuery.ajaxTransport( "script", function( s ) {

	// This transport only deals with cross domain requests
	if ( s.crossDomain ) {

		var script,
			head = document.head || jQuery( "head" )[ 0 ] || document.documentElement;

		return {

			send: function( _, callback ) {

				script = document.createElement( "script" );

				script.async = true;

				if ( s.scriptCharset ) {
					script.charset = s.scriptCharset;
				}

				script.src = s.url;

				// Attach handlers for all browsers
				script.onload = script.onreadystatechange = function( _, isAbort ) {

					if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {

						// Handle memory leak in IE
						script.onload = script.onreadystatechange = null;

						// Remove the script
						if ( script.parentNode ) {
							script.parentNode.removeChild( script );
						}

						// Dereference the script
						script = null;

						// Callback if not abort
						if ( !isAbort ) {
							callback( 200, "success" );
						}
					}
				};

				// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
				// Use native DOM manipulation to avoid our domManip AJAX trickery
				head.insertBefore( script, head.firstChild );
			},

			abort: function() {
				if ( script ) {
					script.onload( undefined, true );
				}
			}
		};
	}
} );




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" ) === 0 &&
				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() {

			// If previous value didn't exist - remove it
			if ( overwritten === undefined ) {
				jQuery( window ).removeProp( callbackName );

			// Otherwise restore preexisting value
			} else {
				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";
	}
} );




// Support: Safari 8+
// In Safari 8 documents created via document.implementation.createHTMLDocument
// collapse sibling forms: the second one becomes a child of the first one.
// Because of that, this security measure has to be disabled in Safari 8.
// https://bugs.webkit.org/show_bug.cgi?id=137337
support.createHTMLDocument = ( function() {
	if ( !document.implementation.createHTMLDocument ) {
		return false;
	}
	var doc = document.implementation.createHTMLDocument( "" );
	doc.body.innerHTML = "<form></form><form></form>";
	return doc.body.childNodes.length === 2;
} )();


// 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;
	}

	// document.implementation stops scripts or inline event handlers from
	// being executed immediately
	context = context || ( support.createHTMLDocument ?
		document.implementation.createHTMLDocument( "" ) :
		document );

	var parsed = rsingleTag.exec( data ),
		scripts = !keepScripts && [];

	// Single tag
	if ( parsed ) {
		return [ context.createElement( parsed[ 1 ] ) ];
	}

	parsed = 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 > -1 ) {
		selector = jQuery.trim( url.slice( off, url.length ) );
		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.
			// Make value of this field explicit since
			// user can override it through ajaxSetup method
			type: type || "GET",
			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 );

		// If the request succeeds, this function gets "data", "status", "jqXHR"
		// but they are ignored because response was set above.
		// If it fails, this function gets "jqXHR", "status", "error"
		} ).always( callback && function( jqXHR, status ) {
			self.each( function() {
				callback.apply( self, response || [ jqXHR.responseText, status, jqXHR ] );
			} );
		} );
	}

	return this;
};




// 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.expr.filters.animated = function( elem ) {
	return jQuery.grep( jQuery.timers, function( fn ) {
		return elem === fn.elem;
	} ).length;
};





/**
 * Gets a window from an element
 */
function getWindow( elem ) {
	return jQuery.isWindow( elem ) ?
		elem :
		elem.nodeType === 9 ?
			elem.defaultView || elem.parentWindow :
			false;
}

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" ) &&
			jQuery.inArray( "auto", [ curCSSTop, curCSSLeft ] ) > -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 ) ) {

			// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
			options = options.call( elem, i, jQuery.extend( {}, 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,
			box = { top: 0, left: 0 },
			elem = this[ 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 !== "undefined" ) {
			box = elem.getBoundingClientRect();
		}
		win = getWindow( doc );
		return {
			top: box.top  + ( win.pageYOffset || docElem.scrollTop )  - ( docElem.clientTop  || 0 ),
			left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
		};
	},

	position: function() {
		if ( !this[ 0 ] ) {
			return;
		}

		var offsetParent, offset,
			parentOffset = { top: 0, left: 0 },
			elem = this[ 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
		// note: when an element has margin: auto the offsetLeft and marginLeft
		// are the same in Safari causing offset.left to incorrectly be 0
		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;

			while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) &&
				jQuery.css( offsetParent, "position" ) === "static" ) ) {
				offsetParent = offsetParent.offsetParent;
			}
			return offsetParent || documentElement;
		} );
	}
} );

// Create scrollLeft and scrollTop methods
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
	var top = /Y/.test( prop );

	jQuery.fn[ method ] = function( val ) {
		return access( this, function( elem, method, val ) {
			var win = getWindow( elem );

			if ( val === undefined ) {
				return win ? ( prop in win ) ? win[ prop ] :
					win.document.documentElement[ method ] :
					elem[ method ];
			}

			if ( win ) {
				win.scrollTo(
					!top ? val : jQuery( win ).scrollLeft(),
					top ? val : jQuery( win ).scrollTop()
				);

			} else {
				elem[ method ] = val;
			}
		}, method, val, arguments.length, null );
	};
} );

// Support: Safari<7-8+, Chrome<37-44+
// 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
					// unfortunately, this causes bug #3838 in IE6/8 only,
					// but there is currently no good, small way to fix it.
					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 );
		};
	} );
} );


jQuery.fn.extend( {

	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 );
	}
} );

// 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.

// Note that for maximum portability, libraries that are not jQuery should
// declare themselves as anonymous modules, and avoid setting a global if an
// AMD loader is present. jQuery is a special case. For more information, see
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon

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 ( !noGlobal ) {
	window.jQuery = window.$ = jQuery;
}

return jQuery;
}));
(function($, undefined) {

/**
 * Unobtrusive scripting adapter for jQuery
 * https://github.com/rails/jquery-ujs
 *
 * Requires jQuery 1.8.0 or later.
 *
 * Released under the MIT license
 *
 */

  // Cut down on the number of issues from people inadvertently including jquery_ujs twice
  // by detecting and raising an error when it happens.
  'use strict';

  if ( $.rails !== undefined ) {
    $.error('jquery-ujs has already been loaded!');
  }

  // Shorthand to make it a little easier to call public rails functions from within rails.js
  var rails;
  var $document = $(document);

  $.rails = rails = {
    // Link elements bound by jquery-ujs
    linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',

    // Button elements bound by jquery-ujs
    buttonClickSelector: 'button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)',

    // Select elements bound by jquery-ujs
    inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',

    // Form elements bound by jquery-ujs
    formSubmitSelector: 'form',

    // Form input elements bound by jquery-ujs
    formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',

    // Form input elements disabled during form submission
    disableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',

    // Form input elements re-enabled after form submission
    enableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',

    // Form required input elements
    requiredInputSelector: 'input[name][required]:not([disabled]), textarea[name][required]:not([disabled])',

    // Form file input elements
    fileInputSelector: 'input[type=file]:not([disabled])',

    // Link onClick disable selector with possible reenable after remote submission
    linkDisableSelector: 'a[data-disable-with], a[data-disable]',

    // Button onClick disable selector with possible reenable after remote submission
    buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]',

    // Up-to-date Cross-Site Request Forgery token
    csrfToken: function() {
     return $('meta[name=csrf-token]').attr('content');
    },

    // URL param that must contain the CSRF token
    csrfParam: function() {
     return $('meta[name=csrf-param]').attr('content');
    },

    // Make sure that every Ajax request sends the CSRF token
    CSRFProtection: function(xhr) {
      var token = rails.csrfToken();
      if (token) xhr.setRequestHeader('X-CSRF-Token', token);
    },

    // Make sure that all forms have actual up-to-date tokens (cached forms contain old ones)
    refreshCSRFTokens: function(){
      $('form input[name="' + rails.csrfParam() + '"]').val(rails.csrfToken());
    },

    // Triggers an event on an element and returns false if the event result is false
    fire: function(obj, name, data) {
      var event = $.Event(name);
      obj.trigger(event, data);
      return event.result !== false;
    },

    // Default confirm dialog, may be overridden with custom confirm dialog in $.rails.confirm
    confirm: function(message) {
      return confirm(message);
    },

    // Default ajax function, may be overridden with custom function in $.rails.ajax
    ajax: function(options) {
      return $.ajax(options);
    },

    // Default way to get an element's href. May be overridden at $.rails.href.
    href: function(element) {
      return element[0].href;
    },

    // Checks "data-remote" if true to handle the request through a XHR request.
    isRemote: function(element) {
      return element.data('remote') !== undefined && element.data('remote') !== false;
    },

    // Submits "remote" forms and links with ajax
    handleRemote: function(element) {
      var method, url, data, withCredentials, dataType, options;

      if (rails.fire(element, 'ajax:before')) {
        withCredentials = element.data('with-credentials') || null;
        dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType);

        if (element.is('form')) {
          method = element.data('ujs:submit-button-formmethod') || element.attr('method');
          url = element.data('ujs:submit-button-formaction') || element.attr('action');
          data = $(element[0]).serializeArray();
          // memoized value from clicked submit button
          var button = element.data('ujs:submit-button');
          if (button) {
            data.push(button);
            element.data('ujs:submit-button', null);
          }
          element.data('ujs:submit-button-formmethod', null);
          element.data('ujs:submit-button-formaction', null);
        } else if (element.is(rails.inputChangeSelector)) {
          method = element.data('method');
          url = element.data('url');
          data = element.serialize();
          if (element.data('params')) data = data + '&' + element.data('params');
        } else if (element.is(rails.buttonClickSelector)) {
          method = element.data('method') || 'get';
          url = element.data('url');
          data = element.serialize();
          if (element.data('params')) data = data + '&' + element.data('params');
        } else {
          method = element.data('method');
          url = rails.href(element);
          data = element.data('params') || null;
        }

        options = {
          type: method || 'GET', data: data, dataType: dataType,
          // stopping the "ajax:beforeSend" event will cancel the ajax request
          beforeSend: function(xhr, settings) {
            if (settings.dataType === undefined) {
              xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
            }
            if (rails.fire(element, 'ajax:beforeSend', [xhr, settings])) {
              element.trigger('ajax:send', xhr);
            } else {
              return false;
            }
          },
          success: function(data, status, xhr) {
            element.trigger('ajax:success', [data, status, xhr]);
          },
          complete: function(xhr, status) {
            element.trigger('ajax:complete', [xhr, status]);
          },
          error: function(xhr, status, error) {
            element.trigger('ajax:error', [xhr, status, error]);
          },
          crossDomain: rails.isCrossDomain(url)
        };

        // There is no withCredentials for IE6-8 when
        // "Enable native XMLHTTP support" is disabled
        if (withCredentials) {
          options.xhrFields = {
            withCredentials: withCredentials
          };
        }

        // Only pass url to `ajax` options if not blank
        if (url) { options.url = url; }

        return rails.ajax(options);
      } else {
        return false;
      }
    },

    // Determines if the request is a cross domain request.
    isCrossDomain: function(url) {
      var originAnchor = document.createElement('a');
      originAnchor.href = location.href;
      var urlAnchor = document.createElement('a');

      try {
        urlAnchor.href = url;
        // This is a workaround to a IE bug.
        urlAnchor.href = urlAnchor.href;

        // If URL protocol is false or is a string containing a single colon
        // *and* host are false, assume it is not a cross-domain request
        // (should only be the case for IE7 and IE compatibility mode).
        // Otherwise, evaluate protocol and host of the URL against the origin
        // protocol and host.
        return !(((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host) ||
          (originAnchor.protocol + '//' + originAnchor.host ===
            urlAnchor.protocol + '//' + urlAnchor.host));
      } catch (e) {
        // If there is an error parsing the URL, assume it is crossDomain.
        return true;
      }
    },

    // Handles "data-method" on links such as:
    // <a href="/users/5" data-method="delete" rel="nofollow" data-confirm="Are you sure?">Delete</a>
    handleMethod: function(link) {
      var href = rails.href(link),
        method = link.data('method'),
        target = link.attr('target'),
        csrfToken = rails.csrfToken(),
        csrfParam = rails.csrfParam(),
        form = $('<form method="post" action="' + href + '"></form>'),
        metadataInput = '<input name="_method" value="' + method + '" type="hidden" />';

      if (csrfParam !== undefined && csrfToken !== undefined && !rails.isCrossDomain(href)) {
        metadataInput += '<input name="' + csrfParam + '" value="' + csrfToken + '" type="hidden" />';
      }

      if (target) { form.attr('target', target); }

      form.hide().append(metadataInput).appendTo('body');
      form.submit();
    },

    // Helper function that returns form elements that match the specified CSS selector
    // If form is actually a "form" element this will return associated elements outside the from that have
    // the html form attribute set
    formElements: function(form, selector) {
      return form.is('form') ? $(form[0].elements).filter(selector) : form.find(selector);
    },

    /* Disables form elements:
      - Caches element value in 'ujs:enable-with' data store
      - Replaces element text with value of 'data-disable-with' attribute
      - Sets disabled property to true
    */
    disableFormElements: function(form) {
      rails.formElements(form, rails.disableSelector).each(function() {
        rails.disableFormElement($(this));
      });
    },

    disableFormElement: function(element) {
      var method, replacement;

      method = element.is('button') ? 'html' : 'val';
      replacement = element.data('disable-with');

      if (replacement !== undefined) {
        element.data('ujs:enable-with', element[method]());
        element[method](replacement);
      }

      element.prop('disabled', true);
      element.data('ujs:disabled', true);
    },

    /* Re-enables disabled form elements:
      - Replaces element text with cached value from 'ujs:enable-with' data store (created in `disableFormElements`)
      - Sets disabled property to false
    */
    enableFormElements: function(form) {
      rails.formElements(form, rails.enableSelector).each(function() {
        rails.enableFormElement($(this));
      });
    },

    enableFormElement: function(element) {
      var method = element.is('button') ? 'html' : 'val';
      if (element.data('ujs:enable-with') !== undefined) {
        element[method](element.data('ujs:enable-with'));
        element.removeData('ujs:enable-with'); // clean up cache
      }
      element.prop('disabled', false);
      element.removeData('ujs:disabled');
    },

   /* For 'data-confirm' attribute:
      - Fires `confirm` event
      - Shows the confirmation dialog
      - Fires the `confirm:complete` event

      Returns `true` if no function stops the chain and user chose yes; `false` otherwise.
      Attaching a handler to the element's `confirm` event that returns a `falsy` value cancels the confirmation dialog.
      Attaching a handler to the element's `confirm:complete` event that returns a `falsy` value makes this function
      return false. The `confirm:complete` event is fired whether or not the user answered true or false to the dialog.
   */
    allowAction: function(element) {
      var message = element.data('confirm'),
          answer = false, callback;
      if (!message) { return true; }

      if (rails.fire(element, 'confirm')) {
        try {
          answer = rails.confirm(message);
        } catch (e) {
          (console.error || console.log).call(console, e.stack || e);
        }
        callback = rails.fire(element, 'confirm:complete', [answer]);
      }
      return answer && callback;
    },

    // Helper function which checks for blank inputs in a form that match the specified CSS selector
    blankInputs: function(form, specifiedSelector, nonBlank) {
      var foundInputs = $(),
        input,
        valueToCheck,
        radiosForNameWithNoneSelected,
        radioName,
        selector = specifiedSelector || 'input,textarea',
        requiredInputs = form.find(selector),
        checkedRadioButtonNames = {};

      requiredInputs.each(function() {
        input = $(this);
        if (input.is('input[type=radio]')) {

          // Don't count unchecked required radio as blank if other radio with same name is checked,
          // regardless of whether same-name radio input has required attribute or not. The spec
          // states https://www.w3.org/TR/html5/forms.html#the-required-attribute
          radioName = input.attr('name');

          // Skip if we've already seen the radio with this name.
          if (!checkedRadioButtonNames[radioName]) {

            // If none checked
            if (form.find('input[type=radio]:checked[name="' + radioName + '"]').length === 0) {
              radiosForNameWithNoneSelected = form.find(
                'input[type=radio][name="' + radioName + '"]');
              foundInputs = foundInputs.add(radiosForNameWithNoneSelected);
            }

            // We only need to check each name once.
            checkedRadioButtonNames[radioName] = radioName;
          }
        } else {
          valueToCheck = input.is('input[type=checkbox],input[type=radio]') ? input.is(':checked') : !!input.val();
          if (valueToCheck === nonBlank) {
            foundInputs = foundInputs.add(input);
          }
        }
      });
      return foundInputs.length ? foundInputs : false;
    },

    // Helper function which checks for non-blank inputs in a form that match the specified CSS selector
    nonBlankInputs: function(form, specifiedSelector) {
      return rails.blankInputs(form, specifiedSelector, true); // true specifies nonBlank
    },

    // Helper function, needed to provide consistent behavior in IE
    stopEverything: function(e) {
      $(e.target).trigger('ujs:everythingStopped');
      e.stopImmediatePropagation();
      return false;
    },

    //  Replace element's html with the 'data-disable-with' after storing original html
    //  and prevent clicking on it
    disableElement: function(element) {
      var replacement = element.data('disable-with');

      if (replacement !== undefined) {
        element.data('ujs:enable-with', element.html()); // store enabled state
        element.html(replacement);
      }

      element.bind('click.railsDisable', function(e) { // prevent further clicking
        return rails.stopEverything(e);
      });
      element.data('ujs:disabled', true);
    },

    // Restore element to its original state which was disabled by 'disableElement' above
    enableElement: function(element) {
      if (element.data('ujs:enable-with') !== undefined) {
        element.html(element.data('ujs:enable-with')); // set to old enabled state
        element.removeData('ujs:enable-with'); // clean up cache
      }
      element.unbind('click.railsDisable'); // enable element
      element.removeData('ujs:disabled');
    }
  };

  if (rails.fire($document, 'rails:attachBindings')) {

    $.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { rails.CSRFProtection(xhr); }});

    // This event works the same as the load event, except that it fires every
    // time the page is loaded.
    //
    // See https://github.com/rails/jquery-ujs/issues/357
    // See https://developer.mozilla.org/en-US/docs/Using_Firefox_1.5_caching
    $(window).on('pageshow.rails', function () {
      $($.rails.enableSelector).each(function () {
        var element = $(this);

        if (element.data('ujs:disabled')) {
          $.rails.enableFormElement(element);
        }
      });

      $($.rails.linkDisableSelector).each(function () {
        var element = $(this);

        if (element.data('ujs:disabled')) {
          $.rails.enableElement(element);
        }
      });
    });

    $document.delegate(rails.linkDisableSelector, 'ajax:complete', function() {
        rails.enableElement($(this));
    });

    $document.delegate(rails.buttonDisableSelector, 'ajax:complete', function() {
        rails.enableFormElement($(this));
    });

    $document.delegate(rails.linkClickSelector, 'click.rails', function(e) {
      var link = $(this), method = link.data('method'), data = link.data('params'), metaClick = e.metaKey || e.ctrlKey;
      if (!rails.allowAction(link)) return rails.stopEverything(e);

      if (!metaClick && link.is(rails.linkDisableSelector)) rails.disableElement(link);

      if (rails.isRemote(link)) {
        if (metaClick && (!method || method === 'GET') && !data) { return true; }

        var handleRemote = rails.handleRemote(link);
        // Response from rails.handleRemote() will either be false or a deferred object promise.
        if (handleRemote === false) {
          rails.enableElement(link);
        } else {
          handleRemote.fail( function() { rails.enableElement(link); } );
        }
        return false;

      } else if (method) {
        rails.handleMethod(link);
        return false;
      }
    });

    $document.delegate(rails.buttonClickSelector, 'click.rails', function(e) {
      var button = $(this);

      if (!rails.allowAction(button) || !rails.isRemote(button)) return rails.stopEverything(e);

      if (button.is(rails.buttonDisableSelector)) rails.disableFormElement(button);

      var handleRemote = rails.handleRemote(button);
      // Response from rails.handleRemote() will either be false or a deferred object promise.
      if (handleRemote === false) {
        rails.enableFormElement(button);
      } else {
        handleRemote.fail( function() { rails.enableFormElement(button); } );
      }
      return false;
    });

    $document.delegate(rails.inputChangeSelector, 'change.rails', function(e) {
      var link = $(this);
      if (!rails.allowAction(link) || !rails.isRemote(link)) return rails.stopEverything(e);

      rails.handleRemote(link);
      return false;
    });

    $document.delegate(rails.formSubmitSelector, 'submit.rails', function(e) {
      var form = $(this),
        remote = rails.isRemote(form),
        blankRequiredInputs,
        nonBlankFileInputs;

      if (!rails.allowAction(form)) return rails.stopEverything(e);

      // Skip other logic when required values are missing or file upload is present
      if (form.attr('novalidate') === undefined) {
        if (form.data('ujs:formnovalidate-button') === undefined) {
          blankRequiredInputs = rails.blankInputs(form, rails.requiredInputSelector, false);
          if (blankRequiredInputs && rails.fire(form, 'ajax:aborted:required', [blankRequiredInputs])) {
            return rails.stopEverything(e);
          }
        } else {
          // Clear the formnovalidate in case the next button click is not on a formnovalidate button
          // Not strictly necessary to do here, since it is also reset on each button click, but just to be certain
          form.data('ujs:formnovalidate-button', undefined);
        }
      }

      if (remote) {
        nonBlankFileInputs = rails.nonBlankInputs(form, rails.fileInputSelector);
        if (nonBlankFileInputs) {
          // Slight timeout so that the submit button gets properly serialized
          // (make it easy for event handler to serialize form without disabled values)
          setTimeout(function(){ rails.disableFormElements(form); }, 13);
          var aborted = rails.fire(form, 'ajax:aborted:file', [nonBlankFileInputs]);

          // Re-enable form elements if event bindings return false (canceling normal form submission)
          if (!aborted) { setTimeout(function(){ rails.enableFormElements(form); }, 13); }

          return aborted;
        }

        rails.handleRemote(form);
        return false;

      } else {
        // Slight timeout so that the submit button gets properly serialized
        setTimeout(function(){ rails.disableFormElements(form); }, 13);
      }
    });

    $document.delegate(rails.formInputClickSelector, 'click.rails', function(event) {
      var button = $(this);

      if (!rails.allowAction(button)) return rails.stopEverything(event);

      // Register the pressed submit button
      var name = button.attr('name'),
        data = name ? {name:name, value:button.val()} : null;

      var form = button.closest('form');
      if (form.length === 0) {
        form = $('#' + button.attr('form'));
      }
      form.data('ujs:submit-button', data);

      // Save attributes from button
      form.data('ujs:formnovalidate-button', button.attr('formnovalidate'));
      form.data('ujs:submit-button-formaction', button.attr('formaction'));
      form.data('ujs:submit-button-formmethod', button.attr('formmethod'));
    });

    $document.delegate(rails.formSubmitSelector, 'ajax:send.rails', function(event) {
      if (this === event.target) rails.disableFormElements($(this));
    });

    $document.delegate(rails.formSubmitSelector, 'ajax:complete.rails', function(event) {
      if (this === event.target) rails.enableFormElements($(this));
    });

    $(function(){
      rails.refreshCSRFTokens();
    });
  }

})( jQuery );
/*
Turbolinks 5.0.0
Copyright © 2016 Basecamp, LLC
 */

(function(){(function(){(function(){this.Turbolinks={supported:function(){return null!=window.history.pushState&&null!=window.requestAnimationFrame}(),visit:function(e,r){return t.controller.visit(e,r)},clearCache:function(){return t.controller.clearCache()}}}).call(this)}).call(this);var t=this.Turbolinks;(function(){(function(){var e,r;t.copyObject=function(t){var e,r,n;r={};for(e in t)n=t[e],r[e]=n;return r},t.closest=function(t,r){return e.call(t,r)},e=function(){var t,e;return t=document.documentElement,null!=(e=t.closest)?e:function(t){var e;for(e=this;e;){if(e.nodeType===Node.ELEMENT_NODE&&r.call(e,t))return e;e=e.parentNode}}}(),t.defer=function(t){return setTimeout(t,1)},t.dispatch=function(t,e){var r,n,o,i,s;return i=null!=e?e:{},s=i.target,r=i.cancelable,n=i.data,o=document.createEvent("Events"),o.initEvent(t,!0,r===!0),o.data=null!=n?n:{},(null!=s?s:document).dispatchEvent(o),o},t.match=function(t,e){return r.call(t,e)},r=function(){var t,e,r,n;return t=document.documentElement,null!=(e=null!=(r=null!=(n=t.matchesSelector)?n:t.webkitMatchesSelector)?r:t.msMatchesSelector)?e:t.mozMatchesSelector}(),t.uuid=function(){var t,e,r;for(r="",t=e=1;36>=e;t=++e)r+=9===t||14===t||19===t||24===t?"-":15===t?"4":20===t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16);return r}}).call(this),function(){t.Location=function(){function t(t){var e,r;null==t&&(t=""),r=document.createElement("a"),r.href=t.toString(),this.absoluteURL=r.href,e=r.hash.length,2>e?this.requestURL=this.absoluteURL:(this.requestURL=this.absoluteURL.slice(0,-e),this.anchor=r.hash.slice(1))}var e,r,n,o;return t.wrap=function(t){return t instanceof this?t:new this(t)},t.prototype.getOrigin=function(){return this.absoluteURL.split("/",3).join("/")},t.prototype.getPath=function(){var t,e;return null!=(t=null!=(e=this.absoluteURL.match(/\/\/[^\/]*(\/[^?;]*)/))?e[1]:void 0)?t:"/"},t.prototype.getPathComponents=function(){return this.getPath().split("/").slice(1)},t.prototype.getLastPathComponent=function(){return this.getPathComponents().slice(-1)[0]},t.prototype.getExtension=function(){var t,e;return null!=(t=null!=(e=this.getLastPathComponent().match(/\.[^.]*$/))?e[0]:void 0)?t:""},t.prototype.isHTML=function(){return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml))$/)},t.prototype.isPrefixedBy=function(t){var e;return e=r(t),this.isEqualTo(t)||o(this.absoluteURL,e)},t.prototype.isEqualTo=function(t){return this.absoluteURL===(null!=t?t.absoluteURL:void 0)},t.prototype.toCacheKey=function(){return this.requestURL},t.prototype.toJSON=function(){return this.absoluteURL},t.prototype.toString=function(){return this.absoluteURL},t.prototype.valueOf=function(){return this.absoluteURL},r=function(t){return e(t.getOrigin()+t.getPath())},e=function(t){return n(t,"/")?t:t+"/"},o=function(t,e){return t.slice(0,e.length)===e},n=function(t,e){return t.slice(-e.length)===e},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.HttpRequest=function(){function r(r,n,o){this.delegate=r,this.requestCanceled=e(this.requestCanceled,this),this.requestTimedOut=e(this.requestTimedOut,this),this.requestFailed=e(this.requestFailed,this),this.requestLoaded=e(this.requestLoaded,this),this.requestProgressed=e(this.requestProgressed,this),this.url=t.Location.wrap(n).requestURL,this.referrer=t.Location.wrap(o).absoluteURL,this.createXHR()}return r.NETWORK_FAILURE=0,r.TIMEOUT_FAILURE=-1,r.timeout=60,r.prototype.send=function(){var t;return this.xhr&&!this.sent?(this.notifyApplicationBeforeRequestStart(),this.setProgress(0),this.xhr.send(),this.sent=!0,"function"==typeof(t=this.delegate).requestStarted?t.requestStarted():void 0):void 0},r.prototype.cancel=function(){return this.xhr&&this.sent?this.xhr.abort():void 0},r.prototype.requestProgressed=function(t){return t.lengthComputable?this.setProgress(t.loaded/t.total):void 0},r.prototype.requestLoaded=function(){return this.endRequest(function(t){return function(){var e;return 200<=(e=t.xhr.status)&&300>e?t.delegate.requestCompletedWithResponse(t.xhr.responseText,t.xhr.getResponseHeader("Turbolinks-Location")):(t.failed=!0,t.delegate.requestFailedWithStatusCode(t.xhr.status,t.xhr.responseText))}}(this))},r.prototype.requestFailed=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.NETWORK_FAILURE)}}(this))},r.prototype.requestTimedOut=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.TIMEOUT_FAILURE)}}(this))},r.prototype.requestCanceled=function(){return this.endRequest()},r.prototype.notifyApplicationBeforeRequestStart=function(){return t.dispatch("turbolinks:request-start",{data:{url:this.url,xhr:this.xhr}})},r.prototype.notifyApplicationAfterRequestEnd=function(){return t.dispatch("turbolinks:request-end",{data:{url:this.url,xhr:this.xhr}})},r.prototype.createXHR=function(){return this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.url,!0),this.xhr.timeout=1e3*this.constructor.timeout,this.xhr.setRequestHeader("Accept","text/html, application/xhtml+xml"),this.xhr.setRequestHeader("Turbolinks-Referrer",this.referrer),this.xhr.onprogress=this.requestProgressed,this.xhr.onload=this.requestLoaded,this.xhr.onerror=this.requestFailed,this.xhr.ontimeout=this.requestTimedOut,this.xhr.onabort=this.requestCanceled},r.prototype.endRequest=function(t){return this.xhr?(this.notifyApplicationAfterRequestEnd(),null!=t&&t.call(this),this.destroy()):void 0},r.prototype.setProgress=function(t){var e;return this.progress=t,"function"==typeof(e=this.delegate).requestProgressed?e.requestProgressed(this.progress):void 0},r.prototype.destroy=function(){var t;return this.setProgress(1),"function"==typeof(t=this.delegate).requestFinished&&t.requestFinished(),this.delegate=null,this.xhr=null},r}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.ProgressBar=function(){function t(){this.trickle=e(this.trickle,this),this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement()}var r;return r=300,t.defaultCSS=".turbolinks-progress-bar {\n  position: fixed;\n  display: block;\n  top: 0;\n  left: 0;\n  height: 3px;\n  background: #0076ff;\n  z-index: 9999;\n  transition: width "+r+"ms ease-out, opacity "+r/2+"ms "+r/2+"ms ease-in;\n  transform: translate3d(0, 0, 0);\n}",t.prototype.show=function(){return this.visible?void 0:(this.visible=!0,this.installStylesheetElement(),this.installProgressElement(),this.startTrickling())},t.prototype.hide=function(){return this.visible&&!this.hiding?(this.hiding=!0,this.fadeProgressElement(function(t){return function(){return t.uninstallProgressElement(),t.stopTrickling(),t.visible=!1,t.hiding=!1}}(this))):void 0},t.prototype.setValue=function(t){return this.value=t,this.refresh()},t.prototype.installStylesheetElement=function(){return document.head.insertBefore(this.stylesheetElement,document.head.firstChild)},t.prototype.installProgressElement=function(){return this.progressElement.style.width=0,this.progressElement.style.opacity=1,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()},t.prototype.fadeProgressElement=function(t){return this.progressElement.style.opacity=0,setTimeout(t,1.5*r)},t.prototype.uninstallProgressElement=function(){return this.progressElement.parentNode?document.documentElement.removeChild(this.progressElement):void 0},t.prototype.startTrickling=function(){return null!=this.trickleInterval?this.trickleInterval:this.trickleInterval=setInterval(this.trickle,r)},t.prototype.stopTrickling=function(){return clearInterval(this.trickleInterval),this.trickleInterval=null},t.prototype.trickle=function(){return this.setValue(this.value+Math.random()/100)},t.prototype.refresh=function(){return requestAnimationFrame(function(t){return function(){return t.progressElement.style.width=10+90*t.value+"%"}}(this))},t.prototype.createStylesheetElement=function(){var t;return t=document.createElement("style"),t.type="text/css",t.textContent=this.constructor.defaultCSS,t},t.prototype.createProgressElement=function(){var t;return t=document.createElement("div"),t.className="turbolinks-progress-bar",t},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.BrowserAdapter=function(){function r(r){this.controller=r,this.showProgressBar=e(this.showProgressBar,this),this.progressBar=new t.ProgressBar}var n,o,i,s;return s=t.HttpRequest,n=s.NETWORK_FAILURE,i=s.TIMEOUT_FAILURE,o=500,r.prototype.visitProposedToLocationWithAction=function(t,e){return this.controller.startVisitToLocationWithAction(t,e)},r.prototype.visitStarted=function(t){return t.issueRequest(),t.changeHistory(),t.loadCachedSnapshot()},r.prototype.visitRequestStarted=function(t){return this.progressBar.setValue(0),t.hasCachedSnapshot()||"restore"!==t.action?this.showProgressBarAfterDelay():this.showProgressBar()},r.prototype.visitRequestProgressed=function(t){return this.progressBar.setValue(t.progress)},r.prototype.visitRequestCompleted=function(t){return t.loadResponse()},r.prototype.visitRequestFailedWithStatusCode=function(t,e){switch(e){case n:case i:return this.reload();default:return t.loadResponse()}},r.prototype.visitRequestFinished=function(t){return this.hideProgressBar()},r.prototype.visitCompleted=function(t){return t.followRedirect()},r.prototype.pageInvalidated=function(){return this.reload()},r.prototype.showProgressBarAfterDelay=function(){return this.progressBarTimeout=setTimeout(this.showProgressBar,o)},r.prototype.showProgressBar=function(){return this.progressBar.show()},r.prototype.hideProgressBar=function(){return this.progressBar.hide(),clearTimeout(this.progressBarTimeout)},r.prototype.reload=function(){return window.location.reload()},r}()}.call(this),function(){var e,r=function(t,e){return function(){return t.apply(e,arguments)}};e=!1,addEventListener("load",function(){return t.defer(function(){return e=!0})},!1),t.History=function(){function n(t){this.delegate=t,this.onPopState=r(this.onPopState,this)}return n.prototype.start=function(){return this.started?void 0:(addEventListener("popstate",this.onPopState,!1),this.started=!0)},n.prototype.stop=function(){return this.started?(removeEventListener("popstate",this.onPopState,!1),this.started=!1):void 0},n.prototype.push=function(e,r){return e=t.Location.wrap(e),this.update("push",e,r)},n.prototype.replace=function(e,r){return e=t.Location.wrap(e),this.update("replace",e,r)},n.prototype.onPopState=function(e){var r,n,o,i;return this.shouldHandlePopState()&&(i=null!=(n=e.state)?n.turbolinks:void 0)?(r=t.Location.wrap(window.location),o=i.restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(r,o)):void 0},n.prototype.shouldHandlePopState=function(){return e===!0},n.prototype.update=function(t,e,r){var n;return n={turbolinks:{restorationIdentifier:r}},history[t+"State"](n,null,e)},n}()}.call(this),function(){t.Snapshot=function(){function e(t){var e,r;r=t.head,e=t.body,this.head=null!=r?r:document.createElement("head"),this.body=null!=e?e:document.createElement("body")}return e.wrap=function(t){return t instanceof this?t:this.fromHTML(t)},e.fromHTML=function(t){var e;return e=document.createElement("html"),e.innerHTML=t,this.fromElement(e)},e.fromElement=function(t){return new this({head:t.querySelector("head"),body:t.querySelector("body")})},e.prototype.clone=function(){return new e({head:this.head.cloneNode(!0),body:this.body.cloneNode(!0)})},e.prototype.getRootLocation=function(){var e,r;return r=null!=(e=this.getSetting("root"))?e:"/",new t.Location(r)},e.prototype.getCacheControlValue=function(){return this.getSetting("cache-control")},e.prototype.hasAnchor=function(t){try{return null!=this.body.querySelector("[id='"+t+"']")}catch(e){}},e.prototype.isPreviewable=function(){return"no-preview"!==this.getCacheControlValue()},e.prototype.isCacheable=function(){return"no-cache"!==this.getCacheControlValue()},e.prototype.getSetting=function(t){var e,r;return r=this.head.querySelectorAll("meta[name='turbolinks-"+t+"']"),e=r[r.length-1],null!=e?e.getAttribute("content"):void 0},e}()}.call(this),function(){var e=[].slice;t.Renderer=function(){function t(){}var r;return t.render=function(){var t,r,n,o;return n=arguments[0],r=arguments[1],t=3<=arguments.length?e.call(arguments,2):[],o=function(t,e,r){r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return Object(o)===o?o:n}(this,t,function(){}),o.delegate=n,o.render(r),o},t.prototype.renderView=function(t){return this.delegate.viewWillRender(this.newBody),t(),this.delegate.viewRendered(this.newBody)},t.prototype.invalidateView=function(){return this.delegate.viewInvalidated()},t.prototype.createScriptElement=function(t){var e;return"false"===t.getAttribute("data-turbolinks-eval")?t:(e=document.createElement("script"),e.textContent=t.textContent,r(e,t),e)},r=function(t,e){var r,n,o,i,s,a,u;for(i=e.attributes,a=[],r=0,n=i.length;n>r;r++)s=i[r],o=s.name,u=s.value,a.push(t.setAttribute(o,u));return a},t}()}.call(this),function(){t.HeadDetails=function(){function t(t){var e,r,i,s,a,u,c;for(this.element=t,this.elements={},c=this.element.childNodes,s=0,u=c.length;u>s;s++)i=c[s],i.nodeType===Node.ELEMENT_NODE&&(a=i.outerHTML,r=null!=(e=this.elements)[a]?e[a]:e[a]={type:o(i),tracked:n(i),elements:[]},r.elements.push(i))}var e,r,n,o;return t.prototype.hasElementWithKey=function(t){return t in this.elements},t.prototype.getTrackedElementSignature=function(){var t,e;return function(){var r,n;r=this.elements,n=[];for(t in r)e=r[t].tracked,e&&n.push(t);return n}.call(this).join("")},t.prototype.getScriptElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("script",t)},t.prototype.getStylesheetElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("stylesheet",t)},t.prototype.getElementsMatchingTypeNotInDetails=function(t,e){var r,n,o,i,s,a;o=this.elements,s=[];for(n in o)i=o[n],a=i.type,r=i.elements,a!==t||e.hasElementWithKey(n)||s.push(r[0]);return s},t.prototype.getProvisionalElements=function(){var t,e,r,n,o,i,s;r=[],n=this.elements;for(e in n)o=n[e],s=o.type,i=o.tracked,t=o.elements,null!=s||i?t.length>1&&r.push.apply(r,t.slice(1)):r.push.apply(r,t);return r},o=function(t){return e(t)?"script":r(t)?"stylesheet":void 0},n=function(t){return"reload"===t.getAttribute("data-turbolinks-track")},e=function(t){var e;return e=t.tagName.toLowerCase(),"script"===e},r=function(t){var e;return e=t.tagName.toLowerCase(),"style"===e||"link"===e&&"stylesheet"===t.getAttribute("rel")},t}()}.call(this),function(){var e=function(t,e){function n(){this.constructor=t}for(var o in e)r.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t.SnapshotRenderer=function(r){function n(e,r){this.currentSnapshot=e,this.newSnapshot=r,this.currentHeadDetails=new t.HeadDetails(this.currentSnapshot.head),this.newHeadDetails=new t.HeadDetails(this.newSnapshot.head),this.newBody=this.newSnapshot.body}return e(n,r),n.prototype.render=function(t){return this.trackedElementsAreIdentical()?(this.mergeHead(),this.renderView(function(e){return function(){return e.replaceBody(),e.focusFirstAutofocusableElement(),t()}}(this))):this.invalidateView()},n.prototype.mergeHead=function(){return this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()},n.prototype.replaceBody=function(){return this.activateBodyScriptElements(),this.importBodyPermanentElements(),this.assignNewBody()},n.prototype.trackedElementsAreIdentical=function(){return this.currentHeadDetails.getTrackedElementSignature()===this.newHeadDetails.getTrackedElementSignature()},n.prototype.copyNewHeadStylesheetElements=function(){var t,e,r,n,o;for(n=this.getNewHeadStylesheetElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.appendChild(t));return o},n.prototype.copyNewHeadScriptElements=function(){var t,e,r,n,o;for(n=this.getNewHeadScriptElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.appendChild(this.createScriptElement(t)));return o},n.prototype.removeCurrentHeadProvisionalElements=function(){var t,e,r,n,o;for(n=this.getCurrentHeadProvisionalElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.removeChild(t));return o},n.prototype.copyNewHeadProvisionalElements=function(){var t,e,r,n,o;for(n=this.getNewHeadProvisionalElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.appendChild(t));return o},n.prototype.importBodyPermanentElements=function(){var t,e,r,n,o,i;for(n=this.getNewBodyPermanentElements(),i=[],e=0,r=n.length;r>e;e++)o=n[e],(t=this.findCurrentBodyPermanentElement(o))?i.push(o.parentNode.replaceChild(t,o)):i.push(void 0);return i},n.prototype.activateBodyScriptElements=function(){var t,e,r,n,o,i;for(n=this.getNewBodyScriptElements(),i=[],e=0,r=n.length;r>e;e++)o=n[e],t=this.createScriptElement(o),i.push(o.parentNode.replaceChild(t,o));return i},n.prototype.assignNewBody=function(){return document.body=this.newBody},n.prototype.focusFirstAutofocusableElement=function(){var t;return null!=(t=this.findFirstAutofocusableElement())?t.focus():void 0},n.prototype.getNewHeadStylesheetElements=function(){return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails)},n.prototype.getNewHeadScriptElements=function(){return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails)},n.prototype.getCurrentHeadProvisionalElements=function(){return this.currentHeadDetails.getProvisionalElements()},n.prototype.getNewHeadProvisionalElements=function(){return this.newHeadDetails.getProvisionalElements()},n.prototype.getNewBodyPermanentElements=function(){return this.newBody.querySelectorAll("[id][data-turbolinks-permanent]")},n.prototype.findCurrentBodyPermanentElement=function(t){return document.body.querySelector("#"+t.id+"[data-turbolinks-permanent]")},n.prototype.getNewBodyScriptElements=function(){return this.newBody.querySelectorAll("script")},n.prototype.findFirstAutofocusableElement=function(){return document.body.querySelector("[autofocus]")},n}(t.Renderer)}.call(this),function(){var e=function(t,e){function n(){this.constructor=t}for(var o in e)r.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t.ErrorRenderer=function(t){function r(t){this.html=t}return e(r,t),r.prototype.render=function(t){return this.renderView(function(e){return function(){return e.replaceDocumentHTML(),e.activateBodyScriptElements(),t()}}(this))},r.prototype.replaceDocumentHTML=function(){return document.documentElement.innerHTML=this.html},r.prototype.activateBodyScriptElements=function(){var t,e,r,n,o,i;for(n=this.getScriptElements(),i=[],e=0,r=n.length;r>e;e++)o=n[e],t=this.createScriptElement(o),i.push(o.parentNode.replaceChild(t,o));return i},r.prototype.getScriptElements=function(){return document.documentElement.querySelectorAll("script")},r}(t.Renderer)}.call(this),function(){t.View=function(){function e(t){this.delegate=t,this.element=document.documentElement}return e.prototype.getRootLocation=function(){return this.getSnapshot().getRootLocation()},e.prototype.getSnapshot=function(){return t.Snapshot.fromElement(this.element)},e.prototype.render=function(t,e){var r,n,o;return o=t.snapshot,r=t.error,n=t.isPreview,this.markAsPreview(n),null!=o?this.renderSnapshot(o,e):this.renderError(r,e)},e.prototype.markAsPreview=function(t){return t?this.element.setAttribute("data-turbolinks-preview",""):this.element.removeAttribute("data-turbolinks-preview")},e.prototype.renderSnapshot=function(e,r){return t.SnapshotRenderer.render(this.delegate,r,this.getSnapshot(),t.Snapshot.wrap(e))},e.prototype.renderError=function(e,r){return t.ErrorRenderer.render(this.delegate,r,e)},e}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.ScrollManager=function(){function t(t){this.delegate=t,this.onScroll=e(this.onScroll,this)}return t.prototype.start=function(){return this.started?void 0:(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)},t.prototype.stop=function(){return this.started?(removeEventListener("scroll",this.onScroll,!1),this.started=!1):void 0},t.prototype.scrollToElement=function(t){return t.scrollIntoView()},t.prototype.scrollToPosition=function(t){var e,r;return e=t.x,r=t.y,window.scrollTo(e,r)},t.prototype.onScroll=function(t){return this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},t.prototype.updatePosition=function(t){var e;return this.position=t,null!=(e=this.delegate)?e.scrollPositionChanged(this.position):void 0},t}()}.call(this),function(){t.SnapshotCache=function(){function e(t){this.size=t,this.keys=[],this.snapshots={}}var r;return e.prototype.has=function(t){var e;return e=r(t),e in this.snapshots},e.prototype.get=function(t){var e;if(this.has(t))return e=this.read(t),this.touch(t),e},e.prototype.put=function(t,e){return this.write(t,e),this.touch(t),e},e.prototype.read=function(t){var e;return e=r(t),this.snapshots[e]},e.prototype.write=function(t,e){var n;return n=r(t),this.snapshots[n]=e},e.prototype.touch=function(t){var e,n;return n=r(t),e=this.keys.indexOf(n),e>-1&&this.keys.splice(e,1),this.keys.unshift(n),this.trim()},e.prototype.trim=function(){var t,e,r,n,o;for(n=this.keys.splice(this.size),o=[],t=0,r=n.length;r>t;t++)e=n[t],o.push(delete this.snapshots[e]);return o},r=function(e){return t.Location.wrap(e).toCacheKey()},e}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.Visit=function(){function r(r,n,o){this.controller=r,this.action=o,this.performScroll=e(this.performScroll,this),this.identifier=t.uuid(),this.location=t.Location.wrap(n),this.adapter=this.controller.adapter,this.state="initialized",this.timingMetrics={}}var n;return r.prototype.start=function(){return"initialized"===this.state?(this.recordTimingMetric("visitStart"),this.state="started",this.adapter.visitStarted(this)):void 0},r.prototype.cancel=function(){var t;return"started"===this.state?(null!=(t=this.request)&&t.cancel(),this.cancelRender(),this.state="canceled"):void 0},r.prototype.complete=function(){var t;return"started"===this.state?(this.recordTimingMetric("visitEnd"),this.state="completed","function"==typeof(t=this.adapter).visitCompleted&&t.visitCompleted(this),this.controller.visitCompleted(this)):void 0},r.prototype.fail=function(){var t;return"started"===this.state?(this.state="failed","function"==typeof(t=this.adapter).visitFailed?t.visitFailed(this):void 0):void 0},r.prototype.changeHistory=function(){var t,e;return this.historyChanged?void 0:(t=this.location.isEqualTo(this.referrer)?"replace":this.action,e=n(t),this.controller[e](this.location,this.restorationIdentifier),this.historyChanged=!0)},r.prototype.issueRequest=function(){return this.shouldIssueRequest()&&null==this.request?(this.progress=0,this.request=new t.HttpRequest(this,this.location,this.referrer),this.request.send()):void 0},r.prototype.getCachedSnapshot=function(){var t;return!(t=this.controller.getCachedSnapshotForLocation(this.location))||null!=this.location.anchor&&!t.hasAnchor(this.location.anchor)||"restore"!==this.action&&!t.isPreviewable()?void 0:t},r.prototype.hasCachedSnapshot=function(){return null!=this.getCachedSnapshot()},r.prototype.loadCachedSnapshot=function(){var t,e;return(e=this.getCachedSnapshot())?(t=this.shouldIssueRequest(),this.render(function(){var r;return this.cacheSnapshot(),this.controller.render({snapshot:e,isPreview:t},this.performScroll),"function"==typeof(r=this.adapter).visitRendered&&r.visitRendered(this),t?void 0:this.complete()})):void 0},r.prototype.loadResponse=function(){return null!=this.response?this.render(function(){var t,e;return this.cacheSnapshot(),this.request.failed?(this.controller.render({error:this.response},this.performScroll),"function"==typeof(t=this.adapter).visitRendered&&t.visitRendered(this),this.fail()):(this.controller.render({snapshot:this.response},this.performScroll),"function"==typeof(e=this.adapter).visitRendered&&e.visitRendered(this),this.complete())}):void 0},r.prototype.followRedirect=function(){return this.redirectedToLocation&&!this.followedRedirect?(this.location=this.redirectedToLocation,this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation,this.restorationIdentifier),this.followedRedirect=!0):void 0},r.prototype.requestStarted=function(){var t;return this.recordTimingMetric("requestStart"),"function"==typeof(t=this.adapter).visitRequestStarted?t.visitRequestStarted(this):void 0},r.prototype.requestProgressed=function(t){var e;return this.progress=t,"function"==typeof(e=this.adapter).visitRequestProgressed?e.visitRequestProgressed(this):void 0},r.prototype.requestCompletedWithResponse=function(e,r){return this.response=e,null!=r&&(this.redirectedToLocation=t.Location.wrap(r)),this.adapter.visitRequestCompleted(this)},r.prototype.requestFailedWithStatusCode=function(t,e){return this.response=e,this.adapter.visitRequestFailedWithStatusCode(this,t)},r.prototype.requestFinished=function(){var t;return this.recordTimingMetric("requestEnd"),"function"==typeof(t=this.adapter).visitRequestFinished?t.visitRequestFinished(this):void 0},r.prototype.performScroll=function(){return this.scrolled?void 0:("restore"===this.action?this.scrollToRestoredPosition()||this.scrollToTop():this.scrollToAnchor()||this.scrollToTop(),this.scrolled=!0)},r.prototype.scrollToRestoredPosition=function(){var t,e;return t=null!=(e=this.restorationData)?e.scrollPosition:void 0,null!=t?(this.controller.scrollToPosition(t),!0):void 0},r.prototype.scrollToAnchor=function(){return null!=this.location.anchor?(this.controller.scrollToAnchor(this.location.anchor),!0):void 0},r.prototype.scrollToTop=function(){return this.controller.scrollToPosition({x:0,y:0})},r.prototype.recordTimingMetric=function(t){var e;return null!=(e=this.timingMetrics)[t]?e[t]:e[t]=(new Date).getTime()},r.prototype.getTimingMetrics=function(){return t.copyObject(this.timingMetrics)},n=function(t){switch(t){case"replace":return"replaceHistoryWithLocationAndRestorationIdentifier";case"advance":case"restore":return"pushHistoryWithLocationAndRestorationIdentifier"}},r.prototype.shouldIssueRequest=function(){return"restore"===this.action?!this.hasCachedSnapshot():!0},r.prototype.cacheSnapshot=function(){return this.snapshotCached?void 0:(this.controller.cacheSnapshot(),this.snapshotCached=!0)},r.prototype.render=function(t){return this.cancelRender(),this.frame=requestAnimationFrame(function(e){return function(){return e.frame=null,t.call(e)}}(this))},r.prototype.cancelRender=function(){return this.frame?cancelAnimationFrame(this.frame):void 0},r}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.Controller=function(){function r(){this.clickBubbled=e(this.clickBubbled,this),this.clickCaptured=e(this.clickCaptured,this),this.pageLoaded=e(this.pageLoaded,this),this.history=new t.History(this),this.view=new t.View(this),this.scrollManager=new t.ScrollManager(this),this.restorationData={},this.clearCache()}return r.prototype.start=function(){return t.supported&&!this.started?(addEventListener("click",this.clickCaptured,!0),addEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.start(),this.startHistory(),this.started=!0,this.enabled=!0):void 0},r.prototype.disable=function(){return this.enabled=!1},r.prototype.stop=function(){return this.started?(removeEventListener("click",this.clickCaptured,!0),removeEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.stop(),this.stopHistory(),this.started=!1):void 0},r.prototype.clearCache=function(){return this.cache=new t.SnapshotCache(10)},r.prototype.visit=function(e,r){var n,o;return null==r&&(r={}),e=t.Location.wrap(e),this.applicationAllowsVisitingLocation(e)?this.locationIsVisitable(e)?(n=null!=(o=r.action)?o:"advance",this.adapter.visitProposedToLocationWithAction(e,n)):window.location=e:void 0},r.prototype.startVisitToLocationWithAction=function(e,r,n){var o;return t.supported?(o=this.getRestorationDataForIdentifier(n),this.startVisit(e,r,{restorationData:o})):window.location=e},r.prototype.startHistory=function(){return this.location=t.Location.wrap(window.location),this.restorationIdentifier=t.uuid(),this.history.start(),this.history.replace(this.location,this.restorationIdentifier)},r.prototype.stopHistory=function(){return this.history.stop()},r.prototype.pushHistoryWithLocationAndRestorationIdentifier=function(e,r){return this.restorationIdentifier=r,this.location=t.Location.wrap(e),this.history.push(this.location,this.restorationIdentifier)},r.prototype.replaceHistoryWithLocationAndRestorationIdentifier=function(e,r){return this.restorationIdentifier=r,this.location=t.Location.wrap(e),this.history.replace(this.location,this.restorationIdentifier)},r.prototype.historyPoppedToLocationWithRestorationIdentifier=function(e,r){var n;return this.restorationIdentifier=r,this.enabled?(n=this.getRestorationDataForIdentifier(this.restorationIdentifier),this.startVisit(e,"restore",{restorationIdentifier:this.restorationIdentifier,restorationData:n,historyChanged:!0}),this.location=t.Location.wrap(e)):this.adapter.pageInvalidated()},r.prototype.getCachedSnapshotForLocation=function(t){var e;return e=this.cache.get(t),e?e.clone():void 0},r.prototype.shouldCacheSnapshot=function(){return this.view.getSnapshot().isCacheable()},r.prototype.cacheSnapshot=function(){var t;return this.shouldCacheSnapshot()?(this.notifyApplicationBeforeCachingSnapshot(),t=this.view.getSnapshot(),this.cache.put(this.lastRenderedLocation,t.clone())):void 0},r.prototype.scrollToAnchor=function(t){var e;return(e=document.getElementById(t))?this.scrollToElement(e):this.scrollToPosition({x:0,y:0})},r.prototype.scrollToElement=function(t){return this.scrollManager.scrollToElement(t)},r.prototype.scrollToPosition=function(t){return this.scrollManager.scrollToPosition(t)},r.prototype.scrollPositionChanged=function(t){var e;return e=this.getCurrentRestorationData(),e.scrollPosition=t},r.prototype.render=function(t,e){return this.view.render(t,e)},r.prototype.viewInvalidated=function(){return this.adapter.pageInvalidated()},r.prototype.viewWillRender=function(t){return this.notifyApplicationBeforeRender(t)},r.prototype.viewRendered=function(){return this.lastRenderedLocation=this.currentVisit.location,this.notifyApplicationAfterRender()},r.prototype.pageLoaded=function(){return this.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()},r.prototype.clickCaptured=function(){return removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},r.prototype.clickBubbled=function(t){var e,r,n;return this.enabled&&this.clickEventIsSignificant(t)&&(r=this.getVisitableLinkForNode(t.target))&&(n=this.getVisitableLocationForLink(r))&&this.applicationAllowsFollowingLinkToLocation(r,n)?(t.preventDefault(),e=this.getActionForLink(r),this.visit(n,{action:e})):void 0},r.prototype.applicationAllowsFollowingLinkToLocation=function(t,e){var r;return r=this.notifyApplicationAfterClickingLinkToLocation(t,e),!r.defaultPrevented},r.prototype.applicationAllowsVisitingLocation=function(t){var e;return e=this.notifyApplicationBeforeVisitingLocation(t),!e.defaultPrevented},r.prototype.notifyApplicationAfterClickingLinkToLocation=function(e,r){return t.dispatch("turbolinks:click",{target:e,data:{url:r.absoluteURL},cancelable:!0})},r.prototype.notifyApplicationBeforeVisitingLocation=function(e){return t.dispatch("turbolinks:before-visit",{data:{url:e.absoluteURL},cancelable:!0})},r.prototype.notifyApplicationAfterVisitingLocation=function(e){return t.dispatch("turbolinks:visit",{data:{url:e.absoluteURL}})},r.prototype.notifyApplicationBeforeCachingSnapshot=function(){return t.dispatch("turbolinks:before-cache")},r.prototype.notifyApplicationBeforeRender=function(e){return t.dispatch("turbolinks:before-render",{data:{newBody:e}})},r.prototype.notifyApplicationAfterRender=function(){return t.dispatch("turbolinks:render")},r.prototype.notifyApplicationAfterPageLoad=function(e){return null==e&&(e={}),t.dispatch("turbolinks:load",{data:{url:this.location.absoluteURL,timing:e}})},r.prototype.startVisit=function(t,e,r){var n;return null!=(n=this.currentVisit)&&n.cancel(),this.currentVisit=this.createVisit(t,e,r),this.currentVisit.start(),this.notifyApplicationAfterVisitingLocation(t)},r.prototype.createVisit=function(e,r,n){
var o,i,s,a,u;return i=null!=n?n:{},a=i.restorationIdentifier,s=i.restorationData,o=i.historyChanged,u=new t.Visit(this,e,r),u.restorationIdentifier=null!=a?a:t.uuid(),u.restorationData=t.copyObject(s),u.historyChanged=o,u.referrer=this.location,u},r.prototype.visitCompleted=function(t){return this.notifyApplicationAfterPageLoad(t.getTimingMetrics())},r.prototype.clickEventIsSignificant=function(t){return!(t.defaultPrevented||t.target.isContentEditable||t.which>1||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)},r.prototype.getVisitableLinkForNode=function(e){return this.nodeIsVisitable(e)?t.closest(e,"a[href]:not([target])"):void 0},r.prototype.getVisitableLocationForLink=function(e){var r;return r=new t.Location(e.getAttribute("href")),this.locationIsVisitable(r)?r:void 0},r.prototype.getActionForLink=function(t){var e;return null!=(e=t.getAttribute("data-turbolinks-action"))?e:"advance"},r.prototype.nodeIsVisitable=function(e){var r;return(r=t.closest(e,"[data-turbolinks]"))?"false"!==r.getAttribute("data-turbolinks"):!0},r.prototype.locationIsVisitable=function(t){return t.isPrefixedBy(this.view.getRootLocation())&&t.isHTML()},r.prototype.getCurrentRestorationData=function(){return this.getRestorationDataForIdentifier(this.restorationIdentifier)},r.prototype.getRestorationDataForIdentifier=function(t){var e;return null!=(e=this.restorationData)[t]?e[t]:e[t]={}},r}()}.call(this),function(){var e,r,n;t.start=function(){return r()?(null==t.controller&&(t.controller=e()),t.controller.start()):void 0},r=function(){return null==window.Turbolinks&&(window.Turbolinks=t),n()},e=function(){var e;return e=new t.Controller,e.adapter=new t.BrowserAdapter(e),e},n=function(){return window.Turbolinks===t},n()&&t.start()}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=t:"function"==typeof define&&define.amd&&define(t)}).call(this);
/*! globalize - v0.1.0pre - 2012-10-18
* http://wiki.jqueryui.com/Globalize
* Copyright 2012 ; Licensed MIT */

(function(e,t){var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N;n=function(e){return new n.prototype.init(e)},typeof require!="undefined"&&typeof exports!="undefined"&&typeof module!="undefined"?module.exports=n:e.Globalize=n,n.cultures={},n.prototype={constructor:n,init:function(e){return this.cultures=n.cultures,this.cultureSelector=e,this}},n.prototype.init.prototype=n.prototype,n.cultures["default"]={name:"en",englishName:"English",nativeName:"English",isRTL:!1,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",NaN:"NaN",negativeInfinity:"-Infinity",positiveInfinity:"Infinity",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss"}}},messages:{}},n.cultures["default"].calendar=n.cultures["default"].calendars.standard,n.cultures.en=n.cultures["default"],n.cultureSelector="en",r=/^0x[a-f0-9]+$/i,i=/^[+\-]?infinity$/i,s=/^[+\-]?\d*\.?\d*(e[+\-]?\d+)?$/,o=/^\s+|\s+$/g,u=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},a=function(e,t){return e.substr(e.length-t.length)===t},f=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,p=arguments.length,d=!1;typeof u=="boolean"&&(d=u,u=arguments[1]||{},a=2),typeof u!="object"&&!c(u)&&(u={});for(;a<p;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;d&&i&&(h(i)||(s=l(i)))?(s?(s=!1,o=r&&l(r)?r:[]):o=r&&h(r)?r:{},u[n]=f(d,o,i)):i!==t&&(u[n]=i)}return u},l=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},c=function(e){return Object.prototype.toString.call(e)==="[object Function]"},h=function(e){return Object.prototype.toString.call(e)==="[object Object]"},p=function(e,t){return e.indexOf(t)===0},d=function(e){return(e+"").replace(o,"")},v=function(e){return isNaN(e)?NaN:Math[e<0?"ceil":"floor"](e)},m=function(e,t,n){var r;for(r=e.length;r<t;r+=1)e=n?"0"+e:e+"0";return e},g=function(e,t){var n=0,r=!1;for(var i=0,s=e.length;i<s;i++){var o=e.charAt(i);switch(o){case"'":r?t.push("'"):n++,r=!1;break;case"\\":r&&t.push("\\"),r=!r;break;default:t.push(o),r=!1}}return n},y=function(e,t){t=t||"F";var n,r=e.patterns,i=t.length;if(i===1){n=r[t];if(!n)throw"Invalid date format string '"+t+"'.";t=n}else i===2&&t.charAt(0)==="%"&&(t=t.charAt(1));return t},b=function(e,t,n){function T(e,t){var n,r=e+"";return t>1&&r.length<t?(n=c[t-2]+r,n.substr(n.length-t,t)):(n=r,n)}function N(){return h||p?h:(h=d.test(t),p=!0,h)}function C(e,t){if(w)return w[t];switch(t){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate();default:throw"Invalid part value "+t}}var r=n.calendar,i=r.convert,s;if(!t||!t.length||t==="i"){if(n&&n.name.length)if(i)s=b(e,r.patterns.F,n);else{var o=new Date(e.getTime()),u=S(e,r.eras);o.setFullYear(x(e,r,u)),s=o.toLocaleString()}else s=e.toString();return s}var a=r.eras,f=t==="s";t=y(r,t),s=[];var l,c=["0","00","000"],h,p,d=/([^d]|^)(d|dd)([^d]|$)/g,v=0,m=E(),w;!f&&i&&(w=i.fromGregorian(e));for(;;){var k=m.lastIndex,L=m.exec(t),A=t.slice(k,L?L.index:t.length);v+=g(A,s);if(!L)break;if(v%2){s.push(L[0]);continue}var O=L[0],M=O.length;switch(O){case"ddd":case"dddd":var _=M===3?r.days.namesAbbr:r.days.names;s.push(_[e.getDay()]);break;case"d":case"dd":h=!0,s.push(T(C(e,2),M));break;case"MMM":case"MMMM":var D=C(e,1);s.push(r.monthsGenitive&&N()?r.monthsGenitive[M===3?"namesAbbr":"names"][D]:r.months[M===3?"namesAbbr":"names"][D]);break;case"M":case"MM":s.push(T(C(e,1)+1,M));break;case"y":case"yy":case"yyyy":D=w?w[0]:x(e,r,S(e,a),f),M<4&&(D%=100),s.push(T(D,M));break;case"h":case"hh":l=e.getHours()%12,l===0&&(l=12),s.push(T(l,M));break;case"H":case"HH":s.push(T(e.getHours(),M));break;case"m":case"mm":s.push(T(e.getMinutes(),M));break;case"s":case"ss":s.push(T(e.getSeconds(),M));break;case"t":case"tt":D=e.getHours()<12?r.AM?r.AM[0]:" ":r.PM?r.PM[0]:" ",s.push(M===1?D.charAt(0):D);break;case"f":case"ff":case"fff":s.push(T(e.getMilliseconds(),3).substr(0,M));break;case"z":case"zz":l=e.getTimezoneOffset()/60,s.push((l<=0?"+":"-")+T(Math.floor(Math.abs(l)),M));break;case"zzz":l=e.getTimezoneOffset()/60,s.push((l<=0?"+":"-")+T(Math.floor(Math.abs(l)),2)+":"+T(Math.abs(e.getTimezoneOffset()%60),2));break;case"g":case"gg":r.eras&&s.push(r.eras[S(e,a)].name);break;case"/":s.push(r["/"]);break;default:throw"Invalid date format pattern '"+O+"'."}}return s.join("")},function(){var e;e=function(e,t,n){var r=n.groupSizes,i=r[0],s=1,o=Math.pow(10,t),u=Math.round(e*o)/o;isFinite(u)||(u=e),e=u;var a=e+"",f="",l=a.split(/e/i),c=l.length>1?parseInt(l[1],10):0;a=l[0],l=a.split("."),a=l[0],f=l.length>1?l[1]:"";var h;c>0?(f=m(f,c,!1),a+=f.slice(0,c),f=f.substr(c)):c<0&&(c=-c,a=m(a,c+1,!0),f=a.slice(-c,a.length)+f,a=a.slice(0,-c)),t>0?f=n["."]+(f.length>t?f.slice(0,t):m(f,t)):f="";var p=a.length-1,d=n[","],v="";while(p>=0){if(i===0||i>p)return a.slice(0,p+1)+(v.length?d+v+f:f);v=a.slice(p-i+1,p+1)+(v.length?d+v:""),p-=i,s<r.length&&(i=r[s],s++)}return a.slice(0,p+1)+d+v+f},w=function(t,n,r){if(!isFinite(t))return t===Infinity?r.numberFormat.positiveInfinity:t===-Infinity?r.numberFormat.negativeInfinity:r.numberFormat.NaN;if(!n||n==="i")return r.name.length?t.toLocaleString():t.toString();n=n||"D";var i=r.numberFormat,s=Math.abs(t),o=-1,u;n.length>1&&(o=parseInt(n.slice(1),10));var a=n.charAt(0).toUpperCase(),f;switch(a){case"D":u="n",s=v(s),o!==-1&&(s=m(""+s,o,!0)),t<0&&(s="-"+s);break;case"N":f=i;case"C":f=f||i.currency;case"P":f=f||i.percent,u=t<0?f.pattern[0]:f.pattern[1]||"n",o===-1&&(o=f.decimals),s=e(s*(a==="P"?100:1),o,f);break;default:throw"Bad number format specifier: "+a}var l=/n|\$|-|%/g,c="";for(;;){var h=l.lastIndex,p=l.exec(u);c+=u.slice(h,p?p.index:u.length);if(!p)break;switch(p[0]){case"n":c+=s;break;case"$":c+=i.currency.symbol;break;case"-":/[1-9]/.test(s)&&(c+=i["-"]);break;case"%":c+=i.percent.symbol}}return c}}(),E=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g},S=function(e,t){if(!t)return 0;var n,r=e.getTime();for(var i=0,s=t.length;i<s;i++){n=t[i].start;if(n===null||r>=n)return i}return 0},x=function(e,t,n,r){var i=e.getFullYear();return!r&&t.eras&&(i-=t.eras[n].offset),i},function(){var e,t,n,r,i,s,o;e=function(e,t){if(t<100){var n=new Date,r=S(n),i=x(n,e,r),s=e.twoDigitYearMax;s=typeof s=="string"?(new Date).getFullYear()%100+parseInt(s,10):s,t+=i-i%100,t>s&&(t-=100)}return t},t=function(e,t,n){var r,i=e.days,a=e._upperDays;return a||(e._upperDays=a=[o(i.names),o(i.namesAbbr),o(i.namesShort)]),t=s(t),n?(r=u(a[1],t),r===-1&&(r=u(a[2],t))):r=u(a[0],t),r},n=function(e,t,n){var r=e.months,i=e.monthsGenitive||e.months,a=e._upperMonths,f=e._upperMonthsGen;a||(e._upperMonths=a=[o(r.names),o(r.namesAbbr)],e._upperMonthsGen=f=[o(i.names),o(i.namesAbbr)]),t=s(t);var l=u(n?a[1]:a[0],t);return l<0&&(l=u(n?f[1]:f[0],t)),l},r=function(e,t){var n=e._parseRegExp;if(!n)e._parseRegExp=n={};else{var r=n[t];if(r)return r}var i=y(e,t).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),s=["^"],o=[],u=0,a=0,f=E(),l;while((l=f.exec(i))!==null){var c=i.slice(u,l.index);u=f.lastIndex,a+=g(c,s);if(a%2){s.push(l[0]);continue}var h=l[0],p=h.length,d;switch(h){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":d="(\\D+)";break;case"tt":case"t":d="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":d="(\\d{"+p+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":d="(\\d\\d?)";break;case"zzz":d="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":d="([+-]?\\d\\d?)";break;case"/":d="(\\/)";break;default:throw"Invalid date format pattern '"+h+"'."}d&&s.push(d),o.push(l[0])}g(i.slice(u),s),s.push("$");var v=s.join("").replace(/\s+/g,"\\s+"),m={regExp:v,groups:o};return n[t]=m},i=function(e,t,n){return e<t||e>n},s=function(e){return e.split("Â ").join(" ").toUpperCase()},o=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)t[n]=s(e[n]);return t},T=function(s,o,u){s=d(s);var a=u.calendar,f=r(a,o),l=(new RegExp(f.regExp)).exec(s);if(l===null)return null;var c=f.groups,h=null,v=null,m=null,g=null,y=null,b=0,w,E=0,S=0,x=0,T=null,N=!1;for(var C=0,k=c.length;C<k;C++){var L=l[C+1];if(L){var A=c[C],O=A.length,M=parseInt(L,10);switch(A){case"dd":case"d":g=M;if(i(g,1,31))return null;break;case"MMM":case"MMMM":m=n(a,L,O===3);if(i(m,0,11))return null;break;case"M":case"MM":m=M-1;if(i(m,0,11))return null;break;case"y":case"yy":case"yyyy":v=O<4?e(a,M):M;if(i(v,0,9999))return null;break;case"h":case"hh":b=M,b===12&&(b=0);if(i(b,0,11))return null;break;case"H":case"HH":b=M;if(i(b,0,23))return null;break;case"m":case"mm":E=M;if(i(E,0,59))return null;break;case"s":case"ss":S=M;if(i(S,0,59))return null;break;case"tt":case"t":N=a.PM&&(L===a.PM[0]||L===a.PM[1]||L===a.PM[2]);if(!N&&(!a.AM||L!==a.AM[0]&&L!==a.AM[1]&&L!==a.AM[2]))return null;break;case"f":case"ff":case"fff":x=M*Math.pow(10,3-O);if(i(x,0,999))return null;break;case"ddd":case"dddd":y=t(a,L,O===3);if(i(y,0,6))return null;break;case"zzz":var _=L.split(/:/);if(_.length!==2)return null;w=parseInt(_[0],10);if(i(w,-12,13))return null;var D=parseInt(_[1],10);if(i(D,0,59))return null;T=w*60+(p(L,"-")?-D:D);break;case"z":case"zz":w=M;if(i(w,-12,13))return null;T=w*60;break;case"g":case"gg":var P=L;if(!P||!a.eras)return null;P=d(P.toLowerCase());for(var H=0,B=a.eras.length;H<B;H++)if(P===a.eras[H].name.toLowerCase()){h=H;break}if(h===null)return null}}}var j=new Date,F,I=a.convert;F=I?I.fromGregorian(j)[0]:j.getFullYear(),v===null?v=F:a.eras&&(v+=a.eras[h||0].offset),m===null&&(m=0),g===null&&(g=1);if(I){j=I.toGregorian(v,m,g);if(j===null)return null}else{j.setFullYear(v,m,g);if(j.getDate()!==g)return null;if(y!==null&&j.getDay()!==y)return null}N&&b<12&&(b+=12),j.setHours(b,E,S,x);if(T!==null){var q=j.getMinutes()-(T+j.getTimezoneOffset());j.setHours(j.getHours()+parseInt(q/60,10),q%60)}return j}}(),N=function(e,t,n){var r=t["-"],i=t["+"],s;switch(n){case"n -":r=" "+r,i=" "+i;case"n-":a(e,r)?s=["-",e.substr(0,e.length-r.length)]:a(e,i)&&(s=["+",e.substr(0,e.length-i.length)]);break;case"- n":r+=" ",i+=" ";case"-n":p(e,r)?s=["-",e.substr(r.length)]:p(e,i)&&(s=["+",e.substr(i.length)]);break;case"(n)":p(e,"(")&&a(e,")")&&(s=["-",e.substr(1,e.length-2)])}return s||["",e]},n.prototype.findClosestCulture=function(e){return n.findClosestCulture.call(this,e)},n.prototype.format=function(e,t,r){return n.format.call(this,e,t,r)},n.prototype.localize=function(e,t){return n.localize.call(this,e,t)},n.prototype.parseInt=function(e,t,r){return n.parseInt.call(this,e,t,r)},n.prototype.parseFloat=function(e,t,r){return n.parseFloat.call(this,e,t,r)},n.prototype.culture=function(e){return n.culture.call(this,e)},n.addCultureInfo=function(e,t,n){var r={},i=!1;typeof e!="string"?(n=e,e=this.culture().name,r=this.cultures[e]):typeof t!="string"?(n=t,i=this.cultures[e]==null,r=this.cultures[e]||this.cultures["default"]):(i=!0,r=this.cultures[t]),this.cultures[e]=f(!0,{},r,n),i&&(this.cultures[e].calendar=this.cultures[e].calendars.standard)},n.findClosestCulture=function(e){var t;if(!e)return this.findClosestCulture(this.cultureSelector)||this.cultures["default"];typeof e=="string"&&(e=e.split(","));if(l(e)){var n,r=this.cultures,i=e,s,o=i.length,u=[];for(s=0;s<o;s++){e=d(i[s]);var a,f=e.split(";");n=d(f[0]),f.length===1?a=1:(e=d(f[1]),e.indexOf("q=")===0?(e=e.substr(2),a=parseFloat(e),a=isNaN(a)?0:a):a=1),u.push({lang:n,pri:a})}u.sort(function(e,t){return e.pri<t.pri?1:e.pri>t.pri?-1:0});for(s=0;s<o;s++){n=u[s].lang,t=r[n];if(t)return t}for(s=0;s<o;s++){n=u[s].lang;do{var c=n.lastIndexOf("-");if(c===-1)break;n=n.substr(0,c),t=r[n];if(t)return t}while(1)}for(s=0;s<o;s++){n=u[s].lang;for(var h in r){var p=r[h];if(p.language==n)return p}}}else if(typeof e=="object")return e;return t||null},n.format=function(e,t,n){var r=this.findClosestCulture(n);return e instanceof Date?e=b(e,t,r):typeof e=="number"&&(e=w(e,t,r)),e},n.localize=function(e,t){return this.findClosestCulture(t).messages[e]||this.cultures["default"].messages[e]},n.parseDate=function(e,t,n){n=this.findClosestCulture(n);var r,i,s;if(t){typeof t=="string"&&(t=[t]);if(t.length)for(var o=0,u=t.length;o<u;o++){var a=t[o];if(a){r=T(e,a,n);if(r)break}}}else{s=n.calendar.patterns;for(i in s){r=T(e,s[i],n);if(r)break}}return r||null},n.parseInt=function(e,t,r){return v(n.parseFloat(e,t,r))},n.parseFloat=function(e,t,n){typeof t!="number"&&(n=t,t=10);var o=this.findClosestCulture(n),u=NaN,a=o.numberFormat;e.indexOf(o.numberFormat.currency.symbol)>-1&&(e=e.replace(o.numberFormat.currency.symbol,""),e=e.replace(o.numberFormat.currency["."],o.numberFormat["."])),e.indexOf(o.numberFormat.percent.symbol)>-1&&(e=e.replace(o.numberFormat.percent.symbol,"")),e=e.replace(/ /g,"");if(i.test(e))u=parseFloat(e);else if(!t&&r.test(e))u=parseInt(e,16);else{var f=N(e,a,a.pattern[0]),l=f[0],c=f[1];l===""&&a.pattern[0]!=="(n)"&&(f=N(e,a,"(n)"),l=f[0],c=f[1]),l===""&&a.pattern[0]!=="-n"&&(f=N(e,a,"-n"),l=f[0],c=f[1]),l=l||"+";var h,p,d=c.indexOf("e");d<0&&(d=c.indexOf("E")),d<0?(p=c,h=null):(p=c.substr(0,d),h=c.substr(d+1));var v,m,g=a["."],y=p.indexOf(g);y<0?(v=p,m=null):(v=p.substr(0,y),m=p.substr(y+g.length));var b=a[","];v=v.split(b).join("");var w=b.replace(/\u00A0/g," ");b!==w&&(v=v.split(w).join(""));var E=l+v;m!==null&&(E+="."+m);if(h!==null){var S=N(h,a,"-n");E+="e"+(S[0]||"+")+S[1]}s.test(E)&&(u=parseFloat(E))}return u},n.culture=function(e){return typeof e!="undefined"&&(this.cultureSelector=e),this.findClosestCulture(e)||this.cultures["default"]}})(this);
/*!
 * Knockout JavaScript library v3.2.0
 * (c) Steven Sanderson - http://knockoutjs.com/
 * License: MIT (http://www.opensource.org/licenses/mit-license.php)
 */


(function() {(function(p){var s=this||(0,eval)("this"),v=s.document,L=s.navigator,w=s.jQuery,D=s.JSON;(function(p){"function"===typeof require&&"object"===typeof exports&&"object"===typeof module?p(module.exports||exports,require):"function"===typeof define&&define.amd?define(["exports","require"],p):p(s.ko={})})(function(M,N){function H(a,d){return null===a||typeof a in R?a===d:!1}function S(a,d){var c;return function(){c||(c=setTimeout(function(){c=p;a()},d))}}function T(a,d){var c;return function(){clearTimeout(c);
c=setTimeout(a,d)}}function I(b,d,c,e){a.d[b]={init:function(b,h,k,f,m){var l,q;a.s(function(){var f=a.a.c(h()),k=!c!==!f,z=!q;if(z||d||k!==l)z&&a.Y.la()&&(q=a.a.ia(a.f.childNodes(b),!0)),k?(z||a.f.T(b,a.a.ia(q)),a.Ca(e?e(m,f):m,b)):a.f.ja(b),l=k},null,{o:b});return{controlsDescendantBindings:!0}}};a.h.ha[b]=!1;a.f.Q[b]=!0}var a="undefined"!==typeof M?M:{};a.b=function(b,d){for(var c=b.split("."),e=a,g=0;g<c.length-1;g++)e=e[c[g]];e[c[c.length-1]]=d};a.A=function(a,d,c){a[d]=c};a.version="3.2.0";
a.b("version",a.version);a.a=function(){function b(a,b){for(var c in a)a.hasOwnProperty(c)&&b(c,a[c])}function d(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function c(a,b){a.__proto__=b;return a}var e={__proto__:[]}instanceof Array,g={},h={};g[L&&/Firefox\/2/i.test(L.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];g.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");b(g,function(a,b){if(b.length)for(var c=
0,d=b.length;c<d;c++)h[b[c]]=a});var k={propertychange:!0},f=v&&function(){for(var a=3,b=v.createElement("div"),c=b.getElementsByTagName("i");b.innerHTML="\x3c!--[if gt IE "+ ++a+"]><i></i><![endif]--\x3e",c[0];);return 4<a?a:p}();return{vb:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],u:function(a,b){for(var c=0,d=a.length;c<d;c++)b(a[c],c)},m:function(a,b){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(a,b);for(var c=0,d=a.length;c<d;c++)if(a[c]===
b)return c;return-1},qb:function(a,b,c){for(var d=0,f=a.length;d<f;d++)if(b.call(c,a[d],d))return a[d];return null},ua:function(m,b){var c=a.a.m(m,b);0<c?m.splice(c,1):0===c&&m.shift()},rb:function(m){m=m||[];for(var b=[],c=0,d=m.length;c<d;c++)0>a.a.m(b,m[c])&&b.push(m[c]);return b},Da:function(a,b){a=a||[];for(var c=[],d=0,f=a.length;d<f;d++)c.push(b(a[d],d));return c},ta:function(a,b){a=a||[];for(var c=[],d=0,f=a.length;d<f;d++)b(a[d],d)&&c.push(a[d]);return c},ga:function(a,b){if(b instanceof
Array)a.push.apply(a,b);else for(var c=0,d=b.length;c<d;c++)a.push(b[c]);return a},ea:function(b,c,d){var f=a.a.m(a.a.Xa(b),c);0>f?d&&b.push(c):d||b.splice(f,1)},xa:e,extend:d,za:c,Aa:e?c:d,G:b,na:function(a,b){if(!a)return a;var c={},d;for(d in a)a.hasOwnProperty(d)&&(c[d]=b(a[d],d,a));return c},Ka:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},oc:function(b){b=a.a.S(b);for(var c=v.createElement("div"),d=0,f=b.length;d<f;d++)c.appendChild(a.R(b[d]));return c},ia:function(b,c){for(var d=
0,f=b.length,e=[];d<f;d++){var k=b[d].cloneNode(!0);e.push(c?a.R(k):k)}return e},T:function(b,c){a.a.Ka(b);if(c)for(var d=0,f=c.length;d<f;d++)b.appendChild(c[d])},Lb:function(b,c){var d=b.nodeType?[b]:b;if(0<d.length){for(var f=d[0],e=f.parentNode,k=0,g=c.length;k<g;k++)e.insertBefore(c[k],f);k=0;for(g=d.length;k<g;k++)a.removeNode(d[k])}},ka:function(a,b){if(a.length){for(b=8===b.nodeType&&b.parentNode||b;a.length&&a[0].parentNode!==b;)a.shift();if(1<a.length){var c=a[0],d=a[a.length-1];for(a.length=
0;c!==d;)if(a.push(c),c=c.nextSibling,!c)return;a.push(d)}}return a},Nb:function(a,b){7>f?a.setAttribute("selected",b):a.selected=b},cb:function(a){return null===a||a===p?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},vc:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===b},cc:function(a,b){if(a===b)return!0;if(11===a.nodeType)return!1;if(b.contains)return b.contains(3===a.nodeType?a.parentNode:a);if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)&
16);for(;a&&a!=b;)a=a.parentNode;return!!a},Ja:function(b){return a.a.cc(b,b.ownerDocument.documentElement)},ob:function(b){return!!a.a.qb(b,a.a.Ja)},t:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},n:function(b,c,d){var e=f&&k[c];if(!e&&w)w(b).bind(c,d);else if(e||"function"!=typeof b.addEventListener)if("undefined"!=typeof b.attachEvent){var g=function(a){d.call(b,a)},h="on"+c;b.attachEvent(h,g);a.a.w.da(b,function(){b.detachEvent(h,g)})}else throw Error("Browser doesn't support addEventListener or attachEvent");
else b.addEventListener(c,d,!1)},oa:function(b,c){if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var d;"input"===a.a.t(b)&&b.type&&"click"==c.toLowerCase()?(d=b.type,d="checkbox"==d||"radio"==d):d=!1;if(w&&!d)w(b).trigger(c);else if("function"==typeof v.createEvent)if("function"==typeof b.dispatchEvent)d=v.createEvent(h[c]||"HTMLEvents"),d.initEvent(c,!0,!0,s,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchEvent(d);else throw Error("The supplied element doesn't support dispatchEvent");
else if(d&&b.click)b.click();else if("undefined"!=typeof b.fireEvent)b.fireEvent("on"+c);else throw Error("Browser doesn't support triggering events");},c:function(b){return a.C(b)?b():b},Xa:function(b){return a.C(b)?b.v():b},Ba:function(b,c,d){if(c){var f=/\S+/g,e=b.className.match(f)||[];a.a.u(c.match(f),function(b){a.a.ea(e,b,d)});b.className=e.join(" ")}},bb:function(b,c){var d=a.a.c(c);if(null===d||d===p)d="";var f=a.f.firstChild(b);!f||3!=f.nodeType||a.f.nextSibling(f)?a.f.T(b,[b.ownerDocument.createTextNode(d)]):
f.data=d;a.a.fc(b)},Mb:function(a,b){a.name=b;if(7>=f)try{a.mergeAttributes(v.createElement("<input name='"+a.name+"'/>"),!1)}catch(c){}},fc:function(a){9<=f&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},dc:function(a){if(f){var b=a.style.width;a.style.width=0;a.style.width=b}},sc:function(b,c){b=a.a.c(b);c=a.a.c(c);for(var d=[],f=b;f<=c;f++)d.push(f);return d},S:function(a){for(var b=[],c=0,d=a.length;c<d;c++)b.push(a[c]);return b},yc:6===f,zc:7===f,L:f,xb:function(b,c){for(var d=
a.a.S(b.getElementsByTagName("input")).concat(a.a.S(b.getElementsByTagName("textarea"))),f="string"==typeof c?function(a){return a.name===c}:function(a){return c.test(a.name)},e=[],k=d.length-1;0<=k;k--)f(d[k])&&e.push(d[k]);return e},pc:function(b){return"string"==typeof b&&(b=a.a.cb(b))?D&&D.parse?D.parse(b):(new Function("return "+b))():null},eb:function(b,c,d){if(!D||!D.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");
return D.stringify(a.a.c(b),c,d)},qc:function(c,d,f){f=f||{};var e=f.params||{},k=f.includeFields||this.vb,g=c;if("object"==typeof c&&"form"===a.a.t(c))for(var g=c.action,h=k.length-1;0<=h;h--)for(var r=a.a.xb(c,k[h]),E=r.length-1;0<=E;E--)e[r[E].name]=r[E].value;d=a.a.c(d);var y=v.createElement("form");y.style.display="none";y.action=g;y.method="post";for(var p in d)c=v.createElement("input"),c.type="hidden",c.name=p,c.value=a.a.eb(a.a.c(d[p])),y.appendChild(c);b(e,function(a,b){var c=v.createElement("input");
c.type="hidden";c.name=a;c.value=b;y.appendChild(c)});v.body.appendChild(y);f.submitter?f.submitter(y):y.submit();setTimeout(function(){y.parentNode.removeChild(y)},0)}}}();a.b("utils",a.a);a.b("utils.arrayForEach",a.a.u);a.b("utils.arrayFirst",a.a.qb);a.b("utils.arrayFilter",a.a.ta);a.b("utils.arrayGetDistinctValues",a.a.rb);a.b("utils.arrayIndexOf",a.a.m);a.b("utils.arrayMap",a.a.Da);a.b("utils.arrayPushAll",a.a.ga);a.b("utils.arrayRemoveItem",a.a.ua);a.b("utils.extend",a.a.extend);a.b("utils.fieldsIncludedWithJsonPost",
a.a.vb);a.b("utils.getFormFields",a.a.xb);a.b("utils.peekObservable",a.a.Xa);a.b("utils.postJson",a.a.qc);a.b("utils.parseJson",a.a.pc);a.b("utils.registerEventHandler",a.a.n);a.b("utils.stringifyJson",a.a.eb);a.b("utils.range",a.a.sc);a.b("utils.toggleDomNodeCssClass",a.a.Ba);a.b("utils.triggerEvent",a.a.oa);a.b("utils.unwrapObservable",a.a.c);a.b("utils.objectForEach",a.a.G);a.b("utils.addOrRemoveItem",a.a.ea);a.b("unwrap",a.a.c);Function.prototype.bind||(Function.prototype.bind=function(a){var d=
this,c=Array.prototype.slice.call(arguments);a=c.shift();return function(){return d.apply(a,c.concat(Array.prototype.slice.call(arguments)))}});a.a.e=new function(){function a(b,h){var k=b[c];if(!k||"null"===k||!e[k]){if(!h)return p;k=b[c]="ko"+d++;e[k]={}}return e[k]}var d=0,c="__ko__"+(new Date).getTime(),e={};return{get:function(c,d){var e=a(c,!1);return e===p?p:e[d]},set:function(c,d,e){if(e!==p||a(c,!1)!==p)a(c,!0)[d]=e},clear:function(a){var b=a[c];return b?(delete e[b],a[c]=null,!0):!1},F:function(){return d++ +
c}}};a.b("utils.domData",a.a.e);a.b("utils.domData.clear",a.a.e.clear);a.a.w=new function(){function b(b,d){var f=a.a.e.get(b,c);f===p&&d&&(f=[],a.a.e.set(b,c,f));return f}function d(c){var e=b(c,!1);if(e)for(var e=e.slice(0),f=0;f<e.length;f++)e[f](c);a.a.e.clear(c);a.a.w.cleanExternalData(c);if(g[c.nodeType])for(e=c.firstChild;c=e;)e=c.nextSibling,8===c.nodeType&&d(c)}var c=a.a.e.F(),e={1:!0,8:!0,9:!0},g={1:!0,9:!0};return{da:function(a,c){if("function"!=typeof c)throw Error("Callback must be a function");
b(a,!0).push(c)},Kb:function(d,e){var f=b(d,!1);f&&(a.a.ua(f,e),0==f.length&&a.a.e.set(d,c,p))},R:function(b){if(e[b.nodeType]&&(d(b),g[b.nodeType])){var c=[];a.a.ga(c,b.getElementsByTagName("*"));for(var f=0,m=c.length;f<m;f++)d(c[f])}return b},removeNode:function(b){a.R(b);b.parentNode&&b.parentNode.removeChild(b)},cleanExternalData:function(a){w&&"function"==typeof w.cleanData&&w.cleanData([a])}}};a.R=a.a.w.R;a.removeNode=a.a.w.removeNode;a.b("cleanNode",a.R);a.b("removeNode",a.removeNode);a.b("utils.domNodeDisposal",
a.a.w);a.b("utils.domNodeDisposal.addDisposeCallback",a.a.w.da);a.b("utils.domNodeDisposal.removeDisposeCallback",a.a.w.Kb);(function(){a.a.ba=function(b){var d;if(w)if(w.parseHTML)d=w.parseHTML(b)||[];else{if((d=w.clean([b]))&&d[0]){for(b=d[0];b.parentNode&&11!==b.parentNode.nodeType;)b=b.parentNode;b.parentNode&&b.parentNode.removeChild(b)}}else{var c=a.a.cb(b).toLowerCase();d=v.createElement("div");c=c.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","</table>"]||!c.indexOf("<tr")&&[2,"<table><tbody>",
"</tbody></table>"]||(!c.indexOf("<td")||!c.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];b="ignored<div>"+c[1]+b+c[2]+"</div>";for("function"==typeof s.innerShiv?d.appendChild(s.innerShiv(b)):d.innerHTML=b;c[0]--;)d=d.lastChild;d=a.a.S(d.lastChild.childNodes)}return d};a.a.$a=function(b,d){a.a.Ka(b);d=a.a.c(d);if(null!==d&&d!==p)if("string"!=typeof d&&(d=d.toString()),w)w(b).html(d);else for(var c=a.a.ba(d),e=0;e<c.length;e++)b.appendChild(c[e])}})();a.b("utils.parseHtmlFragment",
a.a.ba);a.b("utils.setHtml",a.a.$a);a.D=function(){function b(c,d){if(c)if(8==c.nodeType){var g=a.D.Gb(c.nodeValue);null!=g&&d.push({bc:c,mc:g})}else if(1==c.nodeType)for(var g=0,h=c.childNodes,k=h.length;g<k;g++)b(h[g],d)}var d={};return{Ua:function(a){if("function"!=typeof a)throw Error("You can only pass a function to ko.memoization.memoize()");var b=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);d[b]=a;return"\x3c!--[ko_memo:"+
b+"]--\x3e"},Rb:function(a,b){var g=d[a];if(g===p)throw Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized.");try{return g.apply(null,b||[]),!0}finally{delete d[a]}},Sb:function(c,d){var g=[];b(c,g);for(var h=0,k=g.length;h<k;h++){var f=g[h].bc,m=[f];d&&a.a.ga(m,d);a.D.Rb(g[h].mc,m);f.nodeValue="";f.parentNode&&f.parentNode.removeChild(f)}},Gb:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:null}}}();a.b("memoization",a.D);a.b("memoization.memoize",a.D.Ua);
a.b("memoization.unmemoize",a.D.Rb);a.b("memoization.parseMemoText",a.D.Gb);a.b("memoization.unmemoizeDomNodeAndDescendants",a.D.Sb);a.La={throttle:function(b,d){b.throttleEvaluation=d;var c=null;return a.j({read:b,write:function(a){clearTimeout(c);c=setTimeout(function(){b(a)},d)}})},rateLimit:function(a,d){var c,e,g;"number"==typeof d?c=d:(c=d.timeout,e=d.method);g="notifyWhenChangesStop"==e?T:S;a.Ta(function(a){return g(a,c)})},notify:function(a,d){a.equalityComparer="always"==d?null:H}};var R=
{undefined:1,"boolean":1,number:1,string:1};a.b("extenders",a.La);a.Pb=function(b,d,c){this.target=b;this.wa=d;this.ac=c;this.Cb=!1;a.A(this,"dispose",this.K)};a.Pb.prototype.K=function(){this.Cb=!0;this.ac()};a.P=function(){a.a.Aa(this,a.P.fn);this.M={}};var G="change",A={U:function(b,d,c){var e=this;c=c||G;var g=new a.Pb(e,d?b.bind(d):b,function(){a.a.ua(e.M[c],g);e.nb&&e.nb()});e.va&&e.va(c);e.M[c]||(e.M[c]=[]);e.M[c].push(g);return g},notifySubscribers:function(b,d){d=d||G;if(this.Ab(d))try{a.k.Ea();
for(var c=this.M[d].slice(0),e=0,g;g=c[e];++e)g.Cb||g.wa(b)}finally{a.k.end()}},Ta:function(b){var d=this,c=a.C(d),e,g,h;d.qa||(d.qa=d.notifySubscribers,d.notifySubscribers=function(a,b){b&&b!==G?"beforeChange"===b?d.kb(a):d.qa(a,b):d.lb(a)});var k=b(function(){c&&h===d&&(h=d());e=!1;d.Pa(g,h)&&d.qa(g=h)});d.lb=function(a){e=!0;h=a;k()};d.kb=function(a){e||(g=a,d.qa(a,"beforeChange"))}},Ab:function(a){return this.M[a]&&this.M[a].length},yb:function(){var b=0;a.a.G(this.M,function(a,c){b+=c.length});
return b},Pa:function(a,d){return!this.equalityComparer||!this.equalityComparer(a,d)},extend:function(b){var d=this;b&&a.a.G(b,function(b,e){var g=a.La[b];"function"==typeof g&&(d=g(d,e)||d)});return d}};a.A(A,"subscribe",A.U);a.A(A,"extend",A.extend);a.A(A,"getSubscriptionsCount",A.yb);a.a.xa&&a.a.za(A,Function.prototype);a.P.fn=A;a.Db=function(a){return null!=a&&"function"==typeof a.U&&"function"==typeof a.notifySubscribers};a.b("subscribable",a.P);a.b("isSubscribable",a.Db);a.Y=a.k=function(){function b(a){c.push(e);
e=a}function d(){e=c.pop()}var c=[],e,g=0;return{Ea:b,end:d,Jb:function(b){if(e){if(!a.Db(b))throw Error("Only subscribable things can act as dependencies");e.wa(b,b.Vb||(b.Vb=++g))}},B:function(a,c,f){try{return b(),a.apply(c,f||[])}finally{d()}},la:function(){if(e)return e.s.la()},ma:function(){if(e)return e.ma}}}();a.b("computedContext",a.Y);a.b("computedContext.getDependenciesCount",a.Y.la);a.b("computedContext.isInitial",a.Y.ma);a.b("computedContext.isSleeping",a.Y.Ac);a.p=function(b){function d(){if(0<
arguments.length)return d.Pa(c,arguments[0])&&(d.X(),c=arguments[0],d.W()),this;a.k.Jb(d);return c}var c=b;a.P.call(d);a.a.Aa(d,a.p.fn);d.v=function(){return c};d.W=function(){d.notifySubscribers(c)};d.X=function(){d.notifySubscribers(c,"beforeChange")};a.A(d,"peek",d.v);a.A(d,"valueHasMutated",d.W);a.A(d,"valueWillMutate",d.X);return d};a.p.fn={equalityComparer:H};var F=a.p.rc="__ko_proto__";a.p.fn[F]=a.p;a.a.xa&&a.a.za(a.p.fn,a.P.fn);a.Ma=function(b,d){return null===b||b===p||b[F]===p?!1:b[F]===
d?!0:a.Ma(b[F],d)};a.C=function(b){return a.Ma(b,a.p)};a.Ra=function(b){return"function"==typeof b&&b[F]===a.p||"function"==typeof b&&b[F]===a.j&&b.hc?!0:!1};a.b("observable",a.p);a.b("isObservable",a.C);a.b("isWriteableObservable",a.Ra);a.b("isWritableObservable",a.Ra);a.aa=function(b){b=b||[];if("object"!=typeof b||!("length"in b))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");b=a.p(b);a.a.Aa(b,a.aa.fn);return b.extend({trackArrayChanges:!0})};
a.aa.fn={remove:function(b){for(var d=this.v(),c=[],e="function"!=typeof b||a.C(b)?function(a){return a===b}:b,g=0;g<d.length;g++){var h=d[g];e(h)&&(0===c.length&&this.X(),c.push(h),d.splice(g,1),g--)}c.length&&this.W();return c},removeAll:function(b){if(b===p){var d=this.v(),c=d.slice(0);this.X();d.splice(0,d.length);this.W();return c}return b?this.remove(function(c){return 0<=a.a.m(b,c)}):[]},destroy:function(b){var d=this.v(),c="function"!=typeof b||a.C(b)?function(a){return a===b}:b;this.X();
for(var e=d.length-1;0<=e;e--)c(d[e])&&(d[e]._destroy=!0);this.W()},destroyAll:function(b){return b===p?this.destroy(function(){return!0}):b?this.destroy(function(d){return 0<=a.a.m(b,d)}):[]},indexOf:function(b){var d=this();return a.a.m(d,b)},replace:function(a,d){var c=this.indexOf(a);0<=c&&(this.X(),this.v()[c]=d,this.W())}};a.a.u("pop push reverse shift sort splice unshift".split(" "),function(b){a.aa.fn[b]=function(){var a=this.v();this.X();this.sb(a,b,arguments);a=a[b].apply(a,arguments);this.W();
return a}});a.a.u(["slice"],function(b){a.aa.fn[b]=function(){var a=this();return a[b].apply(a,arguments)}});a.a.xa&&a.a.za(a.aa.fn,a.p.fn);a.b("observableArray",a.aa);var J="arrayChange";a.La.trackArrayChanges=function(b){function d(){if(!c){c=!0;var d=b.notifySubscribers;b.notifySubscribers=function(a,b){b&&b!==G||++g;return d.apply(this,arguments)};var f=[].concat(b.v()||[]);e=null;b.U(function(c){c=[].concat(c||[]);if(b.Ab(J)){var d;if(!e||1<g)e=a.a.Fa(f,c,{sparse:!0});d=e;d.length&&b.notifySubscribers(d,
J)}f=c;e=null;g=0})}}if(!b.sb){var c=!1,e=null,g=0,h=b.U;b.U=b.subscribe=function(a,b,c){c===J&&d();return h.apply(this,arguments)};b.sb=function(b,d,m){function l(a,b,c){return q[q.length]={status:a,value:b,index:c}}if(c&&!g){var q=[],h=b.length,t=m.length,z=0;switch(d){case "push":z=h;case "unshift":for(d=0;d<t;d++)l("added",m[d],z+d);break;case "pop":z=h-1;case "shift":h&&l("deleted",b[z],z);break;case "splice":d=Math.min(Math.max(0,0>m[0]?h+m[0]:m[0]),h);for(var h=1===t?h:Math.min(d+(m[1]||0),
h),t=d+t-2,z=Math.max(h,t),u=[],r=[],E=2;d<z;++d,++E)d<h&&r.push(l("deleted",b[d],d)),d<t&&u.push(l("added",m[E],d));a.a.wb(r,u);break;default:return}e=q}}}};a.s=a.j=function(b,d,c){function e(){a.a.G(v,function(a,b){b.K()});v={}}function g(){e();C=0;u=!0;n=!1}function h(){var a=f.throttleEvaluation;a&&0<=a?(clearTimeout(P),P=setTimeout(k,a)):f.ib?f.ib():k()}function k(b){if(t){if(E)throw Error("A 'pure' computed must not be called recursively");}else if(!u){if(w&&w()){if(!z){s();return}}else z=!1;
t=!0;if(y)try{var c={};a.k.Ea({wa:function(a,b){c[b]||(c[b]=1,++C)},s:f,ma:p});C=0;q=r.call(d)}finally{a.k.end(),t=!1}else try{var e=v,m=C;a.k.Ea({wa:function(a,b){u||(m&&e[b]?(v[b]=e[b],++C,delete e[b],--m):v[b]||(v[b]=a.U(h),++C))},s:f,ma:E?p:!C});v={};C=0;try{var l=d?r.call(d):r()}finally{a.k.end(),m&&a.a.G(e,function(a,b){b.K()}),n=!1}f.Pa(q,l)&&(f.notifySubscribers(q,"beforeChange"),q=l,!0!==b&&f.notifySubscribers(q))}finally{t=!1}C||s()}}function f(){if(0<arguments.length){if("function"===typeof O)O.apply(d,
arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}a.k.Jb(f);n&&k(!0);return q}function m(){n&&!C&&k(!0);return q}function l(){return n||0<C}var q,n=!0,t=!1,z=!1,u=!1,r=b,E=!1,y=!1;r&&"object"==typeof r?(c=r,r=c.read):(c=c||{},r||(r=c.read));if("function"!=typeof r)throw Error("Pass a function that returns the value of the ko.computed");var O=c.write,x=c.disposeWhenNodeIsRemoved||
c.o||null,B=c.disposeWhen||c.Ia,w=B,s=g,v={},C=0,P=null;d||(d=c.owner);a.P.call(f);a.a.Aa(f,a.j.fn);f.v=m;f.la=function(){return C};f.hc="function"===typeof c.write;f.K=function(){s()};f.Z=l;var A=f.Ta;f.Ta=function(a){A.call(f,a);f.ib=function(){f.kb(q);n=!0;f.lb(f)}};c.pure?(y=E=!0,f.va=function(){y&&(y=!1,k(!0))},f.nb=function(){f.yb()||(e(),y=n=!0)}):c.deferEvaluation&&(f.va=function(){m();delete f.va});a.A(f,"peek",f.v);a.A(f,"dispose",f.K);a.A(f,"isActive",f.Z);a.A(f,"getDependenciesCount",
f.la);x&&(z=!0,x.nodeType&&(w=function(){return!a.a.Ja(x)||B&&B()}));y||c.deferEvaluation||k();x&&l()&&x.nodeType&&(s=function(){a.a.w.Kb(x,s);g()},a.a.w.da(x,s));return f};a.jc=function(b){return a.Ma(b,a.j)};A=a.p.rc;a.j[A]=a.p;a.j.fn={equalityComparer:H};a.j.fn[A]=a.j;a.a.xa&&a.a.za(a.j.fn,a.P.fn);a.b("dependentObservable",a.j);a.b("computed",a.j);a.b("isComputed",a.jc);a.Ib=function(b,d){if("function"===typeof b)return a.s(b,d,{pure:!0});b=a.a.extend({},b);b.pure=!0;return a.s(b,d)};a.b("pureComputed",
a.Ib);(function(){function b(a,g,h){h=h||new c;a=g(a);if("object"!=typeof a||null===a||a===p||a instanceof Date||a instanceof String||a instanceof Number||a instanceof Boolean)return a;var k=a instanceof Array?[]:{};h.save(a,k);d(a,function(c){var d=g(a[c]);switch(typeof d){case "boolean":case "number":case "string":case "function":k[c]=d;break;case "object":case "undefined":var l=h.get(d);k[c]=l!==p?l:b(d,g,h)}});return k}function d(a,b){if(a instanceof Array){for(var c=0;c<a.length;c++)b(c);"function"==
typeof a.toJSON&&b("toJSON")}else for(c in a)b(c)}function c(){this.keys=[];this.hb=[]}a.Qb=function(c){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return b(c,function(b){for(var c=0;a.C(b)&&10>c;c++)b=b();return b})};a.toJSON=function(b,c,d){b=a.Qb(b);return a.a.eb(b,c,d)};c.prototype={save:function(b,c){var d=a.a.m(this.keys,b);0<=d?this.hb[d]=c:(this.keys.push(b),this.hb.push(c))},get:function(b){b=a.a.m(this.keys,b);return 0<=b?this.hb[b]:p}}})();
a.b("toJS",a.Qb);a.b("toJSON",a.toJSON);(function(){a.i={q:function(b){switch(a.a.t(b)){case "option":return!0===b.__ko__hasDomDataOptionValue__?a.a.e.get(b,a.d.options.Va):7>=a.a.L?b.getAttributeNode("value")&&b.getAttributeNode("value").specified?b.value:b.text:b.value;case "select":return 0<=b.selectedIndex?a.i.q(b.options[b.selectedIndex]):p;default:return b.value}},ca:function(b,d,c){switch(a.a.t(b)){case "option":switch(typeof d){case "string":a.a.e.set(b,a.d.options.Va,p);"__ko__hasDomDataOptionValue__"in
b&&delete b.__ko__hasDomDataOptionValue__;b.value=d;break;default:a.a.e.set(b,a.d.options.Va,d),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof d?d:""}break;case "select":if(""===d||null===d)d=p;for(var e=-1,g=0,h=b.options.length,k;g<h;++g)if(k=a.i.q(b.options[g]),k==d||""==k&&d===p){e=g;break}if(c||0<=e||d===p&&1<b.size)b.selectedIndex=e;break;default:if(null===d||d===p)d="";b.value=d}}}})();a.b("selectExtensions",a.i);a.b("selectExtensions.readValue",a.i.q);a.b("selectExtensions.writeValue",
a.i.ca);a.h=function(){function b(b){b=a.a.cb(b);123===b.charCodeAt(0)&&(b=b.slice(1,-1));var c=[],d=b.match(e),k,n,t=0;if(d){d.push(",");for(var z=0,u;u=d[z];++z){var r=u.charCodeAt(0);if(44===r){if(0>=t){k&&c.push(n?{key:k,value:n.join("")}:{unknown:k});k=n=t=0;continue}}else if(58===r){if(!n)continue}else if(47===r&&z&&1<u.length)(r=d[z-1].match(g))&&!h[r[0]]&&(b=b.substr(b.indexOf(u)+1),d=b.match(e),d.push(","),z=-1,u="/");else if(40===r||123===r||91===r)++t;else if(41===r||125===r||93===r)--t;
else if(!k&&!n){k=34===r||39===r?u.slice(1,-1):u;continue}n?n.push(u):n=[u]}}return c}var d=["true","false","null","undefined"],c=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,e=RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|[^\\s]","g"),g=/[\])"'A-Za-z0-9_$]+$/,h={"in":1,"return":1,"typeof":1},k={};return{ha:[],V:k,Wa:b,ya:function(f,m){function e(b,m){var f;if(!z){var u=a.getBindingHandler(b);if(u&&u.preprocess&&
!(m=u.preprocess(m,b,e)))return;if(u=k[b])f=m,0<=a.a.m(d,f)?f=!1:(u=f.match(c),f=null===u?!1:u[1]?"Object("+u[1]+")"+u[2]:f),u=f;u&&h.push("'"+b+"':function(_z){"+f+"=_z}")}t&&(m="function(){return "+m+" }");g.push("'"+b+"':"+m)}m=m||{};var g=[],h=[],t=m.valueAccessors,z=m.bindingParams,u="string"===typeof f?b(f):f;a.a.u(u,function(a){e(a.key||a.unknown,a.value)});h.length&&e("_ko_property_writers","{"+h.join(",")+" }");return g.join(",")},lc:function(a,b){for(var c=0;c<a.length;c++)if(a[c].key==
b)return!0;return!1},pa:function(b,c,d,e,k){if(b&&a.C(b))!a.Ra(b)||k&&b.v()===e||b(e);else if((b=c.get("_ko_property_writers"))&&b[d])b[d](e)}}}();a.b("expressionRewriting",a.h);a.b("expressionRewriting.bindingRewriteValidators",a.h.ha);a.b("expressionRewriting.parseObjectLiteral",a.h.Wa);a.b("expressionRewriting.preProcessBindings",a.h.ya);a.b("expressionRewriting._twoWayBindings",a.h.V);a.b("jsonExpressionRewriting",a.h);a.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",a.h.ya);(function(){function b(a){return 8==
a.nodeType&&h.test(g?a.text:a.nodeValue)}function d(a){return 8==a.nodeType&&k.test(g?a.text:a.nodeValue)}function c(a,c){for(var f=a,e=1,k=[];f=f.nextSibling;){if(d(f)&&(e--,0===e))return k;k.push(f);b(f)&&e++}if(!c)throw Error("Cannot find closing comment tag to match: "+a.nodeValue);return null}function e(a,b){var d=c(a,b);return d?0<d.length?d[d.length-1].nextSibling:a.nextSibling:null}var g=v&&"\x3c!--test--\x3e"===v.createComment("test").text,h=g?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,
k=g?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,f={ul:!0,ol:!0};a.f={Q:{},childNodes:function(a){return b(a)?c(a):a.childNodes},ja:function(c){if(b(c)){c=a.f.childNodes(c);for(var d=0,f=c.length;d<f;d++)a.removeNode(c[d])}else a.a.Ka(c)},T:function(c,d){if(b(c)){a.f.ja(c);for(var f=c.nextSibling,e=0,k=d.length;e<k;e++)f.parentNode.insertBefore(d[e],f)}else a.a.T(c,d)},Hb:function(a,c){b(a)?a.parentNode.insertBefore(c,a.nextSibling):a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)},Bb:function(c,
d,f){f?b(c)?c.parentNode.insertBefore(d,f.nextSibling):f.nextSibling?c.insertBefore(d,f.nextSibling):c.appendChild(d):a.f.Hb(c,d)},firstChild:function(a){return b(a)?!a.nextSibling||d(a.nextSibling)?null:a.nextSibling:a.firstChild},nextSibling:function(a){b(a)&&(a=e(a));return a.nextSibling&&d(a.nextSibling)?null:a.nextSibling},gc:b,xc:function(a){return(a=(g?a.text:a.nodeValue).match(h))?a[1]:null},Fb:function(c){if(f[a.a.t(c)]){var k=c.firstChild;if(k){do if(1===k.nodeType){var g;g=k.firstChild;
var h=null;if(g){do if(h)h.push(g);else if(b(g)){var t=e(g,!0);t?g=t:h=[g]}else d(g)&&(h=[g]);while(g=g.nextSibling)}if(g=h)for(h=k.nextSibling,t=0;t<g.length;t++)h?c.insertBefore(g[t],h):c.appendChild(g[t])}while(k=k.nextSibling)}}}}})();a.b("virtualElements",a.f);a.b("virtualElements.allowedBindings",a.f.Q);a.b("virtualElements.emptyNode",a.f.ja);a.b("virtualElements.insertAfter",a.f.Bb);a.b("virtualElements.prepend",a.f.Hb);a.b("virtualElements.setDomNodeChildren",a.f.T);(function(){a.J=function(){this.Yb=
{}};a.a.extend(a.J.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return null!=b.getAttribute("data-bind")||a.g.getComponentNameForNode(b);case 8:return a.f.gc(b);default:return!1}},getBindings:function(b,d){var c=this.getBindingsString(b,d),c=c?this.parseBindingsString(c,d,b):null;return a.g.mb(c,b,d,!1)},getBindingAccessors:function(b,d){var c=this.getBindingsString(b,d),c=c?this.parseBindingsString(c,d,b,{valueAccessors:!0}):null;return a.g.mb(c,b,d,!0)},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind");
case 8:return a.f.xc(b);default:return null}},parseBindingsString:function(b,d,c,e){try{var g=this.Yb,h=b+(e&&e.valueAccessors||""),k;if(!(k=g[h])){var f,m="with($context){with($data||{}){return{"+a.h.ya(b,e)+"}}}";f=new Function("$context","$element",m);k=g[h]=f}return k(d,c)}catch(l){throw l.message="Unable to parse bindings.\nBindings value: "+b+"\nMessage: "+l.message,l;}}});a.J.instance=new a.J})();a.b("bindingProvider",a.J);(function(){function b(a){return function(){return a}}function d(a){return a()}
function c(b){return a.a.na(a.k.B(b),function(a,c){return function(){return b()[c]}})}function e(a,b){return c(this.getBindings.bind(this,a,b))}function g(b,c,d){var f,e=a.f.firstChild(c),k=a.J.instance,g=k.preprocessNode;if(g){for(;f=e;)e=a.f.nextSibling(f),g.call(k,f);e=a.f.firstChild(c)}for(;f=e;)e=a.f.nextSibling(f),h(b,f,d)}function h(b,c,d){var e=!0,k=1===c.nodeType;k&&a.f.Fb(c);if(k&&d||a.J.instance.nodeHasBindings(c))e=f(c,null,b,d).shouldBindDescendants;e&&!l[a.a.t(c)]&&g(b,c,!k)}function k(b){var c=
[],d={},f=[];a.a.G(b,function y(e){if(!d[e]){var k=a.getBindingHandler(e);k&&(k.after&&(f.push(e),a.a.u(k.after,function(c){if(b[c]){if(-1!==a.a.m(f,c))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+f.join(", "));y(c)}}),f.length--),c.push({key:e,zb:k}));d[e]=!0}});return c}function f(b,c,f,g){var m=a.a.e.get(b,q);if(!c){if(m)throw Error("You cannot apply bindings multiple times to the same element.");a.a.e.set(b,q,!0)}!m&&g&&a.Ob(b,f);var l;if(c&&"function"!==
typeof c)l=c;else{var h=a.J.instance,n=h.getBindingAccessors||e,s=a.j(function(){(l=c?c(f,b):n.call(h,b,f))&&f.I&&f.I();return l},null,{o:b});l&&s.Z()||(s=null)}var v;if(l){var w=s?function(a){return function(){return d(s()[a])}}:function(a){return l[a]},A=function(){return a.a.na(s?s():l,d)};A.get=function(a){return l[a]&&d(w(a))};A.has=function(a){return a in l};g=k(l);a.a.u(g,function(c){var d=c.zb.init,e=c.zb.update,k=c.key;if(8===b.nodeType&&!a.f.Q[k])throw Error("The binding '"+k+"' cannot be used with virtual elements");
try{"function"==typeof d&&a.k.B(function(){var a=d(b,w(k),A,f.$data,f);if(a&&a.controlsDescendantBindings){if(v!==p)throw Error("Multiple bindings ("+v+" and "+k+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");v=k}}),"function"==typeof e&&a.j(function(){e(b,w(k),A,f.$data,f)},null,{o:b})}catch(g){throw g.message='Unable to process binding "'+k+": "+l[k]+'"\nMessage: '+g.message,g;}})}return{shouldBindDescendants:v===p}}
function m(b){return b&&b instanceof a.N?b:new a.N(b)}a.d={};var l={script:!0};a.getBindingHandler=function(b){return a.d[b]};a.N=function(b,c,d,f){var e=this,k="function"==typeof b&&!a.C(b),g,m=a.j(function(){var g=k?b():b,l=a.a.c(g);c?(c.I&&c.I(),a.a.extend(e,c),m&&(e.I=m)):(e.$parents=[],e.$root=l,e.ko=a);e.$rawData=g;e.$data=l;d&&(e[d]=l);f&&f(e,c,l);return e.$data},null,{Ia:function(){return g&&!a.a.ob(g)},o:!0});m.Z()&&(e.I=m,m.equalityComparer=null,g=[],m.Tb=function(b){g.push(b);a.a.w.da(b,
function(b){a.a.ua(g,b);g.length||(m.K(),e.I=m=p)})})};a.N.prototype.createChildContext=function(b,c,d){return new a.N(b,this,c,function(a,b){a.$parentContext=b;a.$parent=b.$data;a.$parents=(b.$parents||[]).slice(0);a.$parents.unshift(a.$parent);d&&d(a)})};a.N.prototype.extend=function(b){return new a.N(this.I||this.$data,this,null,function(c,d){c.$rawData=d.$rawData;a.a.extend(c,"function"==typeof b?b():b)})};var q=a.a.e.F(),n=a.a.e.F();a.Ob=function(b,c){if(2==arguments.length)a.a.e.set(b,n,c),
c.I&&c.I.Tb(b);else return a.a.e.get(b,n)};a.ra=function(b,c,d){1===b.nodeType&&a.f.Fb(b);return f(b,c,m(d),!0)};a.Wb=function(d,f,e){e=m(e);return a.ra(d,"function"===typeof f?c(f.bind(null,e,d)):a.a.na(f,b),e)};a.Ca=function(a,b){1!==b.nodeType&&8!==b.nodeType||g(m(a),b,!0)};a.pb=function(a,b){!w&&s.jQuery&&(w=s.jQuery);if(b&&1!==b.nodeType&&8!==b.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");b=b||s.document.body;h(m(a),
b,!0)};a.Ha=function(b){switch(b.nodeType){case 1:case 8:var c=a.Ob(b);if(c)return c;if(b.parentNode)return a.Ha(b.parentNode)}return p};a.$b=function(b){return(b=a.Ha(b))?b.$data:p};a.b("bindingHandlers",a.d);a.b("applyBindings",a.pb);a.b("applyBindingsToDescendants",a.Ca);a.b("applyBindingAccessorsToNode",a.ra);a.b("applyBindingsToNode",a.Wb);a.b("contextFor",a.Ha);a.b("dataFor",a.$b)})();(function(b){function d(d,f){var e=g.hasOwnProperty(d)?g[d]:b,l;e||(e=g[d]=new a.P,c(d,function(a){h[d]=a;delete g[d];
l?e.notifySubscribers(a):setTimeout(function(){e.notifySubscribers(a)},0)}),l=!0);e.U(f)}function c(a,b){e("getConfig",[a],function(c){c?e("loadComponent",[a,c],function(a){b(a)}):b(null)})}function e(c,d,g,l){l||(l=a.g.loaders.slice(0));var h=l.shift();if(h){var n=h[c];if(n){var t=!1;if(n.apply(h,d.concat(function(a){t?g(null):null!==a?g(a):e(c,d,g,l)}))!==b&&(t=!0,!h.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");
}else e(c,d,g,l)}else g(null)}var g={},h={};a.g={get:function(a,c){var e=h.hasOwnProperty(a)?h[a]:b;e?setTimeout(function(){c(e)},0):d(a,c)},tb:function(a){delete h[a]},jb:e};a.g.loaders=[];a.b("components",a.g);a.b("components.get",a.g.get);a.b("components.clearCachedDefinition",a.g.tb)})();(function(){function b(b,c,d,e){function k(){0===--u&&e(h)}var h={},u=2,r=d.template;d=d.viewModel;r?g(c,r,function(c){a.g.jb("loadTemplate",[b,c],function(a){h.template=a;k()})}):k();d?g(c,d,function(c){a.g.jb("loadViewModel",
[b,c],function(a){h[f]=a;k()})}):k()}function d(a,b,c){if("function"===typeof b)c(function(a){return new b(a)});else if("function"===typeof b[f])c(b[f]);else if("instance"in b){var e=b.instance;c(function(){return e})}else"viewModel"in b?d(a,b.viewModel,c):a("Unknown viewModel value: "+b)}function c(b){switch(a.a.t(b)){case "script":return a.a.ba(b.text);case "textarea":return a.a.ba(b.value);case "template":if(e(b.content))return a.a.ia(b.content.childNodes)}return a.a.ia(b.childNodes)}function e(a){return s.DocumentFragment?
a instanceof DocumentFragment:a&&11===a.nodeType}function g(a,b,c){"string"===typeof b.require?N||s.require?(N||s.require)([b.require],c):a("Uses require, but no AMD loader is present"):c(b)}function h(a){return function(b){throw Error("Component '"+a+"': "+b);}}var k={};a.g.tc=function(b,c){if(!c)throw Error("Invalid configuration for "+b);if(a.g.Qa(b))throw Error("Component "+b+" is already registered");k[b]=c};a.g.Qa=function(a){return a in k};a.g.wc=function(b){delete k[b];a.g.tb(b)};a.g.ub={getConfig:function(a,
b){b(k.hasOwnProperty(a)?k[a]:null)},loadComponent:function(a,c,d){var e=h(a);g(e,c,function(c){b(a,e,c,d)})},loadTemplate:function(b,d,f){b=h(b);if("string"===typeof d)f(a.a.ba(d));else if(d instanceof Array)f(d);else if(e(d))f(a.a.S(d.childNodes));else if(d.element)if(d=d.element,s.HTMLElement?d instanceof HTMLElement:d&&d.tagName&&1===d.nodeType)f(c(d));else if("string"===typeof d){var k=v.getElementById(d);k?f(c(k)):b("Cannot find element with ID "+d)}else b("Unknown element type: "+d);else b("Unknown template value: "+
d)},loadViewModel:function(a,b,c){d(h(a),b,c)}};var f="createViewModel";a.b("components.register",a.g.tc);a.b("components.isRegistered",a.g.Qa);a.b("components.unregister",a.g.wc);a.b("components.defaultLoader",a.g.ub);a.g.loaders.push(a.g.ub);a.g.Ub=k})();(function(){function b(b,e){var g=b.getAttribute("params");if(g){var g=d.parseBindingsString(g,e,b,{valueAccessors:!0,bindingParams:!0}),g=a.a.na(g,function(d){return a.s(d,null,{o:b})}),h=a.a.na(g,function(d){return d.Z()?a.s(function(){return a.a.c(d())},
null,{o:b}):d.v()});h.hasOwnProperty("$raw")||(h.$raw=g);return h}return{$raw:{}}}a.g.getComponentNameForNode=function(b){b=a.a.t(b);return a.g.Qa(b)&&b};a.g.mb=function(c,d,g,h){if(1===d.nodeType){var k=a.g.getComponentNameForNode(d);if(k){c=c||{};if(c.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var f={name:k,params:b(d,g)};c.component=h?function(){return f}:f}}return c};var d=new a.J;9>a.a.L&&(a.g.register=function(a){return function(b){v.createElement(b);
return a.apply(this,arguments)}}(a.g.register),v.createDocumentFragment=function(b){return function(){var d=b(),g=a.g.Ub,h;for(h in g)g.hasOwnProperty(h)&&d.createElement(h);return d}}(v.createDocumentFragment))})();(function(){var b=0;a.d.component={init:function(d,c,e,g,h){function k(){var a=f&&f.dispose;"function"===typeof a&&a.call(f);m=null}var f,m;a.a.w.da(d,k);a.s(function(){var e=a.a.c(c()),g,n;"string"===typeof e?g=e:(g=a.a.c(e.name),n=a.a.c(e.params));if(!g)throw Error("No component name specified");
var t=m=++b;a.g.get(g,function(b){if(m===t){k();if(!b)throw Error("Unknown component '"+g+"'");var c=b.template;if(!c)throw Error("Component '"+g+"' has no template");c=a.a.ia(c);a.f.T(d,c);var c=n,e=b.createViewModel;b=e?e.call(b,c,{element:d}):c;c=h.createChildContext(b);f=b;a.Ca(c,d)}})},null,{o:d});return{controlsDescendantBindings:!0}}};a.f.Q.component=!0})();var Q={"class":"className","for":"htmlFor"};a.d.attr={update:function(b,d){var c=a.a.c(d())||{};a.a.G(c,function(c,d){d=a.a.c(d);var h=
!1===d||null===d||d===p;h&&b.removeAttribute(c);8>=a.a.L&&c in Q?(c=Q[c],h?b.removeAttribute(c):b[c]=d):h||b.setAttribute(c,d.toString());"name"===c&&a.a.Mb(b,h?"":d.toString())})}};(function(){a.d.checked={after:["value","attr"],init:function(b,d,c){function e(){var e=b.checked,k=q?h():e;if(!a.Y.ma()&&(!f||e)){var g=a.k.B(d);m?l!==k?(e&&(a.a.ea(g,k,!0),a.a.ea(g,l,!1)),l=k):a.a.ea(g,k,e):a.h.pa(g,c,"checked",k,!0)}}function g(){var c=a.a.c(d());b.checked=m?0<=a.a.m(c,h()):k?c:h()===c}var h=a.Ib(function(){return c.has("checkedValue")?
a.a.c(c.get("checkedValue")):c.has("value")?a.a.c(c.get("value")):b.value}),k="checkbox"==b.type,f="radio"==b.type;if(k||f){var m=k&&a.a.c(d())instanceof Array,l=m?h():p,q=f||m;f&&!b.name&&a.d.uniqueName.init(b,function(){return!0});a.s(e,null,{o:b});a.a.n(b,"click",e);a.s(g,null,{o:b})}}};a.h.V.checked=!0;a.d.checkedValue={update:function(b,d){b.value=a.a.c(d())}}})();a.d.css={update:function(b,d){var c=a.a.c(d());"object"==typeof c?a.a.G(c,function(c,d){d=a.a.c(d);a.a.Ba(b,c,d)}):(c=String(c||""),
a.a.Ba(b,b.__ko__cssValue,!1),b.__ko__cssValue=c,a.a.Ba(b,c,!0))}};a.d.enable={update:function(b,d){var c=a.a.c(d());c&&b.disabled?b.removeAttribute("disabled"):c||b.disabled||(b.disabled=!0)}};a.d.disable={update:function(b,d){a.d.enable.update(b,function(){return!a.a.c(d())})}};a.d.event={init:function(b,d,c,e,g){var h=d()||{};a.a.G(h,function(k){"string"==typeof k&&a.a.n(b,k,function(b){var h,l=d()[k];if(l){try{var q=a.a.S(arguments);e=g.$data;q.unshift(e);h=l.apply(e,q)}finally{!0!==h&&(b.preventDefault?
b.preventDefault():b.returnValue=!1)}!1===c.get(k+"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.d.foreach={Eb:function(b){return function(){var d=b(),c=a.a.Xa(d);if(!c||"number"==typeof c.length)return{foreach:d,templateEngine:a.O.Oa};a.a.c(d);return{foreach:c.data,as:c.as,includeDestroyed:c.includeDestroyed,afterAdd:c.afterAdd,beforeRemove:c.beforeRemove,afterRender:c.afterRender,beforeMove:c.beforeMove,afterMove:c.afterMove,templateEngine:a.O.Oa}}},init:function(b,
d){return a.d.template.init(b,a.d.foreach.Eb(d))},update:function(b,d,c,e,g){return a.d.template.update(b,a.d.foreach.Eb(d),c,e,g)}};a.h.ha.foreach=!1;a.f.Q.foreach=!0;a.d.hasfocus={init:function(b,d,c){function e(e){b.__ko_hasfocusUpdating=!0;var f=b.ownerDocument;if("activeElement"in f){var g;try{g=f.activeElement}catch(h){g=f.body}e=g===b}f=d();a.h.pa(f,c,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var g=e.bind(null,!0),h=e.bind(null,!1);a.a.n(b,"focus",g);a.a.n(b,"focusin",
g);a.a.n(b,"blur",h);a.a.n(b,"focusout",h)},update:function(b,d){var c=!!a.a.c(d());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===c||(c?b.focus():b.blur(),a.k.B(a.a.oa,null,[b,c?"focusin":"focusout"]))}};a.h.V.hasfocus=!0;a.d.hasFocus=a.d.hasfocus;a.h.V.hasFocus=!0;a.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,d){a.a.$a(b,d())}};I("if");I("ifnot",!1,!0);I("with",!0,!1,function(a,d){return a.createChildContext(d)});var K={};a.d.options={init:function(b){if("select"!==
a.a.t(b))throw Error("options binding applies only to SELECT elements");for(;0<b.length;)b.remove(0);return{controlsDescendantBindings:!0}},update:function(b,d,c){function e(){return a.a.ta(b.options,function(a){return a.selected})}function g(a,b,c){var d=typeof b;return"function"==d?b(a):"string"==d?a[b]:c}function h(c,d){if(q.length){var e=0<=a.a.m(q,a.i.q(d[0]));a.a.Nb(d[0],e);n&&!e&&a.k.B(a.a.oa,null,[b,"change"])}}var k=0!=b.length&&b.multiple?b.scrollTop:null,f=a.a.c(d()),m=c.get("optionsIncludeDestroyed");
d={};var l,q;q=b.multiple?a.a.Da(e(),a.i.q):0<=b.selectedIndex?[a.i.q(b.options[b.selectedIndex])]:[];f&&("undefined"==typeof f.length&&(f=[f]),l=a.a.ta(f,function(b){return m||b===p||null===b||!a.a.c(b._destroy)}),c.has("optionsCaption")&&(f=a.a.c(c.get("optionsCaption")),null!==f&&f!==p&&l.unshift(K)));var n=!1;d.beforeRemove=function(a){b.removeChild(a)};f=h;c.has("optionsAfterRender")&&(f=function(b,d){h(0,d);a.k.B(c.get("optionsAfterRender"),null,[d[0],b!==K?b:p])});a.a.Za(b,l,function(d,e,f){f.length&&
(q=f[0].selected?[a.i.q(f[0])]:[],n=!0);e=b.ownerDocument.createElement("option");d===K?(a.a.bb(e,c.get("optionsCaption")),a.i.ca(e,p)):(f=g(d,c.get("optionsValue"),d),a.i.ca(e,a.a.c(f)),d=g(d,c.get("optionsText"),f),a.a.bb(e,d));return[e]},d,f);a.k.B(function(){c.get("valueAllowUnset")&&c.has("value")?a.i.ca(b,a.a.c(c.get("value")),!0):(b.multiple?q.length&&e().length<q.length:q.length&&0<=b.selectedIndex?a.i.q(b.options[b.selectedIndex])!==q[0]:q.length||0<=b.selectedIndex)&&a.a.oa(b,"change")});
a.a.dc(b);k&&20<Math.abs(k-b.scrollTop)&&(b.scrollTop=k)}};a.d.options.Va=a.a.e.F();a.d.selectedOptions={after:["options","foreach"],init:function(b,d,c){a.a.n(b,"change",function(){var e=d(),g=[];a.a.u(b.getElementsByTagName("option"),function(b){b.selected&&g.push(a.i.q(b))});a.h.pa(e,c,"selectedOptions",g)})},update:function(b,d){if("select"!=a.a.t(b))throw Error("values binding applies only to SELECT elements");var c=a.a.c(d());c&&"number"==typeof c.length&&a.a.u(b.getElementsByTagName("option"),
function(b){var d=0<=a.a.m(c,a.i.q(b));a.a.Nb(b,d)})}};a.h.V.selectedOptions=!0;a.d.style={update:function(b,d){var c=a.a.c(d()||{});a.a.G(c,function(c,d){d=a.a.c(d);if(null===d||d===p||!1===d)d="";b.style[c]=d})}};a.d.submit={init:function(b,d,c,e,g){if("function"!=typeof d())throw Error("The value for a submit binding must be a function");a.a.n(b,"submit",function(a){var c,e=d();try{c=e.call(g.$data,b)}finally{!0!==c&&(a.preventDefault?a.preventDefault():a.returnValue=!1)}})}};a.d.text={init:function(){return{controlsDescendantBindings:!0}},
update:function(b,d){a.a.bb(b,d())}};a.f.Q.text=!0;(function(){if(s&&s.navigator)var b=function(a){if(a)return parseFloat(a[1])},d=s.opera&&s.opera.version&&parseInt(s.opera.version()),c=s.navigator.userAgent,e=b(c.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),g=b(c.match(/Firefox\/([^ ]*)/));if(10>a.a.L)var h=a.a.e.F(),k=a.a.e.F(),f=function(b){var c=this.activeElement;(c=c&&a.a.e.get(c,k))&&c(b)},m=function(b,c){var d=b.ownerDocument;a.a.e.get(d,h)||(a.a.e.set(d,h,!0),a.a.n(d,"selectionchange",
f));a.a.e.set(b,k,c)};a.d.textInput={init:function(b,c,f){function k(c,d){a.a.n(b,c,d)}function h(){var d=a.a.c(c());if(null===d||d===p)d="";v!==p&&d===v?setTimeout(h,4):b.value!==d&&(s=d,b.value=d)}function u(){y||(v=b.value,y=setTimeout(r,4))}function r(){clearTimeout(y);v=y=p;var d=b.value;s!==d&&(s=d,a.h.pa(c(),f,"textInput",d))}var s=b.value,y,v;10>a.a.L?(k("propertychange",function(a){"value"===a.propertyName&&r()}),8==a.a.L&&(k("keyup",r),k("keydown",r)),8<=a.a.L&&(m(b,r),k("dragend",u))):
(k("input",r),5>e&&"textarea"===a.a.t(b)?(k("keydown",u),k("paste",u),k("cut",u)):11>d?k("keydown",u):4>g&&(k("DOMAutoComplete",r),k("dragdrop",r),k("drop",r)));k("change",r);a.s(h,null,{o:b})}};a.h.V.textInput=!0;a.d.textinput={preprocess:function(a,b,c){c("textInput",a)}}})();a.d.uniqueName={init:function(b,d){if(d()){var c="ko_unique_"+ ++a.d.uniqueName.Zb;a.a.Mb(b,c)}}};a.d.uniqueName.Zb=0;a.d.value={after:["options","foreach"],init:function(b,d,c){if("input"!=b.tagName.toLowerCase()||"checkbox"!=
b.type&&"radio"!=b.type){var e=["change"],g=c.get("valueUpdate"),h=!1,k=null;g&&("string"==typeof g&&(g=[g]),a.a.ga(e,g),e=a.a.rb(e));var f=function(){k=null;h=!1;var e=d(),f=a.i.q(b);a.h.pa(e,c,"value",f)};!a.a.L||"input"!=b.tagName.toLowerCase()||"text"!=b.type||"off"==b.autocomplete||b.form&&"off"==b.form.autocomplete||-1!=a.a.m(e,"propertychange")||(a.a.n(b,"propertychange",function(){h=!0}),a.a.n(b,"focus",function(){h=!1}),a.a.n(b,"blur",function(){h&&f()}));a.a.u(e,function(c){var d=f;a.a.vc(c,
"after")&&(d=function(){k=a.i.q(b);setTimeout(f,0)},c=c.substring(5));a.a.n(b,c,d)});var m=function(){var e=a.a.c(d()),f=a.i.q(b);if(null!==k&&e===k)setTimeout(m,0);else if(e!==f)if("select"===a.a.t(b)){var g=c.get("valueAllowUnset"),f=function(){a.i.ca(b,e,g)};f();g||e===a.i.q(b)?setTimeout(f,0):a.k.B(a.a.oa,null,[b,"change"])}else a.i.ca(b,e)};a.s(m,null,{o:b})}else a.ra(b,{checkedValue:d})},update:function(){}};a.h.V.value=!0;a.d.visible={update:function(b,d){var c=a.a.c(d()),e="none"!=b.style.display;
c&&!e?b.style.display="":!c&&e&&(b.style.display="none")}};(function(b){a.d[b]={init:function(d,c,e,g,h){return a.d.event.init.call(this,d,function(){var a={};a[b]=c();return a},e,g,h)}}})("click");a.H=function(){};a.H.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");};a.H.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");};a.H.prototype.makeTemplateSource=function(b,d){if("string"==typeof b){d=d||v;var c=
d.getElementById(b);if(!c)throw Error("Cannot find template with ID "+b);return new a.r.l(c)}if(1==b.nodeType||8==b.nodeType)return new a.r.fa(b);throw Error("Unknown template type: "+b);};a.H.prototype.renderTemplate=function(a,d,c,e){a=this.makeTemplateSource(a,e);return this.renderTemplateSource(a,d,c)};a.H.prototype.isTemplateRewritten=function(a,d){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a,d).data("isRewritten")};a.H.prototype.rewriteTemplate=function(a,d,c){a=this.makeTemplateSource(a,
c);d=d(a.text());a.text(d);a.data("isRewritten",!0)};a.b("templateEngine",a.H);a.fb=function(){function b(b,c,d,k){b=a.h.Wa(b);for(var f=a.h.ha,m=0;m<b.length;m++){var l=b[m].key;if(f.hasOwnProperty(l)){var q=f[l];if("function"===typeof q){if(l=q(b[m].value))throw Error(l);}else if(!q)throw Error("This template engine does not support the '"+l+"' binding within its templates");}}d="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+a.h.ya(b,{valueAccessors:!0})+" } })()},'"+d.toLowerCase()+
"')";return k.createJavaScriptEvaluatorBlock(d)+c}var d=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,c=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{ec:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.fb.nc(b,c)},d)},nc:function(a,g){return a.replace(d,function(a,c,d,e,l){return b(l,c,d,g)}).replace(c,function(a,c){return b(c,"\x3c!-- ko --\x3e","#comment",g)})},Xb:function(b,c){return a.D.Ua(function(d,
k){var f=d.nextSibling;f&&f.nodeName.toLowerCase()===c&&a.ra(f,b,k)})}}}();a.b("__tr_ambtns",a.fb.Xb);(function(){a.r={};a.r.l=function(a){this.l=a};a.r.l.prototype.text=function(){var b=a.a.t(this.l),b="script"===b?"text":"textarea"===b?"value":"innerHTML";if(0==arguments.length)return this.l[b];var d=arguments[0];"innerHTML"===b?a.a.$a(this.l,d):this.l[b]=d};var b=a.a.e.F()+"_";a.r.l.prototype.data=function(c){if(1===arguments.length)return a.a.e.get(this.l,b+c);a.a.e.set(this.l,b+c,arguments[1])};
var d=a.a.e.F();a.r.fa=function(a){this.l=a};a.r.fa.prototype=new a.r.l;a.r.fa.prototype.text=function(){if(0==arguments.length){var b=a.a.e.get(this.l,d)||{};b.gb===p&&b.Ga&&(b.gb=b.Ga.innerHTML);return b.gb}a.a.e.set(this.l,d,{gb:arguments[0]})};a.r.l.prototype.nodes=function(){if(0==arguments.length)return(a.a.e.get(this.l,d)||{}).Ga;a.a.e.set(this.l,d,{Ga:arguments[0]})};a.b("templateSources",a.r);a.b("templateSources.domElement",a.r.l);a.b("templateSources.anonymousTemplate",a.r.fa)})();(function(){function b(b,
c,d){var e;for(c=a.f.nextSibling(c);b&&(e=b)!==c;)b=a.f.nextSibling(e),d(e,b)}function d(c,d){if(c.length){var e=c[0],g=c[c.length-1],h=e.parentNode,n=a.J.instance,t=n.preprocessNode;if(t){b(e,g,function(a,b){var c=a.previousSibling,d=t.call(n,a);d&&(a===e&&(e=d[0]||b),a===g&&(g=d[d.length-1]||c))});c.length=0;if(!e)return;e===g?c.push(e):(c.push(e,g),a.a.ka(c,h))}b(e,g,function(b){1!==b.nodeType&&8!==b.nodeType||a.pb(d,b)});b(e,g,function(b){1!==b.nodeType&&8!==b.nodeType||a.D.Sb(b,[d])});a.a.ka(c,
h)}}function c(a){return a.nodeType?a:0<a.length?a[0]:null}function e(b,e,h,l,q){q=q||{};var n=b&&c(b),n=n&&n.ownerDocument,t=q.templateEngine||g;a.fb.ec(h,t,n);h=t.renderTemplate(h,l,q,n);if("number"!=typeof h.length||0<h.length&&"number"!=typeof h[0].nodeType)throw Error("Template engine must return an array of DOM nodes");n=!1;switch(e){case "replaceChildren":a.f.T(b,h);n=!0;break;case "replaceNode":a.a.Lb(b,h);n=!0;break;case "ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+
e);}n&&(d(h,l),q.afterRender&&a.k.B(q.afterRender,null,[h,l.$data]));return h}var g;a.ab=function(b){if(b!=p&&!(b instanceof a.H))throw Error("templateEngine must inherit from ko.templateEngine");g=b};a.Ya=function(b,d,h,l,q){h=h||{};if((h.templateEngine||g)==p)throw Error("Set a template engine before calling renderTemplate");q=q||"replaceChildren";if(l){var n=c(l);return a.j(function(){var g=d&&d instanceof a.N?d:new a.N(a.a.c(d)),p=a.C(b)?b():"function"===typeof b?b(g.$data,g):b,g=e(l,q,p,g,h);
"replaceNode"==q&&(l=g,n=c(l))},null,{Ia:function(){return!n||!a.a.Ja(n)},o:n&&"replaceNode"==q?n.parentNode:n})}return a.D.Ua(function(c){a.Ya(b,d,h,c,"replaceNode")})};a.uc=function(b,c,g,h,q){function n(a,b){d(b,s);g.afterRender&&g.afterRender(b,a)}function t(c,d){s=q.createChildContext(c,g.as,function(a){a.$index=d});var f=a.C(b)?b():"function"===typeof b?b(c,s):b;return e(null,"ignoreTargetNode",f,s,g)}var s;return a.j(function(){var b=a.a.c(c)||[];"undefined"==typeof b.length&&(b=[b]);b=a.a.ta(b,
function(b){return g.includeDestroyed||b===p||null===b||!a.a.c(b._destroy)});a.k.B(a.a.Za,null,[h,b,t,g,n])},null,{o:h})};var h=a.a.e.F();a.d.template={init:function(b,c){var d=a.a.c(c());"string"==typeof d||d.name?a.f.ja(b):(d=a.f.childNodes(b),d=a.a.oc(d),(new a.r.fa(b)).nodes(d));return{controlsDescendantBindings:!0}},update:function(b,c,d,e,g){var n=c(),t;c=a.a.c(n);d=!0;e=null;"string"==typeof c?c={}:(n=c.name,"if"in c&&(d=a.a.c(c["if"])),d&&"ifnot"in c&&(d=!a.a.c(c.ifnot)),t=a.a.c(c.data));
"foreach"in c?e=a.uc(n||b,d&&c.foreach||[],c,b,g):d?(g="data"in c?g.createChildContext(t,c.as):g,e=a.Ya(n||b,g,c,b)):a.f.ja(b);g=e;(t=a.a.e.get(b,h))&&"function"==typeof t.K&&t.K();a.a.e.set(b,h,g&&g.Z()?g:p)}};a.h.ha.template=function(b){b=a.h.Wa(b);return 1==b.length&&b[0].unknown||a.h.lc(b,"name")?null:"This template engine does not support anonymous templates nested within its templates"};a.f.Q.template=!0})();a.b("setTemplateEngine",a.ab);a.b("renderTemplate",a.Ya);a.a.wb=function(a,d,c){if(a.length&&
d.length){var e,g,h,k,f;for(e=g=0;(!c||e<c)&&(k=a[g]);++g){for(h=0;f=d[h];++h)if(k.value===f.value){k.moved=f.index;f.moved=k.index;d.splice(h,1);e=h=0;break}e+=h}}};a.a.Fa=function(){function b(b,c,e,g,h){var k=Math.min,f=Math.max,m=[],l,q=b.length,n,p=c.length,s=p-q||1,u=q+p+1,r,v,w;for(l=0;l<=q;l++)for(v=r,m.push(r=[]),w=k(p,l+s),n=f(0,l-1);n<=w;n++)r[n]=n?l?b[l-1]===c[n-1]?v[n-1]:k(v[n]||u,r[n-1]||u)+1:n+1:l+1;k=[];f=[];s=[];l=q;for(n=p;l||n;)p=m[l][n]-1,n&&p===m[l][n-1]?f.push(k[k.length]={status:e,
value:c[--n],index:n}):l&&p===m[l-1][n]?s.push(k[k.length]={status:g,value:b[--l],index:l}):(--n,--l,h.sparse||k.push({status:"retained",value:c[n]}));a.a.wb(f,s,10*q);return k.reverse()}return function(a,c,e){e="boolean"===typeof e?{dontLimitMoves:e}:e||{};a=a||[];c=c||[];return a.length<=c.length?b(a,c,"added","deleted",e):b(c,a,"deleted","added",e)}}();a.b("utils.compareArrays",a.a.Fa);(function(){function b(b,d,g,h,k){var f=[],m=a.j(function(){var l=d(g,k,a.a.ka(f,b))||[];0<f.length&&(a.a.Lb(f,
l),h&&a.k.B(h,null,[g,l,k]));f.length=0;a.a.ga(f,l)},null,{o:b,Ia:function(){return!a.a.ob(f)}});return{$:f,j:m.Z()?m:p}}var d=a.a.e.F();a.a.Za=function(c,e,g,h,k){function f(b,d){x=q[d];r!==d&&(A[b]=x);x.Na(r++);a.a.ka(x.$,c);s.push(x);w.push(x)}function m(b,c){if(b)for(var d=0,e=c.length;d<e;d++)c[d]&&a.a.u(c[d].$,function(a){b(a,d,c[d].sa)})}e=e||[];h=h||{};var l=a.a.e.get(c,d)===p,q=a.a.e.get(c,d)||[],n=a.a.Da(q,function(a){return a.sa}),t=a.a.Fa(n,e,h.dontLimitMoves),s=[],u=0,r=0,v=[],w=[];e=
[];for(var A=[],n=[],x,B=0,D,F;D=t[B];B++)switch(F=D.moved,D.status){case "deleted":F===p&&(x=q[u],x.j&&x.j.K(),v.push.apply(v,a.a.ka(x.$,c)),h.beforeRemove&&(e[B]=x,w.push(x)));u++;break;case "retained":f(B,u++);break;case "added":F!==p?f(B,F):(x={sa:D.value,Na:a.p(r++)},s.push(x),w.push(x),l||(n[B]=x))}m(h.beforeMove,A);a.a.u(v,h.beforeRemove?a.R:a.removeNode);for(var B=0,l=a.f.firstChild(c),G;x=w[B];B++){x.$||a.a.extend(x,b(c,g,x.sa,k,x.Na));for(u=0;t=x.$[u];l=t.nextSibling,G=t,u++)t!==l&&a.f.Bb(c,
t,G);!x.ic&&k&&(k(x.sa,x.$,x.Na),x.ic=!0)}m(h.beforeRemove,e);m(h.afterMove,A);m(h.afterAdd,n);a.a.e.set(c,d,s)}})();a.b("utils.setDomNodeChildrenFromArrayMapping",a.a.Za);a.O=function(){this.allowTemplateRewriting=!1};a.O.prototype=new a.H;a.O.prototype.renderTemplateSource=function(b){var d=(9>a.a.L?0:b.nodes)?b.nodes():null;if(d)return a.a.S(d.cloneNode(!0).childNodes);b=b.text();return a.a.ba(b)};a.O.Oa=new a.O;a.ab(a.O.Oa);a.b("nativeTemplateEngine",a.O);(function(){a.Sa=function(){var a=this.kc=
function(){if(!w||!w.tmpl)return 0;try{if(0<=w.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(b,e,g){g=g||{};if(2>a)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var h=b.data("precompiled");h||(h=b.text()||"",h=w.template(null,"{{ko_with $item.koBindingContext}}"+h+"{{/ko_with}}"),b.data("precompiled",h));b=[e.$data];e=w.extend({koBindingContext:e},g.templateOptions);e=w.tmpl(h,
b,e);e.appendTo(v.createElement("div"));w.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){v.write("<script type='text/html' id='"+a+"'>"+b+"\x3c/script>")};0<a&&(w.tmpl.tag.ko_code={open:"__.push($1 || '');"},w.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};a.Sa.prototype=new a.H;var b=new a.Sa;0<b.kc&&a.ab(b);a.b("jqueryTmplTemplateEngine",a.Sa)})()})})();})();
/*! 
* DevExtreme Web
* Version: 14.2.5
* Build date: Feb 18, 2015
*
* Copyright (c) 2012 - 2015 Developer Express Inc. ALL RIGHTS RESERVED
* EULA: https://www.devexpress.com/Support/EULAs/DevExtreme.xml
*/

"use strict";window.DevExpress||(function(n,t){t.DevExpress=t.DevExpress||{},n.extend(t.DevExpress,{VERSION:"14.2.5",abstract:function(){throw t.DevExpress.Error("E0001");},stringFormat:function(){for(var i=arguments[0],r,u,n,t=0;t<arguments.length-1;t++)u=new RegExp("\\{"+t+"\\}","gm"),n=arguments[t+1],DevExpress.utils.isString(n)&&n.indexOf("$")>=0&&(r="$".replace("$","$$").length,n=n.replace("$",r===1?"$$$$":"$$")),i=i.replace(u,n);return i},parseUrl:function(){var t=document.createElement("a"),i=["protocol","hostname","port","pathname","search","hash"],r=function(n){return n.charAt(0)!=="/"&&(n="/"+n),n};return function(u){t.href=u;var f={};return n.each(i,function(){f[this]=t[this]}),f.pathname=r(f.pathname),f}}(),processHardwareBackButton:function(){this.hardwareBackButton.fire()},hardwareBackButton:n.Callbacks(),viewPort:function(){var t;return function(i){if(!arguments.length)return t;var r=n(i),u=!!r.length,f=this.viewPort();t=u?r:n("body"),this.viewPortChanged.fire(u?this.viewPort():n(),f)}}(),viewPortChanged:n.Callbacks(),hideTopOverlayCallback:function(){var t=[];return{add:function(i){var r=n.inArray(i,t);r===-1&&t.push(i)},remove:function(i){var r=n.inArray(i,t);r!==-1&&t.splice(r,1)},fire:function(){var n=t.pop(),i=!!n;return i&&n(),i},hasCallback:function(){return t.length>0}}}(),rtlEnabled:!1}),n(function(){DevExpress.viewPort(".dx-viewport")})}(jQuery,this),function(n,t){var u={E0001:"Method is not implemented",E0002:"Member name collision: {0}",E0003:"A class must be instantiated using the 'new' keyword",E0004:"The NAME property of the component is not specified",E0005:"Unknown device",E0006:"Unknown endpoint key is requested",E0007:"'Invalidate' method is called outside the update transaction",E0008:"Type of the option name is not appropriate to create an action",E0009:"Component '{0}' has not been initialized for an element",E0010:"Animation configuration with the '{0}' type requires '{1}' configuration as an plain object",E0011:"Unknown animation type '{0}'",E0012:"jQuery version is too old. Please upgrade jQuery to 1.10.0 or later",E0013:"KnockoutJS version is too old. Please upgrade KnockoutJS to 2.3.0 or later",E0014:"The 'release' method shouldn't be called for an unlocked Lock object",E0015:"Queued task returned an unexpected result",E0017:"Event namespace is not defined",E0018:"DevExpress.ui.dxPopup widget is required",E0020:"Template engine '{0}' is not supported",E0021:"Unknown theme is set: {0}",E0022:"LINK[rel=dx-theme] tags must go before DevExpress included scripts",E0023:"Template name is not specified",E0100:"Unknown validation type is detected",E0101:"Misconfigured range validation rule is detected",E0102:"Misconfigured comparison validation rule is detected",E0110:"Unknown validation group is detected",E0120:"Adapter for a dxValidator component cannot be configured",W0000:"'{0}' is deprecated in {1}. {2}",W0001:"{0} - '{1}' option is deprecated in {2}. {3}",W0002:"{0} - '{1}' method is deprecated in {2}. {3}",W0003:"{0} - '{1}' property is deprecated in {2}. {3}",W0004:"Timeout for theme loading is over: {0}",W0005:"'{0}' event is deprecated in {1}. {2}",W0006:"For {0} devices dafault theme is '{1}'"},f="http://js.devexpress.com/error/"+t.VERSION.split(".").slice(0,2).join("_")+"/",e=function(n){var t=n[0];return n=n.slice(1),r(t,i(t,n))},i=function(n,i){return i=[t.ERROR_MESSAGES[n]].concat(i),t.stringFormat.apply(this,i).replace(/\.*\s*?$/,"")},r=function(n,i){return t.stringFormat.apply(this,["{0} - {1}. See:\n{2}",n,i,f+n])},o=function(t){var u=t[0],t=t.slice(1),f=i(u,t),e=r(u,f);return n.extend(new Error(e),{details:f})};n.extend(t,{Error:function(){return o(n.makeArray(arguments))},log:function(i){var r="log",u=t.utils.logger;/^E\d+$/.test(i)?r="error":/^W\d+$/.test(i)&&(r="warn"),u[r](r==="log"?i:e(n.makeArray(arguments)))},ERROR_MESSAGES:u})}(jQuery,DevExpress),function(n,t,i){i.Class=function(){var u=function(n,t,i){return function(){var r=this.callBase;this.callBase=n[t];try{return i.apply(this,arguments)}finally{this.callBase=r}}},f=function(n){var t=function(){};return t.prototype=n.prototype,new t},r=function(){},e=function(t){var i=this,r;return t?(r=n.map(t,function(n,t){return t}),n.each(["toString","toLocaleString","valueOf"],function(){t[this]&&r.push(this)}),n.each(r,function(){var r=n.isFunction(i.prototype[this])&&n.isFunction(t[this]);i.prototype[this]=r?u(i.parent.prototype,this,t[this]):t[this]}),i):i},o=function(){var t=this;return n.each(arguments,function(){this.ctor&&t._includedCtors.push(this.ctor),this.postCtor&&t._includedPostCtors.push(this.postCtor);for(var n in this)if(n!=="ctor"&&n!=="postCtor"){if(n in t.prototype)throw i.Error("E0002",n);t.prototype[n]=this[n]}}),t},s=function(n){return this.parent===n?!0:!this.parent||!this.parent.subclassOf?!1:this.parent.subclassOf(n)};return r.inherit=function(r){var u=function(){if(!this||this===t||typeof this.constructor!="function")throw i.Error("E0003");var r=this,u=r.ctor;n.each(r.constructor._includedCtors,function(){this.call(r)}),u&&u.apply(r,arguments),n.each(r.constructor._includedPostCtors,function(){this.call(r)})};return u.prototype=f(this),u.inherit=this.inherit,u.redefine=e,u.include=o,u.subclassOf=s,u.parent=this,u._includedCtors=this._includedCtors?this._includedCtors.slice(0):[],u._includedPostCtors=this._includedPostCtors?this._includedPostCtors.slice(0):[],u.prototype.constructor=u,u.redefine(r),u},r}()}(jQuery,this,DevExpress),function(n,t,i){function r(t){function f(){while(r.length){u=!0;var e=r.shift(),t=e();if(t!==i&&t.then){n.when(t).always(f);return}}u=!1}function e(n,i){t?(r[0]&&i&&i(r[0]),r=[n]):r.push(n),u||f()}function o(){return u}var r=[],u=!1;return{add:e,busy:o}}var u=t.DevExpress;n.extend(t.DevExpress,{createQueue:r,enqueue:r().add})}(jQuery,this),function(n,t,i){var e=function(n){return n===i||n===null?"":String(n)},r=function(n){return e(n).charAt(0).toUpperCase()+n.substr(1)},u=function(n){return e(n).replace(/([a-z\d])([A-Z])/g,"$1 $2").split(/[\s_-]+/)},f=function(t){return n.map(u(t),function(n){return n.toLowerCase()}).join("-")},o=function(n){return f(n).replace(/-/g,"_")},s=function(t,i){return n.map(u(t),function(n,t){return n=n.toLowerCase(),(i||t>0)&&(n=r(n)),n}).join("")},h=function(n){return r(f(n).replace(/-/g," "))},c=function(t){return n.map(u(t),function(n){return r(n.toLowerCase())}).join(" ")};t.inflector={dasherize:f,camelize:s,humanize:h,titleize:c,underscore:o}}(jQuery,DevExpress),function(n,t,i){var r={ctor:function(){this._events={}},fireEvent:function(n,t){var i=this._events[n];return i&&i.fireWith(this,t),this},on:function(t,i){if(n.isPlainObject(t))n.each(t,n.proxy(function(n,t){this.on(n,t)},this));else{var r=this._events[t],u;r||(r=n.Callbacks(),this._events[t]=r),u=r.originalAdd||r.add,u.call(r,i)}return this},off:function(t,i){var r=this._events[t];return r&&(n.isFunction(i)?r.remove(i):r.empty()),this},_disposeEvents:function(){n.each(this._events,function(){this.empty()})},_callbacksToEvents:function(r,u){var f=this;n.each(u,function(n,u){var e=f[u],o;e!==i&&(o=e.add,e.originalAdd=o,e.add=function(){return t.log("W0003",r,u,"14.2","Use the '"+u+"' event instead"),o.apply(f,arguments)},f._events[u]=e)})}};n.extend(t,{EventsMixin:r})}(jQuery,DevExpress),function(n){(function(n){if(n=n.split("."),n[0]<1||n[0]==1&&n[1]<10)throw DX.Error("E0012");})(n.fn.jquery)}(jQuery),function(n,t,i){function g(t,i){var r=!1;return n.each(n(t).contents(),function(n,t){if(t.nodeType===3&&(t.textContent||t.nodeValue||"").toLowerCase().indexOf((i||"").toLowerCase())>-1)return r=!0,!1}),r}function f(t,r){var o,u,e;for(e in r)(o=t[e],u=r[e],t!==u)&&(!n.isPlainObject(u)||u instanceof n.Event?u!==i&&(t[e]=u):t[e]=f(n.isPlainObject(o)?o:{},u));return t}function nt(n){return t.support.hasKo?ko.utils.unwrapObservable(n):n}var e=function(n){return n!==null&&n!==i},o=function(t){return n.type(t)==="string"},r=function(t){return typeof t=="number"&&isFinite(t)||n.isNumeric(t)},s=function(t){return n.type(t)==="object"},h=function(t){return n.type(t)==="array"},c=function(t){return n.type(t)==="date"},l=function(t){return n.type(t)==="function"},a=function(n){return r(n)&&n.toString().indexOf("e")!==-1},v=function(n,t,i){var r,u;n=n||{};for(r in t)t.hasOwnProperty(r)&&(u=t[r],r in n&&!i||(n[r]=u));return n},y=function(){function n(){}return function(t){return n.prototype=t,new n}}(),p=function(t,i){var r=n.Deferred(),u=i||this,f,e={promise:r.promise(),abort:function(){clearTimeout(f),r.rejectWith(u)}},o=function(){var i=t.call(u);i&&i.done&&n.isFunction(i.done)?i.done(function(){r.resolveWith(u)}):r.resolveWith(u)};return f=(arguments[2]||setTimeout)(o,0),e},w=function(t,r,u){var f=[],e=0;return n.each(r,function(r,o){var s=0,h=u?u(o):o;(n.each(t,function(n){var r=h[n];if(r!==i){if(r===t[n]){s++;return}return s=-1,!1}}),s<e)||(s>e&&(f.length=0,e=s),f.push(o))}),f},b=function(n){return(n+"").replace(/([\+\*\?\\\.\[\^\]\$\(\)\{\}\>\<\|\=\!\:])/g,"\\$1")},k=function(n,t,i){return n.replace(new RegExp("("+b(t)+")","gi"),i)},u=function(n){switch(typeof n){case"string":return n.split(/\s+/,2);case"object":return[n.x||n.h,n.y||n.v];case"number":return[n];default:return n}},d=function(n){var t=u(n),i=parseInt(t&&t[0],10),r=parseInt(t&&t[1],10);return isFinite(i)||(i=0),isFinite(r)||(r=i),{h:i,v:r}};n.expr[":"].dxicontains=n.expr.createPseudo(function(n){return function(t){return g(t,n)}}),t.utils={isDefined:e,isString:o,isNumber:r,isObject:s,isArray:h,isDate:c,isFunction:l,isExponential:a,extendFromObject:v,clone:y,executeAsync:p,stringFormat:t.stringFormat,findBestMatches:w,replaceAll:k,deepExtendArraySafe:f,splitPair:u,stringPairToObject:d,unwrapObservable:nt}}(jQuery,DevExpress),function(n,t,i){var r=function(){function i(i){t&&n.isFunction(t.info)&&t.info(i)}function r(i){t&&n.isFunction(t.warn)&&t.warn(i)}function u(i){t&&n.isFunction(t.error)&&t.error(i)}var t=window.console;return{info:i,warn:r,error:u}}(),u=function(){function n(n,t){if(!n)throw new Error(t);}function t(t,r){n(t!==null&&t!==i,r)}return{assert:n,assertParam:t}}();n.extend(t.utils,{logger:r,debug:u})}(jQuery,DevExpress),function(n,t){var y=Math.PI,p=Math.LN10,w=Math.cos,b=Math.sin,u=Math.abs,k=Math.log,d=Math.floor,g=Math.ceil,nt=Math.max,yt=Math.min,f=window.isNaN,h=window.Number,c=window.NaN,l=t.utils.isNumber,e=t.utils.isExponential,a=function(n){var u,f=n.toString(),o=f.indexOf("."),t,i;return e(n)?(i=r(n),i<0?Math.abs(i):0):o!==-1?(t=o+1,u=f.substring(t,t+20),u.length):0},tt=function(n,t){return n?Math.log(n)/Math.log(t):c},it=function(n,t){return Math.pow(t,n)},rt=function(n){return n===0?0:n/u(n)},ut=function(n){return(n%360+360)%360},ft=function(n){return 90-n},v=function(n){return y*n/180},et=function(n){var t=v(n);return{cos:w(t),sin:b(t)}},ot=1e-14,st=function(n,t,i,r){var u=i-n,f=r-t;return Math.sqrt(f*f+u*u)},r=function(n){var t=u(n),i;return f(t)?c:t>0?(t=k(t)/p,i=g(t),i-t<ot?i:d(t)):0},ht=function(n,t,i){var o=nt(r(n),r(t)),e=-r(u(t-n)/i),s;return!f(o)&&!f(e)?(u(o)<=4?(s="fixedPoint",e<0&&(e=0),e>4&&(e=4)):(s="exponential",e+=o-1,e>3&&(e=3)),{format:s,precision:e}):null},o=function(n){var t,i;return l(n)&&(t=n.toString(),i=t.indexOf("."),i>=0)?e(n)?t.substr(i+1,t.indexOf("e")-i-1):(t=n.toFixed(20),t.substr(i+1,t.length-i+1)):""},ct=function(n){var i=o(n),t;if(i)for(t=0;t<i.length;t++)if(i.charAt(t)!=="0")return t+1;return 0},lt=function(n){var i=o(n),r,t;if(i)for(t=1;t<=i.length;t++)if(r=s(n,t),r!==0&&i[t-2]&&i[t-1]&&i[t-2]===i[t-1])return r;return n},s=function(n,t){return t>20&&(t=20),l(n)?e(n)?h(n.toExponential(t)):h(n.toFixed(t)):void 0},at=function(n,t,i){var r=a(n),u=a(t);return s(i,r<u?u:r)},vt=function(n,t,i){return Math.min(Math.max(n,t),i)};n.extend(t.utils,{getLog:tt,raiseTo:it,sign:rt,normalizeAngle:ut,convertAngleToRendererSpace:ft,degreesToRadians:v,getCosAndSin:et,getDecimalOrder:r,getAppropriateFormat:ht,getDistance:st,getFraction:o,adjustValue:lt,roundValue:s,applyPrecisionByMinDelta:at,getSignificantDigitPosition:ct,fitIntoRange:vt})}(jQuery,DevExpress),function(n,t){var h=t.utils.isObject,o=t.utils.isString,y=t.utils.isDate,c=t.utils.isDefined,f=["millisecond","second","minute","hour","day","week","month","quarter","year"],r=function(n,t,i){return n+(i?-1:1)*t},u=function(n){switch(n){case"millisecond":return 1;case"second":return u("millisecond")*1e3;case"minute":return u("second")*60;case"hour":return u("minute")*60;case"day":return u("hour")*24;case"week":return u("day")*7;case"month":return u("day")*30;case"quarter":return u("month")*3;case"year":return u("day")*365;default:return 0}},p=function(n){for(var t,i,f=["millisecond","second","minute","hour","day","month","year"],o={},r=f.length-1;r>=0;r--)i=f[r],t=Math.floor(n/u(i)),t>0&&(o[i+"s"]=t,n-=e(i,t));return o},w=function(t){var i=0;return h(t)&&n.each(t,function(n,t){i+=e(n.substr(0,n.length-1),t)}),o(t)&&(i=e(t,1)),i},e=function(n,t){return u(n)*t},l=function(t){var r=-1,i;return o(t)?t:h(t)?(n.each(t,function(n,t){for(i=0;i<f.length;i++)t&&(n===f[i]+"s"||n===f[i])&&r<i&&(r=i)}),f[r]):""},b=function(n,i,r){var o=new Date(n.getTime()),f,e,u=l(i);switch(u){case"second":n.setMilliseconds(0);break;case"minute":n.setSeconds(0,0);break;case"hour":n.setMinutes(0,0,0);break;case"year":n.setMonth(0);case"month":n.setDate(1);case"day":n.setHours(0,0,0,0);break;case"week":f=n.getDate(),n.getDay()!==0&&(f+=7-n.getDay()),n.setDate(f),n.setHours(0,0,0,0);break;case"quarter":e=t.formatHelper.getFirstQuarterMonth(n.getMonth()),n.getMonth()!==e&&n.setMonth(e),n.setDate(1),n.setHours(0,0,0,0)}r&&u!=="hour"&&u!=="minute"&&u!=="second"&&s(o,n)},k=function(t,i){var r,u=0;return r={year:t.getFullYear()!==i.getFullYear(),month:t.getMonth()!==i.getMonth(),day:t.getDate()!==i.getDate(),hour:t.getHours()!==i.getHours(),minute:t.getMinutes()!==i.getMinutes(),second:t.getSeconds()!==i.getSeconds()},n.each(r,function(n,t){t&&u++}),r.count=u,r},d=function(n,t,i){var u=null,f;return y(n)?(f=o(t)?a(t.toLowerCase()):t,u=new Date(n.getTime()),f.years&&u.setFullYear(r(u.getFullYear(),f.years,i)),f.quarters&&u.setMonth(r(u.getMonth(),3*f.quarters,i)),f.months&&u.setMonth(r(u.getMonth(),f.months,i)),f.weeks&&u.setDate(r(u.getDate(),7*f.weeks,i)),f.days&&u.setDate(r(u.getDate(),f.days,i)),f.hours&&u.setHours(r(u.getHours(),f.hours,i)),f.minutes&&u.setMinutes(r(u.getMinutes(),f.minutes,i)),f.seconds&&u.setSeconds(r(u.getSeconds(),f.seconds,i)),f.milliseconds&&u.setMilliseconds(r(n.getMilliseconds(),f.milliseconds,i))):u=r(n,t,i),u},a=function(n){var t={};switch(n){case"year":t.years=1;break;case"month":t.months=1;break;case"quarter":t.months=3;break;case"week":t.days=7;break;case"day":t.days=1;break;case"hour":t.hours=1;break;case"minute":t.minutes=1;break;case"second":t.seconds=1;break;case"millisecond":t.milliseconds=1}return t},g=function(n,t){return n&&t&&n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()},nt=function(n){var t=new Date(n.getFullYear(),n.getMonth(),1);return s(n,t),t},tt=function(n,t,i){return v(n,t,i)===n},v=function(n,t,i){var r=n;return c(t)&&n<t&&(r=t),c(i)&&n>i&&(r=i),r},it=function(n){return n.toExponential().split("e")[1]},s=function(n,i){if(t.utils.isDefined(n)){var r=i.getHours()-n.getHours(),u,f;r!==0&&(u=r===1||r===-23?-1:1,f=new Date(i.getTime()+u*36e5),(u>0||f.getDate()===i.getDate())&&i.setTime(f.getTime()))}};n.extend(t.utils,{dateUnitIntervals:f,convertMillisecondsToDateUnits:p,convertDateTickIntervalToMilliseconds:w,convertDateUnitToMilliseconds:e,getDateUnitInterval:l,getDatesDifferences:k,correctDateWithUnitBeginning:b,addInterval:d,getDateIntervalByString:a,sameMonthAndYear:g,getFirstMonthDate:nt,dateInRange:tt,normalizeDate:v,getPower:it,fixTimezoneGap:s})}(jQuery,DevExpress),function(n,t){var o=100,s=function(t){var i=n(window),r,u=function(){var n=i.width(),u=i.height();clearTimeout(r),r=setTimeout(function(){i.width()===n&&i.height()===u&&t()},o)};return u.stop=function(){return clearTimeout(r),this},u},r=function(){var u,t=n.Callbacks(),i=n(window),r=!1,o=t.add,s=t.remove,f=function(){return[i.width(),i.height()].join()},e=function(){var n=f();n!==u&&(u=n,setTimeout(t.fire))};return u=f(),t.add=function(){var n=o.apply(t,arguments);if(!r&&t.has()){i.on("resize",e);r=!0}return n},t.remove=function(){var n=s.apply(t,arguments);return!t.has()&&r&&(i.off("resize",e),r=!1),n},t}(),h=function(){var n=document.activeElement;n&&n!==document.body&&n.blur&&n.blur()},c=function(t){var i=n("<div />");return window.WinJS?WinJS.Utilities.setInnerHTMLUnsafe(i.get(0),t):i.append(t),i.contents()},l=function(i){var s,u,c;i=n.extend({},i);var l=t.devices.current(),f=t.devices.real(),e=i.allowZoom,o=i.allowPan,a="allowSelection"in i?i.allowSelection:l.platform=="desktop",h="meta[name=viewport]";if(n(h).length||n("<meta />").attr("name","viewport").appendTo("head"),s=["width=device-width"],u=[],e?u.push("pinch-zoom"):s.push("initial-scale=1.0","maximum-scale=1.0, user-scalable=no"),o&&u.push("pan-x","pan-y"),o||e?n("html").css("-ms-overflow-style","-ms-autohiding-scrollbar"):n("html, body").css({"-ms-content-zooming":"none","-ms-user-select":"none",overflow:"hidden"}),!a){if(f.ios)n(document).on("selectstart",function(){return!1});n(".dx-viewport").css("user-select","none")}if(n(h).attr("content",s.join()),n("html").css("-ms-touch-action",u.join(" ")||"none"),t.support.touch)n(document).off(".dxInitMobileViewport").on("dxpointermove.dxInitMobileViewport",function(n){var t=n.pointers.length,i=n.pointerType==="touch",r=!e&&t>1,u=!o&&t===1&&!n.isScrollingEvent;i&&(r||u)&&n.preventDefault()});f=t.devices.real(),f.ios&&(c=document.location.protocol==="file:",c||r.add(function(){var t=n(window).width();n("body").width(t)}))},u=function(t){var i=".dx-visibility-change-handler";return function(r){var u=n(r||"body"),f=u.find(i).add(u.filter(i));f.each(function(){n(this).triggerHandler(t)})}},a=function(){var n=0;return function(t){return(t||"")+n++}}();t.dataOptionsAttributeName="data-options";var f=function(i){var r=n(i).attr(t.dataOptionsAttributeName),u;n.trim(r).charAt(0)!=="{"&&(r="{"+r+"}");try{u=new Function("return "+r)()}catch(f){throw t.Error("E3018",f,r);}return u},v=function(i,r){var u=[],e="["+t.dataOptionsAttributeName+"]";return i.find(e).addBack(e).each(function(t,i){var o=n(i),s=f(i),e;for(e in s)(!r||n.inArray(e,r)>-1)&&o[e]&&(o[e](s[e]),u.push(o[e]("instance")))}),u},e=function(t){if(t=n.trim(t),t.length)return(t[0]!=="<"||t[t.length-1]!==">")&&(t="<div>"+t+"<\/div>"),n(t)},y=function(t){return t=n(t),t.length&&t[0].nodeName.toLowerCase()==="script"&&(t=e(t.html())),t},p=function(t){return(t==null&&(t=""),t.nodeType||t.jquery)?t:t[0]=="<"?n(t):n("<span>"+t+"<\/span>")},w=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()};n.extend(t.utils,{createResizeHandler:s,windowResizeCallbacks:r,resetActiveElement:h,createMarkupFromString:c,triggerShownEvent:u("dxshown"),triggerHidingEvent:u("dxhiding"),initMobileViewport:l,getElementOptions:f,createComponents:v,htmlToJQuery:e,normalizeTemplateElement:y,stringToJquery:p,clearSelection:w,uniqueId:a})}(jQuery,DevExpress),function(n,t){var e=t.utils.isFunction,o=t.utils.getDistance,s=t.utils.normalizeAngle,u=n.inArray,h=/iphone|ipad/.test(navigator.userAgent.toLowerCase()),r=t.utils.isDefined,c=function(t,i){for(var l=e(t.customizeSeries)?t.customizeSeries:n.noop,f=t.nameField||"series",s={},h=[],u,r,o=0,c=i.length;o<c;o++)r=i[o],f in r&&(u=s[r[f]],u||(u=s[r[f]]={name:r[f],data:[]},h.push(u.name)),u.data.push(r));return n.map(h,function(t){var i=s[t],r=l.call(null,i.name);return n.extend(i,r)})},l=function(){var n=1;return function(){return"DevExpress_"+n++}}(),a=function(t){var r,i={left:0,top:0},u,e=t.root,f;return e&&(r=e.element,r.getScreenCTM&&!h?(f=r.getScreenCTM(),f?(u=r.createSVGPoint().matrixTransform(f),i.left=u.x+(document.body.scrollLeft||document.documentElement.scrollLeft),i.top=u.y+(document.body.scrollTop||document.documentElement.scrollTop)):(i.left=document.body.scrollLeft||document.documentElement.scrollLeft,i.top=document.body.scrollTop||document.documentElement.scrollTop)):i=n(r).offset()),i},v=function(n,t){return(n.x<=t.x&&t.x<=n.x+n.width||n.x>=t.x&&n.x<=t.x+t.width)&&(n.y<=t.y&&t.y<=n.y+n.height||n.y>=t.y&&n.y<=t.y+t.height)},y=function(t,i,f){if(!(t&&t.length>0))return{};i=r(i)?i:t[0],f=r(f)?f:t[t.length-1];var a=n.map(t,function(n){return n&&n.valueOf()}),s=[],e=r(i)?u(i.valueOf(),a):0,o=r(f)?u(f.valueOf(),a):t.length-1,v,y,h,c=!1,l;return e<0&&(e=0),o<0&&(o=t.length-1),o<e&&(v=o,o=e,e=v,c=!0),s=t.slice(e,o+1),l=s.length,h=l>0,{categories:h?s:null,start:h?s[c?l-1:0]:null,end:h?s[c?0:l-1]:null,inverted:c}},f=function(t,i){var r=Infinity,u={};return n.each(i,function(n,i){var f=o(t.x,t.y,i.x,i.y);f<r&&(r=f,u=i)}),u},p=function(n,t,i){var u={x:i.centerX,y:i.centerY},e=u.x,h=u.y,r=n.x,c=t.y,a=f(u,[{x:r,y:n.y+n.height/2},{x:r+n.width,y:n.y+n.height/2}]).x,o=Math.round(Math.sqrt(Math.pow(a-e,2)+Math.pow(n.y-h,2)-Math.pow(c-h,2))),l=s(i.angle);return o&&(r=l<90||l>=270?e+o:e-o-n.width),{x:r,y:c}};n.extend(t.utils,{processSeriesTemplate:c,getNextDefsSvgId:l,getRootOffset:a,getCategoriesInfo:y,checkOverlapping:v,getShiftingCoordOnRad:p,getClosestCoord:f})}(jQuery,DevExpress),function(n,t){var r=function(t){return n.isArray(t)?t:[t]},u=function(t,i){if(!n.isArray(t)||t.length===0)return[];if(!n.isArray(i)||i.length===0)return t.slice();var r=[];return n.each(t,function(t,u){var f=n.inArray(u,i);f===-1&&r.push(u)}),r};n.extend(t.utils,{wrapToArray:r,removeDublicates:u})}(jQuery,DevExpress),function(n,t,i){var u={iPhone:"iPhone",iPhone5:"iPhone",iPhone6:"iPhone",iPhone6plus:"iPhone",iPad:"iPad",iPadMini:"iPad Mini",androidPhone:"Android Mobile",androidTablet:"Android",win8:"MSAppHost",win8Phone:"Windows Phone 8",msSurface:"MSIE ARM Tablet PC",desktop:"desktop",tizen:"Tizen Mobile"},r={deviceType:"",platform:"",version:[],phone:!1,tablet:!1,android:!1,ios:!1,win8:!1,tizen:!1,generic:!1,mac:!1},e=n.extend(r,{platform:"generic",deviceType:"desktop",generic:!0}),f={win8:function(n){var t=/windows phone/i.test(n)||n.match(/WPDesktop/),r=!t&&/arm(.*)trident/i.test(n),f=!t&&!r&&/msapphost/i.test(n),i,u;if(t||r||f)return i=n.match(/windows phone (\d+).(\d+)/i)||n.match(/windows nt (\d+).(\d+)/i),u=i?[parseInt(i[1],10),parseInt(i[2],10)]:[],{deviceType:t?"phone":r?"tablet":"desktop",platform:"win8",version:u}},ios:function(n){if(/ip(hone|od|ad)/i.test(n)){var i=/ip(hone|od)/i.test(n),t=n.match(/os (\d+)_(\d+)_?(\d+)?/i),r=t?[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3]||0,10)]:[];return{deviceType:i?"phone":"tablet",platform:"ios",version:r}}},android:function(n){if(/android|htc_|silk/i.test(n)){var i=/mobile/i.test(n),t=n.match(/android (\d+)\.(\d+)\.?(\d+)?/i),r=t?[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3]||0,10)]:[];return{deviceType:i?"phone":"tablet",platform:"android",version:r}}},tizen:function(n){if(/tizen/i.test(n)){var i=/mobile/i.test(n),t=n.match(/tizen (\d+)\.(\d+)/i),r=t?[parseInt(t[1],10),parseInt(t[2],10)]:[];return{deviceType:i?"phone":"tablet",platform:"tizen",version:r}}}};t.Devices=t.Class.inherit({ctor:function(r){this._window=r&&r.window||window,this._realDevice=this._getDevice(),this._currentDevice=i,this._currentOrientation=i,this.orientationChanged=n.Callbacks(),this._callbacksToEvents("Devices",["orientationChanged"]),this._recalculateOrientation(),t.utils.windowResizeCallbacks.add(n.proxy(this._recalculateOrientation,this))},current:function(n){if(n)this._currentDevice=this._getDevice(n),this._forced=!0,t.ui.themes.init({_autoInit:!0});else{if(!this._currentDevice){n=i;try{n=this._getDeviceOrNameFromWindowScope()}catch(r){n=this._getDeviceNameFromSessionStorage()}finally{n||(n=this._getDeviceNameFromSessionStorage()),n&&(this._forced=!0)}this._currentDevice=this._getDevice(n)}return this._currentDevice}},real:function(){return n.extend({},this._realDevice)},orientation:function(){return this._currentOrientation},isForced:function(){return this._forced},isRippleEmulator:function(){return!!this._window.tinyHippos},_getCssClasses:function(n){var i=[],r=this._realDevice;return n=n||this.current(),n.deviceType&&i.push("dx-device-"+n.deviceType),i.push("dx-device-"+r.platform),r.version&&r.version.length&&i.push("dx-device-"+r.platform+"-"+r.version[0]),t.devices.isSimulator()&&i.push("dx-simulator"),t.rtlEnabled&&i.push("dx-rtl"),i},attachCssClasses:function(t,i){n(t).addClass(this._getCssClasses(i).join(" "))},detachCssClasses:function(t,i){n(t).removeClass(this._getCssClasses(i).join(" "))},isSimulator:function(){try{return this._isSimulator||this._window.top!==this._window.self&&this._window.top["dx-force-device"]||this.isRippleEmulator()}catch(n){return!1}},forceSimulator:function(){this._isSimulator=!0},_getDevice:function(i){if(i==="genericPhone"&&(i={deviceType:"phone",platform:"generic",generic:!0}),n.isPlainObject(i))return this._fromConfig(i);var r;if(i){if(r=u[i],!r)throw t.Error("E0005");}else r=navigator.userAgent;return this._fromUA(r)},_getDeviceOrNameFromWindowScope:function(){var n;return(this._window.top["dx-force-device-object"]||this._window.top["dx-force-device"])&&(n=this._window.top["dx-force-device-object"]||this._window.top["dx-force-device"]),n},_getDeviceNameFromSessionStorage:function(){var i=this._window.sessionStorage,t,r;if(i){t=i.getItem("dx-force-device");try{r=n.parseJSON(t)}catch(u){return t}return r}},_fromConfig:function(t){var i={phone:t.deviceType==="phone",tablet:t.deviceType==="tablet",android:t.platform==="android",ios:t.platform==="ios",win8:t.platform==="win8",tizen:t.platform==="tizen",generic:t.platform==="generic"};return n.extend({},r,this._currentDevice,i,t)},_fromUA:function(t){var i,e,u;return(n.each(f,function(n,r){return i=r(t),!i}),i)?this._fromConfig(i):(e=/(mac os)/.test(t.toLowerCase()),u=r,u.mac=e,u)},_changeOrientation:function(){var i=n(this._window),t=i.height()>i.width()?"portrait":"landscape";this._currentOrientation!==t&&(this._currentOrientation=t,this.orientationChanged.fire({orientation:t}))},_recalculateOrientation:function(){var t=n(this._window).width();this._currentWidth!==t&&(this._currentWidth=t,this._changeOrientation())}}).include(t.EventsMixin),t.devices=new t.Devices,t.viewPortChanged.add(function(n,i){t.devices.detachCssClasses(i),t.devices.attachCssClasses(n)})}(jQuery,DevExpress),function(n,t){var f=/(webkit)[ \/]([\w.]+)/,e=/(opera)(?:.*version)?[ \/]([\w.]+)/,o=/(msie) (\d{1,2}\.\d)/,s=/(trident).*rv:(\d{1,2}\.\d)/,h=/(mozilla)(?:.*? rv:([\w.]+))?/,u=navigator.userAgent.toLowerCase(),c=function(){var t={},i=f.exec(u)||e.exec(u)||o.exec(u)||s.exec(u)||u.indexOf("compatible")<0&&h.exec(u)||[],n=i[1],r=i[2];return n==="trident"&&(n="msie"),n&&(t[n]=!0,t.version=r),t}();t.browser=c}(jQuery,DevExpress,this),function(n,t,i){var f=["","Webkit","Moz","O","Ms"],s={"":"",Webkit:"-webkit-",Moz:"-moz-",O:"-o-",ms:"-ms-"},e=document.createElement("dx").style,h={webkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",msTransition:"MsTransitionEnd",transition:"transitionend"},o=function(n,i){var r,u,o;for(n=t.inflector.camelize(n,!0),u=0,o=f.length;u<o;u++){var e=f[u],s=e+n,h=t.inflector.camelize(s);if(r=i(h,e),r===undefined&&(r=i(s,e)),r!==undefined)break}return r},u=function(n){return o(n,function(n){if(n in e)return n})},c=function(n){return o(n,function(n,t){if(n in e)return s[t]})},r=function(n){return!!u(n)},l=function(){var r=t.devices.real(),u=r.platform,f=r.version,e=f&&f[0]<4&&u==="android";return!e&&n.inArray(u,["ios","android","win8"])>-1||r.mac};t.support={touchEvents:"ontouchstart"in i,touch:"ontouchstart"in i||!!i.navigator.msMaxTouchPoints,pointer:i.navigator.pointerEnabled||i.navigator.msPointerEnabled,transform:r("transform"),transition:r("transition"),transitionEndEventName:h[u("transition")],animation:r("animation"),nativeScrolling:l(),winJS:"WinJS"in i,styleProp:u,stylePropPrefix:c,supportProp:r,hasKo:!!i.ko,hasNg:!i.ko&&!!i.angular,inputType:function(n){if(n==="text")return!0;var t=document.createElement("input");try{return t.setAttribute("type",n),t.value="wrongValue",!t.value}catch(i){return!1}}}}(jQuery,DevExpress,this),function(n,t,i){var y=/left|right/,p=/top|bottom/,s=/fit|flip|none/,h=function(i){var r={h:"center",v:"center"},u=t.utils.splitPair(i);return u&&n.each(u,function(){var n=String(this).toLowerCase();y.test(n)?r.h=n:p.test(n)&&(r.v=n)}),r},c=function(n){return t.utils.stringPairToObject(n)},w=function(n){var i=t.utils.splitPair(n),r=String(i&&i[0]).toLowerCase(),u=String(i&&i[1]).toLowerCase();return s.test(r)||(r="none"),s.test(u)||(u=r),{h:r,v:u}},l=function(n){switch(n){case"center":return.5;case"right":case"bottom":return 1;default:return 0}},f=function(n){switch(n){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";default:return n}},e=function(n,t){var i=0;return n.myLocation<t.min&&(i+=t.min-n.myLocation),n.myLocation>t.max&&(i+=n.myLocation-t.max),i},o=function(n){n.myLocation=n.atLocation+l(n.atAlign)*n.atSize-l(n.myAlign)*n.mySize+n.offset},r={fit:function(n,t){var i=!1;return n.myLocation>t.max&&(n.myLocation=t.max,i=!0),n.myLocation<t.min&&(n.myLocation=t.min,i=!0),i},flip:function(t,i){if(t.myAlign==="center"&&t.atAlign==="center")return!1;if(t.myLocation<i.min||t.myLocation>i.max){var r=n.extend({},t,{myAlign:f(t.myAlign),atAlign:f(t.atAlign),offset:-t.offset});if(o(r),r.oversize=e(r,i),r.myLocation>=i.min&&r.myLocation<=i.max||r.myLocation>t.myLocation||r.oversize<t.oversize)return t.myLocation=r.myLocation,t.oversize=r.oversize,!0}return!1}},u,b={h:{location:0,flip:!1,fit:!1,oversize:0},v:{location:0,flip:!1,fit:!1,oversize:0}},a=function(f,s){var d=n(f),nt=d.offset(),p=n.extend(!0,{},b,{h:{location:nt.left},v:{location:nt.top}}),g,k;if(!s)return p;var tt=h(s.my),it=h(s.at),y=s.of||window,rt=c(s.offset),ut=w(s.collision),ft=s.boundary,et=c(s.boundaryOffset),l={mySize:d.outerWidth(),myAlign:tt.h,atAlign:it.h,offset:rt.h,collision:ut.h,boundaryOffset:et.h},a={mySize:d.outerHeight(),myAlign:tt.v,atAlign:it.v,offset:rt.v,collision:ut.v,boundaryOffset:et.v};return y.preventDefault?(l.atLocation=y.pageX,a.atLocation=y.pageY,l.atSize=0,a.atSize=0):(y=n(y),n.isWindow(y[0])?(l.atLocation=y.scrollLeft(),a.atLocation=y.scrollTop(),l.atSize=y.width(),a.atSize=y.height()):y[0].nodeType===9?(l.atLocation=0,a.atLocation=0,l.atSize=y.width(),a.atSize=y.height()):(g=y.offset(),l.atLocation=g.left,a.atLocation=g.top,l.atSize=y.outerWidth(),a.atSize=y.outerHeight())),o(l),o(a),k=function(){var r=n(window),e=r.width(),o=r.height(),s=r.scrollLeft(),h=r.scrollTop(),w=document.width>document.documentElement.clientWidth,b=document.height>document.documentElement.clientHeight,k=t.support.touch?document.documentElement.clientWidth/(b?e-u:e):1,d=t.support.touch?document.documentElement.clientHeight/(w?o-u:o):1,c,y,f,p;return u===i&&(u=v()),c=e,y=o,ft&&(f=n(ft),p=f.offset(),s+=p.left,h+=p.top,c=f.width(),y=f.height()),{h:{min:s+l.boundaryOffset,max:s+c/k-l.mySize-l.boundaryOffset},v:{min:h+a.boundaryOffset,max:h+y/d-a.mySize-a.boundaryOffset}}}(),l.oversize=e(l,k.h),a.oversize=e(a,k.v),r[l.collision]&&(p.h[l.collision]=r[l.collision](l,k.h)),r[a.collision]&&(p.v[a.collision]=r[a.collision](a,k.v)),n.extend(!0,p,{h:{location:l.myLocation,oversize:l.oversize},v:{location:a.myLocation,oversize:a.oversize}}),p},k=function(i,r){var u=n(i),e,f;return r?(t.translator.resetPosition(u),e=u.offset(),f=r.h&&r.v?r:a(u,r),t.translator.move(u,{left:f.h.location-e.left,top:f.v.location-e.top}),f):u.offset()},v;n.extend(t,{calculatePosition:a,position:k,inverseAlign:f}),v=function(){var t=n("<div>").css({width:100,height:100,overflow:"scroll",position:"absolute",top:-9999}).appendTo(n("body")),i=t.get(0).offsetWidth-t.get(0).clientWidth;return t.remove(),i}}(jQuery,DevExpress),function(n,t){var r={},u=function(t,i){if(n.isPlainObject(t)){n.each(t,u);return}r[t]=i},e=function(){var i=n.makeArray(arguments);n.each(i,function(){delete r[this]})},f;u({func:{execute:function(t){n.isFunction(t.action)&&(t.result=t.action.apply(t.context,t.args),t.handled=!0)}},url:{execute:function(n){typeof n.action=="string"&&n.action.charAt(0)!=="#"&&(document.location=n.action)}},hash:{execute:function(n){typeof n.action=="string"&&n.action.charAt(0)==="#"&&(document.location.hash=n.action)}}}),f=t.Class.inherit({ctor:function(t,i){i=i||{},this._action=t||n.noop,this._context=i.context||window,this._beforeExecute=i.beforeExecute||n.noop,this._afterExecute=i.afterExecute||n.noop,this._component=i.component,this._excludeValidators=i.excludeValidators,this._validatingTargetName=i.validatingTargetName},execute:function(){var n={action:this._action,args:Array.prototype.slice.call(arguments),context:this._context,component:this._component,validatingTargetName:this._validatingTargetName,cancel:!1,handled:!1},t;if(this._validateAction(n))return(this._beforeExecute.call(this._context,n),n.cancel)?void 0:(t=this._executeAction(n),this._afterExecute.call(this._context,n),t)},_validateAction:function(t){var i=this._excludeValidators;return n.each(r,function(r,u){if(!i||!(n.inArray(r,i)>-1))return u.validate&&u.validate(t),t.cancel?!1:void 0}),!t.cancel},_executeAction:function(t){var i;return n.each(r,function(n,r){return r.execute&&r.execute(t),t.handled?(i=t.result,!1):void 0}),i}}),n.extend(t,{registerActionExecutor:u,unregisterActionExecutor:e,Action:f})}(jQuery,DevExpress),function(n,t,i){var s=t.support,f="dxTranslator",h=/matrix(3d)?\((.+?)\)/,c=/translate(?:3d)?\((.+?)\)/,l=function(n){var t=s.transform?e(n):v(n);return{left:t.x,top:t.y}},a=function(n,t){if(!s.transform){n.css(t);return}var f=e(n),h=t.left,c=t.top;h!==i&&(f.x=h||0),c!==i&&(f.y=c||0),n.css({transform:o(f)}),(r(h)||r(c))&&u(n)},r=function(t){return n.type(t)==="string"&&t[t.length-1]==="%"},v=function(n){var t,i;try{var r=n.css("top"),f=n.css("left"),e=n.position();n.css({transform:"none",top:0,left:0}),u(n),i=n.position(),t={x:e.left-i.left||parseInt(f)||0,y:e.top-i.top||parseInt(r)||0},n.css({top:r,left:f})}catch(o){t={x:0,y:0}}return t},e=function(n){var i=n.data(f);if(!i){var r=n.css("transform")||o({x:0,y:0}),t=r.match(h),u=t&&t[1];t?(t=t[2].split(","),u==="3d"?t=t.slice(12,15):(t.push(0),t=t.slice(4,7))):t=[0,0,0],i={x:parseFloat(t[0]),y:parseFloat(t[1]),z:parseFloat(t[2])},y(n,i)}return i},y=function(n,t){n.data(f,t)},u=function(n){n.removeData(f)},p=function(n){n.css({left:0,top:0,transform:"none"}),u(n)},w=function(n){var t=n.match(c);if(t&&t[1])return t=t[1].split(","),t={x:parseFloat(t[0]),y:parseFloat(t[1]),z:parseFloat(t[2])}},o=function(n){n.x=n.x||0,n.y=n.y||0;var t=r(n.x)?n.x:n.x+"px",i=r(n.y)?n.y:n.y+"px";return"translate("+t+", "+i+")"};t.translator={move:a,locate:l,clearCache:u,parseTranslate:w,getTranslate:e,getTranslateCss:o,resetPosition:p}}(jQuery,DevExpress),function(n,t){var s=1e3/60,r=function(n){return this.setTimeout(n,s)},u=function(n){this.clearTimeout(n)},f=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame,o=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame,e;f&&o&&(r=f,u=o),f&&!o&&(e={},r=function(n){var t=f.call(window,function(){try{if(t in e)return;n.apply(this,arguments)}finally{delete e[t]}});return t},u=function(n){e[n]=!0}),r=n.proxy(r,window),u=n.proxy(u,window),n.extend(t,{requestAnimationFrame:r,cancelAnimationFrame:u})}(jQuery,DevExpress),function(n,t){t.Animator=t.Class.inherit({ctor:function(){this._finished=!0,this._stopped=!1,this._proxiedStepCore=n.proxy(this._stepCore,this)},start:function(){this._stopped=!1,this._finished=!1,this._stepCore()},stop:function(){this._stopped=!0},_stepCore:function(){if(this._isStopped()){this._stop();return}if(this._isFinished()){this._finished=!0,this._complete();return}this._step(),t.requestAnimationFrame.call(window,this._proxiedStepCore)},_step:t.abstract,_isFinished:n.noop,_stop:n.noop,_complete:n.noop,_isStopped:function(){return this._stopped},inProgress:function(){return!(this._stopped||this._finished)}})}(jQuery,DevExpress),function(n,t,i){var u=t.translator,e=t.support,y=e.transitionEndEventName+".dxFX",tt=/cubic-bezier\((\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\)/,it=/^([+-])=(.*)/i,f="dxAnimData",o="dxAnimQueue",r="transform",rt={animate:function(t,i){var u=this,r=n.Deferred();return i.transitionAnimation={finish:function(){u._cleanup(t,i),r.resolveWith(t,[i,t])}},this._startAnimation(t,i),this._completeAnimationCallback(t,i).done(function(){i.transitionAnimation.finish()}),i.duration||i.transitionAnimation.finish(),r.promise()},_completeAnimationCallback:function(t,i){var e=n.now()+i.delay,r=n.Deferred(),u=n.Deferred(),f=n.Deferred();t.one(y,function(){n.now()-e>=i.duration&&u.reject()});return i.transitionAnimation.simulatedEndEventTimer=setTimeout(function(){f.reject()},i.duration+i.delay),n.when(u,f).fail(n.proxy(function(){r.resolve()},this)),r.promise()},_startAnimation:function(n,t){n.css("transform"),n.css({transitionProperty:"all",transitionDelay:t.delay+"ms",transitionDuration:t.duration+"ms",transitionTimingFunction:t.easing}),nt(n,t.to)},_cleanup:function(n,t){n.css("transition","none").off(y),clearTimeout(t.transitionAnimation.simulatedEndEventTimer)},stop:function(t,i,r){i&&(r?i.transitionAnimation.finish():(n.each(i.to,function(n){t.css(n,t.css(n))}),this._cleanup(t,i)))}},p={animate:function(t,f){var o=n.Deferred(),e=this;return f?(n.each(f.to,function(n){f.from[n]===i&&(f.from[n]=e._normalizeValue(t.css(n)))}),f.to[r]&&(f.from[r]=e._parseTransform(f.from[r]),f.to[r]=e._parseTransform(f.to[r])),f.frameAnimation={to:f.to,from:f.from,currentValue:f.from,easing:et(f.easing),duration:f.duration,startTime:(new Date).valueOf(),finish:function(){this.currentValue=this.to,this.draw(),o.resolve()},draw:function(){var i=n.extend({},this.currentValue);i[r]&&(i[r]=n.map(i[r],function(n,t){return t==="translate"?u.getTranslateCss(n):t==="scale"?"scale("+n+")":t.substr(0,t.length-1)==="rotate"?t+"("+n+"deg)":void 0}).join(" ")),t.css(i)}},f.delay?(f.frameAnimation.startTime+=f.delay,f.frameAnimation.delayTimeout=setTimeout(function(){e._animationStep(t,f)},f.delay)):e._animationStep(t,f),o.promise()):o.reject().promise()},_parseTransform:function(t){var i={};return n.each(t.match(/(\w|\d)+\([^\)]*\)\s*/g),function(n,t){var e=u.parseTranslate(t),f=t.match(/scale\((.+?)\)/),r=t.match(/(rotate.)\((.+)deg\)/);e&&(i.translate=e),f&&f[1]&&(i.scale=parseFloat(f[1])),r&&r[1]&&(i[r[1]]=parseFloat(r[2]))}),i},stop:function(n,t,i){var r=t&&t.frameAnimation;r&&(clearTimeout(r.delayTimeout),i&&r.finish(),delete t.frameAnimation)},_animationStep:function(i,r){var u=r&&r.frameAnimation,f;if(u){if(f=(new Date).valueOf(),f>=u.startTime+u.duration){u.finish();return}u.currentValue=this._calcStepValue(u,f-u.startTime),u.draw(),t.requestAnimationFrame(n.proxy(function(){this._animationStep(i,r)},this))}},_calcStepValue:function(t,i){var r=function(u,f){var e=n.isArray(f)?[]:{},o=function(r){var e=i/t.duration,o=i,s=1*u[r],h=f[r]-u[r],c=t.duration;return n.easing[t.easing](e,o,s,h,c)};return n.each(f,function(n,t){if(typeof t=="string"&&parseFloat(t,10)===!1)return!0;e[n]=typeof t=="object"?r(u[n],t):o(n)}),e};return r(t.from,t.to)},_normalizeValue:function(n){var t=parseFloat(n,10);return t===!1?n:t}},ut={transition:e.transition?rt:p,frame:p},w=function(n){return ut[n&&n.strategy||"transition"]},ft={linear:"cubic-bezier(0, 0, 1, 1)",ease:"cubic-bezier(0.25, 0.1, 0.25, 1)","ease-in":"cubic-bezier(0.42, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.58, 1)","ease-in-out":"cubic-bezier(0.42, 0, 0.58, 1)"},et=function(t){var i,r,u;return(t=ft[t]||t,i=t.match(tt),!i)?"linear":(i=i.slice(1,5),n.each(i,function(n,t){i[n]=parseFloat(t)}),r="cubicbezier_"+i.join("_").replace(/\./g,"p"),n.isFunction(n.easing[r])||(u=function(n,t,i,r){var u=3*n,f=3*(i-n)-u,o=1-u-f,e=3*t,s=3*(r-t)-e,h=1-e-s,c=function(n){return n*(u+n*(f+n*o))},l=function(n){return n*(e+n*(s+n*h))},a=function(n){for(var t=n,r=0,i;r<14;){if(i=c(t)-n,Math.abs(i)<.001)break;t=t-i/v(t),r++}return t},v=function(n){return u+n*(2*f+n*3*o)};return function(n){return l(a(n))}},n.easing[r]=function(n,t,r,f,e){return f*u(i[0],i[1],i[2],i[3])(t/e)+r}),r)},b=function(i,r){n.each(["from","to"],function(){if(!n.isPlainObject(i[this]))throw t.Error("E0010",r,this);})},ot={setup:function(){}},st={top:{my:"bottom center",at:"top center"},bottom:{my:"top center",at:"bottom center"},right:{my:"left center",at:"right center"},left:{my:"right center",at:"left center"}},s={validateConfig:function(n){b(n,"slide")},setup:function(t,i){var f=u.locate(t),r;i.type!=="slide"&&(r=i.type==="slideIn"?i.from:i.to,r.position=n.extend({of:window},st[i.direction]),v(t,r)),this._setUpConfig(f,i.from),this._setUpConfig(f,i.to),u.clearCache(t),e.transform||t.css("position")!=="static"||t.css("position","relative")},_setUpConfig:function(n,t){t.left="left"in t?t.left:"+=0",t.top="top"in t?t.top:"+=0",this._initNewPosition(n,t)},_initNewPosition:function(n,t){var f={left:t.left,top:t.top},o,s;delete t.left,delete t.top,o=this._getRelativeValue(f.left),o!==i?f.left=o+n.left:t.left=0,o=this._getRelativeValue(f.top),o!==i?f.top=o+n.top:t.top=0,s={x:0,y:0},e.transform?s={x:f.left,y:f.top}:(t.left=f.left,t.top=f.top),t[r]=u.getTranslateCss(s)},_getRelativeValue:function(n){var t;if(typeof n=="string"&&(t=it.exec(n)))return parseInt(t[1]+"1")*t[2]}},h={setup:function(t,i){var u=i.from,f=n.isPlainObject(u)?t.css("opacity"):String(u),r;switch(i.type){case"fadeIn":r=1;break;case"fadeOut":r=0;break;default:r=String(i.to)}i.from={visibility:"visible",opacity:f},i.to={opacity:r}}},ht={validateConfig:function(n){b(n,"pop")},setup:function(n,t){var i=t.from,f=t.to,o="opacity"in i?i.opacity:n.css("opacity"),s="opacity"in f?f.opacity:1,h="scale"in i?i.scale:0,c="scale"in f?f.scale:1,e;t.from={opacity:o},e=u.getTranslate(n),t.from[r]=this._getCssTransform(e,h),t.to={opacity:s},t.to[r]=this._getCssTransform(e,c)},_getCssTransform:function(n,t){return u.getTranslateCss(n)+"scale("+t+")"}},k={custom:ot,slide:s,slideIn:s,slideOut:s,fade:h,fadeIn:h,fadeOut:h,pop:ht},d=function(n){var i=k[n];if(!i)throw t.Error("E0011",n);return i},ct={type:"custom",from:{},to:{},duration:400,start:n.noop,complete:n.noop,easing:"ease",delay:0},lt=function(t,i){var u=n(t),r;return(i=n.extend(!0,{},ct,i),!u.length)?n.Deferred().resolve().promise():(r=d(i.type),n.isFunction(r.validateConfig)&&r.validateConfig(i),at(u,i))},at=function(t,i){i.deferred=i.deferred||n.Deferred();var r=c(t);return vt(t,r),r.push(i),l(t)||a(t,r),i.deferred.promise()},c=function(n){return n.data(o)||[]},vt=function(n,t){n.data(o,t)},g=function(n){n.removeData(o)},l=function(n){return!!n.data(f)},a=function(n,t){var t=c(n),i;t.length&&(i=t.shift(),t.length===0&&g(n),yt(n,i).done(function(){a(n)}))},yt=function(n,i){v(n,i.from),v(n,i.to);var r=d(i.type);return r.setup(n,i),n.data(f,i),t.fx.off&&(i.duration=0),nt(n,i.from),i.start.apply(this,[n,i]),w(i).animate(n,i).done(function(){n.removeData(f),i.complete.apply(this,[n,i]),i.deferred.resolveWith(this,[n,i])})},v=function(i,r){if(r.position){var u=t.calculatePosition(i,r.position),f=i.offset(),e=i.position();n.extend(r,{left:u.h.location-f.left+e.left,top:u.v.location-f.top+e.top}),delete r.position}},nt=function(t,i){n.each(i,function(n,i){t.css(n,i)})},pt=function(t,i){var r=n(t),e=c(r),u;n.each(e,function(n,t){t.duration=0}),l(r)||a(r,e),u=r.data(f),w(u).stop(r,u,i),r.removeData(f),g(r)};t.fx={off:!1,animationTypes:k,animate:lt,isAnimating:l,stop:pt}}(jQuery,DevExpress),function(n,t){var f=window.location,u="dxproxy.devexpress.com:8000",e=f.host===u,r={},o=function(){return f.pathname.split("/")[1]},s={isProxyUsed:function(){return e},formatProxyUrl:function(n){var i=t.parseUrl(n),f,e;return/^(localhost$|127\.)/i.test(i.hostname)?(f=u+"/"+o()+"_"+i.port,r[f]=i.hostname+":"+i.port,e="http://"+f+i.pathname+i.search):n},formatLocalUrl:function(n){var i,t;if(n.indexOf(u)<0)return n;i=n;for(t in r)if(r.hasOwnProperty(t)&&n.indexOf(t)>=0){i=n.replace(t,r[t]);break}return i}};t._proxyUrlFormatter=s}(jQuery,DevExpress),function(n,t){function e(n){return/^(localhost$|127\.)/i.test(n)}var r=window.location,u=r.protocol==="ms-appx:",f=e(r.hostname),o=t.EndpointSelector=function(n){this.config=n};o.prototype={urlFor:function(n){var i=this.config[n];if(!i)throw t.Error("E0006");return t._proxyUrlFormatter.isProxyUsed()?t._proxyUrlFormatter.formatProxyUrl(i.local):i.production&&(u&&!Debug.debuggerEnabled||!u&&!f)?i.production:i.local}}}(jQuery,DevExpress),function(n,t,i){var r=t.utils,f,u;t.NumericFormat={currency:"C",fixedpoint:"N",exponential:"",percent:"P",decimal:"D"},t.LargeNumberFormatPostfixes={1:"K",2:"M",3:"B",4:"T"},f=4,u=10,t.LargeNumberFormatPowers={largenumber:"auto",thousands:1,millions:2,billions:3,trillions:4},t.DateTimeFormat={longdate:"D",longtime:"T",monthandday:"M",monthandyear:"Y",quarterandyear:"qq",shortdate:"d",shorttime:"t",millisecond:"fff",second:"T",minute:"t",hour:"t",day:"dd",week:"dd",month:"MMMM",quarter:"qq",year:"yyyy",longdatelongtime:"D",shortdateshorttime:"d",shortyear:"yy"},t.formatHelper={defaultQuarterFormat:"Q{0}",romanDigits:["I","II","III","IV"],_addFormatSeparator:function(n,t){var i=" ";return t?n+i+t:n},_getDateTimeFormatPattern:function(n){return Globalize.findClosestCulture().calendar.patterns[t.DateTimeFormat[n.toLowerCase()]]},_isDateFormatContains:function(i){var r=!1;return n.each(t.DateTimeFormat,function(n){return r=n===i.toLowerCase(),!r}),r},getQuarter:function(n){return Math.floor(n/3)},getFirstQuarterMonth:function(n){return this.getQuarter(n)*3},_getQuarterString:function(n,t){var i=this.getQuarter(n.getMonth());switch(t){case"q":return this.romanDigits[i];case"qq":return r.stringFormat(this.defaultQuarterFormat,this.romanDigits[i]);case"Q":return(i+1).toString();case"QQ":return r.stringFormat(this.defaultQuarterFormat,(i+1).toString())}return""},_formatCustomString:function(n,t){var f=/qq|q|QQ|Q/g,i,u="",r=0;for(f.lastIndex=0;r<t.length;)i=f.exec(t),(!i||i.index>r)&&(u+=Globalize.format(n,t.substring(r,i?i.index:t.length))),i?(u+=this._getQuarterString(n,i[0]),r=i.index+i[0].length):r=t.length;return u},_parseNumberFormatString:function(i){var u,r={};if(i&&typeof i=="string")return u=i.toLowerCase().split(" "),n.each(u,function(n,i){i in t.NumericFormat?r.formatType=i:i in t.LargeNumberFormatPowers&&(r.power=t.LargeNumberFormatPowers[i])}),r.power&&!r.formatType&&(r.formatType="fixedpoint"),r.formatType?r:void 0},_calculateNumberPower:function(n,t,r,u){var f=Math.abs(n),e=0;if(f>1)while(f&&f>=t&&(u===i||e<u))e++,f=f/t;else if(f>0&&f<1)while(f<1&&(r===i||e>r))e--,f=f*t;return e},_getNumberByPower:function(n,t,i){for(var r=n;t>0;)r=r/i,t--;while(t<0)r=r*i,t++;return r},_formatNumber:function(n,i,r){var u;return i.power==="auto"&&(i.power=this._calculateNumberPower(n,1e3,0,f)),i.power&&(n=this._getNumberByPower(n,i.power,1e3)),u=t.LargeNumberFormatPostfixes[i.power]||"",this._formatNumberCore(n,i.formatType,r)+u},_formatNumberExponential:function(n,t){var r=this._calculateNumberPower(n,u),f=this._getNumberByPower(n,r,u),e;return t=t===i?1:t,f.toFixed(t||0)>=u&&(r++,f=f/u),e=(r>=0?"+":"")+r.toString(),this._formatNumberCore(f,"fixedpoint",t)+"E"+e},_formatNumberCore:function(n,i,u){return i==="exponential"?this._formatNumberExponential(n,u):Globalize.format(n,t.NumericFormat[i]+(r.isNumber(u)?u:0))},_formatDate:function(n,i){var u=t.DateTimeFormat[i.toLowerCase()];return(i=i.toLowerCase(),i==="quarterandyear"&&(u=this._getQuarterString(n,u)+" yyyy"),i==="quarter")?this._getQuarterString(n,u):i==="longdatelongtime"?this._formatDate(n,"longdate")+" "+this._formatDate(n,"longtime"):i==="shortdateshorttime"?this._formatDate(n,"shortDate")+" "+this._formatDate(n,"shortTime"):Globalize.format(n,u)},format:function(t,i,u){if(n.isPlainObject(i)&&i.format){if(i.dateType)return this._formatDateEx(t,i);if(r.isNumber(t)&&isFinite(t))return this._formatNumberEx(t,i)}return this._format(t,i,u)},_format:function(n,t,i){var u;return!r.isString(t)||t===""||!r.isNumber(n)&&!r.isDate(n)?r.isDefined(n)?n.toString():"":(u=this._parseNumberFormatString(t),r.isNumber(n)&&u)?this._formatNumber(n,u,i):r.isDate(n)&&this._isDateFormatContains(t)?this._formatDate(n,t):!u&&!this._isDateFormatContains(t)?this._formatCustomString(n,t):void 0},_formatNumberEx:function(n,i){var l=this,p=t.NumericFormat[i.format.toLowerCase()],e=Globalize.culture().numberFormat,b=i.currencyCulture&&Globalize.cultures[i.currencyCulture]?Globalize.cultures[i.currencyCulture].numberFormat.currency:e.currency,k=e.percent,a=l._getUnitFormatSettings(n,i),d=a.unit,v=a.precision,tt=a.showTrailingZeros,it=a.includeGroupSeparator,rt=e[","],ut=e["."],u,y,s,f,g=/n|\$|-|%/g,o="",h,w,nt,c;if(!r.isDefined(n))return"";n=l._applyUnitToValue(n,d),u=Math.abs(n),y=n<0;switch(p){case t.NumericFormat.decimal:if(s="n",u=Math[y?"ceil":"floor"](u),v>0){for(h=""+u,w=h.length;w<v;w+=1)h="0"+h;u=h}y&&(u="-"+u);break;case t.NumericFormat.fixedpoint:f=e;case t.NumericFormat.currency:f=f||b;case t.NumericFormat.percent:f=f||k,s=y?f.pattern[0]:f.pattern[1]||"n",u=Globalize.format(u*(p===t.NumericFormat.percent?100:1),"N"+v),tt||(u=l._excludeTrailingZeros(u,ut)),it||(u=u.replace(new RegExp("\\"+rt,"g"),""));break;case t.NumericFormat.exponential:return l._formatNumberExponential(n,v);default:throw"Illegal numeric format: '"+p+"'";}for(;;)if(nt=g.lastIndex,c=g.exec(s),o+=s.slice(nt,c?c.index:s.length),c)switch(c[0]){case"-":/[1-9]/.test(u)&&(o+=e["-"]);break;case"$":o+=b.symbol;break;case"%":o+=k.symbol;break;case"n":o+=u+d}else break;return(i.plus&&n>0?"+":"")+o},_excludeTrailingZeros:function(n,t){var u=n.indexOf(t),r,i;if(u<0)return n;for(r=n.length,i=r-1;i>=u&&(n[i]==="0"||i===u);i--)r--;return n.substring(0,r)},_getUnitFormatSettings:function(n,t){var e=t.unit||"",u=t.precision||0,h=t.includeGroupSeparator||!1,s=t.showTrailingZeros===i?!0:t.showTrailingZeros,f=t.significantDigits||1,r,o;if(e.toLowerCase()==="auto")if(s=!1,r=Math.abs(n),f<1&&(f=1),r>=1e9?(e="B",r/=1e9):r>=1e6?(e="M",r/=1e6):r>=1e3?(e="K",r/=1e3):e="",r==0)u=0;else if(r<1)for(u=f,o=Math.pow(10,-f);r<o;)o/=10,u++;else u=r>=100?f-3:r>=10?f-2:f-1;return u<0&&(u=0),{unit:e,precision:u,showTrailingZeros:s,includeGroupSeparator:h}},_applyUnitToValue:function(n,t){return t=="B"?n.toFixed(1)/1e9:t=="M"?n/1e6:t=="K"?n/1e3:n},_formatDateEx:function(t,u){var e=this,l=u.format,f=u.dateType,c=Globalize.culture().calendars.standard,s=i,h,o;if(l=l.toLowerCase(),!r.isDefined(t))return"";if(f!=="num"||l==="dayofweek")switch(l){case"monthyear":return e._formatDate(t,"monthandyear");case"quarteryear":return e._getQuarterString(t,"QQ")+" "+t.getFullYear();case"daymonthyear":return e._formatDate(t,f+"Date");case"datehour":return s=new Date(t.getTime()),s.setMinutes(0),o=f==="timeOnly"?"":e._formatDate(t,f+"Date"),f==="timeOnly"?e._formatDate(s,"shorttime"):o+" "+e._formatDate(s,"shorttime");case"datehourminute":return o=f==="timeOnly"?"":e._formatDate(t,f+"Date"),f==="timeOnly"?e._formatDate(t,"shorttime"):o+" "+e._formatDate(t,"shorttime");case"datehourminutesecond":return o=f==="timeOnly"?"":e._formatDate(t,f+"Date"),f==="timeOnly"?e._formatDate(t,"longtime"):o+" "+e._formatDate(t,"longtime");case"year":return o=t.toString(),f==="abbr"?o.slice(2,4):o;case"dateyear":return f==="abbr"?e._formatDate(t,"shortyear"):e._formatDate(t,"year");case"quarter":return r.stringFormat(e.defaultQuarterFormat,t.toString());case"month":return h=t-1,f==="abbr"?c.months.namesAbbr[h]:c.months.names[h];case"hour":return f==="long"?(s=new Date,s.setHours(t),s.setMinutes(0),e._formatDate(s,"shorttime")):t.toString();case"dayofweek":return h=r.isString(t)?n.inArray(t,["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]):t,f!=="num"?f==="abbr"?c.days.namesAbbr[h]:c.days.names[h]:((h-c.firstDay+1+7)%8).toString();default:return t.toString()}else return t.toString()},getTimeFormat:function(n){return n?this._getDateTimeFormatPattern("longtime"):this._getDateTimeFormatPattern("shorttime")},getDateFormatByDifferences:function(n){var i="";return(n.millisecond&&(i=t.DateTimeFormat.millisecond),(n.hour||n.minute||n.second)&&(i=this._addFormatSeparator(this.getTimeFormat(n.second),i)),n.year&&n.month&&n.day)?this._addFormatSeparator(this._getDateTimeFormatPattern("shortdate"),i):n.year&&n.month?t.DateTimeFormat.monthandyear:n.year?t.DateTimeFormat.year:n.month&&n.day?this._addFormatSeparator(this._getDateTimeFormatPattern("monthandday"),i):n.month?t.DateTimeFormat.month:n.day?this._addFormatSeparator("dddd, dd",i):i},getDateFormatByTicks:function(n){var f,t,u,i,e;if(n.length>1)for(t=r.getDatesDifferences(n[0],n[1]),i=1;i<n.length-1;i++)u=r.getDatesDifferences(n[i],n[i+1]),t.count<u.count&&(t=u);else t={year:!0,month:!0,day:!0,hour:n[0].getHours()>0,minute:n[0].getMinutes()>0,second:n[0].getSeconds()>0};return f=this.getDateFormatByDifferences(t)},getDateFormatByTickInterval:function(n,t,i){var e,u,f,s={quarter:"month",week:"day"},o=function(n,t,i){switch(t){case"year":n.month=i;case"quarter":case"month":n.day=i;case"week":case"day":n.hour=i;case"hour":n.minute=i;case"minute":n.second=i;case"second":n.millisecond=i}},h=function(n,t,i){!i.getMilliseconds()&&i.getSeconds()?i.getSeconds()-t.getSeconds()==1&&(n.millisecond=!0,n.second=!1):!i.getSeconds()&&i.getMinutes()?i.getMinutes()-t.getMinutes()==1&&(n.second=!0,n.minute=!1):!i.getMinutes()&&i.getHours()?i.getHours()-t.getHours()==1&&(n.minute=!0,n.hour=!1):!i.getHours()&&i.getDate()>1?i.getDate()-t.getDate()==1&&(n.hour=!0,n.day=!1):i.getDate()===1&&i.getMonth()?i.getMonth()-t.getMonth()==1&&(n.day=!0,n.month=!1):!i.getMonth()&&i.getFullYear()&&i.getFullYear()-t.getFullYear()==1&&(n.month=!0,n.year=!1)};return i=r.isString(i)?i.toLowerCase():i,u=r.getDatesDifferences(n,t),n!==t&&h(u,n>t?t:n,n>t?n:t),f=r.getDateUnitInterval(u),o(u,f,!0),f=r.getDateUnitInterval(i||"second"),o(u,f,!1),u[s[f]||f]=!0,e=this.getDateFormatByDifferences(u)}}}(jQuery,DevExpress),function(n){function u(n){this.baseColor=n;var t;n&&(t=String(n).toLowerCase().replace(/ /g,""),t=c[t]?"#"+c[t]:t,t=a(t)),t||(this.colorIsInvalid=!0),t=t||{},this.r=i(t[0]),this.g=i(t[1]),this.b=i(t[2]),this.a=i(t[3],1,1),this.hsv=t[4]?{h:t[4][0],s:t[4][1],v:t[4][2]}:y(this.r,this.g,this.b),this.hsl=t[5]?{h:t[5][0],s:t[5][1],l:t[5][2]}:w(this.r,this.g,this.b)}function a(n){if(n==="transparent")return[0,0,0,0];for(var u,t=0,r=e.length,i;t<r;++t)if(i=e[t].re.exec(n),i)return e[t].process(i);return null}function i(n,t,i){return t=t||0,i=i||255,n<0||isNaN(n)?t:n>i?i:n}function v(n,t,i){return"#"+(16777216|n<<16|t<<8|i).toString(16).slice(1)}function y(n,t,i){var u=Math.max(n,t,i),f=Math.min(n,t,i),e=u-f,r,o,s;if(s=u,o=u===0?0:1-f/u,u===f)r=0;else switch(u){case n:r=60*((t-i)/e),t<i&&(r=r+360);break;case t:r=60*((i-n)/e)+120;break;case i:r=60*((n-t)/e)+240}return o*=100,s*=100/255,{h:Math.round(r),s:Math.round(o),v:Math.round(s)}}function l(n,t,i){var o,s,r,c,h,u,f,e;c=Math.floor(n/60),r=(100-t)*i/100,h=(i-r)*(n%60/60),s=r+h,o=i-h;switch(c){case 0:u=i,f=s,e=r;break;case 1:u=o,f=i,e=r;break;case 2:u=r,f=i,e=s;break;case 3:u=r,f=o,e=i;break;case 4:u=s,f=r,e=i;break;case 5:u=i,f=r,e=o}return[Math.round(u*2.55),Math.round(f*2.55),Math.round(e*2.55)]}function p(n,t,i,r){var u=Math.max(n,t,i);switch(u){case n:return(t-i)/r+(t<i?6:0);case t:return(i-n)/r+2;case i:return(n-t)/r+4}}function w(n,t,i){var o;n=f(n,255),t=f(t,255),i=f(i,255);var s=Math.max(n,t,i),h=Math.min(n,t,i),c=s+h,u,e,l=c/2;return s===h?u=e=0:(o=s-h,e=l>.5?o/(2-c):o/c,u=p(n,t,i,o),u/=6),{h:r(u*360),s:r(e*100),l:r(l*100)}}function o(n,t){var i=t;return n==="r"&&(i=t+1/3),n==="b"&&(i=t-1/3),i}function b(n){return n<0&&(n+=1),n>1&&(n-=1),n}function s(n,t,i){return(i=b(i),i<1/6)?n+(t-n)*6*i:i<1/2?t:i<2/3?n+(t-n)*(2/3-i)*6:n}function k(n,t,i){var h,c,l,n=f(n,360),t=f(t,100),i=f(i,100),u,e;return t===0?h=c=l=i:(u=i<.5?i*(1+t):i+t-i*t,e=2*i-u,h=s(e,u,o("r",n)),c=s(e,u,o("g",n)),l=s(e,u,o("b",n))),[r(h*255),r(c*255),r(l*255)]}function f(n,t){return(n=Math.min(t,Math.max(0,parseFloat(n))),Math.abs(n-t)<1e-6)?1:n%t/parseFloat(t)}function h(n,t,i){return(t=t||0,i=i||255,n%1!=0||n<t||n>i||typeof n!="number"||isNaN(n))?!1:!0}var c={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(n){return[parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10)]}},{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d*\.*\d+)\)$/,process:function(n){return[parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),parseFloat(n[4])]}},{re:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/,process:function(n){return[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]}},{re:/^#([a-f0-9]{1})([a-f0-9]{1})([a-f0-9]{1})$/,process:function(n){return[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]}},{re:/^hsv\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(n){var i=parseInt(n[1],10),r=parseInt(n[2],10),u=parseInt(n[3],10),t=l(i,r,u);return[t[0],t[1],t[2],1,[i,r,u]]}},{re:/^hsl\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(n){var i=parseInt(n[1],10),r=parseInt(n[2],10),u=parseInt(n[3],10),t=k(i,r,u);return[t[0],t[1],t[2],1,null,[i,r,u]]}}],r=Math.round;u.prototype={constructor:u,highlight:function(n){return n=n||10,this.alter(n).toHex()},darken:function(n){return n=n||10,this.alter(-n).toHex()},alter:function(n){var t=new u;return t.r=i(this.r+n),t.g=i(this.g+n),t.b=i(this.b+n),t},blend:function(n,t){var e=n instanceof u?n:new u(n),f=new u;return f.r=i(r(this.r*(1-t)+e.r*t)),f.g=i(r(this.g*(1-t)+e.g*t)),f.b=i(r(this.b*(1-t)+e.b*t)),f},toHex:function(){return v(this.r,this.g,this.b)},getPureColor:function(){var n=l(this.hsv.h,100,100);return new u("rgb("+n.join(",")+")")},isValidHex:function(n){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(n)},isValidRGB:function(n,t,i){return!h(n)||!h(t)||!h(i)?!1:!0},isValidAlpha:function(n){return isNaN(n)||n<0||n>1||typeof n!="number"?!1:!0},colorIsInvalid:!1},n.Color=u}(DevExpress),function(n,t){Globalize.localize=function(n,t){var i=(t||this.cultureSelector||"").substring(0,2);return this.findClosestCulture(t).messages[n]||this.findClosestCulture(i).messages[n]||this.cultures["default"].messages[n]};var r=function(){var i={};return{setup:function(n){this.localizeString=function(r){var u=new RegExp("(^|[^a-zA-Z_0-9"+n+"-]+)("+n+"{1,2})([a-zA-Z_0-9-]+)","g"),f=n+n;return r.replace(u,function(r,u,e,o){var s=u+n+o;return e!==f&&(Globalize.cultures["default"].messages[o]?s=u+Globalize.localize(o):i[o]=t.inflector.humanize(o)),s})}},localizeNode:function(t){var i=this;n(t).each(function(t,r){r.nodeType&&(r.nodeType===3?r.nodeValue=i.localizeString(r.nodeValue):n(r).is("iframe")||(n.each(r.attributes||[],function(n,t){if(typeof t.value=="string"){var r=i.localizeString(t.value);t.value!==r&&(t.value=r)}}),n(r).contents().each(function(n,t){i.localizeNode(t)})))})},getDictionary:function(t){return t?i:n.extend({},i,Globalize.cultures["default"].messages)}}}();r.setup("@"),t.localization=r}(jQuery,DevExpress),Globalize.addCultureInfo("default",{messages:{Yes:"Yes",No:"No",Cancel:"Cancel",Clear:"Clear",Done:"Done",Loading:"Loading...",Select:"Select...",Search:"Search",Back:"Back",OK:"OK","dxCollectionWidget-noDataText":"No data to display","validation-required":"Required","validation-required-formatted":"{0} is required","validation-numeric":"Value should be a number","validation-numeric-formatted":"{0} should be a number","validation-range":"Value is out of range","validation-range-formatted":"{0} is out of range","validation-stringLength":"The length of the value is not correct","validation-stringLength-formatted":"The length of {0} is not correct","validation-custom":"Value is invalid","validation-custom-formatted":"{0} is invalid","validation-compare":"Values do not match","validation-compare-formatted":"{0} does not match","validation-pattern":"Value does not match pattern","validation-pattern-formatted":"{0} does not match pattern","validation-email":"Email is invalid","validation-email-formatted":"{0} is invalid"}}),Globalize.addCultureInfo("default",{messages:{"dxLookup-searchPlaceholder":"Minimum character number: {0}","dxList-pullingDownText":"Pull down to refresh...","dxList-pulledDownText":"Release to refresh...","dxList-refreshingText":"Refreshing...","dxList-pageLoadingText":"Loading...","dxList-nextButtonText":"More","dxList-selectAll":"Select All","dxListEditDecorator-delete":"Delete","dxListEditDecorator-more":"More","dxScrollView-pullingDownText":"Pull down to refresh...","dxScrollView-pulledDownText":"Release to refresh...","dxScrollView-refreshingText":"Refreshing...","dxScrollView-reachBottomText":"Loading...","dxDateBox-simulatedDataPickerTitleTime":"Select time","dxDateBox-simulatedDataPickerTitleDate":"Select date","dxDateBox-simulatedDataPickerTitleDateTime":"Select date and time","dxFileUploader-selectFile":"Select file","dxFileUploader-dropFile":"or Drop file here","dxFileUploader-bytes":"bytes","dxFileUploader-kb":"kb","dxFileUploader-Mb":"Mb","dxFileUploader-Gb":"Gb"}}),Globalize.addCultureInfo("default",{messages:{"dxSwitch-onText":"ON","dxSwitch-offText":"OFF"}}),Globalize.addCultureInfo("default",{messages:{"dxDataGrid-columnChooserTitle":"Column Chooser","dxDataGrid-columnChooserEmptyText":"Drag a column here to hide it","dxDataGrid-groupContinuesMessage":"Continues on the next page","dxDataGrid-groupContinuedMessage":"Continued from the previous page","dxDataGrid-editingEditRow":"Edit","dxDataGrid-editingSaveRowChanges":"Save","dxDataGrid-editingCancelRowChanges":"Cancel","dxDataGrid-editingDeleteRow":"Delete","dxDataGrid-editingUndeleteRow":"Undelete","dxDataGrid-editingConfirmDeleteMessage":"Are you sure you want to delete this record?","dxDataGrid-editingConfirmDeleteTitle":"","dxDataGrid-groupPanelEmptyText":"Drag a column header here to group by that column","dxDataGrid-noDataText":"No data","dxDataGrid-searchPanelPlaceholder":"Search...","dxDataGrid-filterRowShowAllText":"(All)","dxDataGrid-filterRowResetOperationText":"Reset","dxDataGrid-filterRowOperationEquals":"Equals","dxDataGrid-filterRowOperationNotEquals":"Does not equal","dxDataGrid-filterRowOperationLess":"Less than","dxDataGrid-filterRowOperationLessOrEquals":"Less than or equal to","dxDataGrid-filterRowOperationGreater":"Greater than","dxDataGrid-filterRowOperationGreaterOrEquals":"Greater than or equal to","dxDataGrid-filterRowOperationStartsWith":"Starts with","dxDataGrid-filterRowOperationContains":"Contains","dxDataGrid-filterRowOperationNotContains":"Does not contain","dxDataGrid-filterRowOperationEndsWith":"Ends with","dxDataGrid-applyFilterText":"Apply filter","dxDataGrid-trueText":"true","dxDataGrid-falseText":"false","dxDataGrid-sortingAscendingText":"Sort Ascending","dxDataGrid-sortingDescendingText":"Sort Descending","dxDataGrid-sortingClearText":"Clear Sorting","dxDataGrid-editingSaveAllChanges":"Save changes","dxDataGrid-editingCancelAllChanges":"Discard changes","dxDataGrid-editingAddRow":"Add a row","dxDataGrid-summaryMin":"Min: {0}","dxDataGrid-summaryMinOtherColumn":"Min of {1} is {0}","dxDataGrid-summaryMax":"Max: {0}","dxDataGrid-summaryMaxOtherColumn":"Max of {1} is {0}","dxDataGrid-summaryAvg":"Avg: {0}","dxDataGrid-summaryAvgOtherColumn":"Avg of {1} is {0}","dxDataGrid-summarySum":"Sum: {0}","dxDataGrid-summarySumOtherColumn":"Sum of {1} is {0}","dxDataGrid-summaryCount":"Count: {0}","dxPager-infoText":"Page {0} of {1}"}}),function(n,t){var r=t.utils,u={required:{validate:function(t,i){return r.isDefined(t)?t===!1?!1:(t=String(t),(i.trim||!r.isDefined(i.trim))&&(t=n.trim(t)),t!==""):!1},defaultMessage:Globalize.localize("validation-required"),defaultFormattedMessage:Globalize.localize("validation-required-formatted")},numeric:{validate:function(t){return u.required.validate(t,{})?n.isNumeric(t):!0},defaultMessage:Globalize.localize("validation-numeric"),defaultFormattedMessage:Globalize.localize("validation-numeric-formatted")},range:{validate:function(n,i){if(!u.required.validate(n,{}))return!0;var s=u.numeric.validate(n,i),h=r.isDefined(n),f=s?parseFloat(n):h&&n.valueOf(),o=i.min,e=i.max;if(!(s||r.isDate(n))&&!h)return!1;if(r.isDefined(o))return r.isDefined(e)?f>=o&&f<=e:f>=o;if(r.isDefined(e))return f<=e;throw t.Error("E0101");return!1},defaultMessage:Globalize.localize("validation-range"),defaultFormattedMessage:Globalize.localize("validation-range-formatted")},stringLength:{validate:function(t,i){return t=String(t),(i.trim||!r.isDefined(i.trim))&&(t=n.trim(t)),u.range.validate(t.length,n.extend({},i))},defaultMessage:Globalize.localize("validation-stringLength"),defaultFormattedMessage:Globalize.localize("validation-stringLength-formatted")},custom:{validate:function(n,t){return t.validationCallback({value:n,validator:t.validator,rule:t})},defaultMessage:Globalize.localize("validation-custom"),defaultFormattedMessage:Globalize.localize("validation-custom-formatted")},compare:{validate:function(i,r){if(!r.comparisonTarget)throw t.Error("E0102");n.extend(r,{reevaluate:!0});var u=r.comparisonTarget(),f=r.comparisonType||"==";switch(f){case"==":return i==u;case"!=":return i!=u;case"===":return i===u;case"!==":return i!==u;case">":return i>u;case">=":return i>=u;case"<":return i<u;case"<=":return i<=u}},defaultMessage:Globalize.localize("validation-compare"),defaultFormattedMessage:Globalize.localize("validation-compare-formatted")},pattern:{validate:function(n,t){if(!u.required.validate(n,{}))return!0;var i=t.pattern;return r.isString(i)&&(i=new RegExp(i)),i.test(n)},defaultMessage:Globalize.localize("validation-pattern"),defaultFormattedMessage:Globalize.localize("validation-pattern-formatted")},email:{validate:function(t,i){return u.required.validate(t,{})?u.pattern.validate(t,n.extend({},i,{pattern:/^[\d\w\._\-]+@([\d\w\._\-]+\.)+[\w]+$/i})):!0},defaultMessage:Globalize.localize("validation-email"),defaultFormattedMessage:Globalize.localize("validation-email-formatted")}},f=t.Class.inherit({ctor:function(n){this.group=n,this.validators=[]},validate:function(){var t={isValid:!0,brokenRules:[],validators:[]};return n.each(this.validators,function(n,i){var r=i.validate();t.isValid=t.isValid&&r.isValid,r.brokenRule&&t.brokenRules.push(r.brokenRule),t.validators.push(i)}),this.fireEvent("validated",[{validators:t.validators,brokenRules:t.brokenRules,isValid:t.isValid}]),t},reset:function(){n.each(this.validators,function(n,t){t.reset()})}}).include(t.EventsMixin);t.validationEngine={groups:[],getGroupConfig:function(t){var i=n.grep(this.groups,function(n){return n.group===t});if(i.length)return i[0]},initGroups:function(){this.groups=[],this.addGroup()},addGroup:function(n){var t=this.getGroupConfig(n);return t||(t=new f(n),this.groups.push(t)),t},removeGroup:function(t){var i=this.getGroupConfig(t),r=n.inArray(i,this.groups);return r>-1&&this.groups.splice(r,1),i},_setDefaultMessage:function(n,t,i){r.isDefined(n.message)||(n.message=t.defaultFormattedMessage&&r.isDefined(i)?t.defaultFormattedMessage.replace(/\{0\}/,i):t.defaultMessage)},validate:function(i,f,e){var o={name:e,value:i,brokenRule:null,isValid:!0,validationRules:f},s=this;return n.each(f||[],function(n,f){var h=u[f.type],c;if(h){if(r.isDefined(f.isValid)&&f.value===i&&!f.reevaluate)return f.isValid?!0:(o.isValid=!1,o.brokenRule=f,!1);if(f.value=i,c=h.validate(i,f),f.isValid=c,c||(o.isValid=!1,s._setDefaultMessage(f,h,e),o.brokenRule=f),!f.isValid)return!1}else throw t.Error("E0100");}),o},registerValidatorInGroup:function(i,r){var u=t.validationEngine.addGroup(i);n.inArray(r,u.validators)<0&&u.validators.push(r)},removeRegistredValidator:function(i,r){var u=t.validationEngine.getGroupConfig(i),f=u&&u.validators,e=n.inArray(r,f);e>-1&&f.splice(e,1)},validateGroup:function(n){var i=t.validationEngine.getGroupConfig(n);if(!i)throw t.Error("E0110");return i.validate()},resetGroup:function(n){var i=t.validationEngine.getGroupConfig(n);if(!i)throw t.Error("E0110");return i.reset()}},t.validationEngine.initGroups()}(jQuery,DevExpress),function(n,t){n.extend(t.ERROR_MESSAGES,{E4000:"[DevExpress.data]: {0}",E4001:"Unknown aggregating function is detected: '{0}'",E4002:"Unsupported OData protocol version is used",E4003:"Unknown filter operation is used: {0}",E4004:"The thenby() method is called before the sortby() method",E4005:"Store requires a key expression for this operation",E4006:"ArrayStore 'data' option must be an array",E4007:"Compound keys cannot be auto-generated",E4008:"Attempt to insert an item with the a duplicated key",E4009:"Data item cannot be found by the parameters passed to the update(key,values) function",E4010:"CustomStore does not support creating queries",E4011:"Custom Store method is not implemented or is not a function: {0}",E4012:"Custom Store method returns an invalid value: {0}",E4013:"Local Store requires the 'name' configuration option is specified",E4014:"Unknown key type is detected: {0}",E4015:"Unknown entity name or alias is used: {0}",E4016:"The compileSetter(expr) method is called with 'self' passed as a parameter"})}(jQuery,DevExpress),function(n,t,i){var o=function(n){return n.replace(/\[/g,".").replace(/\]/g,"")},v=t.utils.unwrapObservable,s=function(n){return t.support.hasKo&&ko.isObservable(n)},h=function(n,t){return t==="this"?n:n[t]},c=function(n,i,r,u){if(i==="this")throw new t.Error("E4016");var f=n[i];u.unwrapObservables&&s(f)?f(r):n[i]=r},l=function(n){return n=n||{},n.unwrapObservables=n.unwrapObservables!==i?n.unwrapObservables:!0,n},u=function(n,t){return t.unwrapObservables?v(n):n},f=function(t){if(arguments.length>1&&(t=n.makeArray(arguments)),!t||t==="this")return function(n){return n};if(n.isFunction(t))return t;if(n.isArray(t))return y(t);t=o(t);var i=t.split(".");return function(t,r){r=l(r);var f=u(t,r);return n.each(i,function(){if(!f)return!1;var t=u(f[this],r);n.isFunction(t)&&!r.functionsAsIs&&(t=t.call(f)),f=t}),f}},y=function(t){var r={};return n.each(t,function(){r[this]=f(this)}),function(t,u){var f={};return n.each(r,function(n){var s=this(t,u),e,o,h,r;if(s!==i){for(e=f,o=n.split("."),h=o.length-1,r=0;r<h;r++)e=e[o[r]]={};e[o[r]]=s}}),f}},p=function(r){r=r||"this",r=o(r);var a=r.lastIndexOf("."),v=f(r.substr(0,a)),e=r.substr(1+a);return function(r,f,o){o=l(o);var y=v(r,{functionsAsIs:o.functionsAsIs,unwrapObservables:o.unwrapObservables}),a=h(y,e);o.functionsAsIs||!n.isFunction(a)||s(a)?(a=u(a,o),o.merge&&n.isPlainObject(f)&&(a===i||n.isPlainObject(a))&&!(f instanceof n.Event)?(a||c(y,e,{},o),t.utils.deepExtendArraySafe(u(h(y,e),o),f)):c(y,e,f,o)):y[e](f)}},w=function(n){return[n[0],n.length<3?"=":String(n[1]).toLowerCase(),n.length<2?!0:n[n.length-1]]},b=function(t){return n.isArray(t)||(t=[t]),n.map(t,function(t){return{selector:n.isFunction(t)||typeof t=="string"?t:t.getter||t.field||t.selector,desc:!!(t.desc||String(t.dir).charAt(0).toLowerCase()==="d")}})},a=t.Class.inherit({ctor:function(n){n&&(n=String(n)),this._value=this._normalize(n||this._generate())},_normalize:function(n){for(n=n.replace(/[^a-f0-9]/ig,"").toLowerCase();n.length<32;)n+="0";return[n.substr(0,8),n.substr(8,4),n.substr(12,4),n.substr(16,4),n.substr(20,12)].join("-")},_generate:function(){for(var t="",n=0;n<32;n++)t+=Math.round(Math.random()*15).toString(16);return t},toString:function(){return this._value},valueOf:function(){return this._value},toJSON:function(){return this._value}}),r=function(n,t){return n instanceof Date?n.getTime():n instanceof a?n.valueOf():!t&&typeof n=="string"?n.toLowerCase():n},k=function(t,i,u){var e,o,f;if(n.isArray(t)){for(e=n.map(i,function(n,t){return t}),f=0;f<e.length;f++)if(o=e[f],r(i[o],!0)!=r(u[o],!0))return!1;return!0}return r(i,!0)==r(u,!0)},d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",g=function(t){var r,i;for(n.isArray(t)||(t=nt(String(t))),r="",i=0;i<t.length;i+=3){var e=t[i],u=t[i+1],f=t[i+2];r+=n.map([e>>2,(e&3)<<4|u>>4,isNaN(u)?64:(u&15)<<2|f>>6,isNaN(f)?64:f&63],function(n){return d.charAt(n)}).join("")}return r},nt=function(n){for(var i=[],t,r=0;r<n.length;r++)t=n.charCodeAt(r),t<128?i.push(t):t<2048?i.push(192+(t>>6),128+(t&63)):t<65536?i.push(224+(t>>12),128+(t>>6&63),128+(t&63)):t<2097152&&i.push(240+(t>>18),128+(t>>12&63),128+(t>>6&63),128+(t&63));return i},tt=function(){var n={timeout:"Network connection timeout",error:"Unspecified network error",parsererror:"Unexpected server response"},t=function(t){var i=n[t];return i?i:t};return function(n,i){return n.status<400?t(i):n.statusText}}(),it={count:{seed:0,step:function(n){return 1+n}},sum:{seed:0,step:function(n,t){return n+t}},min:{step:function(n,t){return t<n?t:n}},max:{step:function(n,t){return t>n?t:n}},avg:{seed:[0,0],step:function(n,t){return[n[0]+t,n[1]+1]},finalize:function(n){return n[1]?n[0]/n[1]:NaN}}},e=t.data={utils:{compileGetter:f,compileSetter:p,normalizeBinaryCriterion:w,normalizeSortingInfo:b,toComparable:r,keysEqual:k,errorMessageFromXhr:tt,aggregators:it},Guid:a,base64_encode:g,queryImpl:{},queryAdapters:{},query:function(){var t=n.isArray(arguments[0])?"array":"remote";return e.queryImpl[t].apply(this,arguments)},errorHandler:null,_errorHandler:function(n){e.errorHandler&&e.errorHandler(n)}}}(jQuery,DevExpress),function(n,t){function e(n){return n===u.aggregators.count}function f(n){var f=u.compileGetter(n.selector),i=n.aggregator;if(typeof i=="string"&&(i=r.utils.aggregators[i],!i))throw t.Error("E4001",n.aggregator);return{selector:f,aggregator:i}}var r=t.data,u=r.utils;r.AggregateCalculator=t.Class.inherit({ctor:function(t){this._data=t.data,this._groupLevel=t.groupLevel||0,this._totalAggregates=n.map(t.totalAggregates||[],f),this._groupAggregates=n.map(t.groupAggregates||[],f),this._totals=[]},calculate:function(){this._totalAggregates.length&&this._calculateTotals(0,{items:this._data}),this._groupAggregates.length&&this._groupLevel>0&&this._calculateGroups(0,{items:this._data})},_aggregate:function(n,t,i){for(var u,r=0;r<t.length;r++){if(e(t[r].aggregator)){i[r]=(i[r]||0)+n.items.length;continue}for(u=0;u<n.items.length;u++)this._accumulate(r,t[r],i,n.items[u])}},_calculateTotals:function(n,t){var i,r;if(n===0&&(this._totals=this._seed(this._totalAggregates)),n===this._groupLevel)this._aggregate(t,this._totalAggregates,this._totals);else for(i=0;i<t.items.length;i++)this._calculateTotals(n+1,t.items[i]);n===0&&(this._totals=this._finalize(this._totalAggregates,this._totals))},_calculateGroups:function(n,t,i){var r,f,u;if(n===this._groupLevel)this._aggregate(t,this._groupAggregates,i);else for(r=0;r<t.items.length;r++)u=this._seed(this._groupAggregates),this._calculateGroups(n+1,t.items[r],u),t.items[r].aggregates=this._finalize(this._groupAggregates,u),n>0&&(i=i||this._seed(this._groupAggregates),this._calculateGroups(n+1,t.items[r],i))},totalAggregates:function(){return this._totals},_seed:function(t){return n.map(t,function(t){var u=t.aggregator,r="seed"in u?u.seed:NaN;return n.isArray(r)?[r]:r})},_accumulate:function(n,t,i,r){var u=t.selector(r),f=t.aggregator;i[n]=i[n]!==i[n]?u:f.step(i[n],u)},_finalize:function(t,i){return n.map(t,function(n,t){var r=n.aggregator.finalize;return r?r(i[t]):i[t]})}})}(jQuery,DevExpress),function(n,t,i){var v=t.Class,u=t.data,l=u.queryImpl,f=u.utils.compileGetter,r=u.utils.toComparable,e=v.inherit({toArray:function(){var n=[];for(this.reset();this.next();)n.push(this.current());return n},countable:function(){return!1}}),s=e.inherit({ctor:function(n){this.array=n,this.index=-1},next:function(){return this.index+1<this.array.length?(this.index++,!0):!1},current:function(){return this.array[this.index]},reset:function(){this.index=-1},toArray:function(){return this.array.slice(0)},countable:function(){return!0},count:function(){return this.array.length}}),o=e.inherit({ctor:function(n){this.iter=n},next:function(){return this.iter.next()},current:function(){return this.iter.current()},reset:function(){return this.iter.reset()}}),h=o.inherit({ctor:function(n,t){this.callBase(n),this.index=-1,this.mapper=t},current:function(){return this.mapper(this.callBase(),this.index)},next:function(){var n=this.callBase();return n&&this.index++,n}}),c=e.inherit({ctor:function(n,t,i){n instanceof h||(n=new h(n,this._wrap)),this.iter=n,this.rules=[{getter:t,desc:i}]},thenBy:function(n,t){var i=new c(this.sortedIter||this.iter,n,t);return this.sortedIter||(i.rules=this.rules.concat(i.rules)),i},next:function(){return this._ensureSorted(),this.sortedIter.next()},current:function(){return this._ensureSorted(),this.sortedIter.current()},reset:function(){delete this.sortedIter},countable:function(){return this.sortedIter||this.iter.countable()},count:function(){return this.sortedIter?this.sortedIter.count():this.iter.count()},_ensureSorted:function(){this.sortedIter||(n.each(this.rules,function(){this.getter=f(this.getter)}),this.sortedIter=new h(new s(this.iter.toArray().sort(n.proxy(this._compare,this))),this._unwrap))},_wrap:function(n,t){return{index:t,value:n}},_unwrap:function(n){return n.value},_compare:function(n,t){var s=n.index,h=t.index,i,c;if(n=n.value,t=t.value,n===t)return s-h;for(i=0,c=this.rules.length;i<c;i++){var e=this.rules[i],u=r(e.getter(n)),o=r(e.getter(t)),f=e.desc?-1:1;if(u<o)return-f;if(u>o)return f;if(u!==o)return u?f:-f}return s-h}}),a=function(){function o(n,t,i){return function(u){u=r(n(u));var f=c(t)?u===t:u==t;return i&&(f=!f),f}}function c(n){return n===""||n===0||n===null||n===!1||n===i}var s=function(t){var u=[],i=["return function(d) { return "],f=0,r=!1;return n.each(t,function(){n.isArray(this)||n.isFunction(this)?(r&&i.push(" && "),u.push(a(this)),i.push("op[",f,"](d)"),f++,r=!0):(i.push(/and|&/i.test(this)?" && ":" || "),r=!1)}),i.push(" }"),new Function("op",i.join(""))(u)},e=function(n){return t.utils.isDefined(n)?n.toString():""},h=function(n){n=u.utils.normalizeBinaryCriterion(n);var s=f(n[0]),h=n[1],i=n[2];i=r(i);switch(h.toLowerCase()){case"=":return o(s,i);case"<>":return o(s,i,!0);case">":return function(n){return r(s(n))>i};case"<":return function(n){return r(s(n))<i};case">=":return function(n){return r(s(n))>=i};case"<=":return function(n){return r(s(n))<=i};case"startswith":return function(n){return r(e(s(n))).indexOf(i)===0};case"endswith":return function(n){var t=r(e(s(n)));return t.lastIndexOf(i)===t.length-e(i).length};case"contains":return function(n){return r(e(s(n))).indexOf(i)>-1};case"notcontains":return function(n){return r(e(s(n))).indexOf(i)===-1}}throw t.Error("E4003",h);};return function(t){return n.isFunction(t)?t:n.isArray(t[0])?s(t):h(t)}}(),y=o.inherit({ctor:function(n,t){this.callBase(n),this.criteria=a(t)},next:function(){while(this.iter.next())if(this.criteria(this.current()))return!0;return!1}}),p=e.inherit({ctor:function(n,t){this.iter=n,this.getter=t},next:function(){return this._ensureGrouped(),this.groupedIter.next()},current:function(){return this._ensureGrouped(),this.groupedIter.current()},reset:function(){delete this.groupedIter},countable:function(){return!!this.groupedIter},count:function(){return this.groupedIter.count()},_ensureGrouped:function(){var r,t;if(!this.groupedIter){var i={},e=[],u=this.iter,o=f(this.getter);for(u.reset();u.next();)r=u.current(),t=o(r),t in i?i[t].push(r):(i[t]=[r],e.push(t));this.groupedIter=new s(n.map(e,function(n){return{key:n,items:i[n]}}))}}}),w=o.inherit({ctor:function(n,t){this.callBase(n),this.getter=f(t)},current:function(){return this.getter(this.callBase())},countable:function(){return this.iter.countable()},count:function(){return this.iter.count()}}),b=o.inherit({ctor:function(n,t,i){this.callBase(n),this.skip=Math.max(0,t),this.take=Math.max(0,i),this.pos=0},next:function(){if(this.pos>=this.skip+this.take)return!1;while(this.pos<this.skip&&this.iter.next())this.pos++;return this.pos++,this.iter.next()},reset:function(){this.callBase(),this.pos=0},countable:function(){return this.iter.countable()},count:function(){return Math.min(this.iter.count()-this.skip,this.take)}});l.array=function(r,o){o=o||{},r instanceof e||(r=new s(r));var k=function(n){var t=o.errorHandler;t&&t(n),u._errorHandler(n)},d=function(t){var u=n.Deferred().fail(k),f,o=t.step,e=t.finalize,i;try{for(r.reset(),f=("seed"in t)?t.seed:r.next()?r.current():NaN,i=f;r.next();)i=o(i,r.current());u.resolve(e?e(i):i)}catch(s){u.reject(s)}return u.promise()},nt=function(n,t,i){return arguments.length<2?d({step:arguments[0]}):d({seed:n,step:t,finalize:i})},a=function(n){return d(u.utils.aggregators[n])},g=function(t){return n.isFunction(t)||n.isArray(t)||(t=n.makeArray(arguments)),h(new w(r,t))},v=function(n){return g(f(n))},h=function(n){return l.array(n,o)};return{toArray:function(){return r.toArray()},enumerate:function(){var t=n.Deferred().fail(k);try{t.resolve(r.toArray())}catch(i){t.reject(i)}return t.promise()},sortBy:function(n,t){return h(new c(r,n,t))},thenBy:function(n,i){if(r instanceof c)return h(r.thenBy(n,i));throw t.Error("E4004");},filter:function(t){return n.isArray(t)||(t=n.makeArray(arguments)),h(new y(r,t))},slice:function(n,t){return t===i&&(t=Number.MAX_VALUE),h(new b(r,n,t))},select:g,groupBy:function(n){return h(new p(r,n))},aggregate:nt,count:function(){if(r.countable()){var t=n.Deferred().fail(k);try{t.resolve(r.count())}catch(i){t.reject(i)}return t.promise()}return a("count")},sum:function(n){return n?v(n).sum():a("sum")},min:function(n){return n?v(n).min():a("min")},max:function(n){return n?v(n).max():a("max")},avg:function(n){return n?v(n).avg():a("avg")}}}}(jQuery,DevExpress),function(n,t){var r=t.data,u=r.queryImpl;u.remote=function(i,f,e){e=e||[],f=f||{};var o=function(n,t){return{name:n,args:t}},h=function(s){function w(n){switch(n.name){case"sortBy":return l=[n.args],!0;case"thenBy":if(!l)throw t.Error("E4004");return l.push(n.args),!0}return!1}function b(){var t=h[0],i=[];t&&t.name==="multiSort"&&(h.shift(),n.each(t.args[0],function(){i.push(o(i.length?"thenBy":"sortBy",this))})),h=i.concat(h)}var a=n.Deferred(),v,y,h,c,l,p=function(n){var t=f.errorHandler;t&&t(n),r._errorHandler(n),a.reject(n)};try{for(v=f.adapter||"odata",n.isFunction(v)||(v=r.queryAdapters[v]),y=v(f),h=[].concat(e).concat(s);h.length;){if(c=h[0],!w(c)){if(l){h.unshift(o("multiSort",[l])),l=null;continue}if(String(c.name)!=="enumerate"&&(!y[c.name]||y[c.name].apply(y,c.args)===!1))break}h.shift()}b(),y.exec(i).done(function(t,i){if(h.length){var r=u.array(t,{errorHandler:f.errorHandler});n.each(h,function(){r=r[this.name].apply(r,this.args)}),r.done(a.resolve).fail(a.reject)}else a.resolve(t,i)}).fail(p)}catch(k){p(k)}return a.promise()},s={};return n.each(["sortBy","thenBy","filter","slice","select","groupBy"],function(){var n=String(this);s[n]=function(){return u.remote(i,f,e.concat(o(n,arguments)))}}),n.each(["count","min","max","sum","avg","aggregate","enumerate"],function(){var n=String(this);s[n]=function(){return h.call(this,o(n,arguments))}}),s}}(jQuery,DevExpress),function(n,t,i){function o(n,t,i){var r=[],e=[],f=!1,u=function(n){return n<10?"0".concat(n):String(n)},f=function(){return!(n.getHours()+n.getMinutes()+n.getSeconds()+n.getMilliseconds())};return r.push(n.getFullYear()),r.push("-"),r.push(u(n.getMonth()+1)),r.push("-"),r.push(u(n.getDate())),t&&f()||(r.push("T"),r.push(u(n.getHours())),r.push(":"),r.push(u(n.getMinutes())),r.push(":"),r.push(u(n.getSeconds())),n.getMilliseconds()&&(r.push("."),r.push(n.getMilliseconds())),i||r.push("Z")),r.join("")}function k(n){var t=new Date(0),u=n.replace("Z","").split("T"),r=String(u[0]).split("-"),i=String(u[1]).split(":"),f,e,o,s,h,c,l;return f=Number(r[0]),e=Number(r[1])-1,o=Number(r[2]),t.setDate(o),t.setMonth(e),t.setFullYear(f),i.length&&(s=Number(i[0]),h=Number(i[1]),c=Number(String(i[2]).split(".")[0]),l=Number(String(i[2]).split(".")[1])||0,t.setHours(s),t.setMinutes(h),t.setSeconds(c),t.setMilliseconds(l)),t}function d(n){return/^(?:[a-z]+:)?\/\//i.test(n)}function g(n,t){var r,i=n.split("/"),u=t.split("/");for(i.pop();u.length;)r=u.shift(),r===".."?i.pop():i.push(r);return i.join("/")}var e=t.data,c=t.utils,f=e.Guid,y=2,p=/^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$/,w=/^\/Date\((-?\d+)((\+|-)?(\d+)?)\)\/$/,b=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z?$/,l="application/json;odata=verbose",nt=function(i,r,u){function w(n){return JSON.stringify(n,function(n,r){if(!(this[n]instanceof Date))return r;r=o(this[n]);switch(i){case 2:return r.substr(0,r.length-1);case 3:case 4:return r;default:throw t.Error("E4002");}})}var e;r=n.extend({method:"get",url:"",params:{},payload:null,headers:{}},r),u=u||{},e=u.beforeSend,e&&e(r);var c=(r.method||"get").toLowerCase(),f=c==="get",s=f&&u.jsonp,a=n.extend({},r.params),v=f?a:w(r.payload),y=!f&&n.param(a),h=r.url,p=!f&&l;return y&&(h+=(h.indexOf("?")>-1?"&":"?")+y),s&&(v.$format="json"),{url:h,data:v,dataType:s?"jsonp":"json",jsonp:s&&"$callback",type:c,timeout:3e4,headers:r.headers,contentType:p,accepts:{json:[l,"text/plain"].join()},xhrFields:{withCredentials:u.withCredentials}}},h=function(t,i,r){var u=n.Deferred(),f=nt(t,i,r);return n.ajax(f).always(function(n,i){var e=rt(n,i),s=e.error,c=e.data,o=e.nextUrl,l;s?u.reject(s):r.countOnly?u.resolve(e.count):o?(d(o)||(o=g(f.url,o)),h(t,{url:o},r).fail(u.reject).done(function(n){u.resolve(c.concat(n))})):(isFinite(e.count)&&(l={totalCount:e.count}),u.resolve(c,l))}),u.promise()},tt=function(n){var t,i=n;for(("message"in n)&&(t=n.message.value?n.message.value:n.message);i=i.innererror||i.internalexception;)if(t=i.message,i.internalexception&&t.indexOf("inner exception")===-1)break;return t},it=function(t,i){var u;if(i==="nocontent")return null;var r=200,f="Unknown error",o=t;if(i!=="success"){r=t.status,f=e.utils.errorMessageFromXhr(t,i);try{o=n.parseJSON(t.responseText)}catch(s){}}return(u=o&&(o.error||o["@odata.error"]),u)?(f=tt(u)||f,r===200&&(r=500),u.code&&(r=Number(u.code)),n.extend(Error(f),{httpStatus:r,errorDetails:u})):r!==200?n.extend(Error(f),{httpStatus:r}):void 0},rt=function(t,i){var u=it(t,i),r;return u?{error:u}:n.isPlainObject(t)?(r="d"in t&&(c.isArray(t.d)||c.isObject(t.d))?ut(t,i):ft(t,i),a(r),r):{data:t}},ut=function(n){var i=n.d;return i?(i=i.results||i,{data:i,nextUrl:n.d.__next,count:parseInt(n.d.__count,10)}):{error:Error("Malformed or unsupported JSON response received")}},ft=function(n){var i=n.value||n;return i?{data:i,nextUrl:n["@odata.nextLink"],count:parseInt(n["@odata.count"],10)}:{error:Error("Malformed or unsupported JSON response received")}},r=t.Class.inherit({ctor:function(n){this._value=n},valueOf:function(){return this._value}}),a=function(t){n.each(t,function(n,i){if(i!==null&&typeof i=="object")a(i);else if(typeof i=="string")if(p.test(i))t[n]=new f(i);else if(i.match(w)){var r=new Date(Number(RegExp.$1)+RegExp.$2*6e4);t[n]=new Date(r.valueOf()+r.getTimezoneOffset()*6e4)}else b.test(i)&&(t[n]=new Date(k(t[n]).valueOf()))})},et=function(n){return"datetime'"+o(n,!0,!0)+"'"},ot=function(n){return"'"+n.replace(/</g,"%26lt").replace(/'/g,"''")+"'"},u=function(n){return n instanceof r?n.valueOf():n.replace(/\./g,"/")},st=function(n){return n instanceof Date?o(n,!1,!1):n instanceof f?n.valueOf():v(n)},v=function(n){return n instanceof Date?et(n):n instanceof f?"guid'"+n+"'":n instanceof r?n.valueOf():typeof n=="string"?ot(n):String(n)},s=function(n,i){switch(i){case 2:case 3:return v(n);case 4:return st(n);default:throw t.Error("E4002");}},ht=function(t,i){if(n.isPlainObject(t)){var r=[];return n.each(t,function(n,t){r.push(u(n)+"="+s(t,i))}),r.join()}return s(t,i)},ct={String:function(n){return n+""},Int32:function(n){return Math.floor(n)},Int64:function(n){return n instanceof r?n:new r(n+"L")},Guid:function(n){return n instanceof f?n:new f(n)},Boolean:function(n){return!!n},Single:function(n){return n instanceof r?n:new r(n+"f")},Decimal:function(n){return n instanceof r?n:new r(n+"m")}},lt=function(){var i=function(n){return function(t,i,r){r.push(t," ",n," ",i)}},r=function(n,t){return function(i,r,u){t?u.push(n,"(",r,",",i,")"):u.push(n,"(",i,",",r,")")}},f={"=":i("eq"),"<>":i("ne"),">":i("gt"),">=":i("ge"),"<":i("lt"),"<=":i("le"),startswith:r("startswith"),endswith:r("endswith")},h=n.extend({},f,{contains:r("substringof",!0),notcontains:r("not substringof",!0)}),c=n.extend({},f,{contains:r("contains"),notcontains:r("not contains")}),l=function(n,i,r){n=e.utils.normalizeBinaryCriterion(n);var f=n[1],l=r===4?c:h,o=l[f.toLowerCase()];if(!o)throw t.Error("E4003",f);o(u(n[0]),s(n[2],r),i)},a=function(t,i,r){var u=!1;n.each(t,function(){n.isArray(this)?(u&&i.push(" and "),i.push("("),o(this,i,r),i.push(")"),u=!0):(i.push(/and|&/i.test(this)?" and ":" or "),u=!1)})},o=function(t,i,r){n.isArray(t[0])?a(t,i,r):l(t,i,r)};return function(n,t){var i=[];return o(n,i,t),i.join("")}}(),at=function(t){var c=[],r=[],f,o,s,e,l=function(){return o||s!==i},a=function(t){for(var i=0;i<t.length;i++)if(n.isFunction(t[i])||n.isArray(t[i])&&a(t[i]))return!0;return!1},v=function(){var r={};return t.expand&&n.each(n.makeArray(t.expand),function(){r[u(this)]=1}),f&&n.each(f,function(){var n=this.split(".");n.length<2||(n.pop(),r[u(n.join("."))]=1)}),n.map(r,function(n,t){return t}).join()||i},p=function(){var n={};return e||(c.length&&(n.$orderby=c.join(",")),o&&(n.$skip=o),s!==i&&(n.$top=s),f&&(n.$select=u(f.join())),n.$expand=v()),r.length&&(n.$filter=lt(r.length<2?r[0]:r,t.version)),e&&(n.$top=0),(t.requireTotalCount||e)&&(t.version!==4?n.$inlinecount="allpages":n.$count="true"),n};return t.version=t.version||y,{exec:function(i){return h(t.version,{url:i,params:n.extend(p(),t&&t.params)},{beforeSend:t.beforeSend,jsonp:t.jsonp,withCredentials:t.withCredentials,countOnly:e})},multiSort:function(n){var i,t,r,e,f;if(l())return!1;for(t=0;t<n.length;t++){if(r=n[t][0],e=!!n[t][1],typeof r!="string")return!1;f=u(r),e&&(f+=" desc"),i=i||[],i.push(f)}c=i},slice:function(n,t){if(l())return!1;o=n,s=t},filter:function(t){if(l()||n.isFunction(t)||(n.isArray(t)||(t=n.makeArray(arguments)),a(t)))return!1;r.length&&r.push("and"),r.push(t)},select:function(t){if(f||n.isFunction(t))return!1;n.isArray(t)||(t=n.makeArray(arguments)),f=t},count:function(){e=!0}}};n.extend(!0,e,{EdmLiteral:r,utils:{odata:{sendRequest:h,serializePropName:u,serializeValue:s,serializeKey:ht,keyConverters:ct}},queryAdapters:{odata:at}})}(jQuery,DevExpress),function(n,t){function f(t,i){return t=t.groupBy(i[0].selector),i.length>1&&(t=t.select(function(t){return n.extend({},t,{items:f(r.query(t.items),i.slice(1)).toArray()})})),t}function o(t,i){var r=[];return n.each(t,function(t,u){var f=n.grep(i,function(n){return u.selector==n.selector});f.length<1&&r.push(u)}),r.concat(i)}var s=t.Class,u=t.abstract,r=t.data,e=r.utils.normalizeSortingInfo,h=["loading","loaded","modifying","modified","inserting","inserted","updating","updated","removing","removed"];r.utils.multiLevelGroup=f,r.utils.arrangeSortingInfo=o,r.Store=s.inherit({ctor:function(i){var r=this;i=i||{},n.each(h,function(){var u=this,f=r[u]=n.Callbacks(),o=f.add,e;if(f.add=function(){return t.log("W0003","Store",u,"14.2","Use the '"+u+"' event instead"),o.apply(u,arguments)},u in i&&f.add(i[u]),e="on"+u.charAt(0).toUpperCase()+u.slice(1),e in i)r.on(u,i[e])}),this._key=i.key,this._errorHandler=i.errorHandler,this._useDefaultSearch=!0},_customLoadOptions:function(){return null},key:function(){return this._key},keyOf:function(n){return this._keyGetter||(this._keyGetter=r.utils.compileGetter(this.key())),this._keyGetter(n)},_requireKey:function(){if(!this.key())throw t.Error("E4005");},load:function(n){var t=this;return n=n||{},this.fireEvent("loading",[n]),this.loading.fire(n),this._loadImpl(n).done(function(i,r){t.fireEvent("loaded",[i,n]),t.loaded.fire(i,r)})},_loadImpl:function(t){var s=t.filter,u=t.sort,h=t.select,r=t.group,c=t.skip,l=t.take,i=this.createQuery(t);return s&&(i=i.filter(s)),r&&(r=e(r)),(u||r)&&(u=e(u||[]),r&&(u=o(r,u)),n.each(u,function(n){i=i[n?"thenBy":"sortBy"](this.selector,this.desc)})),h&&(i=i.select(h)),r&&(i=f(i,r)),(l||c)&&(i=i.slice(c||0,l)),i.enumerate()},createQuery:u,totalCount:function(n){return this._addFailHandlers(this._totalCountImpl(n))},_totalCountImpl:function(n){n=n||{};var t=this.createQuery(),i=n.group,r=n.filter;return r&&(t=t.filter(r)),i&&(i=e(i),t=f(t,i)),t.count()},byKey:function(n,t){return this._addFailHandlers(this._byKeyImpl(n,t))},_byKeyImpl:u,insert:function(n){var t=this;return t.fireEvent("modifying"),t.fireEvent("inserting",[n]),t.modifying.fire(),t.inserting.fire(n),t._addFailHandlers(t._insertImpl(n).done(function(n,i){t.fireEvent("inserted",[n,i]),t.fireEvent("modified"),t.inserted.fire(n,i),t.modified.fire()}))},_insertImpl:u,update:function(n,t){var i=this;return i.fireEvent("modifying"),i.fireEvent("updating",[n,t]),i.modifying.fire(),i.updating.fire(n,t),i._addFailHandlers(i._updateImpl(n,t).done(function(n,t){i.fireEvent("updated",[n,t]),i.fireEvent("modified"),i.updated.fire(n,t),i.modified.fire()}))},_updateImpl:u,remove:function(n){var t=this;return t.fireEvent("modifying"),t.fireEvent("removing",[n]),t.modifying.fire(),t.removing.fire(n),t._addFailHandlers(t._removeImpl(n).done(function(n){t.fireEvent("removed",[n]),t.fireEvent("modified"),t.removed.fire(n),t.modified.fire()}))},_removeImpl:u,_addFailHandlers:function(n){return n.fail(this._errorHandler,r._errorHandler)}}).include(t.EventsMixin)}(jQuery,DevExpress),function(n,t,i){var r=t.data,e=r.Guid,u=function(){var i=n.Deferred();return i.resolve.apply(i,arguments).promise()},f=function(){var i=n.Deferred();return i.reject.apply(i,arguments).promise()};r.ArrayStore=r.Store.inherit({ctor:function(i){i=n.isArray(i)?{data:i}:i||{},this.callBase(i);var r=i.data;if(r&&!n.isArray(r))throw t.Error("E4006");this._array=r||[]},createQuery:function(){return r.query(this._array,{errorHandler:this._errorHandler})},_byKeyImpl:function(n){var t=this._indexByKey(n);return t===-1?f():u(this._array[t])},_insertImpl:function(r){var h=this.key(),o,s;if(s=n.isPlainObject(r)?n.extend({},r):r,h){if(o=this.keyOf(s),o===i||typeof o=="object"&&n.isEmptyObject(o)){if(n.isArray(h))throw t.Error("E4007");o=s[h]=String(new e)}else if(this._array[this._indexByKey(o)]!==i)return f(t.Error("E4008"))}else o=s;return this._array.push(s),u(r,o)},_updateImpl:function(n,i){var r,e;if(this.key()){if(e=this._indexByKey(n),e<0)return f(t.Error("E4009"));r=this._array[e]}else r=n;return t.utils.deepExtendArraySafe(r,i),u(n,i)},_removeImpl:function(n){var t=this._indexByKey(n);return t>-1&&this._array.splice(t,1),u(n)},_indexByKey:function(n){for(var t=0,i=this._array.length;t<i;t++)if(r.utils.keysEqual(this.key(),this.keyOf(this._array[t]),n))return t;return-1},clear:function(){this._array=[]}})}(jQuery,DevExpress),function(n,t){var f=t.Class,r=t.abstract,u=t.data,e=f.inherit({ctor:function(t,i){var u,f,r;if(this._store=t,this._dirty=!1,u=this._immediate=i.immediate,f=Math.max(100,i.flushInterval||1e4),!u){r=n.proxy(this.save,this),setInterval(r,f);n(window).on("beforeunload",r);window.cordova&&document.addEventListener("pause",r,!1)}},notifyChanged:function(){this._dirty=!0,this._immediate&&this.save()},load:function(){this._store._array=this._loadImpl(),this._dirty=!1},save:function(){this._dirty&&(this._saveImpl(this._store._array),this._dirty=!1)},_loadImpl:r,_saveImpl:r}),o=e.inherit({ctor:function(n,i){this.callBase(n,i);var r=i.name;if(!r)throw t.Error("E4013");this._key="dx-data-localStore-"+r},_loadImpl:function(){var n=localStorage.getItem(this._key);return n?JSON.parse(n):[]},_saveImpl:function(n){n.length?localStorage.setItem(this._key,JSON.stringify(n)):localStorage.removeItem(this._key)}}),s={dom:o};u.LocalStore=u.ArrayStore.inherit({ctor:function(n){n=typeof n=="string"?{name:n}:n||{},this.callBase(n),this._backend=new s[n.backend||"dom"](this,n),this._backend.load()},clear:function(){this.callBase(),this._backend.notifyChanged()},_insertImpl:function(t){var i=this._backend;return this.callBase(t).done(n.proxy(i.notifyChanged,i))},_updateImpl:function(t,i){var r=this._backend;return this.callBase(t,i).done(n.proxy(r.notifyChanged,r))},_removeImpl:function(t){var i=this._backend;return this.callBase(t).done(n.proxy(i.notifyChanged,i))}})}(jQuery,DevExpress),function(n,t){var c=t.Class,r=t.data,l=t.utils,u=r.utils.odata,a=2,e=function(i,r){return t.stringFormat("{0}({1})",i,n.map(r||{},function(n,i){return t.stringFormat("{0}={1}",i,n)}).join(","))},f=function(t,i){if(!t)return t;var r={};return n.each(t,function(n,t){r[n]=u.serializeValue(t,i)}),r},o=function(n,i){var r=u.keyConverters[n];if(!r)throw t.Error("E4014",n);return r(i)},s={_extractServiceOptions:function(n){n=n||{},this._url=String(n.url).replace(/\/+$/,""),this._beforeSend=n.beforeSend,this._jsonp=n.jsonp,this._version=n.version||a,this._withCredentials=n.withCredentials},_sendRequest:function(n,t,i,r){return u.sendRequest(this.version(),{url:n,method:t,params:i||{},payload:r},{beforeSend:this._beforeSend,jsonp:this._jsonp,withCredentials:this._withCredentials})},version:function(){return this._version}},h=r.Store.inherit({ctor:function(n){this.callBase(n),this._extractServiceOptions(n),this._keyType=n.keyType},_customLoadOptions:function(){return["expand","customQueryParams"]},_byKeyImpl:function(t,i){var r={};return i&&i.expand&&(r.$expand=n.map(n.makeArray(i.expand),u.serializePropName).join()),this._sendRequest(this._byKeyUrl(t),"GET",r)},createQuery:function(n){var t,i,u;return n=n||{},i={beforeSend:this._beforeSend,errorHandler:this._errorHandler,jsonp:this._jsonp,version:this._version,withCredentials:this._withCredentials,expand:n.expand,requireTotalCount:n.requireTotalCount},t=this._url,"customQueryParams"in n&&(u=f(n.customQueryParams,this.version()),this.version()===4?t=e(t,u):i.params=u),r.query(t,i)},_insertImpl:function(t){this._requireKey();var r=this,i=n.Deferred();return n.when(this._sendRequest(this._url,"POST",null,t)).done(function(n){i.resolve(t,r.keyOf(n))}).fail(i.reject),i.promise()},_updateImpl:function(t,i){var r=n.Deferred();return n.when(this._sendRequest(this._byKeyUrl(t),"MERGE",null,i)).done(function(){r.resolve(t,i)}).fail(r.reject,r),r.promise()},_removeImpl:function(t){var i=n.Deferred();return n.when(this._sendRequest(this._byKeyUrl(t),"DELETE")).done(function(){i.resolve(t)}).fail(i.reject,i),i.promise()},_byKeyUrl:function(i,r){var f=i,e=this._keyType,s=r?t._proxyUrlFormatter.formatLocalUrl(this._url):this._url;return n.isPlainObject(e)?(f={},n.each(e,function(n,t){f[n]=o(t,i[n])})):e&&(f=o(e,i)),s+"("+encodeURIComponent(u.serializeKey(f,this._version))+")"}}).include(s),v=c.inherit({ctor:function(t){var i=this;i._extractServiceOptions(t),i._errorHandler=t.errorHandler,n.each(t.entities||[],function(r,u){i[r]=new h(n.extend({},t,{url:i._url+"/"+encodeURIComponent(u.name||r)},u))})},get:function(n,t){return this.invoke(n,t,"GET")},invoke:function(t,i,u){i=i||{},u=(u||"POST").toLowerCase();var o=n.Deferred(),s=this._url+"/"+encodeURIComponent(t),h;return this.version()===4&&(u==="get"?(s=e(s,f(i,this.version())),i=null):u==="post"&&(h=i,i=null)),n.when(this._sendRequest(s,u,f(i,this.version()),h)).done(function(n){n&&t in n&&(n=n[t]),o.resolve(n)}).fail([this._errorHandler,r._errorHandler,o.reject]),o.promise()},objectLink:function(n,i){var r=this[n];if(!r)throw t.Error("E4015",n);return l.isDefined(i)?{__metadata:{uri:r._byKeyUrl(i,!0)}}:null}}).include(s);n.extend(r,{ODataStore:h,ODataContext:v})}(jQuery,DevExpress),function(n,t,i){function u(t){return t&&n.isFunction(t.then)}function r(t){return n.Deferred().resolve(t).promise()}function f(i,r){if(!n.isFunction(r))throw t.Error("E4011",i);}function y(n){throw t.Error("E4012",n);}function e(n){function t(n){var t=n[0],i=n[1];return!t||!t.getResponseHeader?null:o.utils.errorMessageFromXhr(t,i)}return function(i){var r;r=i instanceof Error?i:new Error(t(arguments)||i&&String(i)||"Unknown error"),n.reject(r)}}var o=t.data,s="totalCount",h="load",c="byKey",l="insert",a="update",v="remove";o.CustomStore=o.Store.inherit({ctor:function(n){n=n||{},this.callBase(n),this._useDefaultSearch=!1,this._loadFunc=n[h],this._totalCountFunc=n[s],this._byKeyFunc=n[c]||n.lookup,this._insertFunc=n[l],this._updateFunc=n[a],this._removeFunc=n[v]},createQuery:function(){throw t.Error("E4010");},_totalCountImpl:function(t){var h=this._totalCountFunc,i,o=n.Deferred();return f(s,h),i=h(t),u(i)||(i=Number(i),isFinite(i)||y(s),i=r(i)),i.then(function(n){o.resolve(Number(n))},e(o)),o.promise()},_loadImpl:function(t){var c=this._loadFunc,o,s=n.Deferred();return f(h,c),o=c(t),n.isArray(o)?o=r(o):o===null||o===i?o=r([]):u(o)||y(h),o.then(function(n,t){s.resolve(n,t)},e(s)),this._addFailHandlers(s.promise())},_byKeyImpl:function(t){var s=this._byKeyFunc,i,o=n.Deferred();return f(c,s),i=s(t),u(i)||(i=r(i)),i.then(function(n){o.resolve(n)},e(o)),o.promise()},_insertImpl:function(t){var s=this._insertFunc,i,o=n.Deferred();return f(l,s),i=s(t),u(i)||(i=r(i)),i.then(function(n){o.resolve(t,n)},e(o)),o.promise()},_updateImpl:function(t,i){var h=this._updateFunc,o,s=n.Deferred();return f(a,h),o=h(t,i),u(o)||(o=r()),o.then(function(){s.resolve(t,i)},e(s)),s.promise()},_removeImpl:function(t){var s=this._removeFunc,i,o=n.Deferred();return f(v,s),i=s(t),u(i)||(i=r()),i.then(function(){o.resolve(t)},e(o)),o.promise()}})}(jQuery,DevExpress),function(n,t,i){function h(t){function f(){var i={};return n.each(["key","load","byKey","lookup","totalCount","insert","update","remove"],function(){i[this]=t[this],delete t[this]}),new o(i)}function e(n){var t=r[s[n.type]];return delete n.type,new t(n)}function h(t){return new o({load:function(){return n.getJSON(t)}})}var u;return typeof t=="string"&&(t=h(t)),t===i&&(t=[]),t=n.isArray(t)||t instanceof r.Store?{store:t}:n.extend({},t),t.store===i&&(t.store=[]),u=t.store,"load"in t?u=f():n.isArray(u)?u=new r.ArrayStore(u):n.isPlainObject(u)&&(u=e(n.extend({},u))),t.store=u,t}function c(t){switch(t.length){case 0:return i;case 1:return t[0]}return n.makeArray(t)}function f(n){return function(){var t=c(arguments);return t!==i&&(this._storeLoadOptions[n]=t),this._storeLoadOptions[n]}}function v(t,i,u){function f(t,r){return r?e(t,r):n.map(t,i)}function e(t,i){return n.map(t,function(n){return{key:n.key,items:f(n.items,i-1)}})}return f(t,u?r.utils.normalizeSortingInfo(u).length:0)}var r=t.data,o=r.CustomStore,l=t.Class,s={jaydata:"JayDataStore",breeze:"BreezeStore",odata:"ODataStore",local:"LocalStore",array:"ArrayStore"},a=function(){var n=-1;return function(){return++n}}(),e=function(){var n={};return{add:function(t){n[t]=!0},has:function(t){return t in n},remove:function(t){delete n[t]}}}(),u=function(n,t){return e.has(n)?(e.remove(n),t.reject("canceled"),!1):!0},y=l.inherit({ctor:function(r){r=h(r),this._store=r.store,this._storeLoadOptions=this._extractLoadOptions(r),this._mapFunc=r.map,this._postProcessFunc=r.postProcess,this._pageIndex=r.pageIndex!==i?r.pageIndex:0,this._pageSize=r.pageSize!==i?r.pageSize:20,this._items=[],this._totalCount=-1,this._isLoaded=!1,this._loadingCount=0,this._preferSync=r._preferSync,this._loadQueue=this._createLoadQueue(),this._searchValue="searchValue"in r?r.searchValue:null,this._searchOperation=r.searchOperation||"contains",this._searchExpr=r.searchExpr,this._paginate=r.paginate,this._paginate===i&&(this._paginate=!this.group()),this._isLastPage=!this._paginate,this._userData={},n.each(["changed","loadError","loadingChanged"],n.proxy(function(i,r){var u=this[r]=n.Callbacks(),f=u.add;u.add=function(){return t.log("W0003","DataSource",r,"14.2","Use the '"+r+"' event instead"),f.apply(r,arguments)}},this)),n.each(["changed","loadError","loadingChanged","customizeLoadResult","customizeStoreLoadOptions"],n.proxy(function(n,t){var i="on"+t[0].toUpperCase()+t.slice(1);if(r.hasOwnProperty(i))this.on(t,r[i])},this))},dispose:function(){this.changed.empty(),this.loadError.empty(),this.loadingChanged.empty(),this._disposeEvents(),delete this._store,this._processResultTask&&this._processResultTask.abort(),this._disposed=!0},_extractLoadOptions:function(t){var r={},i=["sort","filter","select","group","requireTotalCount"],u=this._store._customLoadOptions();return u&&(i=i.concat(u)),n.each(i,function(){r[this]=t[this]}),r},loadOptions:function(){return this._storeLoadOptions},items:function(){return this._items},pageIndex:function(n){return n!==i&&(this._pageIndex=n,this._isLastPage=!this._paginate),this._pageIndex},paginate:function(n){if(arguments.length<1)return this._paginate;n=!!n,this._paginate!==n&&(this._paginate=n,this.pageIndex(0))},pageSize:function(n){if(arguments.length<1)return this._pageSize;this._pageSize=n},isLastPage:function(){return this._isLastPage},sort:f("sort"),filter:function(){var n=c(arguments);return n!==i&&(this._storeLoadOptions.filter=n,this.pageIndex(0)),this._storeLoadOptions.filter},group:f("group"),select:f("select"),requireTotalCount:f("requireTotalCount"),searchValue:function(n){return n!==i&&(this.pageIndex(0),this._searchValue=n),this._searchValue},searchOperation:function(n){return n!==i&&(this.pageIndex(0),this._searchOperation=n),this._searchOperation},searchExpr:function(t){var i=arguments.length;return i&&(i>1&&(t=n.makeArray(arguments)),this.pageIndex(0),this._searchExpr=t),this._searchExpr},store:function(){return this._store},key:function(){return this._store&&this._store.key()},totalCount:function(){return this._totalCount},isLoaded:function(){return this._isLoaded},isLoading:function(){return this._loadingCount>0},_createLoadQueue:function(){return t.createQueue()},_changeLoadingCount:function(n){var i=this.isLoading(),t;this._loadingCount+=n,t=this.isLoading(),i^t&&(this.fireEvent("loadingChanged",[t]),this.loadingChanged.fire(t))},_scheduleLoadCallbacks:function(n){var t=this;t._changeLoadingCount(1),n.always(function(){t._changeLoadingCount(-1)})},_scheduleChangedCallbacks:function(n){var t=this;n.done(function(){t.fireEvent("changed"),t.changed.fire()})},loadSingle:function(t,i){function h(t){t===null||typeof t=="undefined"||n.isArray(t)&&t.length<1?f.reject():f.resolve(e._transformLoadedData(t)[0])}var e=this,f=n.Deferred().fail(function(){e.fireEvent("loadError",arguments),e.loadError.fire.apply(e,arguments)}),s=this.key(),o=this._store,u=this._createStoreLoadOptions();return arguments.length<2&&(i=t,t=s),delete u.skip,delete u.group,delete u.refresh,delete u.pageIndex,delete u.searchString,t===s||o instanceof r.CustomStore?o.byKey(i,u).done(h).fail(f.reject):(u.take=1,u._preferSync=!0,u.filter=u.filter?[u.filter,[t,i]]:[t,i],o.load(u).done(h).fail(f.reject)),f.promise()},load:function(){function o(){arguments[0]!=="canceled"&&(f.fireEvent("loadError",arguments),f.loadError.fire.apply(f.loadError,arguments))}function e(){return f._disposed?i:f._loadFromStore(r,t)}var f=this,t=n.Deferred().fail(o),r;return(this._scheduleLoadCallbacks(t),this._scheduleChangedCallbacks(t),r=this._createLoadOptions(),this.fireEvent("customizeStoreLoadOptions",[r]),!u(r.operationId,t))?t.promise():(this._loadQueue.add(function(){return typeof r.delay=="number"?setTimeout(e,r.delay):e(),t.promise()},function(){f._changeLoadingCount(-1)}),t.promise({loadOperationId:r.operationId}))},reload:function(){var n,t=this._userData;for(n in t)t.hasOwnProperty(n)&&delete t[n];return this._totalCount=-1,this._isLoaded=!1,this.load()},cancel:function(n){e.add(n)},_addSearchOptions:function(n){this._disposed||(this.store()._useDefaultSearch?this._addSearchFilter(n):(n.searchValue=this._searchValue,n.searchExpr=this._searchExpr))},_createStoreLoadOptions:function(){var t=n.extend({},this._storeLoadOptions);return this._addSearchOptions(t),this._paginate&&this._pageSize&&(t.skip=this._pageIndex*this._pageSize,t.take=this._pageSize),t.userData=this._userData,t},_createLoadOptions:function(){return{operationId:a(),storeLoadOptions:this._createStoreLoadOptions()}},_addSearchFilter:function(t){var u=this._searchValue,f=this._searchOperation,i=this._searchExpr,r=[];u&&(i||(i="this"),n.isArray(i)||(i=[i]),n.each(i,function(n,t){r.length&&r.push("or"),r.push([t,f,u])}),t.filter=t.filter?[r,t.filter]:r)},_loadFromStore:function(i,r){function e(e,o){function s(){var t;t=n.extend({data:e,extra:o},i),f.fireEvent("customizeLoadResult",[t]),u(i.operationId,r)&&f._processStoreLoadResult(t,r)}f._preferSync?s():f._processResultTask=t.utils.executeAsync(s)}var f=this;return u(i.operationId,r)?this.store().load(i.storeLoadOptions).done(e).fail(r.reject):r.promise()},_processStoreLoadResult:function(t,i){function s(){return u(t.operationId,i)?(r._isLoaded=!0,r._totalCount=isFinite(f.totalCount)?f.totalCount:-1,i.resolve(e,f)):i}function h(){r.store().totalCount(o).done(function(n){f.totalCount=n,s()}).fail(function(){})}var r=this,e=t.data,f=t.extra,o=t.storeLoadOptions;r._disposed||(e=r._transformLoadedData(e),n.isPlainObject(f)||(f={}),r._items=e,(!e.length||!r._paginate||r._pageSize&&e.length<r._pageSize)&&(r._isLastPage=!0),o.requireTotalCount&&!isFinite(f.totalCount)?h():s())},_transformLoadedData:function(t){var i=n.makeArray(t);return this._mapFunc&&(i=v(i,this._mapFunc,this.group())),this._postProcessFunc&&(i=this._postProcessFunc(i)),i}}).include(t.EventsMixin);n.extend(!0,r,{DataSource:y,utils:{storeTypeRegistry:s,normalizeDataSourceOptions:h}})}(jQuery,DevExpress),function(n,t){if(t.support.hasKo){var r=window.ko;(function(n){if(n=n.split("."),n[0]<2||n[0]==2&&n[1]<3)throw t.Error("E0013");})(r.version)}}(jQuery,DevExpress),function(n,t){t.support.hasNg&&(t.ng={module:window.angular.module("dx",["ngSanitize"])})}(jQuery,DevExpress),function(n,t,i){var o=t.ui,u=t.utils,r=t.data.utils,f=t.inflector,e=t.Class.inherit({NAME:"Component",_setDeprecatedOptions:function(){this._deprecatedOptions={}},_getDeprecatedOptions:function(){return this._deprecatedOptions},_setOptionAliases:function(){var t=this._optionAliases={};n.each(this._getDeprecatedOptions(),function(n,i){var r=i.alias;r&&(t[n]=r)})},_getOptionAliases:function(){return this._optionAliases},_getOptionAliasesByName:function(t){return n.map(this._getOptionAliases(),function(n,r){return t===n?r:i})},_setDefaultOptions:function(){this.option({onOptionChanged:null,onDisposing:null,defaultOptionsRules:null})},_defaultOptionsRules:function(){return[]},_setOptionsByDevice:function(i){var r=this._defaultOptionsRules(),f=t.devices.current(),e={},o;this._customRules&&(r=r.concat(this._customRules)),n.isArray(i)&&(r=r.concat(i)),o=function(t,i){return i=n.makeArray(i),i.length===1&&n.isEmptyObject(i[0])||u.findBestMatches(t,i).length>0},n.each(r,function(t,i){var r=i.device||{},u;u=n.isFunction(r)?r(f):o(f,r),u&&n.extend(e,i.options)}),this.option(e)},_setOptionsByReference:function(){this._optionsByReference={}},_getOptionsByReference:function(){return this._optionsByReference},ctor:function(i){i=i||{},this._options={},this._cachedGetters={},this._updateLockCount=0,this.optionChanged=n.Callbacks(),this.disposing=n.Callbacks(),n.each(["optionChanged","disposing"],n.proxy(function(n,i){var r=this,u=this[i].add;this[i].add=function(){return t.log("W0003",r.NAME,i,"14.2","Use the '"+i+"' event instead"),u.apply(this,arguments)}},this)),this.beginUpdate();try{this._suppressDeprecatedWarnings(),this._setOptionsByReference(),this._setDeprecatedOptions(),this._setOptionAliases(),this._setDefaultOptions(),this._setOptionsByDevice(i.defaultOptionsRules),this._resumeDeprecatedWarnings(),this._initialOptions=n.extend({},this.option()),this._initOptions(i)}finally{this.endUpdate()}},_initOptions:function(n){this.option(n)},_optionValuesEqual:function(n,t,i){return(t=r.toComparable(t,!0),i=r.toComparable(i,!0),t&&i&&t.jquery&&i.jquery)?i.is(t):t===null||typeof t!="object"?t===i:!1},_init:function(){this._createOptionChangedAction(),this._createDisposingAction()},_createOptionChangedAction:function(){this._optionChangedAction=this._createActionByOption("onOptionChanged",{excludeValidators:["disabled"]})},_createDisposingAction:function(){this._disposingAction=this._createActionByOption("onDisposing",{excludeValidators:["disabled"]})},_optionChanged:function(n){switch(n.name){case"onOptionChanged":this._createOptionChangedAction();break;case"onDisposing":this._createDisposingAction()}},_dispose:function(){this.optionChanged.empty(),this.disposing.fireWith(this).empty(),this._disposingAction(),this._disposeEvents()},instance:function(){return this},beginUpdate:function(){this._updateLockCount++},endUpdate:function(){if(this._updateLockCount--,!this._updateLockCount&&!this._initializing&&!this._initialized){this._initializing=!0;try{this._init()}finally{this._initializing=!1,this._initialized=!0}}},_logWarningIfDeprecated:function(){},_suppressDeprecatedWarnings:function(){},_resumeDeprecatedWarnings:function(){},_notifyOptionChanged:function(t,i,r){var u=this;this._initialized&&n.each(u._getOptionAliasesByName(t).concat([t]),function(t,f){var e={name:f.split(/[.\[]/)[0],fullName:f,value:i,previousValue:r};u.optionChanged.fireWith(u,[e.name,i,r]),u._optionChangedAction(n.extend({},e)),u._optionChanged(e)})},initialOption:function(n){var t=this._initialOptions;return t[n]},_defaultActionConfig:function(){return{context:this,component:this}},_defaultActionArgs:function(){return{component:this}},_createAction:function(i,r){var u=this,f=new t.Action(i,n.extend(r,u._defaultActionConfig()));return function(t){return arguments.length||(t={}),n.isPlainObject(t)||(t={actionValue:t}),f.execute.call(f,n.extend(t,u._defaultActionArgs()))}},_createActionByOption:function(i,r){var u,e;if(r=r||{},typeof i!="string")throw t.Error("E0008");if(u=/^on(\w+)/.exec(i),u){var o=f.camelize(u[1]),s=r.afterExecute||n.noop,h=this;r.afterExecute=function(n){return h.fireEvent(o,n.args),s.apply(this,arguments)}}return this._suppressDeprecatedWarnings(),e=this._createAction(this.option(i),r),this._resumeDeprecatedWarnings(),e},option:function(t){var i=this,u=t,s=arguments[1],f=this._getOptionAliases(),e=function(n){return n&&(i._logWarningIfDeprecated(n),f[n]&&(n=f[n])),n},o=function(n,t){return i._cachedGetters[n]||(i._cachedGetters[n]=r.compileGetter(n)),i._cachedGetters[n](i._options,{functionsAsIs:!0,unwrapObservables:t})};if(arguments.length<2&&n.type(u)!=="object")return u=e(u),o(u);typeof u=="string"&&(t={},t[u]=s),i.beginUpdate();try{n.each(t,function(n,t){n=e(n);var u=o(n,!1);i._optionValuesEqual(n,u,t)||(r.compileSetter(n)(i._options,t,{functionsAsIs:!0,merge:!i._getOptionsByReference()[n],unwrapObservables:!1}),i._notifyOptionChanged(n,t,u))})}finally{i.endUpdate()}}}).include(t.EventsMixin);n.extend(t,{Component:e})}(jQuery,DevExpress),function(n,t,i){var f=t.utils.windowResizeCallbacks,o="dx-rtl",r="dxComponents",s="dx-visibility-change-handler",u="dxVisibilityChange",h=t.Component.inherit({NAME:"DOMComponent",_setDefaultOptions:function(){this.callBase(),this.option({rtlEnabled:t.rtlEnabled})},ctor:function(t,i){this._$element=n(t),this.element().data(this.NAME,this),this._attachInstanceToElement(this._$element),this.callBase(i)},_attachInstanceToElement:n.noop,_visibilityChanged:t.abstract,_dimensionChanged:t.abstract,_init:function(){this.callBase(),this._attachWindowResizeCallback()},_attachWindowResizeCallback:function(){if(this._isDimensionChangeSupported()){var t=this._windowResizeCallBack=n.proxy(this._dimensionChanged,this);f.add(t)}},_isDimensionChangeSupported:function(){return this._dimensionChanged!==t.abstract},_render:function(){this._toggleRTLDirection(this.option("rtlEnabled")),this._renderVisibilityChange()},_renderVisibilityChange:function(){this._isVisibilityChangeSupported()&&(this.element().addClass(s),this._attachVisiblityChangeHandlers())},_attachVisiblityChangeHandlers:function(){var n=this;n.element().off("."+u).on("dxhiding."+u,function(){n._visibilityChanged(!1)}).on("dxshown."+u,function(){n._visibilityChanged(!0)})},_isVisibilityChangeSupported:function(){return this._visibilityChanged!==t.abstract},_clean:n.noop,_modelByElement:n.noop,_invalidate:function(){this._requireRefresh=!0},_refresh:function(){this._clean(),this._render()},_dispose:function(){this.callBase(),this._clean(),this._detachWindowResizeCallback()},_detachWindowResizeCallback:function(){this._isDimensionChangeSupported()&&f.remove(this._windowResizeCallBack)},_toggleRTLDirection:function(n){this.element().toggleClass(o,n)},_createComponent:function(t,i,r){var u=n(t)[i](r||{});return u[i]("instance")},_defaultActionConfig:function(){return n.extend(this.callBase(),{context:this._modelByElement(this.element())})},_defaultActionArgs:function(){var t=this.element(),i=this._modelByElement(this.element());return n.extend(this.callBase(),{element:t,model:i})},_optionChanged:function(n){n.name==="rtlEnabled"?this._invalidate():this.callBase(n)},endUpdate:function(){var n=!this._initializing&&!this._initialized;this.callBase.apply(this,arguments),this._updateLockCount||(n?this._render():this._requireRefresh&&(this._requireRefresh=!1,this._refresh()))},element:function(){return this._$element}}),e=function(u,f,e){e||(e=f,f=t),e.redefine({_attachInstanceToElement:function(n){n.data(u,this),n.data(r)||n.data(r,[]),n.data(r).push(u)}}),f[u]=e,e.prototype.NAME=u,e.defaultOptions=function(n){e.prototype._customRules=e.prototype._customRules||[],e.prototype._customRules.push(n)},n.fn[u]=function(r){var h=typeof r=="string",f,o,s;return h?(o=r,s=n.makeArray(arguments).slice(1),this.each(function(){var r=n(this).data(u),e,h;if(!r)throw t.Error("E0009",u);e=r[o],h=e.apply(r,s),f===i&&(f=h)})):(this.each(function(){var t=n(this).data(u);t?t.option(r):new e(this,r)}),f=this),f}},c=function(t){t=n(t);var i=t.data(r);return i?n.map(i,function(n){return t.data(n)}):[]},l=function(){n.each(c(this),function(){this._dispose()})},a=n.cleanData;n.cleanData=function(t){return n.each(t,l),a.apply(this,arguments)},e("DOMComponent",h),t.registerComponent=e}(jQuery,DevExpress),function(n,t){var u=t.ui={},r=function(n){return function(t){if(t.args.length){var i=t.args[0],u=i.jQueryEvent,i=t.args[0],r=i[t.validatingTargetName]||i.element;r&&n(r)&&(t.cancel=!0)}}};t.registerActionExecutor({designMode:{validate:function(n){t.designMode&&(n.cancel=!0)}},disabled:{validate:r(function(n){return n.is(".dx-state-disabled, .dx-state-disabled *")})},readOnly:{validate:r(function(n){return n.is(".dx-state-readonly, .dx-state-readonly *")})}}),n.extend(u,{initViewport:function(){t.utils.initMobileViewport()}})}(jQuery,DevExpress),function(n,t,i){var u=t.ui,f=t.utils.triggerShownEvent,r=function(n){return n.prototype.NAME},e=t.Class.inherit({ctor:function(){this.widgetTemplatesCache={}},createTemplate:t.abstract,getTemplates:function(n){return this._getWidgetTemplates(n.constructor)},_getWidgetTemplates:function(n){return r(n)?this._getCachedWidgetTemplates(n):{}},_getCachedWidgetTemplates:function(t){var i=r(t),u=this.widgetTemplatesCache;return u[i]||(u[i]=n.extend({},this._getWidgetTemplates(t.parent),this._templatesForWidget(i))),u[i]},_templatesForWidget:t.abstract}),o=t.Class.inherit({ctor:function(t,i){this._element=n(t),this._owner=i},owner:function(){return this._owner},render:function(t,r,u){t instanceof jQuery&&(r=t,t=i),r&&(t=this._prepareDataForContainer(t,r));var e=this._renderCore(t,u,r);return this._shouldAppend&&r&&(r.append(e),n.contains(document.body,r.get(0))&&f(e)),e},_prepareDataForContainer:function(n){return n},_renderCore:t.abstract,_shouldAppend:!0,dispose:function(){this._owner=null}});n.extend(u,{TemplateProviderBase:e,TemplateBase:o})}(jQuery,DevExpress),function(n,t,i){var e=t.ui,k=t.utils.isString,s,l={},d=e.TemplateBase.inherit({ctor:function(n,t){this.callBase(n,t),this._compiledTemplate=s.compile(n)},_renderCore:function(t){return n("<div>").append(s.render(this._compiledTemplate,t)).contents()}}),a=function(n){if(k(n)){if(s=l[n],!s)throw t.Error("E0020",n);}else s=n},f=function(n,t){l[n]=t},o=function(t){return t=n(t),t.length&&t[0].nodeName.toLowerCase()==="script"||(t=n("<div>").append(t)),t.html()},h,p,w,b,c;f("default",{compile:function(n){return t.utils.normalizeTemplateElement(n)},render:function(n){return n.clone()}}),f("jquery-tmpl",{compile:function(i){return n("<div>").append(t.utils.normalizeTemplateElement(i))},render:function(n,t){return n.tmpl(t)}}),f("jsrender",{compile:function(t){return n.templates(o(t))},render:function(n,t){return n.render(t)}}),f("mustache",{compile:function(n){return Mustache.compile(o(n))},render:function(n,t){return n(t)}}),f("hogan",{compile:function(n){return Hogan.compile(o(n))},render:function(n,t){return n.render(t)}}),f("underscore",{compile:function(n){return _.template(o(n))},render:function(n,t){return n(t)}}),f("handlebars",{compile:function(n){return Handlebars.compile(o(n))},render:function(n,t){return n(t)}}),f("doT",{compile:function(n){return doT.template(o(n))},render:function(n,t){return n(t)}}),a("default");var g=e.TemplateBase.inherit({ctor:function(t,i){this.callBase(n("<div>"),i),this._render=t},_renderCore:function(n,i,r){return t.utils.stringToJquery(this._render(n,i,r))}}),nt=new(e.TemplateProviderBase.inherit({createTemplate:function(n,t){return new e.Template(n,t)},_templatesForWidget:function(t){var u=r[t]||{},i={};return n.each(u,function(n,t){i[n]=new e.DefaultTemplate(t,this)}),i}})),r={},tt="dx-item-content-placeholder";r.CollectionWidget={item:function(t){var i=n("<div>");return n.isPlainObject(t)?(t.text&&i.text(t.text),t.html&&i.html(t.html)):i.html(String(t)),i},itemFrame:function(t){var r=n("<div>"),u;return r.toggleClass("dx-state-invisible",t.visible!==i&&!t.visible),r.toggleClass("dx-state-disabled",!!t.disabled),u=n("<div>").addClass(tt),r.append(u),r}};var it="dx-list-item-badge-container",rt="dx-list-item-badge",v="dx-badge",ut="dx-list-item-chevron-container",ft="dx-list-item-chevron";r.dxList={item:function(t){var i=r.CollectionWidget.item(t),u;return t.key&&(u=n("<div>").text(t.key),u.appendTo(i)),i},itemFrame:function(t){var i=r.CollectionWidget.itemFrame(t),f,u,e,o;return t.badge&&(f=n("<div>").addClass(it),u=n("<div>").addClass(rt).addClass(v),u.text(t.badge),f.append(u).appendTo(i)),t.showChevron&&(e=n("<div>").addClass(ut),o=n("<div>").addClass(ft),e.append(o).appendTo(i)),i},group:function(t){var i=n("<div>");return n.isPlainObject(t)?t.key&&i.text(t.key):i.html(String(t)),i}},r.dxDropDownMenu={item:r.dxList.item},r.dxDropDownList={item:r.dxList.item},r.dxRadioGroup={item:r.CollectionWidget.item},r.dxSlideOutView={menu:function(){return n()}},r.dxSlideOut={menuItem:r.dxList.item,menuGroup:r.dxList.group},h=function(t){var i=n("<div>"),f=t.icon,e=t.iconSrc,r;return n.isPlainObject(t)?t.title&&i.text(t.title):i.html(String(t)),f?r=n("<span>").addClass(u+"-"+f):e&&(r=n("<img>").attr("src",e)),r&&r.addClass(u).prependTo(i),i},r.dxAccordion={title:h,item:r.CollectionWidget.item},r.dxActionSheet={item:function(t){return n("<div>").dxButton(n.extend({onClick:t.click},t))}},r.dxGallery={item:function(t){var i=n("<div>");return t.imageSrc?n("<img>").attr("src",t.imageSrc).appendTo(i):n("<img>").attr("src",String(t)).appendTo(i),i}};var u="dx-icon",y="dx-menu-item-text",et="dx-menu-item-popout",ot="dx-menu-item-popout-container";r.dxMenuBase={item:function(t){var i=n("<div>"),r,f,o,e;return t.icon?r=n("<span>").addClass(u+"-"+t.icon).appendTo(i):t.iconSrc&&(r=n("<img>").attr("src",t.iconSrc).appendTo(i)),r&&r.addClass(u),n.isPlainObject(t)&&t.text?f=n("<span>").addClass(y).text(t.text):n.isPlainObject(t)||(f=n("<span>").addClass(y).html(String(t))),i.append(f),t.items&&t.items.length>0&&(e=n("<span>").addClass(ot).appendTo(i),o=n("<div>").addClass(et).appendTo(e)),i}},p="dx-panorama-item-title",r.dxPanorama={itemFrame:function(t){var i=r.CollectionWidget.itemFrame(t),u;return t.title&&(u=n("<div>").addClass(p).text(t.title),i.prepend(u)),i}},r.dxPivotTabs={item:function(t){var i=n("<div>"),r=n("<span>").text(t.title);return i.html(r),i}},r.dxPivot={title:r.dxPivotTabs.item},w="dx-tab-text",r.dxTabs={item:function(t){var i=r.CollectionWidget.item(t);if(t.html)return i;var s=t.text,e=t.icon,o=t.iconSrc,f;return s&&i.wrapInner(n("<span>").addClass(w)),e?f=n("<span>").addClass(u+"-"+e):o&&(f=n("<img>").attr("src",o)),f&&f.addClass(u).prependTo(i),i}},r.dxTabPanel={item:r.CollectionWidget.item,title:h},b="dx-navbar-item-badge",r.dxNavBar={itemFrame:function(t){var u=r.CollectionWidget.itemFrame(t),i;return t.badge&&(i=n("<div>").addClass(b).addClass(v),i.text(t.badge),i.appendTo(u)),u}},r.dxToolbar={item:function(i){var u=r.CollectionWidget.item(i),f=i.widget;if(f){var e=n("<div>").appendTo(u),o=t.inflector.camelize("dx-"+f),s=i.options||{};e[o](s)}else i.text&&u.wrapInner("<div>");return u},menuItem:r.dxList.item,actionSheetItem:r.dxActionSheet.item},r.dxTreeView={item:function(t){var i=n("<div>");return t.icon&&n("<span>").addClass(u+"-"+t.icon).addClass(u).appendTo(i),t.iconSrc&&n("<img>").attr("src",t.iconSrc).addClass(u).appendTo(i),n("<span>").text(t.text).appendTo(i),i}},c=function(t){return n("<div>").dxToolbar({items:t})},r.dxPopup={title:c,bottom:c},r.dxLookup={title:r.dxPopup.title,group:r.dxList.group},n.extend(e,{TemplateProvider:nt,Template:d,DefaultTemplate:g,setTemplateEngine:a})}(jQuery,DevExpress),function(n,t){var s,h,u,c,l,a;if(t.support.hasKo){var r=window.ko,f=t.ui,e="dxKoLocks",v="dxKoCreation",y=function(){var n={},t=function(t){return n[t]||0};return{obtain:function(i){n[i]=t(i)+1},release:function(i){var r=t(i);r===1?delete n[i]:n[i]=r-1},locked:function(n){return t(n)>0}}},o=[],p=function(t,i){i.subclassOf(f.Editor)&&o.push(t),r.bindingHandlers[t]={init:function(u,o){var s=n(u),h={templateProvider:f.KoTemplateProvider},c={},a=function(n,i){var f=s.data(t),u=s.data(e),o=r.unwrap(i);if(r.isWriteableObservable(i)&&(c[n]=i),f){if(u.locked(n))return;u.obtain(n);try{f.option(n,o)}finally{u.release(n)}}else h[n]=o},p=function(n){var t=n.fullName,u=n.value,r,i;if(t in c&&(r=this._$element,i=r.data(e),!i.locked(t))){i.obtain(t);try{c[t](u)}finally{i.release(t)}}},w=function(){s.data(v,!0).data(e,new y)[t](h)[t]("on","optionChanged",p),h=null},l=function(t,i){var f;r.computed(function(){a(t,i),f=r.unwrap(i)},null,{disposeWhenNodeIsRemoved:u}),n.isPlainObject(f)&&n.each(f,function(n,i){l(t+"."+n,i)})};return r.computed(function(){var i=s.data(t);i&&i.beginUpdate(),n.each(r.unwrap(o()),function(n,t){l(n,t)}),i?i.endUpdate():w()},null,{disposeWhenNodeIsRemoved:u}),{controlsDescendantBindings:i.subclassOf(f.Widget)}}},t==="dxValidator"&&(r.bindingHandlers.dxValidator.after=o)};t.DOMComponent.redefine({_modelByElement:function(n){if(n.length)return r.dataFor(n.get(0))}}),s=t.registerComponent,h=function(n,t,i){i=i||t,s.apply(this,arguments),p(n,i)},t.registerComponent=h,u=function(n,t){var i=function(){r.cleanNode(this)};t?n.each(i):n.find("*").each(i)},c=n.fn.empty,n.fn.empty=function(){return u(this,!1),c.apply(this,arguments)},l=n.fn.remove,n.fn.remove=function(n,t){if(!t){var i=this;n&&(i=i.filter(n)),u(i,!0)}return l.call(this,n,t)},a=n.fn.html,n.fn.html=function(n){return typeof n=="string"&&u(this,!1),a.apply(this,arguments)},r.bindingHandlers.dxAction={update:function(i,u,f,e){var h=n(i),o=r.utils.unwrapObservable(u()),c=o,s={context:i},l;o.execute&&(c=o.execute,n.extend(s,o)),l=new t.Action(c,s);h.off(".dxActionBinding").on("dxclick.dxActionBinding",function(n){l.execute({element:h,model:e,evaluate:function(n){var u=e,f;return n.length>0&&n[0]==="$"&&(u=r.contextFor(i)),f=t.data.utils.compileGetter(n),f(u)},jQueryEvent:n}),s.bubbling||n.stopPropagation()})}},r.bindingHandlers.dxControlsDescendantBindings={init:function(n,t){return{controlsDescendantBindings:r.unwrap(t())}}}}}(jQuery,DevExpress),function(n,t,i){if(t.support.hasNg){var r=t.ui,u=t.data.utils.compileSetter,f=t.data.utils.compileGetter,h="dxNgCreation",c=t.ng.module,l=t.Class.inherit({ctor:function(t){this._$element=t.$element.data(h,!0),this._$templates=t.$templates,this._componentClass=t.componentClass,this._scope=t.scope,this._compile=t.compile,this._ngOptions=this._normalizeOptions(t.ngOptions),this._componentDisposing=n.Callbacks(),t.ngOptions.data&&this._initDataScope(t.ngOptions.data)},_normalizeOptions:function(t){var i=n.extend({},t);return t.bindingOptions&&n.each(t.bindingOptions,function(t,r){n.type(r)==="string"&&(i.bindingOptions[t]={dataPath:r})}),i},initComponentWithBindings:function(){this._initComponent(this._scope),this._initComponentBindings(),setTimeout(n.proxy(function(){t.utils.triggerShownEvent(this._$element)},this))},_initDataScope:function(t){if(typeof t=="string"){var r=t,i=this._scope;t=i.$eval(t),this._scope=i.$new(),this._synchronizeDataScopes(i,this._scope,t,r)}n.extend(this._scope,t)},_synchronizeDataScopes:function(t,i,r,u){var f=this;n.each(r,function(n){f._synchronizeScopeField({parentScope:t,childScope:i,fieldPath:n,parentPrefix:u})})},_initComponent:function(n){this._component=new this._componentClass(this._$element,this._evalOptions(n))},_initComponentBindings:function(){var t=this,r={};t._ngOptions.bindingOptions&&n.each(t._ngOptions.bindingOptions,function(u,f){var c=u.search(/\[|\./),o=c>-1?u.substring(0,c):u,l,e,s=f.dataPath,a=!0,v=!1,y,h;f.deep!==i&&(v=a=!!f.deep),r[o]||(r[o]={}),r[o][u]=s,y=function(n,i){n!==i&&(t._component.option(u,n),h())},h=function(){var i=n.isArray(t._scope.$eval(s))&&!v?"$watchCollection":"$watch";l!==i&&(e&&e(),e=t._scope[i](s,y,a),l=i)},h();t._component.on("disposing",function(){e(),t._componentDisposing.fire()})});t._component.on("optionChanged",function(i){var e=i.name,s=i.value;t._scope.$root.$$phase!=="$digest"&&r&&r[e]&&o(function(t){n.each(r[e],function(n,i){var o=u(i),h=f(n),r={};r[e]=s,o(t,h(r))})},t._scope)})},_compilerByTemplate:function(t){var r=this,u=this._getScopeItemsPath();return function(f,e){var h=n(t).clone(),c,s;if(f!==i){c=f.$id,s=c?f:r._createScopeWithData(f);h.on("$destroy",function(){var n=!s.$parent;n||s.$destroy()})}else s=r._scope;return u&&r._synchronizeScopes(s,u,e),o(r._compile(h),s),h}},_getScopeItemsPath:function(){if(this._componentClass.subclassOf(r.CollectionWidget)&&this._ngOptions.bindingOptions&&this._ngOptions.bindingOptions.items)return this._ngOptions.bindingOptions.items.dataPath},_createScopeWithData:function(t){var i=this._scope.$new(!0);return n.isPlainObject(t)?n.extend(i,t):i.scopeValue=t,i},_synchronizeScopes:function(t,i,r){var e=this,u=f(i+"["+r+"]")(this._scope);n.isPlainObject(u)||(u={scopeValue:u}),n.each(u,function(n){e._synchronizeScopeField({parentScope:e._scope,childScope:t,fieldPath:n,parentPrefix:i,itemIndex:r})})},_synchronizeScopeField:function(n){var r=n.parentScope,c=n.childScope,t=n.fieldPath,l=n.parentPrefix,e=n.itemIndex,y=t==="scopeValue"?"":"."+t,a=e!==i,o=[l],s,v,h;a&&o.push("[",e,"]"),o.push(y),s=o.join(""),v=r.$watch(s,function(n,i){n!==i&&u(t)(c,n)}),h=c.$watch(t,function(n,t){if(n!==t){if(a&&!f(l)(r)[e]){h();return}u(s)(r,n)}}),this._componentDisposing.add([v,h])},_evalOptions:function(t){var i=n.extend({},this._ngOptions);return delete i.data,delete i.bindingOptions,this._ngOptions.bindingOptions&&n.each(this._ngOptions.bindingOptions,function(n,r){i[n]=t.$eval(r.dataPath)}),i.templateProvider=r.NgTemplateProvider,i.templateCompiler=n.proxy(function(n){return this._compilerByTemplate(n)},this),i}}),o=function(n,t){t.$root.$$phase?n(t):t.$apply(function(){n(t)})},a=t.DOMComponent.inherit({_modelByElement:function(n){if(n.length)return n.scope()},_createAction:function(){var n=this.callBase.apply(this,arguments),t=this;return function(){var r=this,i=t._modelByElement(t.element()),u=arguments;return!i||!i.$root||i.$root.$$phase?n.apply(r,u):i.$apply(function(){return n.apply(r,u)})}},_createComponent:function(t,i,r){return this.callBase(t,i,n.extend({templateCompiler:this.option("templateCompiler")},r))}}),e={},v=t.registerComponent,s=function(n,t,i){i=i||t,v.apply(this,arguments),e[n]||y(n),e[n]=i},y=function(n){var t=n!=="dxValidator"?1:10;c.directive(n,["$compile",function(i){return{restrict:"A",priority:t,compile:function(t){var u=e[n],f=u.subclassOf(r.Widget)?t.contents().detach():null;return function(t,r,e){r.append(f);var o=new l({componentClass:u,componentName:n,compile:i,$element:r,scope:t,ngOptions:e[n]?t.$eval(e[n]):{}});o.initComponentWithBindings()}}}}])};t.registerComponent=s,s("DOMComponent",a)}}(jQuery,DevExpress),function(n,t,i){var h,a,v,c;if(t.support.hasKo){var f=window.ko,e=t.ui,o=e.TemplateBase.inherit({ctor:function(i){this.callBase.apply(this,arguments),this._template=n("<div>").append(t.utils.normalizeTemplateElement(i)),this._registerKoTemplate()},_registerKoTemplate:function(){var n=this._template.get(0);new f.templateSources.anonymousTemplate(n).nodes(n)},_prepareDataForContainer:function(n,i){var u=n,e,r;return i.length&&(e=i.get(0),n=t.utils.isDefined(n)?n:f.dataFor(e)||{},r=f.contextFor(e),u=r?n===r.$data?r:r.createChildContext(n):n),u},_renderCore:function(t){var i=n("<div />"),r;return f.renderTemplate(this._template.get(0),t,null,i.get(0)),r=i.contents(),r.detach(),i.remove(),r},dispose:function(){this.callBase(),this._template.remove()}}),y=new(e.TemplateProviderBase.inherit({createTemplate:function(n,t){return new o(n,t)},applyTemplate:function(n,t){f.applyBindings(t,n)},_templatesForWidget:function(i){var f=r[i]||{},u={};return n.each(f,function(n,i){var r=t.utils.createMarkupFromString(i());u[n]=new o(r,this)}),u}})),u=function(t,r,u,f){u=u===i?!0:u;var e=n.map(r,function(n,t){return t+":"+n}).join(",");return f=f||"","<"+t+' data-bind="'+e+'" '+f+">"+(u?"<\/"+t+">":"")},s={css:"{ 'dx-state-disabled': $data.disabled, 'dx-state-invisible': !($data.visible === undefined || ko.unwrap($data.visible)) }"},r={};r.CollectionWidget={itemFrame:function(){var n=[u("div",s,!1),"<div class='dx-item-content-placeholder'><\/div>","<\/div>"];return n.join("")},item:function(){var n=u("div",{html:"html"}),t=u("div",{text:"text"}),i=u("div",{text:"String($data)"}),r=["<div>","<!-- ko if: $data.html && !$data.text -->",n,"<!-- /ko -->","<!-- ko if: !$data.html && $data.text -->",t,"<!-- /ko -->","<!-- ko ifnot: $.isPlainObject($data) -->",i,"<!-- /ko -->","<\/div>"];return r.join("")}};var p="dx-list-item-badge-container",w="dx-list-item-badge",l="dx-badge",b="dx-list-item-chevron-container",k="dx-list-item-chevron";r.dxList={item:function(){var n=r.CollectionWidget.item(),t=u("div",{text:"key"});return n=[n.substring(0,n.length-6),"<!-- ko if: $data.key -->"+t+"<!-- /ko -->","<\/div>"],n.join("")},itemFrame:function(){var n=r.CollectionWidget.itemFrame(),t=u("div",{text:"badge"},!0,'class="'+w+" "+l+'"'),i=[n.substring(0,n.length-6),"<!-- ko if: $data.badge -->",'<div class="'+p+'">',t,"<\/div>","<!-- /ko -->","<!-- ko if: $data.showChevron -->",'<div class="'+b+'">','<div class="'+k+'"><\/div>',"<\/div>","<!-- /ko -->","<\/div>"];return i.join("")},group:function(){var n=u("div",{text:"key"}),t=u("div",{text:"String($data)"}),i=["<div>","<!-- ko if: $data.key -->",n,"<!-- /ko -->","<!-- ko ifnot: $.isPlainObject($data) -->",t,"<!-- /ko -->","<\/div>"];return i.join("")}},r.dxDropDownMenu={item:r.dxList.item},r.dxDropDownList={item:r.dxList.item},r.dxRadioGroup={item:r.CollectionWidget.item},r.dxSlideOutView={menu:function(){return""}},r.dxSlideOut={menuItem:r.dxList.item,menuGroup:r.dxList.group},h=function(){var n=u("span",{text:"title"}),t=u("span",{text:"String($data)"}),i=u("span",{attr:"{ 'class': 'dx-icon-' + $data.icon }",css:"{ 'dx-icon': true }"}),r=u("img",{attr:"{ src: $data.iconSrc }",css:"{ 'dx-icon': true }"},!1),f=["<div>","<!-- ko if: $data.icon -->",i,"<!-- /ko -->","<!-- ko if: $data.iconSrc -->",r,"<!-- /ko -->","<!-- ko if: $data.title -->",n,"<!-- /ko -->","<!-- ko ifnot: $.isPlainObject($data) -->",t,"<!-- /ko -->","<\/div>"];return f.join("")},r.dxAccordion={title:h,item:r.CollectionWidget.item},r.dxResponsiveBox={item:r.CollectionWidget.item},r.dxPivotTabs={item:function(){var n=r.CollectionWidget.item(),t=u("span",{text:"title"}),i=n.indexOf(">")+1,f=n.length-6;return n=[n.substring(0,i),t,n.substring(f,n.length)],n.join("")}},r.dxPivot={title:r.dxPivotTabs.item},a="dx-panorama-item-title",r.dxPanorama={itemFrame:function(){var n=r.CollectionWidget.itemFrame(),i=u("div",{text:"title"},!0,'class="'+a+'"'),t=n.indexOf(">")+1;return n=[n.substring(0,t),"<!-- ko if: $data.title -->",i,"<!-- /ko -->",n.substring(t,n.length)],n.join("")}},r.dxActionSheet={item:function(){return u("div",{dxButton:"{ text: $data.text, onClick: $data.clickAction || $data.onClick, type: $data.type, disabled: !!ko.unwrap($data.disabled) }"})}},r.dxToolbar={item:function(){var i=r.CollectionWidget.item();return i=[i.substring(0,i.length-6),"<!-- ko if: $data.widget -->"],n.each(["button","tabs","dropDownMenu"],function(){var r=t.inflector.camelize(["dx","-",this].join("")),n={};n[r]="$data.options",i.push("<!-- ko if: $data.widget === '",this,"' -->",u("div",n),"<!-- /ko -->")}),i.push("<!-- /ko -->"),i.join("")},menuItem:r.dxList.item,actionSheetItem:r.dxActionSheet.item},r.dxGallery={item:function(){var n=r.CollectionWidget.item(),t=u("div",{text:"String($data)"}),i=u("img",{attr:"{ src: String($data) }"},!1);return n=[n.substring(0,n.length-6).replace(t,i),"<!-- ko if: $data.imageSrc -->",u("img",{attr:"{ src: $data.imageSrc }"},!1),"<!-- /ko -->"].join("")}},r.dxTabs={item:function(){var n=r.CollectionWidget.item(),t=u("div",{text:"text"}),i=u("span",{attr:"{ 'class': 'dx-icon-' + $data.icon }",css:"{ 'dx-icon': true }"}),f=u("img",{attr:"{ src: $data.iconSrc }",css:"{ 'dx-icon': true }"},!1),e="<!-- ko if: $data.icon -->"+i+"<!-- /ko --><!-- ko if: !$data.icon && $data.iconSrc -->"+f+'<!-- /ko --><span class="dx-tab-text" data-bind="text: $data.text"><\/span>';return n=n.replace("<!-- ko if: !$data.html && $data.text -->","<!-- ko if: !$data.html && ($data.text || $data.icon || $data.iconSrc) -->").replace(t,e)}},r.dxTabPanel={item:r.CollectionWidget.item,title:h},v="dx-navbar-item-badge",r.dxNavBar={itemFrame:function(){var n=r.CollectionWidget.itemFrame(),t=u("div",{text:"badge"},!0,'class="'+v+" "+l+'"'),i=[n.substring(0,n.length-6),"<!-- ko if: $data.badge -->",t,"<!-- /ko -->","<\/div>"];return i.join("")}},r.dxMenuBase={item:function(){var n=[u("div",s,!1)],t=u("span",{attr:"{ 'class': 'dx-icon-' + $data.icon }",css:"{ 'dx-icon': true }"}),i=u("img",{attr:"{ src: $data.iconSrc }",css:"{ 'dx-icon': true }"}),r=u("span",{text:"text",css:"{ 'dx-menu-item-text': true }"}),f=u("span",{text:"String($data)",css:"{ 'dx-menu-item-text': true }"}),e='<span class="dx-menu-item-popout-container"><div class="dx-menu-item-popout"><\/div><\/span>';return n.push("<!-- ko if: $data.icon -->",t,"<!-- /ko -->","<!-- ko if: !$data.icon && $data.iconSrc -->",i,"<!-- /ko -->","<!-- ko if: $.isPlainObject($data) && $data.text -->",r,"<!-- /ko -->","<!-- ko ifnot: $.isPlainObject($data) -->",f,"<!-- /ko -->","<!-- ko if: $data.items -->",e,"<!-- /ko -->","<\/div>"),n.join("")}},r.dxTreeView={item:function(){var n=[u("div",s,!1)],t=u("span",{text:"text"},!0),i=u("span",{attr:"{ 'class': 'dx-icon-' + $data.icon }",css:"{ 'dx-icon': true }"}),r=u("img",{attr:"{ src: $data.iconSrc }",css:"{ 'dx-icon': true }"},!1);return n.push("<div>","<!-- ko if: $data.icon -->",i,"<!-- /ko -->","<!-- ko if: !$data.icon && $data.iconSrc -->",r,"<!-- /ko -->","<!-- ko if: !$data.html && $data.text -->"+t+"<!-- /ko -->","<\/div>"),n.join("")}},c=function(){return u("div",{dxToolbar:"{ items: $data }"})},r.dxPopup={title:c,bottom:c},r.dxLookup={title:r.dxPopup.title,group:r.dxList.group},n.extend(e,{KoTemplateProvider:y,KoTemplate:o})}}(jQuery,DevExpress),function(n,t){var o,c,l,s;if(t.support.hasNg){var f=t.ui,b="dxNgCreation",k="dxNgCompiler",d="dxDefaultCompilerGetter",e=f.TemplateBase.inherit({ctor:function(){this.callBase.apply(this,arguments),this.setCompiler(this._getParentTemplateCompiler())},_getParentTemplateCompiler:function(){for(var i=null,t=this.owner();!i&&t;)i=n.isFunction(t.option)?t.option("templateCompiler"):null,t=n.isFunction(t.owner)?t.owner():null;return i},_renderCore:function(t,i){var r=this._compiledTemplate;return n.isFunction(r)?r(t,i):r},setCompiler:function(n){n&&(this._compiledTemplate=n(t.utils.normalizeTemplateElement(this._element)))}}),a=new(f.TemplateProviderBase.inherit({createTemplate:function(n,t){return new e(n,t)},getTemplates:function(t){var r=t.option("templateCompiler"),i=this.callBase.apply(this,arguments);return n.each(i,function(n,t){t.setCompiler(r)}),i},_templatesForWidget:function(i){var f=r[i]||{},u={};return n.each(f,function(n,i){var r=t.utils.createMarkupFromString(i());u[n]=new e(r,this)}),u}})),u={container:function(){return n("<div>")},html:function(){return n("<div>").attr("ng-if","html").attr("ng-bind-html","html")},text:function(){return n("<div>").attr("ng-if","text").attr("ng-bind","text")},primitive:function(){return n("<div>").attr("ng-if","scopeValue").attr("ng-bind-html","'' + scopeValue")}},r={};r.CollectionWidget={item:function(){return u.container().append(u.html()).append(u.text()).append(u.primitive())},itemFrame:function(){var t=n("<div>").attr("ng-class","{ 'dx-state-invisible': !visible && visible != undefined, 'dx-state-disabled': !!disabled }"),i=n("<div>").addClass("dx-item-content-placeholder");return t.append(i),t}};var v="dx-list-item-badge-container",y="dx-list-item-badge",h="dx-badge",p="dx-list-item-chevron-container",w="dx-list-item-chevron";r.dxList={item:function(){return r.CollectionWidget.item().append(n("<div>").attr("ng-if","key").attr("ng-bind","key"))},itemFrame:function(){var t=n("<div>").addClass(v).attr("ng-if","badge"),i=n("<div>").addClass(y).addClass(h).attr("ng-bind","badge"),u=n("<div>").addClass(p).attr("ng-if","showChevron"),f=n("<div>").addClass(w);return r.CollectionWidget.itemFrame().append(t.append(i)).append(u.append(f))},group:function(){var t=n("<div>").attr("ng-if","key").attr("ng-bind","key");return u.container().append(t).append(u.primitive())}},r.dxDropDownMenu={item:r.dxList.item},r.dxDropDownList={item:r.dxList.item},r.dxRadioGroup={item:r.CollectionWidget.item},r.dxSlideOutView={menu:function(){return n()}},r.dxSlideOut={menuItem:r.dxList.item,menuGroup:r.dxList.group},o=function(){var t=n("<span>").attr("ng-if","title").attr("ng-bind","title"),i=n("<span>").attr("ng-if","icon").addClass("dx-icon").attr("ng-class","'dx-icon-' + icon"),r=n("<img>").attr("ng-if","iconSrc").addClass("dx-icon").attr("ng-src","{{iconSrc}}");return u.container().append(i).append(r).append(t).append(u.primitive())},r.dxAccordion={title:o,content:r.CollectionWidget.item},r.dxPivotTabs={item:function(){return u.container().append(n("<span>").attr("ng-bind","title"))}},r.dxPivot={title:r.dxPivotTabs.item},c="dx-panorama-item-title",r.dxPanorama={itemFrame:function(){return r.CollectionWidget.itemFrame().prepend(n("<div>").addClass(c).attr("ng-if","title").attr("ng-bind","title"))}},r.dxActionSheet={item:function(){return n("<div>").attr("dx-button","{ bindingOptions: { text: 'text', onClick: 'onClick', type: 'type', disabled: 'disabled' } }")}},r.dxToolbar={item:function(){var i=r.CollectionWidget.item();return n.each(["button","tabs","dropDownMenu"],function(r,u){var f="dx-"+t.inflector.dasherize(this);n("<div>").attr("ng-if","widget === '"+u+"'").attr(f,"options").appendTo(i)}),i},menuItem:r.dxList.item,actionSheetItem:r.dxActionSheet.item},r.dxGallery={item:function(){return u.container().append(u.html()).append(u.text()).append(n("<img>").attr("ng-if","scopeValue").attr("ng-src","{{'' + scopeValue}}")).append(n("<img>").attr("ng-if","imageSrc").attr("ng-src","{{imageSrc}}"))}},r.dxTabs={item:function(){var t=u.container(),i=n("<span>").addClass("dx-tab-text").attr("ng-bind","text").attr("ng-if","text"),r=n("<span>").attr("ng-if","icon").addClass("dx-icon").attr("ng-class","'dx-icon-' + icon"),f=n("<img>").attr("ng-if","iconSrc").addClass("dx-icon").attr("ng-src","{{iconSrc}}");return t.append(u.html()).append(r).append(f).append(i).append(u.primitive())}},l="dx-navbar-item-badge",r.dxNavBar={itemFrame:function(){var t=n("<div>").addClass(l).addClass(h).attr("ng-if","badge").attr("ng-bind","badge");return r.CollectionWidget.itemFrame().append(t)}},r.dxMenuBase={item:function(){var t=u.container(),i=n("<span>").attr("ng-if","text").addClass("dx-menu-item-text").attr("ng-bind","text"),r=n("<span>").attr("ng-if","icon").addClass("dx-icon").attr("ng-class","'dx-icon-' + icon"),f=n("<img>").attr("ng-if","iconSrc").addClass("dx-icon").attr("ng-src","{{iconSrc}}"),e=n("<span>").addClass("dx-menu-item-popout-container").attr("ng-if","items").append(n("<div>").addClass("dx-menu-item-popout"));return t.append(u.html()).append(r).append(f).append(i).append(e).append(u.primitive()).appendTo(t),t}},r.dxTreeView={item:function(){var t=u.container(),i=n("<div />"),r=n("<span/>").attr("ng-bind","text"),f=n("<span>").attr("ng-if","icon").addClass("dx-icon").attr("ng-class","'dx-icon-' + icon"),e=n("<img>").attr("ng-if","iconSrc").addClass("dx-icon").attr("ng-src","{{iconSrc}}");return i.append(u.html()).append(f).append(e).append(r).append(u.primitive()).appendTo(t),t}},r.dxTabPanel={item:r.CollectionWidget.item,title:o},s=function(){return n("<div>").attr("dx-toolbar","{ bindingOptions: { items: 'scopeValue' } }")},r.dxPopup={title:s,bottom:s},r.dxLookup={title:r.dxPopup.title,group:r.dxList.group},n.extend(f,{NgTemplate:e,NgTemplateProvider:a})}}(jQuery,DevExpress),function(n,t){if(t.support.hasKo){var r=window.ko,u=t.Class.inherit({ctor:function(t,i){var u=this;u.target=t,u.validationRules=i.validationRules,u.name=i.name,u.isValid=r.observable(!0),u.validationError=r.observable(),n.each(this.validationRules,function(n,t){t.validator=u})},validate:function(){var n=DevExpress.validationEngine.validate(this.target(),this.validationRules,this.name);return this._applyValidationResult(n),n},reset:function(){this.target(null);var n={isValid:!0,brokenRule:null};return this._applyValidationResult(n),n},_applyValidationResult:function(n){n.validator=this,this.target.dxValidator.isValid(n.isValid),this.target.dxValidator.validationError(n.brokenRule),this.fireEvent("validated",[n])}}).include(t.EventsMixin);r.extenders.dxValidator=function(t,i){return t.dxValidator=new u(t,i),t.subscribe(n.proxy(t.dxValidator.validate,t.dxValidator)),t},DevExpress.validationEngine.registerModelForValidation=function(t){n.each(t,function(n,i){r.isObservable(i)&&i.dxValidator&&DevExpress.validationEngine.registerValidatorInGroup(t,i.dxValidator)})},DevExpress.validationEngine.validateModel=DevExpress.validationEngine.validateGroup}}(jQuery,DevExpress),function(n,t,i){function v(){var i=n("<div><\/div>",u).addClass("dx-theme-marker").appendTo(u.documentElement),t;try{return(t=i.css("font-family"),!t)?null:(t=t.replace(/["']/g,""),t.substr(0,s.length)!==s)?null:t.substr(s.length)}finally{i.remove()}}function d(t,i){function f(){e=null,i()}var r,u;e=t,y()?f():(u=n.now(),r=setInterval(function(){var t=y(),i=!t&&n.now()-u>15e3;(t||i)&&(clearInterval(r),f())},10))}function y(){return!e||v()===e}function g(){var i=n(a,u);i.length&&(f={},o=n(t.utils.createMarkupFromString("<link rel=stylesheet>"),u),i.each(function(){var t=n(this,u),i=t.attr(b),r=t.attr("href"),e=t.attr(k)==="true";f[i]={url:r,isActive:e}}),i.last().after(o),i.remove())}function nt(t){var i=t.split("."),r=null;return f&&n.each(f,function(n,t){var u=n.split(".");if(u[0]===i[0])return i[1]&&i[1]!==u[1]?void 0:((!r||t.isActive)&&(r=n),t.isActive?!1:void 0)}),r}function tt(n){try{n!==u&&(f=null)}catch(t){f=null}u=n}function p(n){n=n||{},tt(n.context||document),g(),r=i,h(n)}function h(n){if(!arguments.length)return r||v();l(t.viewPort(),r),n=n||{},typeof n=="string"&&(n={theme:n});var u=n._autoInit,i=n.loadCallback,s;if(r=n.theme||r,u&&!r&&(r=it(t.devices.current(),t.devices.isForced())),r=nt(r),r&&(s=f[r]),s)o.removeAttr("href"),o.attr("href",f[r].url),i?d(r,i):e&&(e=r);else if(u)i&&i();else throw t.Error("E0021",r);c(t.viewPort(),r)}function it(n,i){var r=n.platform,u=n.version&&n.version[0];return r==="ios"&&(!u||u>6||!i?r+="7":t.log("W0006","iOS","ios7")),r==="android"&&(!u||u>4||!i?r+="5":t.log("W0006","Android","android5")),r}function w(n){n=n||h();var i=[],t=n&&n.split(".");return t&&(i.push("dx-theme-"+t[0],"dx-theme-"+t[0]+"-typography"),t.length>1&&i.push("dx-color-scheme-"+t[1])),i}function c(t,i){n(t).addClass(w(i).join(" "))}function l(t,i){n(t).removeClass(w(i).join(" "))}var a="link[rel=dx-theme]",b="data-theme",k="data-active",u,o,f,r,e,s="dx.";n.holdReady(!0),p({_autoInit:!0,loadCallback:function(){n.holdReady(!1)}}),n(function(){if(n(a,u).length)throw t.Error("E0022");}),t.viewPortChanged.add(function(n,t){l(t),c(n)}),t.ui.themes={init:p,current:h,attachCssClasses:c,detachCssClasses:l}}(jQuery,DevExpress),function(n,t){var v=t.ui,r=n.event,o=r.fixHooks,y=r.special,p={dx:/^dx/i,mouse:/(mouse|wheel)/i,touch:/^touch/i,keyboard:/^key/i,pointer:/^(ms)?pointer/i},u=function(t){var i="other";return n.each(p,function(n){if(this.test(t.type))return i=n,!1}),i},f=function(n){return u(n)==="dx"},w=function(n){return u(n)==="mouse"},s=function(n){return u(n)==="touch"},e=function(n){return u(n)==="pointer"},h=function(n){return w(n)||(e(n)||f(n))&&n.pointerType==="mouse"},c=function(n){return s(n)||(e(n)||f(n))&&n.pointerType==="touch"},b=function(n){return u(n)==="keyboard"},k=function(n){return{x:n.pageX,y:n.pageY,time:n.timeStamp}},d=function(n,t){return{x:t.x-n.x,y:t.y-n.y,time:t.time-n.time||1}},g=function(n){return s(n)?(n.originalEvent.touches||[]).length:f(n)?(n.pointers||[]).length:0},nt=function(t){var i=n(t.target),r=i.is("input, textarea, select");return t.type==="dxmousewheel"?i.is("input[type='number'], textarea, select")&&i.is(":focus"):h(t)?r||t.which>1:c(t)?r&&i.is(":focus"):void 0},l=function(t,i){for(var u=n.Event(t),f=o[t.type]||r.mouseHooks,s=f.props?r.props.concat(f.props):r.props,h=s.length,e;h--;)e=s[h],u[e]=t[e];return i&&n.extend(u,i),f.filter?f.filter(u,t):u},tt=function(n){var t=l(n.originalEvent,n);return r.trigger(t,null,n.delegateTarget||t.target),t},a=function(t,i){return typeof t=="string"?a(t.split(/\s+/g),i):(n.each(t,function(n,r){t[n]=r+"."+i}),t.join(" "))},it={props:r.mouseHooks.props.concat(["pointerType","pointerId","pointers"])},rt=function(t,i){var r={};"noBubble"in i&&(r.noBubble=i.noBubble),"bindType"in i&&(r.bindType=i.bindType),"delegateType"in i&&(r.delegateType=i.delegateType),n.each(["setup","teardown","add","remove","trigger","handle","_default","dispose"],function(t,u){i[u]&&(r[u]=function(){var t=n.makeArray(arguments);return t.unshift(this),i[u].apply(i,t)})}),o[t]=it,y[t]=r};v.events={eventSource:u,isPointerEvent:e,isMouseEvent:h,isTouchEvent:c,isKeyboardEvent:b,hasTouches:g,eventData:k,eventDelta:d,needSkipEvent:nt,createEvent:l,fireEvent:tt,addNamespace:a,registerEvent:rt}}(jQuery,DevExpress),function(n,t){if(t.support.hasKo){var u=window.ko,r=t.ui.events,f=r.registerEvent,e=function(t,i){f(t,i);var e=r.addNamespace(t,t+"Binding");u.bindingHandlers[t]={update:function(t,i,r,f){var s=n(t),o=u.utils.unwrapObservable(i()),h=o.execute?o.execute:o;s.off(e).on(e,n.isPlainObject(o)?o:{},function(n){h.call(f,f,n)})}}};n.extend(r,{registerEvent:e})}}(jQuery,DevExpress),function(n,t){if(t.support.hasNg){var r=t.ui.events,u=r.registerEvent,f=function(i,r){u(i,r);var f=i.slice(0,2)+i.charAt(2).toUpperCase()+i.slice(3);t.ng.module.directive(f,["$parse",function(t){return function(r,u,e){var h=n.trim(e[f]),o,s={};h.charAt(0)==="{"?(s=r.$eval(h),o=t(s.execute)):o=t(e[f]);u.on(i,s,function(n){r.$apply(function(){o(r,{$event:n})})})}}])};n.extend(r,{registerEvent:f})}}(jQuery,DevExpress),function(n,t,i){var r=t.ui,u=r.events;r.KeyboardProcessor=t.Class.inherit({_keydown:u.addNamespace("keydown","KeyboardProcessor"),codes:{"8":"backspace","9":"tab","13":"enter","27":"escape","33":"pageUp","34":"pageDown","35":"end","36":"home","37":"leftArrow","38":"upArrow","39":"rightArrow","40":"downArrow","32":"space","70":"F","65":"A","106":"asterisk","109":"minus"},ctor:function(t){var i=this;if(t=t||{},t.element&&(this._element=n(t.element)),this._handler=t.handler,this._context=t.context,this._childProcessors=[],this._element)this._element.on(this._keydown,function(n){i.process(n)})},dispose:function(){this._element&&this._element.off(this._keydown),this._element=i,this._handler=i,this._context=i,this._childProcessors=i},clearChildren:function(){this._childProcessors=[]},push:function(n){return this._childProcessors||this.clearChildren(),this._childProcessors.push(n),n},attachChildProcessor:function(){var n=new r.KeyboardProcessor;return this._childProcessors.push(n),n},reinitialize:function(n,t){return this._context=t,this._handler=n,this},process:function(t){var i={key:this.codes[t.which],ctrl:t.ctrlKey,shift:t.shiftKey,alt:t.altKey,originalEvent:t};this.codes[t.which]&&this._handler&&this._handler.call(this._context,i)&&this._childProcessors&&n.each(this._childProcessors,function(n,i){i.process(t)})}})}(jQuery,DevExpress),function(n,t,i){var u=t.ui,o=t.utils,s={text:"OK",onClick:function(){return!0}},r="dx-dialog",h=r+"-wrapper",c=r+"-root",l=r+"-content",a=r+"-message",v=r+"-buttons",y=r+"-button",p=t.Component.inherit({NAME:"dxDialog",ctor:function(n,t){this.callBase(t)},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"ios"},options:{width:276}},{device:{platform:"android"},options:{lWidth:"60%",pWidth:"80%"}},{device:{platform:"win8",phone:!1},options:{width:function(){return n(window).width()}}},{device:{platform:"win8",phone:!0},options:{position:{my:"top center",at:"top center",of:window,offset:"0 0"}}}])}}),w=function(f){function tt(){return e.show(),o.resetActiveElement(),w.promise()}function d(n){e.hide().done(function(){e.element().remove()}),w.resolve(n)}var w,b,e;if(!u.dxPopup)throw t.Error("E0018");w=n.Deferred(),b=(new p).option(),f=n.extend(b,f);var g=n("<div>").addClass(r).appendTo(t.viewPort()),nt=n("<div>").addClass(a).html(String(f.message)),k=[];return n.each(f.buttons||[s],function(){this.clickAction&&(t.log("W0001","Dialog","clickAction","14.2","Use 'onClick' option instead"),this.onClick=this.clickAction);var n=new t.Action(this.onClick||this.clickAction,{context:e});k.push({toolbar:"bottom",location:"center",widget:"button",options:{text:this.text,onClick:function(){var t=n.execute(arguments);d(t)}}})}),e=g.dxPopup({title:f.title||this.title,showTitle:function(){return f.showTitle===i?!0:f.showTitle}(),height:"auto",width:function(){var r=n(window).height()>n(window).width(),i=(r?"p":"l")+"Width",t=f.hasOwnProperty(i)?f[i]:f.width;return n.isFunction(t)?t():t},showCloseButton:!1,focusStateEnabled:!1,onContentReady:function(n){n.component.content().addClass(l).append(nt)},onShown:function(n){n.component.bottomToolbar().addClass(v).find(".dx-button").addClass(y).first().focus()},buttons:k,animation:{show:{type:"pop",duration:400},hide:{type:"pop",duration:400,to:{opacity:0,scale:0},from:{opacity:1,scale:1}}},rtlEnabled:t.rtlEnabled,boundaryOffset:{h:10,v:0}}).dxPopup("instance"),e._wrapper().addClass(h),f.position&&e.option("position",f.position),e._wrapper().addClass(c),{show:tt,hide:d}},f=function(t,i,r){var f,e=n.isPlainObject(t)?t:{title:i,message:t,showTitle:r};return f=u.dialog.custom(e),f.show()},b=function(t,i,r){var f,e=n.isPlainObject(t)?t:{title:i,message:t,showTitle:r,buttons:[{text:Globalize.localize("Yes"),onClick:function(){return!0}},{text:Globalize.localize("No"),onClick:function(){return!1}}]};return f=u.dialog.custom(e),f.show()},e=null,k=function(i,r,o){var s=n.isPlainObject(i)?i:{message:i},h;if(!u.dxToast){f(s.message);return}s.hiddenAction&&(t.log("W0001","Dialog","hiddenAction","14.2","Use 'onHidden' option instead"),s.onHidden=s.hiddenAction),h=s.onHidden,n.extend(s,{type:r,displayTime:o,onHidden:function(n){n.element.remove(),new t.Action(h,{context:n.model}).execute(arguments)}}),e=n("<div>").appendTo(t.viewPort()).dxToast(s),e.dxToast("instance").show()};n.extend(u,{notify:k,dialog:{custom:w,alert:f,confirm:b}})}(jQuery,DevExpress),function(n,t){var r=t.data,u="_dataSourceOptions",f="_dataSourceChangedHandler",e="_dataSourceLoadErrorHandler",o="_dataSourceLoadingChangedHandler";t.ui.DataHelperMixin={postCtor:function(){this.on("disposing",function(){this._disposeDataSource()})},_refreshDataSource:function(){this._initDataSource(),this._loadDataSource()},_initDataSource:function(){var t=this.option("dataSource"),i,f;this._disposeDataSource(),t&&(t instanceof r.DataSource?(this._isSharedDataSource=!0,this._dataSource=t):(i=u in this?this[u]():{},f=this._dataSourceType?this._dataSourceType():r.DataSource,this._dataSource=new f(n.extend(!0,{},i,r.utils.normalizeDataSourceOptions(t)))),this._addDataSourceHandlers())},_addDataSourceHandlers:function(){f in this&&this._addDataSourceChangeHandler(),e in this&&this._addDataSourceLoadErrorHandler(),o in this&&this._addDataSourceLoadingChangedHandler(),this._addReadyWatcher()},_addReadyWatcher:function(){this._dataSource.on("loadingChanged",n.proxy(function(n){this._ready&&this._ready(!n)},this))},_addDataSourceChangeHandler:function(){var t=this._dataSource;this._proxiedDataSourceChangedHandler=n.proxy(function(){this[f](t.items())},this);t.on("changed",this._proxiedDataSourceChangedHandler)},_addDataSourceLoadErrorHandler:function(){this._proxiedDataSourceLoadErrorHandler=n.proxy(this[e],this);this._dataSource.on("loadError",this._proxiedDataSourceLoadErrorHandler)},_addDataSourceLoadingChangedHandler:function(){this._proxiedDataSourceLoadingChangedHandler=n.proxy(this[o],this);this._dataSource.on("loadingChanged",this._proxiedDataSourceLoadingChangedHandler)},_loadDataSource:function(){if(this._dataSource){var n=this._dataSource;n.isLoaded()?this._proxiedDataSourceChangedHandler&&this._proxiedDataSourceChangedHandler():n.load()}},_loadSingle:function(n,t){return n=n==="this"?this._dataSource.key()||"this":n,this._dataSource.loadSingle(n,t)},_disposeDataSource:function(){this._dataSource&&(this._isSharedDataSource?(delete this._isSharedDataSource,this._dataSource.off("changed",this._proxiedDataSourceChangedHandler),this._dataSource.off("loadError",this._proxiedDataSourceLoadErrorHandler),this._dataSource.off("loadingChanged",this._proxiedDataSourceLoadingChangedHandler)):this._dataSource.dispose(),delete this._dataSource,delete this._proxiedDataSourceChangedHandler,delete this._proxiedDataSourceLoadErrorHandler,delete this._proxiedDataSourceLoadingChangedHandler)}}}(jQuery,DevExpress),function(n,t,i){var f=t.ui,r=t.utils,u=t.data.utils;f.DataExpressionMixin=n.extend(f.DataHelperMixin,{_dataExpressionDeprecatedOptions:function(){return{itemRender:{since:"14.2",alias:"itemTemplate"}}},_dataExpressionDefaultOptions:function(){return{items:[],dataSource:null,itemTemplate:"item",value:i,valueExpr:"this",displayExpr:i}},_initDataExpressions:function(){this._compileValueGetter(),this._compileDisplayGetter(),this._initDynamicTemplates(),this._initDataSource(),this._itemsToDataSource()},_itemsToDataSource:function(){this.option("dataSource")||(this._dataSource=new DevExpress.data.DataSource({store:new DevExpress.data.ArrayStore(this.option("items")),pageSize:0}))},_compileDisplayGetter:function(){this._displayGetter=u.compileGetter(this.option("displayExpr"))},_compileValueGetter:function(){this._valueGetter=u.compileGetter(this._valueGetterExpr())},_valueGetterExpr:function(){return this.option("valueExpr")||"this"},_loadValue:function(t){var i=n.Deferred();return(t=this._unwrappedValue(t),!r.isDefined(t))?i.reject().promise():(this._loadSingle(this._valueGetterExpr(),t).done(n.proxy(function(n){this._isValueEquals(this._valueGetter(n),t)?i.resolve(n):i.reject()},this)).fail(function(){i.reject()}),i.promise())},_unwrappedValue:function(n){if(n=t.utils.isDefined(n)?n:this.option("value"),n&&this._dataSource&&this._valueGetterExpr()==="this"){var i=this._dataSource.key();i&&typeof n=="object"&&(n=n[i])}return r.unwrapObservable(n)},_isValueEquals:function(n,t){var i=this._dataSource&&this._dataSource.key(),u=this._compareValues(n,t),f,e;return!u&&n&&t&&i&&(f=r.unwrapObservable(n[i])||n,e=r.unwrapObservable(t[i])||t,u=this._compareValues(f,e)),u},_compareValues:function(n,t){return u.toComparable(n)===u.toComparable(t)},_initDynamicTemplates:function(){this.option("displayExpr")?this._dynamicTemplates.item=new f.DefaultTemplate(n.proxy(function(n){return this._displayGetter(n)},this)):delete this._dynamicTemplates.item},_setCollectionWidgetItemTemplate:function(){this._initDynamicTemplates(),this._setCollectionWidgetOption("itemTemplate",this._getTemplateByOption("itemTemplate"))},_dataExpressionOptionChanged:function(n){switch(n.name){case"items":this._itemsToDataSource(),this._setCollectionWidgetOption("items");break;case"dataSource":this._initDataSource();break;case"itemTemplate":this._setCollectionWidgetItemTemplate();break;case"valueExpr":this._compileValueGetter();break;case"displayExpr":this._compileDisplayGetter(),this._setCollectionWidgetItemTemplate()}}})}(jQuery,DevExpress),function(n){var r={filter:function(t,i){var r=i.touches.length?i.touches:i.changedTouches;return n.each(["pageX","pageY","screenX","screenY","clientX","clientY"],function(){t[this]=r[0][this]}),t},props:n.event.mouseHooks.props.concat(["touches","changedTouches","targetTouches","detail","result","originalTarget","charCode","prevValue"])};n.each(["touchstart","touchmove","touchend","touchcancel"],function(){n.event.fixHooks[this]=r})}(jQuery,DevExpress),function(n){var r={2:"touch",3:"pen",4:"mouse"},u={filter:function(t,i){var u=i.pointerType;return n.isNumeric(u)&&(t.pointerType=r[u]),t},props:n.event.mouseHooks.props.concat(["pointerId","pointerType","originalTarget","width","height","pressure","result","tiltX","charCode","tiltY","detail","isPrimary","prevValue"])};n.each(["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerCancel","MSPointerOver","MSPointerOut","mouseenter","mouseleave","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","pointerenter","pointerleave"],function(){n.event.fixHooks[this]=u})}(jQuery,DevExpress),function(n,t,i){var u=t.ui,r=u.events,f="dxPointerEvents",e=t.Class.inherit({ctor:function(n,t){this._eventName=n,this._eventNamespace=[f,".",this._eventName].join(""),this._originalEvents=t,this._handlerCount=0,this.noBubble=this._isNoBubble()},_isNoBubble:function(){var n=this._eventName;return n==="dxpointerenter"||n==="dxpointerleave"},_handler:function(n){var t=this._getDelegateTarget(n);return this._fireEvent({type:this._eventName,pointerType:n.pointerType||r.eventSource(n),originalEvent:n,delegateTarget:t})},_getDelegateTarget:function(n){var t=i;return this.noBubble&&(t=n.delegateTarget),t},_fireEvent:function(n){return r.fireEvent(n)},add:function(t,i){if(this._handlerCount<=0||this.noBubble){this._selector=i.selector,t=this.noBubble?t:document;n(t).on(r.addNamespace(this._originalEvents,this._eventNamespace),this._selector,n.proxy(this._handler,this))}this.noBubble||this._handlerCount++},remove:function(){this.noBubble||this._handlerCount--},teardown:function(t){(!this._handlerCount||this.noBubble)&&(t=this.noBubble?t:document,n(t).off("."+this._eventNamespace,this._selector))},dispose:function(t){t=this.noBubble?t:document,n(t).off("."+this._eventNamespace)}});r.pointer={},r.pointer.BaseStrategy=e}(jQuery,DevExpress),function(n,t){var f=t.ui,e=f.events,r=e.pointer,o={dxpointerdown:"mousedown",dxpointermove:"mousemove",dxpointerup:"mouseup",dxpointercancel:"",dxpointerover:"mouseover",dxpointerout:"mouseout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"},u=function(n){var t=[];return n.pointerId=1,n.type!=="mouseup"&&t.push(n),{pointers:t,pointerId:1}},s=r.BaseStrategy.inherit({_fireEvent:function(t){return this.callBase(n.extend(u(t.originalEvent),t))}});r.mouse={strategy:s,map:o,normalize:u}}(jQuery,DevExpress),function(n,t){var f=t.ui,e=n.proxy(t.devices.real,t.devices),o=f.events,r=o.pointer,s={dxpointerdown:"touchstart",dxpointermove:"touchmove",dxpointerup:"touchend",dxpointercancel:"touchcancel"},u=function(t){var i=[];return n.each(t.touches,function(t,r){i.push(n.extend({pointerId:r.identifier},r))}),{pointers:i,pointerId:t.changedTouches[0].identifier}},h=function(n){return e().platform==="ios"&&(n==="dxpointerdown"||n==="dxpointerup")},c=r.BaseStrategy.inherit({ctor:function(){this.callBase.apply(this,arguments),this._pointerId=0},_handler:function(n){if(h(this._eventName)){var t=n.changedTouches[0];if(this._pointerId===t.identifier&&this._pointerId!==0)return;this._pointerId=t.identifier}return this.callBase.apply(this,arguments)},_fireEvent:function(t){return this.callBase(n.extend(u(t.originalEvent),t))}});r.touch={strategy:c,map:s,normalize:u}}(jQuery,DevExpress),function(n,t){var f=t.ui,u=f.events,r=u.pointer,e={dxpointerdown:"touchstart mousedown",dxpointermove:"touchmove mousemove",dxpointerup:"touchend mouseup",dxpointercancel:"touchcancel",dxpointerover:"mouseover",dxpointerout:"mouseout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"},o=r.BaseStrategy.inherit({EVENT_LOCK_TIMEOUT:100,_handler:function(t){var i=u.isMouseEvent(t);if(i||(this._skipNextEvents=!0),!i||!this._mouseLocked){if(i&&this._skipNextEvents){this._skipNextEvents=!1,this._mouseLocked=!0,clearTimeout(this._unlockMouseTimer),this._unlockMouseTimer=setTimeout(n.proxy(function(){this._mouseLocked=!1},this),this.EVENT_LOCK_TIMEOUT);return}return this.callBase(t)}},_fireEvent:function(t){var i=u.isMouseEvent(t.originalEvent),f=i?r.mouse.normalize:r.touch.normalize;return this.callBase(n.extend(f(t.originalEvent),t))},dispose:function(){this.callBase(),this._skipNextEvents=!1,this._mouseLocked=!1,clearTimeout(this._unlockMouseTimer)}});r.mouseAndTouch={strategy:o,map:e}}(jQuery,DevExpress),function(n,t){var c=t.ui,p=t.support,l=c.events,e=l.pointer,o={dxpointerdown:"MSPointerDown pointerdown",dxpointermove:"MSPointerMove pointermove",dxpointerup:"MSPointerUp pointerup",dxpointercancel:"MSPointerCancel pointercancel",dxpointerover:"MSPointerOver pointerover",dxpointerout:"MSPointerOut pointerout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"},r=[],f=function(t){var i=-1;return n.each(r,function(n,r){if(t.pointerId==r.pointerId)return i=n,!0}),i},a=function(n){f(n)===-1&&r.push(n)},s=function(n){r.splice(f(n),1)},v=function(n){r[f(n)]=n},u=function(t,i){t=t.split(" "),n.each(t,function(n,t){document.addEventListener(t,i,!0)})},h=function(){var t=o;u(t.dxpointerdown,a),u(t.dxpointermove,v),u(t.dxpointerup,s),u(t.dxpointercancel,s),h=n.noop},y=e.BaseStrategy.inherit({ctor:function(){this.callBase.apply(this,arguments),h()},_fireEvent:function(t){return this.callBase(n.extend({pointers:r,pointerId:t.originalEvent.pointerId},t))}});e.msPointer={strategy:y,map:o}}(jQuery,DevExpress),function(n,t){var s=t.ui,u=t.support,f=n.proxy(t.devices.real,t.devices),e=s.events,r=e.pointer,o=function(){return u.touch&&!(f().tablet||f().phone)?r.mouseAndTouch:u.pointer?r.msPointer:u.touch?r.touch:r.mouse}();n.each(o.map,function(n,t){e.registerEvent(n,new o.strategy(n,t))})}(jQuery,DevExpress),function(n,t,i){var s=t.ui,u=s.events,f="dxmousewheel",e="dxWheel",h=10,o,r;n.event.fixHooks.wheel=n.event.mouseHooks,o=document.onmousewheel!==i?"mousewheel":"wheel",r={setup:function(t){var f=n(t);f.on(u.addNamespace(o,e),n.proxy(r._wheelHandler,r))},teardown:function(t){var i=n(t);i.off("."+e)},_wheelHandler:function(n){var t=this._getWheelDelta(n.originalEvent);u.fireEvent({type:f,originalEvent:n,delta:t,pointerType:"mouse"}),n.stopPropagation()},_getWheelDelta:function(n){return n.wheelDelta/60||-n.deltaY}},u.registerEvent(f,r)}(jQuery,DevExpress),function(n,t){var h=t.ui,r=h.events,u="dxHoverStart",f="dxhoverstart",c=r.addNamespace("dxpointerenter",u),l=r.addNamespace("dxpointerdown",u),a=r.addNamespace("dxpointerup",u),e="dxHoverEnd",o="dxhoverend",v=r.addNamespace("dxpointerleave",e),s=t.Class.inherit({noBubble:!0,add:function(t,i){var r=n(t);r.off("."+this._namespace).on(this._originalEventName,i.selector,n.proxy(this._handler,this))},_handler:function(n){r.isTouchEvent(n)||r.fireEvent({type:this._eventName,originalEvent:n,delegateTarget:n.delegateTarget})},teardown:function(t){n(t).off("."+this._namespace)}}),y=s.inherit({ctor:function(){this._eventName=f,this._originalEventName=c,this._namespace=u,this._isMouseDown=!1,this._eventsAttached=0},_handler:function(){this._isMouseDown||this.callBase.apply(this,arguments)},setup:function(){n(document).off("."+u).on(l,n.proxy(function(){this._isMouseDown=!0},this)).on(a,n.proxy(function(){this._isMouseDown=!1},this));this._eventsAttached++},teardown:function(){this._eventsAttached--,this._eventsAttached===0&&n(document).off("."+u)}}),p=s.inherit({ctor:function(){this._eventName=o,this._originalEventName=v,this._namespace=e}});r.registerEvent(f,new y),r.registerEvent(o,new p)}(jQuery,DevExpress),function(n,t){var s=t.ui,r=s.events,l=t.utils,a=Math.abs,f="dxEventManager",u="dxEmitter",h=t.Class.inherit({ctor:function(){this._attachHandlers(),this.reset(),this._proxiedCancelHandler=n.proxy(this._cancelHandler,this),this._proxiedAcceptHandler=n.proxy(this._acceptHandler,this)},_attachHandlers:function(){n(document).on(r.addNamespace("dxpointerdown",f),n.proxy(this._pointerDownHandler,this)).on(r.addNamespace("dxpointermove",f),n.proxy(this._pointerMoveHandler,this)).on(r.addNamespace("dxpointerup dxpointercancel",f),n.proxy(this._pointerUpHandler,this)).on(r.addNamespace("dxmousewheel",f),n.proxy(this._mouseWheelHandler,this))},_eachEmitter:function(n){for(var i=this._activeEmitters||[],t=0,r;i.length>t;){if(r=i[t],n(r)===!1)break;i[t]===r&&t++}},_applyToEmitters:function(n,t){this._eachEmitter(function(i){i[n].call(i,t)})},reset:function(){this._eachEmitter(this._proxiedCancelHandler),this._activeEmitters=[]},resetEmitter:function(n){this._proxiedCancelHandler(n)},_pointerDownHandler:function(n){r.isMouseEvent(n)&&n.which>1||this._updateEmitters(n)},_updateEmitters:function(n){this._isSetChanged(n)&&(this._cleanEmitters(n),this._fetchEmitters(n))},_isSetChanged:function(t){var r=this._closestEmitter(t),u=this._emittersSet||[],i=r.length!==u.length;return n.each(r,function(n,t){return i=i||u[n]!==t,!i}),this._emittersSet=r,i},_closestEmitter:function(t){for(var r=this,f=[],i=n(t.target),e;i.length;)e=n.data(i.get(0),u)||[],n.each(e,function(n,i){!!i&&i.validatePointers(t)&&i.validate(t)&&(i.addCancelCallback(r._proxiedCancelHandler),i.addAcceptCallback(r._proxiedAcceptHandler),f.push(i))}),i=i.parent();return f},_acceptHandler:function(n,t){var i=this;this._eachEmitter(function(r){r!==n&&i._cancelEmitter(r,t)})},_cancelHandler:function(n,t){this._cancelEmitter(n,t)},_cancelEmitter:function(t,i){var r=this._activeEmitters;t.removeCancelCallback(),t.removeAcceptCallback(),i&&t.cancel(i),r.splice(n.inArray(t,r),1)},_cleanEmitters:function(n){this._applyToEmitters("end",n),this.reset(n)},_fetchEmitters:function(n){this._activeEmitters=this._emittersSet.slice(),this._applyToEmitters("start",n)},_pointerMoveHandler:function(n){this._applyToEmitters("move",n)},_pointerUpHandler:function(n){this._updateEmitters(n)},_mouseWheelHandler:function(n){n.pointers=[null],this._pointerDownHandler(n),this._eachEmitter(function(t){var i=t.getDirection?t.getDirection(n):"",r=i!=="horizontal"?"pageY":"pageX";return i&&(n[r]+=n.delta),!i}),this._pointerMoveHandler(n),n.pointers=[],this._pointerUpHandler(n)},isActive:function(n){var t=!1;return this._eachEmitter(function(i){t=t||i.getElement().is(n)}),t}}),o=new h,e="dxEmitterSubscription",c=function(t){var s=t.emitter,i=t.events[0],f=t.events;n.each(f,function(h,c){r.registerEvent(c,{noBubble:!t.bubble,setup:function(t){var o=n.data(t,e)||{},f=n.data(t,u)||{},h=f[i]||new s(t);o[c]=!0,f[i]=h,n.data(t,u,f),n.data(t,e,o)},add:function(t,r){var f=n.data(t,u),e=f[i];e.configurate(n.extend({delegateSelector:r.selector},r.data),r.type)},teardown:function(t){var h=n.data(t,e),l=n.data(t,u),s=l[i],r;delete h[c],r=!0,n.each(f,function(n,t){return r=r&&!h[t]}),r&&(o.isActive(t)&&o.resetEmitter(s),s&&s.dispose(),delete l[i])}})})};n.extend(r,{registerEmitter:c})}(jQuery,DevExpress),function(n,t){var u=t.ui,r=u.events,f=t.Class.inherit({ctor:function(t){this._$element=n(t),this._cancelCallback=n.Callbacks(),this._acceptCallback=n.Callbacks()},getElement:function(){return this._$element},validate:function(n){return n.type!=="dxmousewheel"},validatePointers:function(n){return r.hasTouches(n)===1},configurate:function(t){n.extend(this,t)},addCancelCallback:function(n){this._cancelCallback.add(n)},removeCancelCallback:function(){this._cancelCallback.empty()},_cancel:function(n){this._cancelCallback.fire(this,n)},addAcceptCallback:function(n){this._acceptCallback.add(n)},removeAcceptCallback:function(){this._acceptCallback.empty()},_accept:function(n){this._acceptCallback.fire(this,n)},start:n.noop,move:n.noop,end:n.noop,cancel:n.noop,_fireEvent:function(t,i,u){var f=n.extend({type:t,originalEvent:i,target:this._getEmitterTarget(i),delegateTarget:this.getElement().get(0)},u);return i=r.fireEvent(f),i.cancel&&this._cancel(i),i},_getEmitterTarget:function(t){return(this.delegateSelector?n(t.target).closest(this.delegateSelector):this.getElement()).get(0)},dispose:n.noop});n.extend(r,{Emitter:f})}(jQuery,DevExpress),function(n,t){var o=t.ui,e=o.events,u="dxactive",f="dxinactive",s=30,h=400,r,c=e.Emitter.inherit({configurate:function(n,t){switch(t){case u:n.activeTimeout=n.timeout;break;case f:n.inactiveTimeout=n.timeout}this.callBase(n)},start:function(t){var i=this.getElement().get(0),u=r&&r.getElement().get(0);n.contains(i,u)?this._cancel(t):(r&&r._forceInctiveTimer(),r=this,this._startActiveTimer(t)),this._eventTarget=this._getEmitterTarget(t)},cancel:function(n){this.end(n)},end:function(n){var t=n.type!=="dxpointerup";t?this._stopActiveTimer():this._forceActiveTimer(),this._startInactiveTimer(n),t&&this._forceInctiveTimer()},dispose:function(){this._stopActiveTimer(),this._stopInactiveTimer(),this.callBase()},_startActiveTimer:function(t){var i="activeTimeout"in this?this.activeTimeout:s;this._forceActiveTimer=n.proxy(this._fireActive,this,t),this._activeTimer=window.setTimeout(this._forceActiveTimer,i)},_fireActive:function(n){this._activeTimer&&(this._stopActiveTimer(),this._fireEvent(u,n,{target:this._eventTarget}))},_stopActiveTimer:function(){clearTimeout(this._activeTimer),delete this._activeTimer},_forceActiveTimer:n.noop,_startInactiveTimer:function(t){var i="inactiveTimeout"in this?this.inactiveTimeout:h;this._forceInctiveTimer=n.proxy(this._fireInctive,this,t),this._inactiveTimer=window.setTimeout(this._forceInctiveTimer,i)},_fireInctive:function(n){this._inactiveTimer&&(this._stopInactiveTimer(),this._fireEvent(f,n,{target:this._eventTarget}))},_stopInactiveTimer:function(){clearTimeout(this._inactiveTimer),delete this._inactiveTimer,r=null},_forceInctiveTimer:n.noop});e.registerEmitter({emitter:c,events:[u,f]})}(jQuery,DevExpress),function(n,t){var l=t.ui,o=t.utils,u=l.events,s=Math.abs,e="dxclick",h=10,c=function(t){return n(t).is("input, textarea, select, button ,:focus, :focus *")},f=u.Emitter.inherit({ctor:function(t){this.callBase(t),this._makeElementClickable(n(t))},_makeElementClickable:function(n){n.attr("onclick")||n.attr("onclick","void(0)")},start:function(t){this._blurPrevented=t.dxPreventBlur,this._$startTarget=n(t.target),this._startEventData=u.eventData(t)},end:function(n){if(this._eventOutOfElement(n,this.getElement().get(0))||n.type==="dxpointercancel"){this._cancel(n);return}c(n.target)||this._blurPrevented||o.resetActiveElement(),this._accept(n),this._fireClickEvent(n)},_eventOutOfElement:function(t,i){var r=t.target,e=!n.contains(i,r)&&i!==r,f=u.eventDelta(u.eventData(t),this._startEventData),o=s(f.x)>h||s(f.y)>h;return e||o},_fireClickEvent:function(t){t=this._fireEvent(e,t,{target:this._getClickTarget(this._$startTarget,n(t.target))})},_getClickTarget:function(n,t){for(var r=n.parents().addBack(),u=t.parents().addBack(),f=Math.min(r.length,u.length)-1,i=f;i>=0;i--)if(r.eq(i).is(u.eq(i)))return r.get(i)}});(function(){var o=t.devices.real().generic,i,r;if(o){i=null,f=f.inherit({start:function(){i=null},end:n.noop,cancel:function(){i=!0}}),r=function(n){n.which&&n.which!=1||i||u.fireEvent({type:e,originalEvent:n})};n(document).on(u.addNamespace("click","NATIVE_DXCLICK_STRATEGY"),r)}})(),function(){var u=t.devices.real().ios,i,r;u&&(i="dxGestureLock",r={requestAnimationFrame:t.requestAnimationFrame},f=f.inherit({_fireClickEvent:function(t){var u=n(t.target),f=this.callBase,e=arguments;r.requestAnimationFrame(n.proxy(function(){while(u.length){if(n.data(u.get(0),i))return;u=u.parent()}f.apply(this,e)},this))}}))}(),function(){var e=t.devices.real().generic;if(!e){var i=null,r=!1,s=function(n){i=n.target,r=n.dxPreventBlur},h=function(t){var u=n(t.target);r||!i||u.is(i)||n(i).is("label")||!c(u)||o.resetActiveElement(),i=null,r=!1},f="NATIVE_CLICK_FIXER";n(document).on(u.addNamespace("dxpointerdown",f),s).on(u.addNamespace("click",f),h)}}(),u.registerEmitter({emitter:f,bubble:!0,events:[e]})}(jQuery,DevExpress,window),function(n,t){var o=t.ui,r=o.events,u=Math.abs,f="dxhold",s=750,e=5,h=r.Emitter.inherit({start:function(n){this._startEventData=r.eventData(n),this._startTimer(n)},_startTimer:function(t){var i="timeout"in this?this.timeout:s;this._holdTimer=setTimeout(n.proxy(function(){this._accept(t),r.fireEvent({type:f,originalEvent:t})},this),i)},move:function(n){this._touchWasMoved(n)&&this._cancel(n)},_touchWasMoved:function(n){var t=r.eventDelta(this._startEventData,r.eventData(n));return u(t.x)>e||u(t.y)>e},end:function(){this._stopTimer()},_stopTimer:function(){clearTimeout(this._holdTimer)},cancel:function(){this._stopTimer()}});r.registerEmitter({emitter:h,bubble:!0,events:[f]})}(jQuery,DevExpress),function(n,t){var c=t.ui,u=t.utils,r=c.events,o=t.devices,s=Math.abs,h=0,e=1,f=2,l=10,a=0,v=180,y=r.Emitter.inherit({getDirection:function(){return this.direction},_cancel:function(){this.callBase.apply(this,arguments),this._togglePointerEvents(!0),this._stage=h},start:function(n){if(r.needSkipEvent(n)){this._cancel(n);return}this._startEvent=r.createEvent(n),this._startEventData=r.eventData(n),this._prevEventData=this._startEventData,this._stage=e,this._init(n),this._setupImmediateTimer()},_setupImmediateTimer:function(){(clearTimeout(this._immediateTimer),this._immedeateAccepted=!1,this.immediate)&&(this._immediateTimer=setTimeout(n.proxy(function(){this._immedeateAccepted=!0},this),v))},move:function(n){this._stage===e&&this._directionConfirmed(n)&&(this._stage=f,this._accept(n),this._resetActiveElement(),this._togglePointerEvents(!1),this._clearSelection(n),this._adjustStartEvent(n),this._start(this._startEvent),this._prevEventData=r.eventData(this._startEvent)),this._stage===f&&this._move(n),this._prevEventData=r.eventData(n)},_directionConfirmed:function(n){var i=this._getTouchBoundary(n),u=r.eventDelta(this._startEventData,r.eventData(n)),f=s(u.x),e=s(u.y),o=this._validateMove(i,f,e),h=this._validateMove(i,e,f),t=this.getDirection(n),c=t==="both"&&(o||h),l=t==="horizontal"&&o,a=t==="vertical"&&h;return c||l||a||this._immedeateAccepted},_validateMove:function(n,t,i){return t&&t>=n&&(this.immediate?t>=i:!0)},_getTouchBoundary:function(n){return this.immediate||n.type==="dxmousewheel"?a:l},_adjustStartEvent:function(n){var t=this._getTouchBoundary(n),i=r.eventDelta(this._startEventData,r.eventData(n));this._startEvent.pageX+=u.sign(i.x)*t,this._startEvent.pageY+=u.sign(i.y)*t},_resetActiveElement:function(){o.real().platform==="ios"&&n(":focus",this.getElement()).length&&u.resetActiveElement()},_togglePointerEvents:function(t){var i=o.real().platform==="generic",r=this._stage===f;i&&r&&(n("body").css("pointer-events",t?"":"none"),n("body").css("user-select",t?"":"none"))},_clearSelection:function(n){n.type==="dxmousewheel"||r.isTouchEvent(n)||u.clearSelection()},end:function(n){this._togglePointerEvents(!0),this._stage===f?this._end(n):this._stage===e&&this._stop(n),this._stage=h},dispose:function(){clearTimeout(this._immediateTimer),this.callBase.apply(this,arguments),this._togglePointerEvents(!0)},_init:n.noop,_start:n.noop,_move:n.noop,_stop:n.noop,_end:n.noop});n.extend(r,{GestureEmitter:y})}(jQuery,DevExpress),function(n,t){var a=t.ui,r=a.events,f="dxscrollinit",e="dxscrollstart",o="dxscroll",s="dxscrollend",h="dxscrollstop",c="dxscrollcancel",v=100,y=200,l=Math.round(1e3/60),u="dxGestureLock",p=200,w=r.GestureEmitter.inherit({ctor:function(t){this.callBase.apply(this,arguments),this.direction="both",n.data(t,"scroll",n.proxy(this._treatScroll,this));n(t).on("scroll",n.proxy(this._treatScroll,this))},_domElement:function(){return this.getElement().get(0)},_treatScroll:function(){this._prepareGesture(),this._forgetGesture()},_prepareGesture:function(){this._gestureEndTimer?this._clearGestureTimer():n.data(this._domElement(),u,!0)},_forgetGesture:function(){var t=this;this._gestureEndTimer=setTimeout(function(){n.data(t._domElement(),u,!1),t._gestureEndTimer=null},p)},_init:function(t){n.data(this._domElement(),u)&&this._accept(t),this._fireEvent(f,t)},move:function(n){this.callBase.apply(this,arguments),n.isScrollingEvent=this.isNative},_start:function(n){this._savedEventData=r.eventData(n),this._fireEvent(e,n,{delta:r.eventDelta(this._savedEventData,r.eventData(n))})},_move:function(n){var t=r.eventData(n),i;this._fireEvent(o,n,{delta:r.eventDelta(this._prevEventData,t)}),i=r.eventDelta(this._savedEventData,t),i.time>y&&(this._savedEventData=this._prevEventData)},_end:function(n){var u=r.eventDelta(this._prevEventData,r.eventData(n)),i={x:0,y:0},t;u.time<v&&(t=r.eventDelta(this._savedEventData,this._prevEventData),i={x:t.x*l/t.time,y:t.y*l/t.time}),this._fireEvent(s,n,{velocity:i})},_stop:function(n){this._fireEvent(h,n)},cancel:function(n){this.callBase.apply(this,arguments),this._fireEvent(c,n)},dispose:function(){this.callBase.apply(this,arguments),n.data(this._domElement(),u,!1),this._clearGestureTimer(),this.getElement().off("scroll")},_clearGestureTimer:function(){clearTimeout(this._gestureEndTimer),this._gestureEndTimer=null}});r.registerEmitter({emitter:w,events:[f,e,o,s,h,c]})}(jQuery,DevExpress),function(n,t){var o=t.ui,a=t.utils,r=o.events,u="dxswipestart",f="dxswipe",e="dxswipeend",s={defaultItemSizeFunc:function(){return this.getElement().width()},getBounds:function(){return[this._maxLeftOffset,this._maxRightOffset]},calcOffsetRatio:function(n){var t=r.eventData(n);return(t.x-(this._savedEventData&&this._savedEventData.x||0))/this._itemSizeFunc().call(this,n)},isFastSwipe:function(n){var t=r.eventData(n);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(t.x-this._tickData.x)>=t.time-this._tickData.time}},h={defaultItemSizeFunc:function(){return this.getElement().height()},getBounds:function(){return[this._maxTopOffset,this._maxBottomOffset]},calcOffsetRatio:function(n){var t=r.eventData(n);return(t.y-(this._savedEventData&&this._savedEventData.y||0))/this._itemSizeFunc().call(this,n)},isFastSwipe:function(n){var t=r.eventData(n);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(t.y-this._tickData.y)>=t.time-this._tickData.time}},c={horizontal:s,vertical:h},l=r.GestureEmitter.inherit({TICK_INTERVAL:300,FAST_SWIPE_SPEED_LIMIT:5,ctor:function(n){this.callBase(n),this.direction="horizontal",this.elastic=!0},_getStrategy:function(){return c[this.direction]},_defaultItemSizeFunc:function(){return this._getStrategy().defaultItemSizeFunc.call(this)},_itemSizeFunc:function(){return this.itemSizeFunc||this._defaultItemSizeFunc},_start:function(n){this._savedEventData=r.eventData(n),this._tickData={time:0},n=this._fireEvent(u,n),n.cancel||(this._maxLeftOffset=n.maxLeftOffset,this._maxRightOffset=n.maxRightOffset,this._maxTopOffset=n.maxTopOffset,this._maxBottomOffset=n.maxBottomOffset)},_move:function(n){var u=this._getStrategy(),i=r.eventData(n),t=u.calcOffsetRatio.call(this,n);t=this._fitOffset(t,this.elastic),i.time-this._tickData.time>this.TICK_INTERVAL&&(this._tickData=i),this._fireEvent(f,n,{offset:t}),n.preventDefault()},_end:function(n){var r=this._getStrategy(),u=r.calcOffsetRatio.call(this,n),f=r.isFastSwipe.call(this,n),t=u,i=this._calcTargetOffset(u,f);t=this._fitOffset(t,this.elastic),i=this._fitOffset(i,!1),this._fireEvent(e,n,{offset:t,targetOffset:i})},_fitOffset:function(n,t){var r=this._getStrategy(),i=r.getBounds.call(this);return n<-i[0]?t?(-2*i[0]+n)/3:-i[0]:n>i[1]?t?(2*i[1]+n)/3:i[1]:n},_calcTargetOffset:function(n,t){var i;return t?(i=Math.ceil(Math.abs(n)),n<0&&(i=-i)):i=Math.round(n),i}});r.registerEmitter({emitter:l,events:[u,f,e]})}(jQuery,DevExpress),function(n,t){var y=t.ui,p=t.utils,r=y.events,w=p.wrapToArray,c="dxdragstart",l="dxdrag",a="dxdragend",f="dxdragenter",e="dxdragleave",o="dxdrop",u=[],s=[],h={setup:function(t,i){var r=n.inArray(t,u)!==-1;r||(u.push(t),s.push(i||{}))},teardown:function(t){var c=n._data(t,"events"),h=0,r;n.each([f,e,o],function(n,t){var i=c[t];i&&(h+=i.length)}),h||(r=n.inArray(t,u),u.splice(r,1),s.splice(r,1))}};r.registerEvent(f,h),r.registerEvent(e,h),r.registerEvent(o,h);var v=function(t){var i=n.inArray(t.get(0),u);return s[i]},b=function(n){var t=v(n);return t.itemPositionFunc?t.itemPositionFunc():n.offset()},k=function(n){var t=v(n);return t.itemSizeFunc?t.itemSizeFunc():{width:n.width(),height:n.height()}},d=r.GestureEmitter.inherit({ctor:function(n){this.callBase(n),this.direction="both"},_init:function(n){this._initEvent=n},_start:function(t){t=this._fireEvent(c,this._initEvent),this._maxLeftOffset=t.maxLeftOffset,this._maxRightOffset=t.maxRightOffset,this._maxTopOffset=t.maxTopOffset,this._maxBottomOffset=t.maxBottomOffset;var i=w(t.targetElements||u);this._$dropTargetElements=n.map(i,function(t){return n(t)})},_move:function(n){var i=r.eventData(n),t=this._calculateOffset(i);this._fireEvent(l,n,{offset:t}),this._processDropTargets(n,t),n.preventDefault()},_calculateOffset:function(n){return{x:this._calculateXOffset(n),y:this._calculateYOffset(n)}},_calculateXOffset:function(n){if(this.direction!=="vertical"){var t=n.x-this._startEventData.x;return this._fitOffset(t,this._maxLeftOffset,this._maxRightOffset)}return 0},_calculateYOffset:function(n){if(this.direction!=="horizontal"){var t=n.y-this._startEventData.y;return this._fitOffset(t,this._maxTopOffset,this._maxBottomOffset)}return 0},_fitOffset:function(n,t,i){return t!=null&&(n=Math.max(n,-t)),i!=null&&(n=Math.min(n,i)),n},_processDropTargets:function(n){var i=this._findDropTarget(n),r=i===this._$currentDropTarget;r||(this._fireDropTargetEvent(n,e),this._$currentDropTarget=i,this._fireDropTargetEvent(n,f))},_fireDropTargetEvent:function(n,t){if(this._$currentDropTarget){var i={type:t,originalEvent:n,draggingElement:this._$element.get(0),target:this._$currentDropTarget.get(0)};r.fireEvent(i)}},_findDropTarget:function(t){var r=this,i;return n.each(this._$dropTargetElements,function(n,u){if(r._checkDropTarget(u,t))return i=u,!1}),i},_checkDropTarget:function(n,t){var u=n.get(0)===this._$element.get(0),i,r;return u?!1:(i=b(n),t.pageX<i.left)?!1:t.pageY<i.top?!1:(r=k(n),t.pageX>i.left+r.width)?!1:t.pageY>i.top+r.height?!1:n},_end:function(n){var t=r.eventData(n);this._fireEvent(a,n,{offset:this._calculateOffset(t)}),this._fireDropTargetEvent(n,o),delete this._$currentDropTarget}});r.registerEmitter({emitter:d,events:[c,l,a]})}(jQuery,DevExpress),function(n,t){var k=t.ui,s=t.utils,f=k.events,d=s.fitIntoRange,h="dx",g="transform",nt="translate",e="zoom",c="pinch",tt="rotate",l="start",a="",v="end",o=[],r=function(n,t){o.push({name:n,args:t})};r(g,{scale:!0,deltaScale:!0,rotation:!0,deltaRotation:!0,translation:!0,deltaTranslation:!0}),r(nt,{translation:!0,deltaTranslation:!0}),r(e,{scale:!0,deltaScale:!0}),r(c,{scale:!0,deltaScale:!0}),r(tt,{rotation:!0,deltaRotation:!0});var it=function(n,t){return{x:t.pageX-n.pageX,y:-t.pageY+n.pageY,centerX:(t.pageX+n.pageX)*.5,centerY:(t.pageY+n.pageY)*.5}},y=function(n){var t=n.pointers;return it(t[0],t[1])},u=function(n){return Math.sqrt(n.x*n.x+n.y*n.y)},p=function(n,t){return u(n)/u(t)},w=function(n,t){var e=n.x*t.x+n.y*t.y,i=u(n)*u(t),r,f;return i===0?0:(r=s.sign(n.x*t.y-t.x*n.y),f=Math.acos(d(e/i,-1,1)),r*f)},b=function(n,t){return{x:n.centerX-t.centerX,y:n.centerY-t.centerY}},rt=f.Emitter.inherit({configurate:function(n,i){i.indexOf(e)>-1&&t.log("W0005",i,"15.1","Use '"+i.replace(e,c)+"' event instead"),this.callBase(n)},validatePointers:function(n){return f.hasTouches(n)>1},start:function(n){this._accept();var t=y(n);this._startVector=t,this._prevVector=t,this._fireEventAliases(l,n)},move:function(n){var t=y(n),i=this._getEventArgs(t);this._fireEventAliases(a,n,i),this._prevVector=t},end:function(n){var t=this._getEventArgs(this._prevVector);this._fireEventAliases(v,n,t)},_getEventArgs:function(n){return{scale:p(n,this._startVector),deltaScale:p(n,this._prevVector),rotation:w(n,this._startVector),deltaRotation:w(n,this._prevVector),translation:b(n,this._startVector),deltaTranslation:b(n,this._prevVector)}},_fireEventAliases:function(t,i,r){r=r||{},n.each(o,n.proxy(function(u,f){var e={};n.each(f.args,function(n){n in r&&(e[n]=r[n])}),this._fireEvent(h+f.name+t,i,e)},this))}});f.registerEmitter({emitter:rt,events:n.map(o,function(t){var i=[];return n.each([l,a,v],function(n,r){i.push(h+t.name+r)}),i})})}(jQuery,DevExpress),function(n,t){var o=t.ui,r=o.events,f="dxdblclick",e="dxDblClick",u="dxDblClickTimer",s=r.addNamespace("dxclick",e),h=300,c=t.Class.inherit({setup:function(t){var r=n(t);r.on(s,n.proxy(this._clickHandler,this))},_getTimer:function(t){return n.data(t,u)},_setupTimer:function(t){var i=setTimeout(n.proxy(this._clearTimer,this,t),h);n.data(t,u,i)},_clearTimer:function(t){clearTimeout(this._getTimer(t)),n.data(t,u,null)},_clickHandler:function(n){var t=n.target;this._getTimer(t)?(this._fireDblClick(n),this._clearTimer(t)):this._setupTimer(t)},_fireDblClick:function(n){r.fireEvent({type:f,originalEvent:n})},teardown:function(t){this._clearTimer(t),n(t).off("."+e)}});r.registerEvent(f,new c)}(jQuery,DevExpress),function(n,t){var e=t.ui,r=e.events,o=t.support,u="dxContexMenu",s=r.addNamespace("contextmenu",u),h=r.addNamespace("dxhold",u),f="dxcontextmenu",c=t.Class.inherit({setup:function(i){var u=n(i);u.on(s,n.proxy(this._contextMenuHandler,this));if(o.touch||t.devices.isSimulator())u.on(h,n.proxy(this._holdHandler,this))},_holdHandler:function(n){(!r.isMouseEvent(n)||t.devices.isSimulator())&&this._fireContextMenu(n)},_contextMenuHandler:function(n){n.preventDefault(),this._fireContextMenu(n)},_fireContextMenu:function(n){r.fireEvent({type:f,originalEvent:n})},teardown:function(t){n(t).off("."+u)}});r.registerEvent(f,new c)}(jQuery,DevExpress),function(n,t,i){var r=t.ui,u=t.utils,f=r.events,e="UIFeedback",h="dx-widget",c="dx-state-active",s="dx-state-disabled",l="dx-state-invisible",a="dx-state-hover",o="dx-state-focused",v=30,y=400,p="dxhoverstart",w="dxhoverend",b="template",k="[data-options*='dxTemplate']",d="dx-template-wrapper",g=r.TemplateBase.inherit({ctor:function(t,i){this.callBase(n(),i),this._compileFunction=t},_renderCore:function(n,t,r){n===i&&t===i&&(n=r,r=i);var u=t==i?this._compileFunction(n,r):this._compileFunction(n,t,r),f=u.render(n,r,t);return u.owner()===this&&u.dispose(),f},_shouldAppend:!1}),nt=r.TemplateBase.inherit({ctor:function(t){this.callBase(n(),t)},_renderCore:function(){return n()}});r.Widget=t.DOMComponent.inherit({NAME:"Widget",_supportedKeys:function(){return{}},_setDeprecatedOptions:function(){this.callBase(),n.extend(this._deprecatedOptions,{contentReadyAction:{since:"14.2",alias:"onContentReady"}})},_setDefaultOptions:function(){this.callBase(),this.option({disabled:!1,visible:!0,hint:i,activeStateEnabled:!1,width:i,height:i,onContentReady:null,hoverStateEnabled:!1,focusStateEnabled:!1,tabIndex:0,templateProvider:r.TemplateProvider,_keyboardProcessor:i,_templates:{}})},_init:function(){this.callBase(),this._feedbackShowTimeout=v,this._feedbackHideTimeout=y,this._templatesSupported()&&(this._tempTemplates=[],this._dynamicTemplates={},this._initTemplates(),this._initContentReadyAction())},_eventBindingTarget:function(){return this.element()},_templatesSupported:function(){return this._renderContentImpl!==t.abstract},_initTemplates:function(){this._extractTemplates(),this._extractAnonimousTemplate()},_extractTemplates:function(){var r=this.option("_templates"),f=this.element().contents().filter(k),i={};f.each(function(r,f){var e=u.getElementOptions(f).dxTemplate;if(e){if(!e.name)throw t.Error("E0023");n(f).addClass(d).detach(),i[e.name]=i[e.name]||[],i[e.name].push(f)}}),n.each(i,n.proxy(function(n,t){var i=this._findTemplateByDevice(t);i&&(r[n]=this._createTemplate(i,this))},this))},_findTemplateByDevice:function(i){var r=t.utils.findBestMatches(t.devices.current(),i,function(n){return u.getElementOptions(n).dxTemplate})[0];return n.each(i,function(t,i){i!==r&&n(i).remove()}),r},_extractAnonimousTemplate:function(){var n=this.option("_templates"),t=this._getAnonimousTemplateName(),i;n[t]||(i=this.element().contents().detach(),n[t]=this._createTemplate(i,this))},_getAnonimousTemplateName:function(){return b},_getTemplateByOption:function(n){return this._getTemplate(this.option(n))},_getTemplate:function(t){if(n.isFunction(t)){var i=this;return new g(function(){var n=t.apply(i,arguments);return u.isDefined(n)?i._acquireTemplate(n,this):new nt},this)}return this._acquireTemplate(t,this)},_acquireTemplate:function(t,i){var f,e,o;return t==null?this._createTemplate(u.stringToJquery(t),i):t instanceof r.TemplateBase?t:t.nodeType||t.jquery?(t=n(t),this._createTemplate(t,i)):typeof t=="string"?(f=this.option("_templates")[t],f)?f:(e=this._dynamicTemplates[t],e)?e:(o=this.option("templateProvider").getTemplates(this)[t],o)?o:this._createTemplate(u.stringToJquery(t),i):this._acquireTemplate(t.toString(),i)},_createTemplate:function(n,t){var i=this.option("templateProvider").createTemplate(n,t);return this._tempTemplates.push(i),i},_cleanTemplates:function(){var t=this;n.each(this.option("_templates"),function(n,i){t===i.owner()&&i.dispose()}),n.each(this._tempTemplates,function(n,t){t.dispose()})},_initContentReadyAction:function(){this._contentReadyAction=this._createActionByOption("onContentReady",{excludeValidators:["designMode","disabled"]})},_render:function(){this.callBase(),this.element().addClass(h),this._toggleDisabledState(this.option("disabled")),this._toggleVisibility(this.option("visible")),this._renderHint(),this._renderDimensions(),this._templatesSupported()&&this._renderContent(),this._renderFocusState(),this._attachFeedbackEvents(),this._attachHoverEvents()},_renderHint:function(){this.option("hint")?this.element().attr("title",this.option("hint")):this.element().removeAttr("title")},_renderContent:function(){this._renderContentImpl(),this._fireContentReadyAction()},_renderContentImpl:t.abstract,_fireContentReadyAction:function(){this._contentReadyAction()},_dispose:function(){this._templatesSupported()&&this._cleanTemplates(),this._contentReadyAction=null,this.callBase()},_clean:function(){this._cleanFocusState(),this.callBase(),this.element().empty()},_toggleVisibility:function(n){this.element().toggleClass(l,!n)},_renderFocusState:function(){this.option("focusStateEnabled")&&!this.option("disabled")&&(this._renderFocusTarget(),this._attachFocusEvents(),this._attachKeyboardEvents())},_focusTarget:function(){return this._getActiveElement()},_getActiveElement:function(){var n=this._eventBindingTarget();return this._activeStateUnit&&(n=n.find(this._activeStateUnit).not("."+s)),n},_renderFocusTarget:function(){this._focusTarget().attr("tabindex",this.option("tabIndex"))},_attachFocusEvents:function(){var u=this._focusTarget(),i=this,r=new t.Action(function(n){var r=n.value,t=n.event;r?i._focusInHandler(t):i._focusOutHandler(t)});u.on("focusin",function(t){r.execute({element:n(t.target),event:t,value:!0})}).on("focusout",function(t){r.execute({element:n(t.target),event:t,value:!1})})},_focusInHandler:function(t){var i=t.currentTarget,r=this._focusTarget();n.inArray(i,r)!==-1&&n(t.currentTarget).addClass(o)},_focusOutHandler:function(t){var i=t.currentTarget,r=this._focusTarget();n.inArray(i,r)!==-1&&n(t.currentTarget).removeClass(o)},_attachKeyboardEvents:function(){var n=this.option("_keyboardProcessor")||new r.KeyboardProcessor({element:this._eventBindingTarget()});this._keyboardProcessor=n.reinitialize(this._keyboardHandler,this)},_keyboardHandler:function(t){var f=t.originalEvent,e=t.key,o=this._supportedKeys(),r=o[e],u;return r!==i?(u=n.proxy(r,this),u(f)||!1):!0},_refreshFocusState:function(){this._cleanFocusState(),this._renderFocusState()},_cleanFocusState:function(){var n=this._focusTarget();n.off("focusin").off("focusout"),n.removeClass(o),n.removeAttr("tabindex"),this._keyboardProcessor&&this._keyboardProcessor.dispose()},_attachHoverEvents:function(){var i=this,r=i._activeStateUnit,u=f.addNamespace(p,e),o=f.addNamespace(w,e),s;if(i._eventBindingTarget().off(u,r).off(o,r),i.option("hoverStateEnabled")){s=new t.Action(function(n){var t=n.element;i._refreshHoveredElement(t)});i._eventBindingTarget().on(u,r,function(t){s.execute({element:n(t.target)})}).on(o,r,function(){i._forgetHoveredElement()})}else i._toggleHoverClass(!1)},_attachFeedbackEvents:function(){var i=this,r=i._activeStateUnit,u=f.addNamespace("dxactive",e),o=f.addNamespace("dxinactive",e);if(i._eventBindingTarget().off(u,r).off(o,r),i.option("activeStateEnabled")){var s=function(n){var t=n.element,r=n.value;i._toggleActiveState(t,r)},h=new t.Action(function(n){s(n)}),c=new t.Action(function(n){s(n)},{excludeValidators:["disabled"]});i._eventBindingTarget().on(u,r,{timeout:i._feedbackShowTimeout},function(t){h.execute({element:n(t.currentTarget),value:!0})}).on(o,r,{timeout:i._feedbackHideTimeout},function(t){c.execute({element:n(t.currentTarget),value:!1})})}},_toggleActiveState:function(n,t){this._toggleHoverClass(!t),n.toggleClass(c,t)},_refreshHoveredElement:function(n){var t=this._activeStateUnit||this.element();this._forgetHoveredElement(),this._hoveredElement=n.closest(t),this._toggleHoverClass(!0)},_forgetHoveredElement:function(){this._toggleHoverClass(!1),delete this._hoveredElement},_toggleHoverClass:function(n){this._hoveredElement&&this._hoveredElement.toggleClass(a,n&&this.option("hoverStateEnabled"))},_renderDimensions:function(){var t=this.option("width"),i=this.option("height"),n=this.element();n.outerWidth(t),n.outerHeight(i)},_toggleDisabledState:function(n){this.element().toggleClass(s,Boolean(n)),this._toggleHoverClass(!n)},_setWidgetOption:function(t,i){var r,u,f;if(this[t]){if(n.isPlainObject(i[0])){n.each(i[0],n.proxy(function(n,i){this._setWidgetOption(t,[n,i])},this));return}r=i[0],u=i[1],i.length===1&&(u=this.option(r)),f=this[t+"OptionMap"],this[t].option(f?f(r):r,u)}},_createComponent:function(t,i,r){return this.callBase(t,i,n.extend({templateProvider:this.option("templateProvider"),_templates:this.option("_templates")},r))},_optionChanged:function(n){switch(n.name){case"disabled":this._toggleDisabledState(n.value),this._refreshFocusState();break;case"hint":this._renderHint();break;case"activeStateEnabled":this._attachFeedbackEvents();break;case"hoverStateEnabled":this._attachHoverEvents();break;case"tabIndex":case"_keyboardProcessor":case"focusStateEnabled":this._refreshFocusState();break;case"visible":this._toggleVisibility(n.value);break;case"width":case"height":this._renderDimensions();break;case"onContentReady":this._initContentReadyAction();break;case"_templates":case"templateProvider":this._refresh();break;default:this.callBase(n)}},beginUpdate:function(){this._ready(!1),this.callBase()},endUpdate:function(){this.callBase(),this._initialized&&this._ready(!0)},_ready:function(n){if(arguments.length===0)return this._isReady;this._isReady=n},isReady:function(){return this._ready()},repaint:function(){this._refresh()},focus:function(){this._focusTarget().focus()}})}(jQuery,DevExpress),function(n,t,i){var r=t.ui,u="dx-state-readonly",f="dx-invalid",e="dx-invalid-message",o="dx-invalid-message-auto",s="dx-invalid-message-always";r.validation=r.validation||{},r.validation.findGroup=function(){var n=this.option("validationGroup"),t;return n||(t=this.element().parents(".dx-validationgroup:first"),n=t.length?t.dxValidationGroup("instance"):this._modelByElement(this.element())),n},r.Editor=r.Widget.inherit({_init:function(){this.callBase(),this.validationRequest=n.Callbacks();var t=this.element();if(t){t.data("dx-validation-target",this);this.on("disposing",function(){t.data("dx-validation-target",null)})}this._createValueChangeAction()},_setDeprecatedOptions:function(){this.callBase(),n.extend(this._deprecatedOptions,{valueChangeAction:{since:"14.2",alias:"onValueChanged",message:"'onValueChanged' option instead"}})},_setDefaultOptions:function(){this.callBase(),this.option({value:i,onValueChanged:null,activeStateEnabled:!0,readOnly:!1,isValid:!0,validationError:null,validationMessageMode:"auto",validationTooltipOffset:{h:9,v:-1}})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(n){return n.platform==="android"&&n.version[0]>4},options:{invalidTooltipOffset:{h:9,v:-7}}},{device:{platform:"win8"},options:{invalidTooltipOffset:{h:9,v:-4}}}])},_setOptionsByReference:function(){this.callBase(),n.extend(this._optionsByReference,{validationError:!0})},_createValueChangeAction:function(){this._valueChangeAction=this._createActionByOption("onValueChanged")},_suppressValueChangeAction:function(){this._valueChangeActionSuppressed=!0},_resumeValueChangeAction:function(){this._valueChangeActionSuppressed=!1},_render:function(){this._renderValidationState(),this._toggleReadOnlyState(),this.callBase()},_raiseValueChangeAction:function(n,t){this._valueChangeAction(this._valueChangeArgs(n,t))},_valueChangeArgs:function(n,t){return{value:n,previousValue:t,jQueryEvent:this._valueChangeEventInstance}},_renderValidationState:function(){var r=this.option("isValid"),i=this.option("validationError"),u=this.option("validationMessageMode"),t=this.element();t.toggleClass(f,!r),this._$validationMessage&&(this._$validationMessage.remove(),this._$validationMessage=null),!r&&i&&i.message&&(this._$validationMessage=n("<div/>",{"class":e}).text(i.message).appendTo(t).dxTooltip({target:t,container:t,position:this._getValidationTooltipPosition("below"),closeOnOutsideClick:!1,closeOnTargetScroll:!1,animation:null,visible:!0,rtlEnabled:this.option("rtlEnabled")}),this._$validationMessage.toggleClass(o,u==="auto").toggleClass(s,u==="always"))},_getValidationTooltipPosition:function(n){var i=this.option("rtlEnabled"),r=i?"right":"left",u=this.option("validationTooltipOffset"),t={h:u.h,v:u.v},f=n==="below"?[" top"," bottom"]:[" bottom"," top"];return i&&(t.h=-t.h),n!=="below"&&(t.v=-t.v),{offset:t,my:r+f[0],at:r+f[1]}},_toggleReadOnlyState:function(){this.element().toggleClass(u,this.option("readOnly"))},_optionChanged:function(n){switch(n.name){case"onValueChanged":this._createValueChangeAction();break;case"isValid":case"validationError":case"validationMessageMode":this._renderValidationState();break;case"readOnly":this._toggleReadOnlyState();break;case"value":this._valueChangeActionSuppressed||(this._raiseValueChangeAction(n.value,n.previousValue),this._valueChangeEventInstance=i),this.validationRequest&&this.validationRequest.fire({value:n.value,editor:this});break;default:this.callBase(n)}},reset:function(){this.option("value",i)}})}(jQuery,DevExpress),function(n,t){var r=t.ui,h=t.utils,u=r.events,b="dx-collection",f="dx-item",c="-content",l="dx-item-content-placeholder",k="dxItemData",d="tmpl-",g="[data-options*='dxItem']",nt="dx-item-selected",e="dx-state-focused",tt="dx-item-response-wait",it="dx-empty-collection",o="up",s="down",a="left",v="right",rt="pageup",ut="pagedown",y="last",p="first",w="dx-collection-item-active",ft=r.Widget.inherit({NAME:"CollectionWidget",_activeStateUnit:"."+f,_supportedKeys:function(){var i=function(n){var t=this.option("focusedItem");t&&(n.target=t,n.currentTarget=t,this._itemClickHandler(n))},t=function(n,t){t.preventDefault(),t.stopPropagation(),this._moveFocus(n,t)};return n.extend(this.callBase(),{space:i,enter:i,leftArrow:n.proxy(t,this,a),rightArrow:n.proxy(t,this,v),upArrow:n.proxy(t,this,o),downArrow:n.proxy(t,this,s),pageUp:n.proxy(t,this,o),pageDown:n.proxy(t,this,s),home:n.proxy(t,this,p),end:n.proxy(t,this,y)})},_setDeprecatedOptions:function(){this.callBase(),n.extend(this._deprecatedOptions,{itemClickAction:{since:"14.2",alias:"onItemClick"},itemHoldAction:{since:"14.2",alias:"onItemHold"},itemRenderedAction:{since:"14.2",alias:"onItemRendered"},itemRender:{since:"14.2",alias:"itemTemplate"}})},_setDefaultOptions:function(){this.callBase(),this.option({selectOnFocus:!1,loopItemFocus:!0,items:[],itemTemplate:"item",onItemRendered:null,onItemClick:null,onItemHold:null,itemHoldTimeout:750,onItemContextMenu:null,noDataText:Globalize.localize("dxCollectionWidget-noDataText"),dataSource:null,itemTemplateProperty:"template",focusOnSelectedItem:!0,focusedItem:null})},_init:function(){this.callBase(),this._cleanRenderedItems(),this._refreshDataSource()},_initTemplates:function(){this._initItemsFromMarkup(),this.callBase()},_initItemsFromMarkup:function(){var t=this.element().contents().filter(g),i;t.length&&!this.option("items").length&&(i=n.map(t,n.proxy(function(t){var i=n(t),r=h.getElementOptions(t).dxItem,u=n.trim(i.html())&&!r.template;return u?r.template=this._prepareItemTemplate(i):i.remove(),r},this)),this.option("items",i))},_prepareItemTemplate:function(n){var i=d+new t.data.Guid,r='dxTemplate: { name: "'+i+'" }';return n.attr("data-options",r).data("options",r),i},_dataSourceOptions:function(){var t={paginate:!1,_preferSync:!1};return n.isArray(this.option("dataSource"))&&(t._preferSync=!0),t},_cleanRenderedItems:function(){this._renderedItemsCount=0},_focusTarget:function(){return this.element()},_focusInHandler:function(){if(this.callBase.apply(this,arguments),this.option("focusedItem"))this._setFocusedItem(this.option("focusedItem"));else{var t=this._getActiveItem();this.option("focusedItem",t)}},_focusOutHandler:function(){this.callBase.apply(this,arguments);var t=this.option("focusedItem");t&&t.removeClass(e)},_getActiveItem:function(n){if(this.option("focusedItem"))return this.option("focusedItem");var t=this.option("focusOnSelectedItem")?this.option("selectedIndex"):0,i=this._getActiveElement(),r=i.length-1;return t<0&&(t=n?r:0),i.eq(t)},_renderFocusTarget:function(){this.callBase.apply(this,arguments);var n=this._getActiveElement();this.element().attr("aria-activedescendant",w)},_moveFocus:function(n){var t=this._itemElements().filter(":visible").not(".dx-state-disabled"),i;switch(n){case rt:case o:i=this._prevItem(t);break;case ut:case s:i=this._nextItem(t);break;case v:i=this.option("rtlEnabled")?this._prevItem(t):this._nextItem(t);break;case a:i=this.option("rtlEnabled")?this._nextItem(t):this._prevItem(t);break;case p:i=t.first();break;case y:i=t.last();break;default:return!1}i.length!==0&&this.option("focusedItem",i)},_prevItem:function(t){var r=this._getActiveItem(),u=t.index(r),f=t.last(),i=n(t[u-1]),e=this.option("loopItemFocus");return i.length===0&&e&&(i=f),i},_nextItem:function(t){var r=this._getActiveItem(!0),u=t.index(r),f=t.first(),i=n(t[u+1]),e=this.option("loopItemFocus");return i.length===0&&e&&(i=f),i},_selectFocusedItem:function(n){this.selectItem(n)},_removeFocusedItem:function(n){n&&(n.removeClass(e),n.removeAttr("id"))},_setFocusedItem:function(n){n&&n.length&&(n.attr("id",w),n.addClass(e),this.option("selectOnFocus")&&this._selectFocusedItem(n))},_optionChanged:function(n){switch(n.name){case"items":case"itemTemplateProperty":this._cleanRenderedItems(),this._invalidate();break;case"dataSource":this._refreshDataSource(),this._dataSource||this.option("items",[]),this._renderEmptyMessage();break;case"noDataText":this._renderEmptyMessage();break;case"itemTemplate":this._invalidate();break;case"onItemRendered":this._createItemRenderAction();break;case"onItemClick":break;case"onItemHold":case"itemHoldTimeout":this._attachHoldEvent();break;case"onItemContextMenu":this._attachContextMenuEvent();break;case"selectOnFocus":case"loopItemFocus":case"focusOnSelectedItem":break;case"focusedItem":this._removeFocusedItem(n.previousValue),this._setFocusedItem(n.value);break;default:this.callBase(n)}},_expectNextPageLoading:function(){this._startIndexForAppendedItems=0},_expectLastItemLoading:function(){this._startIndexForAppendedItems=-1},_forgetNextPageLoading:function(){this._startIndexForAppendedItems=null},_dataSourceChangedHandler:function(n){var t=this.option("items");this._initialized&&t&&this._shouldAppendItems()?(this._renderedItemsCount=t.length,this._dataSource.isLastPage()&&this._startIndexForAppendedItems===-1||(this.option().items=t.concat(n.slice(this._startIndexForAppendedItems))),this._renderContent(),this._renderFocusTarget()):this.option("items",n)},_dataSourceLoadErrorHandler:function(){this._forgetNextPageLoading()},_shouldAppendItems:function(){return this._startIndexForAppendedItems!=null&&this._allowDinamicItemsAppend()},_allowDinamicItemsAppend:function(){return!1},_clean:function(){this._cleanFocusState(),this._itemContainer().empty()},_refresh:function(){this._cleanRenderedItems(),this.callBase.apply(this,arguments)},_itemContainer:function(){return this.element()},_itemClass:function(){return f},_selectedItemClass:function(){return nt},_itemResponseWaitClass:function(){return tt},_itemSelector:function(){return"."+this._itemClass()},_itemDataKey:function(){return k},_itemElements:function(){return this._itemContainer().find(this._itemSelector())},_render:function(){this.callBase(),this.element().addClass(b),this._attachClickEvent(),this._attachHoldEvent(),this._attachContextMenuEvent()},_attachClickEvent:function(){var i=this._itemSelector(),r=u.addNamespace("dxclick",this.NAME),f=u.addNamespace("dxpointerdown",this.NAME),e=this,o=new t.Action(function(n){var t=n.event;e._itemPointerDownHandler(t)});this._itemContainer().off(r,i).off(f,i).on(r,i,n.proxy(this._itemClickHandler,this)).on(f,i,function(t){o.execute({element:n(t.target),event:t})})},_itemClickHandler:function(n){this._itemJQueryEventHandler(n,"onItemClick")},_itemPointerDownHandler:function(t){if(this.option("focusStateEnabled")){var i=this._itemClass(),r=n(t.target).closest("."+i);r.hasClass(i)&&this.option("focusedItem",r)}},_attachHoldEvent:function(){var t=this._itemContainer(),i=this._itemSelector(),r=u.addNamespace("dxhold",this.NAME);if(t.off(r,i),this._shouldAttachHoldEvent())t.on(r,i,{timeout:this._getHoldTimeout()},n.proxy(this._itemHoldHandler,this))},_getHoldTimeout:function(){return this.option("itemHoldTimeout")},_shouldAttachHoldEvent:function(){return this.option("onItemHold")},_itemHoldHandler:function(n){this._itemJQueryEventHandler(n,"onItemHold")},_attachContextMenuEvent:function(){var t=this._itemContainer(),i=this._itemSelector(),r=u.addNamespace("dxcontextmenu",this.NAME);if(t.off(r,i),this._shouldAttachContextMenuEvent())t.on(r,i,n.proxy(this._itemContextMenuHandler,this))},_shouldAttachContextMenuEvent:function(){return this.option("onItemContextMenu")},_itemContextMenuHandler:function(n){this._itemJQueryEventHandler(n,"onItemContextMenu")},_renderContentImpl:function(){var n=this.option("items")||[];this._renderedItemsCount?this._renderItems(n.slice(this._renderedItemsCount)):this._renderItems(n)},_fireContentReadyAction:function(){var n=this.option("items");(this._isLastPage()||(!n||n.length)&&n)&&this.callBase()},_renderItems:function(t){t.length&&n.each(t,n.proxy(this._renderItem,this)),this._renderEmptyMessage()},_renderItem:function(n,t,i){var r,u;return i=i||this._itemContainer(),r=this._renderItemFrame(n,t,i),this._setElementData(r,t),u=r.find("."+l),u.removeClass(l),u=this._renderItemContent(n,t,u),this._postprocessRenderItem({itemElement:r,itemContent:u,itemData:t,itemIndex:n}),this._executeItemRenderAction(n,t,r),this._attachItemClickEvent(t,r),r},_attachItemClickEvent:function(t,i){if(t&&t.onClick)i.on("dxclick",n.proxy(function(n){this._itemEventHandlerByHandler(i,t.onClick,{jQueryEvent:n})},this))},_renderItemContent:function(n,t,i){var u=t&&t.node,f=this._getItemTemplateName(t),e=this._getTemplate(f,t,n,i),o={index:n,item:t,container:i},r;return u?(i.replaceWith(u),i=u,this._addItemContentClasses(i,t)):(this._addItemContentClasses(i,t),r=this._createItemByTemplate(e,o),r.length&&(i.replaceWith(r),i=r,this._addItemContentClasses(i,t))),i},_addItemContentClasses:function(n){n.addClass([f+c,this._itemClass()+c].join(" "))},_renderItemFrame:function(n,t,i){var u=this.option("templateProvider").getTemplates(this).itemFrame,r=u.render(h.isDefined(t)?t:{},i,n);return r.appendTo(i),r},_postprocessRenderItem:n.noop,_executeItemRenderAction:function(n,t,i){this._getItemRenderAction()({itemElement:i,itemIndex:n,itemData:t})},_setElementData:function(n,t){n.addClass([f,this._itemClass()].join(" ")).data(this._itemDataKey(),t)},_createItemRenderAction:function(){return this._itemRenderAction=this._createActionByOption("onItemRendered",{element:this.element(),excludeValidators:["designMode","disabled"]})},_getItemRenderAction:function(){return this._itemRenderAction||this._createItemRenderAction()},_getItemTemplateName:function(n){var t=this.option("itemTemplateProperty");return n&&n[t]||this.option("itemTemplate")},_createItemByTemplate:function(n,i){var r=n.render(i.item,i.container,i.index,"ignoreTarget");return typeof r=="string"&&(r=t.utils.htmlToJQuery(r)),r},_renderEmptyMessage:function(){var i=this.option("noDataText"),r=this.option("items"),u=this._dataSource&&this._dataSource.isLoading(),t=!i||r&&r.length||u;t&&this._$nodata&&(this._$nodata.remove(),this._$nodata=null),t||(this._$nodata=this._$nodata||n("<div>").addClass("dx-empty-message"),this._$nodata.appendTo(this._itemContainer()).html(i)),this.element().toggleClass(it,!t)},_itemJQueryEventHandler:function(t,i,r,u){this._itemEventHandler(t.target,i,n.extend(r,{jQueryEvent:t}),u)},_itemEventHandler:function(t,i,r,u){var f=this._createActionByOption(i,n.extend({validatingTargetName:"itemElement"},u));return this._itemEventHandlerImpl(t,f,r)},_itemEventHandlerByHandler:function(t,i,r,u){var f=this._createAction(i,n.extend({validatingTargetName:"itemElement"},u));return this._itemEventHandlerImpl(t,f,r)},_itemEventHandlerImpl:function(t,i,r){var u=this._closestItemElement(n(t));return i(n.extend(this._extendActionArgs(u),r))},_extendActionArgs:function(n){return{itemElement:n,itemIndex:n.index(this._itemSelector()),itemData:this._getItemData(n)}},_closestItemElement:function(t){return n(t).closest(this._itemSelector())},_getItemData:function(t){return n(t).data(this._itemDataKey())},_isLastPage:function(){return!this._dataSource||this._dataSource.isLastPage()||!this._dataSource._pageSize},itemElements:function(){return this._itemElements()},itemsContainer:function(){return this._itemContainer()}}).include(r.DataHelperMixin);r.CollectionWidget=ft}(jQuery,DevExpress),function(n,t,i){var u=t.ui,r=t.utils,o=u.events,f="dxItemDeleting",e=u.CollectionWidget.inherit({_setOptionsByReference:function(){this.callBase(),n.extend(this._optionsByReference,{selectedItem:!0})},_setDeprecatedOptions:function(){this.callBase(),n.extend(this._deprecatedOptions,{itemSelectAction:{since:"14.2",message:"Use the 'onSelectionChanged' option instead"}})},_setDefaultOptions:function(){this.callBase(),this.option({selectionMode:"none",selectionRequired:!1,selectionByClick:!0,selectedItems:[],selectedIndex:-1,selectedItem:null,onSelectionChanged:null,onItemReordered:null,onItemDeleting:null,onItemDeleted:null})},_init:function(){this.callBase(),this._initEditStrategy(),this._selectedItemIndices=[]},_initEditStrategy:function(){var n=u.CollectionWidget.PlainEditStrategy;this._editStrategy=new n(this)},_render:function(){this._syncSelectionOptions(),this._normalizeSelectedItems(),this._initSelectedItems(),this.callBase(),this._renderSelection(this._selectedItemIndices,[])},_syncSelectionOptions:function(t){var i=this.option("items")||[],e=this.option("selectedItems")||[],u=this.option("selectedItem"),f=this.option("selectedIndex");t=t||this._chooseSelectOption();switch(t){case"selectedItems":this._setOptionSilent("selectedItem",e[0]),this._setOptionSilent("selectedIndex",n.inArray(e[0],i));break;case"selectedItem":r.isDefined(u)?(this._setOptionSilent("selectedItems",[u]),this._setOptionSilent("selectedIndex",n.inArray(u,i))):(this._setOptionSilent("selectedItems",[]),this._setOptionSilent("selectedIndex",-1));break;case"selectedIndex":r.isDefined(i[f])?(this._setOptionSilent("selectedItems",[i[f]]),this._setOptionSilent("selectedItem",i[f])):(this._setOptionSilent("selectedItems",[]),this._setOptionSilent("selectedItem",null))}},_chooseSelectOption:function(){var n="selectedIndex";return this.option("selectedItems").length?n="selectedItems":r.isDefined(this.option("selectedItem"))&&(n="selectedItem"),n},_normalizeSelectedItems:function(){var n,t;this.option("selectionMode")==="none"?(this._setOptionSilent("selectedItems",[]),this._syncSelectionOptions("selectedItems")):this.option("selectionMode")==="single"&&(n=this._editStrategy.selectedItemIndices(this.option("selectedItems")),(n.length>1||!n.length&&this.option("selectionRequired")&&this.option("items")&&this.option("items").length)&&(t=[n[0]||this._selectedItemIndices[0]||0],this._setOptionSilent("selectedItems",this._editStrategy.fetchSelectedItems(t)),this._syncSelectionOptions("selectedItems")))},_initSelectedItems:function(){this._selectedItemIndices=this._editStrategy.selectedItemIndices(this.option("selectedItems"))},_renderSelection:n.noop,_itemClickHandler:function(t){this._createAction(n.proxy(function(n){this._itemSelectHandler(n.jQueryEvent)},this),{validatingTargetName:"itemElement"})({itemElement:n(t.currentTarget),jQueryEvent:t}),this.callBase.apply(this,arguments)},_itemSelectHandler:function(n){if(this.option("selectionByClick")){var t=n.currentTarget;this.isItemSelected(t)?this.unselectItem(n.currentTarget):this.selectItem(n.currentTarget)}},_selectedItemElement:function(n){return this._itemElements().eq(n)},_postprocessRenderItem:function(t){var i=n(t.itemElement);this._isItemSelected(this._editStrategy.getNormalizedIndex(i))&&i.addClass(this._selectedItemClass())},_updateSelectedItems:function(){var u=this._selectedItemIndices.slice(),f=this._editStrategy.selectedItemIndices(),t=r.removeDublicates(f,u),i=r.removeDublicates(u,f),e;n.each(i,n.proxy(function(n,t){this._removeSelection(t)},this)),n.each(t,n.proxy(function(n,t){this._addSelection(t)},this)),(i.length||t.length)&&(e=this._selectionChangePromise,this._updateSelection(t,i),n.when(e).done(n.proxy(function(){this._fireSelectItemEvent(t,i),this._fireSelectionChangeEvent(t,i)},this)))},_fireSelectionChangeEvent:function(n,t){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled"]})({addedItems:this._editStrategy.fetchSelectedItems(n),removedItems:this._editStrategy.fetchSelectedItems(t)})},_fireSelectItemEvent:function(n,t){(this.NAME!=="dxList"||this.option("selectionMode")==="single")&&this._itemEventHandler(this._selectedItemElement(n[0]),"itemSelectAction",{selectedIndex:n[0],previousIndex:t[0]},{excludeValidators:["disabled"]})},_updateSelection:function(){this._renderSelection.apply(this,arguments)},_removeSelection:function(t){var i=this._editStrategy.getItemElement(t),r=n.inArray(t,this._selectedItemIndices);r>-1&&(i.removeClass(this._selectedItemClass()),this._selectedItemIndices.splice(r,1),i.triggerHandler("stateChanged"),this.NAME==="dxList"&&this._itemEventHandler(i,"itemUnselectAction",{},{excludeValidators:["disabled"]}))},_addSelection:function(n){var t=this._editStrategy.getItemElement(n);n>-1&&!this._isItemSelected(n)&&(t.addClass(this._selectedItemClass()),this._selectedItemIndices.push(n),t.triggerHandler("stateChanged"),this.NAME==="dxList"&&this._itemEventHandler(t,"itemSelectAction",{},{excludeValidators:["disabled"]}))},_isItemSelected:function(t){return n.inArray(t,this._selectedItemIndices)>-1},_selectAllItems:function(){this.option("selectedItems",this.option("items").slice())},_unselectAllItems:function(){this.option("selectedItems",[])},_optionChanged:function(n){if(!this._cancelOptionChange)switch(n.name){case"items":n.previousValue&&n.previousValue.length>0&&this._clearSelectedItems(),this.callBase(n);break;case"selectionMode":this._invalidate();break;case"selectedIndex":case"selectedItem":case"selectedItems":this._syncSelectionOptions(n.name),this._normalizeSelectedItems(),this._updateSelectedItems();break;case"selectionRequired":this._normalizeSelectedItems(),this._updateSelectedItems();break;case"selectionByClick":case"onSelectionChanged":case"onItemDeleting":case"onItemDeleted":case"onItemReordered":case"itemSelectAction":case"itemUnselectAction":break;default:this.callBase(n)}},_clearSelectedItems:function(){this._selectedItemIndices=[],this.option("selectedItems",[])},_setOptionSilent:function(n,t){this._cancelOptionChange=!0,this.option(n,t),this._cancelOptionChange=!1},_waitDeletingPrepare:function(t){if(t.data(f))return n.Deferred().resolve().promise();t.data(f,!0);var i=n.Deferred(),r=this._itemEventHandler(t,"onItemDeleting",{},{excludeValidators:["disabled"]});return n.when(r).always(n.proxy(function(n){var u=!r,e=!u&&r.state()==="resolved",o=!!arguments.length,s=u||e&&!o||e&&n;t.data(f,!1),s?i.resolve():i.reject()},this)),i.promise()},_deleteItemFromDS:function(r){if(!this._dataSource)return n.Deferred().resolve().promise();var o=this,u=n.Deferred(),e=this.option("disabled"),f=this._dataSource.store();if(this.option("disabled",!0),!f.remove)throw t.Error("E1011");return f.remove(f.keyOf(this._getItemData(r))).done(function(n){n!==i?u.resolve():u.reject()}).fail(function(){u.reject()}),u.always(n.proxy(function(){this.option("disabled",e)},this)),u},_tryRefreshLastPage:function(){var t=n.Deferred();return this._isLastPage()||this.option("grouped")?t.resolve():this._refreshLastPage().done(function(){t.resolve()}),t.promise()},_refreshLastPage:function(){return this._expectLastItemLoading(),this._dataSource.load()},_updateSelectionAfterDelete:function(t){var i=n.inArray(t,this._selectedItemIndices);i>-1&&this._selectedItemIndices.splice(i,1),this._editStrategy.updateSelectionAfterDelete(t),this.option("selectedItems",this._editStrategy.fetchSelectedItems())},_simulateOptionChange:function(n){var i=this.option(n);i instanceof t.data.DataSource||this.fireEvent("optionChanged",[{name:n,fullName:n,value:i}])},isItemSelected:function(n){return this._isItemSelected(this._editStrategy.getNormalizedIndex(n))},selectItem:function(t){var i=this._editStrategy.getNormalizedIndex(t),u,r;i!==-1&&(u=n.inArray(i,this._selectedItemIndices),u===-1)&&(this.option("selectionMode")==="single"?this.option("selectedItems",this._editStrategy.fetchSelectedItems([i])):(r=this._selectedItemIndices.slice(),r.push(i),this.option("selectedItems",this._editStrategy.fetchSelectedItems(r))))},unselectItem:function(t){var u=this._editStrategy.getNormalizedIndex(t),r,i;u!==-1&&(r=n.inArray(u,this._selectedItemIndices),r!==-1)&&((i=this._selectedItemIndices.slice(),i.splice(r,1),this.option("selectionRequired")&&i.length===0)||this.option("selectedItems",this._editStrategy.fetchSelectedItems(i)))},deleteItem:function(t){var i=this,u=n.Deferred(),r=this._editStrategy.getItemElement(t),f=this._editStrategy.getNormalizedIndex(t),o=this._dataSource?"dataSource":"items",e=this._itemResponseWaitClass();return f>-1?this._waitDeletingPrepare(r).done(function(){r.addClass(e),i._deleteItemFromDS(r).done(function(){i._editStrategy.deleteItemAtIndex(f),i._simulateOptionChange(o),i._updateSelectionAfterDelete(f),i._itemEventHandler(r,"onItemDeleted",{},{beforeExecute:function(){r.detach()},excludeValidators:["disabled"]}),i._renderEmptyMessage(),i._tryRefreshLastPage().done(function(){u.resolveWith(i)})}).fail(function(){r.removeClass(e),u.rejectWith(i)})}).fail(function(){u.rejectWith(i)}):u.rejectWith(i),u.promise()},reorderItem:function(t,i){var e=n.Deferred(),o=this,r=this._editStrategy,h=r.getItemElement(t),c=r.getItemElement(i),u=r.getNormalizedIndex(t),f=r.getNormalizedIndex(i),s,l=u>-1&&f>-1&&u!==f;return l?this._dataSource?(s="dataSource",e.resolveWith(this)):(s="items",e.resolveWith(this)):e.rejectWith(this),e.promise().done(function(){c[r.itemPlacementFunc(u,f)](h);var n=r.getSelectedItemsAfterReorderItem(u,f);r.moveItemAtIndexToIndex(u,f),o._selectedItemIndices=r.selectedItemIndices(n),o.option("selectedItems",r.fetchSelectedItems()),o._simulateOptionChange(s),o._itemEventHandler(h,"onItemReordered",{fromIndex:r.getIndex(u),toIndex:r.getIndex(f)},{excludeValidators:["disabled"]})})}});u.CollectionWidget=e}(jQuery,DevExpress),function(n,t){var r=t.ui;r.CollectionWidget.EditStrategy=t.Class.inherit({ctor:function(n){this._collectionWidget=n},getNormalizedIndex:function(n){return this._isNormalisedItemIndex(n)?n:this._isItemIndex(n)?this._normalizeItemIndex(n):this._getNormalizedItemIndex(n)},getIndex:function(n){return this._isNormalisedItemIndex(n)?this._denormalizeItemIndex(n):this._isItemIndex(n)?n:this._denormalizeItemIndex(this._getNormalizedItemIndex(n))},getItemElement:function(t){return this._isNormalisedItemIndex(t)?this._getItemByNormalizedIndex(t):this._isItemIndex(t)?this._getItemByNormalizedIndex(this._normalizeItemIndex(t)):n(t)},deleteItemAtIndex:t.abstract,updateSelectionAfterDelete:t.abstract,fetchSelectedItems:t.abstract,selectedItemIndices:t.abstract,itemPlacementFunc:function(n,t){return this._itemsFromSameParent(n,t)&&n<t?"after":"before"},moveItemAtIndexToIndex:t.abstract,getSelectedItemsAfterReorderItem:function(){return this._collectionWidget.option("selectedItems")},_isNormalisedItemIndex:function(t){return n.isNumeric(t)},_isItemIndex:t.abstract,_getNormalizedItemIndex:t.abstract,_normalizeItemIndex:t.abstract,_denormalizeItemIndex:t.abstract,_getItemByNormalizedIndex:t.abstract,_itemsFromSameParent:t.abstract})}(jQuery,DevExpress),function(n,t){var r=t.ui;r.CollectionWidget.PlainEditStrategy=r.CollectionWidget.EditStrategy.inherit({deleteItemAtIndex:function(n){this._collectionWidget.option("items").splice(n,1)},updateSelectionAfterDelete:function(t){var i=this._collectionWidget._selectedItemIndices;n.each(i,function(n,r){r>t&&(i[n]-=1)})},fetchSelectedItems:function(t){t=t||this._collectionWidget._selectedItemIndices;var r=this._collectionWidget.option("items"),i=[];return n.each(t,function(n,t){i.push(r[t])}),i},selectedItemIndices:function(){var t=[],i=this._collectionWidget.option("items"),r=this._collectionWidget.option("selectedItems");return n.each(r,function(r,u){var f=n.inArray(u,i);f!==-1&&t.push(f)}),t},moveItemAtIndexToIndex:function(n,t){var i=this._collectionWidget.option("items"),r=i[n];i.splice(n,1),i.splice(t,0,r)},_isItemIndex:function(t){return n.isNumeric(t)},_getNormalizedItemIndex:function(n){return this._collectionWidget._itemElements().index(n)},_normalizeItemIndex:function(n){return n},_denormalizeItemIndex:function(n){return n},_getItemByNormalizedIndex:function(n){return this._collectionWidget._itemElements().eq(n)},_itemsFromSameParent:function(){return!0}})}(jQuery,DevExpress),function(n,t){var r=null,f=function(i){i=n.extend({position:"top"},i);var r=i.content;return delete i.content,n("<div />").html(r).appendTo(t.viewPort()).dxTooltip(i)},u=function(){r&&(r.remove(),r=null)},e={show:function(n){return u(),r=f(n),r.dxTooltip("show")},hide:function(){return r?r.dxTooltip("hide").done(u).promise():n.when()}};t.ui.tooltip=e}(jQuery,DevExpress));if(!DevExpress.MOD_VIZ_CORE){if(!window.DevExpress)throw Error("Required module is not referenced: core");(function(n){n.viz={}})(DevExpress),function(n){n.viz.core={}}(DevExpress),function(n,t){n.extend(t.ERROR_MESSAGES,{E2001:"Invalid data source",E2002:"Axis type and data type are incompatible",E2003:'"{0}" data source field contains data of unsupported type',E2004:'"{0}" data source field is inconsistent',E2101:"Unknown series type was specified: {0}",E2102:"Ambiguity occurred between two value axes with the same name",E2103:'"{0}" option must be a function',E2104:"Invalid logarithm base",E2105:'Invalid value of a "{0}"',E2106:"Invalid visible range",E2202:"Invalid scale {0} value",E2203:'The "{0}" field of the "selectedRange" configuration object is not valid',W2001:"{0} cannot be drawn because its container is invisible",W2002:"The {0} data field is absent",W2003:"Tick interval is too small",W2101:'"{0}" pane does not exist; "{1}" pane is used instead',W2102:'Value axis with the "{0}" name was created automatically',W2103:"Chart title was hidden due to container size",W2104:"Legend was hidden due to container size",W2105:'Title of "{0}" axis was hidden due to container size',W2106:'Labels of "{0}" axis were hidden due to container size',W2301:"Invalid value range"})}(jQuery,DevExpress),function(n,t){var f=t.viz.core,e=t.utils,r=e.isDefined,o=e.adjustValue,s=Math,u=s.abs,c=s.ceil,h=s.floor,l=n.noop,a=200,v=[2,4,5,8,10];f.outOfScreen={x:-1e3,y:-1e3},f.tickManager={},f.tickManager.continuous={_hasUnitBeginningTickCorrection:l,_removeBoundedOverlappingDates:l,_correctInterval:function(n){this._tickInterval*=n},_correctMax:function(n){this._max=this._adjustNumericTickValue(c(this._max/n)*n,n,this._min)},_correctMin:function(n){this._min=this._adjustNumericTickValue(h(this._min/n)*n,n,this._min)},_findBusinessDelta:function(n,t){return o(u(n-t))},_findTickIntervalForCustomTicks:function(){return u(this._customTicks[1]-this._customTicks[0])},_getBoundInterval:function(){var n=this,t=n._options.boundCoef;return r(t)&&isFinite(t)?n._tickInterval*u(t):n._tickInterval/2},_getInterval:function(n,t){var f=n||this._getDeltaCoef(this._screenDelta,this._businessDelta,this._options.gridSpacingFactor),e=t||this._options.numberMultipliers,r,u=0,h,s=!1,i;if(f>1){for(r=1;!s;r*=10)for(i=0;i<e.length;i++)if(u=e[i]*r,f<=u){s=!0;break}}else if(f>0)for(u=1,r=.1;!s;r/=10)for(i=e.length-1;i>=0;i--){if(h=e[i]*r,f>h){s=!0;break}u=h}return o(u)},_getMarginValue:function(n,t,i){return e.applyPrecisionByMinDelta(n,i,u(t-n)*i)},_getDefaultMinorInterval:function(n,t){var f=this._getDeltaCoef(n,t,this._options.minorGridSpacingFactor),u=v,i=u.length-1,r;for(i;i>=0;i--)if(r=t/u[i],f<=r)return o(r);return 0},_getMinorInterval:function(n,t){var u=this,e=u._options,o=e.minorTickInterval,s=e.minorTickCount,i,l,f;isFinite(o)&&u._isTickIntervalCorrect(o,a,t)?(i=o,f=i<t?c(t/i)-1:0):r(s)?(l=r(s)?s+1:h(n/e.minorGridSpacingFactor),f=l-1,i=f>0?t/l:0):(i=u._getDefaultMinorInterval(n,t),f=i<t?h(t/i)-1:0),u._minorTickInterval=i,u._minorTickCount=f},_getNextTickValue:function(n,t,i){return t=r(i)&&i?-t:t,n+=t,this._adjustNumericTickValue(n,t,this._min)},_isTickIntervalValid:function(n){return r(n)&&isFinite(n)&&n!==0}}}(jQuery,DevExpress),function(n,t){var c=t.viz.core,r=t.utils,e=r.isDefined,l=r.convertDateUnitToMilliseconds,a=r.correctDateWithUnitBeginning,u=r.convertDateTickIntervalToMilliseconds,f=r.convertMillisecondsToDateUnits,o=Math,s=o.abs,v=o.ceil,y=o.floor,p=o.round,w=50,h={millisecond:[1,2,5,10,25,100,250,300,500],second:[1,2,3,5,10,15,20,30],minute:[1,2,3,5,10,15,20,30],hour:[1,2,3,4,6,8,12],day:[1,2,3,5,7,10,14],month:[1,2,3,6]};c.tickManager.datetime=n.extend({},c.tickManager.continuous,{_correctInterval:function(n){var t=u(this._tickInterval);this._tickInterval=f(t*n)},_correctMax:function(n){var t=u(n);this._max=new Date(v(this._max/t)*t)},_correctMin:function(n){var t=u(n);this._min=new Date(y(this._min/t)*t),this._options.setTicksAtUnitBeginning&&a(this._min,n)},_findTickIntervalForCustomTicks:function(){return f(s(this._customTicks[1]-this._customTicks[0]))},_getBoundInterval:function(){var t=this,r=t._tickInterval,i=u(r),n=t._options.boundCoef,o=e(n)&&isFinite(n)?i*s(n):i/2;return f(o)},_getInterval:function(n){var i=n||this._getDeltaCoef(this._screenDelta,this._businessDelta,this._options.gridSpacingFactor),o=this._options.numberMultipliers,s={},f,t,r,u,e;if(i>0&&i<1)return{milliseconds:1};if(i===0)return 0;for(r in h)if(h.hasOwnProperty(r))for(u=h[r],t=0;t<u.length;t++)if(i<=l(r,u[t]))return s[r+"s"]=u[t],s;for(f=1;;f*=10)for(t=0;t<o.length;t++)if(e=f*o[t],i<=l("year",e))return{years:e};return 0},_getMarginValue:function(n,t,i){return f(p(s(t-n)*i))},_getMinorInterval:function(n,t){var r=this,i=r._options,o,h,c,s;e(i.minorTickInterval)&&r._isTickIntervalCorrect(i.minorTickInterval,w,t)?(o=i.minorTickInterval,h=u(o),s=h<t?v(t/h)-1:0):(c=e(i.minorTickCount)?i.minorTickCount+1:y(n/i.minorGridSpacingFactor),s=c-1,o=s>0?f(t/c):0),r._minorTickInterval=o,r._minorTickCount=s},_getNextTickValue:function(n,t,i,u,f){var e=r.addInterval(n,t,i);return this._options.setTicksAtUnitBeginning&&f!==!1&&a(e,t,!0),e},_getUnitBeginningMinorTicks:function(n){var t=this,i=t._ticks,r=t._findMinorTickInterval(i[1],i[2]),u=!0,f=!1,e=!1,o=t._getNextTickValue(i[1],r,u,f,e);return t._isTickIntervalValid(r)&&(n=t._createTicks(n,r,o,i[0],u,f,e)),n},_hasUnitBeginningTickCorrection:function(){var n=this._ticks;return n.length<3?!1:n[1]-n[0]!=n[2]-n[1]&&this._options.setTicksAtUnitBeginning&&this._options.minorTickCount},_isTickIntervalValid:function(n){return e(n)&&u(n)!==0},_removeBoundedOverlappingDates:function(){var n=this._ticks;n.length<=2||this._areDisplayValuesValid(n[0],n[1])||n.splice(1,1)}})}(jQuery,DevExpress),function(n,t){var o=t.viz.core,u=t.utils,h=u.isDefined,l=u.addInterval,f=u.adjustValue,r=u.getLog,s=u.raiseTo,e=Math,a=e.abs,v=e.ceil,c=e.floor,y=e.round;o.tickManager.logarithmic=n.extend({},o.tickManager.continuous,{_correctMax:function(n){this._max=s(v(f(r(this._max,this._options.base))/n*n),this._options.base)},_correctMin:function(n){this._min=s(c(f(r(this._min,this._options.base))/n*n),this._options.base)},_findBusinessDelta:function(n,t,i){var u;return n<=0||t<=0?0:u=i===!1?o.tickManager.continuous._findBusinessDelta(n,t):y(a(r(n,this._options.base)-r(t,this._options.base)))},_findTickIntervalForCustomTicks:function(){return f(r(this._customTicks[1]/this._customTicks[0],this._options.base))},_getInterval:function(n){var u=n||this._getDeltaCoef(this._screenDelta,this._businessDelta,this._options.gridSpacingFactor),e=this._options.numberMultipliers,i,r=0,o=!1,t;if(u!==0)for(i=1;!o;i*=10)for(t=0;t<e.length;t++)if(r=e[t]*i,u<=r){o=!0;break}return f(r)},_getMinorInterval:function(n,t){var i=this,r=i._options,u=r.minorTickCount,f=h(u)?u+1:c(n/r.minorGridSpacingFactor),e=f-1,o=e>0?t/f:0;i._minorTickInterval=o,i._minorTickCount=e},_getMarginValue:function(){return null},_getNextTickValue:function(n,t,i,u){var e=this,c,o;return t=h(i)&&i?-t:t,u===!1?o=n+t:(c=l(f(r(n,e._options.base)),t,e._min>e._max),o=s(c,e._options.base)),o}})}(jQuery,DevExpress),function(n,t){function rt(n){switch(n){case"overlap":return o;case o:return c;case c:default:return"end"}}function s(n){return n.toString()}var l=t.viz.core,u=l.tickManager,a=t.utils,h=a.isDefined,v=a.isNumber,r=Math,f=r.abs,e=r.ceil,d=r.floor,y=r.atan,p=r.max,g=n.each,nt=n.map,w=n.noop,b=n.isFunction,tt=4,k=2,o="stagger",c="rotate",it=2;u.overlappingMethods={},u.overlappingMethods.base={_applyOverlappingBehavior:function(){var n=this,i=n._options,t=i&&i.overlappingBehavior;t&&t.mode!=="ignore"&&(n._useAutoArrangement=!0,n._correctTicks(),t.mode==="auto"&&(n._applyAutoOverlappingBehavior(),n._useAutoArrangement=i.overlappingBehavior.isOverlapped),n._useAutoArrangement&&(t.mode===o&&(n._screenDelta*=k),n._applyAutoArrangement()))},_checkBoundedTicksOverlapping:function(){this._removeBoundedOverlappingDates(),this._applyStartEndTicksCorrection()},getMaxLabelParams:function(n){var t=this,e=t._options.getText||s,u,f,r=0,i;return(n=n||t._getMajorTicks(),!n.length)?{width:0,height:0,length:0,y:0}:(g(n,function(n,i){var o=e(i,t._options.labelOptions),s=o.length;r<s&&(r=s,u=i,f=o)}),i=t._getTextElementBbox(u,f),{width:i.width,height:i.height,y:i.y,length:r})},_applyAutoArrangement:function(){var n=this,r=n._options,t,i;n._useAutoArrangement&&(i=n._getTicksSize(),t=n._getAutoArrangementStep(i),t>1&&(h(n._tickInterval)||h(n._customTicks)?n._ticks=n._getAutoArrangementTicks(t):(r.gridSpacingFactor=i,n._ticks=n._createTicks([],n._findTickInterval(),n._min,n._max))))},_getAutoArrangementTicks:function(n){var r=this,i=r._ticks,f=i.length,u=i,e=r._decimatedTicks||[],t;if(n>1){for(u=[],t=0;t<f;t++)t%n==0?u.push(i[t]):e.push(i[t]);r._correctInterval(n)}return u},_isOverlappedTicks:function(n){return this._getAutoArrangementStep(this._getTicksSize(),n,-1)>1},_areDisplayValuesValid:function(n,t){var e=this,u=e._options,h=u.getText||s,c=u.overlappingBehavior&&v(u.overlappingBehavior.rotationAngle)?u.overlappingBehavior.rotationAngle:0,i=e._getTextElementBbox(n,h(n,u.labelOptions)),r=e._getTextElementBbox(t,h(t,u.labelOptions)),y=i.x>r.x,p=i.y>r.y,l,a,o;return c!==0?o=e._getDistanceByAngle(i.height,c)<=f(r.x-i.x):(l=y?r.x+r.width>i.x:i.x+i.width>r.x,a=p?r.y+r.height>i.y:i.y+i.height>r.y,o=!(l&&a)),o}},u.overlappingMethods.circular=n.extend({},u.overlappingMethods.base,{_correctTicks:w,_applyAutoOverlappingBehavior:function(){this._options.overlappingBehavior.isOverlapped=!0},_getTextElementBbox:function(t,i){var f=n.extend({},this._options.textOptions,{rotate:0}),r=b(this._options.translate)?this._options.translate(t):{x:0,y:0},u;return i=this._options.renderText(i,r.x,r.y).css(this._options.textFontStyles).attr(f),u=i.getBBox(),i.remove(),u},_getTicksSize:function(){return this.getMaxLabelParams(this._ticks)},_applyStartEndTicksCorrection:function(){var n=this._ticks,t=n[n.length-1];n.length>1&&!this._areDisplayValuesValid(n[0],t)&&n.pop()},_getAutoArrangementStep:function(n){var t=this,i=t._options,u=i.circularRadius,o=i.circularStartAngle,s=i.circularEndAngle,w=o===s?360:f(o-s),b=t._businessDelta||t._ticks.length,h=t._tickInterval*w/b,c=n.width,l=n.height,k=f(360*y(l/(2*u-c))/r.PI),d=f(360*y(c/(2*u-l))/r.PI),a=p(k,d),v=1;return h<a&&(v=e(a/h)),p(1,v)}}),u.overlappingMethods.linear=n.extend({},u.overlappingMethods.base,{_correctTicks:function(){var t=u.continuous._getInterval,n;n=e(t.call(this,this._getDeltaCoef(this._screenDelta*tt,this._ticks.length)))||this._ticks.length,this._ticks=this._getAutoArrangementTicks(n)},_getTextElementBbox:function(t,i){var o=n.extend({},this._options.textOptions,{rotate:0}),r=0,u=0,f=b(this._options.translate)?this._options.translate(t):0,e;return this._options.isHorizontal?r+=f:u+=f,i=this._options.renderText(i,r,u).css(this._options.textFontStyles).attr(o),e=i.getBBox(),i.remove(),e},_applyStartEndTicksCorrection:w,_getAutoArrangementStep:function(n,t,i){var f=this,r=f._options,u,o=r.textSpacing||0,s=r.isHorizontal?o:0;return(t=t||f._screenDelta,i=h(i)?i:1,r.getCustomAutoArrangementStep)?r.getCustomAutoArrangementStep(f._ticks,r):n>0?(u=d((t+o)/(n+s)),u=u<=i?it:u,e((r.ticksCount||f._ticks.length)/u)):1},_getOptimalRotationAngle:function(){var t=this,n=t._options,u=t._ticks[0],f=t._ticks[1],i=l.outOfScreen,o=t._textOptions,h=n.getText||s,c=n.textFontStyles,a=n.renderText(h(u,n.labelOptions),i.x+n.translate(u,!n.isHorizontal),i.y).css(c).attr(o),v=n.renderText(h(f,n.labelOptions),i.x+n.translate(f,!n.isHorizontal),i.y).css(c).attr(o),y=a.getBBox(),w=v.getBBox(),p=r.asin((y.height+n.textSpacing)/(w.x-y.x))*180/Math.PI;return a.remove(),v.remove(),isNaN(p)?90:e(p)},_applyAutoOverlappingBehavior:function(){for(var t=this,r=t._options.overlappingBehavior,u=t._screenDelta,f=!1,i=null,e=null,n="overlap";n!=="end";){f=i&&i!==90?!1:t._isOverlappedTicks(u),n=rt(f?n:null);switch(n){case o:u*=k,e=n;break;case c:i=t._getOptimalRotationAngle(),u=t._screenDelta,e=n}}r.isOverlapped=f,r.mode=e,r.rotationAngle=i},_getDistanceByAngle:function(n,t){return n/f(r.sin(t*(r.PI/180)))},_getTicksSize:function(){var t=this,n=t._options,r=t._ticks,u,f=n.overlappingBehavior?n.overlappingBehavior.rotationAngle:0,i,o,h=n.getText||s,c=v(f)&&f!==0,l=!c&&n.isHorizontal;return r.length===0?0:(u=l?nt(r,function(t){return h(t,n.labelOptions)}).join("\n"):h(r[0],n.labelOptions),i=t._getTextElementBbox(u,u),o=c?t._getDistanceByAngle(i.height,f):n.isHorizontal?i.width:i.height,e(o))}})}(jQuery,DevExpress),function(n,t){function o(n,t){for(var u=n.concat(t).sort(function(n,t){return r(n)&&r(t)&&n.valueOf()-t.valueOf()}),f=u.length,i=f-1;i>0;i--)r(u[i])&&r(u[i-1])&&u[i].valueOf()===u[i-1].valueOf()&&u.splice(i,1);return u}var v=t.viz.core,u=v.tickManager,e=t.utils,r=e.isDefined,h=e.isNumber,y=e.addInterval,p=e.adjustValue,c=n.each,l=n.map,s=n.inArray,f=n.noop,w=30,b=15,k=[1,2,3,5],a=2e3,d=2;u.discrete=n.extend({},u.continuous,{_getMinorTicks:f,_findTickInterval:f,_createTicks:function(){return[]},_getMarginValue:f,_generateBounds:f,_correctMin:f,_correctMax:f,_findBusinessDelta:f,_addBoundedTicks:f,getFullTicks:function(){return this._customTicks},getMinorTicks:function(){return this._decimatedTicks||[]},_findTickIntervalForCustomTicks:function(){return 1}}),u.TickManager=t.Class.inherit({ctor:function(n,t,i){i=i||{},this.update(n||{},t||{},i),this._initOverlappingMethods(i.overlappingBehaviorType)},dispose:function(){this._ticks=null,this._minorTicks=null,this._decimatedTicks=null,this._boundaryTicks=null,this._options=null},update:function(n,t,i){this.updateOptions(i||{}),this._min=t.min||0,this.updateTypes(n||{}),this.updateData(t||{})},updateMinMax:function(n){var i=n.min||0,r=n.max||0,t=this._applyMinMaxMargins(i,r);this._min=this._originalMin=t.min,this._max=this._originalMax=t.max,this.updateBusinessDelta()},updateBusinessDelta:function(){this._businessDelta=this._findBusinessDelta&&this._findBusinessDelta(this._min,this._max)},updateTypes:function(n){var t=this,i=t._validateAxisType(n.axisType),r=t._validateDataType(n.dataType,t._min);t._resetMethods(),this._axisType=i,this._dataType=r,this._initMethods(),t.updateMinMax({min:t._min,max:t._max})},updateData:function(t){t=n.extend({},t),t.min=r(t.min)?t.min:this._originalMin,t.max=r(t.max)?t.max:this._originalMax,this.updateMinMax(t),this._customTicks=t.customTicks&&t.customTicks.slice(),this._customMinorTicks=t.customMinorTicks,this._screenDelta=t.screenDelta||0},updateOptions:function(n){var t;this._options=t=n,this._useAutoArrangement=!!this._options.useTicksAutoArrangement,t.gridSpacingFactor=t.gridSpacingFactor||w,t.minorGridSpacingFactor=t.minorGridSpacingFactor||b,t.numberMultipliers=t.numberMultipliers||k},getTickBounds:function(){return{minVisible:this._minBound,maxVisible:this._maxBound}},getTicks:function(n){var t=this,i=t._options;return t._ticks=t._getMajorTicks(),t._checkLabelFormat(),t._decimatedTicks=[],t._applyAutoArrangement(),n||t._applyOverlappingBehavior(),t._generateBounds(),i.showMinorTicks&&(t._minorTicks=t._customMinorTicks||t._getMinorTicks()),t._addBoundedTicks(),n||t._checkBoundedTicksOverlapping(),t._ticks},getMinorTicks:function(){var n=this,i=n._decimatedTicks||[],t=n._options||{},u=i.length,f=r(t.minorTickInterval)||r(t.minorTickCount),e=n._customMinorTicks&&n._customMinorTicks.length,s=t.showMinorTicks&&(f||e),h=u&&!s?i:n._minorTicks||[];return o(h,[])},getDecimatedTicks:function(){return o(this._decimatedTicks||[],[])},getFullTicks:function(){return o(this._ticks||[],this.getMinorTicks(),this._axisType)},getBoundaryTicks:function(){return o(this._boundaryTicks||[],[])},getTickInterval:function(){return this._tickInterval},getMinorTickInterval:function(){return this._minorTickInterval},getOverlappingBehavior:function(){return this._options.overlappingBehavior},getOptions:function(){return this._options},getTypes:function(){return{axisType:this._axisType,dataType:this._dataType}},getData:function(){return{min:this._min,max:this._max,customTicks:this._customTicks,customMinorTicks:this._customMinorTicks,screenDelta:this._screenDelta}},_getMajorTicks:function(){var n;return this._customTicks?(n=this._customTicks.slice(),this._tickInterval=n.length>1?this._findTickIntervalForCustomTicks():0):n=this._createTicks([],this._findTickInterval(),this._min,this._max),n},_applyMargin:function(n,t,i,r){var u,f=t;return isFinite(n)&&(u=this._getMarginValue(t,i,n),u&&(f=this._getNextTickValue(t,u,r,!1))),f},_applyMinMaxMargins:function(n,t){var i=this._options,r=n>t?t:n,u=t>n?t:n;return this._minCorrectionEnabled=this._getCorrectionEnabled(n,"min"),this._maxCorrectionEnabled=this._getCorrectionEnabled(t,"max"),i&&!i.stick&&(r=this._applyMargin(i.minValueMargin,n,t,!0),u=this._applyMargin(i.maxValueMargin,t,n,!1)),{min:r,max:u}},_checkBoundedTickInArray:function(n,t){var r=l(t||[],function(n){return n.valueOf()}),i=s(n.valueOf(),r);i!==-1&&t.splice(i,1)},_checkLabelFormat:function(){var n=this._options;this._dataType==="datetime"&&!n.hasLabelFormat&&this._ticks.length&&(n.labelOptions.format=t.formatHelper.getDateFormatByTicks(this._ticks))},_generateBounds:function(){var n=this,t=n._getBoundInterval(),i=n._options.stick,r=n._options.minStickValue,u=n._options.maxStickValue,f=n._minCorrectionEnabled&&!i?n._getNextTickValue(n._min,t,!0):n._originalMin,e=n._maxCorrectionEnabled&&!i?n._getNextTickValue(n._max,t):n._originalMax;n._minBound=f<r?r:f,n._maxBound=e>u?u:e},_initOverlappingMethods:function(n){this._initMethods(u.overlappingMethods[n||"linear"])},_addBoundedTicks:function(){var n=this,r=l(n._ticks,function(n){return n.valueOf()}),t=n._originalMin,i=n._originalMax,u=n._options.addMinMax||{};n._boundaryTicks=[],u.min&&s(t.valueOf(),r)===-1&&(n._ticks.splice(0,0,t),n._boundaryTicks.push(t),n._checkBoundedTickInArray(t,n._minorTicks),n._checkBoundedTickInArray(t,n._decimatedTicks)),u.max&&s(i.valueOf(),r)===-1&&(n._ticks.push(i),n._boundaryTicks.push(i),n._checkBoundedTickInArray(i,n._minorTicks),n._checkBoundedTickInArray(i,n._decimatedTicks))},_getCorrectionEnabled:function(n,t){var i=this._options||{},r=i.percentStick&&n===1,u=i[t+"ValueMargin"];return!r&&!u},_validateAxisType:function(n){var t="continuous",i={continuous:!0,discrete:!0,logarithmic:!0};return i[n]?n:t},_validateDataType:function(n,t){var i={numeric:!0,datetime:!0,string:!0};return t=t||this._min,i[n]||(n=r(t)?this._getDataType(t):"numeric"),n},_getDataType:function(n){return e.isDate(n)?"datetime":"numeric"},_getMethods:function(){var n;return n=this._axisType==="continuous"?this._dataType==="datetime"?u.datetime:u.continuous:u[this._axisType]||u.continuous},_resetMethods:function(){var n=this,t=n._getMethods();c(t,function(t){n[t]&&delete n[t]})},_initMethods:function(n){var t=this;n=n||t._getMethods(),c(n,function(n,i){t[n]=i})},_getDeltaCoef:function(n,t,i){var r;return i=i||this._options.gridSpacingFactor,n=n||this._screenDelta,t=t||this._businessDelta,r=n/i,r=r<=1?d:r,t/r},_adjustNumericTickValue:function(n,t,i){return e.isExponential(n)?p(n):e.applyPrecisionByMinDelta(i,t,n)},_isTickIntervalCorrect:function(n,t,i){var r;if(i=i||this._businessDelta,!h(n)&&(r=new Date,n=y(r,n)-r,!n))return!1;if(h(n))if(n>0&&i/n>t)this._options.incidentOccured&&this._options.incidentOccured("W2003");else return!0;return!1},_correctValue:function(n,t,i){var r=this,o="_"+n+"CorrectionEnabled",s=n+"SpaceCorrection",u="_"+n,f=r._options.minStickValue,e=r._options.maxStickValue;r[o]&&(r._options[s]&&(r[u]=r._getNextTickValue(r[u],t,n==="min")),i.call(this,t)),n==="min"&&(r[u]=r[u]<f?f:r[u]),n==="max"&&(r[u]=r[u]>e?e:r[u])},_findTickInterval:function(){var n=this,i=n._options,t;return t=n._isTickIntervalValid(i.tickInterval)&&n._isTickIntervalCorrect(i.tickInterval,a)?i.tickInterval:n._getInterval(),n._isTickIntervalValid(t)&&(n._correctValue("min",t,n._correctMin),n._correctValue("max",t,n._correctMax),n.updateBusinessDelta()),n._tickInterval=t,t},_findMinorTickInterval:function(n,t){var i=this,u=i._ticks,r=i._options.stick?u.length-1:u.length;return r<1&&(r=1),i._getMinorInterval(i._screenDelta/r,i._findBusinessDelta(n,t,!1)),i._minorTickInterval},_createMinorTicks:function(n,t,i){var r=this,u=r._findMinorTickInterval(t,i),f=!1,e=!1,o=!1,s=r._getNextTickValue(t,u,f,e,o);return r._isTickIntervalValid(u)&&(n=r._createCountedTicks(n,u,s,i,r._minorTickCount,f,e,o)),n},_getMinorTicks:function(){var n=this,t=[],i=n._ticks,u=i.length,f=n._hasUnitBeginningTickCorrection(),r=f?1:0;if(i.length){for(t=n._getBoundedMinorTicks(t,n._minBound,i[0],!0),f&&(t=n._getUnitBeginningMinorTicks(t)),r;r<u-1;r++)t=n._createMinorTicks(t,i[r],i[r+1]);t=n._getBoundedMinorTicks(t,n._maxBound,i[u-1])}else t=n._createMinorTicks(t,n._minBound,n._maxBound);return t},_createCountedTicks:function(n,t,i,r,u,f,e){for(var o=i,s=0;s<u;s++)e===!1&&o.valueOf()===r.valueOf()||n.push(o),o=this._getNextTickValue(o,t,!1,f,!1);return n},_createTicks:function(n,t,i,r,u,f,e){var s=this,o=i,h=i,l,a,c;if(s._isTickIntervalValid(t)){c=i-r<0;do{if(o=h,s._options.stick?o>=s._originalMin&&o<=s._originalMax&&n.push(o):n.push(o),h=s._getNextTickValue(o,t,u,f,e),o.valueOf()===h.valueOf())break;l=h-i>=0,a=r-h>=0}while(c===l&&c===a)}else n.push(o);return n},_getBoundedMinorTicks:function(n,t,i,r){var u=this,o=!1,e=u._tickInterval?this._getNextTickValue(i,u._tickInterval,r,!0,o):t,f=u._findMinorTickInterval(i,e),l=u._isTickIntervalCorrect(f,a,u._findBusinessDelta(i,t,!1)),s,h,c=t.valueOf();if(l&&u._isTickIntervalValid(f)&&u._minorTickCount>0){if(r){if(i.valueOf()<=c)return n;while(e.valueOf()<c)e=this._getNextTickValue(e,f,!1,!1,o);s=e,h=u._getNextTickValue(i,f,!0,!1,!1)}else s=u._getNextTickValue(i,f,!1,!1,!1),h=t;n=u._createTicks(n,f,s,h,!1,!1,o)}return n}})}(jQuery,DevExpress),function(n,t,i){var u=t.utils,r=u.isDefined,e=u.getPower,f=Math.round;t.viz.core.numericTranslatorFunctions={translate:function(n){var i=this,t=i._canvasOptions,u=t.rangeDoubleError,f=i.translateSpecialCase(n);return r(f)?f:isNaN(n)||n.valueOf()+u<t.rangeMin||n.valueOf()-u>t.rangeMax?null:i._conversionValue(i._calculateProjection((n-t.rangeMinVisible)*t.ratioOfCanvasRange))},untranslate:function(n,t,i){var u=this._canvasOptions,f=u.startPoint;return!i&&(n<f||n>u.endPoint)||!r(u.rangeMin)||!r(u.rangeMax)?null:this._calculateUnProjection((n-f)/u.ratioOfCanvasRange)},getInterval:function(){return f(this._canvasOptions.ratioOfCanvasRange*(this._businessRange.interval||Math.abs(this._canvasOptions.rangeMax-this._canvasOptions.rangeMin)))},_getValue:function(n){return n},zoom:function(n,t){var r=this,e=r._canvasOptions,h=e.startPoint,c=e.endPoint,u=(h+n)/t,f=(c+n)/t,o=Math.min(r.translate(r._getValue(e.rangeMin)),r.translate(r._getValue(e.rangeMax))),s=Math.max(r.translate(r._getValue(e.rangeMin)),r.translate(r._getValue(e.rangeMax)));return o>u&&(f-=u-o,u=o),s<f&&(u-=f-s,f=s),s-o<f-u&&(u=o,f=s),n=(c-h)*u/(f-u)-h,t=(h+n)/u||1,{min:r.untranslate(u,i,!0),max:r.untranslate(f,i,!0),translate:n,scale:t}},getMinScale:function(n){return n?1.1:.9},getScale:function(n,t){var i=this._canvasOptions;return n=r(n)?n:i.rangeMin,t=r(t)?t:i.rangeMax,(i.rangeMax-i.rangeMin)/Math.abs(n-t)}}}(jQuery,DevExpress),function(n,t){var u=t.viz.core,r=u.numericTranslatorFunctions;u.datetimeTranslatorFunctions={translate:r.translate,untranslate:function(){var t=r.untranslate.apply(this,arguments);return t===null?t:new Date(t)},_getValue:r._getValue,getInterval:r.getInterval,zoom:r.zoom,getMinScale:r.getMinScale,getScale:r.getScale}}(jQuery,DevExpress),function(n,t){var u=t.utils.isDefined,r=Math.round;t.viz.core.categoryTranslatorFunctions={translate:function(n,t){var i=this,f=i._canvasOptions,e=i._categoriesToPoints[n],o,s=i.translateSpecialCase(n),h=f.startPointIndex||0,c=i._businessRange.stick?0:.5;return u(s)?s:e?(t=t||0,o=e.index+c-h+t*.5,r(f.startPoint+f.interval*o)):null},untranslate:function(n,t,i){var f=this,e=f._canvasOptions,o=e.startPoint,s=f.visibleCategories||f._categories,h=s.length,u=0,c=f._businessRange.stick?.5:0;return!i&&(n<o||n>e.endPoint)?null:(t=t||0,u=r((n-o)/e.interval+c-.5-t*.5),h===u&&u--,u===-1&&(u=0),e.invert&&(u=h-u-1),s[u])},getInterval:function(){return this._canvasOptions.interval},zoom:function(n,t){var f=this,i=f._canvasOptions,h=i.interval*t,a=n/h,c=f._businessRange.stick,r=parseInt((i.startPointIndex||0)+a+.5),l=parseInt(i.canvasLength/h+(c?1:0))||1,e,u,o=f._categories,s;return i.invert&&(o=o.slice().reverse()),r<0&&(r=0),e=r+l,e>o.length&&(e=o.length,r=e-l,r<0&&(r=0)),u=o.slice(parseInt(r),parseInt(e)),s=f._getDiscreteInterval(u.length,i),t=s/i.interval,n=f.translate(u[0])*t-(i.startPoint+(c?0:s/2)),{min:u[0],max:u[u.length-1],translate:n,scale:t}},getMinScale:function(n){var t=this,i=t._canvasOptions,u=i.interval,r=(t.visibleCategories||t._categories).length;return r+=(parseInt(r*.1)||1)*(n?-2:2),i.canvasLength/(Math.max(r,1)*i.interval)},getScale:function(n,t){var i=this,r=i.getCanvasVisibleArea(),u=!i._businessRange.stick&&1,f=i.translate(n,-u)||r.min,e=i.translate(t,+u)||r.max;return i.canvasLength/Math.abs(e-f)}}}(jQuery,DevExpress),function(n,t,i){var e=t.viz.core,r=e.numericTranslatorFunctions,u=t.utils,o=u.raiseTo,f=u.getLog;e.logarithmicTranslatorFunctions={translate:function(n){var t=this,i=t.translateSpecialCase(n);return u.isDefined(i)?i:r.translate.call(t,f(n,t._businessRange.base))},untranslate:function(){var t=r.untranslate.apply(this,arguments);return t===null?t:o(t,this._businessRange.base)},getInterval:r.getInterval,_getValue:function(n){return Math.pow(this._canvasOptions.base,n)},zoom:r.zoom,getMinScale:r.getMinScale,getScale:function(n,t){var e=this._businessRange.base;return n=u.isDefined(n)?f(n,e):i,t=u.isDefined(t)?f(t,e):i,r.getScale.call(this,n,t)}}}(jQuery,DevExpress),function(n){function r(){this.setDomain(arguments[0],arguments[1]).setCodomain(arguments[2],arguments[3])}var i=Number;r.prototype={constructor:r,setDomain:function(n,t){var r=this;return r._domain1=i(n),r._domain2=i(t),r._domainDelta=r._domain2-r._domain1,r},setCodomain:function(n,t){var r=this;return r._codomain1=i(n),r._codomain2=i(t),r._codomainDelta=r._codomain2-r._codomain1,r},getDomain:function(){return[this._domain1,this._domain2]},getCodomain:function(){return[this._codomain1,this._codomain2]},getDomainStart:function(){return this._domain1},getDomainEnd:function(){return this._domain2},getCodomainStart:function(){return this._codomain1},getCodomainEnd:function(){return this._codomain2},getDomainRange:function(){return this._domainDelta},getCodomainRange:function(){return this._codomainDelta},translate:function(n){var t=(i(n)-this._domain1)/this._domainDelta;return 0<=t&&t<=1?this._codomain1+t*this._codomainDelta:NaN},adjust:function(n){var t=(i(n)-this._domain1)/this._domainDelta,r=NaN;return t<0?r=this._domain1:t>1?r=this._domain2:0<=t&&t<=1&&(r=i(n)),r}},n.viz.core.Translator1D=r}(DevExpress),function(n,t){var f=t.viz.core,u=t.utils,o=u.getLog,h=u.getPower,r=u.isDefined,c=Math.abs,l=["width","height","left","top","bottom","right"],a=1,v=6e4,e=n.noop,s,y=function(t){return n.each(l,function(n,i){t[i]=parseInt(t[i])||0}),t},p=function(n,t){for(var u={},r,f=n.length,i=0;i<f;i++)r=n[i],u[r]={name:r,index:t?f-1-i:i};return u},w=function(n){function t(t,i){!r(n[t])&&r(n[i])&&(n[t]=n[i])}return t("minVisible","min"),t("maxVisible","max"),n};s=f.Translator2D=function(n,t,i){this.update(n,t,i)},s.prototype={constructor:s,reinit:function(){var n=this,i=n._businessRange,o=i.categories||[],t={},e=n._prepareCanvasOptions(),r=u.getCategoriesInfo(o,i.startCategories,i.endCategories).categories,s=(r||o).length;switch(i.axisType){case"logarithmic":t=f.logarithmicTranslatorFunctions;break;case"discrete":t=f.categoryTranslatorFunctions,n._categories=o,e.interval=n._getDiscreteInterval(i.addSpiderCategory?s+1:s,e),n._categoriesToPoints=p(o,e.invert),r&&r.length&&(e.startPointIndex=n._categoriesToPoints[r[e.invert?r.length-1:0]].index,n.visibleCategories=r);break;default:t=i.dataType==="datetime"?f.datetimeTranslatorFunctions:f.numericTranslatorFunctions}n.translate=t.translate,n.untranslate=t.untranslate,n.getInterval=t.getInterval,n.zoom=t.zoom,n.getMinScale=t.getMinScale,n._getValue=t._getValue,n.getScale=t.getScale,n._conversionValue=n._options.conversionValue?function(n){return n}:function(n){return Math.round(n)}},_getDiscreteInterval:function(n,t){var i=n-(this._businessRange.stick?1:0);return i>0?t.canvasLength/i:t.canvasLength},_getCanvasBounds:function(n){var t=n.min,i=n.max,f=n.minVisible,e=n.maxVisible,s,h,c=n.base,y=u.isDate(i)||u.isDate(t),l=y?v:a;return r(t)&&r(i)&&t.valueOf()===i.valueOf()&&(s=t.valueOf()-l,h=i.valueOf()+l,y?(t=new Date(s),i=new Date(h)):(t=t!==0?s:0,i=h)),r(f)&&r(e)&&f.valueOf()===e.valueOf()&&(s=f.valueOf()-l,h=e.valueOf()+l,y?(f=s<t.valueOf()?t:new Date(s),e=h>i.valueOf()?i:new Date(h)):(f!==0&&(f=s<t?t:s),e=h>i?i:h)),n.axisType==="logarithmic"&&(e=o(e,c),f=o(f,c),t=o(t,c),i=o(i,c)),{base:c,rangeMin:t,rangeMax:i,rangeMinVisible:f,rangeMaxVisible:e}},_prepareCanvasOptions:function(){var i=this,r=i._businessRange,n=i._canvasOptions=i._getCanvasBounds(r),u,t=i._canvas;return i._options.direction==="horizontal"?(n.startPoint=t.left,u=t.width,n.endPoint=t.width-t.right,n.invert=r.invert):(n.startPoint=t.top,u=t.height,n.endPoint=t.height-t.bottom,n.invert=!r.invert),i.canvasLength=n.canvasLength=n.endPoint-n.startPoint,n.rangeDoubleError=Math.pow(10,h(n.rangeMax-n.rangeMin)-h(u)-2),n.ratioOfCanvasRange=n.canvasLength/(n.rangeMaxVisible-n.rangeMinVisible),n},updateBusinessRange:function(n){this._businessRange=w(n),this.reinit()},update:function(t,i,r){var u=this;u._options=n.extend(u._options||{},r),u._canvas=y(i),u.updateBusinessRange(t)},getBusinessRange:function(){return this._businessRange},getCanvasVisibleArea:function(){return{min:this._canvasOptions.startPoint,max:this._canvasOptions.endPoint}},translateSpecialCase:function(n){var f=this,e=f._canvasOptions,i=e.startPoint,r=e.endPoint,u=f._businessRange,s=u.minVisible,h=u.maxVisible,o,t=null;switch(n){case"canvas_position_default":s<=0&&h>=0?t=f.translate(0):(o=u.invert^(s<=0&&h<=0),t=f._options.direction==="horizontal"?o?r:i:o?i:r);break;case"canvas_position_left":case"canvas_position_top":t=i;break;case"canvas_position_center":case"canvas_position_middle":t=i+e.canvasLength/2;break;case"canvas_position_right":case"canvas_position_bottom":t=r;break;case"canvas_position_start":t=u.invert?r:i;break;case"canvas_position_end":t=u.invert?i:r}return t},_calculateProjection:function(n){var t=this._canvasOptions;return t.invert?t.endPoint-n:t.startPoint+n},_calculateUnProjection:function(n){var t=this._canvasOptions;return t.invert?t.rangeMaxVisible.valueOf()-n:t.rangeMinVisible.valueOf()+n},getVisibleCategories:function(){return this.visibleCategories},getMinBarSize:function(n){var t=this.getCanvasVisibleArea(),i=this.untranslate(t.min+n);return c(this.untranslate(t.min)-(r(i)?i:this.untranslate(t.max)))},translate:e,untranslate:e,getInterval:e,zoom:e,getMinScale:e}}(jQuery,DevExpress),function(n,t){function f(n,i,r){var f=this;f._argCanvas={left:0,right:0,width:this._getAngle()},f._valCanvas={left:0,right:0},f.canvas=i,f._init(),f._arg=new t.viz.core.Translator2D(n.arg,f._argCanvas,{direction:"horizontal",conversionValue:!0}),f._val=new t.viz.core.Translator2D(n.val,f._valCanvas,{direction:"horizontal"}),f._businessRange=n,f.startAngle=u.isNumber(r.startAngle)?r.startAngle:0}var u=t.utils,e=90,r=Math.round;f.prototype={constructor:f,_init:function(){var n=this.canvas;this._setCoords({x:n.left+(n.width-n.right-n.left)/2,y:n.top+(n.height-n.top-n.bottom)/2,r:Math.min(n.width-n.left-n.right,n.height-n.top-n.bottom)/2}),this._valCanvas.width=this._rad},reinit:function(){this._init(),this._arg.reinit(),this._val.reinit()},_setCoords:function(n){this._x0=n.x,this._y0=n.y,this._rad=n.r<0?0:n.r},getBusinessRange:function(){return this._businessRange},translate:function(n,t,i){var f=this,s=f._arg.translate(n,i&&i[0]),o=f._val.translate(t,i&&i[1]),h=u.isDefined(s)?s+f.startAngle-e:null,c=u.getCosAndSin(h),l,a;return a=r(f._y0+o*c.sin),l=r(f._x0+o*c.cos),{x:l,y:a,angle:h,radius:o}},getValLength:function(){return this._rad},getCenter:function(){return{x:this._x0,y:this._y0}},getBaseAngle:function(){return this.startAngle-e},getInterval:function(){return this._arg.getInterval()},getValInterval:function(){return this._val.getInterval()},_getAngle:function(){return 360},getStartAngle:function(){return this.startAngle},_untranslate:function(n,t){var i=u.getDistance(this._x0,this._y0,n,t),r=Math.atan2(t-this._y0,n-this._x0);return{r:i,phi:r}},checkVisibility:function(n,t){var i=this._val.getCanvasVisibleArea();return i.min=r(i.min),i.max=r(i.max),i.min<=t&&i.max>=t||i.max>=n&&i.min<=n},untranslate:function(n,t){var i=this._untranslate(n,t);return i.phi=r(u.normalizeAngle(i.phi*180/Math.PI)),i.r=r(i.r),i},getVisibleCategories:n.noop,getCanvasVisibleArea:function(){return{}},getMinBarSize:function(n){return this._val.getMinBarSize(n)}},t.viz.core.PolarTranslator=f}(jQuery,DevExpress),function(n){var i=window.isFinite;n.viz.core.Rectangle=n.Class.inherit({ctor:function(n){var t=this;n=n||{},t.left=Number(n.left)||0,t.right=Number(n.right)||0,t.top=Number(n.top)||0,t.bottom=Number(n.bottom)||0},width:function(){return this.right-this.left},height:function(){return this.bottom-this.top},horizontalMiddle:function(){return(this.left+this.right)/2},verticalMiddle:function(){return(this.top+this.bottom)/2},raw:function(){var n=this;return{left:n.left,top:n.top,right:n.right,bottom:n.bottom}},clone:function(){return new this.constructor(this.raw())},move:function(n,t){var r=this.clone();return i(n)&&i(t)&&(r.left+=Number(n),r.right+=Number(n),r.top+=Number(t),r.bottom+=Number(t)),r},inflate:function(n,t){var r=this.clone();return i(n)&&i(t)&&(r.left-=Number(n),r.right+=Number(n),r.top-=Number(t),r.bottom+=Number(t)),r},scale:function(n){var t=this;return n>0?t.inflate(t.width()*(n-1)/2,t.height()*(n-1)/2):t.clone()}})}(DevExpress),function(n,t){function u(n){for(var i=r.length,t=0;t<i;++t)if(r[t].name===n)return t;return-1}function e(n){return r[u(n)]||r[f]}function o(n,t,i){if(arguments.length===0)return r[f].name;var e=-1;i&&t&&(e=u(n+":"+i+"-"+t)),e<0&&i&&(e=u(n+":"+i)),e<0&&t&&(e=u(n+"-"+t)),e<0&&(e=u(n)),f=e>=0?e:0}function s(n,i){n&&n.name&&r.push(t.extend(!0,{},e(i),n))}var r=n.viz.themes=[],f=0;t.extend(n.viz.core,{findTheme:e,currentTheme:o,registerTheme:s})}(DevExpress,jQuery),function(n,t,i){function y(n){if(n===i)return s;n=String(n).toLowerCase(),s=n in r?n:"default"}function h(n,t){var i,e;if(u(n))i=n;else{if(t=t||{},e=t.type||"simpleSet",v(n)){var o=n.toLowerCase(),h=r[o],c=t.theme&&r[o+"_"+f(t.theme).toLowerCase()];i=c&&c[e]||h&&h[e]}i||(i=r[s][e])}return i?i.slice(0):null}function p(n,t,e){var s={},h;u(t)?s.simpleSet=t.slice(0):t&&(s.simpleSet=u(t.simpleSet)?t.simpleSet.slice(0):i,s.indicatingSet=u(t.indicatingSet)?t.indicatingSet.slice(0):i,s.gradientSet=u(t.gradientSet)?t.gradientSet.slice(0):i),(s.simpleSet||s.indicatingSet||s.gradientSet)&&(h=f(n).toLowerCase(),e&&(h=h+"_"+f(e).toLowerCase()),o(r[h]=r[h]||{},s))}function w(n){var t=0;this.next=function(){var i=n[t++];return t==n.length&&this.reset(),i},this.reset=function(){t=0}}function c(n,t){t=t||{},this._originalPalette=h(n,t);var i=t?t.stepHighlight||0:0;this._paletteSteps=new w([0,i,-i]),this._resetPalette()}function b(n,t){var i=new e(n).alter(t),r=k(i);return(r>200||r<55)&&(i=new e(n).alter(-t/2)),i.toHex()}function k(n){return n.r*.3+n.g*.59+n.b*.11}function d(n,t){var i=h(n,{type:"gradientSet"});i=t>0?g(i,t):[],this.getColor=function(n){return i[n]||null}}function g(n,t){function s(n){var t=f*n,i=l(t),r=a(t);o.push(u[i].blend(u[r],t-i).toHex())}for(var r=t-1,f=n.length-1,u=[],o=[],h,c,v,i=0;i<=f;++i)u.push(new e(n[i]));if(r>0)for(i=0;i<=r;++i)s(i/r);else s(.5);return o}var f=window.String,l=Math.floor,a=Math.ceil,e=n.Color,u=n.utils.isArray,v=n.utils.isString,o=t.extend,r={"default":{simpleSet:["#5f8b95","#ba4d51","#af8a53","#955f71","#859666","#7e688c"],indicatingSet:["#a3b97c","#e1b676","#ec7f83"],gradientSet:["#5f8b95","#ba4d51"]},"harmony light":{simpleSet:["#fcb65e","#679ec5","#ad79ce","#7abd5c","#e18e92","#b6d623","#b7abea","#85dbd5"],indicatingSet:["#b6d623","#fcb65e","#e18e92"],gradientSet:["#7abd5c","#fcb65e"]},"soft pastel":{simpleSet:["#60a69f","#78b6d9","#6682bb","#a37182","#eeba69","#90ba58","#456c68","#7565a4"],indicatingSet:["#90ba58","#eeba69","#a37182"],gradientSet:["#78b6d9","#eeba69"]},pastel:{simpleSet:["#bb7862","#70b3a1","#bb626a","#057d85","#ab394b","#dac599","#153459","#b1d2c6"],indicatingSet:["#70b3a1","#dac599","#bb626a"],gradientSet:["#bb7862","#70b3a1"]},bright:{simpleSet:["#70c92f","#f8ca00","#bd1550","#e97f02","#9d419c","#7e4452","#9ab57e","#36a3a6"],indicatingSet:["#70c92f","#f8ca00","#bd1550"],gradientSet:["#e97f02","#f8ca00"]},soft:{simpleSet:["#cbc87b","#9ab57e","#e55253","#7e4452","#e8c267","#565077","#6babac","#ad6082"],indicatingSet:["#9ab57e","#e8c267","#e55253"],gradientSet:["#9ab57e","#e8c267"]},ocean:{simpleSet:["#75c099","#acc371","#378a8a","#5fa26a","#064970","#38c5d2","#00a7c6","#6f84bb"],indicatingSet:["#c8e394","#7bc59d","#397c8b"],gradientSet:["#acc371","#38c5d2"]},vintage:{simpleSet:["#dea484","#efc59c","#cb715e","#eb9692","#a85c4c","#f2c0b5","#c96374","#dd956c"],indicatingSet:["#ffe5c6","#f4bb9d","#e57660"],gradientSet:["#efc59c","#cb715e"]},violet:{simpleSet:["#d1a1d1","#eeacc5","#7b5685","#7e7cad","#a13d73","#5b41ab","#e287e2","#689cc1"],indicatingSet:["#d8e2f6","#d0b2da","#d56a8a"],gradientSet:["#eeacc5","#7b5685"]}},s="default";o(c.prototype,{dispose:function(){return this._originalPalette=this._palette=this._paletteSteps=null,this},getNextColor:function(){var n=this;return n._currentColor>=n._palette.length&&n._resetPalette(),n._palette[n._currentColor++]},_resetPalette:function(){var n=this,r,t;if(n._currentColor=0,r=n._paletteSteps.next(),t=n._originalPalette,r)for(var u=n._palette=[],i=0,f=t.length;i<f;++i)u[i]=b(t[i],r);else n._palette=t.slice(0)},reset:function(){return this._paletteSteps.reset(),this._resetPalette(),this}}),o(n.viz.core,{registerPalette:p,getPalette:h,Palette:c,GradientPalette:d,currentPalette:y})}(DevExpress,jQuery),function(n,t){function e(n,t){var i=n;return t&&u(t.split("."),function(n,t){return i=i[t]}),i}var f=n.utils.isString,o=n.viz.core.findTheme,r=t.extend,u=t.each;n.viz.core.BaseThemeManager=n.Class.inherit({dispose:function(){return this._theme=this._font=null,this},setTheme:function(n){n=n||{};var t=this,i=o(f(n)?n:n.name);return t._themeName=i.name,t._font=r({},i.font,n.font),t._themeSection&&u(t._themeSection.split("."),function(n,u){i=r(!0,{},i[u],t._IE8?i[u+"IE8"]:{})}),t._theme=r(!0,{},i,f(n)?{}:n),t._initializeTheme(),t},theme:function(n){return e(this._theme,n)},themeName:function(){return this._themeName},_initializeTheme:function(){var n=this;u(n._fontFields||[],function(t,i){n._initializeFont(e(n._theme,i))})},_initializeFont:function(n){r(n,this._font,r({},n))}})}(DevExpress,jQuery),function(n){var i=Math.min;n.viz.core.TextCloud=n.Class.inherit(function(){var t={horMargin:8,verMargin:4,tailLength:10},n={};return n["right-bottom"]=n.rb=[0,-1,-1,0,0,1,1,0],n["bottom-right"]=n.br=[-1,0,0,-1,1,0,0,1],n["left-bottom"]=n.lb=[0,-1,1,0,0,1,-1,0],n["bottom-left"]=n.bl=[1,0,0,-1,-1,0,0,1],n["left-top"]=n.lt=[0,1,1,0,0,-1,-1,0],n["top-left"]=n.tl=[1,0,0,1,-1,0,0,-1],n["right-top"]=n.rt=[0,1,-1,0,0,-1,1,0],n["top-right"]=n.tr=[-1,0,0,1,1,0,0,-1],{setup:function(r){var e=this,f=$.extend({},t,r),h=f.x,c=f.y,u=n[f.type],o=f.textWidth+2*f.horMargin,s=f.textHeight+2*f.verMargin,l=f.tailLength,a=l,v=h,y=c;return u[0]&1?a=i(a,s/3):l=i(l,o/3),e._points=[h,c,h+=u[0]*(o+l),c+=u[1]*(s+a),h+=u[2]*o,c+=u[3]*s,h+=u[4]*o,c+=u[5]*s,h+=u[6]*(o-l),c+=u[7]*(s-a)],e._cx=v+u[0]*l+(u[0]+u[2])*o/2,e._cy=y+u[1]*a+(u[1]+u[3])*s/2,e._cloudWidth=o,e._cloudHeight=s,e._tailLength=f.tailLength,e},points:function(){return this._points.slice(0)},cx:function(){return this._cx},cy:function(){return this._cy},width:function(){return this._cloudWidth},height:function(){return this._cloudHeight},tailLength:function(){return this._tailLength}}}())}(DevExpress),function(n,t){var r=t.viz,u=r.core,f=t.Class,i=t.utils.isDefined,e=f.inherit({correctValueType:function(n){return n==="numeric"||n==="datetime"||n==="string"?n:""},_parsers:{string:function(n){return i(n)?""+n:n},numeric:function(n){if(!i(n))return n;var t=Number(n);return isNaN(t)&&(t=undefined),t},datetime:function(n){if(!i(n))return n;var t,r=Number(n);return t=isNaN(r)?new Date(n):new Date(r),isNaN(Number(t))&&(t=undefined),t}},getParser:function(t){return this._parsers[this.correctValueType(t)]||n.noop}});u.ParseUtils=e}(jQuery,DevExpress),function(n,t,i){var r=Math.ceil,u=Math.min;n.viz.core.utils={decreaseGaps:function(n,i,f){var e,o,s;do e=t.map(i,function(t){return n[t]?n[t]:null}),s=r(f/e.length),e.push(s),o=u.apply(null,e),t.each(i,function(t,i){n[i]&&(n[i]-=o,f-=o)});while(f>0&&e.length>1);return f},parseScalar:function(n,t){return n!==i?n:t},enumParser:function(n){for(var i={},t=0,r=n.length;t<r;++t)i[String(n[t]).toLowerCase()]=1;return function(n,t){var r=String(n).toLowerCase();return i[r]?r:t}},patchFontOptions:function(n){var i={};return t.each(n||{},function(n,t){/^(cursor|opacity)$/i.test(n)||(n=n==="color"?"fill":"font-"+n),i[n]=t}),i},notExistOrLoaded:function(n){return!n||n.isLoaded()}}}(DevExpress,jQuery),function(n,t){function f(){this.ctor.apply(this,arguments)}var r=t.viz.core,e={easing:"linear",duration:150},i={x:-1e4,y:-1e4},u=function(n,t,i,r){var u=n.animation;u&&(u.options.complete=null,u.stop()),i?n.animate(t,{complete:r}):(n.attr(t),r&&r())};r.LoadIndicator=f,f.prototype={ctor:function(t,i){var r=this;r._$widgetContainer=n(i),r._$container=n("<div>",{css:{position:"relative",height:0,padding:0,margin:0,border:0}}).appendTo(r._$widgetContainer),r._updateContainer(),r.applyOptions(t),r._endLoadingCompleteHandler=function(){r._endLoad=!1,r._externalComplete&&r._externalComplete(),r._externalComplete=null,r._onCompleteAction&&r[r._onCompleteAction](),r._onCompleteAction=null},r._$container.hide()},_updateRenderer:function(n,t,i){var u=this;return u._renderer?u._renderer.resize(n,t):u._$container.get(0)&&(u._renderer=r.CoreFactory.createRenderer({width:n,height:t,animation:e}),u._renderer.draw(u._$container[0])),u._renderer&&this._renderer.root.css({position:"absolute",top:i,left:0}),u._renderer},applyOptions:function(n,t,i){var u=this,f=u._pane;f&&n&&("backgroundColor"in n&&f.rect.attr({fill:n.backgroundColor}),f.text.css(r.utils.patchFontOptions(n.font)).attr({text:n.text})),u.isShown&&(t||i)&&u._updateContainer(t,i)},_draw:function(){var t,n=this._renderer;n&&(t=this._pane={},t.rect=n.rect(0,0,0,0).attr({opacity:0}).append(n.root),t.text=n.text("",0,0).attr({align:"center",translateX:i.x,translateY:i.y}).append(n.root))},_updateContainer:function(n,t){var i=this,r=i._$widgetContainer,u;n=n||r.width(),t=t||r.height(),u=r.get(0)?r.offset().top-i._$container.offset().top:-t,i._updateRenderer(n,t,u),i._pane?(i._pane.rect.attr({width:n,height:t}),i._pane.text.move(n/2,t/2)):i._draw()},dispose:function(){var n=this;n._$widgetContainer=null,n._$container.remove().detach(),n._$container=null,n._renderer.dispose(),n._renderer=null,n._pane=null},toForeground:function(){this._$container.appendTo(this._$widgetContainer)},show:function(n,t){var i=this;if(i._endLoad){i._onCompleteAction="show";return}i._$container.show(),i._updateContainer(n,t),u(i._pane.rect,{opacity:.85},!0),i.isShown=!0},endLoading:function(n,t){var i=this;(i._externalComplete=n,i._endLoad)||(i.isShown?(i._endLoad=!0,u(i._pane.rect,{opacity:1},!t,i._endLoadingCompleteHandler)):n&&n())},hide:function(){var n=this;if(n._endLoad){n._onCompleteAction="hide";return}n.isShown&&(n._pane.text.move(i.x,i.y),u(n._pane.rect,{opacity:0},!0,function(){n._$container.hide()}),n.isShown=!1)}}}(jQuery,DevExpress),function(n,t,i){var f=20,s=10,p=t.formatHelper,a=t.viz.core,w=15,v=Math.max,r=Math.round,y=t.utils.isFunction,u=t.utils.isDefined,h=n.extend,b={argument:["argumentFormat","argumentPrecision"],percent:["percent","percentPrecision"],value:["format","precision"]},c={visibility:"visible"},l={visibility:"hidden"},e="left",o="right";a.Tooltip=t.Class.inherit({ctor:function(t,i,r){var u=this;u._state={},u._options={},u._renderer=r,u._group=i,u._cloud=r.path([],"area"),u._textGroup=r.g(),n.isEmptyObject(t)||u.update(t),u._createTextContent()},dispose:function(){var n=this;return n.off(),n._shadow.dispose(),n._shadow=n._cloud=n._text=n._group=n._options=n._renderer=n._tooltipTextArray=n._textGroup=null,n},update:function(n){n=n||{};var t=this,u=t._group,r=n.shadow||{},f=t._shadow=t._shadow||t._renderer.shadowFilter("-50%","-50%","200%","200%",r.offsetX,r.offsetY,r.blur,r.color,r.opacity),i=n.border,e=h({opacity:n.opacity,filter:f.ref},i&&i.visible?{"stroke-width":i.width,stroke:i.color,"stroke-opacity":i.opacity,dashStyle:i.dashStyle}:{"stroke-width":null,stroke:null}),o=h({},{align:"center"},n.text);return t._options=n,t._textFontStyles=a.utils.patchFontOptions(n.font),t.setSize(n.canvasWidth,n.canvasHeight),t._customizeTooltip=y(n.customizeTooltip)?n.customizeTooltip:null,!t._customizeTooltip&&y(n.customizeText)&&(t._customizeTooltip=function(){return{text:n.customizeText.apply(this,arguments)}}),t._cloud.attr(e).append(u),t._text&&t._text.css(t._textFontStyles),t._textGroup.attr(o).css(t._textFontStyles).append(u),t.hide(),t},formatValue:function(n,t){var i=b[t||"value"],r=i[0]in this._options?this._options[i[0]]:t;return p.format(n,r,this._options[i[1]]||0)},getLocation:function(){return(this._options.location+"").toLowerCase()},prepare:function(t,i,r){var s=this,o=s._options,c=t[r||"valueText"]||"",f=s._state=s._state||{},e;return h(f,i),s._customizeTooltip?(e=s._customizeTooltip.call(t,t),e=n.isPlainObject(e)?e:{},"text"in e?f.text=u(e.text)?String(e.text):"":(n.isArray(c)&&(o._justify=!0,s._createTextContent(),c=c.join("<br/>")),f.text=c),f.color=e.color||o.color,f.borderColor=e.borderColor||(o.border||{}).color,f.textColor=e.fontColor||(o.font||{}).color):(f.text=c,f.color=o.color,f.borderColor=(o.border||{}).color,f.textColor=(o.font||{}).color),o._justify&&(f.text=f.text.split("<br/>")),!!f.text},enabled:function(){return!!this._options.enabled},shared:function(){return!!this._options.shared},formatColorTooltip:function(n){return n._customizeTooltip&&n._customizeTooltip.call(this,this)},_getHorizontalData:function(n,t,i,r){var f=this,l=f._state.cloudHorizontalPosition,s=f._state.x,a=f._state.y,h=s,c=[],v="center",y;return u(f._state.arrowSide)?(c=f._setArrowOnSide(n,t,i,s,a),y=f._getHorizontalInvert(n,i,s),h=y?h-n/2-i:h+n/2+i):(u(l)?l===o:n/2>s)?(c=f._setArrowLeft(n,t,i,s,a),v=e,h+=r):(u(l)?l===e:s+n/2>f._canvasWidth)?(c=f._setArrowRight(n,t,i,s,a),v=o,h-=r):c=f._setArrowCenter(n,t,i,s,a),{points:c,align:v,xt:h}},_getVerticalData:function(n,t){var r=this,f=r._state,e=f.textBBox,i=f.y,s,o;return u(r._state.arrowSide)?i+=e.height/2:(s=r._getVerticalInvert(n,t,f.y),o=t+n/2+f.offset,i=s?i+e.height/2+o:i-o+e.height/2),{yt:r._correctYTextContent(i)}},_getData:function(){var t=this,f=t._state.textBBox,i=t._options,e=i.paddingLeftRight,s=i.paddingTopBottom,h=i.arrowLength>0?i.arrowLength:0,o=f.width+e*2,r=f.height+s*2,n,u,c;return n=t._checkWidthText(o,r),n&&(t._state.textBBox=f=n.bbox,o=n.cloudWidth,r=n.cloudHeight,e=n.paddingLeftRight,s=n.paddingTopBottom),u=t._getHorizontalData(o,r,h,e),c=t._getVerticalData(r,h),{points:u.points,text:{x:u.xt,y:c.yt,align:u.align}}},_updateTextContent:function(){this._options._justify?(this._textGroup.clear(),this._calculateTextContent(),this._locateTextContent(0,0,"center")):this._text.attr({text:this._state.text}).css({fill:this._state.textColor}),this._textGroup.css({fill:this._state.textColor}),this._state.textBBox=this._textGroup.getBBox()},_correctYTextContent:function(n){var t;return this._options._justify?(this._locateTextContent(0,n,"center"),t=this._textGroup.getBBox()):(this._text.attr({y:n}),t=this._text.getBBox()),n-(t.y+t.height-n)},_adjustTextContent:function(n){this._options._justify?this._locateTextContent(n.text.x,n.text.y,n.text.align):this._text.attr({x:n.text.x,y:n.text.y,align:n.text.align})},_updateTooltip:function(){var n=this,t,r,i;r=n._getData(),n._cloud.attr({points:r.points,fill:n._state.color,"class":n._state.className,stroke:n._state.borderColor}).sharp(),n._adjustTextContent(r),t=n._group.getBBox(),t.y+t.height>n._canvasHeight?(i=(n._canvasHeight-t.y)/t.height,n._group.attr({scaleX:i,scaleY:i,translateX:n._state.x*(1-i),translateY:n._state.y*(1-i)})):n._group.attr({scaleX:1,scaleY:1,translateX:0,translateY:0})},_createTextContent:function(){var n=this;n._textGroup.clear(),n._text=null,n._options._justify||(n._text=n._renderer.text(i,0,0).css(n._textFontStyles).append(n._textGroup))},_getTextContentParams:function(){var n=this,t,r,i,u=n._state.text,e=u.length,f={width:[],height:[]};for(n._tooltipTextArray=[],t=0;t<e;t++)r=n._renderer.text(u[t],0,0).append(n._textGroup),n._tooltipTextArray.push(r),i=r.getBBox(),f.width.push(i.width);return n._lineHeight=-2*i.y-i.height,f},_locateTextContent:function(n,t,i){var s=this,h=s._tooltipTextArray,l=s._textContentWidth,v=s._options.lineSpacing,y=(v>0?v:0)+s._lineHeight,u,a,f,c=s._options._rtl;for(u=i===e?n:i===o?n-l:r(n-l/2),a=u+l,f=h.length-1;f>=0;f-=2)h[f].attr({x:c?u:a,y:t,align:c?e:o}),h[f-1]&&h[f-1].attr({x:c?a:u,y:t,align:c?o:e}),t-=y},_calculateTextContent:function(){for(var i=this,f=i._state.text,e=f.length,r,u=[],t=i._getTextContentParams(),n=0;n<e;n+=2)r=t.width[n+1]?t.width[n]+w+t.width[n+1]:t.width[n],u.push(r);i._textContentWidth=v.apply(null,u)},setSize:function(n,t){return this._canvasWidth=u(n)?n:this._canvasWidth,this._canvasHeight=u(t)?t:this._canvasHeight,this},getBBox:function(){var r=this,t=r._options,u=t.paddingLeftRight||0,f=t.paddingTopBottom||0,i=t.border.visible&&t.border.width||0,n=r._textGroup.getBBox();return n.isEmpty?n:{x:n.x-u-i/2-s,y:n.y-f-i/2-s,height:n.height+2*f+i+s*2,width:n.width+2*u+i+s*2,isEmpty:!1}},show:function(){return this._state.visibility=c,this._updateTextContent(),this.move(this._state.x,this._state.y,this._state.offset),this._cloud.attr(c),this._textGroup.attr(c),this},hide:function(){return this._state.visibility=l,this._cloud.attr(l),this._textGroup.attr(l),this},move:function(n,t,i){return this._state.x=u(n)?n:this._state.x||0,this._state.y=u(t)?t:this._state.y||0,this._state.offset=u(i)?i:this._state.offset||0,this._updateTooltip(),this},_getVerticalInvert:function(n,t,i){var r=this._state.cloudVerticalPosition;return u(r)&&r==="bottom"?n+t<this._canvasHeight-i:!(n+t<i)},_getHorizontalInvert:function(n,t,i){var r=this._state.arrowSide;return r==="right"?n+t<i:n+t>this._canvasWidth-i},_setArrowCenter:function(n,t,i,u,e){var s=this,o=s._getVerticalInvert(t,i,e),a=r(u),h=r(o?e+s._state.offset:e-s._state.offset),v=r(a+f/2),y=r(o?h+i:h-i),p=r(v+n/2-f/2),c=y,w=p,b=r(o?c+t:c-t),k=r(w-n),l=b,d=k,g=r(o?l-t:l+t),nt=r(d+n/2-f/2),tt=g;return[a,h,v,y,p,c,w,b,k,l,d,g,nt,tt]},_setArrowOnSide:function(n,t,i,u,e){var s=this,o=s._getHorizontalInvert(n,i,u),a=(t-f)/2,h=r(o?u-s._state.offset:u+s._state.offset),v=r(e),y=r(o?h-i:h+i),p=r(v-f/2),c=y,w=r(p-a),b=r(o?c-n:c+n),k=w,l=b,d=r(k+t),g=r(o?l+n:l-n),nt=d,tt=g,it=r(nt-a);return[h,v,y,p,c,w,b,k,l,d,g,nt,tt,it]},_setArrowLeft:function(n,t,i,u,e){var s=this,o=s._getVerticalInvert(t,i,e),a=r(u),h=r(o?e+s._state.offset:e-s._state.offset),v=r(a+f),y=r(o?h+i:h-i),p=r(v+n-f),c=y,w=p,b=r(o?c+t:c-t),k=r(w-n),l=b,d=k,g=r(o?l-t-i:l+t+i);return[a,h,v,y,p,c,w,b,k,l,d,g]},_setArrowRight:function(n,t,i,u,e){var s=this,o=s._getVerticalInvert(t,i,e),a=r(u),h=r(o?e+s._state.offset:e-s._state.offset),v=a,y=r(o?h+i+t:h-i-t),p=r(v-n),c=y,w=p,b=r(o?c-t:c+t),k=r(w+n-f),l=b,d=r(k+f),g=r(o?l-i:l+i);return[a,h,v,y,p,c,w,b,k,l,d,g]},_checkWidthText:function(n,t){if(!this._options._justify){var i=this._state.x,r=this._state.text,u,o=this._options.paddingLeftRight,s=this._options.paddingTopBottom,h,l,c,f,e=this._state.textBBox;if(n<i||i+n<this._canvasWidth||n/2<i&&i+n/2<this._canvasWidth)return!1;if(r.indexOf("<br/>")===-1&&r.indexOf(" ")!==-1){for(l=v(i,this._canvasWidth-i,2*Math.min(i,this._canvasWidth-i)),h=r.length*l/e.width,u=r.substr(0,~~h).lastIndexOf(" "),u===-1&&(u=r.substr(0).indexOf(" ")),c=r.substr(u+1).length,this._state.text=r.substr(0,u)+"<br/>";h<=c;)if(f=r.substr(u+1,~~h).lastIndexOf(" "),f===-1&&(f=r.substr(u+1).indexOf(" ")),f!==-1)this._state.text+=r.substr(u+1,f)+"<br/>",c=r.substr(u+1+f).length,u+=f+1;else break;this._state.text+=r.substr(u+1),this._text.attr({text:this._state.text}),e=this._text.getBBox(),n=e.width+o*2,t=e.height+s*2}return n>i&&i+n>this._canvasWidth&&(n/2>i||i+n/2>this._canvasWidth)&&(o=5,s=5,n=e.width+2*o,t=e.height+2*s),{bbox:e,cloudWidth:n,cloudHeight:t,paddingTopBottom:s,paddingLeftRight:o}}},on:function(){var t=n(this._group.element);return t.on.apply(t,arguments),this},off:function(){return n(this._group.element).off(),this}})}(jQuery,DevExpress),function(n,t,i){function st(n,t,i,r){if(t&&t[i]){var f=t[i].hatching.direction,e,o=t[i].fill;return r=o===a?r:o,f=!f||f===a?u:f,e=ut({},t[i].hatching,{direction:f,step:wt,width:pt}),n.pattern(r,e)}}function ii(n){var t=n.margin;t>=0?(t=r(n.margin),t={top:t,bottom:t,left:t,right:t}):t={top:t.top>=0?r(t.top):w,bottom:t.bottom>=0?r(t.bottom):w,left:t.left>=0?r(t.left):w,right:t.right>=0?r(t.right):w},n.margin=t}function ht(n,t,i,r){return n<t?i*t+r:i+r*n}function ri(n){var i=0,r=0,t;return k(n,function(n,u){t=u.bbox,t.width>i&&(i=t.width),t.height>r&&(r=t.height)}),{width:i,height:r}}function ui(n,t,i,r){for(var a,d=n.rows,g=n.cols,s,e,o=0,v=0,h,l=r.columnItemSpacing,w=r.rowItemSpacing,b,k,y,p=0;p<d;p++){for(b=n.itemsAlignmentDelta[p],a=0;a<g;a++){if(s=t[ht(d,g,p,a)],!s)break;e=s.bbox,h=n.maxWidthPerColumn[a]||e.width,i===u?(k=o-e.x,y=o-l/2):i===c?(k=e.x+h-e.width+o-l/2,y=e.x+h-e.width+o-l/2):(k=o-e.x-e.width/2+h/2,y=o-l/2),s.group.move(f(k+b),f(v)),s.tracker.left=y+b,s.tracker.top=v+e.y-w/2,s.tracker.bottom=v+e.y-w/2+n.maxHeightRow+w,s.tracker.right=y+b+h+l,o=o+h+l}v=v+n.maxHeightRow+w,o=0}}function fi(n,t){var e=t.orientation===y,i=t.rowCount>0?r(t.rowCount):0,u=t.columnCount>0?r(t.columnCount):0,o=f(n/i),s=f(n/u),h=!1;return u&&!i?i=s:!u&&i?u=o:u&&i?e&&u<o?u=o:!e&&i<s&&(i=s):(h=!0,e?(i=1,u=n):(u=1,i=n)),{rows:i,columns:u,autoEdit:h}}function ei(n,t,i,r,f){var y=7,p=4,o=0,h=0,w,a,e=n.getBBox(),b=s(f/2-(e.y+e.height/2)),k=s(f/2-(e.x+e.width/2));switch(i.itemTextPosition){case c:h=b,w=e.width+y;break;case u:o=f+y,h=b;break;case v:o=k,a=e.y+e.height+p;break;case l:o=k,a=e.y-r-p}n.attr({x:o,y:h}),t.attr({translateX:w,translateY:a})}function oi(n,t,i){return n===u?t-i:n===o?(t-i)/2:0}function si(n,t,i,r){for(var f,l=r.columnItemSpacing,a=r.itemsAlignment,s=[],o=[],h=[],c=0,e,u=0;u<i;u++)o[u]=0;for(f=0;f<t;f++){for(s[f]=h[f]=0,u=0;u<i;u++)e=n[ht(t,i,f,u)],e&&(e=e.bbox,c<e.height&&(c=e.height),o[u]<e.width&&(o[u]=e.width),s[f]+=e.width+l);s[f]-=l}if(a){for(e=b.apply(null,s),f=0;f<t;++f)h[f]=oi(a,e,s[f]);o=[]}else if(r.equalColumnWidth)for(e=b.apply(null,o),u=0;u<i;++u)o[u]=e;return{rows:t,cols:i,maxWidthPerColumn:o,maxHeightRow:c,itemsAlignmentDelta:h}}function ct(n,t){return n<1||n>t?t:n}function d(n,t,i,r){var u=t&&i[t[n]];u&&u.marker.attr(u.states[r])}function hi(n,i){return n?(ii(n),n.horizontalAlignment=bt(n.horizontalAlignment,u),n.verticalAlignment=kt(n.verticalAlignment,n.horizontalAlignment===o?l:v),n.orientation=dt(n.orientation,n.horizontalAlignment===o?y:ft),n.itemTextPosition=gt(n.itemTextPosition,n.orientation===y?l:u),n.position=ni(n.position,ot),n.itemsAlignment=ti(n.itemsAlignment,null),n.hoverMode=nt(n.hoverMode||"").toLowerCase(),n.customizeText=rt(n.customizeText)?n.customizeText:function(){return this[i]},n.customizeHint=rt(n.customizeHint)?n.customizeHint:t.noop,n):null}function ci(n,t){return n.rect(0,0,t,t)}function li(n,t){return n.circle(t/2,t/2,t/2)}function lt(n){return nt(n).toLowerCase()==="circle"}function ai(n){return lt(n)?li:ci}function vi(n){return lt(n)?pi:yi}function yi(n,t,i){var r=f((i-t)/2);n.attr({width:t,height:t,x:r,y:r})}function pi(n,t){n.attr({r:f(t/2)})}function wi(n,t,i){return t>=n.left&&t<=n.right&&i>=n.top&&i<=n.bottom}function bi(n,t,i){k(t,function(t,r){i(r.marker,r.size,n)})}var g=n.viz.core,e=g.utils,r=Number,nt=String,p=Math,s=p.round,f=p.ceil,tt=p.floor,b=p.max,it=n.utils,vt=it.isDefined,rt=it.isFunction,h=e.decreaseGaps,ut=t.extend,k=t.each,yt=t.map,w=10,pt=2,wt=5,o="center",u="right",c="left",v="top",l="bottom",y="horizontal",ft="vertical",et="inside",ot="outside",a="none",bt=e.enumParser([c,o,u]),kt=e.enumParser([v,l]),dt=e.enumParser([ft,y]),gt=e.enumParser([c,u,v,l]),ni=e.enumParser([ot,et]),ti=e.enumParser([c,o,u]),at=n.viz.core.Legend=function(n){var t=this;t._renderer=n.renderer,t._legendGroup=n.group,t._backgroundClass=n.backgroundClass,t._itemGroupClass=n.itemGroupClass,t._textField=n.textField,t._getCustomizeObject=n.getFormatObject,t._patterns=[]};at.prototype={constructor:at,update:function(n,t){var i=this;return i._data=n,i._boundingRect={width:0,height:0,x:0,y:0},i._options=hi(t,i._textField),i},setSize:function(n){return this._size={width:n.width,height:n.height},this},draw:function(n){var t=this,u=t._options,f=t._renderer,l,e,o=0,s,a=[],v,h,c=0;if(n&&(t._size={width:n.width,height:n.height}),!(u&&u.visible&&t._data&&t._data.length))return t;for(t.erase(),h=u.markerType,s=u.markerSize,t._insideLegendGroup=f.g().append(t._legendGroup),t._createBackground(),l=ai(h),v=vi(h),t._markersId={},e=t._data,u.inverted&&(e=e.slice().reverse()),k(e,function(n,t){o=b(o,r(t.size>0?t.size:s))});c<t._patterns.length;c++)t._patterns[c].dispose();return t._patterns=[],t._items=yt(e,function(n,e){var h=f.g().attr({"class":t._itemGroupClass}).append(t._insideLegendGroup),k=r(n.size>0?n.size:s),v=n.states,d=v.normal,c=d.fill,y=l(f,o).attr({fill:c||u.markerColor,opacity:d.opacity}).append(h),g=t._createLabel(n,h),p=st(f,v,"hover",c),w=st(f,v,"selection",c),b={normal:{fill:c}};return p&&(b.hovered={fill:p.id},t._patterns.push(p)),w&&(b.selected={fill:w.id},t._patterns.push(w)),n.id!==i&&(t._markersId[n.id]=e),ei(g,y,u,k,o),a.push({size:k,marker:y}),t._createHint(n,g),{group:h,marker:y,tracker:{id:n.id},states:b,bbox:h.getBBox()}}),t._locateElements(u),bi(o,a,v),t._finalUpdate(u),t},_finalUpdate:function(n){this._adjustBackgroundSettings(n),this._setBoundingRect(n.margin)},erase:function(){var n=this;return n._insideLegendGroup&&n._insideLegendGroup.remove(),n._insideLegendGroup=n._width=n._height=n._x=n._y=null,n},_locateElements:function(n){this._moveInInitialValues(),this._locateRowsColumns(n)},_moveInInitialValues:function(){var n=this;n._legendGroup&&n._legendGroup.move(0,0),n._background&&n._background.attr({x:0,y:0,width:0,height:0})},applySelected:function(n){return d(n,this._markersId,this._items,"selected"),this},applyHover:function(n){return d(n,this._markersId,this._items,"hovered"),this},resetItem:function(n){return d(n,this._markersId,this._items,"normal"),this},_createLabel:function(n,t){var i=this._options.itemTextPosition,u=i===v||i===l?o:c,r=this._getCustomizeObject(n),f=this._options.customizeText.call(r,r);return this._renderer.text(f,0,0).css(g.utils.patchFontOptions(this._options.font)).attr({align:u}).append(t)},_createHint:function(n,t){var r=this._getCustomizeObject(n),i=this._options.customizeHint.call(r,r);vt(i)&&i!==""&&t.setTitle(i)},_createBackground:function(){var n=this,r=n._options.position===et,i=n._options.backgroundColor,u=i||(r?n._options.containerBackgroundColor:a),t=n._options.border,f=t.visible&&t.width&&t.color&&t.color!==a;(f||(r||i)&&i!==a)&&(n._background=n._renderer.rect(0,0,0,0).attr({fill:u,"class":n._backgroundClass}).append(n._insideLegendGroup))},_moveRowsColumns:function(n,t,i){var r=si(this._items,n,t,i);ui(r,this._items,i.itemTextPosition,i)},_locateRowsColumns:function(n){var t=this,u=t._data.length,o,s=fi(u,n),i=s.rows,r=s.columns,e=n.margin,a=t._background?n.paddingLeftRight:0,v=t._background?n.paddingTopBottom:0,h=t._size.width-e.left-e.right-2*a,c=t._size.height-e.top-e.bottom-2*v,l=ri(t._items);t._moveRowsColumns(i,r,n),o=t._insideLegendGroup.getBBox(),s.autoEdit&&(i===1?o.width>h&&r>1&&(r=tt(h/(l.width+n.columnItemSpacing))||1,r=ct(r,u),i=f(u/r),t._moveRowsColumns(i,r,n)):r===1&&o.height>c&&i>1&&(i=tt(c/(l.height+n.rowItemSpacing))||1,i=ct(i,u),r=f(u/i),t._moveRowsColumns(i,r,n))),t._rowsCountDrawed=i,t._columnsCountDrawed=r},_adjustBackgroundSettings:function(n){if(this._background){var t=n.border,r=this._insideLegendGroup.getBBox(),i={x:s(r.x-n.paddingLeftRight),y:s(r.y-n.paddingTopBottom),width:s(r.width)+2*n.paddingLeftRight,height:s(r.height)+2*n.paddingTopBottom,opacity:n.backgroundOpacity};t.visible&&t.width&&t.color&&t.color!==a&&(i["stroke-width"]=t.width,i.stroke=t.color,i["stroke-opacity"]=t.opacity,i.dashStyle=t.dashStyle,i.rx=t.cornerRadius||0,i.ry=t.cornerRadius||0),this._background.attr(i)}},_setBoundingRect:function(n){if(this._insideLegendGroup){var t=this._insideLegendGroup.getBBox();t.height+=n.top+n.bottom,t.width+=n.left+n.right,t.x-=n.left,t.y-=n.top,this._boundingRect=t}},changeSize:function(){this.fit.apply(this,arguments)},fit:function(n){var t=this,r=n.width,u=n.height,i=ut(!0,{},t._options),f=i.margin;return u>=0&&(u=h(f,["top","bottom"],u),i.border.visible&&(u=2*h(i,["paddingTopBottom"],u/2)),t._rowsCountDrawed-1&&(u=(t._rowsCountDrawed-1)*h(i,["rowItemSpacing"],u/(t._rowsCountDrawed-1)))),r>=0&&(r=h(f,["left","right"],r),i.border.visible&&(r=2*h(i,["paddingLeftRight"],r/2)),t._columnsCountDrawed-1&&(r=(t._columnsCountDrawed-1)*h(i,["columnItemSpacing"],r/(t._columnsCountDrawed-1)))),t._insideLegendGroup&&(r>0||u>0?(t._options._incidentOccured("W2104"),t.erase()):(t._locateElements(i),t._finalUpdate(i))),t},getActionCallback:function(n){var i=this;return i._options.visible?function(t){var u=n.type,r=u||n.series.type;(u||r==="pie"||r==="doughnut"||r==="donut")&&i[t]&&i[t](n.index)}:t.noop},getLayoutOptions:function(){var n=this._options,t=this._insideLegendGroup?this._boundingRect:{width:0,height:0,x:0,y:0};return n?(t.verticalAlignment=n.verticalAlignment,t.horizontalAlignment=n.horizontalAlignment,t.cutLayoutSide=n.orientation===y?n.verticalAlignment:n.horizontalAlignment===o?n.verticalAlignment:n.horizontalAlignment,t):null},shift:function(n,t){var i=this,r=i.getLayoutOptions(),u={translateX:n-r.x,translateY:t-r.y};return i._insideLegendGroup&&i._insideLegendGroup.attr(u),i._width=r.width,i._height=r.height,i._x=n,i._y=t,i},getPosition:function(){return this._options.position},coordsIn:function(n,t){return n>=this._x&&n<=this._x+this._width&&t>=this._y&&t<=this._y+this._height},getItemByCoord:function(n,t){var r=this._items,u=this._insideLegendGroup,i;for(n=n-u.attr("translateX"),t=t-u.attr("translateY"),i=0;i<r.length;i++)if(wi(r[i].tracker,n,t))return r[i].tracker;return null},dispose:function(){var n=this;return n._legendGroup=n._insideLegendGroup=n._renderer=n._options=n._data=n._items=null,n}}}(DevExpress,jQuery),function(n,t,i){function o(n,t){return t<n}function c(n,t){return t>n}function w(n,t,i,r){var u=f(t);f(n)?u&&r(n,t)&&i(t):u&&i(t)}function k(n){return n}function d(n){return n.valueOf()}function g(n,t,i){var o=n.length,f,r,u,e=i==="datetime"?d:k;if(t&&t.length)for(r=0;r<t.length;r++){for(u=0,f=!1;u<o;u++)if(e(n[u])===e(t[r])){f=!0;break}f||n.push(t[r])}return n}var b=t.viz.core,l=t.utils,f=l.isDefined,v=l.isDate,nt=1,tt=6e4,r="min",u="max",s="minVisible",h="maxVisible",e="categories",y="base",p="axisType",a;a=b.Range=function(t){t&&n.extend(this,t)},a.prototype={constructor:a,dispose:function(){this[e]=null},addRange:function(n){var t=this,k=t[e],d=n[e],v=function(i,r){w(t[i],n[i],function(n){t[i]=n},r)},b=function(n,i,r){w(t[n],t[i],function(i){f(t[n])&&(t[n]=i)},r)},a=function(i){t[i]=t[i]||n[i]};return l.isDefined(n.stick)&&(t.stick=n.stick),a("addSpiderCategory"),a("percentStick"),a("minSpaceCorrection"),a("maxSpaceCorrection"),a("invert"),a(p),a("dataType"),a("startCategories"),a("endCategories"),t[p]==="logarithmic"?a(y):t[y]=i,v(r,o),v(u,c),v(s,o),v(h,c),v("interval",o),b(r,s,o),b(r,h,o),b(u,h,c),b(u,s,c),t[e]=k===i?d:g(k,d,t.dataType),this},isDefined:function(){return f(this[r])&&f(this[u])||f(this[e])},setStubData:function(n){var t=this,i=(new Date).getYear()-1,f=n==="datetime",e=t.axisType==="discrete";return e?t.categories=["0","1","2"]:(t[r]=f?new Date(i,0,1):0,t[u]=f?new Date(i,11,31):10),t.stubData=!0,t},correctValueZeroLevel:function(){function t(t,i){n[t]<0&&n[i]<0&&(n[i]=0),n[t]>0&&n[i]>0&&(n[t]=0)}var n=this;return v(n[u])||v(n[r])?n:(t(r,u),t(s,h),n)},checkZeroStick:function(){var n=this;return n.min>=0&&n.max>=0?n.minStickValue=0:n.min<=0&&n.max<=0&&(n.maxStickValue=0),n}}}(jQuery,DevExpress),function(n,t){function u(n){return n!==null&&n!==undefined}function ni(n){return Object.prototype.toString.call(n)==="[object Array]"}function ot(n){return Object.prototype.toString.call(n)==="[object Object]"}function d(n){return t.createElementNS("http://www.w3.org/2000/svg",n)}function g(n,t){return n!==null?"url("+(t?window.location.href:"")+"#"+n+")":""}function i(n,t,i){var r,u;for(u in t)r=t[u],(!i||i&&r!==undefined&&r!==null)&&(n[u]=r);return n}function ti(n){var i=o(n.x),r=o(n.y),e=rt(n.width+n.x),h=rt(n.height+n.y),u,f,t={};return t.x=i<s&&i>-s?i:0,t.y=r<s&&r>-s?r:0,u=e-i,f=h-r,t.width=u<s&&u>-s?u:0,t.height=f<s&&f>-s?f:0,t.isEmpty=!t.x&&!t.y&&!t.width&&!t.height,t}function ii(n){return{full:"none",lefttop:"xMinYMin",leftcenter:"xMinYMid",leftbottom:"xMinYMax",centertop:"xMidYMin",center:"xMidYMid",centerbottom:"xMidYMax",righttop:"xMaxYMin",rightcenter:"xMaxYMid",rightbottom:"xMaxYMax"}[(n||"").toLowerCase()]||"none"}function ri(n,t,i,u,f,e,o,s,h,c){return["M",(n+u*f).toFixed(r),(t-u*e).toFixed(r),"A",u.toFixed(r),u.toFixed(r),0,c,0,(n+u*o).toFixed(r),(t-u*s).toFixed(r),h?"M":"L",(n+i*o).toFixed(5),(t-i*s).toFixed(r),"A",i.toFixed(r),i.toFixed(r),0,c,1,(n+i*f).toFixed(r),(t-i*e).toFixed(r),"Z"].join(" ")}function st(n,t){var i=[["M",0,0]];switch(t){case"line":i=ht(n);break;case"area":i=ht(n,!0);break;case"bezier":i=ct(n);break;case"bezierarea":i=ct(n,!0)}return i}function ht(n,t){return lt(n,ui,t)}function ct(n,t){return lt(n,fi,t)}function lt(n,t,i){var u=0,f=(n||[]).length,r=[];if(ni(n[0]))for(;u<f;)t(n[u++],i,r);else t(n,i,r);return r}function ui(n,t,i){var r=0,u=(n||[]).length;if(u)if(ot(n[0]))for(;r<u;)i.push([r?"L":"M",n[r].x,n[r++].y]);else for(;r<u;)i.push([r?"L":"M",n[r++],n[r++]]);else i.push(["M",0,0]);return t&&i.push(["Z"]),i}function fi(n,t,i){var r=2,u=(n||[]).length;if(u)if(ot(n[0]))for(r=1,i.push(["M",n[0].x,n[0].y]);r<u;)i.push(["C",n[r].x,n[r++].y,n[r].x,n[r++].y,n[r].x,n[r++].y]);else for(i.push(["M",n[0],n[1]]);r<u;)i.push(["C",n[r++],n[r++],n[r++],n[r++],n[r++],n[r++]]);else i.push(["M",0,0]);return t&&i.push(["Z"]),i}function ei(n){for(var i=[],t=0,r=n.length;t<r;t++)i.push(n[t].join(" "));return i.join(" ")}function oi(n,t,i){var u=n.length,f=t.length,r,e,o=i.indexOf("area")!==-1?hi:si;if(u===0)for(r=0;r<f;r++)n.push(t[r].slice(0));else u<f?o(n,t,i):u>f&&(e=t.slice(0),o(t,n,i));return e}function nt(n,t){var i=n[n.length-2],r=n[n.length-1];switch(t){case"line":case"area":n[0]="L";break;case"bezier":case"bezierarea":n[0]="C",n[1]=n[3]=n[5]=i,n[2]=n[4]=n[6]=r}}function si(n,t,i){var u=n[n.length-1].slice(),r=n.length;for(nt(u,i);r<t.length;r++)n[r]=u.slice(0)}function hi(n,t,i){var u,f,s=n.length,h=t.length,e,o,r;if((s-1)%2==0&&(h-1)%2==0)for(u=(s-1)/2-1,f=n.slice(0,u+1),e=f[f.length-1].slice(0),o=n.slice(u+1)[0].slice(0),nt(e,i),nt(o,i),r=u;r<(h-1)/2-1;r++)n.splice(r+1,0,e),n.splice(r+3,0,o)}function tt(n){var u=this._styles,f="",r,t;i(u,n||{},!0);for(r in u)(t=u[r],t!=="")&&(typeof t!="number"||gt[r]||(t+="px"),f+=r+":"+t+";");return f&&this.element.setAttribute("style",f),this}function c(n){n=n||{};var u=this,f=u._settings,o={},r,t,c=u.element,l=u.renderer,a=l.rtl,s,h,v,e;if(typeof n=="string")return n in f?f[n]:n in et?et[n]:0;i(o,n);for(r in o)if(t=o[r],t!==undefined){if(f[r]=t,r==="align")r="text-anchor",t={left:a?"end":"start",center:"middle",right:a?"start":"end"}[t]||"";else if(r==="dashStyle"){h=!0;continue}else if(r==="stroke-width")h=!0;else if(r==="clipId")r="clip-path",t=g(t,l.pathModified);else if(/^(translate(X|Y)|rotate[XY]?|scale(X|Y)|sharp)$/i.test(r)){s=!0;continue}else/^(x|y)$/i.test(r)&&(s=!0);t===null?c.removeAttribute(r):c.setAttribute(r,t)}if(h&&"dashStyle"in f)if(t=f.dashStyle,v=("_originalSW"in u?u._originalSW:f["stroke-width"])||1,r="stroke-dasharray",t=t===null?"":t.toLowerCase(),t===""||t==="solid"||t==="none")u.element.removeAttribute(r);else{for(t=t.replace(/longdash/g,"8,3,").replace(/dash/g,"4,3,").replace(/dot/g,"1,3,").replace(/,$/,"").split(","),e=t.length;e--;)t[e]=b(t[e])*v;u.element.setAttribute(r,t.join(","))}return s&&u._applyTransformation(),u}function at(n){return function(t,r){var f=this,u;return typeof t!="string"&&(t=i({},t),u=t.segments,"points"in t&&(u=st(t.points,f.type),delete t.points),u&&(t.d=ei(u),f.segments=u,delete t.segments)),n.call(f,t,r)}}function vt(n,t){return function(r,u){var e=this._settings,o,s,h,c,l,a;return typeof r!="string"&&(r=i({},r),("x"in r||"y"in r||"innerRadius"in r||"outerRadius"in r||"startAngle"in r||"endAngle"in r)&&(e.x=o="x"in r?r.x:e.x,delete r.x,e.y=s="y"in r?r.y:e.y,delete r.y,e.innerRadius=h="innerRadius"in r?r.innerRadius:e.innerRadius,delete r.innerRadius,e.outerRadius=c="outerRadius"in r?r.outerRadius:e.outerRadius,delete r.outerRadius,e.startAngle=l="startAngle"in r?r.startAngle:e.startAngle,delete r.startAngle,e.endAngle=a="endAngle"in r?r.endAngle:e.endAngle,delete r.endAngle,r.d=t.apply(this,f._normalizeArcParams(o,s,h,c,l,a)))),n.call(this,r,u)}}function yt(n){return function(t,r){var u=this,c,l,s,h,e,a,f;return typeof t!="string"&&(t=i({},t),r||t.x===undefined&&t.y===undefined&&t.width===undefined&&t.height===undefined&&t["stroke-width"]===undefined||(c=t.x!==undefined?u._originalX=o(t.x):u._originalX||0,l=t.y!==undefined?u._originalY=o(t.y):u._originalY||0,s=t.width!==undefined?u._originalWidth=o(t.width):u._originalWidth||0,h=t.height!==undefined?u._originalHeight=o(t.height):u._originalHeight||0,e=t["stroke-width"]!==undefined?u._originalSW=o(t["stroke-width"]):u._originalSW,a=~~((s<h?s:h)/2),f=(e||0)<a?e||0:a,t.x=c+f/2,t.y=l+f/2,t.width=s-f,t.height=h-f,(e||0)===f&&f===0&&e===undefined||(t["stroke-width"]=f)),"sharp"in t&&delete t.sharp),n.call(u,t,r)}}function vi(n){var r=this,t,f,o,e;return typeof n=="string"?c.call(r,n):(n=i({},n),t=r._settings,o=u(t.stroke)&&u(t["stroke-width"]),n.text!==undefined&&(t.text=n.text,delete n.text,f=!0),n.stroke!==undefined&&(t.stroke=n.stroke,delete n.stroke),n["stroke-width"]!==undefined&&(t["stroke-width"]=n["stroke-width"],delete n["stroke-width"]),n["stroke-opacity"]!==undefined&&(t["stroke-opacity"]=n["stroke-opacity"],delete n["stroke-opacity"]),e=u(t.stroke)&&u(t["stroke-width"]),c.call(r,n),f=f||e!==o&&t.text,f&&ki(r,t.text,e),(f||n.x!==undefined||n.y!==undefined)&&bt(r),e&&di(r),r)}function yi(n){return n=n||{},tt.call(this,n),"font-size"in n&&bt(this),this}function pt(n,t,r){var s=t.params=t.params||{style:{}},u=s.style,e=t.parentNode&&t.parentNode.params&&t.parentNode.params.style||{},f=t.style,h=t.childNodes.length,o=0;t.nodeName!=="#text"&&i(u,e);switch(t.tagName){case"B":case"STRONG":u["font-weight"]="bold";break;case"I":case"EM":u["font-style"]="italic";break;case"U":u["text-decoration"]="underline";break;case"BR":n++}for(f&&(f.fontSize&&(u["font-size"]=(b(f.fontSize,10)||u["font-size"])+"px"),u.fill=f.color||u.fill,u["font-style"]=f.fontStyle||u["font-style"],u["font-weight"]=f.fontWeight||u["font-weight"],u["text-decoration"]=f.textDecoration||u["text-decoration"]);o!==h;)n=pt(n,t.childNodes[o++],r);return t.wholeText!==undefined&&(i(u,e),r.push({value:t.wholeText,style:u,line:n,height:b(u["font-size"],10)||0})),n}function pi(n){for(var t=n[0],i,r=1,u=n.length;r<u;++r)i=n[r],i.line===t.line?(t.height=w(t.height,i.height),t.inherits=t.inherits||i.height===0,i.height=NaN):t=i}function wi(n){var i=[],r=t.createElement("div");return r.innerHTML=n.replace(/\r/g,"").replace(/\n/g,"<br/>"),pt(0,r,i),pi(i),i}function bi(n){for(var i=n.replace(/\r/g,"").split("\n"),t=0,r=[];t<i.length;t++)r.push({value:i[t],height:0});return r}function wt(n,i,r){for(var u,f=0,e=n.length;f<e;++f)u=n[f],u[r]=d("tspan"),u[r].appendChild(t.createTextNode(u.value)),u.style&&tt.call({element:u[r],_styles:{}},u.style),i.appendChild(u[r])}function ki(n,i,r){var u;(n._texts=null,n.clear(),i!==null)&&(i=""+i,i.indexOf("<")!==-1||i.indexOf("&")!==-1?u=wi(i):i.indexOf("\n")!==-1?u=bi(i):r&&(u=[{value:i,height:0}]),u?(n._texts=u,r&&wt(u,n.element,"stroke"),wt(u,n.element,"tspan")):n.element.appendChild(t.createTextNode(i)))}function y(n,t,i){n.tspan.setAttribute(t,i),n.stroke&&n.stroke.setAttribute(t,i)}function bt(n){if(n._texts){var r=n._texts,u=n._settings.x,f=n._styles["font-size"]||12,i,e,t=r[0];for(y(t,"x",u),y(t,"y",n._settings.y),i=1,e=r.length;i<e;++i)t=r[i],t.height>=0&&(y(t,"x",u),y(t,"dy",t.inherits?w(t.height,f):t.height||f))}}function di(n){if(n._texts)for(var r=n._texts,f=n._settings.stroke,e=n._settings["stroke-width"],o=n._settings["stroke-opacity"]||1,t,i=0,u=r.length;i<u;++i)t=r[i].stroke,t.setAttribute("stroke",f),t.setAttribute("stroke-width",e),t.setAttribute("stroke-opacity",o),t.setAttribute("stroke-linejoin","round")}function it(n,t,r){t=t||{};var f=this,u,o,h=f.renderer,s=f._settings,e={},c={translateX:0,translateY:0,scaleX:1,scaleY:1,rotate:0,rotateX:0,rotateY:0};if(r&&(t.complete=r),h.animationEnabled()){for(u in n)o=n[u],/^(translate(X|Y)|rotate[XY]?|scale(X|Y))$/i.test(u)?(e.transform=e.transform||{from:{},to:{}},e.transform.from[u]=u in s?s[u]:c[u],e.transform.to[u]=o):e[u]=u==="arc"||u==="segments"?o:{from:u in s?s[u]:parseFloat(f.element.getAttribute(u)||0),to:o};h.animateElement(f,e,i(i({},h.animOptions),t))}else t.step&&t.step.call(f,1,1),t.complete&&t.complete.call(f),f.attr(n);return f}function gi(n,t,i){var r=this,f=r.segments||[],u,e;return r.renderer.animationEnabled()&&"points"in n&&(u=st(n.points,r.type),e=oi(f,u,r.type),n.segments={from:f,to:u,end:e},delete n.points),it.call(r,n,t,i)}function nr(n,t,i){var f=this,u=f._settings,r={from:{},to:{}};return f.renderer.animationEnabled()&&("x"in n||"y"in n||"innerRadius"in n||"outerRadius"in n||"startAngle"in n||"endAngle"in n)&&(r.from.x=u.x||0,r.from.y=u.y||0,r.from.innerRadius=u.innerRadius||0,r.from.outerRadius=u.outerRadius||0,r.from.startAngle=u.startAngle||0,r.from.endAngle=u.endAngle||0,r.to.x="x"in n?n.x:u.x,delete n.x,r.to.y="y"in n?n.y:u.y,delete n.y,r.to.innerRadius="innerRadius"in n?n.innerRadius:u.innerRadius,delete n.innerRadius,r.to.outerRadius="outerRadius"in n?n.outerRadius:u.outerRadius,delete n.outerRadius,r.to.startAngle="startAngle"in n?n.startAngle:u.startAngle,delete n.startAngle,r.to.endAngle="endAngle"in n?n.endAngle:u.endAngle,delete n.endAngle,n.arc=r),it.call(f,n,t,i)}function kt(){this.ctor.apply(this,arguments)}function dt(){this.ctor.apply(this,arguments)}n.viz.renderers=n.viz.renderers||{};var f=n.viz.renderers,e=Math,p=e.min,w=e.max,rt=e.ceil,o=e.floor,ut=e.round,l=e.sin,a=e.cos,h=e.abs,v=e.PI,b=parseInt,s=1e10,ft=.5,r=5,gt={"column-count":!0,"fill-opacity":!0,"flex-grow":!0,"flex-shrink":!0,"font-weight":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,widows:!0,"z-index":!0,zoom:!0},et={scaleX:1,scaleY:1},k=function(){var n=1;return function(){return"DevExpress_"+n++}}();f._normalizeArcParams=function(n,t,i,r,u,f){var e,c,y,b,k,d,s=!0;return ut(u)!==ut(f)&&(h(f-u)%360==0&&(u=0,f=360,e=!0,f-=.0001),u>360&&(u=u%360),f>360&&(f=f%360),u>f&&(u-=360),s=!1),u=u*v/180,f=f*v/180,c=o(h(f-u)/v)%2?"1":"0",y=a(u),b=l(u),k=a(f),d=l(f),[n,t,p(r,i),w(r,i),a(u),l(u),a(f),l(f),e,o(h(f-u)/v)%2?"1":"0",s]};var ci=at(c),li=vt(c,ri),ai=yt(c);f.SvgElement=kt,kt.prototype={ctor:function(n,t,i){var r=this;r.renderer=n,r.element=d(t),r._settings={},r._styles={},t==="path"&&(r.type=i||"line"),t==="text"?(r.attr=vi,r.css=yi):t==="path"?r.type==="arc"?(r.attr=li,r.animate=nr):(r.attr=ci,r.animate=gi):t==="rect"&&(r.attr=ai,r.sharp=function(){return this})},dispose:function(){var n=this,t;n.element&&n.remove();for(t in n)n[t]=null;return null},append:function(n){return n=n||this.renderer.root,(n.element||n).appendChild(this.element),this},remove:function(){var n=this.element,t=n.parentNode;return t&&t.removeChild(n),this},clear:function(){for(var n=this.element;n.firstChild;)n.removeChild(n.firstChild);return this},toBackground:function(){var t=this.element,n=t.parentNode;return n&&n.insertBefore(t,n.firstChild),this},toForeground:function(){var n=this.element,t=n.parentNode;return t&&t.appendChild(n),this},css:tt,attr:c,sharp:function(n){return this.attr({sharp:n||!0})},_applyTransformation:function(){var n=this._settings,r,f,t=[],e,o,i=n.sharp,s=n["stroke-width"]%2,h=s&&(i==="h"||i===!0)?ft:0,c=s&&(i==="v"||i===!0)?ft:0;e="rotateX"in n?n.rotateX:n.x,o="rotateY"in n?n.rotateY:n.y,t.push("translate("+((n.translateX||0)+h)+","+((n.translateY||0)+c)+")"),n.rotate&&t.push("rotate("+n.rotate+","+(e||0)+","+(o||0)+")"),r=u(n.scaleX),f=u(n.scaleY),(r||f)&&t.push("scale("+(r?n.scaleX:1)+","+(f?n.scaleY:1)+")"),t.length&&this.element.setAttribute("transform",t.join(" "))},move:function(n,t,i,r){var f={};return u(n)&&(f.translateX=n),u(t)&&(f.translateY=t),i?this.animate(f,r):this.attr(f),this},rotate:function(n,t,i,r,f){var e={rotate:n||0};return u(t)&&(e.rotateX=t),u(i)&&(e.rotateY=i),r?this.animate(e,f):this.attr(e),this},getBBox:function(){var c=this,o=c.element,e=c._settings,s=v*(e.rotate||0)/180,u=("rotateX"in e?e.rotateX:e.x)||0,f=("rotateY"in e?e.rotateY:e.y)||0,n;try{n=o.getBBox?o.getBBox():null}catch(ut){}if(n||(n={x:0,y:0,width:o.offsetWidth||0,height:o.offsetHeight||0}),n=i({},n),s){var t=a(s).toFixed(3),r=l(s).toFixed(3),y=n.x-u,w=n.y-f,b=n.x+n.width-u,k=n.y-f,d=n.x-u,g=n.y+n.height-f,nt=n.x+n.width-u,tt=n.y+n.height-f,it,rt;it=h(n.height*r)+h(n.width*t),rt=h(n.height*t)+h(n.width*r),n.x=p(y*t-w*r+u,b*t-k*r+u,d*t-g*r+u,nt*t-tt*r+u),n.y=p(y*r+w*t+f,b*r+k*t+f,d*r+g*t+f,nt*r+tt*t+f),n.width=it,n.height=rt}return ti(n)},markup:function(){var n=t.createElement("div"),i=this.element.cloneNode(!0);return n.appendChild(i),n.innerHTML},animate:it,stopAnimation:function(n){var t=this.animation;return t&&t.stop(!0,n),this},setTitle:function(n){var t=d("title");t.textContent=n||"",this.element.appendChild(t)}},f.SvgRenderer=dt,dt.prototype={ctor:function(n){var t=this;n=n||{},t.pathModified=!!n.pathModified,t.rtl=!!n.rtl,t.cssClass=n.cssClass||"",t.root=t._createRoot(),t.resize(n.width,n.height),t._init(n)},_createElement:function(n,t,i){var r=new f.SvgElement(this,n,i);return t&&r.attr(t),r},_createRoot:function(){return this._createElement("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1","class":this.cssClass,direction:this.rtl?"rtl":"ltr",fill:"none",stroke:"none","stroke-width":0}).css({"line-height":"normal","-webkit-tap-highlight-color":"rgba(0, 0, 0, 0)",display:"block",overflow:"hidden"})},_init:function(n){var t=this;t.defs=t._createElement("defs"),t.animOptions={enabled:!0,duration:1e3,easing:"easeOutCubic"},t.updateAnimationOptions(n.animation),t.animationController=new f.AnimationController(t.root.element)},draw:function(n){var t=this;return!n||t.drawn?t:(t.root.append(n),t.defs.append(t.root),t.drawn=!0,t)},resize:function(n,t){return n>=0&&t>=0&&this.root.attr({width:n,height:t}),this},clear:function(){var n=this;return n.root.remove(),n.defs.remove(),n.drawn=null,this},dispose:function(){var n=this,t;n.root.dispose(),n.defs.dispose(),n.animationController.dispose();for(t in n)n[t]=null;return null},animationEnabled:function(){return!!this.animOptions.enabled},updateAnimationOptions:function(n){return i(this.animOptions,n),this},stopAllAnimations:function(n){return this.animationController[n?"lock":"stop"](),this},animateElement:function(n,t,i){return this.animationController.animateElement(n,t,i),this},svg:function(){return this.root.markup()},onEndAnimation:function(n){this.animationController.onEndAnimation(n)},rect:function(n,t,i,r){return this._createElement("rect",{x:n||0,y:t||0,width:i||0,height:r||0})},circle:function(n,t,i){return this._createElement("circle",{cx:n||0,cy:t||0,r:i||0})},g:function(){return this._createElement("g")},image:function(n,t,i,r,u,f){var e=this._createElement("image",{x:n||0,y:t||0,width:i||0,height:r||0,preserveAspectRatio:ii(f)});return e.element.setAttributeNS("http://www.w3.org/1999/xlink","href",u||""),e},path:function(n,t){return this._createElement("path",{points:n||[]},t)},arc:function(n,t,i,r,u,f){return this._createElement("path",{x:n||0,y:t||0,innerRadius:i||0,outerRadius:r||0,startAngle:u||0,endAngle:f||0},"arc")},text:function(n,t,i){return this._createElement("text",{text:n,x:t||0,y:i||0})},pattern:function(n,t){t=t||{};var u=this,o,h,f,c,l,r=t.step||6,i=r/2,e=r*1.5,s=(t.direction||"").toLowerCase();return s!=="right"&&s!=="left"?{id:n,append:function(){return this},clear:function(){},dispose:function(){}}:(o=k(),h=s==="right"?"M "+i+" "+-i+" L "+-i+" "+i+" M 0 "+r+" L "+r+" 0 M "+e+" "+i+" L "+i+" "+e:"M 0 0 L "+r+" "+r+" M "+-i+" "+i+" L "+i+" "+e+" M "+i+" "+-i+" L "+e+" "+i,f=u._createElement("pattern",{id:o,width:r,height:r,patternUnits:"userSpaceOnUse"}).append(u.defs),f.id=g(o,u.pathModified),c=u.rect(0,0,r,r).attr({fill:n,opacity:t.opacity}).append(f),l=u._createElement("path",{d:h,"stroke-width":t.width||1,stroke:n}).append(f),f)},clipRect:function(n,t,i,r){var u=this,e=k(),o=u._createElement("clipPath",{id:e}).append(u.defs),f=u.rect(n,t,i,r).append(o);return f.id=e,f.clipPath=o,f},shadowFilter:function(n,t,i,r,u,f,e,o,s){var l=this,a=k(),h=l._createElement("filter",{id:a,x:n||0,y:t||0,width:i||0,height:r||0}).append(l.defs),v=l._createElement("feGaussianBlur",{"in":"SourceGraphic",result:"gaussianBlurResult",stdDeviation:e||0}).append(h),y=l._createElement("feOffset",{"in":"gaussianBlurResult",result:"offsetResult",dx:u||0,dy:f||0}).append(h),p=l._createElement("feFlood",{result:"floodResult","flood-color":o||"","flood-opacity":s}).append(h),w=l._createElement("feComposite",{"in":"floodResult",in2:"offsetResult",operator:"in",result:"compositeResult"}).append(h),b=l._createElement("feComposite",{"in":"SourceGraphic",in2:"compositeResult",operator:"over"}).append(h);return h.ref=g(a,l.pathModified),h.gaussianBlur=v,h.offset=y,h.flood=p,h.composite=w,h.finalComposite=b,h.attr=function(n){var t=this,i={},r={},u={};return"x"in n&&(i.x=n.x),"y"in n&&(i.y=n.y),"width"in n&&(i.width=n.width),"height"in n&&(i.height=n.height),c.call(t,i),"blur"in n&&t.gaussianBlur.attr({stdDeviation:n.blur}),"dx"in n&&(r.dx=n.dx),"dy"in n&&(r.dy=n.dy),t.offset.attr(r),"color"in n&&(u["flood-color"]=n.color),"opacity"in n&&(u["flood-opacity"]=n.opacity),t.flood.attr(u),t},h}},f._createArcAttr=vt,f._createPathAttr=at,f._createRectAttr=yt}(DevExpress,document),function(n,t){function e(n){return n!==null&&n!==undefined}function u(n,t){for(var i in t)n[i]=t[i];return n}function h(n,t){for(var i=0;i<n.length;i++)if(t===n[i])return i;return-1}function pt(n,t,r,u,f,e,o,s,h,c,l){var a=n+u*f,v=t-u*e,y=n+u*o,p=t-u*s,w=n+r*o,b=t-r*s,k=n+r*f,d=t-r*e;return l?"m 0 0 x e":["wr",i(n-r),i(t-r),i(n+r),i(t+r),i(w),i(b),i(k),i(d),h?"wr ":"at ",i(n-u),i(t-u),i(n+u),i(t+u),i(a),i(v),i(y),i(p),"x e"].join(" ")}function b(n){var r={},t,i;for(t in w)i=n[t],i!==undefined&&(r[t]=i);return r}function k(n,t){return t=Math.ceil(parseInt(t)/2),t&&t>1&&(n.left-=t,n.top-=t,n.right+=t,n.bottom+=t),n}function wt(){for(var r=(this._settings.d||"").match(/[-0-9]+/g),t,n={},i=0;i<r.length;i++)t=parseInt(r[i]),i%2?(n.top=n.top===undefined||t<n.top?t:n.top,n.bottom=n.bottom===undefined||t>n.bottom?t:n.bottom):(n.left=n.left===undefined||t<n.left?t:n.left,n.right=n.right===undefined||t>n.right?t:n.right);return n.left=n.left||0,n.top=n.top||0,n.right=n.right||0,n.bottom=n.bottom||0,k(n,this._fullSettings["stroke-width"])}function c(n,t){var l=this.element,o=this._settings,h=this._fullSettings,i,r,s={style:{}},c,f,e;if(typeof n=="string")return n in o?o[n]:n in et?et[n]:0;for(r in n)(i=n[r],i!==undefined)&&(c=h[r],t||(o[r]=i),h[r]=i,w[r]&&(i=i===null?this._parent&&this._parent._fullSettings[r]||i:i),c!==i&&this.processAttr(l,r,i,s));for(this._applyTransformation(s),this.css(s.style),e=0;e<this._children.length;e++)f=this._children[e],f!==this._clipRect&&f.attr(u(b(this._fullSettings),f._settings),!0),f._applyStyleSheet();return t||this._applyStyleSheet(),this}function l(){for(var i=this.element,r=c.apply(this,arguments),t=0;t<i.childNodes.length;t++)i.childNodes[t].xmlns="urn:schemas-microsoft-com:vml",i.childNodes[t].style.behavior="url(#default#VML)",i.childNodes[t].style.display="inline-block";return r}function a(n,t,i,r){switch(t){case"stroke":i=i||"none",n.stroked=i==="none"?"f":"t",t+="color";break;case"fill":i=i||"none",n.filled=i==="none"?"f":"t",t+="color";break;case"stroke-width":t="strokeweight",i=i+"px";break;case"stroke-linejoin":n.stroke.joinstyle=i;return;case"stroke-linecap":n.stroke.endcap=i==="butt"?"flat":i;return;case"opacity":i=d(i),n.fill.opacity=i,n.stroke.opacity=i;return;case"fill-opacity":n.fill.opacity=d(i);return;case"stroke-opacity":n.stroke.opacity=d(i);return;case"dashStyle":i===null?n.stroke[t]="":(i=i.toLowerCase(),i=i==="solid"||i==="none"?"":i.replace(/longdash/g,"8,3,").replace(/dash/g,"4,3,").replace(/dot/g,"1,3,").replace(/,$/,""),n.stroke[t]=i);return;case"d":t="path",i=(i+"").toLowerCase().replace("z","x e").replace(/([.]\d+)/g,"");break;case"href":t="src";break;case"width":case"height":case"visibility":r.style[t]=i||"";return;case"class":t+="Name";break;case"translateX":case"translateY":case"rotate":case"rotateX":case"rotateY":case"scale":case"scaleX":case"scaleY":case"x":case"y":return}n[t]=i}function d(n){return n>=.002?n:n===null?1:.002}function bt(n){var t=document.createElement(n);return ht.appendChild(t)}function ot(n,t,i,r){if(!w[t])if(t==="visibility")r.style[t]=i||"";else if(t==="width"||t==="height")r.style[t]=i;else if(t==="clipId")this.applyClipID(i);else{if(t==="translateX"||t==="translateY"||t==="x"||t==="y")return;t==="class"?n.className=i:n[t]=i}}var s,st,v,y;n.viz.renderers=n.viz.renderers||{};var o=n.viz.renderers,f=Math,g=f.min,nt=f.max,kt=f.ceil,i=f.floor,dt=f.round,tt=f.sin,it=f.cos,gt=f.abs,ni=f.PI,p=o.SvgElement.prototype,ht=t.createDocumentFragment(),rt={behavior:"url(#default#VML)",display:"inline-block",position:"absolute"},ut={xmlns:"urn:schemas-microsoft-com:vml"},w={stroke:!0,fill:!0,opacity:!0,"stroke-width":!0,align:!0,dashStyle:!0,"stroke-opacity":!0,"fill-opacity":!0,rotate:!0,rotateX:!0,rotateY:!0},ft=function(){},r=function(){return this},ct={circle:"oval",g:"div",path:"shape",text:"span"},lt=.55+.45/2,et={scaleX:1,scaleY:1},at=o._createPathAttr(l),vt=o._createArcAttr(l,pt),yt=o._createRectAttr(l);s=function(){this.ctor.apply(this,arguments)},st={div:{processAttr:ot,attr:c,_applyTransformation:function(n){var r=n.style,i=this._settings,t=this._fullSettings;t.rotate&&(t.rotateX=t.rotateX||0,t.rotateY=t.rotateY||0),r.left=(i.x||0)+(i.translateX||0),r.top=(i.y||0)+(i.translateY||0)},_getBBox:function(){var i=Infinity,r=Infinity,u=-Infinity,f=-Infinity,e=0,n,o=this._children,s,h,t,c;if(o.length)for(;e<o.length;e++)(n=o[e],n!==this._clipRect)&&(s=n._fullSettings.translateX||0,h=n._fullSettings.translateY||0,c=n._fullSettings,t=n._getBBox(),i=g(i,t.left+s),u=nt(u,t.right+s),r=g(r,t.top+h),f=nt(f,t.bottom+h));else i=r=f=u=0;return{left:i,right:u,top:r,bottom:f}},defaultAttrs:{},defaultStyle:{position:"absolute"}},shape:{defaultAttrs:u({coordsize:"1,1","stroke-linejoin":"miter"},ut),defaultStyle:u({width:1,height:1},rt),_getBBox:wt},image:{processAttr:function(n,t,i,r){t!=="fill"&&t!=="stroke"&&a(n,t,i,r)}},oval:{processAttr:function(n,t,i,r){if(t==="cx"||t==="cy")t=t[1];else if(t==="r")i*=2,a(n,"width",i,r),t="height";else if(t==="x"||t==="y")return;a(n,t,i,r)},_getBBox:function(){var u=this.element,n=this._fullSettings,i=n.cx||0,r=n.cy||0,t=n.r||0;return k({left:i-t,top:r-t,right:i+t,bottom:r+t},n["stroke-width"]||1)}},span:{defaultAttrs:{},defaultStyle:{position:"absolute",whiteSpace:"nowrap"},processAttr:function(n,t,i,r){t==="text"?(i=e(i)?i.toString().replace(/\r/g,"").replace(/\n/g,"<br/>"):"",n.innerHTML=i,this.css({filter:""}),this._bbox=null):ot(n,t,i,r)},attr:c,_applyTransformation:function(n){var y=this,p=n.style,t=y._fullSettings,c=e(t.x)?t.x:0,l=e(t.y)?t.y:0,s=y.element.offsetHeight,v=y._bbox||y.element.getBoundingClientRect(),u=v.right-v.left,s=v.bottom-v.top,a=t.rotate,i=1,r=0,w=e(t.rotateX)?t.rotateX:c,b=e(t.rotateY)?t.rotateY:l,k,f=0,h=0,o=s*lt,d="",g={center:.5,right:1}[t.align],nt=this._styles.opacity||t.opacity||t["fill-opacity"];s&&u&&(a&&(k=a*Math.PI/180,i=it(k),r=tt(k),f=(c-w)*i-(l-b)*r+w-c,h=(c-w)*r+(l-b)*i+b-l,d='progid:DXImageTransform.Microsoft.Matrix(sizingMethod="auto expand", M11 = '+i.toFixed(5)+", M12 = "+(-r).toFixed(5)+", M21 = "+r.toFixed(5)+", M22 = "+i.toFixed(5)+")"),a<90?(h-=o*i,f-=(s-o)*r):a<180?(h+=(s-o)*i,f+=u*i-(s-o)*r):a<270?(h+=(s-o)*i+u*r,f+=u*i+o*r):(h+=u*r-o*i,f+=o*r),a&&this.renderer.rtl&&(f-=u-(s*Math.abs(r)+u*Math.abs(i))),g&&(f-=u*g*i,h-=u*g*r),e(nt)&&(d+=" progid:DXImageTransform.Microsoft.Alpha(Opacity="+nt*100+")"),c+=f,l+=h,this._bbox=v,p.filter=(p.filter||"")+d,p.left=c+(t.translateX||0),p.top=l+(t.translateY||0))},_getBBox:function(){var n=this.element,t=this._fullSettings,i=(n.parentNode&&n.parentNode.getBoundingClientRect?n.parentNode:this.renderer.root.element).getBoundingClientRect(),r=n.getBoundingClientRect(),u=r.left-(t.translateX||0)-i.left,f=r.top-(t.translateY||0)-i.top;return{left:u,top:f,right:u+n.offsetWidth,bottom:f+n.offsetHeight}}}},u(s.prototype,p),u(s.prototype,{defaultStyle:rt,defaultAttrs:ut,ctor:function(n,t,i){var r=this,f="<";r.renderer=n,r.type=i,r._children=[],r._settings={},r._fullSettings={},r._styles={},t!=="div"&&t!=="span"&&(f="<vml:"),t==="shape"?r.attr=r.type==="arc"?vt:at:t==="rect"&&(r.attr=yt),u(r,st[t]),r.element=bt(f+t+"/>"),r.css(r.defaultStyle).attr(r.defaultAttrs)},dispose:function(){return this.element&&this.remove(),null},attr:l,processAttr:a,css:function(n){var u=this.element,i,r,t;for(t in n)if((r=this._styles[t],i=n[t],e(i))&&(this._styles[t]=i,r!==i)){switch(t){case"fill":t="color";break;case"font-size":t="fontSize",typeof i=="number"&&(i+="px");break;case"font-weight":t="fontWeight";break;case"z-index":t="zIndex";break;case"opacity":continue}try{u.style[t]=i}catch(f){continue}}return this},applyClipID:function(n){var i,r,t=this.renderer;i=t.getClipRect(n),i?(r=i.getValue(),i.addElement(this)):r="rect(-9999px 9999px 9999px -9999px)",this._clipRect=this._clipRect||t.rect(0,0,0,0).attr({"class":"dxc-vml-clip",fill:"none",opacity:.001}),this._clipRect.attr({width:t.root.attr("width"),height:t.root.attr("height")}),this.css({clip:r,width:t.root.attr("width"),height:t.root.attr("height")})},append:function(n){return n=n||this.renderer.root,(n.element||n).appendChild(this.element),n._children&&(this._parent=n,h(n._children,this)===-1&&n._children.push(this),this.attr(u(b(n._fullSettings),this._settings),!0)),this._applyStyleSheet(),n._clipRect&&this!==n._clipRect&&n._clipRect.append(n),this},_applyTransformation:function(n){var i=this,f=n.style,l=i.element,t=i._fullSettings,r=i.type!=="arc"?t.x||t.cx-t.r||0:0,u=i.type!=="arc"?t.y||t.cy-t.r||0:0,b=t.width||0,k=t.height||0,d=t.rotate;if(t.rotate){var a=t.rotate*Math.PI/180,o=e(t.rotateX)?t.rotateX:r,s=e(t.rotateY)?t.rotateY:u,h=r+(t.width||0||parseInt(l.style.width||0))/2,c=u+(t.height||0||parseInt(l.style.height||0))/2,v=it(a),y=tt(a),p=(h-o)*v-(c-s)*y+o-h,w=(h-o)*y+(c-s)*v+s-c;r+=p,u+=w,f.rotation=t.rotate}f.left=r+(t.translateX||0),f.top=u+(t.translateY||0)},remove:function(){var n=this,t=n._parent;return t&&t._children.splice(h(t._children,n),1),n._parent=null,p.remove.call(n)},clear:function(){return this._children=[],p.clear.call(this)},getBBox:function(){var n=this._getBBox(),t=n.left,i=n.top,r=n.right-t,u=n.bottom-i;return{x:t,y:i,width:r,height:u,isEmpty:!t&&!i&&!r&&!u}},_getBBox:function(){var t=this.element,n=this._fullSettings,i=n.x||0,r=n.y||0,u=parseInt(t.style.width||0),f=parseInt(t.style.height||0);return k({left:i,top:r,right:i+u,bottom:r+f},n["stroke-width"]||1)},_applyStyleSheet:function(){this._useCSSTheme&&this.attr(b(this.element.currentStyle),!0)},setTitle:function(n){this.element.setAttribute("title",n)}}),v=function(){this.ctor.apply(this,arguments)},u(v.prototype,s.prototype),u(v.prototype,{ctor:function(n,t){this._settings=this._fullSettings={},this.renderer=n,this._children=[],this._elements=[],this.id=t},attr:function(){var r=c.apply(this,arguments),t=this._elements.slice(),i,n;if(r===this)for(n=0;n<t.length;n++)i=t[n],i._fullSettings.clipId===this.id?t[n].applyClipID(this.id):this.removeElement(i);return r},processAttr:ft,_applyTransformation:ft,append:r,dispose:function(){return this._elements=null,this.renderer.removeClipRect(this.id),this},addElement:function(n){var i=!1,t=this._elements;h(t,n)===-1&&t.push(n)},removeElement:function(n){var i=this._elements,t=h(this._elements,n);t>-1&&this._elements.splice(t,1)},getValue:function(){var n=this._settings,t=(n.x||0)+(n.translateX||0),i=(n.y||0)+(n.translateY||0);return"rect("+i+"px, "+(t+(n.width||0))+"px, "+(i+(n.height||0))+"px, "+t+"px)"},css:r,remove:r}),y=function(){this.ctor.apply(this,arguments)},u(y.prototype,o.SvgRenderer.prototype),u(y.prototype,{_createRoot:function(){return this._createElement("div",{"class":this.cssClass,fill:"none",stroke:"none","stroke-width":0}).css({position:"relative",display:"inline-block",overflow:"hidden",direction:this.rtl?"rtl":"ltr"})},_init:function(){this._clipRects=[],this.animOptions={enabled:!1},this.defs={clear:r,remove:r,append:r,dispose:r}},_createElement:function(n,t,i){n=ct[n]||n;var r=new o.VmlElement(this,n,i);return t&&r.attr(t),r},dispose:function(){return this.root.dispose(),null},shadowFilter:function(){return{ref:null,append:r,dispose:r,attr:r,css:r}},clipRect:function(n,t,i,r){var u=this._clipRects,e=u.length,f=new v(this,e).attr({x:n||0,y:t||0,width:i||0,height:r||0});return u.push(f),f},getClipRect:function(n){return this._clipRects[n]},removeClipRect:function(n){delete this._clipRects[n]},pattern:function(n){return{id:n,append:r,remove:r,dispose:r}},image:function(n,t,i,r,u,f){return this._createElement("image",{x:n||0,y:t||0,width:i||0,height:r||0,location:f,href:u})},updateAnimationOptions:r,stopAllAnimations:r,svg:function(){return""},onEndAnimation:function(n){n()}}),o.VmlRenderer=y,o.VmlElement=s}(DevExpress,document),function(n){function u(n,i,u){var f=this;f._progress=0,f.element=n,f.params=i,f.options=u,f.duration=u.partitionDuration?u.duration*u.partitionDuration:u.duration,f._animateStep=u.animateStep||t.animationSvgStep,f._easing=r[u.easing]||r.easeOutCubic,f._currentParams={},f.tick=f._start}function f(n){var t=this;t._animationCount=0,t._timerId=null,t._animations={},t.element=n}var t=n.viz.renderers,i=function(){},r={easeOutCubic:function(n,t,i){return n===1?i:(1-Math.pow(1-n,3))*(i-t)+ +t},linear:function(n,t,i){return n===1?i:n*(i-t)+ +t}};t.easingFunctions=r,t.animationSvgStep={segments:function(n,t,i,r,u){for(var c=t.from,l=t.to,f,s,e,h=[],o=0;o<c.length;o++){if(f=c[o],s=[f[0]],f.length>1)for(e=1;e<f.length;e++)s.push(r(i,f[e],l[o][e]));h.push(s)}u.segments=t.end&&i===1?t.end:h,n.attr({segments:h})},arc:function(n,t,i,r){var f=t.from,o=t.to,e={},u;for(u in f)e[u]=r(i,f[u],o[u]);n.attr(e)},transform:function(n,t,i,r,u){var e=t.from,s=t.to,o={},f;for(f in e)o[f]=u[f]=r(i,e[f],s[f]);n.attr(o)},base:function(n,t,i,r,u,f){var e={};e[f]=u[f]=r(i,t.from,t.to),n.attr(e)},_:i,complete:function(n,t){n.attr(t)}},u.prototype={_calcProgress:function(n){return Math.min(1,(n-this._startTime)/this.duration)},_step:function(n){var t=this,r=t._animateStep,i,u;t._progress=t._calcProgress(n);for(i in t.params)u=r[i]||r.base,u(t.element,t.params[i],t._progress,t._easing,t._currentParams,i);return(t.options.step&&t.options.step(t._easing(t._progress,0,1),t._progress),t._progress===1)?t.stop():!0},_start:function(n){return this._startTime=n,this.tick=this._step,!0},_end:function(n){var t=this;t.stop=i,t.tick=i,t._animateStep.complete&&t._animateStep.complete(t.element,t._currentParams),t.options.complete&&!n&&t.options.complete()},tick:function(){return!0},stop:function(n,t){var i=this,r=i.options;if(!n&&r.repeatCount&&--r.repeatCount>0)return i.tick=i._start,!0;i._end(t)}},t.AnimationController=f,f.prototype={_loop:function(){var t=this,i=t._animations,u=0,f=+new Date,r;for(r in i)i[r].tick(f)||delete i[r],u++;if(u===0){t.stop();return}t._timerId=n.requestAnimationFrame.call(null,function(){t._loop()},t.element)},addAnimation:function(n){var t=this;t._animations[t._animationCount++]=n,clearTimeout(t._endAnimationTimer),t._timerId||(clearTimeout(t._startDelay),t._startDelay=setTimeout(function(){t._timerId=1,t._loop()},0))},animateElement:function(n,t,i){n&&t&&i&&(n.animation&&n.animation.stop(!0),this.addAnimation(n.animation=new u(n,t,i)))},onEndAnimation:function(n){this._animationCount?this._endAnimation=n:n()},dispose:function(){this.stop(!0),this.element=null},stop:function(t){var i=this,r=i._endAnimation;i._animations={},i._animationCount=0,n.cancelAnimationFrame(i._timerId),clearTimeout(i._startDelay),clearTimeout(i._endAnimationTimer),t||(i._endAnimationTimer=r&&setTimeout(function(){i._animationCount===0&&r()})),i._timerId=null},lock:function(){var n,t=this._animations;for(n in t)t[n].stop(!0,!0);this.stop()}}}(DevExpress),function(n,t,i){function f(){return!(u.msie&&u.version<9)||!!i.createElementNS&&!!i.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect}var r=t.viz.renderers,u=t.browser;f()?r.Renderer=r.SvgRenderer:(i.namespaces&&!i.namespaces.vml&&(i.namespaces.add("vml","urn:schemas-microsoft-com:vml"),i.createStyleSheet().cssText="vml\\:* { behavior:url(#default#VML); display: inline-block; } "),r.Renderer=r.VmlRenderer),r.isSvg=f}(jQuery,DevExpress,document),function(n){n.viz.core.series=n.viz.core.series||{},n.viz.core.series.helpers=n.viz.core.series.helpers||{},n.viz.core.series.helpers.consts={events:{mouseover:"mouseover",mouseout:"mouseout",mousemove:"mousemove",touchstart:"touchstart",touchmove:"touchmove",touchend:"touchend",mousedown:"mousedown",mouseup:"mouseup",click:"click",selectSeries:"selectseries",deselectSeries:"deselectseries",selectPoint:"selectpoint",deselectPoint:"deselectpoint",showPointTooltip:"showpointtooltip",hidePointTooltip:"hidepointtooltip"},states:{hover:"hover",normal:"normal",selected:"selected",normalMark:0,hoverMark:1,selectedMark:2},animations:{showDuration:{duration:400},hideGroup:{opacity:.0001},showGroup:{opacity:1}},pieLabelIndent:30}}(DevExpress),function(n,t){var s=t.utils,e=Math,u=e.round,f=e.abs,o=e.pow,r=n.each;t.viz.core.series.helpers.SeriesFamily=t.Class.inherit(function(){function c(n,t){return f(n)<t?n>=0?t:-t:n}function l(n){return n>=0?"positive":"negative"}function t(t){return n.map(t.series,function(n){return n.isVisible()?n:null})}function a(n,t,i){var r=(n.positive[t]||{})[i]||0,u=-(n.negative[t]||{})[i]||0;return r+u}var w=function(t){var r=this,u=n.noop;n.extend(r,t),r.type=r.type.toLowerCase(),r.series=[];switch(r.type){case"bar":r.adjustSeriesDimensions=v,r.adjustSeriesValues=u,r.updateSeriesValues=nt;break;case"rangebar":r.adjustSeriesDimensions=v,r.adjustSeriesValues=u,r.updateSeriesValues=u;break;case"fullstackedbar":r.fullStacked=!0,r.adjustSeriesDimensions=y,r.adjustSeriesValues=i,r.updateSeriesValues=p;break;case"stackedbar":r.adjustSeriesDimensions=y,r.adjustSeriesValues=i,r.updateSeriesValues=p;break;case"fullstackedarea":case"fullstackedline":case"fullstackedspline":case"fullstackedsplinearea":r.fullStacked=!0,r.adjustSeriesDimensions=u,r.adjustSeriesValues=i,r.updateSeriesValues=u;break;case"stackedarea":case"stackedsplinearea":case"stackedline":case"stackedspline":r.adjustSeriesDimensions=u,r.adjustSeriesValues=i,r.updateSeriesValues=u;break;case"candlestick":case"stock":r.adjustSeriesDimensions=tt,r.adjustSeriesValues=u,r.updateSeriesValues=u;break;case"bubble":r.adjustSeriesDimensions=it,r.adjustSeriesValues=u,r.updateSeriesValues=u;break;default:r.adjustSeriesDimensions=u,r.adjustSeriesValues=u,r.updateSeriesValues=u}},b=function(){this.series=null,this.translators=null},k=function(t){var u=this,r,i;for(n.isArray(t)||(t=[t]),i=0;i<t.length;i++)r=t[i],r.type.toLowerCase()===u.type&&u.series.push(r)},e=function(t,i,f,e,o){var s,h,g,l,c,v,tt,nt,w,a,b={},y={},k,p,d;if(e)for(h=e.width&&e.width<0?0:e.width,s=e.spacing&&e.spacing<0?0:e.spacing,h&&!s?f>1?(s=u((i*.7-h*f)/(f-1)),s<1&&(s=1)):s=0:s&&!h?(h=u((i*.7-s*(f-1))/f),h<2&&(h=2)):s||h||(f>1?(s=u(i*.7/f*.2),s<1&&(s=1)):s=0,h=u((i*.7-s*(f-1))/f),h<2&&(h=2)),h*f+s*(f-1)>i&&(s=u((i*.7-h*f)/(f-1)),s<1&&(s=1,g=u((i*.7-s*(f-1))/f))),l=f/2,v=0;v<t.length;v++)c=o(v),nt=t[v].getPoints(),w=(c-l+.5)*(g||h)-(l-c-.5)*s,r(nt,function(n,t){t.correctCoordinates({width:h,offset:w})});else{r(t,function(n,t){a=t.getStackName&&t.getStackName(),a=a||n.toString(),y[a]||(y[a]=[]),y[a].push(t)}),r(t,function(n,t){r(t.getPoints(),function(n,t){var i=t.argument;b.hasOwnProperty(i)||(b[i.valueOf()]=1)})});for(d in b)b.hasOwnProperty(d)&&(k=[],r(y,function(n,t){r(t,function(t,i){var r=i.getPointsByArg(d),u=r.length;for(t=0;t<u;t++)if(r[t]&&r[t].value)return k.push(n),!1})}),p=k.length,s=u(i*.7/p*.2),s<1&&(s=1),h=u((i*.7-s*(p-1))/p),h<2&&(h=2),l=p/2,r(y,function(t,i){(c=n.inArray(t,k),c!==-1)&&(w=(c-l+.5)*h-(l-c-.5)*s,r(i,function(n,t){r(t.getPointsByArg(d)||[],function(n,t){t&&t.value&&t.correctCoordinates({width:h,offset:w})})}))}))}},v=function(n){var i=this,u=i.equalBarWidth,r=t(i);e(r,h(i,n),r.length,u,function(n){return n})},y=function(n){var i=this,c,u=t(i),f={},o=0,s=i.equalBarWidth;r(u,function(){var n=this.getStackName();f.hasOwnProperty(n)||(f[n]=o++)}),e(u,h(i,n),o,s,function(n){return f[u[n].getStackName()]})},i=function(){var e=this,u=t(e),f={positive:{},negative:{}},i={left:{},right:{}};r(u,function(t,e){var s=e.getPoints(),o=!1;e._prevSeries=u[t-1],e.holes=n.extend(!0,{},i),r(s,function(n,t){var c=t.initialValue,r=t.argument.valueOf(),l=e.getStackName(),a=c>=0?f.positive:f.negative,h,u;a[l]=a[l]||{},h=a[l],h[r]?(t.correctValue(h[r]),h[r]+=c):(h[r]=c,t.resetCorrection()),t.hasValue()?o&&(o=!1,i.left[r]=(i.left[r]||0)+(t.value-(isFinite(t.minValue)?t.minValue:0)),t._skipSetLeftHole=!0):(u=s[n-1],!o&&u&&u.hasValue()&&(r=u.argument.valueOf(),u._skipSetRightHole=!0,i.right[r]=(i.right[r]||0)+(u.value-(isFinite(u.minValue)?u.minValue:0))),o=!0)})}),r(u,function(n,t){var f=t.getPoints(),u=t.holes;r(f,function(n,t){var r=t.argument.valueOf(),f;t.resetHoles(),t._skipSetLeftHole||t.setHole(u.left[r]||i.left[r]&&0,"left"),t._skipSetRightHole||t.setHole(u.right[r]||i.right[r]&&0,"right"),t._skipSetLeftHole=null,t._skipSetRightHole=null})}),e._stackKeepers=f,d(u,f,e.fullStacked,i)},d=function(n,t,i,u){r(n,function(n,f){r(f.getPoints(),function(n,r){var e=r.argument.valueOf();r.setPercentValue(a(t,f.getStackName(),e),i,u.left[e],u.right[e])})})},p=function(n){var i=this,e=t(i),o=i._stackKeepers,u={positive:{},negative:{}};r(e,function(t,e){var h=e.getOptions().minBarSize,v=h&&n.val.getMinBarSize(h),s=e.getStackName();r(e.getPoints(),function(n,t){if(t.hasValue()){var y=t.initialValue,r=t.argument.valueOf(),h,p,e;i.fullStacked&&(y=f(y)/a(o,s,r)||0),h=c(y,v),p=l(h),e=u[p][s]=u[p][s]||{},e[r]?(t.minValue=e[r],e[r]+=h):e[r]=h,t.value=e[r]}})}),i.fullStacked&&g(e,u)},g=function(n,t){r(n,function(n,i){var u=i.getStackName?i.getStackName():"default";r(i.getPoints(),function(n,i){var h=f(i.value),o=i.argument.valueOf(),r=l(h),e;t[r][u]=t[r][u]||{},e=t[r][u],i.value=i.value/e[o]||0,s.isNumber(i.minValue)&&(i.minValue=i.minValue/e[o]||0)})})},nt=function(n){r(this.series,function(t,i){var u=i.getOptions().minBarSize,f=u&&n.val.getMinBarSize(u);f&&r(i.getPoints(),function(n,t){t.hasValue()&&(t.value=c(t.initialValue,f))})})},tt=function(n){var i=this,r=t(i);e(r,h(i,n),r.length,!0,function(n){return n})},h=function(n,t){var i=t.arg;return n.interval=i.getInterval()},it=function(n){for(var s=this,c=t(s),l,v=n.arg.getCanvasVisibleArea(),y=n.val.getCanvasVisibleArea(),p=Math.min(v.max-v.min,y.max-y.min),w=o(s.minBubbleSize,2),nt=o(p*s.maxBubbleSize,2),tt=(p*s.maxBubbleSize+s.minBubbleSize)/2,i=Infinity,h=0,a,b,k,d,g,e=0;e<c.length;e++)l=c[e].getPoints(),r(l,function(n,t){h=h>t.size?h:t.size,i=i<t.size?i:t.size});for(d=h-i,g=f(nt-w),i=i<0?0:i,e=0;e<c.length;e++)l=c[e].getPoints(),r(l,function(n,t){h===i?a=u(tt):(k=f(t.size-i)/d,b=g*k+w,a=u(Math.sqrt(b))),t.correctCoordinates(a)})};return{ctor:w,dispose:b,add:k}}())}(jQuery,DevExpress),function(n,t){function f(n){return n===y||n==="allseriespoints"}function ht(){this.ctor.apply(this,arguments)}function p(n,t){n.isSelected()||n.applyStyle(t)}var tt=t.viz,it=tt.core,s=it.series,l=t.utils,rt=l.isDefined,i=n.each,h=n.extend,ut=n.isEmptyObject,e=n.Event,u=n.noop,a=2,v=1,ct="none",y="includepoints",w="excludepoints",ft="nearestpoint",et="applySelected",b="applyHover",r="symbolPoint",k="polarSymbolPoint",d="barPoint",ot="polarBarPoint",g="piePoint",nt="hover",c="normal",o="selection",st=function(){return{arg:{},val:{}}};s.mixins={chart:{pointTypes:{scatter:r,line:r,spline:r,stepline:r,stackedline:r,fullstackedline:r,stackedspline:r,fullstackedspline:r,stackedsplinearea:r,fullstackedsplinearea:r,area:r,splinearea:r,steparea:r,stackedarea:r,fullstackedarea:r,rangearea:"rangeSymbolPoint",bar:d,stackedbar:d,fullstackedbar:d,rangebar:"rangeBarPoint",bubble:"bubblePoint",stock:"stockPoint",candlestick:"candlestickPoint"}},pie:{pointTypes:{pie:g,doughnut:g,donut:g}},polar:{pointTypes:{scatter:k,line:k,area:k,bar:ot,stackedbar:ot}}},s.Series=ht,ht.prototype={ctor:function(n,t){var i=this;i.fullState=0,i._extGroups=n,i._renderer=n.renderer,i._group=n.renderer.g().attr({"class":"dxc-series"}),i.updateOptions(t)},update:function(n,t){this.updateOptions(t),this.updateData(n)},_createLegendState:u,getLegendStyles:function(){return this._styles.legendStyles},_createStyles:function(n){var t=this,i=n.mainSeriesColor,r=t._getSpecialColor(i);t._styles={normal:t._parseStyle(n,i,i),hover:t._parseStyle(n.hoverStyle||{},r,i),selection:t._parseStyle(n.selectionStyle||{},r,i),legendStyles:{normal:t._createLegendState(n,i),hover:t._createLegendState(n.hoverStyle||{},r),selection:t._createLegendState(n.selectionStyle||{},r)}}},setAdjustSeriesLabels:function(n){i(this._points||[],function(t,i){i.setAdjustSeriesLabels(n)})},setClippingParams:function(n,t,i){this._paneClipRectID=n,this._widePaneClipRectID=t,this._forceClipping=i},applyClip:function(){this._group.attr({clipId:this._paneClipRectID})},resetClip:function(){this._group.attr({clipId:null})},getTagField:function(){return this._options.tagField||"tag"},getValueFields:u,getArgumentField:u,getPoints:function(){return this._points},_createPoint:function(n,t,i){n.index=i;var u=this,r=t[i],f=u.pointsByArgument,e;if(u._checkData(n))return e=u._customizePoint(n)||u._getCreatingPointOptions(),r?r.update(n,e):(r=it.CoreFactory.createPoint(u,n,e),t.push(r)),f[r.argument.valueOf()]=f[r.argument.valueOf()]||[],f[r.argument.valueOf()].push(r),!0},getRangeData:function(n,t){return this._visible?h(!0,{},this._getRangeData(n,t)):st()},_deleteGroup:function(n){var t=this[n];t&&(t.remove(),this[n]=null)},_saveOldAnimationMethods:function(){var n=this;n._oldClearingAnimation=n._clearingAnimation,n._oldUpdateElement=n._updateElement,n._oldgetAffineCoordOptions=n._getAffineCoordOptions},_deleteOldAnimationMethods:function(){this._oldClearingAnimation=null,this._oldUpdateElement=null,this._oldgetAffineCoordOptions=null},updateOptions:function(n){var t=this,i=n.widgetType,r=t.type,u=n.type;if(t.type=u&&u.toString().toLowerCase(),!t._checkType(i)||t._checkPolarBarType(i,n)){t.dispose(),t.isUpdated=!1;return}r!==t.type&&(t._firstDrawing=!0,t._saveOldAnimationMethods(),t._resetType(r,i),t._setType(t.type,i)),t._options=n,t._pointOptions=null,t._deletePatterns(),t._patterns=[],t.name=n.name,t.pane=n.pane,t.axis=n.axis,t.tag=n.tag,t._createStyles(n),t._updateOptions(n),t._visible=n.visible,t.isUpdated=!0},_disposePoints:function(n){i(n||[],function(n,t){t.dispose()})},_correctPointsLength:function(n,t){this._disposePoints(this._oldPoints),this._oldPoints=t.splice(n,t.length)},_getTicksForAggregation:function(n,t,i,r){var f={axisType:"continuous",dataType:l.isDate(n)?"datetime":"numeric"},e={min:n,max:t,screenDelta:i},o={gridSpacingFactor:r,labelOptions:{},stick:!0},u=new tt.core.tickManager.TickManager(f,e,o);return{ticks:u.getTicks(!0),tickInterval:u.getTickInterval()}},_getRangeCorrector:u,updateDataType:function(n){var t=this;return t.argumentType=n.argumentType,t.valueType=n.valueType,t.argumentAxisType=n.argumentAxisType,t.valueAxisType=n.valueAxisType,t.showZero=n.showZero,t},getOptions:function(){return this._options},_resetRangeData:function(){this._rangeData=st()},updateData:function(n){var t=this,u=t._originalPoints||[],r=0,o=t._options,f,e;t._rangeErrorBarCorrector=e=t._getRangeCorrector(),t.pointsByArgument={},t._resetRangeData(),n&&n.length&&(t._canRenderCompleteHandle=!0),t._beginUpdateData(n),i(n,function(n,i){f=t._getPointData(i,o),t._createPoint(f,u,r)&&(t._processRange(u[r],r>0?u[r-1]:null,e),r++)}),t._points=t._originalPoints=u,t._correctPointsLength(r,u),t._endUpdateData()},getTeamplatedFields:function(){var n=this,t=n.getValueFields(),r=[];return t.push(n.getTagField()),i(t,function(t,i){var u={};u.teamplateField=i+n.name,u.originalField=i,r.push(u)}),r},resamplePoints:function(n,t,r){var u=this,f=u.getAllPoints(),e,o,h,c,s,l;if(f.length){if(i(f,function(n,i){e=i.argument-t<=0?n:e,o||(o=i.argument-r>0?n:null)}),e=e?e:1,o=rt(o)?o:f.length-1,t=f[e-1].argument,r=f[o].argument,h=u._getPointSize(),u.argumentAxisType!=="discrete"&&u.valueAxisType!=="discrete"){if(c=u._getTicksForAggregation(t,r,n.canvasLength,h),s=c.ticks,l=c.tickInterval,s.length===1){u._points=f;return}}else s=n.canvasLength/h;u._points=u._resample(s,l,n)}},_removeOldSegments:function(n){var t=this;i(t._graphics.splice(n,t._graphics.length)||[],function(n,i){t._removeElement(i)}),t._trackers&&i(t._trackers.splice(n,t._trackers.length)||[],function(n,t){t.remove()})},draw:function(n,t,i,r){var u=this,f;u._oldClearingAnimation&&t&&u._firstDrawing?(f=function(){u._draw(n,!0,i)},u._oldClearingAnimation(n,f)):u._draw(n,t,i,r)},_clearSeries:function(){var n=this;n._deleteGroup("_elementsGroup"),n._deleteGroup("_bordersGroup"),n._deleteTrackers(),n._graphics=[],n._trackers=[]},_draw:function(n,t,r,u){var f=this,o=f._points||[],e=[],s=0,h=f._firstDrawing,l=o[0]&&o[0].hasValue()&&f._options.closed,c;if(f._graphics=f._graphics||[],f._prepareSeriesToDrawing(),!f._visible){t=!1,f._group.remove();return}f._group.append(f._extGroups.seriesGroup),f.translators=n,f._createGroups(t,undefined,h),f._segments=[],f._drawedPoints=[],f._firstDrawing=o.length?!1:!0,c={markers:f._markersGroup,labels:f._labelsGroup,errorBars:f._errorBarGroup},i(o,function(i,r){r.translate(n),r.hasValue()?(f._drawPoint(r,c,t,h),e.push(r)):e.length&&(f._drawSegment(e,t,s++),e=[])}),e.length&&f._drawSegment(e,t,s++,l),f._removeOldSegments(s),f._defaultSegments=f._generateDefaultSegments(),r&&f.hideLabels(),t&&f._animate(h),f.isSelected()?f._changeStyle(u,et):f.isHovered()&&f._changeStyle(u,b)},_checkType:function(n){return!!s.mixins[n][this.type]},_checkPolarBarType:function(n,t){return n==="polar"&&t.spiderWidget&&this.type.indexOf("bar")!==-1},_resetType:function(n,t){var r=this;n&&i(s.mixins[t][n],function(n){delete r[n]})},_setType:function(n,t){var r=this;i(s.mixins[t][n],function(n,t){r[n]=t})},setSelectedState:function(n,t,i){var r=this;r.lastSelectionMode=(t||r._options.selectionMode).toLowerCase(),n&&!r.isSelected()?(r.fullState=r.fullState|a,r._nearestPoint&&p(r._nearestPoint,"normal"),r._nearestPoint=null,r._changeStyle(i,et)):!n&&r.isSelected()&&(r.fullState=r.fullState&~a,r.isHovered()?r._changeStyle(i,b,o):r._changeStyle(i,"resetItem"))},setHoverState:function(n,t,i){var r=this;r.lastHoverMode=(t||r._options.hoverMode).toLowerCase(),n&&!r.isHovered()?(r.fullState=r.fullState|v,r.isSelected()||r._changeStyle(i,b)):!n&&r.isHovered()&&(r._nearestPoint=null,r.fullState=r.fullState&~v,r.isSelected()||r._changeStyle(i,"resetItem"))},isFullStackedSeries:function(){return this.type.indexOf("fullstacked")===0},isStackedSeries:function(){return this.type.indexOf("stacked")===0},isFinancialSeries:function(){return this.type==="stock"||this.type==="candlestick"},_changeStyle:function(n,t,r){var e=this,u=e._calcStyle(r),o;u.mode!==ct&&(n&&n(t),f(u.mode)&&(o=u.pointStyle,i(e._points||[],function(n,t){p(t,o)})),e._applyStyle(u.series))},_calcStyle:function(n){var t=this,u=t._styles,i=!1,r;switch(t.fullState&3){case 0:r={pointStyle:c,mode:y,series:u.normal};break;case 1:i=n===o&&t.lastHoverMode===w||t.lastHoverMode===ft&&f(t.lastSelectionMode),r={pointStyle:i?c:nt,mode:i?y:t.lastHoverMode,series:u.hover};break;case 2:r={pointStyle:o,mode:t.lastSelectionMode,series:u.selection};break;case 3:i=t.lastSelectionMode===w&&f(t.lastHoverMode),r={pointStyle:i?c:o,mode:i?y:t.lastSelectionMode,series:u.selection}}return r},updateHover:function(n,t){var i=this,u=i._nearestPoint,r=i.isHovered()&&i.lastHoverMode===ft&&i.getNeighborPoint(n,t);r===u||i.isSelected()||(u&&p(u,"normal"),r&&(p(r,"hover"),i._nearestPoint=r))},_getMainAxisName:function(){return this._options.rotated?"X":"Y"},areLabelsVisible:function(){return!rt(this._options.maxLabelCount)||this._points.length<=this._options.maxLabelCount},getLabelVisibility:function(){return this.areLabelsVisible()&&this._options.label&&this._options.label.visible},_customizePoint:function(n){var i=this,u=i._options,s=u.customizePoint,t,f,r,e,c=u.customizeLabel,o,l;return c&&c.call&&(t=h({seriesName:i.name},n),t.series=i,r=c.call(t,t),o=r&&!ut(r),r=o?h(!0,{},u.label,r):null),s&&s.call&&(t=t||h({seriesName:i.name},n),t.series=i,e=s.call(t,t),l=e&&!ut(e)),(o||l)&&(f=i._parsePointOptions(i._preparePointOptions(e),r||u.label,!0),f.styles.useLabelCustomOptions=o,f.styles.usePointCustomOptions=l),f},_getLabelOptions:function(t,i){var r=t||{},u=r.font||{},f=r.border||{},e=r.connector||{},o={font:{color:r.backgroundColor==="none"&&u.color.toLowerCase()==="#ffffff"&&r.position!=="inside"?i:u.color,family:u.family,weight:u.weight,size:u.size,opacity:u.opacity}},s={fill:r.backgroundColor||i,"stroke-width":f.visible?f.width||0:0,stroke:f.visible&&f.width?f.color:"none",dashStyle:f.dashStyle},h={stroke:e.visible&&e.width?e.color||i:"none","stroke-width":e.visible?e.width||0:0};return{alignment:r.alignment,format:r.format,argumentFormat:r.argumentFormat,precision:r.precision,argumentPrecision:r.argumentPrecision,percentPrecision:r.percentPrecision,customizeText:n.isFunction(r.customizeText)?r.customizeText:undefined,attributes:o,visible:u.size!==0?r.visible:!1,showForZeroValues:r.showForZeroValues,horizontalOffset:r.horizontalOffset,verticalOffset:r.verticalOffset,radialOffset:r.radialOffset,background:s,position:r.position,connector:h,rotationAngle:r.rotationAngle}},show:function(){var n=this;n._visible||(n._visible=!0,n.hidePointTooltip(),n._options.visibilityChanged())},hide:function(){var n=this;n._visible&&(n._visible=!1,n.hidePointTooltip(),n._options.visibilityChanged())},hideLabels:function(){i(this._points,function(n,t){t._label.hide()})},_parsePointOptions:function(n,t,i){var u=this,r=u._options,e=u._createPointStyles(n,i),f=h(!0,{},n,{type:r.type,tag:u.tag,rotated:r.rotated,styles:e,widgetType:r.widgetType,visibilityChanged:r.visibilityChanged});return f.label=u._getLabelOptions(t,e.normal.fill),f.errorBars=r.valueErrorBar,f},_resample:function(t,r,u){var f=this,o=[],l,e=0,s=0,h=f.getAllPoints(),c,a;return f.argumentAxisType==="discrete"||f.valueAxisType==="discrete"?(c=u.getCanvasVisibleArea(),h=n.map(h,function(n){var i=u.translate(n.argument),t;return i>=c.min&&i<=c.max?t=n:(n.setInvisibility(),t=null),t}),r=h.length/t,l=n.map(h,function(n,t){return Math.floor(e)<=t?(e+=r,n):(n.setInvisibility(),null)})):(f._aggregatedPoints=f._aggregatedPoints||[],i(h,function(n,i){switch(f._isInInterval(i.argument,t,e,r)){case!0:o.push(i);break;case"nextInterval":for(var u=f._fusionPoints(o,t[e],e);f._isInInterval(i.argument,t,e,r)==="nextInterval";)e++;o=[],f._isInInterval(i.argument,t,e,r)===!0&&o.push(i),f._createPoint(u,f._aggregatedPoints,s)&&s++}}),o.length&&(a=f._fusionPoints(o,t[e],e),f._createPoint(a,f._aggregatedPoints,s)&&s++),f._correctPointsLength(s,f._aggregatedPoints),f._endUpdateData(),f._aggregatedPoints)},_isInInterval:function(t,i,r,u){var f=i[r],o=i[r+1],e;return(u=n.isNumeric(u)?u:l.convertDateTickIntervalToMilliseconds(u),e=l.isDate(f)?new Date(f.getTime()+u):f+u,t>=f&&t<e)?!0:t<f||o===undefined?!1:"nextInterval"},canRenderCompleteHandle:function(){var n=this._canRenderCompleteHandle;return delete this._canRenderCompleteHandle,!!n},isHovered:function(){return!!(this.fullState&1)},isSelected:function(){return!!(this.fullState&2)},isVisible:function(){return this._visible},getAllPoints:function(){return(this._originalPoints||[]).slice()},getPointByPos:function(n){return(this._points||[])[n]},getVisiblePoints:function(){return(this._drawedPoints||[]).slice()},setPointHoverState:function(n,t){n.fullState=n.fullState|v,this.isSelected()&&f(this.lastSelectionMode)||n.isSelected()||(n.applyStyle(nt),t&&t("applyHover"))},releasePointHoverState:function(n,t){var i=this;n.fullState=n.fullState&~v,i.isSelected()&&f(i.lastSelectionMode)||n.isSelected()||i.isHovered()&&f(i.lastHoverMode)&&(!i.isSelected()||i.lastSelectionMode!==w)||(n.applyStyle(c),t&&t("resetItem"))},setPointSelectedState:function(n,t){n.fullState=n.fullState|a,n.applyStyle(o),t&&t("applySelected")},releasePointSelectedState:function(n,t){var i=this;n.fullState=n.fullState&~a,i.isHovered()&&f(i.lastHoverMode)||n.isHovered()?(n.applyStyle(nt),t&&t("applyHover")):i.isSelected()&&f(i.lastSelectionMode)?(n.applyStyle(o),t&&t("applySelected")):(n.applyStyle(c),t&&t("resetItem"))},selectPoint:function(t){this._extGroups.seriesGroup&&n(this._extGroups.seriesGroup.element).trigger(new e("selectpoint"),t)},deselectPoint:function(t){this._extGroups.seriesGroup&&n(this._extGroups.seriesGroup.element).trigger(new e("deselectpoint"),t)},showPointTooltip:function(t){this._extGroups.seriesGroup&&n(this._extGroups.seriesGroup.element).trigger(new e("showpointtooltip"),t)},hidePointTooltip:function(t){this._extGroups.seriesGroup&&n(this._extGroups.seriesGroup.element).trigger(new e("hidepointtooltip"),t)},select:function(){var t=this,i=t._trackersGroup;t._extGroups.seriesGroup&&n(t._extGroups.seriesGroup.element).trigger(new e("selectseries",{target:t}),t._options.selectionMode),t._group.toForeground()},clearSelection:function(){var t=this;t._extGroups.seriesGroup&&n(t._extGroups.seriesGroup.element).trigger(new e("deselectseries",{target:t}),t._options.selectionMode)},getPointByArg:function(n){return this.getPointsByArg(n)[0]||null},getPointsByArg:function(n){return this.pointsByArgument[n.valueOf()]||[]},_deletePoints:function(){var n=this;n._disposePoints(n._originalPoints),n._disposePoints(n._aggregatedPoints),n._disposePoints(n._oldPoints),n._points=null,n._oldPoints=null,n._aggregatedPoints=null,n._originalPoints=null,n._drawedPoints=null},_deletePatterns:function(){i(this._patterns||[],function(n,t){t&&t.dispose()}),this._patterns=null},_deleteTrackers:function(){var t=this;i(t._trackers||[],function(t,i){n(i.element).removeData(),i.remove()}),t._trackersGroup&&t._trackersGroup.remove(),t._trackers=t._trackersGroup=null},dispose:function(){var n=this;n._deletePoints(),n._group.remove(),n._labelsGroup&&n._labelsGroup.remove(),n._errorBarGroup&&n._errorBarGroup.remove(),n._deletePatterns(),n._deleteTrackers(),n._group=n._extGroups=n._markersGroup=n._elementsGroup=n._bordersGroup=n._labelsGroup=n._errorBarGroup=n._graphics=n._rangeData=n._renderer=n.translators=n._styles=n._options=n._pointOptions=n._drawedPoints=n._aggregatedPoints=n.pointsByArgument=n._segments=n._prevSeries=null},correctPosition:u,drawTrackers:u,getNeighborPoint:u,areErrorBarsVisible:u,getColor:function(){return this.getLegendStyles().normal.fill},getStackName:function(){return this.type==="stackedbar"||this.type==="fullstackedbar"?this._stackName:null},getPointByCoord:function(n,t){var i=this.getNeighborPoint(n,t);return i&&i.coordsIn(n,t)?i:null}}}(jQuery,DevExpress),function(n,t,i){function l(n,t){var i=n.min,u=n.max;n.min=t<i||!r(i)?t:i,n.max=t>u||!r(u)?t:u}function s(n,t,i,u,f){var c=t==="arg"?"argument":"value",e=n._rangeData[t],h=e.interval,s;n[c+"AxisType"]===o?(e.categories=e.categories||[],e.categories.push(i)):(l(e,i),t==="arg"&&(s=(r(u)?w(f?f(i,u):i-u):s)||h,e.interval=r(s)&&(s<h||!r(h))?s:h))}function u(n,t){var i=n._rangeData.val,u=n.valueAxisType===o;u||((t<i.minVisible||!r(i.minVisible))&&(i.minVisible=t),(t>i.maxVisible||!r(i.maxVisible))&&(i.maxVisible=t))}function g(n,t,i){var f=n._rangeData.val,e,s=f.interval;n.valueAxisType===o?(f.categories=f.categories||[],f.categories.push(t,i)):(l(f,t),l(f,i))}function y(t){var i={};return n.map(t,function(n){var t=i[n]?null:n;return i[n]=!0,t})}function nt(n,t,i){var r=n._rangeData.arg,u,f;if(i){r.startCategories=t.minArg,r.endCategories=t.maxArg;return}u=t.minArg<t.maxArg?t.minArg:t.maxArg,f=t.maxArg>t.minArg?t.maxArg:t.minArg,r.min=u<r.min?u:r.min,r.max=f>r.max?f:r.max,r.minVisible=u,r.maxVisible=f}function p(n,t){var i,u;r(t.minVal)&&r(t.maxVal)&&(i=t.minVal<t.maxVal?t.minVal:t.maxVal,u=t.maxVal>t.minVal?t.maxVal:t.minVal),r(t.minVal)&&(n._rangeData.val.min=i<n._rangeData.val.min?i:n._rangeData.val.min,n._rangeData.val.minVisible=i),r(t.maxVal)&&(n._rangeData.val.max=u>n._rangeData.val.max?u:n._rangeData.val.max,n._rangeData.val.maxVisible=u)}function tt(n,t){var v=t.adjustOnZoom,i=n._points||[],o,h=!1,s=n._rangeData,l=n._rangeErrorBarCorrector;c(i,function(t,r){var y=r.argument,c=t>0?i[t-1]:null;v&&y>=s.arg.minVisible&&y<=s.arg.maxVisible&&(h||(c&&c.hasValue()&&(u(n,c.value),a(s.val,c,l,f,e)),h=!0),r.hasValue()&&(u(n,r.value),a(s.val,r,l,f,e)),o=t)}),r(o)&&o<i.length-1&&i[o+1].hasValue()&&u(n,i[o+1].value),p(n,t)}function it(n,t,i,f){var h=t.adjustOnZoom,e=n._points||[],o,s=!1;c(e,function(t,r){var l=r.argument,c=t>0?e[t-1]:null;h&&l>=n._rangeData.arg.minVisible&&l<=n._rangeData.arg.maxVisible&&(s||(c&&c.hasValue()&&(u(n,c[i]),u(n,c[f])),s=!0),r.hasValue()&&(u(n,r[i]),u(n,r[f])),o=t)}),r(o)&&o<e.length-1&&e[o+1].hasValue()&&u(n,e[o+1].value),p(n,t)}function rt(n,t){var r=n._rangeData,i=n._points||[],u=n.argumentAxisType===o;delete r.arg.interval,c(i,function(r,f){var o=f.argument,e=r>0?i[r-1]:null,h=e&&e.argument;u||s(n,"arg",o,h,t)})}function ut(n){var t=n._rangeData,i=n._getMainAxisName(),r=i==="X"?"Y":"X";t.arg.categories&&(t.arg.categories=y(t.arg.categories)),t.val.categories&&(t.val.categories=y(t.val.categories)),t.arg.axisType=n.argumentAxisType,t.arg.dataType=n.argumentType,t.val.axisType=n.valueAxisType,t.val.dataType=n.valueType,t.val.isValueRange=!0}function ft(n,t,i,r,u){var f=t[r],e=t[u],o=t.argument,h=i&&i[r],c=i&&i[u],l=i&&i.argument;t.hasValue()&&g(n,f,e,h,c),s(n,"arg",o,l)}function et(n,t){var i=n._rangeData.val,r=i[f],u=i[e];t=t||{},i&&n.valueAxisType!=="logarithmic"&&n.valueType!=="datetime"&&n.showZero!==!1&&(i[f]=r>(t.minVal||0)?t.minVal||0:r,i[e]=u<(t.maxVal||0)?t.maxVal||0:u,i.min=i.min>0?0:i.min,i.max=i.max<0?0:i.max)}function ot(n){var t=n._rangeData.val,i=d(t);t.percentStick=!0,i||(t.min=0)}function a(n,t,r,u,f){if(r){var s=r(t),e=b.apply(i,s),o=k.apply(i,s);v(e)&&n[u]>e&&(n[u]=e),v(o)&&n[f]<o&&(n[f]=o)}}function st(n,t,i,r){var u=t.value,f=t.argument,e=i&&i.value,o=i&&i.argument;t.hasValue()&&s(n,"val",u,e),s(n,"arg",f,o),a(n._rangeData.val,t,r,"min","max")}function ht(n){var i=n.getOptions().label,t;n.areLabelsVisible()&&i&&i.visible&&i.position!=="inside"&&(t=n._rangeData.val,t.min<0&&(t.minSpaceCorrection=!0),t.max>0&&(t.maxSpaceCorrection=!0))}function ct(n){var t=n._rangeData.val;n.areLabelsVisible()&&n._options.label.visible&&n._options.label.position!=="inside"&&(t.minSpaceCorrection=t.maxSpaceCorrection=!0)}function lt(n,t,i,u,s){var h=n._rangeData.val,l=!!u&&!!s,c=n.argumentAxisType===o;t&&r(t.minArg)&&r(t.maxArg)?(c||(h[f]=t.minVal,h[e]=t.maxVal),nt(n,t,c),l?it(n,t,u,s):tt(n,t)):!t&&i&&rt(n,i),ut(n)}var h=Math,w=h.abs,b=h.min,k=h.max,c=n.each,d=n.isEmptyObject,r=t.utils.isDefined,v=isFinite,at=15,vt=20,yt=20,pt=.3,f="minVisible",e="maxVisible",o="discrete";t.viz.core.series.helpers.rangeDataCalculator={processRange:st,calculateRangeData:lt,addLabelPaddings:ht,addRangeSeriesLabelPaddings:ct,processFullStackedRange:ot,calculateRangeMinValue:et,processTwoValues:ft}}(jQuery,DevExpress),function(n,t){function o(n){var t=0;return i(n,function(n,i){t+=i}),t}function l(n){return n.toLowerCase()}function rt(t){return n.inArray(t,[it,tt,d,g,nt])!==-1}function a(t,i){return o(n.map(t,function(n){return(n-i)*(n-i)}))/t.length}var s=t.viz.core.series,h=s.helpers.rangeDataCalculator,c=s.mixins.chart,i=n.each,e=n.extend,ft=n.map,r=n.noop,v=t.utils,u=v.isDefined,y=v.isString,f=Math,et=f.floor,p=f.abs,w=f.sqrt,ot=f.min,st=f.max,pt=10,ht=2,ct=20,lt=400,b="highError",k="lowError",d="variance",g="stddeviation",nt="stderror",tt="percent",it="fixed",at="discrete",vt="logarithmic",yt="datetime",ut={_defaultDuration:lt,_defaultTrackerWidth:ct,_applyStyle:r,_updateOptions:r,_parseStyle:r,_prepareSegment:r,_drawSegment:r,_generateDefaultSegments:r,_prepareSeriesToDrawing:function(){var n=this;n._deleteOldAnimationMethods(),n._firstDrawing&&n._clearSeries(),n._disposePoints(n._oldPoints),n._oldPoints=null},_createLegendState:function(n,t){return{fill:n.color||t,hatching:n.hatching}},updateTeamplateFieldNames:function(){var n=this,t=n._options;t.valueField=n.getValueFields()[0]+n.name,t.tagField=n.getTagField()+n.name},_applyElementsClipRect:function(n){n.clipId=this._paneClipRectID},_applyMarkerClipRect:function(n){n.clipId=this._forceClipping?this._paneClipRectID:null},_createGroup:function(n,t,i,r){var u=t[n]=t[n]||this._renderer.g();u.attr(r).append(i)},_applyClearingSettings:function(n){n.opacity=null,n.scale=null,this._options.rotated?n.translateX=null:n.translateY=null},_createMarkerGroup:function(){var n=this,t=n._getPointOptions().styles.normal;t["class"]="dxc-markers",t.opacity=1,n._applyMarkerClipRect(t),n._createGroup("_markersGroup",n,n._group,t)},_createLabelGroup:function(){var n=this,t={"class":"dxc-labels",visibility:n.getLabelVisibility()?"visible":"hidden"};n._applyElementsClipRect(t),n._applyClearingSettings(t),n._createGroup("_labelsGroup",n,n._extGroups.labelsGroup,t)},areErrorBarsVisible:function(){var n=this._options.valueErrorBar||{};return this._errorBarsEnabled()&&n.displayMode!=="none"&&(rt(l(n.type+""))||u(n.lowValueField)||u(n.highValueField))},_createErrorBarGroup:function(n){var t=this,i=t._options.valueErrorBar||{},r;t.areErrorBarsVisible()&&(r={"class":"dxc-error-bars",stroke:i.color,"stroke-width":i.lineWidth,opacity:n?.001:i.opacity||1,"stroke-linecap":"square",sharp:!0,clipId:t._forceClipping?t._paneClipRectID:t._widePaneClipRectID},t._createGroup("_errorBarGroup",t,t._group,r))},_createGroups:function(n){var t=this;t._createMarkerGroup(),t._createLabelGroup(),t._createErrorBarGroup(n),n&&t._labelsGroup&&t._labelsGroup.attr({opacity:.001})},_getCreatingPointOptions:function(){var r=this,t,n=r._predefinedPointOptions,i;return n||(t=r._getPointOptions(),r._predefinedPointOptions=n=e(!0,{styles:{}},t),i=t.styles&&t.styles.normal||{},n.styles=n.styles||{},n.styles.normal={"stroke-width":i["stroke-width"],r:i.r,opacity:i.opacity}),n},_getSpecialColor:function(n){return n},_getPointOptions:function(){var n=this;return n._pointOptions||(n._pointOptions=n._parsePointOptions(n._preparePointOptions(),n._options.label))},_preparePointOptions:function(n){var t=this._options.point;return n?e(!0,{},t,n):t},_parsePointStyle:function(n,t,i){var r=n.border||{};return{fill:n.color||t,stroke:r.color||i,"stroke-width":r.visible?r.width:0,r:n.size/2+(r.visible&&n.size!==0?~~(r.width/2)||0:0)}},_createPointStyles:function(n){var t=this,i=n.color||t._options.mainSeriesColor,r=t._options.containerBackgroundColor,u=t._parsePointStyle(n,i,i);return u.visibility=n.visible?"visible":"hidden",{normal:u,hover:t._parsePointStyle(n.hoverStyle,r,i),selection:t._parsePointStyle(n.selectionStyle,r,i)}},_checkData:function(n){return u(n.argument)&&n.value!==undefined},_getRangeCorrector:function(){var n=this.getOptions().valueErrorBar||{},t=l(n.displayMode+"");return n?function(n){var i=n.lowError,r=n.highError;switch(t){case"low":return[i];case"high":return[r];case"none":return[];default:return[i,r]}}:undefined},_processRange:function(n,t,i){h.processRange(this,n,t,i)},_getRangeData:function(n,t){return h.calculateRangeData(this,n,t),h.addLabelPaddings(this),this._rangeData},_getPointData:function(n,t){var i={value:n[t.valueField||"val"],argument:n[t.argumentField||"arg"],tag:n[t.tagField||"tag"]};return this._fillErrorBars(n,i,t),i},_errorBarsEnabled:function(){return this.valueAxisType!==at&&this.valueAxisType!==vt&&this.valueType!==yt},_fillErrorBars:function(n,t,i){var r=i.valueErrorBar||{};this._errorBarsEnabled()&&(t.lowError=n[r.lowValueField||k],t.highError=n[r.highValueField||b])},_drawPoint:function(n,t,i,r){n.isInVisibleArea()?(n.clearVisibility(),n.draw(this._renderer,t,i,r),this._drawedPoints.push(n)):n.setInvisibility()},_clearingAnimation:function(n,t){var i=this,r={opacity:.001},u={duration:i._defaultDuration,partitionDuration:.5};i._labelsGroup&&i._labelsGroup.animate(r,u,function(){i._markersGroup&&i._markersGroup.animate(r,u,t)})},_animateComplete:function(){var n=this,t={duration:n._defaultDuration};n._labelsGroup&&n._labelsGroup.animate({opacity:1},t),n._errorBarGroup&&n._errorBarGroup.animate({opacity:(n._options.valueErrorBar||{}).opacity||1},t)},_animate:function(){var t=this,r=t._drawedPoints.length-1;i(t._drawedPoints||[],function(n,i){i.animate(n===r?function(){t._animateComplete()}:undefined,{translateX:i.x,translateY:i.y})})},_getPointSize:function(){return this._options.point.visible?this._options.point.size:ht},_calcMedianValue:function(n,t){var i,r=ft(n,function(n){return n[t]});return r.sort(function(n,t){return n-t}),i=r[et(r.length/2)],u(i)?i:null},_calcErrorBarValues:function(n){if(!n.length)return{};var i=n[0].lowError,r=n[0].highError,t=1,o=n.length,f,e;for(t;t<o;t++)f=n[t].lowError,e=n[t].highError,u(f)&&u(e)&&(i=ot(f,i),r=st(e,r));return{low:i,high:r}},_fusionPoints:function(n,t,i){var r=this._calcErrorBarValues(n);return{value:this._calcMedianValue(n,"value"),argument:t,tag:null,index:i,seriesName:this.name,lowError:r.low,highError:r.high}},_endUpdateData:function(){delete this._predefinedPointOptions},getArgumentField:function(){return this._options.argumentField||"arg"},getValueFields:function(){var t=this._options,i=t.valueErrorBar||{},n=[t.valueField||"val"],r=i.lowValueField,u=i.highValueField;return y(r)&&n.push(r),y(u)&&n.push(u),n},_calculateErrorBars:function(t){var v=this,ot=v._options,h=ot.valueErrorBar||{},y=l(h.type+""),r=parseFloat(h.value),p=v.getValueFields()[0],f,ut=h.lowValueField||k,ft=h.highValueField||b,u,s,c,e,et=function(n,t){f=t[p],t[ut]=f-r,t[ft]=f+r};if(v._errorBarsEnabled()&&rt(y)){switch(y){case it:e=et;break;case tt:e=function(n,t){f=t[p];var i=f*r/100;t[ut]=f-i,t[ft]=f+i};break;default:u=n.map(t,function(n){return n[p]}),s=u.length,r=r||1;switch(y){case d:r=a(u,o(u)/s)*r,e=et;break;case g:c=o(u)/s,r=w(a(u,c))*r,e=function(n,t){t[ut]=c-r,t[ft]=c+r};break;case nt:r=w(a(u,o(u)/s)/s)*r,e=et}}e&&i(t,e)}},_beginUpdateData:function(n){this._calculateErrorBars(n)}};c.scatter=e({},ut,{drawTrackers:function(){var t=this,u,f,e=t._segments||[],o=t._options.rotated,r=[];t.isVisible()&&(e.length&&(u=t._trackers=t._trackers||[],f=t._trackersGroup=(t._trackersGroup||t._renderer.g().attr({fill:"gray",opacity:.001,stroke:"gray","class":"dxc-trackers"})).attr({clipId:this._paneClipRectID||null}).append(t._group),i(e,function(i,r){u[i]?t._updateTrackerElement(r,u[i]):(u[i]=t._drawTrackerElement(r).append(f),n(u[i].element).data({series:t}))})),t._trackersTranslator=r,i(t.getVisiblePoints(),function(t,i){var u=parseInt(o?i.vy:i.vx);r[u]?n.isArray(r[u])?r[u].push(i):r[u]=[r[u],i]:r[u]=i}))},getNeighborPoint:function(t,r){var f=this._options.rotated?r:t,o=f,e=this._trackersTranslator,u=null,s,h=this._options.rotated?t:r,c=this._options.rotated?"vx":"vy";if(e){u=e[f];do u=e[o]||e[f],f--,o++;while((f>=0||o<e.length)&&!u);n.isArray(u)&&(s=p(u[0][c]-h),i(u,function(n,t){var i=p(t[c]-h);s>=i&&(s=i,u=t)}))}return u}}),s.mixins.polar.scatter=e({},ut,{drawTrackers:function(){c.scatter.drawTrackers.call(this);var n=this._trackersTranslator,t;this.isVisible()&&(i(n,function(n,i){if(i)return t=n,!1}),n[t+360]=n[t])},getNeighborPoint:function(n,t){var i=this.translators.untranslate(n,t);return c.scatter.getNeighborPoint.call(this,i.phi,i.r)}})}(jQuery,DevExpress),function(n,t){function o(n,t,i,r){var f=u.clone(n);return f.x=t,f.y=i,f.angle=r,f}function y(n,t,i,r,f){var e=n.angle+f,s=u.getCosAndSin(e),h=i.x+(n.radius+r*f)*s.cos,c=i.y-(n.radius+r*f)*s.sin;return o(t,h,c,e)}var h=t.viz.core,c=h.series,i=c.mixins.chart,l=c.mixins.polar,u=t.utils,e=i.scatter,s=h.series.helpers.rangeDataCalculator,w="canvas_position_start",b="canvas_position_top",a="discrete",r=n.extend,v=n.map,f=n.each,p={_createElementsGroup:function(n){var t=this,i=r({"class":"dxc-elements"},n);t._applyElementsClipRect(i),t._createGroup("_elementsGroup",t,t._group,i)},_createBordersGroup:function(n){var t=this,i=r({"class":"dxc-borders"},n);t._applyElementsClipRect(i),t._createGroup("_bordersGroup",t,t._group,i)},_createGroups:function(n,t){var i=this;t=t||i._styles.normal,i._createElementsGroup(t.elements),i._areBordersVisible()&&i._createBordersGroup(t.border),e._createGroups.call(i,n,{}),n&&i._markersGroup&&i._markersGroup.attr({opacity:.001})},_areBordersVisible:function(){return!1},_getDefaultSegment:function(n){return{line:v(n.line||[],function(n){return n.getDefaultCoords()})}},_prepareSegment:function(n){return{line:n}},_parseLineOptions:function(n,t){return{stroke:n.color||t,"stroke-width":n.width,dashStyle:n.dashStyle||"solid"}},_parseStyle:function(n,t){return{elements:this._parseLineOptions(n,t)}},_applyStyle:function(n){var t=this;t._elementsGroup&&t._elementsGroup.attr(n.elements),f(t._graphics||[],function(t,i){i.line&&i.line.attr({"stroke-width":n.elements["stroke-width"]}).sharp()})},_drawElement:function(n,t){return{line:this._createMainElement(n.line,{"stroke-width":this._styles.normal.elements["stroke-width"]}).append(t)}},_removeElement:function(n){n.line.remove()},_generateDefaultSegments:function(){var n=this;return v(n._segments||[],function(t){return n._getDefaultSegment(t)})},_updateElement:function(n,t,i,r,u){var f={points:t.line},e=n.line;i?e.animate(f,r,u):e.attr(f)},_clearingAnimation:function(n,t){var i=this,e=i._graphics.length-1,r={opacity:.001},u={duration:i._defaultDuration,partitionDuration:.5};i._labelsGroup&&i._labelsGroup.animate(r,u,function(){i._markersGroup&&i._markersGroup.animate(r,u,function(){f(i._defaultSegments||[],function(n,r){i._oldUpdateElement(i._graphics[n],r,!0,{partitionDuration:.5},n===e?t:undefined)})})})},_animateComplete:function(){var n=this;e._animateComplete.call(this),n._markersGroup&&n._markersGroup.animate({opacity:1},{duration:n._defaultDuration})},_animate:function(){var n=this,t=n._graphics.length-1;f(n._graphics||[],function(i,r){n._updateElement(r,n._segments[i],!0,{complete:i===t?function(){n._animateComplete()}:undefined})})},_drawPoint:function(n,t){e._drawPoint.call(this,n,t)},_createMainElement:function(n,t){return this._renderer.path(n,"line").attr(t).sharp()},_drawSegment:function(n,t,i,r){var u=this,f=u._prepareSegment(n,u._options.rotated,r);u._segments.push(f),u._graphics[i]?t||u._updateElement(u._graphics[i],f):u._graphics[i]=u._drawElement(t?u._getDefaultSegment(f):f,u._elementsGroup)},_getTrackerSettings:function(){var n=this,t=n._styles.normal.elements;return{"stroke-width":t["stroke-width"]>n._defaultTrackerWidth?t["stroke-width"]:n._defaultTrackerWidth,fill:"none"}},_getMainPointsFromSegment:function(n){return n.line},_drawTrackerElement:function(n){return this._createMainElement(this._getMainPointsFromSegment(n),this._getTrackerSettings(n))},_updateTrackerElement:function(n,t){var i=this._getTrackerSettings(n);i.points=this._getMainPointsFromSegment(n),t.attr(i)}};i.line=r({},e,p),i.stepline=r({},i.line,{_calculateStepLinePoints:function(n){var t=[];return f(n,function(n,i){var r,f;if(!n){t.push(i);return}r=t[t.length-1].y,r!==i.y&&(f=u.clone(i),f.y=r,t.push(f)),t.push(i)}),t},_prepareSegment:function(n){return i.line._prepareSegment(this._calculateStepLinePoints(n))}}),i.stackedline=r({},i.line,{}),i.fullstackedline=r({},i.line,{_getRangeData:function(n,t){var i=this;return s.calculateRangeData(i,n,t),s.addLabelPaddings(i),s.processFullStackedRange(i),i._rangeData}}),i.spline=r({},i.line,{_calculateBezierPoints:function(n,t){var i=[],r=n,u=function(n,t,i){return n>t&&i>n||n<t&&i<n?n:i};return r.length!==1?f(r,function(n,f){var a,v,y,p,h,c,e,s,b,k,d,g,l=.5,ft,et,ot,it,rt,ut,nt,tt,w;if(!n){i.push(f),i.push(f);return}if(h=r[n-1],n<r.length-1)c=r[n+1],e=f.x,s=f.y,b=h.x,k=c.x,d=h.y,g=c.y,ft=!!(!t&&(s<=h.y&&s<=c.y||s>=h.y&&s>=c.y)||t&&(e<=h.x&&e<=c.x||e>=h.x&&e>=c.x)),ft?t?(y=a=e,p=(s+c.y)/2,v=(s+h.y)/2):(p=v=s,y=(e+c.x)/2,a=(e+h.x)/2):(it=g-d,rt=b-k,ut=d*k-b*g,t?(tt=s,nt=-1*(rt*tt+ut)/it,w=nt-e||0,b-=w,k-=w):(nt=e,tt=-1*(it*nt+ut)/rt,w=tt-s||0,d-=w,g-=w),y=(e+l*k)/(1+l),p=(s+l*g)/(1+l),a=(e+l*b)/(1+l),v=(s+l*d)/(1+l)),t?(a=u(h.x,e,a),y=u(c.x,e,y)):(v=u(h.y,s,v),p=u(c.y,s,p)),et=o(f,a,v),ot=o(f,y,p),i.push(et,f,ot);else{i.push(f,f);return}}):i.push(r[0]),i},_prepareSegment:function(n,t){return i.line._prepareSegment(this._calculateBezierPoints(n,t))},_createMainElement:function(n,t){return this._renderer.path(n,"bezier").attr(t).sharp()}}),l.line=r({},l.scatter,p,{_prepareSegment:function(n,t,r){var u=[],e=this.translators.translate(w,b),f;if(r&&this._closeSegment(n),this.argumentAxisType!==a&&this.valueAxisType!==a){for(f=1;f<n.length;f++)u=u.concat(this._getTangentPoints(n[f],n[f-1],e));u.length||(u=n)}else return i.line._prepareSegment.apply(this,arguments);return{line:u}},_closeSegment:function(n){var t;t=this._segments.length?this._segments[0].line[0]:o(n[0],n[0].x,n[0].y,n[0].angle),n[n.length-1].angle!==t.angle&&(t.angle=n[n.length-1].angle-u.normalizeAngle(n[n.length-1].angle)+u.normalizeAngle(t.angle),n.push(t))},_getTangentPoints:function(n,t,i){var f=[],u=t.angle-n.angle,e=(t.radius-n.radius)/u,r;if(u===0)f=[t,n];else if(u>0)for(r=u;r>=0;r--)f.push(y(n,t,i,e,r));else for(r=0;r>=u;r--)f.push(y(n,t,i,e,u-r));return f}})}(jQuery,DevExpress),function(n,t){var o=t.viz.core,s=t.utils,h=o.series,i=h.mixins.chart,r=h.mixins.polar,u=i.line,e=o.series.helpers.rangeDataCalculator,c=n.map,f=n.extend,a=20,l={_createBorderElement:u._createMainElement,_createLegendState:function(n,t){var r=i.scatter._createLegendState.call(this,n,t);return r.opacity=n.opacity,r},_getSpecialColor:function(n){return this._options._IE8?new t.Color(n).highlight(a):n},_getRangeData:function(n,t){return e.calculateRangeData(this,n,t),e.addLabelPaddings(this),e.calculateRangeMinValue(this,n),this._rangeData},_getDefaultSegment:function(n){var t=u._getDefaultSegment(n);return t.area=t.line.concat(t.line.slice().reverse()),t},_updateElement:function(n,t,i,r,u){var e={points:t.line},o={points:t.area},f=n.line;i?(f&&f.animate(e,r),n.area.animate(o,r,u)):(f&&f.attr(e),n.area.attr(o))},_removeElement:function(n){n.line&&n.line.remove(),n.area.remove()},_drawElement:function(n){return{line:this._bordersGroup&&this._createBorderElement(n.line,{"stroke-width":this._styles.normal.border["stroke-width"]}).append(this._bordersGroup),area:this._createMainElement(n.area).append(this._elementsGroup)}},_applyStyle:function(t){var i=this;i._elementsGroup&&i._elementsGroup.attr(t.elements),i._bordersGroup&&i._bordersGroup.attr(t.border),n.each(i._graphics||[],function(n,i){i.line&&i.line.attr({"stroke-width":t.border["stroke-width"]}).sharp()})},_createPattern:function(n,t,i){if(t&&s.isObject(t)){var r=this._renderer.pattern(n,t);return r._custom=i,this._patterns.push(r),r.id}return n},_parseStyle:function(n,t,i){var f=n.border||{},r=u._parseLineOptions(f,i);return r["stroke-width"]=f.visible?r["stroke-width"]:0,{border:r,elements:{stroke:"none",fill:this._createPattern(n.color||t,n.hatching),opacity:n.opacity}}},_areBordersVisible:function(){var n=this._options;return n.border.visible||n.hoverStyle.border.visible||n.selectionStyle.border.visible},_createMainElement:function(n,t){return this._renderer.path(n,"area").attr(t)},_getTrackerSettings:function(n){return{"stroke-width":n.singlePointSegment?this._defaultTrackerWidth:0}},_getMainPointsFromSegment:function(n){return n.area}};i.area=f({},u,l,{_prepareSegment:function(n,t){var i=this._processSinglePointsAreaSegment(n,t);return{line:i,area:c(i,function(n){return n.getCoords()}).concat(c(i.slice().reverse(),function(n){return n.getCoords(!0)})),singlePointSegment:i!==n}},_processSinglePointsAreaSegment:function(n,t){if(n.length===1){var r=n[0],i=s.clone(r);return i[t?"y":"x"]+=1,i.argument=null,[r,i]}return n}}),r.area=f({},r.line,l,{_prepareSegment:function(n,t,u){u&&r.line._closeSegment.call(this,n);return i.area._prepareSegment.call(this,n)},_processSinglePointsAreaSegment:function(n){return r.line._prepareSegment.call(this,n).line}}),i.steparea=f({},i.area,{_prepareSegment:function(n,t){return n=i.area._processSinglePointsAreaSegment(n,t),i.area._prepareSegment.call(this,i.stepline._calculateStepLinePoints(n))}}),i.splinearea=f({},i.area,{_areaPointsToSplineAreaPoints:function(n){var t=n[n.length/2-1],i=n[n.length/2];n.splice(n.length/2,0,{x:t.x,y:t.y},{x:i.x,y:i.y})},_prepareSegment:function(n,t){var u=i.area,f=u._processSinglePointsAreaSegment(n,t),r=u._prepareSegment.call(this,i.spline._calculateBezierPoints(f,t));return this._areaPointsToSplineAreaPoints(r.area),r.singlePointSegment=f!==n,r},_getDefaultSegment:function(n){var t=i.area._getDefaultSegment(n);return this._areaPointsToSplineAreaPoints(t.area),t},_createMainElement:function(n,t){return this._renderer.path(n,"bezierarea").attr(t)},_createBorderElement:i.spline._createMainElement})}(jQuery,DevExpress),function(n,t){var h=t.viz,o=h.core.series,f=o.mixins.chart,s=o.mixins.polar,i=f.scatter,r=f.area,u=n.extend,c=n.each,a="canvas_position_start",l=3,e={_getSpecialColor:r._getSpecialColor,_createPattern:r._createPattern,_updateOptions:function(n){this._stackName="axis_"+(n.axis||"default")+"_stack_"+(n.stack||"default")},_parsePointStyle:function(n,t,r,u){var e=this._createPattern(n.color||t,n.hatching,u),f=i._parsePointStyle.call(this,n,e,r);return f.fill=e,f.dashStyle=n.border&&n.border.dashStyle||"solid",delete f.r,f},_applyMarkerClipRect:function(n){n.clipId=null},_clearingAnimation:function(n,t){var i=this,r=i._oldgetAffineCoordOptions(n)||i._getAffineCoordOptions(n);i._labelsGroup&&i._labelsGroup.animate({opacity:.001},{duration:i._defaultDuration,partitionDuration:.5},function(){i._markersGroup.animate(r,{partitionDuration:.5},function(){i._markersGroup.attr({scaleX:null,scaleY:null,translateX:0,translateY:0}),t()})})},_createGroups:function(n,t,r){var u=this,f={};i._createGroups.apply(u,arguments),n&&r?f=this._getAffineCoordOptions(u.translators,!0):n||(f={scaleX:1,scaleY:1,translateX:0,translateY:0}),u._markersGroup.attr(f)},_drawPoint:function(n,t,r,u){i._drawPoint.call(this,n,t,r&&!u)},_getMainColor:function(){return this._options.mainSeriesColor},_createPointStyles:function(n,t){var i=this,r=n.color||i._getMainColor(),u=i._getSpecialColor(r);return{normal:i._parsePointStyle(n,r,r,t),hover:i._parsePointStyle(n.hoverStyle||{},u,r,t),selection:i._parsePointStyle(n.selectionStyle||{},u,r,t)}},_preparePointOptions:function(n){var t=this._options;return n?u(!0,{},t,n):t},_animate:function(n){var t=this,i=function(){t._animateComplete()},r=function(n,t){var i=n.length-1;c(n||[],function(n,r){r.animate(n===i?t:undefined,r.getMarkerCoords())})};t._animatePoints(n,i,r)},_getPointSize:function(){return l},_beginUpdateData:function(t){i._beginUpdateData.call(this,t),this._patterns=n.map(this._patterns,function(n){return n._custom?(n.remove(),null):n})}};f.bar=u({},i,e,{_getAffineCoordOptions:function(n){var i=this._options.rotated,r=i?"x":"y",u={scaleX:i?.001:1,scaleY:i?1:.001};return u["translate"+r.toUpperCase()]=n[r].translate("canvas_position_default"),u},_getRangeData:function(){var i=r._getRangeData.apply(this,arguments);return i.arg.stick=!1,i},_animatePoints:function(n,t,i){var r=this;r._markersGroup.animate({scaleX:1,scaleY:1,translateY:0,translateX:0},undefined,t),n||i(r._drawedPoints,t)}}),s.bar=u({},s.scatter,e,{_animatePoints:function(n,t,i){i(this._drawedPoints,t)},_createGroups:function(){i._createGroups.apply(this,arguments)},_drawPoint:function(n,t,r){i._drawPoint.call(this,n,t,r)},_parsePointStyle:function(n){var u=e._parsePointStyle.apply(this,arguments);return u.opacity=n.opacity,u},_createMarkerGroup:function(){var n=this,t=n._getPointOptions().styles.normal,i;t["class"]="dxc-markers",n._applyMarkerClipRect(t),i=u({},t),delete i.opacity,n._createGroup("_markersGroup",n,n._group,i)},_createLegendState:r._createLegendState,_getRangeData:r._getRangeData})}(jQuery,DevExpress),function(n,t){var e=t.viz.core,i=e.series.mixins.chart,o=n.extend,h=t.utils.isDefined,c=n.map,u=n.noop,f=e.series.helpers.rangeDataCalculator,r=i.area,s={_beginUpdateData:u,areErrorBarsVisible:u,_createErrorBarGroup:u,_checkData:function(n){return h(n.argument)&&n.value!==undefined&&n.minValue!==undefined},updateTeamplateFieldNames:function(){var n=this,t=n._options,r=n.getValueFields(),i=n.name;t.rangeValue1Field=r[0]+i,t.rangeValue2Field=r[1]+i,t.tagField=n.getTagField()+i},_processRange:function(n,t){f.processTwoValues(this,n,t,"value","minValue")},_getRangeData:function(n,t){return f.calculateRangeData(this,n,t,"value","minValue"),f.addRangeSeriesLabelPaddings(this),this._rangeData},_getPointData:function(n,t){return{tag:n[t.tagField||"tag"],minValue:n[t.rangeValue1Field||"val1"],value:n[t.rangeValue2Field||"val2"],argument:n[t.argumentField||"arg"]}},_fusionPoints:function(n,t){var e=i.scatter._calcMedianValue,u=e.call(this,n,"value"),f=e.call(this,n,"minValue");return(u===null||f===null)&&(u=f=null),{minValue:f,value:u,argument:t,tag:null}},getValueFields:function(){return[this._options.rangeValue1Field||"val1",this._options.rangeValue2Field||"val2"]}};i.rangebar=o({},i.bar,s),i.rangearea=o({},r,{_drawPoint:function(n,t){n.isInVisibleArea()?(n.clearVisibility(),n.draw(this._renderer,t),this._drawedPoints.push(n),n.visibleTopMarker||n.hideMarker("top"),n.visibleBottomMarker||n.hideMarker("bottom")):n.setInvisibility()},_prepareSegment:function(t,i){var r=this._processSinglePointsAreaSegment(t,i),u=n.map(r,function(n){return n.getCoords(!0)});return{line:r,bottomLine:u,area:n.map(r,function(n){return n.getCoords()}).concat(u.slice().reverse()),singlePointSegment:r!==t}},_getDefaultSegment:function(n){var t=r._getDefaultSegment.call(this,n);return t.bottomLine=t.line,t},_removeElement:function(n){r._removeElement.call(this,n),n.bottomLine&&n.bottomLine.remove()},_drawElement:function(n,t){var i=this,u=r._drawElement.call(i,n,t);return u.bottomLine=i._bordersGroup&&i._createBorderElement(n.bottomLine,{"stroke-width":i._styles.normal.border["stroke-width"]}).append(i._bordersGroup),u},_applyStyle:function(t){var i=this,r=i._elementsGroup,u=i._bordersGroup;r&&r.attr(t.elements),u&&u.attr(t.border),n.each(i._graphics||[],function(n,i){i.line&&i.line.attr({"stroke-width":t.border["stroke-width"]}),i.bottomLine&&i.bottomLine.attr({"stroke-width":t.border["stroke-width"]})})},_updateElement:function(n,t,i,u,f){r._updateElement.call(this,n,t,i,u,f);var o={points:t.bottomLine},e=n.bottomLine;e&&(i?e.animate(o,u):e.attr(o))}},s)}(jQuery,DevExpress),function(n,t){var f=t.viz.core.series.mixins,r=f.chart,e=r.scatter,i=r.bar,o=t.utils.isDefined,h=n.extend,s=n.each,u=n.noop;r.bubble=h({},e,{_fillErrorBars:u,_getRangeCorrector:u,_calculateErrorBars:u,_getMainColor:i._getMainColor,_createPointStyles:i._createPointStyles,_createPattern:i._createPattern,_preparePointOptions:i._preparePointOptions,_getSpecialColor:i._getSpecialColor,_applyMarkerClipRect:r.line._applyElementsClipRect,_parsePointStyle:f.polar.bar._parsePointStyle,_createLegendState:r.area._createLegendState,_createMarkerGroup:f.polar.bar._createMarkerGroup,areErrorBarsVisible:u,_createErrorBarGroup:u,_checkData:function(n){return o(n.argument)&&o(n.size)&&n.value!==undefined},_getPointData:function(n,t){var i=e._getPointData.call(this,n,t);return i.size=n[t.sizeField||"size"],i},_fusionPoints:function(n,t){var r=e._calcMedianValue;return{size:r.call(this,n,"size"),value:r.call(this,n,"value"),argument:t,tag:null}},getValueFields:function(){var n=this._options;return[n.valueField||"val",n.sizeField||"size"]},updateTeamplateFieldNames:function(){var n=this,t=n._options,r=n.getValueFields(),i=n.name;t.valueField=r[0]+i,t.sizeField=r[1]+i,t.tagField=n.getTagField()+i},_clearingAnimation:function(n,t){var i=this,r=.5,f=i._drawedPoints.length-1,u=i._labelsGroup;u&&u.animate({opacity:.001},{duration:i._defaultDuration,partitionDuration:r},function(){s(i._drawedPoints||[],function(n,i){i.animate(n===f?t:undefined,{r:0},r)})})},_animate:function(){var t=this,r=t._drawedPoints.length-1,i=t._labelsGroup,u=function(){i&&i.animate({opacity:1},{duration:t._defaultDuration})};s(t._drawedPoints||[],function(n,t){t.animate(n===r?u:undefined,{r:t.bubbleSize,translateX:t.x,translateY:t.y})})},_beginUpdateData:i._beginUpdateData})}(jQuery,DevExpress),function(n,t){var e=t.viz.core.series.mixins,u=e.pie,h=t.utils,f=e.chart.scatter,o=e.chart.bar,c=n.extend,i=n.each,r=n.noop,s=n.map,l=isFinite,a=Math.max,v=Math.sqrt,y=Math.pow,p=Math.round;u.pie=c({},o,{_createLabelGroup:f._createLabelGroup,_createGroups:f._createGroups,_createErrorBarGroup:r,_drawPoint:function(n){f._drawPoint.apply(this,arguments),n.isVisible()||n.setInvisibility()},adjustLabels:function(){var u=this,t=u._points||[],r,n=[];i(t,function(t,i){i._label.hasText()&&i._label.getLayoutOptions().position!=="inside"&&(i.setLabelEllipsis(),n.push(i._label.getBoundingRect().width))}),n.length&&(r=a.apply(null,n)),i(t,function(n,t){t._label.hasText()&&t._label.getLayoutOptions().position!=="inside"&&(t._maxLabelLength=r,t.updateLabelCoord())})},_processRange:r,_applyElementsClipRect:r,getColor:r,areErrorBarsVisible:r,_prepareSeriesToDrawing:r,_endUpdateData:f._prepareSeriesToDrawing,resetLabelSetups:function(){i(this._points||[],function(n,t){t._label.clearVisibility()})},drawLabelsWOPoints:function(n){var t=this,u=t._options,f=t._points||[],r;return u.label.position==="inside"?!1:(t._createGroups(),r=t._labelsGroup,i(f,function(i,u){u.drawLabel(n,t._renderer,r,!0)}),!0)},_getCreatingPointOptions:function(){return this._getPointOptions()},_updateOptions:function(n){this.labelSpace=0,this.innerRadius=this.type==="pie"?0:n.innerRadius},_checkData:function(n){var t=o._checkData(n);return this._options.paintNullPoints?t:t&&n.value!==null},_createMarkerGroup:function(){var n=this;n._markersGroup||(n._markersGroup=n._renderer.g().attr({"class":"dxc-markers"}).append(n._group))},_getMainColor:function(){return this._options.mainSeriesColor()},_getPointOptions:function(){return this._parsePointOptions(this._preparePointOptions(),this._options.label)},_getRangeData:function(){return this._rangeData},_getArrangeTotal:function(n){var t=0;return i(n,function(n,i){i.isVisible()&&(t+=i.initialValue)}),t},_createPointStyles:function(n){var t=this,i=n.color||t._getMainColor(),r=t._getSpecialColor(i);return{normal:t._parsePointStyle(n,i,i),hover:t._parsePointStyle(n.hoverStyle,r,i),selection:t._parsePointStyle(n.selectionStyle,r,i),legendStyles:{normal:t._createLegendState(n,i),hover:t._createLegendState(n.hoverStyle,r),selection:t._createLegendState(n.selectionStyle,r)}}},_getArrangeMinShownValue:function(n,t){var r=this._options.minSegmentSize,u=0,f=0;return t=t||n.length,i(n,function(n,i){i.isVisible()&&(i.initialValue<r*t/360?u+=r:f+=i.initialValue)}),u<360?r*f/(360-u):0},_applyArrangeCorrection:function(n,t,r){var u=this._options,s=u.segmentsDirection!=="anticlockwise",c=l(u.startAngle)?h.normalizeAngle(u.startAngle):0,a=u.minSegmentSize,o,f=0,e=0;r===0&&(r=n.length,e=1),i(s?n:n.concat([]).reverse(),function(n,i){var u=i.isVisible()?e||i.initialValue:0,s;a&&i.isVisible()&&u<t&&(s=t),o=u/r,i.correctValue(f,o,e+(s||0)),i.shiftedAngle=c,f=f+(s||u)}),this._rangeData={val:{min:0,max:f}}},arrangePoints:function(){var n=this,r=n._options.minSegmentSize,u,f=0,t,i=n._originalPoints=n._points=s(n._originalPoints||[],function(n){return n.value===null||n.value<0||n.value===0&&!r?(n.dispose(),null):(n.index=f++,n)});t=n._getArrangeTotal(i),r&&(u=this._getArrangeMinShownValue(i,t)),n._applyArrangeCorrection(i,u,t)},correctPosition:function(n){i(this._points,function(t,i){i.correctPosition(n)}),this._centerX=n.centerX,this._centerY=n.centerY,this._radiusOuter=n.radiusOuter},_animate:function(t){var f=this,r=0,e=.2,i=f._points,u=i&&i.length,h=1/(e*(u-1)+1),o=function(){f._animateComplete()},s=function(){i[r]&&i[r].animate(r===u-1?o:undefined,h,c),r++},c=function(n,t){t>=e&&(this.step=null,s())};t?s():n.each(i,function(n,t){t.animate(n===u-1?o:undefined)})},getVisiblePoints:function(){return s(this._points,function(n){return n.isVisible()?n:null})},getPointByCoord:function(n,t){for(var r=this._points,i=0;i<r.length;i++)if(r[i].coordsIn(n,t))return r[i]},_beginUpdateData:function(){this._deletePatterns(),this._patterns=[]}}),u.doughnut=u.donut=u.pie}(jQuery,DevExpress),function(n,t){var c=t.viz,o=c.core.series,i=o.mixins.chart,s=i.scatter,f=i.bar,e=o.helpers.rangeDataCalculator,h=t.utils.isDefined,r=n.extend,l=n.each,u=n.noop,a=10;i.stock=r({},s,{_animate:u,_applyMarkerClipRect:function(n){n.clipId=this._forceClipping?this._paneClipRectID:this._widePaneClipRectID},_preparePointOptions:f._preparePointOptions,_getRangeCorrector:u,_createErrorBarGroup:u,areErrorBarsVisible:u,_createMarkerGroup:function(){var n=this,t,i=n._getPointOptions().styles,r=i.normal,u=i.positive.normal,f=i.reduction.normal,e=i.reductionPositive.normal,o={"class":"dxc-markers"};n._applyMarkerClipRect(o),r["class"]="default-markers",u["class"]="default-positive-markers",f["class"]="reduction-markers",e["class"]="reduction-positive-markers",n._createGroup("_markersGroup",n,n._group,o),t=n._markersGroup,n._createGroup("defaultMarkersGroup",t,t,r),n._createGroup("reductionMarkersGroup",t,t,f),n._createGroup("defaultPositiveMarkersGroup",t,t,u),n._createGroup("reductionPositiveMarkersGroup",t,t,e)},_createGroups:function(){s._createGroups.call(this,!1)},_clearingAnimation:function(n,t){t()},_getCreatingPointOptions:function(){var i=this,t,n=i._predefinedPointOptions;return n||(t=this._getPointOptions(),i._predefinedPointOptions=n=r(!0,{styles:{}},t),n.styles.normal=n.styles.positive.normal=n.styles.reduction.normal=n.styles.reductionPositive.normal={"stroke-width":t.styles&&t.styles.normal&&t.styles.normal["stroke-width"]}),n},_checkData:function(n){return h(n.argument)&&n.highValue!==undefined&&n.lowValue!==undefined&&n.openValue!==undefined&&n.closeValue!==undefined},_processRange:function(n,t){e.processTwoValues(this,n,t,"highValue","lowValue")},_getRangeData:function(n,t){return e.calculateRangeData(this,n,t,"highValue","lowValue"),e.addRangeSeriesLabelPaddings(this),this._rangeData},_getPointData:function(n,t){var r=this,i,f=t.openValueField||"open",e=t.closeValueField||"close",o=t.highValueField||"high",s=t.lowValueField||"low",u;r.level=t.reduction.level;switch((r.level||"").toLowerCase()){case"open":i=f;break;case"high":i=o;break;case"low":i=s;break;default:i=e,r.level="close"}return u=n[i],{argument:n[t.argumentField||"date"],highValue:n[o],lowValue:n[s],closeValue:n[e],openValue:n[f],reductionValue:u,tag:n[t.tagField||"tag"],isReduction:r._checkReduction(u)}},_parsePointStyle:function(n,t,i){return{stroke:n.color||t,"stroke-width":n.width,fill:n.color||i}},updateTeamplateFieldNames:function(){var i=this,n=i._options,r=i.getValueFields(),t=i.name;n.openValueField=r[0]+t,n.highValueField=r[1]+t,n.lowValueField=r[2]+t,n.closeValueField=r[3]+t,n.tagField=i.getTagField()+t},_getDefaultStyle:function(n,t){var r=this,i=n.color||r._options.mainSeriesColor;return{normal:r._parsePointStyle(n,i,i,t),hover:r._parsePointStyle(n.hoverStyle,i,i,t),selection:r._parsePointStyle(n.selectionStyle,i,i,t)}},_getReductionStyle:function(n,t){var r=this,i=n.reduction.color;return{normal:r._parsePointStyle({color:i,width:n.width,hatching:n.hatching},i,i,t),hover:r._parsePointStyle(n.hoverStyle,i,i,t),selection:r._parsePointStyle(n.selectionStyle,i,i,t)}},_createPointStyles:function(n,t){var e=this,s=e._options.innerColor,i=e._getDefaultStyle(n,t),u,o,f;return u=r(!0,{},i),o=e._getReductionStyle(n,t),f=r(!0,{},o),u.normal.fill=u.hover.fill=u.selection.fill=s,f.normal.fill=f.hover.fill=f.selection.fill=s,i.positive=u,i.reduction=o,i.reductionPositive=f,i},_endUpdateData:function(){delete this.prevLevelValue,delete this._predefinedPointOptions},_checkReduction:function(n){var t=this,i=!1;return n!==null&&(h(t.prevLevelValue)&&(i=n<t.prevLevelValue),t.prevLevelValue=n),i},_fusionPoints:function(n,t){var r={},u,e=-Infinity,o=+Infinity,f,s;if(!n.length)return{};l(n,function(n,t){t.hasValue()&&(e=Math.max(e,t.highValue),o=Math.min(o,t.lowValue),f=f!==undefined?f:t.openValue,s=t.closeValue!==undefined?t.closeValue:s)}),r.argument=t,r.openValue=f,r.closeValue=s,r.highValue=e,r.lowValue=o,r.tag=null;switch((this.level||"").toLowerCase()){case"open":u=f;break;case"high":u=e;break;case"low":u=o;break;default:u=s}return r.reductionValue=u,r.isReduction=this._checkReduction(u),r},_getPointSize:function(){return a},getValueFields:function(){var n=this._options;return[n.openValueField||"open",n.highValueField||"high",n.lowValueField||"low",n.closeValueField||"close"]},getArgumentField:function(){return this._options.argumentField||"date"},_beginUpdateData:u}),i.candlestick=r({},i.stock,{_createPattern:f._createPattern,_beginUpdateData:f._beginUpdateData,_parsePointStyle:function(n,t,r,u){var f=this._createPattern(n.color||r,n.hatching,u),e=i.stock._parsePointStyle.call(this,n,t,f);return e.fill=f,e}})}(jQuery,DevExpress),function(n,t){function y(n,t,i,r){return n=w.clone(n),n.value=t,n.minValue=i,n.translate(),n.argument=n.argument+r,n}function p(t){return t=n.map(t,function(n){var i=[n];return n.leftHole&&(i=[y(n,n.leftHole,n.minLeftHole,"left"),n]),n.rightHole&&i.push(y(n,n.rightHole,n.minRightHole,"right")),i})}function b(n,t){for(var i;n;){if(i=n._segmentByArg[t],i)break;n=n._prevSeries}return i}var l=t.viz.core,a=l.series,i=a.mixins.chart,v=a.mixins.polar,o=i.area,h=i.bar,c=i.line,u=l.series.helpers.rangeDataCalculator,r=n.extend,w=t.utils,s=n.noop,f={_processRange:s,_getRangeCorrector:s,_fillErrorBars:s,_calculateErrorBars:s,_processStackedRange:function(){var t=this,i;t._resetRangeData(),n.each(t.getAllPoints(),function(n,r){u.processRange(t,r,i),i=r})},_getRangeData:function(){return this._processStackedRange(),o._getRangeData.apply(this,arguments)}},e=r({},f,{_getRangeData:function(n,t){var i=this;return i._processStackedRange(),u.calculateRangeData(i,n,t),u.addLabelPaddings(i),u.processFullStackedRange(i),u.calculateRangeMinValue(i,n),i._rangeData},isFullStackedSeries:function(){return!0}});i.stackedline=r({},c,f,{_getRangeData:function(){return this._processStackedRange(),c._getRangeData.apply(this,arguments)}}),i.stackedspline=r({},i.spline,f,{_getRangeData:i.stackedline._getRangeData}),i.fullstackedline=r({},c,e,{_getRangeData:function(n,t){var i=this;return i._processStackedRange(),u.calculateRangeData(i,n,t),u.addLabelPaddings(i),u.processFullStackedRange(i),i._rangeData}}),i.fullstackedspline=r({},i.spline,e,{_getRangeData:i.fullstackedline._getRangeData}),i.stackedbar=r({},h,f,{_getRangeData:function(){return this._processStackedRange(),h._getRangeData.apply(this,arguments)}}),i.fullstackedbar=r({},h,e,{_getRangeData:function(){var i=e._getRangeData.apply(this,arguments);return i.arg.stick=!1,i}}),i.stackedarea=r({},o,f,{_prepareSegment:function(n,t){return o._prepareSegment.call(this,p(n,this._prevSeries),t)}}),i.stackedsplinearea=r({},i.splinearea,f,{_prepareSegment:function(t,r){var f=this,o;if(t=p(t,f._prevSeries),this._prevSeries&&t.length!=1){var s=i.spline._calculateBezierPoints(t,r),u=n.map(t,function(n){var t=n.getCoords(!0);return t.argument=n.argument,t}),h=n.map(f._prevSeries._segments,function(n){return n.line}),e={};n.each(h,function(n,t){if(t.argument!==null){var i=t.argument.valueOf();e[i]?e[i].push(t):e[i]=[t]}}),f._prevSeries._segmentByArg=e,u=i.spline._calculateBezierPoints(u,r),n.each(u,function(n,t){var r=t.argument.valueOf(),i;n%3==0&&(i=e[r]||b(f._prevSeries,r),i&&(u[n-1]&&i[0]&&(u[n-1]=i[0]),u[n+1]&&(u[n+1]=i[2]||t)))}),o={line:s,area:s.concat(u.reverse())},f._areaPointsToSplineAreaPoints(o.area)}else o=i.splinearea._prepareSegment.call(this,t,r);return o}}),i.fullstackedarea=r({},o,e,{_prepareSegment:i.stackedarea._prepareSegment}),i.fullstackedsplinearea=r({},i.splinearea,e,{_prepareSegment:i.stackedsplinearea._prepareSegment}),v.stackedbar=r({},v.bar,f,{_getRangeData:i.stackedbar._getRangeData})}(jQuery,DevExpress),function(n,t){function s(){this.ctor.apply(this,arguments)}var r=t.viz.core.series,e=r.helpers.consts.states,o=n.each,h=n.extend,f=t.utils.isDefined,u=r.mixins,i=n.noop;r.points={Point:s},s.prototype={ctor:function(n,t,i){this.series=n,this.update(t,i),this._emptySettings={fill:null,stroke:null,dashStyle:null}},getColor:function(){return this._styles.normal.fill||this.series.getColor()},_getStyle:function(){var n=this,i=n._styles,t;return n.isSelected()?t=i.selection:n.isHovered()?t=i.hover:(n.fullState=e.normalMark,t=i.normal),n._currentStyle=t,t},update:function(n,t){this.updateOptions(t),this.updateData(n)},updateData:function(n){var t=this;t.argument=t.initialArgument=t.originalArgument=n.argument,t.tag=n.tag,t.index=n.index,t.lowError=n.lowError,t.highError=n.highError,t._updateData(n),t.hasValue()||t.setInvisibility(),t._fillStyle(),t._updateLabelData()},deleteMarker:function(){var t=this;t.graphic&&(n(t.graphic.element).removeData(),t.graphic.remove()),t.graphic=null},_drawErrorBar:i,draw:function(n,t,i,r){var u=this;u._needDeletingOnDraw&&(u.deleteMarker(),u._needDeletingOnDraw=!1),u._needClearingOnDraw&&(u.clearMarker(),u._needClearingOnDraw=!1),u._hasGraphic()?u._updateMarker(i,undefined,t.markers):u._options.visible&&u._drawMarker(n,t.markers,i,r),u._drawLabel(n,t.labels),u._drawErrorBar(n,t.errorBars,i)},applyStyle:function(n){var t=this;if(t.graphic){if(n==="normal"){if(t.isHovered()){t.applyStyle("hover");return}t.clearMarker()}else t.graphic.toForeground();t._currentStyle=t._styles[n],t._updateMarker(!0,t._currentStyle)}},setHoverState:function(){this.series.setPointHoverState(this)},releaseHoverState:function(n){var t=this;t.series.releasePointHoverState(t,n),t.graphic&&(t.isSelected()||t.graphic.toBackground())},setSelectedState:function(){this.series.setPointSelectedState(this)},releaseSelectedState:function(){this.series.releasePointSelectedState(this)},select:function(){this.series.selectPoint(this)},clearSelection:function(){this.series.deselectPoint(this)},showTooltip:function(){this.series.showPointTooltip(this)},hideTooltip:function(){this.series.hidePointTooltip(this)},_checkLabelsChanging:function(n,t){if(n){var i=~t.indexOf("range"),r=~n.indexOf("range");return r&&!i||!r&&i}return!1},updateOptions:function(n){if(f(n)){var t=this,r=t._options,i=n.widgetType,o=r&&r.type,e=n.type;u[i].pointTypes[o]!==u[i].pointTypes[e]?(t._needDeletingOnDraw=!0,t._needClearingOnDraw=!1,t._checkLabelsChanging(o,e)&&t.deleteLabel(),t._resetType(o,i),t._setType(e,i)):(t._needDeletingOnDraw=t._checkSymbol(r,n),t._needClearingOnDraw=t._checkCustomize(r,n)),t._options=n,t._fillStyle(),t._updateLabelOptions(u[i].pointTypes[e])}},translate:function(n){var t=this;t.translators=n||t.translators,t.translators&&t.hasValue()&&t._translate(t.translators)},_checkCustomize:function(n,t){return n.styles.usePointCustomOptions&&!t.styles.usePointCustomOptions},_getCustomLabelVisibility:function(){if(this._styles.useLabelCustomOptions)return this._options.label.visible?"visible":"hidden"},getBoundingRect:function(){return this._getGraphicBbox()},_resetType:function(n,t){var i=this;n&&o(r.points.mixins[u[t].pointTypes[n]],function(n){delete i[n]})},_setType:function(n,t){var i=this;o(r.points.mixins[u[t].pointTypes[n]],function(n,t){i[n]=t})},isInVisibleArea:function(){return this.inVisibleArea},isSelected:function(){return!!(this.fullState&e.selectedMark)},isHovered:function(){return!!(this.fullState&e.hoverMark)},getOptions:function(){return this._options},animate:function(n,t,i){var r=this;if(!this.graphic){n&&n();return}this.graphic.animate(t,{partitionDuration:i},n)},getCoords:function(n){var t=this;return n?t._options.rotated?{x:t.minX,y:t.y}:{x:t.x,y:t.minY}:{x:t.x,y:t.y}},getDefaultCoords:function(){var n=this;return n._options.rotated?{x:n.defaultX,y:n.y}:{x:n.x,y:n.defaultY}},_calculateVisibility:function(n,t,i,r){var u=this,e,o,s=u._options.rotated;u.translators&&(e=u.translators.x.getCanvasVisibleArea(),o=u.translators.y.getCanvasVisibleArea(),u.inVisibleArea=e.min>n+(i||0)||e.max<n||o.min>t+(r||0)||o.max<t||s&&f(i)&&i!==0&&(e.min===n+i||e.max===n)||!s&&f(r)&&r!==0&&(o.min===t+r||o.max===t)?!1:!0)},correctPosition:i,hasValue:function(){return this.value!==null&&this.minValue!==null},getBoundaryCoords:function(){return this.getBoundingRect()},getCrosshairCoords:i,getPointRadius:i,_populatePointShape:i,_checkSymbol:i,getMarkerCoords:i,hide:i,show:i,hideMarker:i,setInvisibility:i,clearVisibility:i,isVisible:i,resetCorrection:i,correctValue:i,setPercentValue:i,correctCoordinates:i,coordsIn:i,getTooltipParams:i,setLabelEllipsis:i,updateLabelCoord:i,drawLabel:i,dispose:function(){var n=this;n.deleteMarker(),n.deleteLabel(),n._errorBar&&this._errorBar.remove(),n._options=n._styles=n.series=n.translators=n._errorBar=null},getTooltipFormatObject:function(n){var t=this,i=t._getFormatObject(n),r=[],u=[];return t.stackPoints&&(o(t.stackPoints,function(t,i){if(i.isVisible()){var f=i._getFormatObject(n);u.push(f),r.push(f.seriesName+": "+f.valueText)}}),h(i,{points:u,valueText:r.join("\n"),stackName:t.stackPoints.stackName})),i},setHole:function(n,t){var i=this,r=isFinite(i.minValue)?i.minValue:0;f(n)&&(t==="left"?(i.leftHole=i.value-n,i.minLeftHole=r-n):(i.rightHole=i.value-n,i.minRightHole=r-n))},resetHoles:function(){this.leftHole=null,this.minLeftHole=null,this.rightHole=null,this.minRightHole=null},getLabel:function(){return this._label}}}(jQuery,DevExpress),function(n,t,i){function p(n,t){return n.x>=t.x&&n.x<=t.x+t.width&&n.y>=t.y&&n.y<=t.y+t.height}function w(n,t){var i=r.normalizeAngle(n.angle);return i<180?n.y>t.y:n.y<t.y}function b(n,t){var i=t.background?{x:t.x0,y:t.y0}:f(n.center,t.points);return[f(i,[{x:n.x,y:n.center.y},{x:n.center.x,y:n.y+n.height},{x:n.x+n.width,y:n.center.y},{x:n.center.x,y:n.y}])].concat([i])}function k(n,t){var i=t.background?{x:t.x0,y:t.y0}:f(n.center,t.points),u=Math.atan2(i.y-n.y,i.x-n.x),r=o(-u/Math.PI*180);return[{x:n.x+n.r*r.cos,y:n.y-n.r*r.sin}].concat([i])}function d(n,t){var o=n.angle,i=f(n.center,g(t)),s=u(n.x+(i.y-n.y)/Math.tan(r.degreesToRadians(-o))),e={};return w(n,i)?(e.x=s,e.y=i.y):e=i,[n.center,f(n,[e,i])].concat([i])}function g(t){var e=[],r=t.x0,f=t.y0,i=o(t.rotationAngle||0);return n.each(t.points,function(n,t){e.push({x:u((t.x-r)*i.cos-(t.y-f)*i.sin+r),y:u((t.x-r)*i.sin+(t.y-f)*i.cos+f)})}),e}function s(){}var r=t.utils,h=t.viz.core,e=r.isDefined,c=n.extend,u=Math.round,l=Math.min,y=Math.ceil,f=r.getClosestCoord,o=r.getCosAndSin,a=8,v=4;s.prototype={constructor:s,clearVisibility:function(){this._group&&this._group.attr("visibility")&&this._group.attr({visibility:null})},hide:function(){this._group&&this._group.attr("visibility")!=="hidden"&&this._group.attr({visibility:"hidden"})},show:function(){this._group&&this._group.attr("visibility")!=="visible"&&this._group.attr({visibility:"visible"})},getVisibility:function(){return this._group&&this._group.attr("visibility")},updateData:function(n){return e(n)&&(this._data=n.formatObject),this},updateOptions:function(n){return this.setOptions(c(!0,{},this._options,n)),this},setOptions:function(n){var t=this,i=t._options;n=n||{},t._fontStyles=h.utils.patchFontOptions(n.attributes&&n.attributes.font),t._options=n,i&&(t._isBackgroundChanged(i.background,t._options.background)&&t._deleteBackground(),t._isConnectorChanged(i.connector,t._options.connector)&&t._deleteConnector())},setDataField:function(n,t){this._data=this._data||{},this._data[n]=t},getData:function(){return this._data},setFigureToDrawConnector:function(n){this.figure=n,this._setFigureOptions(n)},_deleteElements:function(){this._deleteConnector(),this._deleteBackground(),this._deleteText(),this._deleteGroups()},dispose:function(){this._data=null,this._options=null,this._positioningFunction=null,this._deleteElements()},_deleteText:function(){this._text&&this._text.remove(),this._text=null},_deleteGroups:function(){this._insideGroup=null,this._group&&this._group.remove(),this._group=null},_drawGroups:function(n,t){this._group||(this._group=n.g().append(t)),this._insideGroup||(this._insideGroup=n.g().append(this._group))},_drawText:function(n,t){var i=this;i._text||(i._text=n.text("",0,0).append(i._insideGroup)),i._text.css(i._fontStyles).attr({text:t}),i._initTextBbox=i._textBBox=i._text.getBBox()},_updateText:function(n){this._text.attr({text:n}),this._textBBox=this._text.getBBox()},_drawBackground:function(n){var t=this,u=t._options,i=u.background||{},r=c(t._getBackgroundSettings(),i);t._checkBackground(i)&&(t._background||(t._background=n.rect().append(t._insideGroup)),t._background.attr(r).toBackground(),t._backgroundBbox=r)},_drawConnector:function(n,t){var i=this,u=i._options.connector||{},r=i._connector;i._checkConnector(u)&&(r?r.attr({points:i._getConnectorPoints()}):i._connector=r=n.path([],"line").append(t),r.attr(u).sharp().toBackground())},_getConnectorPoints:function(){var t=this,i=t.figure,n=t.getBoundingRect(),r=n.x+n.width/2,u=n.y+n.height/2,f=[{x:r,y:n.y},{x:n.x+n.width,y:u},{x:r,y:n.y+n.height},{x:n.x,y:u}],e=t._options.rotationAngle;return!i||p(n,i)?[]:t._getConnectorPointsOnFigure(i,{rotationAngle:e,points:f,x0:r,y0:u,background:t._background})},_setFigureOptions:function(n){var t=this,i;n&&(e(n.r)?(t.figure.center=n,i=k):e(n.angle)?(t.figure.center=n,i=d):(t.figure.center={x:n.x+n.width/2,y:n.y+n.height/2},i=b),t._getConnectorPointsOnFigure=i)},_setVisibility:function(n){this._group&&this._group.attr({visibility:n})},draw:function(n,t,i){var r=this,u=r._format();return e(u)&&u!==""?(r._drawGroups(n,t),r._setVisibility(i),r._drawText(n,u),r._drawBackground(n),r._rotateLabel(),r._setBoundingRect(),r._drawConnector(n,r._group)):(r._setVisibility("hidden"),r._insideGroup=null),r._formatText=u,r},fit:function(n){function k(n){i.push(n.replace(/<[^>]+>/g,"")),p<i[i.length-1].length&&(p=i[i.length-1].length)}var t=this,c,f="",a=t._options.rotationAngle,h=o(a),r=t._formatText,v=t._initTextBbox,i=[],e,s,p=0,w,b,u;if(t._text){if(w=a?l(v.width/h.cos,v.height/h.sin):v.width,b=a?l(n.width/h.cos,n.height/h.sin):n.width,w<=b){t._updateText(r),t._drawBackground(),t._setBoundingRect();return}for(e=r.indexOf("<br/>"),s=0;e!==-1;)k(r.slice(s,e)),s=e+5,e=r.indexOf(s,"<br/>");for(k(r.slice(s,r.length)),c=y(p*b/w),u=0;u<i.length;u++)u>0&&(f+="<br/>"),f+=i[u].length>c?i[u].substr(0,c-4)+"...":i[u];return r!==f&&(t._updateText(f),t._drawBackground(),t._setBoundingRect()),t}},_deleteBackground:function(){this._background&&this._background.remove(),this._background=null},_isBackgroundChanged:function(n,t){return this._checkBackground(n||{})!==this._checkBackground(t||{})},_checkBackground:function(n){var t=n.fill&&n.fill!=="none",i=n["stroke-width"]&&n.stroke&&n.stroke!=="none";return t||i},_getBackgroundSettings:function(){var n=this._textBBox;return{x:n.x-a,y:n.y-v,width:n.width+2*a,height:n.height+2*v}},_deleteConnector:function(){this._connector&&this._connector.remove(),this._connector=null},_isConnectorChanged:function(n,t){return this._checkConnector(n||{})!==this._checkConnector(t||{})},_checkConnector:function(n){return n&&n["stroke-width"]},_rotateLabel:function(){var n=this._initTextBbox;this._insideGroup.rotate(this._options.rotationAngle,n.x+n.width/2,n.y+n.height/2)},_format:function(){var f=this,n=f._data,r=f._options,u=t.formatHelper;return n.valueText=u.format(n.value,r.format,r.precision),n.argumentText=u.format(n.argument,r.argumentFormat,r.argumentPrecision),n.percent!==i&&(n.percentText=u.format(n.percent,"percent",r.percentPrecision)),n.total!==i&&(n.totalText=u.format(n.total,r.format,r.precision)),n.openValue!==i&&(n.openValueText=u.format(n.openValue,r.format,r.precision)),n.closeValue!==i&&(n.closeValueText=u.format(n.closeValue,r.format,r.precision)),n.lowValue!==i&&(n.lowValueText=u.format(n.lowValue,r.format,r.precision)),n.highValue!==i&&(n.highValueText=u.format(n.highValue,r.format,r.precision)),n.reductionValue!==i&&(n.reductionValueText=u.format(n.reductionValue,r.format,r.precision)),r.customizeText?r.customizeText.call(n,n):n.valueText},shift:function(n,t){var i=this;if(i._insideGroup)return i._insideGroup.attr({translateX:u(n-i.BBox.x),translateY:u(t-i.BBox.y)}),i._drawConnector(),i},_setBoundingRect:function(){this.BBox=this._backgroundBbox||this._textBBox},getBoundingRect:function(){var n={},i=this,t=this._insideGroup;return t&&(n.width=i.BBox.width,n.height=i.BBox.height,n.x=this.BBox.x+t.attr("translateX"),n.y=this.BBox.y+t.attr("translateY")),n},hasText:function(){return!!this._text},getLayoutOptions:function(){var n=this._options;return{alignment:n.alignment,background:this._checkBackground(n.background||{}),horizontalOffset:n.horizontalOffset,verticalOffset:n.verticalOffset,radialOffset:n.radialOffset,position:n.position}}},h.series.points.Label=s}(jQuery,DevExpress),function(n,t){function p(n){return[-n,-n,n,-n,n,n,-n,n,-n,-n]}function w(n){var t=s(n);return[-t,0,0,-t,t,0,0,t,-t,0]}function b(n){var t=s(n),i=o(t/2),r=s(t/2);return[-t,-i,-i,-t,0,-r,i,-t,t,-i,r,0,t,i,i,t,0,r,-i,t,-t,i,-r,0]}function k(n){return[-n,-n,n,-n,0,n,-n,-n]}var a=t.viz.core,e=a.series,u=n.extend,d=t.utils.isNumber,i=t.utils.isDefined,f=Math,r=f.round,o=f.floor,s=f.ceil,v=f.abs,h=20,c=20,y=10,l="canvas_position_default";e.points.mixins=e.points.mixins||{},e.points.mixins.symbolPoint={deleteLabel:function(){this._label.dispose(),this._label=null},_hasGraphic:function(){return this.graphic},clearVisibility:function(){var t=this,n=t.graphic;n&&n.attr("visibility")&&n.attr({visibility:null}),t._label.clearVisibility()},isVisible:function(){return this.inVisibleArea&&this.series.isVisible()},setInvisibility:function(){var n=this,t=n.graphic;t&&t.attr("visibility")!=="hidden"&&t.attr({visibility:"hidden"}),n._errorBar&&n._errorBar.attr({visibility:"hidden"}),n._label.hide()},clearMarker:function(){var n=this.graphic;n&&n.attr(this._emptySettings)},setAdjustSeriesLabels:function(n){this.adjustSeriesLabels=n},_createLabel:function(){this._label=a.CoreFactory.createLabel()},_updateLabelData:function(){this._label.updateData({formatObject:this._getLabelFormatObject(),initialValue:this.initialValue})},_updateLabelOptions:function(){this._label||this._createLabel(),this._label.setOptions(this._options.label)},_checkImage:function(n){return i(n)&&(typeof n=="string"||i(n.url))},_fillStyle:function(){this._styles=this._options.styles},_checkSymbol:function(n,t){var i=n.symbol,r=t.symbol,u=i==="circle"&&r!=="circle"||i!=="circle"&&r==="circle",f=this._checkImage(n.image)!==this._checkImage(t.image);return!!(u||f)},_populatePointShape:function(n,t){switch(n){case"square":return p(t);case"polygon":return w(t);case"triangle":return k(t);case"cross":return b(t)}},correctValue:function(n){var t=this;t.hasValue()&&(t.value=t.initialValue+n,t.minValue=n,t.translate())},resetCorrection:function(){this.value=this.initialValue,this.minValue=l},_getTranslates:function(n){var t=this.x,i=this.y;return n&&(this._options.rotated?t=this.defaultX:i=this.defaultY),{x:t,y:i}},_createImageMarker:function(n,t,i){var u=i.width||h,f=i.height||c;return n.image(-r(u*.5),-r(f*.5),u,f,i.url?i.url.toString():i.toString(),"center").attr({translateX:t.translateX,translateY:t.translateY,visibility:t.visibility})},_createSymbolMarker:function(n,t){var i,r=this._options;switch(r.symbol){case"circle":delete t.points,i=n.circle().attr(t);break;case"square":case"polygon":case"triangle":case"cross":i=n.path([],"area").attr(t).sharp()}return i},_createMarker:function(t,i,r,u,f){var e=this,o=e._checkImage(r)?e._createImageMarker(t,u,r):e._createSymbolMarker(t,u,f);return o&&(o.append(i),n(o.element).data({point:e})),o},_getSymbolBbox:function(n,t,i){return{x:n-i,y:t-i,width:i*2,height:i*2}},_getImageBbox:function(n,t){var i=this._options.image,u=i.width||h,f=i.height||c;return{x:n-r(u/2),y:t-r(f/2),width:u,height:f}},_getGraphicBbox:function(){var n=this,t=n._options,i=n.x,r=n.y,u;return u=t.visible?n._checkImage(t.image)?n._getImageBbox(i,r):n._getSymbolBbox(i,r,t.styles.normal.r):{x:i,y:r,width:0,height:0}},_getVisibleArea:function(){var n=this.translators,t,i;if(n)return t=n.x.getCanvasVisibleArea(),i=n.y.getCanvasVisibleArea(),{minX:t.min,maxX:t.max,minY:i.min,maxY:i.max}},_drawLabel:function(n,t){var i=this,e=i._getCustomLabelVisibility(),f,u=i._label;(i.series.getLabelVisibility()||e)&&i.hasValue()&&i._showForZeroValues()?(u.draw(n,t,e),f=i._addLabelAlignmentAndOffset(u,i._getLabelCoords(u)),f=i._checkLabelPosition(u,f),u.setFigureToDrawConnector(i._getLabelConnector(u)),u.shift(r(f.x),r(f.y))):u.hide()},_showForZeroValues:function(){return!0},_getLabelConnector:function(n,t){var i=this._options,r,u=this._getPositionFromLocation(t);return r=i.symbol==="circle"?{x:u.x,y:u.y,r:i.visible?i.styles.normal.r:0}:this._getGraphicBbox(t)},_getPositionFromLocation:function(){return{x:this.x,y:this.y}},_isPointInVisibleArea:function(n,t){return n.minX<=t.x+t.width&&n.maxX>=t.x&&n.minY<=t.y+t.height&&n.maxY>=t.y},_checkLabelPosition:function(n,t,i){var u=this,r=u._getVisibleArea(),f=n.getBoundingRect(),e=u._getGraphicBbox(i),o=y;return u._isPointInVisibleArea(r,e)&&(u._options.rotated?(r.minX>t.x&&(t.x=e.x+e.width+o),r.maxX<t.x+f.width&&(t.x=e.x-o-f.width),r.minY>t.y&&u.adjustSeriesLabels&&(t.y=r.minY),r.maxY<t.y+f.height&&u.adjustSeriesLabels&&(t.y=r.maxY-f.height)):(r.minX>t.x&&u.adjustSeriesLabels&&(t.x=r.minX),r.maxX<t.x+f.width&&u.adjustSeriesLabels&&(t.x=r.maxX-f.width),r.minY>t.y&&(t.y=e.y+e.height+o),r.maxY<t.y+f.height&&(t.y=e.y-f.height-o))),t},_addLabelAlignmentAndOffset:function(n,t){var r=n.getBoundingRect(),i=n.getLayoutOptions();return this._options.rotated||(i.alignment==="left"?t.x+=r.width/2:i.alignment==="right"&&(t.x-=r.width/2)),t.x+=i.horizontalOffset,t.y+=i.verticalOffset,t},_getLabelCoords:function(n,t){return this._getLabelCoordOfPosition(n,this._getLabelPosition(t),t)},_getLabelCoordOfPosition:function(n,t,i){var c=this,e=n.getBoundingRect(),r=c._getGraphicBbox(i),o=y,s=r.height/2-e.height/2,h=r.width/2-e.width/2,u=r.x,f=r.y;switch(t){case"left":u-=e.width+o,f+=s;break;case"right":u+=r.width+o,f+=s;break;case"top":u+=h,f-=e.height+o;break;case"bottom":u+=h,f+=r.height+o;break;case"inside":u+=h,f+=s}return{x:u,y:f}},_drawMarker:function(n,t,i){var r=this,f=r._options,e=r._getTranslates(i),o=r._getStyle();r.graphic=r._createMarker(n,t,f.image,u({translateX:e.x,translateY:e.y,points:r._populatePointShape(f.symbol,o.r)},o),i)},_getErrorBarSettings:function(){return{visibility:"visible"}},_drawErrorBar:function(t,r){var u=this,a=u._options.errorBars||{},h=[],c,f=u._errorBarPos,e=u._highErrorCoord,s=u._lowErrorCoord,v=(a.displayMode+"").toLowerCase(),y=v==="high",p=v==="low",l=o(parseInt(a.edgeLength)/2),w=(y||!i(s))&&i(e)&&!p,b=(p||!i(e))&&i(s)&&!y;w&&(s=u._baseErrorBarPos),b&&(e=u._baseErrorBarPos),v!=="none"&&i(e)&&i(s)&&i(f)?(b||h.push([f-l,e,f+l,e]),h.push([f,e,f,s]),w||h.push([f+l,s,f-l,s]),u._options.rotated&&n.each(h,function(n,t){t.reverse()}),c=u._getErrorBarSettings(a),u._errorBar?(c.points=h,u._errorBar.attr(c)):u._errorBar=t.path(h,"line").attr(c).append(r)):u._errorBar&&u._errorBar.attr({visibility:"hidden"})},getTooltipParams:function(){var n=this,t=n.graphic;return{x:n.x,y:n.y,offset:t?t.getBBox().height/2:0}},hasValue:function(){return this.value!==null&&this.minValue!==null},setPercentValue:function(n,t,i,r){var u=this,e=v(u.value/n||0),f=v(u.minValue/n||0),o=e-f;u._label.setDataField("percent",o),u._label.setDataField("total",n),u.series.isFullStackedSeries()&&u.hasValue()&&(u.leftHole&&(u.leftHole/=n-i,u.minLeftHole/=n-i),u.rightHole&&(u.rightHole/=n-r,u.minRightHole/=n-r),u.value=e,u.minValue=f?f:u.minValue,u.translate())},_storeTrackerR:function(){var t=this,n=window.navigator,r=t._options.styles.normal.r,i;return i="ontouchstart"in window||n.msPointerEnabled&&n.msMaxTouchPoints||n.pointerEnabled&&n.maxTouchPoints?20:6,t._options.trackerR=r<i?i:r},_translateErrorBars:function(n){var t=this,r=t._options,u=r.errorBars||{};i(t.lowError)&&(t._lowErrorCoord=n.translate(t.lowError)),i(t.highError)&&(t._highErrorCoord=n.translate(t.highError)),t._errorBarPos=o(t._options.rotated?t.vy:t.vx),t._baseErrorBarPos=u.type==="stdDeviation"?t._lowErrorCoord+(t._highErrorCoord-t._lowErrorCoord)/2:t._options.rotated?t.vx:t.vy},_translate:function(n){var t=this,i=t._options.rotated?"x":"y",f=i.toUpperCase(),r=n[i],u=t._options.rotated?"y":"x";t["v"+i]=t[i]=r.translate(t.value),t["v"+u]=t[u]=n[u].translate(t.argument),t["min"+f]=r.translate(t.minValue),t["default"+f]=r.translate(l),t._translateErrorBars(r),t._calculateVisibility(t.x,t.y)},_updateData:function(n){var t=this;t.value=t.initialValue=t.originalValue=n.value,t.minValue=t.initialMinValue=t.originalMinValue=i(n.minValue)?n.minValue:l},_getImageSettings:function(n){return{href:n.url||n.toString(),width:n.width||h,height:n.height||c}},getCrosshairCoords:function(){return{x:this.vx,y:this.vy}},getPointRadius:function(){var i=this._currentStyle||this._getStyle(),n=this._options,t=i.r,r;return n.visible&&!n.image&&t?(r=i["stroke-width"]/2,(n.symbol==="square"||n.symbol==="triangle"?1.4*t:t)+r):0},_updateMarker:function(n,t){var i=this,f=i._options,r,e=f.image,o=i.isVisible()?{}:{visibility:"hidden"};t=t||i._getStyle(),r=i._checkImage(e)?u({},{visibility:t.visibility},o,i._getImageSettings(e)):u({},t,o,{points:i._populatePointShape(f.symbol,t.r)}),n||(r.translateX=i.x,r.translateY=i.y),i.graphic.attr(r).sharp()},_getLabelFormatObject:function(){var n=this;return{argument:n.initialArgument,value:n.initialValue,originalArgument:n.originalArgument,originalValue:n.originalValue,seriesName:n.series.name,lowErrorValue:n.lowError,highErrorValue:n.highError,point:n}},_getLabelPosition:function(){var n=this._options.rotated;return this.series.isFullStackedSeries()||this.initialValue>0?n?"right":"top":n?"left":"bottom"},_getFormatObject:function(n){var r=this,t=r._label.getData();return u({},t,{argumentText:n.formatValue(r.initialArgument,"argument"),valueText:n.formatValue(r.initialValue)},i(t.percent)?{percentText:n.formatValue(t.percent,"percent")}:{},i(t.total)?{totalText:n.formatValue(t.total)}:{})},coordsIn:function(n,t){var i=this._storeTrackerR();return n>=this.x-i&&n<=this.x+i&&t>=this.y-i&&t<=this.y+i}}}(jQuery,DevExpress),function(n,t){var r=t.viz.core.series.points.mixins,f=n.extend,u=Math,h=u.round,e=u.abs,i=u.min,c="canvas_position_default",o=9,s=4;r.barPoint=f({},r.symbolPoint,{correctCoordinates:function(n){var i=n.offset-h(n.width/2),t=this._options.rotated,r=t?"height":"width",u=(t?"y":"x")+"Correction";this[r]=n.width,this[u]=i},_getGraphicBbox:function(){var t=this,n={};return n.x=t.x,n.y=t.y,n.width=t.width,n.height=t.height,n},_getLabelPosition:function(){var n=this,r,e=n.translators,t=n.initialValue,u=e.x.getBusinessRange().invert,f=e.y.getBusinessRange().invert,i=n.series.valueAxisType==="discrete",o=n.series.isFullStackedSeries(),s=!i&&(t>=0&&!f||t<0&&f)||i&&!f||o,h=!i&&(t>=0&&!u||t<0&&u)||i&&!u||o;return r=n._options.rotated?h?"right":"left":s?"top":"bottom"},_getLabelCoords:function(n){var t=this,i;return i=t.initialValue===0&&t.series.isFullStackedSeries()?this._options.rotated?t._getLabelCoordOfPosition(n,"right"):t._getLabelCoordOfPosition(n,"top"):n.getLayoutOptions().position==="inside"?t._getLabelCoordOfPosition(n,"inside"):r.symbolPoint._getLabelCoords.call(this,n)},_checkLabelPosition:function(n,t){var i=this,f=i._getVisibleArea(),e=i._options.rotated,r=i._getGraphicBbox(),u=n.getBoundingRect(),o=!0;return(i._options.resolveLabelsOverlapping&&n.getLayoutOptions().position==="inside"&&(u.width>r.width||u.height>r.height)&&(o=!1),o?n.show():n.hide(),i._isPointInVisibleArea(f,r))?i._moveLabelOnCanvas(t,f,u,i.adjustSeriesLabels||e,i.adjustSeriesLabels||!e):t},_moveLabelOnCanvas:function(n,t,i,r,u){var f=n.x,e=n.y;return t.minX>f&&r&&(f=t.minX),t.maxX<f+i.width&&r&&(f=t.maxX-i.width),t.minY>e&&u&&(e=t.minY),t.maxY<e+i.height&&u&&(e=t.maxY-i.height),{x:f,y:e}},_showForZeroValues:function(){return this._options.label.showForZeroValues||this.initialValue},_drawMarker:function(t,i,r){var u=this,c=u._getStyle(),f=u.x,e=u.y,o=u.width,s=u.height,h=u._options.cornerRadius;r&&(u._options.rotated?(o=0,f=u.defaultX):(s=0,e=u.defaultY)),u.graphic=t.rect(f,e,o,s).attr({rx:h,ry:h}).attr(c).append(i),n(u.graphic.element).data({point:u})},_getSettingsForTracker:function(){var n=this,r=n.y,t=n.height,u=n.x,i=n.width;return n._options.rotated?i===1&&(i=o,u-=s):t===1&&(t=o,r-=s),{x:u,y:r,width:i,height:t}},getGraphicSettings:function(){var n=this.graphic;return{x:n.attr("x"),y:n.attr("y"),height:n.attr("height"),width:n.attr("width")}},_getEdgeTooltipParams:function(n,t,i,r){var u=this.value>=0,o,s,f,e;return this._options.rotated?(f=u?n+i:n,e=t+r/2,o=u?"left":"right"):(f=n+i/2,e=u?t:t+r,s=u?"top":"bottom"),{x:f,y:e,arrowSide:o,cloudVerticalPosition:s,offset:0}},getTooltipParams:function(n){var t=this.x,i=this.y,r=this.width,u=this.height;return n==="edge"?this._getEdgeTooltipParams(t,i,r,u):{x:t+r/2,y:i+u/2,offset:0}},_truncateCoord:function(n,t,i){return n<t?t:n>i?i:n},_translateErrorBars:function(n,t){r.symbolPoint._translateErrorBars.call(this,n),(this._errorBarPos<t.min||this._errorBarPos>t.max)&&(this._errorBarPos=undefined)},_translate:function(n){var t=this,h=t._options.rotated,o=h?"x":"y",r=h?"y":"x",w=h?"width":"height",l=h?"height":"width",b=n[r],a=n[o],s=b.getCanvasVisibleArea(),y=a.getCanvasVisibleArea(),v,p,u,f;v=p=b.translate(t.argument)+(t[r+"Correction"]||0),u=a.translate(t.value),f=a.translate(t.minValue),t["v"+o]=u,t["v"+r]=v+t[l]/2,t[w]=e(u-f),t._calculateVisibility(h?i(u,f):i(v,p),h?i(v,p):i(u,f),t.width,t.height),u=t._truncateCoord(u,y.min,y.max),f=t._truncateCoord(f,y.min,y.max),t[r]=v,t["min"+r.toUpperCase()]=p,t[w]=e(u-f),t[o]=i(u,f)+(t[o+"Correction"]||0),t["min"+o.toUpperCase()]=f+(t[o+"Correction"]||0),t["default"+o.toUpperCase()]=a.translate(c),t._translateErrorBars(a,s),t.inVisibleArea&&(t[r]<s.min&&(t[l]=t[l]-(s.min-t[r]),t[r]=s.min,t["min"+r.toUpperCase()]=s.min),t[r]+t[l]>s.max&&(t[l]=s.max-t[r]))},_updateMarker:function(n,t){this.graphic.attr(f({},t||this._getStyle(),n?{}:this.getMarkerCoords()))},getMarkerCoords:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},coordsIn:function(n,t){var i=this;return n>=i.x&&n<=i.x+i.width&&t>=i.y&&t<=i.y+i.height}})}(jQuery,DevExpress),function(n,t){var i=t.viz.core.series.points.mixins,r=n.extend,u=20;i.bubblePoint=r({},i.symbolPoint,{correctCoordinates:function(n){this.bubbleSize=n/2},_drawMarker:function(t,i,u){var f=this,e=r({translateX:f.x,translateY:f.y},f._getStyle());f.graphic=t.circle(0,0,u?0:f.bubbleSize).attr(e).append(i),n(f.graphic.element).data({series:f.series})},getTooltipParams:function(n){var i=this,r=i.graphic,t;if(r)return t=r.getBBox().height,{x:i.x,y:t<u||n==="edge"?this.y-t/2:this.y,offset:0}},_getLabelFormatObject:function(){var n=i.symbolPoint._getLabelFormatObject.call(this);return n.size=this.initialSize,n},_updateData:function(n){i.symbolPoint._updateData.call(this,n),this.size=this.initialSize=n.size},_getGraphicBbox:function(){var n=this;return n._getSymbolBbox(n.x,n.y,n.bubbleSize)},_updateMarker:function(t,i){var r=this,i=i||r._getStyle();t||(i=n.extend({r:r.bubbleSize,translateX:r.x,translateY:r.y},i)),r.graphic.attr(i)},_getFormatObject:function(n){var t=i.symbolPoint._getFormatObject.call(this,n);return t.sizeText=n.formatValue(this.initialSize),t},_storeTrackerR:function(){return this.bubbleSize},_getLabelCoords:function(n){var t;return t=n.getLayoutOptions().position==="inside"?this._getLabelCoordOfPosition(n,"inside"):i.symbolPoint._getLabelCoords.call(this,n)}})}(jQuery,DevExpress),function(n,t){var h=20,e=t.viz.core.series,r=e.points.mixins,o=n.extend,i=Math.round,c=Math.acos,l=180/Math.PI,s=Math.abs,u=t.utils,a=e.helpers.consts.pieLabelIndent,f=u.getCosAndSin;r.piePoint=o({},r.symbolPoint,{_updateData:function(n){var t=this;r.symbolPoint._updateData.call(this,n),t._visible=!0,t.minValue=t.initialMinValue=t.originalMinValue=u.isDefined(n.minValue)?n.minValue:0},animate:function(n,t,i){var r=this;r.graphic.animate({x:r.centerX,y:r.centerY,outerRadius:r.radiusOuter,innerRadius:r.radiusInner,startAngle:r.toAngle,endAngle:r.fromAngle},{partitionDuration:t,step:i},n)},correctPosition:function(n){var t=this;t.radiusInner=n.radiusInner,t.radiusOuter=n.radiusOuter,t.centerX=n.centerX,t.centerY=n.centerY},correctValue:function(n,t,i){var r=this;r.value=(i||r.initialValue)+n,r.minValue=n,r.percent=t,r._label.setDataField("percent",t)},_updateLabelData:function(){this._label.updateData({formatObject:this._getLabelFormatObject()})},_updateLabelOptions:function(){var n=this;n._label||n._createLabel(),n._label.setOptions(n._options.label)},_drawLabel:function(n,t,r){var u=this,f,e,o,s=u._getCustomLabelVisibility();(u.series.getLabelVisibility()||s)&&u.hasValue()?(e=u._label.getBoundingRect(),o=u._getVisibleArea(),u._label.draw(n,t,s),f=u._getLabelCoords(u._label),u._label.setFigureToDrawConnector(u._getLabelConnector(u._label)),f=r?u._checkLabelPosition(f,e,o):u._getLabelExtraCoord(f,u._checkVerticalLabelPosition(f,e,o),e),u._label.shift(i(f.x),i(f.y))):u._label.hide()},_getLabelPosition:function(n){return n.position},_getLabelCoords:function(n){var t=this,o=n.getBoundingRect(),s=n.getLayoutOptions(),r=f(t.middleAngle),l=t._getLabelPosition(s),h=t.radiusInner,c=t.radiusOuter,u,e;return l==="inside"?(u=h+(c-h)/2+s.radialOffset,e=t.centerX+u*r.cos-o.width/2):(u=c+s.radialOffset+a,e=r.cos>.1?t.centerX+u*r.cos:r.cos<-.1?t.centerX+u*r.cos-o.width:t.centerX+u*r.cos-o.width/2),{x:e,y:i(t.centerY-u*r.sin-o.height/2)}},_getColumnsCoord:function(n){var t=this,s=t._label,c=s.getBoundingRect(),l=s.getLayoutOptions(),r=t.radiusOuter+l.radialOffset,f=t.series.canvas,e=f.width-f.right-c.width,o=f.left,a=u.normalizeAngle(t.middleAngle),i;return l.position!=="columns"?n:(r+=h,a<90||a>=270?(i=t._maxLabelLength?t.centerX+r+t._maxLabelLength-c.width:e,i=i>e?e:i):(i=t._maxLabelLength?t.centerX-r-t._maxLabelLength:o,i=i<o?o:i),n.x=i,n)},drawLabel:function(n,t,i,r){this.translate(n),this._drawLabel(t,i,r)},updateLabelCoord:function(){var n=this,t=n._label.getBoundingRect(),r=n._getColumnsCoord(t);r=n._checkHorizontalLabelPosition(r,t,n._getVisibleArea()),n._label.shift(i(r.x),i(t.y))},_checkVerticalLabelPosition:function(n,t,i){var u=n.x,r=n.y;return n.y+t.height>i.maxY?r=i.maxY-t.height:n.y<i.minY&&(r=i.minY),{x:u,y:r}},_getLabelExtraCoord:function(n,t,i){return n.y!==t.y?u.getShiftingCoordOnRad({x:n.x,y:n.y,width:i.width,height:i.height},{x:t.x,y:t.y},{centerX:this.centerX,centerY:this.centerY,angle:this.middleAngle}):n},_checkHorizontalLabelPosition:function(n,t,i){var r=n.x,u=n.y;return n.x+t.width>i.maxX?r=i.maxX-t.width:n.x<i.minX&&(r=i.minX),{x:r,y:u}},setLabelEllipsis:function(){var t=this,n=t._label.getBoundingRect(),i=t._checkHorizontalLabelPosition(n,n,t._getVisibleArea());t._label.fit({width:n.width-s(i.x-n.x),height:n.height-s(i.y-n.y)})},_getVisibleArea:function(){var n=this.series.canvas;return{minX:n.left,maxX:n.width-n.right,minY:n.top,maxY:n.height-n.bottom}},_checkLabelPosition:function(n,t,i){return n=this._checkHorizontalLabelPosition(n,t,i),this._checkVerticalLabelPosition(n,t,i)},getBoundaryCoords:function(){var n=this,t=n.radiusOuter,r=n._options.styles.normal,u=r["stroke-width"]/2,e=n.series.getOptions().containerBackgroundColor===r.stroke?i(u):i(-u),o=f(i(n.middleAngle));return{x:i(n.centerX+(t-e)*o.cos),y:i(n.centerY-(t-e)*o.sin)}},_getLabelConnector:function(n){if(n.getLayoutOptions().position!=="inside"){var t=this.getBoundaryCoords();return{x:t.x,y:t.y,angle:this.middleAngle,centerX:this.centerX,centerY:this.centerY}}},_drawMarker:function(t,i,r,u){var f=this,e=f.radiusOuter,o=f.radiusInner,s=f.fromAngle,h=f.toAngle;r&&(o=e=0,u||(s=h=f.shiftedAngle)),f.graphic=t.arc(f.centerX,f.centerY,o,e,h,s).attr({"stroke-linejoin":"round"}).attr(f._getStyle()).sharp().append(i),n(f.graphic.element).data({point:this})},getTooltipParams:function(){var n=this,i=f(n.middleAngle),t=n.radiusInner,r=n.radiusOuter;return{x:n.centerX+(t+(r-t)/2)*i.cos,y:n.centerY-(t+(r-t)/2)*i.sin,offset:0}},_translate:function(n){var t=this,i=t.shiftedAngle||0,u=t.value,r=t.minValue;t.fromAngle=n.translate(r)+i,t.toAngle=n.translate(u)+i,t.middleAngle=n.translate((u-r)/2+r)+i,t.isVisible()||(t.middleAngle=t.toAngle=t.fromAngle=t.fromAngle||i)},_updateMarker:function(n,t){var i=this;t=t||i._getStyle(),n||(t=o({x:i.centerX,y:i.centerY,outerRadius:i.radiusOuter,innerRadius:i.radiusInner,startAngle:i.toAngle,endAngle:i.fromAngle},t)),i.graphic.attr(t).sharp()},getLegendStyles:function(){return this._styles.legendStyles},isInVisibleArea:function(){return!0},hide:function(){var n=this;n._visible&&(n._visible=!1,n.hideTooltip(),n._options.visibilityChanged(n))},show:function(){var n=this;n._visible||(n._visible=!0,n._options.visibilityChanged(n))},setInvisibility:function(){this._label.hide()},isVisible:function(){return this._visible},_getFormatObject:function(n){var t=r.symbolPoint._getFormatObject.call(this,n),i=this.percent;return t.percent=i,t.percentText=n.formatValue(i,"percent"),t},getColor:function(){return this._styles.normal.fill},coordsIn:function(n,t){var i=this,o=n-i.centerX,s=t-i.centerY,u=Math.sqrt(o*o+s*s),f=i.fromAngle%360,e=i.toAngle%360,h=!!(i.toAngle-i.fromAngle),r;return u<i.radiusInner||u>i.radiusOuter||u===0?!1:(r=c(o/u)*l*(s>0?-1:1),r<0&&(r+=360),f===e&&h?!0:f>=e?r<=f&&r>=e:!(r>=f&&r<=e))}})}(jQuery,DevExpress),function(n,t){var e=t.viz.core,r=e.series.points.mixins,o=n.extend,c=t.utils.isDefined,u=Math,h=u.abs,i=u.min,f=u.max,s=u.round,l=20,a=20;r.rangeSymbolPoint=o({},r.symbolPoint,{deleteLabel:function(){var n=this;n._topLabel.dispose(),n._topLabel=null,n._bottomLabel.dispose(),n._bottomLabel=null},hideMarker:function(n){var i=this.graphic,t=i&&i[n+"Marker"],r=this["_"+n+"Label"];t&&t.attr("visibility")!=="hidden"&&t.attr({visibility:"hidden"}),r.hide()},setInvisibility:function(){this.hideMarker("top"),this.hideMarker("bottom")},clearVisibility:function(){var t=this,n=t.graphic,i=n&&n.topMarker,r=n&&n.bottomMarker;i&&i.attr("visibility")&&i.attr({visibility:null}),r&&r.attr("visibility")&&r.attr({visibility:null}),t._topLabel.clearVisibility(),t._bottomLabel.clearVisibility()},clearMarker:function(){var t=this,n=t.graphic,i=n&&n.topMarker,r=n&&n.bottomMarker,u=t._emptySettings;i&&i.attr(u),r&&r.attr(u)},_getLabelPosition:function(n){var t,i=this._options.label.position==="inside";return t=this._options.rotated?n==="top"^i?"right":"left":n==="top"^i?"top":"bottom"},_getLabelMinFormatObject:function(){var n=this;return{index:0,argument:n.initialArgument,value:n.initialMinValue,seriesName:n.series.name,originalValue:n.originalMinValue,originalArgument:n.originalArgument,point:n}},_updateLabelData:function(){var n=this,t=n._getLabelFormatObject();t.index=1,n._topLabel.updateData({formatObject:t,initialValue:n.initialValue}),n._bottomLabel.updateData({formatObject:n._getLabelMinFormatObject(),initialValue:n.initialMinValue})},_updateLabelOptions:function(){var t=this,i=this._options.label;t._topLabel&&t._bottomLabel||t._createLabel(),t._topLabel.setOptions(i),t._bottomLabel.setOptions(i)},_createLabel:function(){this._topLabel=e.CoreFactory.createLabel(),this._bottomLabel=e.CoreFactory.createLabel()},_getGraphicBbox:function(n){var i=this._options,u=this._getImage(i.image),f=n==="top"?this._checkImage(u.top):this._checkImage(u.bottom),r,t=this._getPositionFromLocation(n);return r=i.visible?f?this._getImageBbox(t.x,t.y):this._getSymbolBbox(t.x,t.y,i.styles.normal.r):{x:t.x,y:t.y,width:0,height:0}},_getPositionFromLocation:function(n){var t,r,u=n==="top";return this._options.rotated?(t=u?f(this.x,this.minX):i(this.x,this.minX),r=this.y):(t=this.x,r=u?i(this.y,this.minY):f(this.y,this.minY)),{x:t,y:r}},_checkOverlay:function(n,t,i){return n<t+i},_getOverlayCorrections:function(n,t,i){var h=n==="vertical",u=h?"y":"x",o=h?"height":"width",c=this.translators[u].getCanvasVisibleArea(),l=c.min,a=c.max,r=s((t[u]+t[o]-i[u])/2),f=t[u]-r,e=i[u]+r;return f<l?(r=l-t[u],f+=r,e+=r):e+i[o]>a&&(r=-(i[u]+i[o]-a),f+=r,e+=r),{coord1:f,coord2:e}},_checkLabelsOverlay:function(n){var u=this,t=u._topLabel.getBoundingRect(),i=u._bottomLabel.getBoundingRect(),r={};u._options.rotated?n==="top"?this._checkOverlay(t.x,i.x,i.width)&&(r=this._getOverlayCorrections("horizontal",i,t),u._topLabel.shift(r.coord2,t.y),u._bottomLabel.shift(r.coord1,i.y)):this._checkOverlay(i.x,t.x,t.width)&&(r=this._getOverlayCorrections("horizontal",t,i),u._topLabel.shift(r.coord1,t.y),u._bottomLabel.shift(r.coord2,i.y)):n==="top"?this._checkOverlay(i.y,t.y,t.height)&&(r=this._getOverlayCorrections("vertical",t,i),u._topLabel.shift(t.x,r.coord1),u._bottomLabel.shift(i.x,r.coord2)):this._checkOverlay(t.y,i.y,i.height)&&(r=this._getOverlayCorrections("vertical",i,t),u._topLabel.shift(t.x,r.coord2),u._bottomLabel.shift(i.x,r.coord1))},_drawLabel:function(t,i){var r=this,u,h,f=[],e=r._options.rotated?r.x>=r.minX:r.y<r.minY,o=r._getCustomLabelVisibility();r._topLabel.pointPosition=e?"top":"bottom",r._bottomLabel.pointPosition=e?"bottom":"top",(r.series.getLabelVisibility()||o)&&r.hasValue()?(h=r._getVisibleArea(),r.visibleTopMarker!==!1&&f.push(r._topLabel),r.visibleBottomMarker!==!1&&f.push(r._bottomLabel),n.each(f,function(n,f){var e=f.pointPosition;f.draw(t,i,o),u=r._addLabelAlignmentAndOffset(f,r._getLabelCoords(f,e)),u=r._checkLabelPosition(f,u,e),f.setFigureToDrawConnector(r._getLabelConnector(f,e)),f.shift(s(u.x),s(u.y))}),r._checkLabelsOverlay(r._topLabel.pointPosition)):(r._topLabel.hide(),r._bottomLabel.hide())},_getImage:function(n){var t={};return c(n)&&(typeof n=="string"?t.top=t.bottom=n:(t.top={url:typeof n.url=="string"?n.url:n.url&&n.url.rangeMaxPoint,width:typeof n.width=="number"?n.width:n.width&&n.width.rangeMaxPoint,height:typeof n.height=="number"?n.height:n.height&&n.height.rangeMaxPoint},t.bottom={url:typeof n.url=="string"?n.url:n.url&&n.url.rangeMinPoint,width:typeof n.width=="number"?n.width:n.width&&n.width.rangeMinPoint,height:typeof n.height=="number"?n.height:n.height&&n.height.rangeMinPoint})),t},_checkSymbol:function(n,t){var i=this,r=n.symbol,u=t.symbol,o=r==="circle"&&u!=="circle"||r!=="circle"&&u==="circle",f=i._getImage(n.image),e=i._getImage(t.image),s=i._checkImage(f.top)!==i._checkImage(e.top),h=i._checkImage(f.bottom)!==i._checkImage(e.bottom);return o||s||h},_getSettingsForTwoMarkers:function(n){var t=this,u=t._options,r={},e=u.rotated?i(t.x,t.minX):t.x,s=u.rotated?t.y:i(t.y,t.minY),f=n.r,h=t._populatePointShape(u.symbol,f);return r.top=o({translateX:e+t.width,translateY:s,r:f},n),r.bottom=o({translateX:e,translateY:s+t.height,r:f},n),h&&(r.top.points=r.bottom.points=h),r},_hasGraphic:function(){return this.graphic&&this.graphic.topMarker&&this.graphic.bottomMarker},_drawOneMarker:function(n,t,i,r){var u=this,f=u.graphic;f[t]?u._updateOneMarker(t,r):f[t]=u._createMarker(n,f,i,r)},_drawMarker:function(n,t,i,r,u){var f=this,e=f._getSettingsForTwoMarkers(u||f._getStyle()),o=f._getImage(f._options.image);f._checkImage(o.top)&&(e.top=f._getImageSettings(e.top,o.top)),f._checkImage(o.bottom)&&(e.bottom=f._getImageSettings(e.bottom,o.bottom)),f.graphic=f.graphic||n.g().append(t),f.visibleTopMarker&&f._drawOneMarker(n,"topMarker",o.top,e.top),f.visibleBottomMarker&&f._drawOneMarker(n,"bottomMarker",o.bottom,e.bottom)},_getSettingsForTracker:function(n){var t=this,r=t._options.rotated;return{translateX:r?i(t.x,t.minX)-n:t.x-n,translateY:r?t.y-n:i(t.y,t.minY)-n,width:t.width+2*n,height:t.height+2*n}},isInVisibleArea:function(){var n=this,r=n._options.rotated,l=r?n.y:n.x,o=r?f(n.minX,n.x):f(n.minY,n.y),s=r?i(n.minX,n.x):i(n.minY,n.y),h=n.translators,a,v,y,u=!0,e=!0,p=!0,c,t;return h&&(c=h[r?"y":"x"].getCanvasVisibleArea(),t=h[r?"x":"y"].getCanvasVisibleArea(),a=c.max<l||c.min>l,v=t.min>s&&t.min>o||t.max<s&&t.max<o,a||v?u=e=p=!1:(u=t.min<s&&t.max>s,e=t.min<o&&t.max>o,r&&(y=u,u=e,e=y))),n.visibleTopMarker=u,n.visibleBottomMarker=e,p},getTooltipParams:function(){var n=this,o,s,r,u,t,h=n.translators,f=h.x.getCanvasVisibleArea(),e=h.y.getCanvasVisibleArea();return n._options.rotated?(t=i(n.x,n.minX),s=n.y,r=f.min>t?f.min:t,u=f.max<t+n.width?f.max:t+n.width,o=r+(u-r)/2):(t=i(n.y,n.minY),o=n.x,r=e.min>t?e.min:t,u=e.max<t+n.height?e.max:t+n.height,s=r+(u-r)/2),{x:o,y:s,offset:0}},_translate:function(n){var t=this,i=t._options.rotated;t.minX=t.minY=n.y.translate(t.minValue),r.symbolPoint._translate.call(t,n),t.height=i?0:h(t.minY-t.y),t.width=i?h(t.x-t.minX):0},_updateData:function(n){var t=this;r.symbolPoint._updateData.call(t,n),t.minValue=t.initialMinValue=t.originalMinValue=n.minValue},_getImageSettings:function(n,t){return{href:t.url||t.toString(),width:t.width||l,height:t.height||a,translateX:n.translateX,translateY:n.translateY}},getCrosshairCoords:function(n,t){var i;return i=this._options.rotated?{y:this.vy,x:Math.abs(this.vx-n)<Math.abs(this.minX-n)?this.vx:this.minX}:{x:this.vx,y:Math.abs(this.vy-t)<Math.abs(this.minY-t)?this.vy:this.minY}},_updateOneMarker:function(n,t){this.graphic&&this.graphic[n]&&this.graphic[n].attr(t)},_updateMarker:function(n,t){this._drawMarker(undefined,undefined,!1,!1,t)},_getFormatObject:function(n){var t=this,i=t.initialMinValue,r=t.initialValue,u=t.initialArgument,f=n.formatValue(i),e=n.formatValue(r);return{argument:u,argumentText:n.formatValue(u,"argument"),valueText:f+" - "+e,rangeValue1Text:f,rangeValue2Text:e,rangeValue1:i,rangeValue2:r,seriesName:t.series.name,point:t,originalMinValue:t.originalMinValue,originalValue:t.originalValue,originalArgument:t.originalArgument}},getLabel:function(){return[this._topLabel,this._bottomLabel]},getBoundingRect:n.noop,coordsIn:function(n,t){var i=this._storeTrackerR(),r=n>=this.x-i&&n<=this.x+i,u=t>=this.y-i&&t<=this.y+i;return this._options.rotated?u&&(r||n>=this.minX-i&&n<=this.minX+i):r&&(u||t>=this.minY-i&&t<=this.minY+i)}})}(jQuery,DevExpress),function(n,t){var r=t.viz.core.series.points.mixins,e=t.utils.isDefined,i=r.rangeSymbolPoint,u=Math,o=Math.round,s=u.min,h=u.max,f=n.extend;r.rangeBarPoint=f({},r.barPoint,{deleteLabel:i.deleteLabel,_getFormatObject:i._getFormatObject,clearVisibility:function(){var n=this.graphic;n&&n.attr("visibility")&&n.attr({visibility:null}),this._topLabel.clearVisibility(),this._bottomLabel.clearVisibility()},setInvisibility:function(){var n=this.graphic;n&&n.attr("visibility")!=="hidden"&&n.attr({visibility:"hidden"}),this._topLabel.hide(),this._bottomLabel.hide()},getTooltipParams:function(n){var t=n==="edge",i,r,u;return this._options.rotated?(i=t?this.x+this.width:this.x+this.width/2,r=this.y+this.height/2,u=t?"left":undefined):(i=this.x+this.width/2,r=t?this.y:this.y+this.height/2),{x:i,y:r,offset:0,arrowSide:u}},_translate:function(n){var t=this,i=r.barPoint;i._translate.call(t,n),t._options.rotated?t.width=t.width||1:t.height=t.height||1},_updateData:i._updateData,_getLabelPosition:i._getLabelPosition,_getLabelMinFormatObject:i._getLabelMinFormatObject,_updateLabelData:i._updateLabelData,_updateLabelOptions:i._updateLabelOptions,getCrosshairCoords:i.getCrosshairCoords,_createLabel:i._createLabel,_checkOverlay:i._checkOverlay,_checkLabelsOverlay:i._checkLabelsOverlay,_getOverlayCorrections:i._getOverlayCorrections,_drawLabel:i._drawLabel,_getLabelCoords:i._getLabelCoords,_getGraphicBbox:function(n){var i=n==="top",t=r.barPoint._getGraphicBbox.call(this);return this._options.rotated?(t.x=i?t.x+t.width:t.x,t.width=0):(t.y=i?t.y:t.y+t.height,t.height=0),t},getLabel:i.getLabel,getBoundingRect:n.noop})}(jQuery,DevExpress),function(n,t){var h=t.viz,e=h.core.series.points.mixins,a=h.renderers,o=n.isNumeric,c=n.extend,r=Math,u=r.abs,i=r.min,s=r.max,l=r.round,f=2;e.candlestickPoint=c({},e.barPoint,{_getContinuousPoints:function(n,t){var u=this,i=u.x,r=u._options.rotated?function(n,t){return[t,n]}:function(n,t){return[n,t]},f=u.width,e=u[n],o=u[t],s;return s=e===o?[].concat(r(i,u.highY)).concat(r(i,u.lowY)).concat(r(i,u.closeY)).concat(r(i-f/2,u.closeY)).concat(r(i+f/2,u.closeY)).concat(r(i,u.closeY)):[].concat(r(i,u.highY)).concat(r(i,o)).concat(r(i+f/2,o)).concat(r(i+f/2,e)).concat(r(i,e)).concat(r(i,u.lowY)).concat(r(i,e)).concat(r(i-f/2,e)).concat(r(i-f/2,o)).concat(r(i,o))},_getCategoryPoints:function(n){var t=this,i=t.x,r=t._options.rotated?function(n,t){return[t,n]}:function(n,t){return[n,t]};return[].concat(r(i,t.highY)).concat(r(i,t.lowY)).concat(r(i,n)).concat(r(i-t.width/2,n)).concat(r(i+t.width/2,n)).concat(r(i,n))},_getPoints:function(){var n=this,i,u,f,t=n.openValue,r=n.closeValue;return o(t)&&o(r)?(u=t>r?"closeY":"openY",f=t>r?"openY":"closeY",i=n._getContinuousPoints(u,f)):i=t===r?[n.x,n.highY,n.x,n.lowY]:n._getCategoryPoints(o(t)?n.openY:n.closeY),i},getColor:function(){var n=this;return n._isReduction?n._options.reduction.color:n._styles.normal.stroke||n.series.getColor()},_drawMarkerInGroup:function(t,i,r){var u=this;u.graphic=r.path(u._getPoints(),"area").attr({"stroke-linecap":"square"}).attr(i).sharp().append(t),n(u.graphic.element).data({point:u})},_fillStyle:function(){var n=this,t=n._options.styles;n._styles=n._isReduction&&n._isPositive?t.reductionPositive:n._isReduction?t.reduction:n._isPositive?t.positive:t},_getMinTrackerWidth:function(){return 1+2*this._styles.normal["stroke-width"]},correctCoordinates:function(n){var t=this._getMinTrackerWidth(),i=10;this.width=n.width<t?t:n.width>i?i:n.width,this.xCorrection=n.offset},_getMarkerGroup:function(n){var i=this,t;return t=i._isReduction&&i._isPositive?n.reductionPositiveMarkersGroup:i._isReduction?n.reductionMarkersGroup:i._isPositive?n.defaultPositiveMarkersGroup:n.defaultMarkersGroup},_drawMarker:function(n,t){this._drawMarkerInGroup(this._getMarkerGroup(t),this._getStyle(),n)},_getSettingsForTracker:function(){var n=this,t=n.highY,r=n.lowY,e=n._options.rotated,o,s,h,c;return t===r&&(t=e?t+f:t-f,r=e?r-f:r+f),e?(o=i(r,t),s=n.x-n.width/2,h=u(r-t),c=n.width):(o=n.x-n.width/2,s=i(r,t),h=n.width,c=u(r-t)),{x:o,y:s,width:h,height:c}},_getGraphicBbox:function(){var n=this,t=n._options.rotated,f=n.x,i=n.width,r=n.lowY,u=n.highY;return{x:t?r:f-l(i/2),y:t?f-l(i/2):u,width:t?u-r:i,height:t?i:r-u}},getTooltipParams:function(n){var t=this;if(t.graphic){var f,e,r,u,h=i(t.lowY,t.highY),c=s(t.lowY,t.highY),l=t.translators.x.getCanvasVisibleArea(),a=t.translators.y.getCanvasVisibleArea(),o=n==="edge",v;return t._options.rotated?(r=s(l.min,h),u=i(l.max,c),e=t.x,f=o?u:r+(u-r)/2,v=o?"left":undefined):(r=s(a.min,h),u=i(a.max,c),f=t.x,e=o?r:r+(u-r)/2),{x:f,y:e,offset:0,arrowSide:v}}},hasValue:function(){return this.highValue!==null&&this.lowValue!==null},_translate:function(){var n=this,t=n._options.rotated,r=n.translators,o=t?r.y:r.x,f=t?r.x:r.y,e,s;n.vx=n.vy=n.x=o.translate(n.argument)+(n.xCorrection||0),n.openY=n.openValue!==null?f.translate(n.openValue):null,n.highY=f.translate(n.highValue),n.lowY=f.translate(n.lowValue),n.closeY=n.closeValue!==null?f.translate(n.closeValue):null,s=u(n.lowY-n.highY),e=i(n.lowY,n.highY)+u(n.lowY-n.highY)/2,n._calculateVisibility(t?e:n.x,t?n.x:e)},getCrosshairCoords:function(n,t){var u,r=this._options.rotated?n:t,i=Math.abs(this.lowY-r)<Math.abs(this.closeY-r)?this.lowY:this.closeY;return i=Math.abs(i-r)<Math.abs(this.openY-r)?i:this.openY,i=Math.abs(i-r)<Math.abs(this.highY-r)?i:this.highY,u=this._options.rotated?{y:this.vy,x:i}:{x:this.vx,y:i}},_updateData:function(n){var t=this,r=t._label,i=this._options.reduction.color;t.value=t.initialValue=n.reductionValue,t.originalValue=n.value,t.lowValue=t.originalLowValue=n.lowValue,t.highValue=t.originalHighValue=n.highValue,t.openValue=t.originalOpenValue=n.openValue,t.closeValue=t.originalCloseValue=n.closeValue,t._isPositive=n.openValue<n.closeValue,t._isReduction=n.isReduction,t._isReduction&&r.updateOptions({background:{fill:i},connector:{stroke:i}})},_updateMarker:function(n,t,i){var r=this,u=r.graphic;u.attr({points:r._getPoints()}).attr(t||r._getStyle()).sharp(),i&&u.append(r._getMarkerGroup(i))},_getLabelFormatObject:function(){var n=this;return{openValue:n.openValue,highValue:n.highValue,lowValue:n.lowValue,closeValue:n.closeValue,reductionValue:n.initialValue,argument:n.initialArgument,value:n.initialValue,seriesName:n.series.name,originalOpenValue:n.originalOpenValue,originalCloseValue:n.originalCloseValue,originalLowValue:n.originalLowValue,originalHighValue:n.originalHighValue,originalArgument:n.originalArgument,point:n}},_getFormatObject:function(n){var t=this,u=n.formatValue(t.highValue),i=n.formatValue(t.openValue),r=n.formatValue(t.closeValue),f=n.formatValue(t.lowValue),o=e.symbolPoint,s=o._getFormatObject.call(t,n);return c({},s,{valueText:"h: "+u+(i!==""?" o: "+i:"")+(r!==""?" c: "+r:"")+" l: "+f,highValueText:u,openValueText:i,closeValueText:r,lowValueText:f})}})}(jQuery,DevExpress),function(n,t){var i=t.viz.core.series.points.mixins,u=n.extend,r=n.isNumeric;i.stockPoint=u({},i.candlestickPoint,{_getPoints:function(){var t=this,i=t._options.rotated?function(n,t){return[t,n]}:function(n,t){return[n,t]},f=r(t.openY),e=r(t.closeY),u=t.x,o=t.width,n;return n=[].concat(i(u,t.highY)),f&&(n=n.concat(i(u,t.openY))),f&&(n=n.concat(i(u-o/2,t.openY))),f&&(n=n.concat(i(u,t.openY))),e&&(n=n.concat(i(u,t.closeY))),e&&(n=n.concat(i(u+o/2,t.closeY))),e&&(n=n.concat(i(u,t.closeY))),n=n.concat(i(u,t.lowY))},_drawMarkerInGroup:function(t,i,r){this.graphic=r.path(this._getPoints(),"line").attr({"stroke-linecap":"square"}).attr(i).sharp().append(t),n(this.graphic.element).data({point:this})},_getMinTrackerWidth:function(){return 2+this._styles.normal["stroke-width"]}})}(jQuery,DevExpress),function(n,t){var f=n.extend,l=t.viz,r=l.core.series.points.mixins,u=t.utils,e=u.isDefined,a=u.normalizeAngle,o=Math,v=o.max,y=90,s="canvas_position_start",h="canvas_position_top",p="canvas_position_end",c="canvas_position_default";r.polarSymbolPoint=f({},r.symbolPoint,{_getLabelCoords:r.piePoint._getLabelCoords,_moveLabelOnCanvas:r.barPoint._moveLabelOnCanvas,_getLabelPosition:function(){return"outside"},_translate:function(n){var t=this,i=n.translate(t.argument,t.value),r=n.translate(s,h);t.vx=a(i.angle),t.vy=t.radiusOuter=i.radius,t.radius=i.radius,t.middleAngle=-i.angle,t.angle=-i.angle,t.x=i.x,t.y=i.y,t.defaultX=t.centerX=r.x,t.defaultY=t.centerY=r.y,t._translateErrorBars(n),t.inVisibleArea=t._checkVisibility(n)},_checkVisibility:function(n){return n.checkVisibility(this.radius)},_translateErrorBars:function(n){var t=this;e(t.lowError)&&(t._lowErrorCoord=t.centerY-n.translate(t.argument,t.lowError).radius),e(t.highError)&&(t._highErrorCoord=t.centerY-n.translate(t.argument,t.highError).radius),t._errorBarPos=t.centerX,t._baseErrorBarPos=(t._options.errorBars||{}).type==="stdDeviation"?t._lowErrorCoord+(t._highErrorCoord-t._lowErrorCoord)/2:t.centerY-t.radius},_getTranslates:function(n){return n?this.getDefaultCoords():{x:this.x,y:this.y}},getDefaultCoords:function(){var n=u.getCosAndSin(-this.angle),t=this.translators.translate(s,c).radius,i=this.defaultX+t*n.cos,r=this.defaultY+t*n.sin;return{x:i,y:r}},_addLabelAlignmentAndOffset:function(n,t){return t},_getVisibleArea:function(){var n=this.translators.canvas;return{minX:n.left,maxX:n.width-n.right,minY:n.top,maxY:n.height-n.bottom}},_checkLabelPosition:function(n,t){var i=this,r=i._getVisibleArea(),u=i._getGraphicBbox();return i._isPointInVisibleArea(r,u)&&(t=i._moveLabelOnCanvas(t,r,n.getBoundingRect(),!0,!0)),t},_getErrorBarSettings:function(n,t){var i=r.symbolPoint._getErrorBarSettings.call(this,n,t);return i.rotate=y-this.angle,i.rotateX=this.centerX,i.rotateY=this.centerY,i},getCoords:function(n){return n?this.getDefaultCoords():{x:this.x,y:this.y}}}),r.polarBarPoint=f({},r.barPoint,{_translateErrorBars:r.polarSymbolPoint._translateErrorBars,_getErrorBarSettings:r.polarSymbolPoint._getErrorBarSettings,_getVisibleArea:r.polarSymbolPoint._getVisibleArea,_moveLabelOnCanvas:r.barPoint._moveLabelOnCanvas,_getLabelCoords:r.piePoint._getLabelCoords,_getLabelConnector:r.piePoint._getLabelConnector,getBoundaryCoords:r.piePoint.getBoundaryCoords,getTooltipParams:r.piePoint.getTooltipParams,_getLabelPosition:r.piePoint._getLabelPosition,_translate:function(n){var t=this,i=n.translate(h,p).radius;t.radiusInner=n.translate(t.argument,t.minValue).radius,r.polarSymbolPoint._translate.call(t,n),t.radiusInner===null?t.radiusInner=t.radius=i:t.radius===null&&(this.radius=this.value>=0?i:0),t.radiusOuter=v(t.radiusInner,t.radius),t.radiusInner=t.defaultRadius=o.min(t.radiusInner,t.radius),t.middleAngle=t.angle=-u.normalizeAngle(t.middleAngleCorrection-t.angle)},_checkVisibility:function(n){return n.checkVisibility(this.radius,this.radiusInner)},getMarkerCoords:function(){return{x:this.centerX,y:this.centerY,outerRadius:this.radiusOuter,innerRadius:this.defaultRadius,startAngle:this.middleAngle-this.interval/2,endAngle:this.middleAngle+this.interval/2}},_drawMarker:function(t,i,r){var u=this,a=u._getStyle(),f=u.getMarkerCoords(),e=f.innerRadius,o=f.outerRadius,s=u.translators.translate(u.argument,c),h=f.x,l=f.y;r&&(e=0,o=0,h=s.x,l=s.y),u.graphic=t.arc(h,l,e,o,f.startAngle,f.endAngle).attr(a).append(i),n(u.graphic.element).data({point:this})},_checkLabelPosition:function(n,t){var i=this,r=i._getVisibleArea(),f=u.getCosAndSin(i.middleAngle),e=i.centerX+i.defaultRadius*f.cos,o=i.centerY-i.defaultRadius*f.sin;return e>r.minX&&e<r.maxX&&o>r.minY&&o<r.maxY&&(t=i._moveLabelOnCanvas(t,r,n.getBoundingRect(),!0,!0)),t},_addLabelAlignmentAndOffset:function(n,t){return t},correctCoordinates:function(n){this.middleAngleCorrection=n.offset,this.interval=n.width},coordsIn:function(n,t){var r=this.translators.untranslate(n,t),i=this.getMarkerCoords(),u=i.startAngle<i.endAngle?-r.phi>=i.startAngle&&-r.phi<=i.endAngle:-r.phi<=i.startAngle&&-r.phi>=i.endAngle;return r.r>=i.innerRadius&&r.r<=i.outerRadius&&u}})}(jQuery,DevExpress),function(n,t){var o=t.viz,s=new o.core.ParseUtils,f={STRING:"string",NUMERIC:"numeric",DATETIME:"datetime"},u={DISCRETE:"discrete",CONTINUOUS:"continuous",LOGARITHMIC:"logarithmic"},r=t.utils,e=n.each,i=r.isDefined,h=function(n,t){function i(n,t,r,u){if(t<r){var f=Math.floor((t+r)/2);i(n,t,f,u),i(n,f+1,r,u),c(n,t,f,r,u)}}var r=n.length;return i(n,0,r-1,t),n},c=function(n,t,r,u,f){for(var c=new Array(u-t+1),s=t,h=r+1,e,o=0;s<=r&&h<=u;)n[s][f]<=n[h][f]||!i(n[h][f])?(c[o]=n[s],s++):(c[o]=n[h],h++),o++;if(s>r)for(e=h;e<=u;e++,o++)c[o]=n[e];else for(e=s;e<=r;e++,o++)c[o]=n[e];for(e=0;e<=u-t;e++)n[e+t]=c[e];return n};o.core.DataValidator=t.Class.inherit({ctor:function(t,i,r,u){var f=this;i=i||[[]],t||(f._nullData=!0),f.groups=i,f.data=t||[],f._parsers={},f._errorShowList={},f._skipFields={},f.options=u||{},f.incidentOccured=r,f.userArgumentCategories=f.groups.argumentOptions&&f.groups.argumentOptions.categories||[],r||(f.incidentOccured=n.noop)},validate:function(){var t=this;return t._data=t.data,t.groups.argumentType=null,t.groups.argumentAxisType=null,n.each(t.groups,function(t,i){i.valueType=null,i.valueAxisType=null,n.each(i,function(n,t){t.updateDataType({})})}),t._checkType(),t._checkAxisType(),(!r.isArray(t.data)||t._nullData)&&t._incorrectDataMessage(),t.options.convertToAxisDataType&&(t._createParser(),t._parse()),t._groupData(),t._sort(),n.each(t._skipFields,function(n,i){i===t._data.length&&t.incidentOccured("W2002",[n])}),t._data},_checkType:function(){var t=this,i=[],u=[],e=function(i,r){return n.each(i,function(u,f){n.each(f.getValueFields(),function(n,u){i.valueType=t._getType(r[u],i.valueType)})}),i.valueType?!0:void 0},o=function(i,r){return n.each(i,function(n,i){t.groups.argumentType=t._getType(r[i.getArgumentField()],t.groups.argumentType)}),t.groups.argumentType?!0:void 0},f=t.groups.argumentOptions&&t.groups.argumentOptions.argumentType;n.each(t.groups,function(n,r){if(!r.length)return null;var e=r.valueOptions&&r.valueOptions.valueType;r.valueType=e,t.groups.argumentType=f,e?null:i.push(r),f?null:u.push(r)}),(i.length||u.length)&&n.each(t.data,function(f,s){var h=!0;if(r.isObject(s))return n.each(i,function(n,t){h=h&&e(t,s)}),n.each(u,function(n,t){h=h&&o(t,s)}),!t.options.checkTypeForAllData&&h?!1:void 0})},_checkAxisType:function(){var t=this,i=t.groups.argumentOptions||{};n.each(t.groups,function(r,u){n.each(u,function(n,r){var f={},e=u.valueOptions||{},o=e.categories||[];f.argumentAxisType=t._correctAxisType(t.groups.argumentType,i.type,!!t.userArgumentCategories.length),f.valueAxisType=t._correctAxisType(u.valueType,e.type,!!o.length),t.groups.argumentAxisType=t.groups.argumentAxisType||f.argumentAxisType,u.valueAxisType=u.valueAxisType||f.valueAxisType,f.argumentType=t.groups.argumentType,f.valueType=u.valueType,f.showZero=e.showZero,r.updateDataType(f)}),u.valueAxis&&(u.valueAxis.setTypes(u.valueAxisType,u.valueType,"valueType"),u.valueAxis.validate(!1,t.incidentOccured))}),t.groups.argumentAxes&&e(t.groups.argumentAxes,function(n,i){i.setTypes(t.groups.argumentAxisType,t.groups.argumentType,"argumentType"),i.validate(!0,t.incidentOccured)})},_createParser:function(){var t=this;n.each(t.groups,function(i,r){n.each(r,function(i,f){t._parsers[f.getArgumentField()]=t._createParserUnit(t.groups.argumentType,t.groups.argumentAxisType===u.LOGARITHMIC?t._filterForLogAxis:null),n.each(f.getValueFields(),function(n,i){t._parsers[i]=t._createParserUnit(r.valueType,r.valueAxisType===u.LOGARITHMIC?t._filterForLogAxis:null,f.getOptions().ignoreEmptyPoints)}),f.getTagField()&&(t._parsers[f.getTagField()]=null)})})},_parse:function(){var t=this,i=[];n.each(t.data,function(u,f){var e={};if(!r.isObject(f)){f&&t._incorrectDataMessage();return}n.each(t._parsers,function(n,t){e[n]=t?t(f[n],n):f[n],e["original"+n]=f[n]}),i.push(e)}),this._data=i},_groupMinSlices:function(n,t,r){var h=this,r=r||{},f=r.mode,l=r.topCount,a=r.threshold,v=r.groupName||"others",u={},o=h._data.slice(),s,c=function(n){!i(n)||n<0||e(o.slice(n),function(n,r){i(r[t])&&(u[t]+=r[t],r[t]=undefined,r["original"+t]=undefined)})};f&&f!=="none"&&(u[n]=v+"",u[t]=0,o.sort(function(n,r){return i(r[t])&&i(n[t])?r[t]-n[t]:!i(r[t])&&n[t]?-1:!i(n[t])&&r[t]?1:void 0}),f==="smallValueThreshold"?(e(o,function(n,r){!i(s)&&i(r[t])&&a>r[t]&&(s=n)}),c(s)):f==="topN"&&c(l),u[t]&&h._data.push(u))},_groupData:function(){var t=this,n=t.groups,f=n.length&&n[0].length&&(n[0][0].type==="pie"||n[0][0].type==="doughnut"||n[0][0].type==="donut"),i,r;f&&e(n,function(f,o){e(o,function(f,e){i=e.getArgumentField(),r=e.getValueFields(),n.argumentAxisType===u.DISCRETE&&t._groupSameArguments(i,r),t._groupMinSlices(i,r[0],e.getOptions().smallValuesGrouping)})})},_groupSameArguments:function(n,t){var o=this,r,u={},f=o._data;e(f,function(o,s){if(i(s[n])&&i(s[t[0]]))if(r=s[n],i(u[r])){var h=f[u[r]];e(t,function(n,t){h[t]+=s[t],s[t]=undefined,s["original"+t]=undefined})}else u[r]=o})},_getType:function(n,t){return t===f.STRING||r.isString(n)?f.STRING:t===f.DATETIME||r.isDate(n)?f.DATETIME:r.isNumber(n)?f.NUMERIC:t},_correctAxisType:function(n,t,i){return(n===f.STRING&&(t===u.CONTINUOUS||t===u.LOGARITHMIC)&&this.incidentOccured("E2002"),t===u.LOGARITHMIC)?u.LOGARITHMIC:(t=(i||t===u.DISCRETE||n===f.STRING)&&u.DISCRETE,t||u.CONTINUOUS)},_filterForLogAxis:function(n,t){return n<=0?(this.incidentOccured("E2004",[t]),null):n},_createParserUnit:function(n,t,i){var r=this,u=n?s.getParser(n,undefined,!0):function(n){return n};return function(f,e){var o=u(f);return t&&(o=t.call(r,o,e)),o===null&&i&&(o=undefined),o===undefined&&(r._addSkipFields(e),r._validUnit(f,e,n)),o}},_validUnit:function(n,t){if(n){if(!r.isNumber(n)&&!r.isDate(n)&&!r.isString(n)){this.incidentOccured("E2003",[t]);return}this.incidentOccured("E2004",[t])}},_sort:function(){var t=this,i=t.groups,u={},e=i.length&&i[0].length&&i[0][0].getArgumentField();r.isFunction(t.options.sortingMethod)?t._data.sort(t.options.sortingMethod):t.userArgumentCategories.length?(n.each(t.userArgumentCategories,function(n,t){u[t]=n}),t._data.sort(function(n,t){return n=n[e],t=t[e],u[n]-u[t]})):t.options.sortingMethod===!0&&i.argumentType!==f.STRING&&h(t._data,e)},_addSkipFields:function(n){this._skipFields[n]=(this._skipFields[n]||0)+1},_incorrectDataMessage:function(){this._erorrDataSource!==!0&&(this._erorrDataSource=!0,this.incidentOccured("E2001"))}})}(jQuery,DevExpress),function(n,t,i){var r="'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana",e="'Segoe UI Light', 'Helvetica Neue Light', 'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana",u={containerBackgroundColor:"#ffffff",animation:{enabled:!0,duration:1e3,easing:"easeOutCubic",maxPointCountSupported:300},commonSeriesSettings:{border:{visible:!1,width:2},showInLegend:!0,visible:!0,hoverMode:"nearestPoint",selectionMode:"includePoints",hoverStyle:{hatching:{direction:"right",width:2,step:6,opacity:.75},border:{visible:!1,width:3}},selectionStyle:{hatching:{direction:"right",width:2,step:6,opacity:.5},border:{visible:!1,width:3}},valueErrorBar:{displayMode:"auto",value:1,color:"#656565",lineWidth:2,edgeLength:8},label:{visible:!1,alignment:"center",rotationAngle:0,horizontalOffset:0,verticalOffset:0,radialOffset:0,format:"",argumentFormat:"",precision:0,argumentPrecision:0,percentPrecision:0,showForZeroValues:!0,customizeText:i,maxLabelCount:i,position:"outside",font:{color:"#ffffff"},border:{visible:!1,width:1,color:"#d3d3d3",dashStyle:"solid"},connector:{visible:!1,width:1}}},redrawOnResize:!0,margin:{left:0,top:0,right:0,bottom:0},seriesSelectionMode:"single",pointSelectionMode:"single",legend:{hoverMode:"includePoints",verticalAlignment:"top",horizontalAlignment:"right",position:"outside",visible:!0,customizeText:i,customizeHint:i,itemTextPosition:i,itemsAlignment:i,margin:10,equalColumnWidth:!1,markerSize:12,backgroundColor:i,backgroundOpacity:i,border:{visible:!1,width:1,color:"#d3d3d3",cornerRadius:0,dashStyle:"solid"},paddingLeftRight:20,paddingTopBottom:15,columnCount:0,rowCount:0,columnItemSpacing:20,rowItemSpacing:8},tooltip:{enabled:!1,border:{width:1,color:"#d3d3d3",dashStyle:"solid",visible:!0},font:{family:r,weight:400,size:12,color:"#232323"},color:"#ffffff",arrowLength:10,paddingLeftRight:18,paddingTopBottom:15,shared:!1,location:"center",format:"",argumentFormat:"",precision:0,argumentPrecision:0,percentPrecision:0,customizeText:i,customizeTooltip:i,shadow:{opacity:.4,offsetX:0,offsetY:4,blur:2,color:"#000000"}},size:{width:i,height:i},loadingIndicator:{font:{},backgroundColor:"#ffffff",text:"Loading..."},dataPrepareSettings:{checkTypeForAllData:!1,convertToAxisDataType:!0,sortingMethod:!0},title:{font:{family:e,weight:200,color:"#232323",size:28},margin:10},adaptiveLayout:{width:80,height:80,keepLabels:!0},_rtl:{legend:{itemTextPosition:"left"}},resolveLabelOverlapping:"none"},f={containerBackgroundColor:"#2b2b2b",commonSeriesSettings:{label:{border:{color:"#494949"}}},legend:{border:{color:"#494949"}},loadingIndicator:{backgroundColor:"#2b2b2b"},title:{font:{color:"#929292"}},tooltip:{color:"#2b2b2b",border:{color:"#494949"},font:{color:"#929292"}}};t.viz.themes.push({name:"desktop",font:{color:"#767676",family:r,weight:400,size:12,cursor:"default"},chart:n.extend(!0,{},u,{commonSeriesSettings:{type:"line",stack:"default",point:{visible:!0,symbol:"circle",size:12,border:{visible:!1,width:1},hoverMode:"onlyPoint",selectionMode:"onlyPoint",hoverStyle:{border:{visible:!0,width:4},size:12},selectionStyle:{border:{visible:!0,width:4},size:12}},scatter:{},line:{width:2,dashStyle:"solid",hoverStyle:{width:3,hatching:{direction:"none"}},selectionStyle:{width:3}},stackedline:{width:2,dashStyle:"solid",hoverStyle:{width:3,hatching:{direction:"none"}},selectionStyle:{width:3}},stackedspline:{width:2,dashStyle:"solid",hoverStyle:{width:3,hatching:{direction:"none"}},selectionStyle:{width:3}},fullstackedline:{width:2,dashStyle:"solid",hoverStyle:{width:3,hatching:{direction:"none"}},selectionStyle:{width:3}},fullstackedspline:{width:2,dashStyle:"solid",hoverStyle:{width:3,hatching:{direction:"none"}},selectionStyle:{width:3}},stepline:{width:2,dashStyle:"solid",hoverStyle:{width:3,hatching:{direction:"none"}},selectionStyle:{width:3}},area:{point:{visible:!1},opacity:.5},stackedarea:{point:{visible:!1},opacity:.5},fullstackedarea:{point:{visible:!1},opacity:.5},fullstackedsplinearea:{point:{visible:!1},opacity:.5},steparea:{border:{visible:!0,width:2},point:{visible:!1},hoverStyle:{border:{visible:!0,width:3}},selectionStyle:{border:{visible:!0,width:3}},opacity:.5},spline:{width:2,hoverStyle:{width:3,hatching:{direction:"none"}},selectionStyle:{width:3}},splinearea:{point:{visible:!1},opacity:.5},stackedsplinearea:{point:{visible:!1},opacity:.5},bar:{cornerRadius:0,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}}},stackedbar:{cornerRadius:0,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}},label:{position:"inside"}},fullstackedbar:{cornerRadius:0,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}},label:{position:"inside"}},rangebar:{cornerRadius:0,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}}},rangearea:{point:{visible:!1},opacity:.5},rangesplinearea:{point:{visible:!1},opacity:.5},bubble:{opacity:.5,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}}},candlestick:{width:1,innerColor:"#ffffff",reduction:{color:"#ff0000"},hoverStyle:{width:3,hatching:{direction:"none"}},selectionStyle:{width:3},point:{border:{visible:!0}}},stock:{width:1,reduction:{color:"#ff0000"},hoverStyle:{width:3,hatching:{direction:"none"}},selectionStyle:{width:3},point:{border:{visible:!0}}}},crosshair:{enabled:!1,color:"#f78119",width:1,dashStyle:"solid",label:{visible:!1,font:{color:"#ffffff",size:12}},verticalLine:{visible:!0},horizontalLine:{visible:!0}},commonAxisSettings:{tickInterval:i,setTicksAtUnitBeginning:!0,valueMarginsEnabled:!0,placeholderSize:null,logarithmBase:10,discreteAxisDivisionMode:"betweenLabels",visible:!1,color:"#d3d3d3",width:1,multipleAxesSpacing:5,label:{visible:!0,overlappingBehavior:{mode:"auto",rotationAngle:90,staggeringSpacing:5},precision:0,format:"",customizeText:i,customizeHint:i,indentFromAxis:10},grid:{visible:!1,color:"#d3d3d3",width:1},minorGrid:{visible:!1,color:"#d3d3d3",width:1,opacity:.3},tick:{visible:!1,color:"#d3d3d3"},minorTick:{visible:!1,color:"#d3d3d3",opacity:.3},title:{font:{size:16},margin:6},stripStyle:{paddingLeftRight:10,paddingTopBottom:5},constantLineStyle:{paddingLeftRight:10,paddingTopBottom:10,width:1,color:"#000000",dashStyle:"solid",label:{visible:!0,position:"inside"}}},horizontalAxis:{isHorizontal:!0,position:"bottom",axisDivisionFactor:50,label:{alignment:"center"},stripStyle:{label:{horizontalAlignment:"center",verticalAlignment:"top"}},constantLineStyle:{label:{horizontalAlignment:"right",verticalAlignment:"top"}},constantLines:{}},verticalAxis:{isHorizontal:!1,position:"left",axisDivisionFactor:30,label:{alignment:"right",overlappingBehavior:{mode:"enlargeTickInterval"}},stripStyle:{label:{horizontalAlignment:"left",verticalAlignment:"center"}},constantLineStyle:{label:{horizontalAlignment:"left",verticalAlignment:"top"}},constantLines:{}},argumentAxis:{},valueAxis:{grid:{visible:!0}},commonPaneSettings:{backgroundColor:"none",border:{color:"#d3d3d3",width:1,visible:!1,top:!0,bottom:!0,left:!0,right:!0,dashStyle:"solid"}},scrollBar:{visible:!1,offset:5,color:"gray",width:10},useAggregation:!1,adjustOnZoom:!0,rotated:!1,zoomingMode:"none",scrollingMode:"none",synchronizeMultiAxes:!0,equalBarWidth:!0,minBubbleSize:12,maxBubbleSize:.2}),pie:n.extend(!0,{},u,{commonSeriesSettings:{type:"pie",pie:{border:{visible:!1,width:2,color:"#ffffff"},hoverStyle:{hatching:{direction:"right",width:4,step:10,opacity:.75},border:{visible:!1,width:2}},selectionStyle:{hatching:{direction:"right",width:4,step:10,opacity:.5},border:{visible:!1,width:2}}},doughnut:{innerRadius:.5,border:{visible:!1,width:2,color:"#ffffff"},hoverStyle:{hatching:{direction:"right",width:4,step:10,opacity:.75},border:{visible:!1,width:2}},selectionStyle:{hatching:{direction:"right",width:4,step:10,opacity:.5},border:{visible:!1,width:2}}},donut:{innerRadius:.5,border:{visible:!1,width:2,color:"#ffffff"},hoverStyle:{hatching:{direction:"right",width:4,step:10,opacity:.75},border:{visible:!1,width:2}},selectionStyle:{hatching:{direction:"right",width:4,step:10,opacity:.5},border:{visible:!1,width:2}}}},legend:{hoverMode:"markPoint",backgroundColor:"none"},adaptiveLayout:{keepLabels:!1}}),pieIE8:{commonSeriesSettings:{pie:{hoverStyle:{border:{visible:!0,color:"#ffffff"}},selectionStyle:{border:{visible:!0,color:"#ffffff"}}},donut:{hoverStyle:{border:{visible:!0,color:"#ffffff"}},selectionStyle:{border:{visible:!0,color:"#ffffff"}}},doughnut:{hoverStyle:{border:{visible:!0,color:"#ffffff"}},selectionStyle:{border:{visible:!0,color:"#ffffff"}}}}},gauge:{containerBackgroundColor:"#ffffff",scale:{majorTick:{visible:!0,length:5,width:2,showCalculatedTicks:!0,useTicksAutoArrangement:!0,color:"#ffffff"},minorTick:{visible:!1,length:3,width:1,showCalculatedTicks:!0,color:"#ffffff"},label:{visible:!0,font:{}}},rangeContainer:{offset:0,width:5,backgroundColor:"#808080"},valueIndicator:{_default:{color:"#c2c2c2"},rangebar:{space:2,size:10,color:"#cbc5cf",backgroundColor:"none",text:{indent:0,font:{size:14,color:null}}},twocolorneedle:{secondColor:"#e18e92"}},subvalueIndicator:{_default:{color:"#8798a5"},trianglemarker:{space:2,length:14,width:13,color:"#8798a5"},textcloud:{arrowLength:5,horizontalOffset:6,verticalOffset:3,color:"#679ec5",text:{font:{color:"#ffffff",size:18}}}},valueIndicators:{_default:{color:"#c2c2c2"},rangebar:{space:2,size:10,color:"#cbc5cf",backgroundColor:"none",text:{indent:0,font:{size:14,color:null}}},twocolorneedle:{secondColor:"#e18e92"},trianglemarker:{space:2,length:14,width:13,color:"#8798a5"},textcloud:{arrowLength:5,horizontalOffset:6,verticalOffset:3,color:"#679ec5",text:{font:{color:"#ffffff",size:18}}}},title:{layout:{horizontalAlignment:"center",verticalAlignment:"top",overlay:0},font:{size:16,color:"#232323",family:r,weight:400}},subtitle:{font:{size:14,color:"#232323",family:r,weight:400}},indicator:{hasPositiveMeaning:!0,layout:{horizontalAlignment:"center",verticalAlignment:"bottom",overlay:0},text:{font:{size:18}}},tooltip:{arrowLength:10,paddingLeftRight:18,paddingTopBottom:15,enabled:!1,border:{width:1,color:"#d3d3d3",dashStyle:"solid",visible:!0},color:"#ffffff",font:{color:"#232323",size:12,family:r,weight:400},shadow:{opacity:.4,offsetX:0,offsetY:4,blur:2,color:"#000000"}},loadingIndicator:{show:!1,font:{},backgroundColor:"#ffffff",text:"Loading..."},_circular:{scale:{orientation:"outside",label:{indentFromTick:10}},rangeContainer:{orientation:"outside"},valueIndicator:{type:"rectangleneedle",_default:{offset:20,indentFromCenter:0,width:2,spindleSize:14,spindleGapSize:10},triangleneedle:{width:4},twocolorneedle:{space:2,secondFraction:.4},rangebar:{offset:30}},subvalueIndicator:{type:"trianglemarker",trianglemarker:{offset:6},textcloud:{offset:-6}},valueIndicators:{_type:"rectangleneedle",_default:{offset:20,indentFromCenter:0,width:2,spindleSize:14,spindleGapSize:10},triangleneedle:{width:4},twocolorneedle:{space:2,secondFraction:.4},rangebar:{offset:30},trianglemarker:{offset:6},textcloud:{offset:-6}}},_linear:{scale:{horizontalOrientation:"right",verticalOrientation:"bottom",label:{indentFromTick:-10}},rangeContainer:{horizontalOrientation:"right",verticalOrientation:"bottom"},valueIndicator:{type:"rangebar",_default:{offset:2.5,length:15,width:15},rectangle:{width:10},rangebar:{offset:10,horizontalOrientation:"right",verticalOrientation:"bottom"}},subvalueIndicator:{type:"trianglemarker",_default:{offset:-1,horizontalOrientation:"left",verticalOrientation:"top"}},valueIndicators:{_type:"rectangle",_default:{offset:2.5,length:15,width:15},rectangle:{width:10},rangebar:{offset:10,horizontalOrientation:"right",verticalOrientation:"bottom"},trianglemarker:{offset:-1,horizontalOrientation:"left",verticalOrientation:"top"},textcloud:{offset:-1,horizontalOrientation:"left",verticalOrientation:"top"}}}},barGauge:{backgroundColor:"#e0e0e0",relativeInnerRadius:.3,barSpacing:4,label:{indent:20,connectorWidth:2,font:{size:16}},title:{layout:{horizontalAlignment:"center",verticalAlignment:"top",overlay:0},font:{size:16,color:"#232323",family:r,weight:400}},subtitle:{font:{size:14,color:"#232323",family:r,weight:400}},indicator:{hasPositiveMeaning:!0,layout:{horizontalAlignment:"center",verticalAlignment:"bottom",overlay:0},text:{font:{size:18}}},tooltip:{arrowLength:10,paddingLeftRight:18,paddingTopBottom:15,enabled:!1,border:{width:1,color:"#d3d3d3",dashStyle:"solid",visible:!0},color:"#ffffff",font:{size:12,color:"#232323",family:r,weight:400},shadow:{opacity:.4,offsetX:0,offsetY:4,blur:2,color:"#000000"}},loadingIndicator:{show:!1,font:{},backgroundColor:"#ffffff",text:"Loading..."}},rangeSelector:{containerBackgroundColor:"#ffffff",scale:{label:{topIndent:7,font:{size:11}},tick:{width:1,color:"#000000",opacity:.1},marker:{separatorHeight:33,topIndent:10,textLeftIndent:7,textTopIndent:11}},loadingIndicator:{show:!1,font:{},backgroundColor:"#ffffff",text:"Loading..."},sliderMarker:{padding:7,pointerSize:6,color:"#9b9b9b",invalidRangeColor:"#ff0000",font:{color:"#ffffff",size:11}},sliderHandle:{width:1,color:"#000000",opacity:.2},shutter:{color:i,opacity:.75},background:{color:"#c0bae1"},chart:{containerBackgroundColor:i,commonSeriesSettings:{label:u.commonSeriesSettings.label,border:{visible:!1,width:1},visible:!0,type:"area",hoverMode:"none",hoverStyle:{border:{}},selectionStyle:{border:{}},point:{visible:!1,symbol:"circle",border:{visible:!1,width:1},size:12,hoverStyle:{border:{}},selectionStyle:{border:{}}},line:{width:2},stepline:{width:2},scatter:{point:{visible:!0}},stackedline:{width:2},fullstackedline:{width:2},area:{opacity:.5},stackedarea:{opacity:.5},fullstackedarea:{opacity:.5},spline:{width:2},splinearea:{opacity:.5},steparea:{border:{visible:!0,width:2},opacity:.5},bubble:{opacity:.5,point:{visible:!0}},bar:{cornerRadius:0,point:{visible:!0}},stackedbar:{cornerRadius:0,point:{visible:!0}},fullstackedbar:{cornerRadius:0,point:{visible:!0}},rangebar:{cornerRadius:0,point:{visible:!0}},rangearea:{opacity:.5},rangesplinearea:{opacity:.5},candlestick:{width:1,innerColor:"#ffffff",reduction:{color:"#ff0000"}},stock:{width:1,reduction:{color:"#ff0000"}},valueErrorBar:u.commonSeriesSettings.valueErrorBar,stackedspline:{width:2},fullstackedspline:{width:2},stackedsplinearea:{opacity:.5},fullstackedsplinearea:{opacity:.5}},dataPrepareSettings:{checkTypeForAllData:!1,convertToAxisDataType:!0,sortingMethod:!0},useAggregation:!1,equalBarWidth:!0,minBubbleSize:12,maxBubbleSize:.2,topIndent:.1,bottomIndent:0,valueAxis:{min:i,max:i,inverted:!1,logarithmBase:10}}},map:{background:{borderWidth:1,borderColor:"#cacaca",color:"#ffffff"},areaSettings:{borderWidth:1,borderColor:"#ffffff",color:"#d2d2d2",hoveredBorderColor:"#303030",selectedBorderWidth:2,selectedBorderColor:"#303030",label:{enabled:!1,stroke:"#ffffff","stroke-width":2,"stroke-opacity":.5,font:{color:"#2b2b2b",size:16,opacity:.5}}},markerSettings:{label:{enabled:!0,stroke:"#ffffff","stroke-width":1,"stroke-opacity":.5,font:{color:"#2b2b2b",size:12}},_dot:{borderWidth:2,borderColor:"#ffffff",color:"#ba4d51",size:8,selectedStep:2,backStep:18,backColor:"#ffffff",backOpacity:.32,shadow:!0},_bubble:{minSize:20,maxSize:50,color:"#ba4d51",hoveredBorderWidth:1,hoveredBorderColor:"#303030",selectedBorderWidth:2,selectedBorderColor:"#303030"},_pie:{size:50,hoveredBorderWidth:1,hoveredBorderColor:"#303030",selectedBorderWidth:2,selectedBorderColor:"#303030"},_image:{size:20}},legend:{verticalAlignment:"bottom",horizontalAlignment:"right",position:"inside",visible:!0,margin:10,equalColumnWidth:!1,markerSize:12,backgroundColor:"#ffffff",backgroundOpacity:.65,border:{visible:!0,width:1,color:"#cacaca",cornerRadius:0,dashStyle:"solid"},paddingLeftRight:16,paddingTopBottom:12,columnItemSpacing:20,rowItemSpacing:8,markerColor:"#ba4d51",font:{color:"#2b2b2b",size:12}},controlBar:{borderColor:"#5d5d5d",borderWidth:3,color:"#ffffff",margin:20},tooltip:{arrowLength:10,paddingLeftRight:18,paddingTopBottom:15,border:{width:1,color:"#d7d7d7",dashStyle:"solid",visible:!0},color:"#ffffff",font:{color:"#232323",size:12,family:r,weight:400},shadow:{opacity:.4,offsetX:0,offsetY:4,blur:2,color:"#000000"}},loadingIndicator:{show:!1,backgroundColor:"#ffffff",font:{},text:"Loading..."},_rtl:{legend:{itemTextPosition:"left"}}},sparkline:{lineColor:"#666666",lineWidth:2,areaOpacity:.2,minColor:"#e8c267",maxColor:"#e55253",barPositiveColor:"#a9a9a9",barNegativeColor:"#d7d7d7",winColor:"#a9a9a9",lossColor:"#d7d7d7",firstLastColor:"#666666",pointSymbol:"circle",pointColor:"#ffffff",pointSize:4,tooltip:{enabled:!0,allowContainerResizing:!0,verticalAlignment:"top",horizontalAlignment:"center",format:"",paddingLeftRight:18,paddingTopBottom:15,arrowLength:10,precision:0,color:"#ffffff",border:{width:1,color:"#d3d3d3",dashStyle:"solid",visible:!0},font:{color:"#232323",family:r,size:12,weight:400},shadow:{opacity:.4,offsetX:0,offsetY:4,blur:2,color:"#000000"}}},bullet:{color:"#e8c267",targetColor:"#666666",targetWidth:4,showTarget:!0,showZeroLevel:!0,tooltip:{enabled:!0,allowContainerResizing:!0,verticalAlignment:"top",horizontalAlignment:"center",format:"",precision:0,paddingLeftRight:18,paddingTopBottom:15,arrowLength:10,color:"#ffffff",border:{width:1,color:"#d3d3d3",dashStyle:"solid",visible:!0},font:{color:"#232323",family:r,size:12,weight:400},shadow:{opacity:.4,offsetX:0,offsetY:4,blur:2,color:"#000000"}}},polar:n.extend(!0,{},u,{commonSeriesSettings:{type:"scatter",closed:!0,point:{visible:!0,symbol:"circle",size:12,border:{visible:!1,width:1},hoverMode:"onlyPoint",selectionMode:"onlyPoint",hoverStyle:{border:{visible:!0,width:4},size:12},selectionStyle:{border:{visible:!0,width:4},size:12}},scatter:{},line:{width:2,dashStyle:"solid",hoverStyle:{width:3,hatching:{direction:"none"}},selectionStyle:{width:3}},area:{point:{visible:!1},opacity:.5},stackedline:{width:2},bar:{opacity:.8},stackedbar:{opacity:.8}},adaptiveLayout:{width:170,height:170,keepLabels:!0},equalBarWidth:!0,commonAxisSettings:{tickInterval:i,valueMarginsEnabled:!0,setTicksAtUnitBeginning:!0,logarithmBase:10,discreteAxisDivisionMode:"betweenLabels",visible:!0,color:"#d3d3d3",width:1,label:{visible:!0,overlappingBehavior:{mode:"enlargeTickInterval"},precision:0,format:"",customizeText:i,customizeHint:i,indentFromAxis:5},grid:{visible:!0,color:"#d3d3d3",width:1},minorGrid:{visible:!0,color:"#d3d3d3",width:1,opacity:.3},tick:{visible:!0,color:"#d3d3d3"},minorTick:{visible:!1,color:"#d3d3d3",opacity:.3},title:{font:{size:16},margin:10},stripStyle:{},constantLineStyle:{width:1,color:"#000000",dashStyle:"solid",label:{visible:!0,position:"inside"}}},argumentAxis:{startAngle:0,firstPointOnStartAngle:!1,period:i},valueAxis:{tick:{visible:!1}},horizontalAxis:{isHorizontal:1,position:"top",axisDivisionFactor:50,label:{alignment:"center"}},verticalAxis:{isHorizontal:1,position:"top",axisDivisionFactor:30,label:{alignment:"right"}}})}),t.viz.core.registerTheme({name:"desktop-dark",font:{color:"#808080"},chart:n.extend(!0,{},f,{commonSeriesSettings:{candlestick:{innerColor:"#2b2b2b"}},crosshair:{color:"#515151"},commonAxisSettings:{color:"#494949",grid:{color:"#494949"},minorGrid:{color:"#494949"},tick:{color:"#494949"},minorTick:{color:"#494949"},constantLineStyle:{color:"#ffffff"}},commonPaneSettings:{border:{color:"#494949"}}}),pie:n.extend(!0,{},f),pieIE8:{commonSeriesSettings:{pie:{hoverStyle:{border:{color:"#2b2b2b"}},selectionStyle:{border:{color:"#2b2b2b"}}},donut:{hoverStyle:{border:{color:"#2b2b2b"}},selectionStyle:{border:{color:"#2b2b2b"}}},doughnut:{hoverStyle:{border:{color:"#2b2b2b"}},selectionStyle:{border:{color:"#2b2b2b"}}}}},gauge:{containerBackgroundColor:"#2b2b2b",scale:{majorTick:{color:"#303030"},minorTick:{color:"#303030"}},rangeContainer:{backgroundColor:"#b5b5b5"},valueIndicator:{_default:{color:"#b5b5b5"},rangebar:{color:"#84788b"},twocolorneedle:{secondColor:"#ba544d"}},subvalueIndicator:{_default:{color:"#b7918f"}},valueIndicators:{_default:{color:"#b5b5b5"},rangebar:{color:"#84788b"},twocolorneedle:{secondColor:"#ba544d"},trianglemarker:{color:"#b7918f"},textcloud:{color:"#ba544d"}},title:{font:{color:"#929292"}},subtitle:{font:{color:"#929292"}},loadingIndicator:{backgroundColor:"#2b2b2b"},tooltip:{color:"#2b2b2b",border:{color:"#494949"},font:{color:"#929292"}}},barGauge:{title:{font:{color:"#929292"}},subtitle:{font:{color:"#929292"}},tooltip:{color:"#2b2b2b",border:{color:"#494949"},font:{color:"#929292"}},loadingIndicator:{backgroundColor:"#2b2b2b"}},rangeSelector:{containerBackgroundColor:"#2b2b2b",scale:{tick:{color:"#ffffff",opacity:.05}},loadingIndicator:{backgroundColor:"#2b2b2b"},sliderMarker:{color:"#b5b5b5",font:{color:"#303030"}},sliderHandle:{color:"#ffffff",opacity:.35},shutter:{color:"#2b2b2b",opacity:.9}},map:{background:{borderColor:"#3f3f3f",color:"#303030"},areaSettings:{borderColor:"#303030",color:"#686868",hoveredBorderColor:"#ffffff",selectedBorderColor:"#ffffff",label:{stroke:"#000000",font:{color:"#ffffff"}}},markerSettings:{label:{stroke:"#000000",font:{color:"#ffffff"}},_bubble:{hoveredBorderColor:"#ffffff",selectedBorderColor:"#ffffff"},_pie:{hoveredBorderColor:"#ffffff",selectedBorderColor:"#ffffff"}},legend:{border:{color:"#3f3f3f"},backgroundColor:"#303030",font:{color:"#ffffff"}},controlBar:{borderColor:"#c7c7c7",color:"#303030"},tooltip:{color:"#2b2b2b",border:{color:"#494949"},font:{color:"#929292"}},loadingIndicator:{backgroundColor:"#2b2b2b"}},sparkline:{lineColor:"#c7c7c7",firstLastColor:"#c7c7c7",barPositiveColor:"#b8b8b8",barNegativeColor:"#8e8e8e",winColor:"#b8b8b8",lossColor:"#8e8e8e",pointColor:"#303030",tooltip:{color:"#2b2b2b",border:{color:"#494949"},font:{color:"#929292"}}},bullet:{targetColor:"#8e8e8e",tooltip:{color:"#2b2b2b",border:{color:"#494949"},font:{color:"#929292"}}},polar:n.extend(!0,{},f,{commonAxisSettings:{color:"#494949",grid:{color:"#494949"},minorGrid:{color:"#494949"},tick:{color:"#494949"},minorTick:{color:"#494949"},constantLineStyle:{color:"#ffffff"}}})},"desktop")}(jQuery,DevExpress),function(n,t){var r={containerBackgroundColor:"#050506",title:{font:{color:"#ffffff"}},commonSeriesSettings:{label:{border:{color:"#4c4c4c"}}},legend:{font:{color:"#ffffff",size:11},border:{color:"#4c4c4c"}},loadingIndicator:{backgroundColor:"#050506"},tooltip:{color:"#050506",border:{color:"#4c4c4c"},font:{color:"#ffffff"}}},u={containerBackgroundColor:"#e8e8e8",title:{font:{color:"#808080"}},legend:{font:{color:"#000000",size:11}},loadingIndicator:{backgroundColor:"#e8e8e8"},tooltip:{color:"#e8e8e8",font:{color:"#808080"}}};t.viz.core.registerTheme({name:"android",chart:n.extend(!0,{},r,{commonSeriesSettings:{candlestick:{innerColor:"#050506"}},commonAxisSettings:{color:"#4c4c4c",grid:{color:"#4c4c4c"},minorGrid:{color:"#4c4c4c"},tick:{color:"#4c4c4c"},minorTick:{color:"#4c4c4c"},title:{font:{color:"#545455"}},label:{font:{color:"#ffffff",size:11}}},commonPaneSettings:{border:{color:"#4c4c4c"}}}),polar:n.extend(!0,{},r,{commonAxisSettings:{color:"#4c4c4c",grid:{color:"#4c4c4c"},minorGrid:{color:"#4c4c4c"},tick:{color:"#4c4c4c"},minorTick:{color:"#4c4c4c"},title:{font:{color:"#545455"}},label:{font:{color:"#ffffff",size:11}}}}),pie:n.extend(!0,{},r),pieIE8:{commonSeriesSettings:{pie:{hoverStyle:{border:{color:"#050506"}},selectionStyle:{border:{color:"#050506"}}},donut:{hoverStyle:{border:{color:"#050506"}},selectionStyle:{border:{color:"#050506"}}},doughnut:{hoverStyle:{border:{color:"#050506"}},selectionStyle:{border:{color:"#050506"}}}}},gauge:{containerBackgroundColor:"#050506",title:{font:{color:"#ffffff"}},subtitle:{font:{color:"#ffffff"}},loadingIndicator:{backgroundColor:"#050506"},tooltip:{color:"#050506",border:{color:"#4c4c4c"},font:{color:"#ffffff"}}},barGauge:{title:{font:{color:"#ffffff"}},subtitle:{font:{color:"#ffffff"}},tooltip:{color:"#050506",border:{color:"#4c4c4c"},font:{color:"#ffffff"}},loadingIndicator:{backgroundColor:"#050506"}},rangeSelector:{containerBackgroundColor:"#050506",loadingIndicator:{backgroundColor:"#050506"}},map:{loadingIndicator:{backgroundColor:"#050506"},tooltip:{color:"#050506",border:{color:"#4c4c4c"},font:{color:"#ffffff"}}},sparkline:{tooltip:{color:"#050506",border:{color:"#4c4c4c"},font:{color:"#ffffff"}}},bullet:{tooltip:{color:"#050506",border:{color:"#4c4c4c"},font:{color:"#ffffff"}}}},"desktop-dark"),t.viz.core.registerTheme({name:"android-holo-light",chart:n.extend(!0,{},u,{commonSeriesSettings:{candlestick:{innerColor:"#e8e8e8"}},commonAxisSettings:{title:{font:{color:"#939393"}},label:{font:{color:"#404040",size:11}}}}),polar:n.extend(!0,{},u,{commonAxisSettings:{title:{font:{color:"#939393"}},label:{font:{color:"#404040",size:11}}}}),pie:n.extend(!0,{},u),pieIE8:{commonSeriesSettings:{pie:{hoverStyle:{border:{color:"#e8e8e8"}},selectionStyle:{border:{color:"#e8e8e8"}}},donut:{hoverStyle:{border:{color:"#e8e8e8"}},selectionStyle:{border:{color:"#e8e8e8"}}},doughnut:{hoverStyle:{border:{color:"#e8e8e8"}},selectionStyle:{border:{color:"#e8e8e8"}}}}},gauge:{containerBackgroundColor:"#e8e8e8",title:{font:{color:"#808080"}},subtitle:{font:{color:"#808080"}},loadingIndicator:{backgroundColor:"#e8e8e8"},tooltip:{color:"#e8e8e8",font:{color:"#808080"}}},barGauge:{title:{font:{color:"#808080"}},subtitle:{font:{color:"#808080"}},tooltip:{color:"#e8e8e8",font:{color:"#808080"}},loadingIndicator:{backgroundColor:"#e8e8e8"}},rangeSelector:{containerBackgroundColor:"#e8e8e8",loadingIndicator:{backgroundColor:"#e8e8e8"}},map:{loadingIndicator:{backgroundColor:"#e8e8e8"},tooltip:{color:"#e8e8e8",font:{color:"#808080"}}},sparkline:{tooltip:{color:"#e8e8e8",font:{color:"#808080"}}},bullet:{tooltip:{color:"#e8e8e8",font:{color:"#808080"}}}},"desktop")}(jQuery,DevExpress),function(n,t){var r={containerBackgroundColor:"#cbd0da",title:{font:{color:"#808080"}},commonSeriesSettings:{label:{border:{color:"#b0b3ba"}}},legend:{font:{color:"#000000",size:11},border:{color:"#b0b3ba"}},loadingIndicator:{backgroundColor:"#cbd0da"},tooltip:{font:{color:"#808080"}}},u={containerBackgroundColor:"#ffffff",title:{font:{color:"#808080"}},commonSeriesSettings:{label:{border:{color:"#d3d3d3"}}},legend:{font:{color:"#000000",size:11},border:{color:"#d3d3d3"}},loadingIndicator:{backgroundColor:"#ffffff"},tooltip:{font:{color:"#808080"}}};t.viz.core.registerTheme({name:"ios",chart:n.extend(!0,{},r,{commonSeriesSettings:{candlestick:{innerColor:"#cbd0da"}},commonAxisSettings:{color:"#b0b3ba",grid:{color:"#b0b3ba"},minorGrid:{color:"#b0b3ba"},tick:{color:"#b0b3ba"},minorTick:{color:"#b0b3ba"},title:{font:{color:"#939393"}},label:{font:{color:"#000000",size:11}}},commonPaneSettings:{border:{color:"#b0b3ba"}}}),polar:n.extend(!0,{},r,{commonAxisSettings:{color:"#b0b3ba",grid:{color:"#b0b3ba"},minorGrid:{color:"#b0b3ba"},tick:{color:"#b0b3ba"},minorTick:{color:"#b0b3ba"},title:{font:{color:"#939393"}},label:{font:{color:"#000000",size:11}}}}),pie:n.extend(!0,{},r),pieIE8:{commonSeriesSettings:{pie:{hoverStyle:{border:{color:"#cbd0da"}},selectionStyle:{border:{color:"#cbd0da"}}},donut:{hoverStyle:{border:{color:"#cbd0da"}},selectionStyle:{border:{color:"#cbd0da"}}},doughnut:{hoverStyle:{border:{color:"#cbd0da"}},selectionStyle:{border:{color:"#cbd0da"}}}}},gauge:{title:{font:{color:"#808080"}},subtitle:{font:{color:"#808080"}},tooltip:{font:{color:"#808080"}}},barGauge:{title:{font:{color:"#808080"}},subtitle:{font:{color:"#808080"}},tooltip:{font:{color:"#808080"}}},map:{tooltip:{font:{color:"#808080"}}},sparkline:{tooltip:{font:{color:"#808080"}}},bullet:{tooltip:{font:{color:"#808080"}}}},"desktop"),t.viz.core.registerTheme({name:"ios:7",chart:n.extend(!0,{},u,{commonAxisSettings:{color:"#d3d3d3",grid:{color:"#d3d3d3"},minorGrid:{color:"#d3d3d3"},tick:{color:"#d3d3d3"},minorTick:{color:"#d3d3d3"},title:{font:{color:"#939393"}},label:{font:{color:"#000000",size:11}}},commonPaneSettings:{border:{color:"#d3d3d3"}}}),polar:{commonAxisSettings:{color:"#d3d3d3",grid:{color:"#d3d3d3"},minorGrid:{color:"#d3d3d3"},tick:{color:"#d3d3d3"},minorTick:{color:"#d3d3d3"},title:{font:{color:"#939393"}},label:{font:{color:"#000000",size:11}}}},pie:n.extend(!0,{},u),gauge:{title:{font:{color:"#808080"}},subtitle:{font:{color:"#808080"}},tooltip:{font:{color:"#808080"}}},barGauge:{title:{font:{color:"#808080"}},subtitle:{font:{color:"#808080"}},tooltip:{font:{color:"#808080"}}},map:{tooltip:{font:{color:"#808080"}}},sparkline:{tooltip:{font:{color:"#808080"}}},bullet:{tooltip:{font:{color:"#808080"}}}},"desktop")}(jQuery,DevExpress),function(n,t){var i={containerBackgroundColor:"#000000",title:{font:{color:"#ffffff"}},commonSeriesSettings:{label:{border:{color:"#454545"}}},legend:{font:{color:"#ffffff",size:11},border:{color:"#454545"}},loadingIndicator:{backgroundColor:"#000000"},tooltip:{color:"#000000",font:{color:"#ffffff"}}},r={title:{font:{color:"#808080"}},legend:{font:{color:"#000000",size:11}},tooltip:{font:{color:"#808080"}}};t.viz.core.registerTheme({name:"win8",chart:n.extend(!0,{},i,{commonSeriesSettings:{candlestick:{innerColor:"#000000"}},commonAxisSettings:{color:"#454545",grid:{color:"#454545"},minorGrid:{color:"#454545"},tick:{color:"#454545"},minorTick:{color:"#454545"},title:{font:{color:"#535353"}},label:{font:{color:"#ffffff",size:11}}},commonPaneSettings:{border:{color:"#454545"}}}),polar:{commonAxisSettings:{color:"#454545",grid:{color:"#454545"},minorGrid:{color:"#454545"},tick:{color:"#454545"},minorTick:{color:"#454545"},title:{font:{color:"#535353"}},label:{font:{color:"#ffffff",size:11}}}},pie:n.extend(!0,{},i),pieIE8:{commonSeriesSettings:{pie:{hoverStyle:{border:{color:"#000000"}},selectionStyle:{border:{color:"#000000"}}},donut:{hoverStyle:{border:{color:"#000000"}},selectionStyle:{border:{color:"#000000"}}},doughnut:{hoverStyle:{border:{color:"#000000"}},selectionStyle:{border:{color:"#000000"}}}}},gauge:{containerBackgroundColor:"#000000",title:{font:{color:"#ffffff"}},subtitle:{font:{color:"#ffffff"}},loadingIndicator:{backgroundColor:"#000000"},tooltip:{color:"#000000",font:{color:"#ffffff"}}},barGauge:{title:{font:{color:"#ffffff"}},subtitle:{font:{color:"#ffffff"}},tooltip:{color:"#000000",font:{color:"#ffffff"}},loadingIndicator:{backgroundColor:"#000000"}},rangeSelector:{containerBackgroundColor:"#000000",loadingIndicator:{backgroundColor:"#000000"}},map:{loadingIndicator:{backgroundColor:"#000000"},tooltip:{color:"#000000",font:{color:"#ffffff"}}},sparkline:{tooltip:{color:"#000000",font:{color:"#ffffff"}}},bullet:{tooltip:{color:"#000000",font:{color:"#ffffff"}}}},"desktop-dark"),t.viz.core.registerTheme({name:"win8-white",chart:n.extend(!0,{},r,{commonAxisSettings:{title:{font:{color:"#939393"}},label:{font:{color:"#404040",size:11}}}}),pie:n.extend(!0,{},r),gauge:{title:{font:{color:"#808080"}},subtitle:{font:{color:"#808080"}},tooltip:{font:{color:"#808080"}}},barGauge:{title:{font:{color:"#808080"}},subtitle:{font:{color:"#808080"}},tooltip:{font:{color:"#808080"}}},map:{tooltip:{font:{color:"#808080"}}},sparkline:{tooltip:{font:{color:"#808080"}}},bullet:{tooltip:{font:{color:"#808080"}}}},"desktop")}(jQuery,DevExpress),function(n,t){t.viz.core.registerTheme({name:"generic"},"desktop"),t.viz.core.registerTheme({name:"generic-dark"},"desktop-dark"),t.viz.core.registerTheme({name:"tizen"},"desktop"),t.viz.core.registerTheme({name:"tizen-black"},"desktop-dark")}(jQuery,DevExpress),function(n,t,i){var r=t.viz,f=r.core.Palette,u=t.utils,e=20,o=50;r.charts=r.charts||{},r.charts.ThemeManager=r.core.BaseThemeManager.inherit(function(){var a=function(n,i){var r=this;n=n||{},r._userOptions=n,r._mergeAxisTitleOptions=[],i&&(r._themeSection=i),r._IE8=t.browser.msie&&t.browser.version<9,r.setTheme(n.theme),r.palette=new f(n.palette,{stepHighlight:o,theme:r._themeName})},v=function(){var n=this;n.palette.dispose(),n.palette=n._userOptions=n._mergedSettings=null,n.callBase()},y=function(n){var t=n._theme.commonSeriesSettings;t.point=t.point||{},t.label=t.label||{},n._initializeFont(t.label.font)},p=function(n){var t=n._theme.commonAxisSettings;t&&(t.label=t.label||{},t.grid=t.grid||{},t.ticks=t.ticks||{},t.line=t.line||{},t.title=t.title||{},t.label.font=t.label.font||{},n._initializeFont(t.label.font),t.title.font=t.title.font||{},n._initializeFont(t.title.font))},w=function(){this.palette.reset()},b=function(n){this.palette=new f(n||this._theme.defaultPalette,{stepHighlight:o,theme:this.themeName})},s=function(n){return u.isString(n)?{text:n}:n},h=function(t){if(t)return t=n.extend(!0,{},t),t.title=s(t.title),(t.type==="logarithmic"&&t.logarithmBase<=0||t.logarithmBase&&!n.isNumeric(t.logarithmBase))&&(t.logarithmBase=i,t.logarithmBaseError=!0),t.label&&(t.label.alignment&&(t.label.userAlignment=!0),u.isString(t.label.overlappingBehavior)&&(t.label.overlappingBehavior={mode:t.label.overlappingBehavior}),t.label.overlappingBehavior&&t.label.overlappingBehavior.mode||(t.label.overlappingBehavior=t.label.overlappingBehavior||{})),t},c=function(t,i,r){var u=this._theme,f=r^t==="valueAxis"?"verticalAxis":"horizontalAxis",e=h(this._userOptions.commonAxisSettings,t);return n.extend(!0,{},u.commonAxisSettings,u[f],u[t],e,h(i,t))},r=function(t,i){i=i||this._userOptions[t];var f=this._theme[t],r=this._mergedSettings[t];return r?r:(r=n.isPlainObject(f)&&n.isPlainObject(i)?n.extend(!0,{},f,i):u.isDefined(i)?i:f,this._mergedSettings[t]=r,r)},l={base:r,argumentAxis:c,valueAxisRangeSelector:function(){return r.call(this,"valueAxis")},valueAxis:c,title:function(n){var t=s(this._userOptions[n]);return r.call(this,n,t)},series:function(t,i){var c=this._theme,f=this._userOptions.commonSeriesSettings||{},e=c.commonSeriesSettings,u=((i.type||f.type||e.type)+"").toLowerCase(),r,s=this.palette,l=~u.indexOf("bar"),a=u==="bubble",v=u==="scatter",o,y=this.getOptions("resolveLabelsOverlapping"),p=this.getOptions("resolveLabelOverlapping"),w=this.getOptions("containerBackgroundColor"),h;return(l||a)&&(i=n.extend(!0,{},f,f[u],i),h=i.visible,f={type:{}},n.extend(!0,i,i.point),i.visible=h),v&&i.point&&(i.point.visible=i.visible),r=n.extend(!0,{},e,e[u],f,f[u],i),r.type=u,r.widgetType=this._themeSection.split(".").slice(-1)[0],r.containerBackgroundColor=w,o=r.widgetType!=="pie"?r.color||s.getNextColor():function(){return s.getNextColor()},r.mainSeriesColor=o,r._IE8=this._IE8,r.resolveLabelOverlapping=p,r.resolveLabelsOverlapping=y,r},pieSegment:function(i,r,u){var f=n.extend(!0,{},r,u),o=new t.Color(f.color||this.palette.getNextColor());return f.color=o.toHex(),f.border.color=f.border.color||o.toHex(),f.hoverStyle.color=f.hoverStyle.color||this._IE8&&o.highlight(e)||o.toHex(),f.hoverStyle.border.color=f.hoverStyle.border.color||o.toHex(),f.selectionStyle.color=f.selectionStyle.color||this._IE8&&o.highlight(e)||o.toHex(),f.selectionStyle.border.color=f.selectionStyle.border.color||o.toHex(),f},animation:function(t){var i=this._userOptions[t];return i=n.isPlainObject(i)?i:u.isDefined(i)?{enabled:!!i}:{},r.call(this,t,i)}};return{_themeSection:"chart",ctor:a,dispose:v,_initializeTheme:function(){var t=this,n=this._theme;n.legend=n.legend||{},n.legend.font=n.legend.font||{},t._initializeFont(n.legend.font),y(t),p(t),n.title=n.title||{},n.title.font=n.title.font||{},t._initializeFont(n.title.font),n.tooltip=n.tooltip||{},n.tooltip.font=n.tooltip.font||{},t._initializeFont(n.tooltip.font),n.loadingIndicator=n.loadingIndicator||{},n.loadingIndicator.font=n.loadingIndicator.font||{},t._initializeFont(n.loadingIndicator.font),n.crosshair=n.crosshair||{},n.crosshair.label=n.crosshair.label||{},n.crosshair.label.font=n.crosshair.label.font||{},t._initializeFont(n.crosshair.label.font)},resetPalette:w,getOptions:function(n){return(l[n]||l.base).apply(this,arguments)},setTheme:function(t){var i=this;i._mergedSettings={},i.callBase(t),i.getOptions("rtlEnabled")&&n.extend(!0,i._theme,i._theme._rtl)},resetOptions:function(n){this._mergedSettings[n]=null},update:function(n){this._userOptions=n},updatePalette:b}}())}(jQuery,DevExpress),function(n,t){var r=t.viz,i=r.charts,u=i.series;i.factory=function(){var n=function(n){return new u.SeriesFamily(n)},t=function(n,t){return new i.Axis(n,t)},r=function(n,t){return new i.ThemeManager(n,t)},f=function(n,t){return t=="dxPieChart"?new i.PieTracker(n):new i.ChartTracker(n)},e=function(n,t,r,u){return new i.ChartTitle(n,t,r,u)},o=function(n){return new i.LayoutManager(n)},s=function(n,t,r,u){return new i.Crosshair(n,t,r,u)};return{createSeriesFamily:n,createAxis:t,createThemeManager:r,createTracker:f,createChartLayoutManager:o,createTitle:e,createCrosshair:s,createScrollBar:function(n,t){return new DevExpress.viz.charts.ScrollBar(n,t)}}}()}(jQuery,DevExpress),function(n,t,i){function v(t){var i=[t.id];i.push.apply(i,t.args||[]),n.log.apply(null,i)}function y(n,t,i,r){var u=this;return function(f,e){var o=setTimeout(function(){n(f),t&&t.apply(i(f),r(f)),e&&e(),delete u.timers[o]});u.timers[o]=o}}function e(){return!0}function o(){return!1}function p(n,t){return!(n.width===t.width&&n.height===t.height&&n.left===t.left&&n.top===t.top&&n.right===t.right&&n.bottom===t.bottom)}var r=Number,u=n.utils.windowResizeCallbacks,s=n.utils.createResizeHandler,h=n.utils.stringFormat,c=n.utils.isFunction,l=n.viz.core.utils.parseScalar,a=t.noop,f="loadingIndicator";n.viz.core.BaseWidget=n.DOMComponent.inherit({_eventsMap:{onIncidentOccurred:{name:"incidentOccured",deprecated:"incidentOccured",deprecatedContext:t.noop,deprecatedArgs:function(n){return[n.target]}},onDrawn:{name:"drawn",deprecated:"drawn",deprecatedContext:t.noop,deprecatedArgs:function(n){return[n.component]}},incidentOccured:{newName:"onIncidentOccurred"},drawn:{newName:"onDrawn"}},_setDeprecatedOptions:function(){this.callBase.apply(this,arguments),t.extend(this._deprecatedOptions,{incidentOccured:{since:"14.2",message:"Use the 'onIncidentOccurred' option instead"},drawn:{since:"14.2",message:"Use the 'onDrawn' option instead"},"tooltip.customizeText":{since:"14.1",message:"Use the 'tooltip.customizeTooltip' option instead"}})},_setDefaultOptions:function(){this.callBase.apply(this,arguments),this.option({incidentOccured:v})},_init:function(){var t=this;t.callBase.apply(t,arguments),t._renderer=new n.viz.renderers.Renderer(t._getRendererParameters()),t._setupResizeHandler(),t._initIncidentOccured(),t._renderVisibilityChange(),t._initEventTriggers(),t._initLoadingIndicator(),t._initCore(),t._initSize()},_getRendererParameters:null,_initSize:function(){var n=null;this._isContainerVisible()&&(n=this._calculateCanvas(),n&&this._updateSize(n,!0)),n||this._setHiddenState()},_setHiddenState:function(){var n=this;n._clean=n._render=a,n._canvas=null,n._incidentOccured("W2001",[n.NAME])},_setVisibleState:function(){delete this._clean,delete this._render},_updateSize:function(n,t){var i=this;i._renderer.resize(n.width,n.height),t&&i._renderer.draw(i._$element[0]),i._canvas=n,i._applySize()},_updateCanvasAndResize:function(){var n=this,t=n._calculateCanvas();return t&&(p(t,n._canvas)||n.__forceRender)&&(n._updateSize(t),n._resize()),t},render:function(){var n=this,t,i=n._isContainerVisible();n._canvas?(i&&(t=n._updateCanvasAndResize()),t||(n._clean(),n._renderer.clear(),n._setHiddenState())):(i&&(t=n._calculateCanvas(),t&&(n._setVisibleState(),n._updateSize(t,!0),n._render())),t||n._setHiddenState())},_handleResize:function(){this._canvas&&this._updateCanvasAndResize()},_dispose:function(){var n=this;n.callBase.apply(n,arguments),n._removeResizeHandler(),t.each(n._eventTriggers.timers,function(n,t){clearTimeout(t)}),n._disposeCore(),n._renderer.dispose(),n._renderer=n._eventTriggers=n._eventTrigger=null,n._eventTriggers=n._eventTrigger=null},_initEventTriggers:function(){var n=this;n._eventTriggers={timers:{}},t.each(n._eventsMap,function(t,i){i.name&&n._createEventTrigger(t)}),n._eventTrigger=function(t,i,r){n._eventTriggers[t](i,r)}},_createEventTrigger:function(n){var t=this,r=t._eventsMap[n],f=t._createActionByOption(n),u;t._suppressDeprecatedWarnings(),t.option(n)===i&&(u=t.option(r.deprecated)),t._resumeDeprecatedWarnings(),t._eventTriggers[r.name]=y.call(t._eventTriggers,f,c(u)&&u,r.deprecatedContext,r.deprecatedArgs)},_getOption:null,_getDefaultSize:null,_isContainerVisible:function(){return this._$element.is(":visible")},_calculateCanvas:function(){var f=this,i=f._getOption("size")||{},t=f._getOption("margin")||{},u=f._getDefaultSize()||{},n={};return i.width<=0||i.height<=0?n=null:(n.width=i.width>0?r(i.width):f._$element.width()||u.width,n.height=i.height>0?r(i.height):f._$element.height()||u.height,n.left=t.left>0?r(t.left):u.left||0,n.top=t.top>0?r(t.top):u.top||0,n.right=t.right>0?r(t.right):u.right||0,n.bottom=t.bottom>0?r(t.bottom):u.bottom||0,n=n.width-n.left-n.right>0&&n.height-n.top-n.bottom>0?n:null),n},_setupResizeHandler:function(){l(this._getOption("redrawOnResize",!0),!0)?this._addResizeHandler():this._removeResizeHandler()},_addResizeHandler:function(){var n=this;n._resizeHandler||(n._resizeHandler=s(function(){n._handleResize()}),u.add(n._resizeHandler))},_removeResizeHandler:function(){this._resizeHandler&&(u.remove(this._resizeHandler),this._resizeHandler.stop(),this._resizeHandler=null)},_optionChanged:function(n){var t=this,i=t._eventsMap[n.name];if(i)t._createEventTrigger(i.newName||n.name);else switch(n.name){case"size":case"margin":t.render();break;case"redrawOnResize":t._setupResizeHandler();break;case"loadingIndicator":t._updateLoadIndicator(t._getLoadIndicatorOption()),t._getLoadIndicatorOption().show&&(t._skipHideLoadIndicatorOnEndUpdate=!0,t.showLoadingIndicator());break;default:t._invalidate(),t.callBase.apply(t,arguments)}},_visibilityChanged:function(n){n&&this.render()},_initIncidentOccured:function(){var t=this;t._incidentOccured=function(i,r){t._eventTrigger("incidentOccured",{target:{id:i,type:i[0]==="E"?"error":"warning",args:r,text:h.apply(null,[n.ERROR_MESSAGES[i]].concat(r?r.slice(0):[])),widget:t.NAME,version:n.VERSION}})}},_initLoadingIndicator:function(){this._getLoadIndicatorOption().show&&this.showLoadingIndicator()},_getLoadIndicatorOption:function(){return this.option("loadingIndicator")||{}},_showLoadIndicator:function(t,r){var u=this;u._loadIndicator=this._loadIndicator||n.viz.core.CoreFactory.createLoadIndicator(t,u.element()),u._loadIndicator.show(r.width,r.height),u._initializing&&u._loadIndicator.endLoading(i,!0)},_updateLoadIndicator:function(n,t,i){this._loadIndicator&&this._loadIndicator.applyOptions(n,t,i)},_endLoading:function(n){this._loadIndicator?this._loadIndicator.endLoading(n):n&&n()},_reappendLoadIndicator:function(){this._loadIndicator&&this._loadIndicator.toForeground()},_disposeLoadIndicator:function(){this._loadIndicator&&this._loadIndicator.dispose(),this._loadIndicator=null},_normalizeHtml:function(n){var i=/xmlns="[\s\S]*?"/gi,t=!0;return n=n.replace(i,function(n){return t?(t=!1,n):""}),n.replace(/xmlns:NS1="[\s\S]*?"/gi,"").replace(/NS1:xmlns:xlink="([\s\S]*?)"/gi,'xmlns:xlink="$1"')},_dataIsReady:e,_drawn:function(){var n=this;n.isReady=o,n._dataIsReady()&&n._renderer.onEndAnimation(function(){n.isReady=e}),n._eventTrigger("drawn",{})},showLoadingIndicator:function(){this._showLoadIndicator(this._getLoadIndicatorOption(),this._canvas||{})},hideLoadingIndicator:function(){var n=this._loadIndicator;if(n&&this._getLoadIndicatorOption().show){this.option(f,t.extend(!0,{},this.option(f),{show:!1}));return}n&&n.hide()},endUpdate:function(){this._updateLockCount!==1||this._requireRefresh||(this._skipHideLoadIndicatorOnEndUpdate||this.hideLoadingIndicator(),delete this._skipHideLoadIndicatorOnEndUpdate),this.callBase()},svg:function(){return this._normalizeHtml(this._renderer.svg())},isReady:o})}(DevExpress,jQuery),function(n){var u=n.viz,i=u.core,r=i.series;i.CoreFactory={createSeries:function(n,t){return new r.Series(n,t)},createPoint:function(n,t,i){return new r.points.Point(n,t,i)},createLabel:function(){return new i.series.points.Label},createRenderer:function(n){return new u.renderers.Renderer(n)},createTranslator1D:function(n,t,r,u){return(new i.Translator1D).setDomain(n,t).setCodomain(r,u)},createTranslator2D:function(n,t,r){return new i.Translator2D(n,t,r)},createTickManager:function(n,t,r){return new i.tickManager.TickManager(n,t,r)},createTooltip:function(n,t,r){return new i.Tooltip(n,t,r)},createLoadIndicator:function(n,t){return new i.LoadIndicator(n,t)},createLegend:function(n){return new i.Legend(n)},createSeriesFamily:function(n){return new r.helpers.SeriesFamily(n)},createDataValidator:function(n,t,r,u){return new i.DataValidator(n,t,r,u)}}}(DevExpress),DevExpress.MOD_VIZ_CORE=!0}if(!DevExpress.MOD_VIZ_CHARTS){if(!DevExpress.MOD_VIZ_CORE)throw Error("Required module is not referenced: viz-core");(function(n,t){function s(n){n.margin=u(n.margin)?n.margin:{},typeof n.margin=="number"?(n.margin=n.margin>=0?n.margin:r,n.margin={top:n.margin,bottom:n.margin,left:n.margin,right:n.margin}):(n.margin.top=n.margin.top>=0?n.margin.top:r,n.margin.bottom=n.margin.bottom>=0?n.margin.bottom:r,n.margin.left=n.margin.left>=0?n.margin.left:r,n.margin.right=n.margin.right>=0?n.margin.right:r)}function h(n){n.verticalAlignment=(n.verticalAlignment||"").toLowerCase(),n.horizontalAlignment=(n.horizontalAlignment||"").toLowerCase(),n.verticalAlignment!=="top"&&n.verticalAlignment!=="bottom"&&(n.verticalAlignment="top"),n.horizontalAlignment!=="left"&&n.horizontalAlignment!=="center"&&n.horizontalAlignment!=="right"&&(n.horizontalAlignment="center")}function o(){this.ctor.apply(this,arguments)}var f=t.viz,e=f.core.utils,u=t.utils.isDefined,r=10;f.charts.ChartTitle=o,o.prototype={ctor:function(n,t,i,r){var u=this;u.update(t,i),u.renderer=n,u.titleGroup=r},dispose:function(){var n=this;n.renderer=null,n.clipRect=null,n.title=null,n.innerTitleGroup=null,n.titleGroup=null,n.options=null},update:function(n,t){var i=this;n&&(h(n),i.horizontalAlignment=n.horizontalAlignment,i.verticalAlignment=n.verticalAlignment,s(n),i.margin=n.margin,i.options=n),i.setSize({width:t})},_setBoundingRect:function(){var t=this,r=t.options,i=t.changedMargin||t.margin,n;t.innerTitleGroup&&(n=t.innerTitleGroup.getBBox(),n.height+=i.top+i.bottom,n.width+=i.left+i.right,n.x-=i.left,n.y-=i.top,u(r.placeholderSize)&&(n.height=r.placeholderSize),t.boundingRect=n)},draw:function(){var n=this,t=n.options,i=n.renderer;t.text&&(n.changedMargin=null,n.innerTitleGroup?n.innerTitleGroup.clear():(n.innerTitleGroup=i.g(),n.clipRect=n.createClipRect(),n.titleGroup&&n.clipRect&&n.titleGroup.attr({clipId:n.clipRect.id})),n.innerTitleGroup.append(n.titleGroup),n.title=i.text(t.text,0,0).css(e.patchFontOptions(t.font)).attr({align:n.horizontalAlignment}).append(n.innerTitleGroup),n.title.text=t.text,n._correctTitleLength(),n._setClipRectSettings())},_correctTitleLength:function(){var n=this,t=n.title.text,r,i;(n.title.attr({text:t}),n._setBoundingRect(),i=n.getLayoutOptions(),n._width>i.width||t.indexOf("<br/>")!==-1)||(r=t.length*n._width/i.width,n.title.attr({text:t.substr(0,~~r-4)+"..."}),n.title.setTitle(t),n._setBoundingRect())},changeSize:function(t){var i=this,r=n.extend(!0,{},i.margin);r.top+r.bottom<t.height?(this.innerTitleGroup&&(i.options._incidentOccured("W2103"),this.innerTitleGroup.remove(),this.innerTitleGroup=null),i.clipRect&&(i.clipRect.remove(),i.clipRect=null)):t.height>0&&(e.decreaseGaps(r,["top","bottom"],t.height),t.height&&(i.changedMargin=r)),i._correctTitleLength(),i._setBoundingRect(),i._setClipRectSettings()},getLayoutOptions:function(){var t=this.options,n=this.innerTitleGroup?this.boundingRect:{width:0,height:0,x:0,y:0};return n.verticalAlignment=t.verticalAlignment,n.horizontalAlignment=t.horizontalAlignment,n.cutLayoutSide=t.verticalAlignment,n},setSize:function(n){this._width=n.width||this._width},shift:function(n,t){var i=this,r=i.getLayoutOptions();n-=r.x,t-=r.y,i.innerTitleGroup&&i.innerTitleGroup.move(n,t),i.clipRect&&i.clipRect.attr({translateX:n,translateY:t})},createClipRect:function(){if(u(this.options.placeholderSize))return this.renderer.clipRect(0,0,0,0)},_setClipRectSettings:function(){var n=this.getLayoutOptions(),t=this.clipRect;t&&t.attr({x:n.x,y:n.y,width:n.width,height:n.height})}}})(jQuery,DevExpress),function(n,t,i){function ct(n){return n!=="ignore"?"enlargeTickInterval":"ignore"}function ti(n){var t;return n=s.normalizeAngle(n),n>=315&&n<=360||n<45&&n>=0?t=1:n>=45&&n<135?t=2:n>=135&&n<225?t=3:n>=225&&n<315&&(t=4),t}function ut(n){return it(n||[],function(n){return n.value})}function nt(n){return it(n||[],function(n){return{value:n}})}var bt=t.viz,tt=bt.core,s=t.utils,r=s.isDefined,lt=s.isNumber,at=s.getSignificantDigitPosition,vt=s.roundValue,y=Math,c=y.abs,p=y.round,ui=y.pow,fi=y.sqrt,g=n.extend,w=n.each,l=n.noop,it=n.map,kt=90,yt=100,dt=5,pt=4,b="canvas_position_",v="canvas_position_start",et="canvas_position_bottom",ot="canvas_position_top",d="canvas_position_end",rt="logarithmic",st="discrete",a="top",o="bottom",f="left",e="right",k=4,u="center",gt=8,ni=4,ht,h={};h.normal={_getCssClasses:function(){var n=this._options.isHorizontal;return{axisClass:n?"dxc-h-axis":"dxc-v-axis",stripClass:n?"dxc-h-strips":"dxc-v-strips",constantLineClass:n?"dxc-h-constant-lines":"dxc-v-constant-lines"}},_getSharpParam:function(n){return this._options.isHorizontal^n?"h":"v"},_createAxisElement:function(){var n=this._axisPosition,t=this._getCanvasStartEnd(),i=this._options.isHorizontal?[t.start,n,t.end,n]:[n,t.start,n,t.end];return this._renderer.path(i,"line")},_getTranslatedCoord:function(n){return this._translator.translate(n)},_getCanvasStartEnd:function(){return{start:this._translator.translateSpecialCase(v),end:this._translator.translateSpecialCase(d)}},_getScreenDelta:function(){return c(this._translator.translateSpecialCase(v)-this._translator.translateSpecialCase(d))},_initAxisPositions:function(){var n=this,t=n._options.position,i=0;n.delta&&(i=n.delta[t]||0),n._axisPosition=n._orthogonalTranslator.translateSpecialCase(b+t)+i},_drawTitle:function(){var n=this,i=n._options,t=i.title,r={opacity:t.opacity,align:u};t.text&&n._axisTitleGroup&&(n._title=n._renderer.text(t.text,0,0).css(tt.utils.patchFontOptions(t.font)).attr(r).append(n._axisTitleGroup))},_adjustConstantLineLabels:function(){var w=this,ut=w._options,ft=ut.isHorizontal,et=w._constantLines,it=w._constantLineLabels,d,ot,n,g,nt,t,l,c,p,v=ft?{top:0,bottom:0}:{left:0,right:0},r,s,k,tt,rt,h,y;if(it!==i||et!==i){for(p=0;p<it.length;p++)if(l=c=0,g=ut.constantLines[p],r=g.paddingTopBottom,s=g.paddingLeftRight,nt=g.label,k=nt.verticalAlignment,tt=nt.horizontalAlignment,rt=nt.position==="inside",d=it[p],d!==null){if(ot=et[p],t=d.getBBox(),n=ot.getBBox(),h=t.height,y=t.width,ft)if(rt){tt===f?l-=s:l+=s;switch(k){case u:c+=n.y+n.height/2-t.y-h/2;break;case o:c+=n.y+n.height-t.y-h-r;break;default:c+=n.y-t.y+r}}else k===o?(c+=h+r-(t.y+h-w._orthogonalTranslator.translateSpecialCase(b+k)),v[o]<h+r&&(v[o]=h+r)):(c-=r,v[a]<r+h&&(v[a]=r+h));else if(rt){switch(tt){case u:l+=n.x+y/2-t.x-y/2;break;case e:l-=s;break;default:l+=s}c+=k===o?n.y-t.y+r:n.y-t.y-h-r}else c+=n.y+n.height/2-t.y-h/2,tt===e?(l+=s,v[e]<s+y&&(v[e]=s+y)):(l-=s,v[f]<s+y&&(v[f]=s+y));d.move(l,c)}w.padding=v}},_checkAlignmentConstantLineLabels:function(n){var s=this._options,r=n.position,t=(n.verticalAlignment||"").toLowerCase(),i=(n.horizontalAlignment||"").toLowerCase();s.isHorizontal?r==="outside"?(t=t===o?o:a,i=u):(t=t===u?u:t===o?o:a,i=i===f?f:e):r==="outside"?(t=u,i=i===f?f:e):(t=t===o?o:a,i=i===e?e:i===u?u:f),n.verticalAlignment=t,n.horizontalAlignment=i},_getConstantLineLabelsCoords:function(n,t){var o=this,s=o._orthogonalTranslator,r=o._options,i=u,h=n,c=n;r.isHorizontal?c=s.translateSpecialCase(b+t.verticalAlignment):h=s.translateSpecialCase(b+t.horizontalAlignment);switch(t.horizontalAlignment){case f:i=!r.isHorizontal&&t.position==="inside"?f:e;break;case u:i=u;break;case e:i=!r.isHorizontal&&t.position==="inside"?e:f}return{x:h,y:c,align:i}},_getAdjustedStripLabelCoords:function(n,t,i){var s=0,r=0,v=n.label.horizontalAlignment,h=n.label.verticalAlignment,c=t.getBBox(),l=i.getBBox();return v===f?s+=n.paddingLeftRight:v===e&&(s-=n.paddingLeftRight),h===a?r+=l.y-c.y+n.paddingTopBottom:h===u?r+=l.y+l.height/2-c.y-c.height/2:h===o&&(r-=n.paddingTopBottom),{x:s,y:r}},_adjustTitle:function(){var r=this,s=r._options,y=s.position,v=r._title,h=s.title.margin,n,t,i,c=r._translator.translateSpecialCase(b+u),p=r._axisElementsGroup,l,a=r._axisPosition,e;v&&p&&(t=v.getBBox(),n=p.getBBox(),e=n.isEmpty,l=t.height,s.isHorizontal?i=y===o?{y:(e?a:n.y+n.height)-t.y+h,x:c}:{y:(e?a:n.y)-l-t.y-h,x:c}:(i=y===f?{x:(e?a:n.x)-l-t.y-h,y:c}:{x:(e?a:n.x+n.width)+l+t.y+h,y:c},i.rotate=s.position===f?270:90),v.attr(i))},coordsIn:function(n,t){var i=this.getBoundingRect();return n>=i.x&&n<=i.x+i.width&&t>=i.y&&t<=i.y+i.height},_getTicksOptions:function(){var n=this._options;return{base:n.type===rt?n.logarithmBase:i,tickInterval:n.stubData?null:n.tickInterval,gridSpacingFactor:n.axisDivisionFactor,incidentOccured:n.incidentOccured,setTicksAtUnitBeginning:n.setTicksAtUnitBeginning,showMinorTicks:n.minorTick.visible||n.minorGrid.visible,minorTickInterval:n.minorTickInterval,minorTickCount:n.minorTickCount}},_getOverlappingBehaviorOptions:function(){var n=this,t=n._options,r=function(){return""},i=t.label.overlappingBehavior?g({},t.label.overlappingBehavior):null;return i&&(t.isHorizontal||(i.mode=ct(i.mode)),i.mode!=="rotate"&&(i.rotationAngle=0)),t.stubData||(r=function(n,i){return ft(n,i,{min:t.min,max:t.max})}),{hasLabelFormat:n._hasLabelFormat,labelOptions:t.label,overlappingBehavior:i,isHorizontal:t.isHorizontal,textOptions:n._textOptions,textFontStyles:n._textFontStyles,textSpacing:t.label.minSpacing,getText:r,renderText:function(t,i,r,u){return n._renderer.text(t,i,r,u).append(n._renderer.root)},translate:function(t,i){return i?n._orthogonalTranslator.translate(t):n._translator.translate(t)},isInverted:n._translator.getBusinessRange().invert}},getRangeData:function(){var n=this._options,t=n.range;return this._getRange(n,t.min,t.max,n.categories,this.minRangeArg,this.maxRangeArg,!n.valueMarginsEnabled)},_getStripLabelCoords:function(n,t,i){var c=this,l=c._orthogonalTranslator,y=c._options,v=y.isHorizontal,r=v?u:f,s,h;return v?(n.horizontalAlignment===u?(s=t+(i-t)/2,r=u):n.horizontalAlignment===f?(s=t,r=f):n.horizontalAlignment===e&&(s=i,r=e),h=l.translateSpecialCase(b+n.verticalAlignment)):(s=l.translateSpecialCase(b+n.horizontalAlignment),r=n.horizontalAlignment,n.verticalAlignment===a?h=t:n.verticalAlignment===u?h=i+(t-i)/2:n.verticalAlignment===o&&(h=i)),{x:s,y:h,align:r}},_getTranslatedValue:function(n,t,i){return{x:this._translator.translate(n,i),y:t}},_getSkippedCategory:function(){var n=this,i=n._options,t=n._translator.getVisibleCategories()||n._range.categories,r;return!t||!n._tickOffset||i.valueMarginsEnabled||(r=i.inverted?t[0]:t[t.length-1]),r}},h.circular={_overlappingBehaviorType:"circular",_getCssClasses:function(){return{axisClass:"dxc-c-axis",stripClass:"dxc-c-strips",constantLineClass:"dxc-c-constant-lines"}},_createAxisElement:function(){var n=this._translator.getCenter();return this._renderer.circle(n.x,n.y,this._translator.getValLength())},_setBoundingRect:function(){this.boundingRect={width:0,height:0}},_getStick:function(){return this._options.firstPointOnStartAngle||this._options.type!==st},_getTicksOptions:h.normal._getTicksOptions,_getOverlappingBehaviorOptions:function(){var n=h.normal._getOverlappingBehaviorOptions.call(this),t=this._translator,i=t.getBusinessRange(),r=this._options.label.indentFromAxis||0;return n.overlappingBehavior&&(n.overlappingBehavior={mode:ct(n.overlappingBehavior.mode)}),n.translate=function(n){return t.translate(n,et)},n.addMinMax={min:!0},n.isInverted=i.arg.invert,n.circularRadius=t.translate(ot,et).radius+r,n.circularStartAngle=n.circularEndAngle=t.getStartAngle(),n.isHorizontal=!1,n},getRangeData:function(n){var t=this._options,r=s.isNumber(t.period)&&t.argumentType==="numeric"?t.period+(n||0):i;return this._getRange(t,i,r,t.categories,this.minRangeArg,this.maxRangeArg,this._getStick())},measureLabels:function(){var n=this,t=n._options,r=t.label.indentFromAxis||0,u=t.visible?t.width:0,i;return!n._axisElementsGroup||!n._options.label.visible?{height:u,width:u}:(n._updateTickManager(),i=n._tickManager.getMaxLabelParams(),{height:i.height+r+k,width:i.width+r+k})},_getTranslatedCoord:function(n){return this._translator.translate(n).angle},_getCanvasStartEnd:function(){return{start:this._translator.translate(v).angle,end:this._translator.translate(d).angle}},_createStrip:function(n,t,i){var r=this._translator.getCenter(),u=this._translator.getValLength();return this._renderer.arc(r.x,r.y,0,u,-t,-n).attr(i)},_getStripLabelCoords:function(n,t,i){var h=this,r=h._translator,c=t+(i-t)/2,f=s.getCosAndSin(-c),e=r.getValLength()/2,o=r.getCenter(),l=p(o.x+e*f.cos),a=p(o.y-e*f.sin);return{x:l,y:a,align:u}},_createConstantLine:function(n,t){var i=this._translator.getCenter(),r=this._translator.getValLength();return this._createPathElement([i.x,i.y,i.x+r,i.y],t).rotate(n,i.x,i.y)},_getConstantLineLabelsCoords:function(n){var e=this,t=e._translator,i=s.getCosAndSin(-n),r=t.getValLength()/2,f=t.getCenter(),o=p(f.x+r*i.cos),h=p(f.y-r*i.sin);return{x:o,y:h,align:u}},_checkAlignmentConstantLineLabels:l,_getScreenDelta:function(){return 2*Math.PI*this._translator.getValLength()},_getTickCoord:function(n){var t=this._translator.getCenter(),i=this._translator.getValLength();return{x1:t.x+i-k,y1:t.y,x2:t.x+i+k,y2:t.y,angle:n.angle}},_getLabelAdjustedCoord:function(n){var a=this,t=n.labelPos,c=s.getCosAndSin(t.angle),e=c.cos,o=c.sin,h=n.label.getBBox(),f=h.width/2,i=h.height/2,l=a._options.label.indentFromAxis||0,r=t.x+l*e,u=t.y+(t.y-h.y-i)+l*o;switch(ti(t.angle)){case 1:r+=f,u+=i*o;break;case 2:r+=f*e,u+=i;break;case 3:r+=-f,u+=i*o;break;case 4:r+=f*e,u+=-i}return{x:r,y:u}},_getGridLineDrawer:function(){var t=this,i=t._translator,r=i.getValLength(),n=i.getCenter();return function(i){return t._createPathElement([n.x,n.y,n.x+r,n.y],i.gridStyle).rotate(i.angle,n.x,n.y)}},_getTranslatedValue:function(n,t,i){return this._translator.translate(n,et,[-i,0])},_getAdjustedStripLabelCoords:function(n,t){var i,r=t.getBBox();return i=t.attr("y")-r.y-r.height/2,{x:0,y:i}},coordsIn:function(n,t){if(this._translator.untranslate(n,t).r>this._translator.getValLength())return!0},_rotateTick:function(n,t){var i=this._translator.getCenter();n.graphic.rotate(t,i.x,i.y)}},h.linear={_overlappingBehaviorType:"linear",getRangeData:h.circular.getRangeData,_getTicksOptions:h.normal._getTicksOptions,_getCssClasses:function(){return{axisClass:"dxc-l-axis",stripClass:"dxc-l-strips",constantLineClass:"dxc-l-constant-lines"}},_createAxisElement:function(){var n=this._translator.getCenter(),t=[n.x,n.y,n.x+this._translator.getValLength(),n.y];return this._renderer.path(t,"line").rotate(this._translator.getBaseAngle(),n.x,n.y)},_getStick:function(){return!this._options.valueMarginsEnabled},_setBoundingRect:h.circular._setBoundingRect,_getScreenDelta:function(){return this._translator.getValLength()},_getTickCoord:function(n){return{x1:n.posX-k,y1:n.posY,x2:n.posX+k,y2:n.posY,angle:n.angle+kt}},_getOverlappingBehaviorOptions:function(){var i=this._translator,n=h.normal._getOverlappingBehaviorOptions.call(this),t=s.normalizeAngle(i.getStartAngle());return n.overlappingBehavior&&(n.overlappingBehavior={mode:ct(n.overlappingBehavior.mode)}),n.isHorizontal=t>45&&t<135||t>225&&t<315?!0:!1,n.isInverted=i.getBusinessRange().val.invert,n.translate=function(n){return i.translate(ot,n).x},n},_getLabelAdjustedCoord:function(n){var o=this,t=n.labelPos,i=s.getCosAndSin(t.angle),u=o._options.label.indentFromAxis||0,r=n.label.getBBox(),f,e;return f=t.x-c(u*i.sin)+c(r.width/2*i.cos),e=t.y+(t.y-r.y)-c(r.height/2*i.sin)+c(u*i.cos),{x:f,y:e}},_getGridLineDrawer:function(){var t=this,i=t._translator,n=i.getCenter();return function(i){return t._renderer.circle(n.x,n.y,s.getDistance(n.x,n.y,i.posX,i.posY)).attr(i.gridStyle).sharp()}},_getTranslatedValue:function(n,t,i){return this._translator.translate(v,n,[0,i])},_getTranslatedCoord:function(n){return this._translator.translate(v,n).radius},_getCanvasStartEnd:function(){return{start:this._translator.translate(v,v).radius,end:this._translator.translate(ot,d).radius}},_createStrip:function(n,t,i){var r=this._translator.getCenter();return this._renderer.arc(r.x,r.y,n,t,0,360).attr(i)},_getAdjustedStripLabelCoords:h.circular._getAdjustedStripLabelCoords,_getStripLabelCoords:function(n,t,i){var f=this,e=f._translator,o=t+(i-t)/2,r=e.getCenter(),s=p(r.y-o);return{x:r.x,y:s,align:u}},_createConstantLine:function(n,t){var i=this._translator.getCenter();return this._renderer.circle(i.x,i.y,n).attr(t).sharp()},_getConstantLineLabelsCoords:function(n){var i=this,r=i._translator,t=r.getCenter(),f=p(t.y-n);return{x:t.x,y:f,align:u}},_checkAlignmentConstantLineLabels:l,_rotateTick:function(n,t){n.graphic.rotate(t,n.posX,n.posY)}},h.circularSpider=g({},h.circular,{_createAxisElement:function(){var n=it(this.getSpiderTicks(),function(n){return{x:n.posX,y:n.posY}});return this._renderer.path(n,"area")},getRangeData:function(n){var t=h.circular.getRangeData.call(this,n);return t.addSpiderCategory=t.stick=!0,t},getSpiderTicks:function(){var n=this;return n._spiderTicks=nt(n._tickManager.getFullTicks()),n._initTicks(n._spiderTicks,{},{}),n._spiderTicks},_createStrip:function(n,t,i){var u=this._translator.getCenter(),f=it(this.getSpiderTicks(),function(i){var u;return u=r(i.angle)&&i.angle>=n&&i.angle<=t?{x:i.posX,y:i.posY}:null});return f.push({x:u.x,y:u.y}),this._renderer.path(f,"area").attr(i)},_getTranslatedCoord:function(n){return this._translator.translate(n,!1).angle},_setTickOffset:function(){this._tickOffset=!1}}),h.linearSpider=g({},h.linear,{_createPathElement:function(n,t){return this._renderer.path(n,"area").attr(t).sharp()},setSpiderTicks:function(n){this._spiderTicks=n},_getGridLineDrawer:function(){var n=this,i=n._translator,t=i.getCenter();return function(i){var r=s.getDistance(t.x,t.y,i.posX,i.posY);return n._createPathElement(n._getGridPoints(t,r),i.gridStyle)}},_getGridPoints:function(n,t){return it(this._spiderTicks,function(i){var r=s.getCosAndSin(i.angle);return{x:p(n.x+t*r.cos),y:p(n.y+t*r.sin)}})},_createStrip:function(n,t,i){var r=this._translator.getCenter(),u=this._getGridPoints(r,t),f=this._getGridPoints(r,n);return this._renderer.path([f,u.reverse()],"area").attr(i)},_createConstantLine:function(n,t){var i=this._translator.getCenter(),r=this._getGridPoints(i,n);return this._createPathElement(r,t)}});var ii=function(n){var t=n.label,i=n.position,u=n.isHorizontal?o:f,s=n.isHorizontal?a:e;i!==u&&i!==s&&(i=u),i!==e||t.userAlignment||(t.alignment=f),n.position=i,n.hoverMode=n.hoverMode?n.hoverMode.toLowerCase():"none",t.minSpacing=r(t.minSpacing)?t.minSpacing:dt},wt=function(n,i,r){var u={value:n,valueText:t.formatHelper.format(n,i.format,i.precision)||""};return r&&(u.min=r.min,u.max=r.max),u},ft=function(t,i,r){var u=wt(t,i,r);return n.isFunction(i.customizeText)?i.customizeText.call(u,u):u.valueText},ri=function(t,r,u){var f=wt(t,r,u);return n.isFunction(r.customizeHint)?r.customizeHint.call(f,f):i};ht=t.viz.charts.Axis=function(n,t){this._renderer=n.renderer,this._init(n,t)},ht.prototype={constructor:ht,dispose:function(){var n=this;n._axisElementsGroup&&n._axisElementsGroup.dispose(),n._deleteLabelsData(),n._stripLabels=n._strips=null,n._title=null,n._axisStripGroup=n._axisConstantLineGroup=n._axisLabelGroup=null,n._axisLineGroup=n._axisElementsGroup=n._axisGridGroup=null,n._axisGroup=n._axisTitleGroup=null,n._axesContainerGroup=n._stripsGroup=n._constantLinesGroup=null,n._renderer=n._options=n._textOptions=n._textFontStyles=null,n._range=n._translator=n._orthogonalTranslator=null,n._majorTicks=n._minorTicks=null,n._tickManager=null},getOptions:function(){return this._options},setPane:function(n){this.pane=n,this._options.pane=n},setTypes:function(n,t,i){this._options.type=n||this._options.type,this._options[i]=t||this._options[i]},getTranslator:function(){return this._translator},_init:function(n,t){var i=this,u,f=t.label;i._options=u=t,ii(u),i._setType(t.drawingType),i._setTickOffset(),u.range={min:u.min,max:u.max},i.pane=u.pane,i.name=u.name,i.priority=u.priority,i._virtual=u.virtual,i._stripsGroup=n.stripsGroup,i._labelAxesGroup=n.labelAxesGroup,i._constantLinesGroup=n.constantLinesGroup,i._axesContainerGroup=n.axesContainerGroup,i._gridContainerGroup=n.gridGroup,i._createAxisGroups(),i._hasLabelFormat=f.format!==""&&r(f.format),i._textOptions={align:f.alignment,opacity:f.opacity},i._textFontStyles=tt.utils.patchFontOptions(f.font),i._tickManager=i._createTickManager(),u.type===rt&&(u.logarithmBaseError&&(u.incidentOccured("E2104"),delete u.logarithmBaseError),i.calcInterval=function(n,i){return s.getLog(n/i,t.logarithmBase)})},updateSize:function(n){var t=this,i=t._options,r=i.isHorizontal?"horizontal":"vertical";i.title.text&&t._axisTitleGroup&&(i.incidentOccured("W2105",[r]),t._axisTitleGroup.remove(),t._axisTitleGroup=null),n&&t._axisElementsGroup&&i.label.visible&&!i.stubData&&(i.incidentOccured("W2106",[r]),t._axisElementsGroup.remove(),t._axisElementsGroup=null),t._setBoundingRect()},_updateTranslatorInterval:function(){var n=this,t,r,u,f=n._translator,i=n._range;if(i.categories||i.isSynchronized||(n.getMajorTicks(!0),i.addRange(n._tickManager.getTickBounds()),f.reinit()),n._majorTicks=r=n.getMajorTicks(),!i.categories)for(u=r.length,t=0;t<u-1;t++)i.addRange({interval:c(r[t].value-r[t+1].value)});n._decimatedTicks=n._range.categories?n.getDecimatedTicks():[],n._minorTicks=n.getMinorTicks()},setTranslator:function(n,t){this._translator=n,this._orthogonalTranslator=r(t)?t:i,this.resetTicks(),this._updateTranslatorInterval()},resetTicks:function(){this._deleteLabelsData(),this._majorTicks=this._minorTicks=null},setRange:function(n){var t=this,i=t._options;i.min=n.minVisible,i.max=n.maxVisible,i.stubData=n.stubData,t._range=n,t._tickManager&&t._tickManager.updateMinMax({min:i.min,max:i.max}),t.resetTicks()},getCurrentLabelPos:function(){var n=this,t=n._options,i=t.position,r=t.label.indentFromAxis,u=n._axisPosition;return i===a||i===f?u-r:u+r},getUntranslatedValue:function(n){var i=this,u=i._translator,t=u.untranslate(n);return r(t)?ft(lt(t)?vt(t,at(i._range.interval)):t,i._options.label):null},_drawAxis:function(){var n=this,t=n._options,i=n._createAxis({"stroke-width":t.width,stroke:t.color,"stroke-opacity":t.opacity});i.append(n._axisLineGroup)},_correctMinForTicks:function(n,t,i){var f=at(c(t-n)/i),r=vt(Number(n),f),u;return r<n&&(u=y.pow(10,-f),r=s.applyPrecisionByMinDelta(r,u,r+u)),r>t&&(r=n),r},_getTickManagerData:function(){var t=this,r=t._options,u=t._getScreenDelta(),i=r.min,f=r.max,e=t._translator.getVisibleCategories()||t._range.categories,o=n.isArray(e)?e:t._majorTicks&&ut(t._majorTicks),s=t._minorTicks&&ut(t._minorTicks);return lt(i)&&r.type!==rt&&(i=t._correctMinForTicks(i,f,u)),{min:i,max:f,customTicks:o,customMinorTicks:s,screenDelta:u}},_getTickManagerTypes:function(){return{axisType:this._options.type,dataType:this._options.dataType}},_createTickManager:function(){return t.viz.core.CoreFactory.createTickManager({},{},{overlappingBehaviorType:this._overlappingBehaviorType})},_getMarginsOptions:function(){var n=this._range;return{stick:n.stick,minStickValue:n.minStickValue,maxStickValue:n.maxStickValue,percentStick:n.percentStick,minValueMargin:this._options.minValueMargin,maxValueMargin:this._options.maxValueMargin,minSpaceCorrection:n.minSpaceCorrection,maxSpaceCorrection:n.maxSpaceCorrection}},_updateTickManager:function(){var t=this._getOverlappingBehaviorOptions(),n;n=g(!0,{},this._getMarginsOptions(),t,this._getTicksOptions()),this._tickManager.update(this._getTickManagerTypes(),this._getTickManagerData(),n)},_correctLabelAlignment:function(){var n=this,t=n._options.label,i=n._tickManager.getOverlappingBehavior();i&&i.mode==="rotate"?(n._textOptions.rotate=i.rotationAngle,t.userAlignment||(n._textOptions.align=f)):t.userAlignment||(n._textOptions.align=t.alignment)},_correctLabelFormat:function(){this._options.label=this._tickManager.getOptions().labelOptions},getTicksValues:function(){return{majorTicksValues:ut(this._majorTicks||this.getMajorTicks()),minorTicksValues:ut(this._minorTicks||this.getMinorTicks())}},getMajorTicks:function(n){var t=this,i;return t._updateTickManager(),t._textOptions.rotate=0,i=nt(t._tickManager.getTicks(n)),t._correctLabelAlignment(),t._correctLabelFormat(),i},getMinorTicks:function(){return nt(this._tickManager.getMinorTicks())},getDecimatedTicks:function(){return nt(this._tickManager.getDecimatedTicks())},setTicks:function(n){this.resetTicks(),this._majorTicks=nt(n.majorTicks),this._minorTicks=nt(n.minorTicks)},_deleteLabelsData:function(){w(this._majorTicks||[],function(t,i){i.label&&n(i.label.element).removeData()})},_drawTicks:function(n){var t=this,i=t._axisLineGroup;w(n||[],function(n,r){var u=t._getTickCoord(r),f;u&&(f=t._options.isHorizontal?[u.x1,u.y1,u.x2,u.y2]:[u.y1,u.x1,u.y2,u.x2],r.graphic=t._createPathElement(f,r.tickStyle).append(i),u.angle&&t._rotateTick(r,u.angle))})},_createPathElement:function(n,t,i){return this._renderer.path(n,"line").attr(t).sharp(this._getSharpParam(i))},_createAxis:function(n){return this._createAxisElement().attr(n).sharp(this._getSharpParam(!0))},_getTickCoord:function(n){var t;return t=r(n.posX)&&r(n.posY)?{x1:n.posX,y1:n.posY-k,x2:n.posX,y2:n.posY+k}:null},setPercentLabelFormat:function(){this._hasLabelFormat||(this._options.label.format="percent")},resetAutoLabelFormat:function(){this._hasLabelFormat||delete this._options.label.format},_drawLabels:function(){var t=this,u=t._renderer,f=t._axisElementsGroup,i=t._options,e=/^\s+$/;w(t._majorTicks,function(t,o){var s=o.labelText,h,c;r(s)&&s!==""&&!e.test(s)&&(h=i.isHorizontal?o.labelPos.x:o.labelPos.y,c=i.isHorizontal?o.labelPos.y:o.labelPos.x,o.label?o.label.css(o.labelFontStyle).attr(o.labelStyle).attr({text:s,x:h,y:c}):o.label=u.text(s,h,c).css(o.labelFontStyle).attr(o.labelStyle).append(f),n(o.label.element).data({argument:o.value}))})},getMultipleAxesSpacing:function(){return this._options.multipleAxesSpacing||0},_drawTitle:l,_getGridLineDrawer:function(n){var t=this,u=t._translator,w=t._options,s=t._orthogonalTranslator,r=w.isHorizontal,h=r?f:a,l=r?e:o,y=s.translateSpecialCase(v),p=s.translateSpecialCase(d),k=n.visible&&n[h]?u.translateSpecialCase(b+h):i,g=n.visible&&n[l]?u.translateSpecialCase(b+l):i,nt=r?function(n){return n.posX?[n.posX,y,n.posX,p]:null}:function(n){return n.posX?[y,n.posX,p,n.posX]:null};return function(n){var i;if(!(c(n.posX-k)<pt)&&!(c(n.posX-g)<pt))return i=nt(n),i&&t._createPathElement(i,n.gridStyle)}},_drawGrids:function(n,t){var i=this,r=i._axisGridGroup,u=i._getGridLineDrawer(t||{visible:!1});w(n||[],function(n,t){t.grid=u(t),t.grid&&t.grid.append(r)})},_getConstantLinePos:function(n,t,i){var f=this._validateUnit(n,"E2105","constantLine"),u=this._getTranslatedCoord(f);return!r(u)||u<y.min(t,i)||u>y.max(t,i)?{}:{value:u,parsedValue:f}},_createConstantLine:function(n,t){var f=this,i=this._orthogonalTranslator,r=i.translateSpecialCase(v),u=i.translateSpecialCase(d),e=this._options.isHorizontal?[n,u,n,r]:[r,n,u,n];return f._createPathElement(e,t)},_drawConstantLinesAndLabels:function(n,t,i){if(r(n.value)){var u=this,o=u._getConstantLinePos(n.value,t,i),f=n.label||{},e=o.value,s={stroke:n.color,"stroke-width":n.width,dashStyle:n.dashStyle};if(!r(e)){u._constantLines.push(null),f.visible&&u._constantLineLabels.push(null);return}u._constantLines.push(u._createConstantLine(e,s).append(u._axisConstantLineGroup)),u._constantLineLabels.push(f.visible?u._drawConstantLineLabels(o.parsedValue,f,e):null)}},_drawConstantLine:function(){var n=this,t=n._options,r=t.constantLines,i=n._getCanvasStartEnd();t.stubData||(n._constantLines=[],n._constantLineLabels=[],w(r,function(t,r){n._drawConstantLinesAndLabels(r,i.start,i.end)}))},_drawConstantLineLabels:function(n,t,i){var u=this,f=t.text,s=u._options,o=s.label,e;return u._checkAlignmentConstantLineLabels(t),f=r(f)?f:ft(n,o),e=u._getConstantLineLabelsCoords(i,t),u._renderer.text(f,e.x,e.y).css(tt.utils.patchFontOptions(g({},o.font,t.font))).attr({align:e.align}).append(u._axisConstantLineGroup)},_adjustConstantLineLabels:l,_getStripPos:function(t,i,u,f,e){var h=!!(e.minVisible||e.maxVisible),c=e.categories||[],o=this._getTranslatedCoord(this._validateUnit(t,"E2105","strip")),s=this._getTranslatedCoord(this._validateUnit(i,"E2105","strip")),l=e.minVisible;return!h&&(n.inArray(t,c)===-1||n.inArray(i,c)===-1)?{stripFrom:0,stripTo:0}:(!r(o)&&h&&(o=t<l?u:f),!r(s)&&h&&(s=i<l?u:f),o<s?{stripFrom:o,stripTo:s}:{stripFrom:s,stripTo:o})},_createStrip:function(n,t,i){var f,e,o,s,h=this._orthogonalTranslator,r=h.translateSpecialCase(v),u=h.translateSpecialCase(d);return this._options.isHorizontal?(f=n,e=y.min(r,u),o=t-n,s=c(r-u)):(f=y.min(r,u),e=n,o=c(r-u),s=c(n-t)),this._renderer.rect(f,e,o,s).attr(i)},_drawStrip:function(){var n=this,e=n._options,o=e.strips,s=this._getCanvasStartEnd(),u,i,t,f,h;if(!e.stubData)for(n._strips=[],n._stripLabels=[],u=0;u<o.length;u++)if(i=o[u],f=i.label||{},h={fill:i.color},r(i.startValue)&&r(i.endValue)&&r(i.color)){if(t=n._getStripPos(i.startValue,i.endValue,s.start,s.end,n._range),t.stripTo-t.stripFrom==0||!r(t.stripTo)||!r(t.stripFrom)){n._strips.push(null),f.text&&n._stripLabels.push(null);continue}n._strips.push(n._createStrip(t.stripFrom,t.stripTo,h).append(n._axisStripGroup)),n._stripLabels.push(f.text?n._drawStripLabel(f,t.stripFrom,t.stripTo):null)}},_drawStripLabel:function(n,t,i){var r=this,f=r._options,u=r._getStripLabelCoords(n,t,i);return r._renderer.text(n.text,u.x,u.y).css(tt.utils.patchFontOptions(g({},f.label.font,n.font))).attr({align:u.align}).append(r._axisLabelGroup)},_adjustStripLabels:function(){var r=this,t=r._stripLabels,f=r._strips,n,u;if(t!==i||f!==i)for(n=0;n<t.length;n++)t[n]!==null&&(u=r._getAdjustedStripLabelCoords(r._options.strips[n],t[n],f[n]),t[n].move(u.x,u.y))},_initAxisPositions:l,_adjustLabels:function(){var u=this,f=u._options,r=u._majorTicks,e=r.length,b=f.isHorizontal,s=u._tickManager?u._tickManager.getOverlappingBehavior():f.label.overlappingBehavior,c=f.position,t,i,l,v,n,h,y=!1;if(w(r,function(n,t){t.label&&(t.label.attr(u._getLabelAdjustedCoord(t)),y=!0)}),l=y&&b&&s&&s.mode==="stagger",l){for(i=0,n=0;n<e;n=n+2)t=r[n].label,h=t&&t.getBBox()||{},h.height>i&&(i=h.height);for(v=s.staggeringSpacing,i=p(i)+v,n=1;n<e;n=n+2)t=r[n].label,t&&(c===o?t.move(0,i):c===a&&t.move(0,-i));for(n=0;n<e;n++)r[n].label&&r[n].label.rotate(0)}},_getLabelAdjustedCoord:function(n){var s=this,w=s._options,t=n.label.getBBox(),r,h,c=s._axisElementsGroup&&s._axisElementsGroup.getBBox()||{},p=w.isHorizontal,l=w.position,i=s.padding&&s.padding[l]||0,v=s._textOptions,y=n.label.attr("y");return p&&l===o?h=2*y-t.y+i:p?p&&l===a&&(h=2*y-t.y-t.height-i):(r=l===f?v.align===e?t.x+t.width-i:v.align===u?t.x+t.width/2-i-(c.width/2||0):t.x-i-(c.width||0):v.align===u?t.x+t.width/2+(c.width/2||0)+i:v.align===e?t.x+t.width+(c.width||0)+i:t.x+i,h=y+~~(y-t.y-t.height/2)),{x:r,y:h}},_adjustTitle:l,_createAxisGroups:function(){var n=this,t=n._renderer,i=n._getCssClasses();n._axisGroup=t.g().attr({"class":i.axisClass}),n._axisStripGroup=t.g().attr({"class":i.stripClass}),n._axisGridGroup=t.g().attr({"class":"dxc-grid"}),n._axisElementsGroup=t.g().attr({"class":"dxc-elements"}).append(n._axisGroup),n._axisLineGroup=t.g().attr({"class":"dxc-line"}).append(n._axisGroup),n._axisTitleGroup=t.g().attr({"class":"dxc-title"}).append(n._axisGroup),n._axisConstantLineGroup=t.g().attr({"class":i.constantLineClass}),n._axisLabelGroup=t.g().attr({"class":"dxc-axis-labels"})},_clearAxisGroups:function(n){var t=this;t._axisGroup.remove(),t._axisStripGroup.remove(),t._axisLabelGroup.remove(),t._axisConstantLineGroup.remove(),t._axisGridGroup.remove(),t._axisTitleGroup?t._axisTitleGroup.clear():n||(t._axisTitleGroup=t._renderer.g().attr({"class":"dxc-title"}).append(t._axisGroup)),t._axisElementsGroup?t._axisElementsGroup.clear():n||(t._axisElementsGroup=t._renderer.g().attr({"class":"dxc-elements"}).append(t._axisGroup)),t._axisLineGroup.clear(),t._axisStripGroup.clear(),t._axisGridGroup.clear(),t._axisConstantLineGroup.clear(),t._axisLabelGroup.clear()},_initTicks:function(n,t,i,r){var u=this,f=u._options,o={stroke:t.color,"stroke-width":1,"stroke-opacity":t.opacity},s={stroke:i.color,"stroke-width":i.width,"stroke-opacity":i.opacity},h=u.getCurrentLabelPos(),e=u._getSkippedCategory();w(n||[],function(n,t){var i;e&&e===t.value||(i=u._getTranslatedValue(t.value,u._axisPosition,u._tickOffset),t.posX=i.x,t.posY=i.y,t.angle=i.angle),t.tickStyle=o,t.gridStyle=s,r&&(t.labelText=ft(t.value,f.label,{min:f.min,max:f.max}),t.labelPos=u._getTranslatedValue(t.value,h),t.labelStyle=u._textOptions,t.labelFontStyle=u._textFontStyles,t.labelHint=ri(t.value,f.label,{min:f.min,max:f.max}))})},_setTickOffset:function(){var n=this._options,t=n.discreteAxisDivisionMode,i=t!=="crossLabels"||!t;this._tickOffset=n.isHorizontal?+i:-i},drawGrids:function(n){var t=this,i=t._options,n=n||{};t._axisGridGroup.append(t._gridContainerGroup),i.grid.visible&&t._drawGrids(t._majorTicks.concat(t._decimatedTicks),n),i.minorGrid.visible&&t._drawGrids(t._minorTicks,n)},draw:function(n){var t=this,i=t._options,r;t._axisGroup&&t._clearAxisGroups(n),r=i.label.visible&&t._axisElementsGroup&&!i.stubData,t._updateTranslatorInterval(),t._initAxisPositions(),t._initTicks(t._majorTicks,i.tick,i.grid,r),t._initTicks(t._decimatedTicks,i.tick,i.grid,!1),t._initTicks(t._minorTicks,i.minorTick,i.minorGrid),t._virtual||(i.visible&&t._drawAxis(),i.tick.visible&&(t._drawTicks(t._majorTicks),t._drawTicks(t._decimatedTicks)),i.minorTick.visible&&t._drawTicks(t._minorTicks),r&&t._drawLabels(),t._drawTitle()),i.strips&&t._drawStrip(),i.constantLines&&t._drawConstantLine(),t._axisStripGroup.append(t._stripsGroup),t._axisConstantLineGroup.append(t._constantLinesGroup),t._axisGroup.append(t._axesContainerGroup),t._axisLabelGroup.append(t._labelAxesGroup),t._adjustConstantLineLabels(),r&&t._adjustLabels(),t._createHints(),t._adjustStripLabels(),t._adjustTitle(),t._setBoundingRect()},_createHints:function(){var n=this;w(n._majorTicks||[],function(n,t){var i=t.labelHint;r(i)&&i!==""&&t.label.setTitle(i)})},_setBoundingRect:function(){var n=this,f=n._options,t=n._axisElementsGroup?n._axisElementsGroup.getBBox():{x:0,y:0,width:0,height:0,isEmpty:!0},a=n._axisLineGroup.getBBox(),c=f.placeholderSize,u,s=f.isHorizontal,i=s&&"y"||"x",h=s&&"height"||"width",l=f.crosshairEnabled?s?ni:gt:0,r=n._title&&n._axisTitleGroup?n._axisTitleGroup.getBBox():t;if(t.isEmpty&&r.isEmpty&&!c){n.boundingRect=t;return}u=a[i]||n._axisPosition,f.position===(s&&o||e)?(t[h]=(c||r[i]+r[h]-u)+l,t[i]=u):(t[h]=(c||a[h]+u-r[i])+l,t[i]=(r.isEmpty?u:r[i])-l),n.boundingRect=t},getBoundingRect:function(){return this._axisElementsGroup?this.boundingRect:{x:0,y:0,width:0,height:0}},shift:function(n,t){var i={};n&&(i.translateX=n),t&&(i.translateY=t),this._axisGroup.attr(i)},applyClipRects:function(n,t){this._axisGroup.attr({clipId:t}),this._axisStripGroup.attr({clipId:n})},validate:function(n,t){var r=this,i=r._options,u=i.range,e=new tt.ParseUtils,f=n?i.argumentType:i.valueType,o=f?e.getParser(f,"axis"):function(n){return n};r.parser=o,r.incidentOccured=t,i.dataType=f,i.min&&(i.min=r._validateUnit(i.min,"E2106")),i.max&&(i.max=r._validateUnit(i.max,"E2106")),u.min&&(u.min=r._validateUnit(u.min)),u.max&&(u.max=r._validateUnit(u.max))},_validateUnit:function(n,t,r){var u=this;return n=u.parser(n),n===i&&t&&u.incidentOccured(t,[r]),n},adjustZoomValues:function(n,t,i){var f=this,u=f._options.range;return i=i||f._options.type===st,n=f._validateUnit(n),t=f._validateUnit(t),!i&&u&&(r(u.min)&&(n=r(n)?u.min<n?n:u.min:n,t=r(t)?u.min<t?t:u.min:t),r(u.max)&&(t=r(t)?u.max>t?t:u.max:t,n=r(n)?u.max>n?n:u.max:n)),f.minRangeArg=n,f.maxRangeArg=t,{min:n,max:t}},resetZoom:function(){this.minRangeArg=null,this.maxRangeArg=null},_getRange:function(n,t,u,f,e,o,s){var h={},a=function(t){n.valueMarginsEnabled?r(n[t])&&(h[t]=n[t],h[t+"Priority"]=yt):(h[t]=0,h[t+"Priority"]=yt)},c=n.type,l=c===st,v=c===rt;return v&&(t=t<=0?i:t,u=u<=0?i:u),l?(h.startCategories=r(e)?e:t,h.endCategories=r(o)?o:u):r(t)&&r(u)?(h.min=t<u?t:u,h.max=u>t?u:t):(h.min=t,h.max=u),a("minValueMargin"),a("maxValueMargin"),h.stick=s,h.categories=f,h.dataType=n.dataType,h.axisType=c,h.axisType===rt&&(h.base=n.logarithmBase),h.invert=n.inverted,h.minVisible=l?i:r(e)?e:t,h.maxVisible=l?i:r(o)?o:u,h},_setType:function(n){var t=this;w(h[n],function(n,i){t[n]=i})},_getSharpParam:function(){return!0},getSpiderTicks:l,setSpiderTicks:l,measureLabels:l,getRangeData:l,coordsIn:l,_getSkippedCategory:l}}(jQuery,DevExpress),function(n,t,i){function f(n,t,i,r){var u=0;return t==="right"?u=n.width-n.right+i:t==="left"&&(u=n.left-i-r),u}function e(n,t,i,r){var u=0;return t==="top"?u=n.top-i:t==="bottom"&&(u=n.height-n.bottom+r+i),u}var r=2,u=t.utils.isDefined;t.viz.charts.ScrollBar=function(n,i){this._translator=t.viz.core.CoreFactory.createTranslator2D({},{},{}),this._scroll=n.rect().append(i),this._addEvents()},t.viz.charts.ScrollBar.prototype={_addEvents:function(){var r=this,u=n(r._scroll.element),t=0,i=0,f=function(f){var e=(t-f.pageX)*r._scale,o=(i-f.pageY)*r._scale;u.trigger(new n.Event("dxc-scroll-move",n.extend(f,{type:"dxc-scroll-move",pointers:[{pageX:t+e,pageY:i+o}]})))};u.on("dxpointerdown",function(r){t=r.pageX,i=r.pageY,u.trigger(new n.Event("dxc-scroll-start",{pointers:[{pageX:t,pageY:i}]}));n(document).on("dxpointermove",f)});n(document).on("dxpointerup",function(){n(document).off("dxpointermove",f)})},update:function(n){var r=this,t=n.scrollBar,i=t.position,u=n.rotated,f=u?"right":"top",e=u?"left":"bottom";return i!==f&&i!==e&&(i=f),r._scroll.attr({rotate:n.rotated?0:-90,rotateX:0,rotateY:0,fill:t.color,width:t.width,opacity:t.opacity}),r._layoutOptions={width:t.width,offset:t.offset,vertical:u,position:i},r},init:function(t,i){var r=this;return r._translateWithOffset=t.axisType==="discrete"&&!t.stick&&1||0,r._translator.update(n.extend({},t,{minVisible:null,maxVisible:null,visibleCategories:null,startCategories:null}),n.extend({},i),{direction:r._layoutOptions.vertical?"vertical":"horizontal"}),r},getOptions:function(){return this._layoutOptions},shift:function(n,t){this._scroll.attr({translateX:n,translateY:t})},setPane:function(n){var i=this._layoutOptions.position,t;return t=i==="left"||i==="top"?n[0]:n[n.length-1],this.pane=t.name,this._canvas=t.canvas,this},getMultipleAxesSpacing:function(){return 0},getBoundingRect:function(){var t=this._layoutOptions,s=t.vertical,i=t.offset,r=t.width,u=t.position,o=r+i,n=this._canvas;return s?{x:f(n,u,i,r),y:n.top,width:o,height:n.height-n.top-n.bottom}:{x:n.left,y:e(n,u,i,r),width:n.width-n.left-n.right,height:o}},applyLayout:function(){var t=this._canvas,n=this._layoutOptions,i=n.position,r=n.offset,u=n.width;this.shift(f(t,i,r,u),e(t,i,r,u))},setPosition:function(n,t){var r=this,f=r._translator,e=u(n)?f.translate(n,-r._translateWithOffset):f.translate("canvas_position_start"),o=u(t)?f.translate(t,r._translateWithOffset):f.translate("canvas_position_end");r._offset=i.min(e,o),r._scale=f.getScale(n,t),r._applyPosition(i.min(e,o),i.max(e,o))},transform:function(n,t){var i=this._translator.getCanvasVisibleArea().min,u=i-(i*t-n),r=this._offset+u/(this._scale*t);this._applyPosition(r,r+this._translator.canvasLength/(this._scale*t))},dispose:function(){n(this._scroll.element).off(),this._scroll.remove(),this._scroll=this._translator=null},_applyPosition:function(n,t){var e=this,u=e._translator.getCanvasVisibleArea(),f;n=i.max(n,u.min),n=i.min(n,u.max),t=i.min(t,u.max),t=i.max(t,u.min),f=i.abs(t-n),e._scroll.attr({y:n,height:f<r?r:f})}}}(jQuery,DevExpress,Math),function(n,t,i){function r(n,t){return{name:n,deprecated:n,deprecatedContext:function(n){return n.target},deprecatedArgs:t||function(n){return[n.target,n.jQueryEvent]}}}function v(n,t,i){for(var u=0,o=t.end-t.start,f,e,r=0;r<n.length;r++)f=n[r].getLabel(),f.getVisibility()!=="hidden"?(e=f.getBoundingRect(),u+=i?e.width:e.height):n[r]=null;if(o>0)while(u>o)u-=y(n,i)}function y(n,t){var f={originalValue:Infinity},r,u,i;return(c(n,function(n,t){t&&f.originalValue>=t.originalValue&&(f=t,i=n)}),i!==null)?(r=n[i].getLabel(),u=r.getBoundingRect(),r.hide(),n[i]=null,t?u.width:u.height):0}function p(t,i,r,u){var e={start:r?i.left:i.top,end:r?i.width-i.right:i.height-i.bottom},f;(v(t,e,r),f=n.map(t,function(n){return n&&new l(n,r,u)}),f.sort(function(n,t){return n.getPointPosition()-t.getPointPosition()}),b(f))&&(f.reverse(),k(f,e))}function w(n,t){if(n&&t)return n.getBoundingRect().end>t.getBoundingRect().start}function b(n){for(var t,r,u,f,i=0;i<n.length;i++)for(r=n[i],t=i+1;t<n.length;t++)u=n[t],w(r,u)&&(r.toChain(u),f=!0,n[t]=null);return f}function k(n,t){for(var u,i,f,e,o,r=0;r<n.length;r++){if(i=n[r],d(i,t))for(e=i.getBoundingRect(),u=r+1;u<n.length;u++)if((f=n[u],f)&&(o=f.getBoundingRect(),o.end>e.start-(e.end-t.end))){f.toChain(i),n[r]=i=null;break}i&&i.setRollingStockInCanvas(t)}}function d(n,t){return n&&n.getBoundingRect().end>t.end}function l(n,t,i){var u=n.getLabel(),r=u.getBoundingRect();return this.labels=[u],this.points=[n],this.shiftFunction=i,this._bbox={start:t?r.x:r.y,width:t?r.width:r.height,end:t?r.x+r.width:r.y+r.height},this._pointPositionInitialize=t?n.getBoundaryCoords().x:n.getBoundaryCoords().y,this}function g(n){return{nameField:n+"Name",colorField:n+"Color",indexField:n+"Index"}}function nt(n){var t=g(n);return{getFormatObject:function(n){var i={};return i[t.indexField]=n.id,i[t.colorField]=n.states.normal.fill,i[t.nameField]=n.text,i},textField:t.nameField}}var o=t.ui,u=t.viz.charts,s=t.utils,h=["reinit","_reinitDataSource","_dataInit","force_render"],f=t.viz.core,c=n.each,a={asyncSeriesRendering:!0},e=s.isDefined;l.prototype={toChain:function(n){var t=n.getBoundingRect();n.shift(t.start-this._bbox.end),this._changeBoxWidth(t.width),this.labels=this.labels.concat(n.labels),this.points=this.points.concat(n.points)},getBoundingRect:function(){return this._bbox},shift:function(n){var t=this.shiftFunction;c(this.labels,function(i,r){var f=r.getBoundingRect(),u=t(f,n,r);r.shift(u.x,u.y)}),this._bbox.end-=n,this._bbox.start-=n},setRollingStockInCanvas:function(n){this._bbox.end>n.end&&this.shift(this._bbox.end-n.end)},getPointPosition:function(){return this._pointPositionInitialize},_changeBoxWidth:function(n){this._bbox.end+=n,this._bbox.width+=n}},u.overlapping={resolveLabelOverlappingInOneDirection:p},u.BaseChart=f.BaseWidget.inherit({_eventsMap:n.extend({},f.BaseWidget.prototype._eventsMap,{onSeriesClick:r("seriesClick"),onPointClick:r("pointClick"),onArgumentAxisClick:r("argumentAxisClick",function(n){return[n.target,n.argument,n.jQueryEvent]}),onLegendClick:r("legendClick"),onSeriesSelectionChanged:r("seriesSelectionChanged"),onPointSelectionChanged:r("pointSelectionChanged"),onSeriesHoverChanged:r("seriesHoverChanged"),onPointHoverChanged:r("pointHoverChanged"),onTooltipShown:r("tooltipShown"),onTooltipHidden:r("tooltipHidden"),onDone:r("done"),seriesClick:{newName:"onSeriesClick"},pointClick:{newName:"onPointClick"},argumentAxisClick:{newName:"onArgumentAxisClick"},legendClick:{newName:"onLegendClick"},pointHoverChanged:{newName:"onPointHoverChanged"},seriesSelectionChanged:{newName:"onSeriesSelectionChanged"},pointSelectionChanged:{newName:"onPointSelectionChanged"},seriesHoverChanged:{newName:"onSeriesHoverChanged"},tooltipShown:{newName:"onTooltipShown"},tooltipHidden:{newName:"onTooltipHidden"},done:{newName:"onDone"}}),_setDeprecatedOptions:function(){this.callBase(),n.extend(this._deprecatedOptions,{seriesClick:{since:"14.2",message:"Use the 'onSeriesClick' option instead"},pointClick:{since:"14.2",message:"Use the 'onPointClick' option instead"},argumentAxisClick:{since:"14.2",message:"Use the 'onArgumentAxisClick' option instead"},legendClick:{since:"14.2",message:"Use the 'onLegendClick' option instead"},seriesSelectionChanged:{since:"14.2",message:"Use the 'onSeriesSelectionChanged' option instead"},pointSelectionChanged:{since:"14.2",message:"Use the 'onPointSelectionChanged' option instead"},seriesHoverChanged:{since:"14.2",message:"Use the 'onSeriesHoverChanged' option instead"},pointHoverChanged:{since:"14.2",message:"Use the 'onPointHoverChanged' option instead"},tooltipShown:{since:"14.2",message:"Use the 'onTooltipShown' option instead"},tooltipHidden:{since:"14.2",message:"Use the 'onTooltipHidden' option instead"},done:{since:"14.2",message:"Use the 'onDone' option instead"}})},_init:function(){var n=this;n.themeManager=u.factory.createThemeManager(n.option(),n._chartType),n.callBase.apply(n,arguments),n._reinit()},_initCore:function(){var n=this;n._canvasClipRect=n._renderer.clipRect(),n._createHtmlStructure(),n._createLegend(),n._needHandleRenderComplete=!0,n.layoutManager=u.factory.createChartLayoutManager(n._layoutManagerOptions()),n._createScrollBar();n._$element.css({webkitUserSelect:"none"}).on("contextmenu",function(n){(o.events.isTouchEvent(n)||o.events.isPointerEvent(n))&&n.preventDefault()}).on("MSHoldVisual",function(n){n.preventDefault()})},_layoutManagerOptions:function(){return this.themeManager.getOptions("adaptiveLayout")},_reinit:function(n){var t=this;u._setCanvasValues(t._canvas),t._createTracker(),t._reinitAxes(),t._reinitDataSource(),t.series||t._dataSpecificInit(),t._correctAxes(),n&&t._endLoading(function(){t._render({force:!0})})},_createHtmlStructure:function(){var n=this,t=n._renderer;n._backgroundRect=t.rect(0,0,0,0).attr({fill:"gray",opacity:.0001}),n._panesBackgroundGroup=t.g().attr({"class":"dxc-background"}),n._titleGroup=t.g().attr({"class":"dxc-title"}),n._legendGroup=t.g().attr({"class":"dxc-legend",clipId:n._getCanvasClipRectID()}),n._stripsGroup=t.g().attr({"class":"dxc-strips-group"}),n._constantLinesGroup=t.g().attr({"class":"dxc-constant-lines-group"}),n._axesGroup=t.g().attr({"class":"dxc-axes-group"}),n._gridGroup=t.g().attr({"class":"dxc-grids-group"}),n._panesBorderGroup=t.g().attr({"class":"dxc-border"}),n._labelAxesGroup=t.g().attr({"class":"dxc-strips-labels-group"}),n._scrollBarGroup=t.g().attr({"class":"dxc-scroll-bar"}),n._seriesGroup=t.g().attr({"class":"dxc-series-group"}),n._labelsGroup=t.g().attr({"class":"dxc-labels-group"}),n._tooltipGroup=t.g().attr({"class":"dxc-tooltip"}),n._crosshairCursorGroup=t.g().attr({"class":"dxc-crosshair-cursor"})},_disposeObjectsInArray:function(t,i){n.each(this[t]||[],function(t,r){i&&r?n.each(i,function(n,t){r[t]&&r[t].dispose()}):r&&r.dispose()}),this[t]=null},_disposeCore:function(){var t=this,n=function(n){t[n]&&t[n].dispose(),t[n]=null},i=function(n){t[n]&&t[n].remove()},r=this._disposeObjectsInArray;clearTimeout(t._delayedRedraw),t._renderer.stopAllAnimations(),r.call(t,"businessRanges",["arg","val"]),t.translators=null,r.call(t,"series"),n("layoutManager"),n("themeManager"),n("tracker"),n("tooltip"),n("chartTitle"),n("_crosshair"),t.paneAxis=null,t._userOptions=null,t._canvas=null,i("_legendGroup"),i("_stripsGroup"),i("_constantLinesGroup"),i("_axesGroup"),i("_gridGroup"),i("_labelAxesGroup"),i("_seriesGroup"),i("_labelsGroup"),i("_crosshairCursorGroup"),n("_canvasClipRect"),n("_panesBackgroundGroup"),n("_titleGroup"),n("_scrollBarGroup"),n("_legendGroup"),n("_stripsGroup"),n("_constantLinesGroup"),n("_axesGroup"),n("_gridGroup"),n("_labelAxesGroup"),n("_panesBorderGroup"),n("_seriesGroup"),n("_labelsGroup"),n("_tooltipGroup"),n("_crosshairCursorGroup"),t._disposeLoadIndicator()},_getAnimationOptions:function(){return n.extend({},a,this.themeManager.getOptions("animation"))},_getRendererParameters:function(){return{animation:this._getAnimationOptions(),cssClass:"dxc dxc-chart",pathModified:this.option("pathModified"),rtl:this.themeManager.getOptions("rtlEnabled")}},_getDefaultSize:function(){return{width:400,height:400}},_getOption:function(n){return this.themeManager.getOptions(n)},_reinitDataSource:function(){this._refreshDataSource()},_applySize:n.noop,_resize:function(){this._render(this.__renderOptions||{animate:!1,isResize:!0,updateTracker:!1})},_createTracker:function(){var n=this;n.tracker&&n.tracker.dispose(),n.tracker=u.factory.createTracker({seriesSelectionMode:n.themeManager.getOptions("seriesSelectionMode"),pointSelectionMode:n.themeManager.getOptions("pointSelectionMode"),seriesGroup:n._seriesGroup,renderer:n._renderer,eventTrigger:n._eventTrigger},n.NAME)},_getTrackerSettings:function(){var t=this;return{series:t.series,legend:t.legend,tooltip:t.tooltip,legendCallback:n.proxy(t.legend.getActionCallback,t.legend)}},_updateTracker:function(){this.tracker.update(this._getTrackerSettings())},_render:function(t){var r=this,f,e;r._initialized&&r._canvas&&(f=r._prepareDrawOptions(t),clearTimeout(r._delayedRedraw),e=r._canvas,r._canvas=n.extend({},r._canvas),f.recreateCanvas?r.__currentCanvas=r._canvas:r._canvas=r.__currentCanvas,f.recreateCanvas&&(r._reappendLoadIndicator(),r._updateLoadIndicator(i,r._canvas.width,r._canvas.height),r._updateCanvasClipRect()),r._renderer.stopAllAnimations(!0),u._setCanvasValues(r._canvas),r._cleanGroups(f),r._renderElements(f),r._canvas=e)},_renderElements:function(t){function p(){r._renderSeries(t,u,l,w)}var r=this,o=r._prepareToRender(t),u=r._isRotated(),l=r._isLegendInside(),a=[],v=r._getLayoutTargets(),w=r._loadIndicator&&r._loadIndicator.isShown&&r._dataSource&&r._dataSource.isLoaded()&&!t.isResize,y=n.extend({},r._canvas),f,s,h,c;r._renderTitleAndLegend(t,l),r._renderAxes(t,o,u),t.drawTitle&&t.drawLegend&&t.adjustAxes&&r.layoutManager.needMoreSpaceForPanesCanvas(r._getLayoutTargets(),u)&&(r.layoutManager.updateDrawnElements(r._getAxesForTransform(u),r._canvas,y,r._getLayoutTargets(),u),r.chartTitle&&r.layoutManager.correctSizeElement(r.chartTitle,r._canvas),r._updateCanvasClipRect(y),r._updateAxesLayout(t,o,u)),r.layoutManager.placeDrawnElements(r._canvas),r._applyClipRects(o),r._appendSeriesGroups(),r._createTooltip(),r._createCrosshairCursor(),n.each(v,function(){var n=this.canvas;a.push({left:n.left,right:n.width-n.right,top:n.top,bottom:n.height-n.bottom})}),r._scrollBar&&(f=r.businessRanges[0].arg,f.categories&&f.categories.length<=1?s=h=i:(s=e(r._zoomMinArg)?r._zoomMinArg:f.minVisible,h=e(r._zoomMaxArg)?r._zoomMaxArg:f.maxVisible),r._scrollBar.init(f,v[0].canvas).setPosition(s,h)),t.updateTracker&&r._updateTracker(),r.tracker.setCanvases({left:0,right:r._canvas.width,top:0,bottom:r._canvas.height},a),c=r._getSeriesRenderTimeout(t),c>=0?r._delayedRedraw=setTimeout(p,c):p()},_createCrosshairCursor:n.noop,_appendSeriesGroups:function(){var n=this,t=n._renderer.root;n._seriesGroup.append(t),n._labelsGroup.append(t),n._appendAdditionalSeriesGroups(),n._tooltipGroup.append(t)},_renderSeries:function(n,t,i,r){var u=this,f=u.themeManager.getOptions("resolveLabelOverlapping");n.hideLayoutLabels=u.layoutManager.needMoreSpaceForPanesCanvas(u._getLayoutTargets(),u._isRotated())&&!u.themeManager.getOptions("adaptiveLayout").keepLabels,u._drawSeries(n,t),u._updateLegendAndTooltip(n,i),f!=="none"&&u._resolveLabelOverlapping(f),u._adjustSeries(),u._renderTrackers(i),r&&u.hideLoadingIndicator(),u.tracker.repairTooltip(),u._drawn(),u._renderCompleteHandler()},_getAnimateOption:function(n,t){return t.animate&&n.getPoints().length<=t.animationPointsLimit&&this._renderer.animationEnabled()},_resolveLabelOverlapping:function(t){var i;switch(t){case"stack":i=this._resolveLabelOverlappingStack;break;case"hide":i=this._resolveLabelOverlappingHide;break;case"shift":i=this._resolveLabelOverlappingShift}n.isFunction(i)&&i.call(this)},_getVisibleSeries:function(){return n.grep(this.getAllSeries(),function(n){return n.isVisible()})},_resolveLabelOverlappingHide:function(){for(var i=n.map(this._getVisibleSeries(),function(t){return n.map(t.getVisiblePoints(),function(n){return n.getLabel()})}),u,f,e,o,r,t=0;t<i.length;t++)if(u=i[t],e=u.getBoundingRect(),u.getVisibility()!=="hidden")for(r=t+1;r<i.length;r++)f=i[r],o=f.getBoundingRect(),s.checkOverlapping(e,o)&&f.hide()},_cleanGroups:function(n){var t=this;t._stripsGroup.remove(),t._constantLinesGroup.remove(),t._axesGroup.remove(),t._gridGroup.remove(),t._labelAxesGroup.remove(),t._labelsGroup.remove(),t._tooltipGroup.remove(),t._crosshairCursorGroup.remove(),(!n||n.drawLegend)&&t._legendGroup.remove().clear(),(!n||n.drawTitle)&&t._titleGroup.remove().clear(),t._stripsGroup.clear(),t._constantLinesGroup.clear(),t._axesGroup.clear(),t._gridGroup.clear(),t._labelAxesGroup.clear(),t._labelsGroup.clear(),t._tooltipGroup.clear(),t._crosshairCursorGroup.clear()},_drawTitle:function(){var n=this,t=n.themeManager.getOptions("title"),i=n._canvas.width-n._canvas.left-n._canvas.right;t._incidentOccured=n._incidentOccured,n.chartTitle?n.chartTitle.update(t,i):n.chartTitle=u.factory.createTitle(n._renderer,t,i,n._titleGroup)},_createLegend:function(){var n=nt(this._legendDataField);this.legend=f.CoreFactory.createLegend({renderer:this._renderer,group:this._legendGroup,backgroundClass:"dxc-border",itemGroupClass:"dxc-item",textField:n.textField,getFormatObject:n.getFormatObject})},_updateLegend:function(){var n=this,i=n.themeManager,t=i.getOptions("legend"),r=n._getLegendData();t.containerBackgroundColor=i.getOptions("containerBackgroundColor"),t._incidentOccured=n._incidentOccured,n.legend.update(r,t)},_createTooltip:function(){var t=this,r=t.themeManager.getOptions("tooltip");!n.isFunction(r.customizeText)&&e(r.customizeText)&&(t._incidentOccured("E2103",["customizeText"]),r.customizeText=i),t.tooltip?t.tooltip.update(r):t.tooltip=f.CoreFactory.createTooltip(r,t._tooltipGroup,t._renderer),t.tooltip.setSize(t._canvas.width,t._canvas.height)},_prepareDrawOptions:function(t){var r=this._getAnimationOptions(),i;return i=n.extend({},{force:!1,adjustAxes:!0,drawLegend:!0,drawTitle:!0,adjustSeriesLabels:!0,animate:r.enabled,animationPointsLimit:r.maxPointCountSupported,asyncSeriesRendering:r.asyncSeriesRendering,asyncTrackersRendering:r.asyncTrackersRendering,trackerRenderingDelay:r.trackerRenderingDelay,updateTracker:!0},t,this.__renderOptions),e(i.recreateCanvas)||(i.recreateCanvas=i.adjustAxes&&i.drawLegend&&i.drawTitle),i},_processRefreshData:function(t){var i=n.inArray(this._currentRefreshData,h),r=n.inArray(t,h);(!this._currentRefreshData||i>=0&&r<i)&&(this._currentRefreshData=t)},_disposeSeries:function(){var t=this;n.each(t.series||[],function(n,t){t.dispose()}),t.series=null,n.each(t.seriesFamilies||[],function(n,t){t.dispose()}),t.seriesFamilies=null},_optionChanged:function(n){var i=n.name,t=this;if(t.themeManager.resetOptions(i),t.themeManager.update(t._options),i==="animation"){t._renderer.updateAnimationOptions(t._getAnimationOptions());return}clearTimeout(t._delayedRedraw);switch(i){case"dataSource":t._needHandleRenderComplete=!0,t._processRefreshData("_reinitDataSource");break;case"palette":t.themeManager.updatePalette(t.option(i)),t._disposeSeries(),t._needHandleRenderComplete=!0,t._processRefreshData("_dataInit");break;case"series":case"commonSeriesSettings":case"containerBackgroundColor":case"dataPrepareSettings":t._disposeSeries(),t._needHandleRenderComplete=!0,t._processRefreshData("_dataInit");break;case"legend":case"seriesTemplate":t._processRefreshData("_dataInit");break;case"title":t._processRefreshData("force_render");break;case"valueAxis":case"argumentAxis":case"commonAxisSettings":t._needHandleRenderComplete=!0,t._processRefreshData("reinit"),t._disposeSeries(),t.paneAxis={};break;case"panes":case"defaultPane":t._disposeSeries(),t.paneAxis={},t._needHandleRenderComplete=!0,t._processRefreshData("reinit");break;case"rotated":case"equalBarWidth":case"customizePoint":case"customizeLabel":t._disposeSeries(),t._needHandleRenderComplete=!0,t._processRefreshData("reinit");break;case"theme":t._disposeSeries(),t.themeManager.setTheme(t.option(i)),t._processRefreshData("reinit");break;case"scrollBar":t._createScrollBar(),t._processRefreshData("force_render");break;default:t._processRefreshData("reinit")}t.callBase.apply(t,arguments)},_getLoadIndicatorOption:function(){return this.themeManager.getOptions("loadingIndicator")},_refresh:function(){var n=this;if(n._renderer.stopAllAnimations(!0),n._currentRefreshData){switch(n._currentRefreshData){case"force_render":n._render({force:!0});break;case"reinit":n._reinit(!0);break;default:n[n._currentRefreshData]&&n[n._currentRefreshData]()}delete n._currentRefreshData}else n._render({force:!0})},_dataSourceOptions:function(){return{paginate:!1,_preferSync:!0}},_updateCanvasClipRect:function(n){var t=this,i,r;n=n||t._canvas,i=Math.max(n.width-n.left-n.right,0),r=Math.max(n.height-n.top-n.bottom,0),t._canvasClipRect.attr({x:n.left,y:n.top,width:i,height:r}),t._backgroundRect.attr({x:n.left,y:n.top,width:i,height:r}).append(t._renderer.root).toBackground()},_getCanvasClipRectID:function(){return this._canvasClipRect.id},_dataSourceChangedHandler:function(){this._resetZoom(),this._dataInit()},_dataInit:function(){clearTimeout(this._delayedRedraw),this._dataSpecificInit(!0)},_dataSpecificInit:function(n){this.series=this.series||this._populateSeries(),this._repopulateSeries(),this._seriesPopulatedHandler(n)},_seriesPopulatedHandler:function(n){var t=this;t._seriesPopulatedHandlerCore(),t._populateBusinessRange(),t._updateLegend(),n&&t._endLoading(function(){t._render({force:!0})})},_repopulateSeries:function(){var i=this,u,r=i._dataSource&&i._dataSource.items(),e=i.themeManager.getOptions("dataPrepareSettings"),o=i.themeManager.getOptions("tooltip").shared,h={},f=i.themeManager.getOptions("seriesTemplate");i._dataSource&&f&&(i._templatedSeries=s.processSeriesTemplate(f,i._dataSource.items()),i._populateSeries(),delete i._templatedSeries,r=i.teamplateData||r),i._groupSeries(),i._dataValidator=t.viz.core.CoreFactory.createDataValidator(r,i._groupedSeries,i._incidentOccured,e),u=i._dataValidator.validate(),i.themeManager.resetPalette(),n.each(i.series,function(n,t){t.updateData(u),i._processSingleSeries(t),o&&i._prepareStackPoints(t,h,!0)})},_renderCompleteHandler:function(){var t=this,i=!0;t._needHandleRenderComplete&&(n.each(t.series,function(n,t){i=i&&t.canRenderCompleteHandle()}),i&&(t._needHandleRenderComplete=!1,t._eventTrigger("done",{target:t})))},_renderTitleAndLegend:function(n,t){var i=this,f=i.themeManager.getOptions("title"),u=f.text&&n.drawTitle,e=n.drawLegend&&i.legend&&!t,r=[];u&&(i._titleGroup.append(i._renderer.root),i._drawTitle(),r.push(i.chartTitle)),e&&(i._legendGroup.append(i._renderer.root),r.push(i.legend)),r.length&&i.layoutManager.drawElements(r,i._canvas),u&&i.layoutManager.correctSizeElement(i.chartTitle,i._canvas)},_prepareStackPoints:n.noop,_resetZoom:n.noop,_dataIsReady:function(){return f.utils.notExistOrLoaded(this._dataSource)},getAllSeries:function(){return this.series.slice()},getSeriesByName:function(t){var i=null;return n.each(this.series,function(n,r){if(r.name===t)return i=r,!1}),i},getSeriesByPos:function(n){return this.series[n]},clearSelection:function(){this.tracker.clearSelection()},hideTooltip:function(){this.tracker._hideTooltip()},render:function(n){var t=this;return t.__renderOptions=n,t.__forceRender=n&&n.force,t.callBase.apply(t,arguments),delete t.__renderOptions,t.__forceRender=null,t},getSize:function(){var n=this._canvas||{};return{width:n.width,height:n.height}}}).include(o.DataHelperMixin)}(jQuery,DevExpress),function(n,t,i){function v(n){return l(n)?n.length===0?[{}]:n:[n]}function p(n){for(var i={},r=n.length,t=0;t<r;t++)i[n[t]]=!0;return a(i,function(n,t){return t})}function w(n,t,i,r){n.minVal=t.min,n.maxVal=t.max,i&&!n.adjustOnZoom&&(n.minVal=s(n.minVal)?n.minVal:r.val.min,n.maxVal=s(n.maxVal)?n.maxVal:r.val.max)}var c=t.viz.charts,e=t.utils,o=t.viz.core,y="defaultAxisName",l=e.isArray,s=e.isDefined,r=n.each,h=n.extend,a=n.map,u="min",f="max";c.AdvancedChart=c.BaseChart.inherit({_dispose:function(){var n=this,t=this._disposeObjectsInArray;n.callBase(),n.panes=null,n.legend&&(n.legend.dispose(),n.legend=null),t.call(n,"panesBackground"),t.call(n,"seriesFamilies"),n._disposeAxes()},_reinitAxes:function(){this.translators={},this.panes=this._createPanes(),this._populateAxes()},_populateSeries:function(){var t=this,u=t.themeManager,a=!!u.getOptions("seriesTemplate"),s=a?t._templatedSeries:t.option("series"),v=l(s)?s:s?[s]:[],y,p=t._getExtraOptions(),i,f,w=t._isRotated(),e,c;for(t.teamplateData=[],t._disposeSeries(),t.series=[],u.resetPalette(),e=0;e<v.length;e++)(i=h(!0,{},v[e],p),y=i.data,i.data=null,i.rotated=w,i.customizePoint=u.getOptions("customizePoint"),i.customizeLabel=u.getOptions("customizeLabel"),i.visibilityChanged=n.proxy(t._seriesVisibilityChanged,t),i.resolveLabelsOverlapping=u.getOptions("resolveLabelsOverlapping"),i.incidentOccured=t._incidentOccured,i.name||(i.name="Series "+(e+1).toString()),c=u.getOptions("series",i),t._checkPaneName(c))&&(f=o.CoreFactory.createSeries({renderer:t._renderer,seriesGroup:t._seriesGroup,labelsGroup:t._labelsGroup},c),f.isUpdated?(f.index=t.series.length,t.series.push(f),a&&(r(y,function(n,i){r(f.getTeamplatedFields(),function(n,t){i[t.teamplateField]=i[t.originalField]}),t.teamplateData.push(i)}),f.updateTeamplateFieldNames())):t._incidentOccured("E2101",[c.type]));return t.series},_populateAxes:function(){function g(){return y+d++}var t=this,s=[],h,u=t.panes,nt=t.themeManager,f=t._isRotated(),w=t.option("valueAxis")||{},b=t.option("argumentAxis")||{},c=t.option("crosshair")||{},e=v(b)[0],k=v(w),l=[],d=0,o;t._disposeAxes(),o=f?e.position==="right"?u[u.length-1].name:u[0].name:e.position==="top"?u[0].name:u[u.length-1].name,h=a(u,function(n){return t._createAxis("argumentAxis",e,{virtual:n.name!=o,pane:n.name,crosshairEnabled:c.enabled},f)}),r(k,function(u,e){var o=[],h=e.name;if(h&&n.inArray(h,l)!=-1){t._incidentOccured("E2102");return}h&&l.push(h),e.pane&&o.push(e.pane),e.panes&&e.panes.length&&(o=o.concat(e.panes.slice(0))),o=p(o),o.length||o.push(i),r(o,function(n,i){s.push(t._createAxis("valueAxis",e,{name:h||g(),pane:i,priority:u,crosshairEnabled:c.enabled},f))})}),t._valueAxes=s,t._argumentAxes=h},_prepareStackPoints:function(n,t,i){var f=n.getPoints(),u=n.getStackName();r(f,function(n,f){var e=f.argument;t[e]||(t[e]={},t[e][null]=[]),u&&!l(t[e][u])&&(t[e][u]=[],r(t[e][null],function(n,i){i.stackName||t[e][u].push(i)})),u?(t[e][u].push(f),t[e][null].push(f)):r(t[e],function(n,t){t.push(f)}),i&&(f.stackPoints=t[e][u],f.stackName=u)})},_disposeAxes:function(){var n=this._disposeObjectsInArray;n.call(this,"_argumentAxes"),n.call(this,"_valueAxes")},_drawAxes:function(n,t,i){var u=this,f=function(n){r(n,function(n,t){t.draw(i)})},e=function(t){r(t,function(t,i){i.drawGrids(n[i.pane])})};u._reinitTranslators(),u._prepareAxesAndDraw(f,e,t)},_appendAdditionalSeriesGroups:function(){var n=this,t=n._renderer.root;n._crosshairCursorGroup.append(t),n._legendGroup.append(t),n._scrollBar&&n._scrollBarGroup.append(t)},_getLegendData:function(){return a(this.series,function(n){if(n.getOptions().showInLegend)return{text:n.name,id:n.index,states:n.getLegendStyles()}})},_seriesPopulatedHandlerCore:function(){this._processSeriesFamilies(),this._processValueAxisFormat()},_renderTrackers:function(n){for(var t=this,i=0;i<t.series.length;++i)t.series[i].drawTrackers();t.legend&&(n&&t._legendGroup.append(t._renderer.root),n&&t._tooltipGroup.append(t._renderer.root))},_seriesVisibilityChanged:function(){this._processSeriesFamilies(),this._populateBusinessRange(),this._renderer.stopAllAnimations(!0),this._render({force:!0,asyncSeriesRendering:!1,asyncTrackersRendering:!1})},_processSeriesFamilies:function(){var t=this,i=[],u=[],f,e=t.themeManager,s=t._getEqualBarWidth();if(t.seriesFamilies&&t.seriesFamilies.length){r(t.seriesFamilies,function(n,t){t.adjustSeriesValues()});return}r(t.series,function(t,r){n.inArray(r.type,i)===-1&&i.push(r.type)}),r(t._getLayoutTargets(),function(n,h){f=t._getSeriesForPane(h.name),r(i,function(n,t){var i=o.CoreFactory.createSeriesFamily({type:t,pane:h.name,equalBarWidth:s,minBubbleSize:e.getOptions("minBubbleSize"),maxBubbleSize:e.getOptions("maxBubbleSize")});i.add(f),i.adjustSeriesValues(),u.push(i)})}),t.seriesFamilies=u},_appendAxesGroups:function(){var n=this,t=n._renderer.root;n._stripsGroup.append(t),n._gridGroup.append(t),n._axesGroup.append(t),n._constantLinesGroup.append(t),n._labelAxesGroup.append(t)},_updateAxesLayout:function(n,t,i){this.layoutManager.updatePanesCanvases(this._getLayoutTargets(),this._canvas,i),this._drawAxes(t,n,!0)},_populateBusinessRange:function(n){var u=this,s=[],l=u.themeManager,h=u._isRotated(),a=l.getOptions("useAggregation"),f=u._argumentAxes,c=f[f.length-1],v=c.calcInterval,t=new o.Range({rotated:!!h}),e;u._disposeObjectsInArray("businessRanges",["arg","val"]),r(f,function(n,i){t.addRange(i.getRangeData(t.min))}),r(u._groupedSeries,function(u,f){var e=new o.Range({rotated:!!h,isValueRange:!0,pane:f.valueAxis.pane,axis:f.valueAxis.name}),c=f.valueAxis.getRangeData();e.addRange(c),r(f,function(i,r){n&&w(n,c,a,r._originalBusinessRange);var u=r.getRangeData(n,v);e.addRange(u.val),t.addRange(u.arg)}),e.isDefined()||e.setStubData(f.valueAxis.getOptions().valueType==="datetime"?"datetime":i),f.valueAxis.getOptions().showZero&&e.correctValueZeroLevel(),e.checkZeroStick(),s.push({val:e,arg:t})}),t.isDefined()||t.setStubData(f[0].getOptions().argumentType),n&&n.notApplyMargins&&t.axisType!=="discrete"&&(e=f[0].getTranslator().getBusinessRange(),t.addRange({min:e.min,max:e.max,stick:!0})),u._correctBusinessRange(t,c),u.businessRanges=s},_correctBusinessRange:function(t,i){var c=i.getOptions().setTicksAtUnitBeginning,o={},r=i.getOptions().tickInterval,h=r;r=n.isNumeric(r)?r:e.convertDateTickIntervalToMilliseconds(r),r&&s(t[u])&&s(t[f])&&r>=Math.abs(t[f]-t[u])&&(e.isDate(t[u])?(n.isNumeric(h)?(o[u]=new Date(t[u].valueOf()-r),o[f]=new Date(t[f].valueOf()+r)):(o[u]=e.addInterval(t[u],h,!0),o[f]=e.addInterval(t[f],h,!1)),c&&(e.correctDateWithUnitBeginning(o[f],h),e.correctDateWithUnitBeginning(o[u],h))):(o[u]=t[u]-r,o[f]=t[f]+r),t.addRange(o))},_getArgumentAxes:function(){return this._argumentAxes},_getValueAxes:function(){return this._valueAxes},_processValueAxisFormat:function(){var i=this,u=i._valueAxes,t=[];r(i.series,function(){this.isFullStackedSeries()&&n.inArray(this.axis,t)===-1&&t.push(this.axis)}),r(u,function(){n.inArray(this.name,t)!==-1?this.setPercentLabelFormat():this.resetAutoLabelFormat()})},_createAxis:function(n,t,i,r){var u=this;return t=u._prepareStripsAndConstantLines(n,t,r),c.factory.createAxis({renderer:u._renderer,stripsGroup:u._stripsGroup,labelAxesGroup:u._labelAxesGroup,constantLinesGroup:u._constantLinesGroup,axesContainerGroup:u._axesGroup,gridGroup:u._gridGroup},u._prepareAxisOptions(n,t,i,r))},_getTrackerSettings:function(){return h(this.callBase(),{argumentAxis:this._argumentAxes})},_prepareStripsAndConstantLines:function(n,t,i){return t=this.themeManager.getOptions(n,t,i),t.strips&&r(t.strips,function(n){t.strips[n]=h(!0,{},t.stripStyle,t.strips[n])}),t.constantLines&&r(t.constantLines,function(n,i){t.constantLines[n]=h(!0,{},t.constantLineStyle,i)}),t},_legendDataField:"series",_adjustSeries:n.noop})}(jQuery,DevExpress),function(n,t,i){function k(n,t){for(var r,i=0;i<n.length;i++)if(n[i].pane===t){r=n[i].name;break}return r||(r=n[0].name),r}function d(n,t,i){var f=[],u;r(n,function(n,i){i.pane===t&&f.push(i)}),f.length>1&&i&&r(f,function(n,t){var i=t.getOptions().grid,r=t.getOptions().minorGrid;u&&i&&i.visible?(i.visible=!1,r&&(r.visible=!1)):u=u?u:i&&i.visible})}function g(n,t){var i;return r(n,function(n,u){r(u,function(r){if(t===r)return i=n,!1})}),i}function nt(n,t,i){for(var u,r=0;r<t.length;r++)if(t[r].name===i){u=t[r],u.priority=r;break}if(!u)for(r=0;r<n.length;r++)if(n[r].name===i){u=n[r].getOptions(),u.priority=n[r].priority;break}return u}function y(n,t,i){for(var r,u=0;u<i.length;u++)if(r=i[u],r.name===t&&r.pane===n)return r}function tt(n,t,i,u,f){var y=~~((i<u?i:u)/2),p=f.width||0,s=p<y?p:y;n=n+s/2,t=t+s/2,i=i-s,u=u-s;var h=n+i,c=t+u,o=[],e=[],l,a=0,v=0,w={top:[[n,t],[h,t]],right:[[h,t],[h,c]],bottom:[[h,c],[n,c]],left:[[n,c],[n,t]]};r(w,function(n){var t=!!f[n];a=a*2+~~t});switch(a){case 13:case 9:l=["left","top","right","bottom"];break;case 11:l=["bottom","left","top","right"];break;default:l=["top","right","bottom","left"]}return r(l,function(n,t){var i=!!f[t];!v&&e.length&&(o.push(e),e=[]),i&&r(w[t].slice(v),function(n,t){e=e.concat(t)}),v=~~i}),e.length&&o.push(e),o.length===1&&(o=o[0]),{points:o,pathType:a===15?"area":"line"}}function s(n,t){r(n||[],function(n,i){i&&i.attr(t)})}var h=t.viz,o=h.core,f=h.charts,a=t.utils,p=5,c="default",w=25,b=[{name:c,border:{}}],v=n.map,r=n.each,e=n.extend,l=a.isArray,u=a.isDefined;t.registerComponent("dxChart",h.charts,f.AdvancedChart.inherit({_chartType:"chart",_setDefaultOptions:function(){this.callBase(),this.option({defaultPane:c})},_initCore:function(){this.paneAxis={},this._panesClipRects={},this.callBase()},_disposeCore:function(){var n=this,t=this._disposeObjectsInArray,i=n._panesClipRects;n.callBase(),t.call(i,"fixed"),t.call(i,"base"),t.call(i,"wide"),n._panesClipRects=null},_correctAxes:function(){this.series&&this._correctValueAxes()},_getExtraOptions:n.noop,_processSingleSeries:n.noop,_groupSeries:function(){var t=this,o=t.panes,u=t._valueAxes,s=v(o,function(n){return n.name}),e=t.series,i=t.paneAxis,h=t.themeManager.getOptions("synchronizeMultiAxes"),f=t._groupedSeries=[];r(e,function(n,t){t.axis=t.axis||k(u,t.pane),t.axis&&(i[t.pane]=i[t.pane]||{},i[t.pane][t.axis]=!0)}),r(u,function(t,r){r.name&&r.pane&&n.inArray(r.pane,s)!==-1&&(i[r.pane]=i[r.pane]||{},i[r.pane][r.name]=!0)}),t._correctValueAxes(),r(i,function(n,t){d(u,n,h),r(t,function(t){var i=[];r(e,function(r,u){u.pane===n&&u.axis===t&&i.push(u)}),f.push(i),i.valueAxis=y(n,t,u),i.valueOptions=i.valueAxis.getOptions()})}),f.argumentAxes=t._argumentAxes,f.argumentOptions=f.argumentAxes[0].getOptions()},_cleanPanesClipRects:function(n){var t=this,i=t._panesClipRects[n];r(i||[],function(n,t){t&&t.remove()}),t._panesClipRects[n]=[]},_createPanes:function(){var i=this,t=i.option("panes"),o=0,f;return(t&&l(t)&&!t.length||n.isEmptyObject(t))&&(t=b),i._cleanPanesClipRects("fixed"),i._cleanPanesClipRects("base"),i._cleanPanesClipRects("wide"),i.defaultPane=i.option("defaultPane"),t=e(!0,[],l(t)?t:t?[t]:[]),r(t,function(n,t){t.name=u(t.name)?t.name:c+o++}),!i._doesPaneExists(t,i.defaultPane)&&t.length>0&&(f=t[t.length-1].name,i._incidentOccured("W2101",[i.defaultPane,f]),i.defaultPane=f),t=i._isRotated()?t.reverse():t},_doesPaneExists:function(n,t){var i=!1;return r(n,function(n,r){if(r.name===t)return i=!0,!1}),i},_prepareAxisOptions:function(n,t,i,r){return e(!0,{},t,i,{isHorizontal:n==="argumentAxis"?!r:r,incidentOccured:this._incidentOccured,drawingType:"normal"})},_checkPaneName:function(t){var i=v(this.panes,function(n){return n.name});return(t.pane=t.pane||this.defaultPane,n.inArray(t.pane,i)===-1)?!1:!0},_correctValueAxes:function(){var t=this,h=t._isRotated(),o=t.option("valueAxis")||{},c=l(o)?o:[o],i=t._valueAxes||[],a=i[0].name,u=t.paneAxis||{},e=t.panes,f,s={};for(r(i,function(n,i){if(!i.pane){var r=g(t.paneAxis,i.name);r||(r=t.defaultPane,u[r]=u[r]||{},u[r][i.name]=!0),i.setPane(r)}}),f=0;f<e.length;f++)u[e[f].name]||(u[e[f].name]={},u[e[f].name][a]=!0);r(t.paneAxis,function(n,u){r(u,function(r){if(s[r+"-"+n]=!0,!y(n,r,i)){var u=nt(i,c,r);u||(t._incidentOccured("W2102",[r]),u={name:r,priority:i.length}),i.push(t._createAxis("valueAxis",u,{pane:n,name:r},h))}})}),i=n.grep(i,function(n){return!!s[n.name+"-"+n.pane]}),i.sort(function(n,t){return n.priority-t.priority}),t._valueAxes=i},_getSeriesForPane:function(n){var t=[];return r(this.series,function(i,r){r.pane===n&&t.push(r)}),t},_createTranslator:function(n,t,i){return o.CoreFactory.createTranslator2D(n,t,i)},_createPanesBorderOptions:function(){var t=this.themeManager.getOptions("commonPaneSettings").border,n={};return r(this.panes,function(i,r){n[r.name]=e(!0,{},t,r.border)}),n},_createScrollBar:function(){var n=this,i=n.themeManager,t=i.getOptions("scrollBar")||{};t.visible?n._scrollBar=(n._scrollBar||f.factory.createScrollBar(n._renderer,n._scrollBarGroup)).update({rotated:n._isRotated(),scrollBar:t}):(n._scrollBarGroup.remove(),n._scrollBar&&n._scrollBar.dispose(),n._scrollBar=null)},_prepareToRender:function(n){var t=this,f=t._isRotated(),i=t._createPanesBorderOptions();return t._createPanesBackground(),t._appendAxesGroups(),t._transformed&&t._resetTransform(),t._createTranslators(n),t._options.useAggregation&&r(t.series,function(n,i){i._originalBusinessRange=i._originalBusinessRange||i.getRangeData(),i.resamplePoints(t._getTranslator(i.pane,i.axis).arg,t._zoomMinArg,t._zoomMaxArg)}),(u(t._zoomMinArg)||u(t._zoomMaxArg))&&t._populateBusinessRange({adjustOnZoom:t.themeManager.getOptions("adjustOnZoom"),minArg:t._zoomMinArg,maxArg:t._zoomMaxArg,notApplyMargins:t._notApplyMargins}),(t._options.useAggregation||u(t._zoomMinArg)||u(t._zoomMaxArg))&&t._updateTranslators(),i},_isLegendInside:function(){return this.legend&&this.legend.getPosition()==="inside"},_renderAxes:function(n,t,i){n&&n.recreateCanvas&&this.layoutManager.updatePanesCanvases(this.panes,this._canvas,i),this._drawAxes(t,n)},_isRotated:function(){return this.themeManager.getOptions("rotated")},_getLayoutTargets:function(){return this.panes},_applyClipRects:function(n){var t=this,r=t._getCanvasClipRectID(),i;for(t._drawPanesBorders(n),t._createClipRectsForPanes(),i=0;i<t._argumentAxes.length;i++)t._argumentAxes[i].applyClipRects(t._getElementsClipRectID(t._argumentAxes[i].pane),r);for(i=0;i<t._valueAxes.length;i++)t._valueAxes[i].applyClipRects(t._getElementsClipRectID(t._valueAxes[i].pane),r);t._fillPanesBackground()},_getSeriesRenderTimeout:function(n){return n.asyncSeriesRendering?w:i},_updateLegendAndTooltip:function(n,t){var i=this;if(n.drawLegend&&i.legend&&t){var r=i.panes,u=e({},r[0].canvas),o=f.factory.createChartLayoutManager();u.right=r[r.length-1].canvas.right,u.bottom=r[r.length-1].canvas.bottom,i._legendGroup.append(i._renderer.root),i._tooltipGroup.append(i._renderer.root),o.drawElements([i.legend],u),o.placeDrawnElements(u)}},_drawSeries:function(n,t){var i=this;r(i.seriesFamilies||[],function(n,t){var r=i._getTranslator(t.pane)||{};t.updateSeriesValues(r),t.adjustSeriesDimensions(r)}),r(i.series,function(r,u){i._applyPaneClipRect(u),u.setAdjustSeriesLabels(n.adjustSeriesLabels);var e=i._getTranslator(u.pane,u.axis),f={};f[t?"x":"y"]=e.val,f[t?"y":"x"]=e.arg,u.draw(f,i._getAnimateOption(u,n),n.hideLayoutLabels,i.legend&&i.legend.getActionCallback(u))})},_applyPaneClipRect:function(n){var t=this,i=t._getPaneIndex(n.pane),r=t._panesClipRects,u=r.wide[i];n.setClippingParams(r.base[i].id,u&&u.id,t._getPaneBorderVisibility(i))},_createTranslators:function(n){var t=this,u=t._isRotated(),i;n.recreateCanvas&&(t.translators=i={},t.layoutManager.updatePanesCanvases(t.panes,t._canvas,u),r(t.paneAxis,function(n,f){i[n]=i[n]||{},r(f,function(r){var f=t._createTranslator(new o.Range(t._getBusinessRange(n,r).val),t._getCanvasForPane(n),u?{direction:"horizontal"}:{});f.pane=n,f.axis=r,i[n][r]={val:f}})}),r(t._argumentAxes,function(n,f){var e=t._createTranslator(new o.Range(t._getBusinessRange(f.pane).arg),t._getCanvasForPane(f.pane),u?{}:{direction:"horizontal"});r(i[f.pane],function(n,t){t.arg=e})}))},_updateTranslators:function(){var n=this;r(n.translators,function(t,i){r(i,function(i,r){r.arg.updateBusinessRange(new o.Range(n._getBusinessRange(t).arg)),delete r.arg._originalBusinessRange,r.val.updateBusinessRange(new o.Range(n._getBusinessRange(t,i).val)),delete r.val._originalBusinessRange})})},_getAxesForTransform:function(n){return{verticalAxes:n?this._getArgumentAxes():this._getValueAxes(),horizontalAxes:n?this._getValueAxes():this._getArgumentAxes()}},_reinitTranslators:function(){var n=this;r(n._argumentAxes,function(t,i){var r=n._getTranslator(i.pane);r&&(r.arg.reinit(),i.setRange(r.arg.getBusinessRange()),i.setTranslator(r.arg,r.val))}),r(n._valueAxes,function(t,i){var r=n._getTranslator(i.pane,i.name);r&&(r.val.reinit(),i.setRange(r.val.getBusinessRange()),i.setTranslator(r.val,r.arg))})},_prepareAxesAndDraw:function(n,t,i){var u=this,e=0,o=u.layoutManager,s=u._isRotated(),w=u.translators,h=0,b=u.themeManager.getOptions("synchronizeMultiAxes"),c=u._getLayoutTargets(),l=s?u._argumentAxes:u._valueAxes,a=s?u._valueAxes:u._argumentAxes,v=a,y=l;u._scrollBar&&(u._scrollBar.setPane(c),s?y=[u._scrollBar].concat(y):v=v.concat([u._scrollBar]));do{for(e=0;e<u._argumentAxes.length;e++)u._argumentAxes[e].resetTicks();for(e=0;e<u._valueAxes.length;e++)u._valueAxes[e].resetTicks();b&&f.multiAxesSynchronizer.synchronize(u._valueAxes),n(a),o.requireAxesRedraw=!1,i.adjustAxes&&(o.applyHorizontalAxesLayout(v,c,s),o.stopDrawAxes||r(w,function(n,t){r(t,function(n,t){t.arg.reinit(),t.val.reinit()})})),n(l),i.adjustAxes&&!o.stopDrawAxes&&(o.applyVerticalAxesLayout(y,c,s),o.stopDrawAxes||r(w,function(n,t){r(t,function(n,t){t.arg.reinit(),t.val.reinit()})})),h=h+1}while(!o.stopDrawAxes&&o.requireAxesRedraw&&h<p);t(l),t(a),u._scrollBar&&u._scrollBar.applyLayout()},_getPanesParameters:function(){for(var t=this,i=t.panes,u,r=[],n=0;n<i.length;n++)t._getPaneBorderVisibility(n)&&r.push({coords:i[n].borderCoords,clipRect:t._panesClipRects.fixed[n]});return r},_createCrosshairCursor:function(){var n=this,t=n.themeManager.getOptions("crosshair")||{},r=n._isRotated()?[n._valueAxes,n._argumentAxes]:[n._argumentAxes,n._valueAxes],i={canvas:n._getCommonCanvas(),panes:n._getPanesParameters(),axes:r};t&&t.enabled&&(n._crosshair?n._crosshair.update(t,i):n._crosshair=f.factory.createCrosshair(n._renderer,t,i,n._crosshairCursorGroup),n._crosshair.render())},_getCommonCanvas:function(){for(var t,n,r=this.panes,i=0;i<r.length;i++)t=r[i].canvas,n?(n.right=t.right,n.bottom=t.bottom):n=e({},t);return n},_createPanesBackground:function(){var n=this,e=n.themeManager.getOptions("commonPaneSettings").backgroundColor,t,u=n._renderer,f,i,r=[];for(n._panesBackgroundGroup&&n._panesBackgroundGroup.clear(),i=0;i<n.panes.length;i++){if(t=n.panes[i].backgroundColor||e,!t||t==="none"){r.push(null);continue}f=u.rect(0,0,0,0).attr({fill:t,"stroke-width":0}).append(n._panesBackgroundGroup),r.push(f)}n.panesBackground=r,n._panesBackgroundGroup.append(u.root)},_fillPanesBackground:function(){var t=this,n;r(t.panes,function(i,r){n=r.borderCoords,t.panesBackground[i]!==null&&t.panesBackground[i].attr({x:n.left,y:n.top,width:n.width,height:n.height})})},_calcPaneBorderCoords:function(n){var i=n.canvas,t=n.borderCoords=n.borderCoords||{};t.left=i.left,t.top=i.top,t.right=i.width-i.right,t.bottom=i.height-i.bottom,t.width=Math.max(t.right-t.left,0),t.height=Math.max(t.bottom-t.top,0)},_drawPanesBorders:function(n){var t=this,i=t._isRotated();t._panesBorderGroup&&t._panesBorderGroup.remove().clear(),r(t.panes,function(r,u){var e,f=n[u.name],o,s={fill:"none",stroke:f.color,"stroke-opacity":f.opacity,"stroke-width":f.width,dashStyle:f.dashStyle,"stroke-linecap":"square"};(t._calcPaneBorderCoords(u,i),f.visible)&&(e=u.borderCoords,o=tt(e.left,e.top,e.width,e.height,f),t._renderer.path(o.points,o.pathType).attr(s).append(t._panesBorderGroup))}),t._panesBorderGroup.append(t._renderer.root)},_createClipRect:function(n,t,i,r,u,f){var o=this,e=n[t];e?e.attr({x:i,y:r,width:u,height:f}):(e=o._renderer.clipRect(i,r,u,f),n[t]=e)},_createClipRectsForPanes:function(){var n=this,t=n._canvas;r(n.panes,function(i,u){var l=!1,f=u.borderCoords,e=f.left,o=f.top,s=f.width,h=f.height,c=n._panesClipRects;n._createClipRect(c.fixed,i,e,o,s,h),n._createClipRect(c.base,i,e,o,s,h),r(n.series,function(n,t){t.pane===u.name&&(t.isFinancialSeries()||t.areErrorBarsVisible())&&(l=!0)}),l?(n._isRotated()?(o=0,h=t.height):(e=0,s=t.width),n._createClipRect(c.wide,i,e,o,s,h)):c.wide.push(null)})},_getPaneIndex:function(n){var t;return r(this.panes,function(i,r){if(r.name===n)return t=i,!1}),t},_getPaneBorderVisibility:function(n){var i=this.themeManager.getOptions("commonPaneSettings").border.visible,r=this.panes[n]||{},t=r.border||{};return"visible"in t?t.visible:i},_getElementsClipRectID:function(n){return this._panesClipRects.fixed[this._getPaneIndex(n)].id},_getTranslator:function(n,t){var u=this.translators[n],i=null;return u?(i=u[t],i||r(u,function(n,t){return i=t,!1}),i):i},_getCanvasForPane:function(n){for(var i=this.panes,r=i.length,t=0;t<r;t++)if(i[t].name===n)return i[t].canvas},_getBusinessRange:function(n,t){for(var r=this.businessRanges||[],f=r.length,u,i=0;i<f;i++)if(r[i].val.pane===n&&r[i].val.axis===t){u=r[i];break}if(!u)for(i=0;i<f;i++)if(r[i].val.pane===n){u=r[i];break}return u},_transformArgument:function(n,t){var i=this,o=i._isRotated(),f,u,e=i._panesClipRects;i._transformed||(i._transformed=!0,i._labelsGroup.remove(),r(i.series||[],function(n,t){t.applyClip()})),o?(f={translateY:n,scaleY:t},u={translateY:-n/t,scaleY:1/t}):(f={translateX:n,scaleX:t},u={translateX:-n/t,scaleX:1/t}),s(e.base,u),s(e.wide,u),i._seriesGroup.attr(f),i._scrollBar&&i._scrollBar.transform(-n,t)},_resetTransform:function(){var n=this,t={translateX:0,translateY:0,scaleX:null,scaleY:null},i=n._panesClipRects;s(i.base,t),s(i.wide,t),n._seriesGroup.attr(t),r(n.series||[],function(n,t){t.resetClip()}),n._transformed=!1},_getTrackerSettings:function(){var n=this,t=n.themeManager;return e(this.callBase(),{chart:n,zoomingMode:t.getOptions("zoomingMode"),scrollingMode:t.getOptions("scrollingMode"),rotated:n._isRotated(),crosshair:n._crosshair})},_resolveLabelOverlappingStack:function(){var n=this,t={},i=n._isRotated(),u=i?function(n,t){return{x:n.x-t,y:n.y}}:function(n,t){return{x:n.x,y:n.y-t}};r(this._getVisibleSeries(),function(i,r){n._prepareStackPoints(r,t)}),r(t,function(t,e){r(e,function(t,r){f.overlapping.resolveLabelOverlappingInOneDirection(r,n._getCommonCanvas(),i,u)})})},_getEqualBarWidth:function(){return this.themeManager.getOptions("equalBarWidth")},zoomArgument:function(n,t,i){var r=this,f;(u(n)||u(t))&&(f=r._argumentAxes[0].adjustZoomValues(n,t,i),r._zoomMinArg=f.min,r._zoomMaxArg=f.max,r._notApplyMargins=i,r._render({force:!0,drawTitle:!1,drawLegend:!1,adjustAxes:!1,animate:!1,adjustSeriesLabels:!1,asyncSeriesRendering:!1,updateTracker:!1}))},_resetZoom:function(){var n=this;n._zoomMinArg=n._zoomMaxArg=i,n._argumentAxes[0]&&n._argumentAxes[0].resetZoom()}}))}(jQuery,DevExpress),function(n,t,i){var f=t.viz,e=f.core,o=f.charts,u=t.utils,h=n.extend,s=n.map,r=n.noop;t.registerComponent("dxPieChart",f.charts,o.BaseChart.inherit({_chartType:"pie",_reinitAxes:r,_correctAxes:r,_layoutManagerOptions:function(){var n=this.themeManager.getOptions("diameter");return u.isNumber(n)?n>1?n=1:n<0&&(n=0):n=i,h(!0,{},this.callBase(),{piePercentage:n})},_groupSeries:function(){this.series.valueOptions={valueType:"numeric"},this._groupedSeries=[this.series],this._groupedSeries.argumentOptions=this.series[0]&&this.series[0].getOptions()},_populateBusinessRange:function(){var t=[],u=this.series,i=u[0],n=new e.Range,r;this._disposeObjectsInArray("businessRanges"),i&&(r=i.getRangeData(),n.addRange(r.val),n.isDefined()||n.setStubData(),t.push(n)),this.businessRanges=t},_seriesVisibilityChanged:function(){this.series[0].arrangePoints(),this._populateBusinessRange(),this._refresh()},_createTranslator:function(n){return e.CoreFactory.createTranslator1D(n.min,n.max,360,0)},_populateSeries:function(){var t=this,f=t.themeManager,a=!!f.getOptions("seriesTemplate"),o=a?t._templatedSeries:t.option("series"),c=n.isArray(o)?o:o?[o]:[],l,i,s,r;return t._disposeSeries(),t.series=[],f.resetPalette(),c.length&&(i=h(!0,{},c[0]),i.type&&!u.isString(i.type)&&(i.type=""),l=i.data,i.data=null,i.incidentOccured=t._incidentOccured,r=f.getOptions("series",i,!0),r.visibilityChanged=n.proxy(t._seriesVisibilityChanged,t),r.customizePoint=f.getOptions("customizePoint"),r.customizeLabel=f.getOptions("customizeLabel"),s=e.CoreFactory.createSeries({renderer:t._renderer,seriesGroup:t._seriesGroup,labelsGroup:t._labelsGroup},r),s.isUpdated?(t._processSingleSeries(s),t.series.push(s)):t._incidentOccured("E2101",[r.type]),i.data=l),t.series},_processSingleSeries:function(n){n.arrangePoints()},_seriesPopulatedHandlerCore:r,_getLegendData:function(){return s(this.series[0]?this.series[0].getPoints():[],function(n){return{text:n.argument,id:n.index,states:n.getLegendStyles()}})},_prepareToRender:r,_isLegendInside:r,_renderAxes:r,_isRotated:r,_getLayoutTargets:function(){return[{canvas:this._canvas}]},_getAxesForTransform:function(){return{verticalAxes:[],horizontalAxes:[]}},_updateAxesLayout:r,_applyClipRects:r,_appendAdditionalSeriesGroups:r,_getSeriesRenderTimeout:r,_drawSeries:function(n){var t=this,i=t.getSeries();i&&(t.layoutManager.applyPieChartSeriesLayout(t._canvas,i,!0),i.canvas=t._canvas,i.resetLabelSetups(),i.drawLabelsWOPoints(t._createTranslator(t.businessRanges[0],t._canvas))&&t.layoutManager.applyPieChartSeriesLayout(t._canvas,i,n.hideLayoutLabels),i.draw(t._createTranslator(t.businessRanges[0],t._canvas),t._getAnimateOption(i,n),n.hideLayoutLabels))},_adjustSeries:function(){var n=this.getSeries();n&&n.adjustLabels()},_updateLegendAndTooltip:r,_renderTrackers:r,_createScrollBar:r,_resolveLabelOverlappingShift:function(){var n=this,i=function(n,t,i){return u.getShiftingCoordOnRad(n,{x:n.x,y:n.y-t},i.figure)},t=s(n.getSeries().getVisiblePoints(),function(n){var t=u.normalizeAngle(n.middleAngle);if(t<90||t>=270)return n});o.overlapping.resolveLabelOverlappingInOneDirection(t,n._canvas,!1,i),t=s(n.getSeries().getVisiblePoints(),function(n){var t=u.normalizeAngle(n.middleAngle);if(t>=90&&t<270)return n}),o.overlapping.resolveLabelOverlappingInOneDirection(t,n._canvas,!1,i)},getSeries:function(){return this.series&&this.series[0]},_legendDataField:"point"}))}(jQuery,DevExpress),function(n,t){var u=t.viz.charts,r=t.viz.core,f="default",e=u.AdvancedChart.inherit({_chartType:"polar",_createPanes:function(){return[{name:f}]},_checkPaneName:function(){return!0},_prepareAxisOptions:function(t,i){return this.themeManager.getOptions(t,n.extend(!0,i,{drawingType:this._getTypeOfAxis(t),incidentOccured:this._incidentOccured,type:this.option("useSpiderWeb")&&t==="argumentAxis"?"discrete":i.type}))},_getTypeOfAxis:function(n){return n=n==="argumentAxis"?"circular":"linear",this.option("useSpiderWeb")&&(n+="Spider"),n},_getExtraOptions:function(){return{spiderWidget:this.option("useSpiderWeb")}},_correctAxes:n.noop,_groupSeries:function(){this._groupedSeries=[this.series],this._groupedSeries[0].valueAxis=this._valueAxes[0],this._groupedSeries[0].valueOptions=this._valueAxes[0].getOptions(),this._groupedSeries.argumentAxes=this._argumentAxes,this._groupedSeries.argumentOptions=this._argumentAxes[0].getOptions()},_processSingleSeries:n.noop,_prepareToRender:function(){return this._appendAxesGroups(),{}},_isLegendInside:n.noop,_renderAxes:function(n){this._drawAxes({},n)},_reinitTranslators:function(){var n=this,i=n._valueAxes,f=n._argumentAxes,e=new r.Range(n.businessRanges[0].arg),o=new r.Range(n.businessRanges[0].val),u=n._createTranslator({arg:e,val:o}),t;for(n.translator=u,f[0].setRange(e),f[0].setTranslator(u),t=0;t<i.length;t++)i[t].setRange(o),i[t].setTranslator(u)},_prepareAxesAndDraw:function(t,i){var r=this,u=r._valueAxes,f=r._argumentAxes,e=f[0];r._calcCanvas(e.measureLabels()),r.translator.reinit(),e.setTranslator(r.translator),t(f),n.each(u,function(n,t){t.setSpiderTicks(e.getSpiderTicks())}),t(u),i(f),i(u)},_calcCanvas:function(n){var t=this.translator.canvas;t.left+=n.width,t.right+=n.width,t.top+=n.height,t.bottom+=n.height},_isRotated:n.noop,_getLayoutTargets:function(){return[{canvas:this._canvas}]},_getAxesForTransform:function(){var n=this._getArgumentAxes();return{verticalAxes:n,horizontalAxes:n}},_applyClipRects:n.noop,_getSeriesRenderTimeout:n.noop,_drawSeries:function(n){var i=this,t,f=i.seriesFamilies||[],r=i.series,u;if(r.length){for(t=0;t<f.length;t++)u={},u.val=i.translator,u.arg=i.translator,f[t].updateSeriesValues(u),f[t].adjustSeriesDimensions(u);for(t=0;t<r.length;t++)r[t].draw(i.translator,i._getAnimateOption(r[t],n),n.hideLayoutLabels,i.legend&&i.legend.getActionCallback(r[t]))}},_updateLegendAndTooltip:n.noop,_createScrollBar:n.noop,_createTranslator:function(t){var i=this.themeManager,u=this.option("argumentAxis"),f=i.getOptions("argumentAxis",u)||{};return new r.PolarTranslator(t,n.extend(!0,{},this._canvas),{startAngle:f.startAngle})},_getSeriesForPane:function(){return this.series},_getEqualBarWidth:function(){return!!this.themeManager.getOptions("equalBarWidth")}});t.registerComponent("dxPolarChart",u,e)}(jQuery,DevExpress),function(n,t,i){function v(n,t,i){r(n,function(n,r){var u=r.getLayoutOptions(),f=u.cutLayoutSide;i[f]-=u[t]})}function y(n,t){r(n,function(n,i){var u,f,r=i.getLayoutOptions(),e=p(r.cutLayoutSide);if(r.width){switch(r.horizontalAlignment){case"left":u=t.left;break;case"center":u=(t.width-t.left-t.right-r.width)/2+t.left;break;case"right":u=t.width-t.right-r.width}switch(r.verticalAlignment){case"top":f=t.top;break;case"bottom":f=t.height-t.bottom-r.height}i.shift(h(u),h(f)),t[r.cutLayoutSide]+=r[e],s(t)}})}function p(n){return n==="left"||n==="right"?"width":"height"}function s(n){n&&(n.originalTop=n.top,n.originalBottom=n.bottom,n.originalLeft=n.left,n.originalRight=n.right)}function w(n,t,i,u,f,e){r(n,function(n,r){var o=r.getLayoutOptions(),h=o.cutLayoutSide,c=u.width-u.left-u.right,l=u.height-u.top-u.bottom,s={};r.setSize({width:c,height:l}),s[i]=0,s[t]=e[t],r.changeSize(s),f[h]-=o[t]-r.getLayoutOptions()[t],e[t]-=o[t]-r.getLayoutOptions()[t]})}function b(n,t,i){n&&i[t]>0&&(r(n,function(n,r){var u=r.getBoundingRect();r.updateSize(),i[t]-=u[t]-r.getBoundingRect()[t]}),i[t]>0&&r(n,function(n,t){t.updateSize(!0)}))}function k(n,t,i){var r;return r=i<n?n:t<i?t:i}function g(n,t,i,r){return d((n-i)*(n-i)+(t-r)*(t-r))}function nt(n){var t;return n.type==="pie"?t=0:(t=f(n.innerRadius)?Number(n.innerRadius):.5,t=t<.2?.2:t,t=t>.8?.8:t),t}function tt(n){return!!(n.x||n.y||n.width||n.height)}function it(n,t){var o,i,f,e;return r(n,function(n,o){i=o.canvas,r(t,function(n,t){f="delta"+t,i[f]=u(i[f]-(i[t.toLowerCase()]-i["original"+t]),0),i[f]>0&&(e=!0)})}),e}function rt(n,t){var i=t[0];return r(t,function(t,r){n===r.name&&(i=r)}),i}function ut(n,t){var i,f=0,e=0,o=0,s=0,h=0;return r(n,function(n,t){f=u(f,t.canvas.deltaLeft),e=u(e,t.canvas.deltaRight),o=u(o,t.canvas.deltaTop),s=u(s,t.canvas.deltaBottom)}),t?r(n,function(n,t){t.canvas.top+=o,t.canvas.bottom+=s,t.canvas.right+=t.canvas.deltaRight,t.canvas.left+=t.canvas.deltaLeft}):r(n,function(n,t){t.canvas.top+=t.canvas.deltaTop,t.canvas.bottom+=t.canvas.deltaBottom,t.canvas.right+=e,t.canvas.left+=f}),r(n,function(n,t){t.canvas.top+t.canvas.bottom>t.canvas.height&&(i=!0),t.canvas.left+t.canvas.right>t.canvas.width&&(i=!0)}),i}function l(n){this._verticalElements=[],this._horizontalElements=[],this._options=n}var f=t.utils.isNumber,a=t.viz.core.utils.decreaseGaps,h=Math.round,e=Math.min,u=Math.max,o=Math.floor,d=Math.sqrt,r=n.each,c=n.extend;l.prototype={constructor:l,dispose:function(){this._verticalElements=this._horizontalElements=this._options=null},drawElements:function(n,t){var i=[],u=[];return r(n,function(n,r){var f,e;r.setSize({width:t.width-t.left-t.right,height:t.height-t.top-t.bottom}),r.draw(),f=r.getLayoutOptions(),f&&(e=p(f.cutLayoutSide),(e==="width"?i:u).push(r),t[f.cutLayoutSide]+=f[e],s(t))}),this._horizontalElements=i,this._verticalElements=u,this},placeDrawnElements:function(n){return v(this._horizontalElements,"width",n),y(this._horizontalElements,n),v(this._verticalElements,"height",n),y(this._verticalElements,n),this},updatePanesCanvases:function(n,t,i){var f=0;r(n,function(n,t){t.weight=t.weight||1,f+=t.weight});var u=0,e=n.padding||10,o=i?t.width-t.left-t.right:t.height-t.top-t.bottom,v=(o-e*(n.length-1))/f,l=i?"left":"top",a=i?"right":"bottom";r(n,function(n,i){var r=h(i.weight*v);i.canvas=i.canvas||{},c(i.canvas,{deltaLeft:0,deltaRight:0,deltaTop:0,deltaBottom:0},t),i.canvas[l]=t[l]+u,i.canvas[a]=t[a]+(o-r-u),u=u+r+e,s(i.canvas)})},applyVerticalAxesLayout:function(n,t,i){this._applyAxesLayout(n,t,i)},applyHorizontalAxesLayout:function(n,t,i){n.reverse(),this._applyAxesLayout(n,t,i),n.reverse()},_applyAxesLayout:function(n,t,i){var h=this,u,b,s,k,e,o,f,y,l,a,p=[],w,v;for(r(t,function(n,t){c(t.canvas,{deltaLeft:0,deltaRight:0,deltaTop:0,deltaBottom:0})}),v=0;v<n.length;v++)if(f=n[v],s=f.getOptions().position||"left",f.delta={},e=f.getBoundingRect(),w=rt(f.pane,t),u=w.canvas,tt(e)){l="delta"+s.slice(0,1).toUpperCase()+s.slice(1);switch(s){case"right":a=1,u.deltaLeft+=f.padding?f.padding.left:0;break;case"left":a=-1,u.deltaRight+=f.padding?f.padding.right:0;break;case"top":a=-1,u.deltaBottom+=f.padding?f.padding.bottom:0;break;case"bottom":a=1,u.deltaTop+=f.padding?f.padding.top:0}switch(s){case"right":case"left":e.isEmpty||(o=e.y+e.height-(u.height-u.originalBottom),o>0&&(h.requireAxesRedraw=!0,u.deltaBottom+=o),o=u.originalTop-e.y,o>0&&(h.requireAxesRedraw=!0,u.deltaTop+=o)),y=e.width,p=["Left","Right"];break;case"top":case"bottom":e.isEmpty||(o=e.x+e.width-(u.width-u.originalRight),o>0&&(h.requireAxesRedraw=!0,u.deltaRight+=o),o=u.originalLeft-e.x,o>0&&(h.requireAxesRedraw=!0,u.deltaLeft+=o)),p=["Bottom","Top"],y=e.height}!f.delta[s]&&u[l]>0&&(u[l]+=f.getMultipleAxesSpacing()),f.delta[s]=f.delta[s]||0,f.delta[s]+=u[l]*a,u[l]+=y}h.requireAxesRedraw=it(t,p)||h.requireAxesRedraw,h.stopDrawAxes=ut(t,i)},applyPieChartSeriesLayout:function(n,i,s){var v=n.height-n.top-n.bottom,y=n.width-n.left-n.right,c=y/2+n.left,l=v/2+n.top,a=this._options.piePercentage,h=f(a)?a*e(n.height,n.width)/2:e(y,v)/2,p=.7*h,w=nt(i);s||f(a)||r(i.getPoints(),function(n,i){if(i._label.hasText()&&i.isVisible()){var r=i._label.getBoundingRect(),f=k(r.x,r.x+r.width,c),o=k(r.y,r.y+r.height,l),s=u(g(f,o,c,l)-t.viz.core.series.helpers.consts.pieLabelIndent,p);h=e(h,s)}}),i.correctPosition({centerX:o(c),centerY:o(l),radiusInner:o(h*w),radiusOuter:o(h)})},updateDrawnElements:function(n,t,i,r,u){var f,e=c({},i);(f=this.needMoreSpaceForPanesCanvas(r,u),f)&&(f.height=a(i,["top","bottom"],f.height),f.width=a(i,["left","right"],f.width),t.top-=e.top-i.top,t.bottom-=e.bottom-i.bottom,t.left-=e.left-i.left,t.right-=e.right-i.right,w(this._horizontalElements,"width","height",i,t,f),w(this._verticalElements,"height","width",i,t,f),b(n.verticalAxes,"width",f),b(n.horizontalAxes,"height",f))},needMoreSpaceForPanesCanvas:function(n,t){var h=this._options,a=h.width,v=h.height,l=h.piePercentage,c=f(l),o=0,s=0;return r(n,function(n,r){var f=r.canvas,p=c?e(f.width,f.height)*l:i,h=(c?p:a)-(f.width-f.left-f.right),y=(c?p:v)-(f.height-f.top-f.bottom);t?(o+=h>0?h:0,s=u(y>0?y:0,s)):(o=u(h>0?h:0,o),s+=y>0?y:0)}),o>0||s>0?{width:o,height:s}:!1},correctSizeElement:function(n,t){n.setSize({width:t.width-t.right-t.left,height:t.width-t.right-t.left}),n.changeSize({width:0,height:0})}},t.viz.charts._setCanvasValues=s,t.viz.charts.LayoutManager=l}(jQuery,DevExpress),function(n,t){var a=t.viz.core.Range,e=t.utils,h=e.adjustValue,l=e.applyPrecisionByMinDelta,u=e.isDefined,o=Math,s=o.floor,c=o.max,r=n.each,p=.1,w=function(n){var t={};return r(n,function(n,i){var r=i.pane;t[r]||(t[r]=[]),t[r].push(i)}),t},b=function(n){var i,t=n.getTranslator();t._originalBusinessRange?(i=new a(t._originalBusinessRange),t.updateBusinessRange(i),n.setRange(i)):t._originalBusinessRange=new a(t.getBusinessRange())},k={transform:function(n,t){return e.getLog(n,t)},addInterval:function(n,t){return n+t},getInterval:function(n,t){return t},adjustValue:s},d={transform:function(n,t){return e.raiseTo(n,t)},addInterval:function(n,t){return n*t},getInterval:function(n,t){return o.pow(n,t)},adjustValue:h},v=function(n,t){if(n.isLogarithmic){var i=n.logarithmicBase,f=n.tickValues,r,u=[],e;for(n.minValue=t.transform(n.minValue,i),n.oldMinValue=t.transform(n.oldMinValue,i),n.maxValue=t.transform(n.maxValue,i),n.oldMaxValue=t.transform(n.oldMaxValue,i),n.tickInterval=o.round(n.tickInterval),n.tickInterval<1&&(n.tickInterval=1),e=t.getInterval(i,n.tickInterval),r=t.adjustValue(t.transform(f[0],i));u.length<f.length;r=t.addInterval(r,e))u.push(r);u.tickInterval=n.tickInterval,n.tickValues=u}},g=function(t){return n.map(t,function(n){b(n);var l=n.getTicksValues(),i=l.majorTicksValues,s=n.getOptions(),f,o,t=null,r,h,c;return i&&i.length>0&&e.isNumber(i[0])&&s.type!=="discrete"&&(r=n.getTranslator().getBusinessRange(),h=n._tickManager.getTickInterval(),f=r.minVisible,o=r.maxVisible,c=s.synchronizedValue,f===o&&u(c)&&(f=i[0]-1,o=i[0]+1,h=1),t={axis:n,isLogarithmic:s.type==="logarithmic",logarithmicBase:r.base,tickValues:i,minorValues:l.minorTicksValues,minValue:f,oldMinValue:f,maxValue:o,oldMaxValue:o,inverted:r.invert,tickInterval:h,synchronizedValue:c},r.stubData&&(t.stubData=!0,t.tickInterval=t.tickInterval||s.tickInterval,t.isLogarithmic=!1),v(t,k)),t})},nt=function(n){var t=0;r(n,function(n,i){t=c(t,i.tickValues.length)}),r(n,function(n,i){var e,o,h=0,c=i.synchronizedValue,r=i.tickValues,f=i.tickInterval;if(u(c))i.baseTickValue=i.invertedBaseTickValue=c,i.tickValues=[i.baseTickValue];else{if(r.length>1&&f){for(e=s((t+1)/r.length),o=e>1?s((t+1)/e):t,h=s((o-r.length)/2);h>0&&r[0]!==0;)r.unshift(l(r[0],f,r[0]-f)),h--;while(r.length<o)r.push(l(r[0],f,r[r.length-1]+f));i.tickInterval=f/e}i.baseTickValue=r[0],i.invertedBaseTickValue=r[r.length-1]}})},f=function(n){return n.maxValue-n.minValue||1},y=function(n){for(var t=0;t<n.length;t++)if(!n[t].stubData)return n[t];return null},tt=function(n){var t=y(n),i=t.tickInterval;r(n,function(n,r){var h,e,o,s;r!==t&&(i&&r.tickInterval&&(r.stubData&&u(r.synchronizedValue)&&(r.oldMinValue=r.minValue=r.baseTickValue-(t.baseTickValue-t.minValue)/i*r.tickInterval,r.oldMaxValue=r.maxValue=r.baseTickValue-(t.baseTickValue-t.maxValue)/i*r.tickInterval),h=i/f(t)/r.tickInterval*f(r),r.maxValue=r.minValue+f(r)/h),o=t.inverted&&!r.inverted||!t.inverted&&r.inverted?t.maxValue-t.invertedBaseTickValue:t.baseTickValue-t.minValue,s=f(r),e=(o/f(t)-(r.baseTickValue-r.minValue)/s)*s,r.minValue-=e,r.maxValue-=e)})},it=function(n){var t,i,u=0,e=0;return r(n,function(n,r){var o=r.inverted;t=r.minValue>r.oldMinValue?(r.minValue-r.oldMinValue)/f(r):0,i=r.maxValue<r.oldMaxValue?(r.oldMaxValue-r.maxValue)/f(r):0,u=c(u,o?i:t),e=c(e,o?t:i)}),{start:u,end:e}},rt=function(n,t){r(n,function(n,i){var r=f(i),u=i.inverted;i.minValue-=t[u?"end":"start"]*r,i.maxValue+=t[u?"start":"end"]*r,r>p&&(i.minValue=o.min(i.minValue,h(i.minValue)),i.maxValue=c(i.maxValue,h(i.maxValue)))})},ut=function(n){var t=!1;r(n,function(n,i){t=t||u(i.synchronizedValue)}),r(n,function(n,i){var u,f=i.tickInterval,r=i.tickValues,s=i.maxValue,o=i.minValue;if(t&&f){while(r[0]-f>=o)r.unshift(h(r[0]-f));for(u=r[r.length-1];(u=u+f)<=s;)r.push(e.isExponential(u)?h(u):l(o,f,u))}while(r[0]<o)r.shift();while(r[r.length-1]>s)r.pop()})},ft=function(n){r(n,function(n,t){var r=t.axis,i=r.getTranslator().getBusinessRange();i.min===i.minVisible&&(i.min=t.minValue),i.max===i.maxVisible&&(i.max=t.maxValue),i.minVisible=t.minValue,i.maxVisible=t.maxValue,u(t.stubData)&&(i.stubData=t.stubData),i.min>i.minVisible&&(i.min=i.minVisible),i.max<i.maxVisible&&(i.max=i.maxVisible),i.isSynchronized=!0,r.getTranslator().updateBusinessRange(i),r.setRange(i),r.setTicks({majorTicks:t.tickValues,minorTicks:t.minorValues})})},et=function(n){var f=[],t,i;(r(n,function(n,r){r.oldMaxValue-r.oldMinValue==0?f.push(r):u(t)||u(r.synchronizedValue)||(t=o.abs((r.maxValue-r.minValue)/(r.tickValues[s(r.tickValues.length/2)]||r.maxValue)),i=r)}),u(t))&&r(f,function(n,r){var u=r.tickValues[0],f=u*t,e=i.tickValues,o=e[s(e.length/2)];u>0?(r.maxValue=f,r.minValue=0):u<0?(r.minValue=f,r.maxValue=0):u===0&&(r.maxValue=i.maxValue-o,r.minValue=i.minValue-o)})};t.viz.charts.multiAxesSynchronizer={synchronize:function(n){r(w(n),function(n,t){var i,u;if(t.length>1){if(i=g(t),i.length===0||!y(i))return;nt(i),tt(i),u=it(i),rt(i,u),et(i),ut(i),r(i,function(){v(this,d)}),ft(i)}})}}}(jQuery,DevExpress),function(n,t,i){function e(n){return(n+"").toLowerCase()}function rt(n){var t;return u(n,function(n,i){if(!i._virtual)return t=i,!1}),t}function b(n,t){return n.cancel||!t.getOptions()}var h=t.viz.charts,s=t.viz.core.series.helpers.consts.events,f=t.utils,ut=f.isFunction,c=f.isDefined,r=i.floor,u=n.each,k="multiple",ft="single",v="allargumentpoints",d="allseriespoints",y="none",l="dxpointerdown dxpointermove",a="pointSelectionChanged",g="legendClick",p="seriesClick",w="pointClick",nt="releasePointSelectedState",tt="setPointSelectedState",it=100,o={ctor:function(t){var i=this;e(t.pointSelectionMode)===k?(i._setSelectedPoint=i._selectPointMultipleMode,i._releaseSelectedPoint=i._releaseSelectedPointMultipleMode):(i._setSelectedPoint=i._selectPointSingleMode,i._releaseSelectedPoint=i._releaseSelectedPointSingleMode),e(t.seriesSelectionMode)===k?(i._releaseSelectedSeries=i._releaseSelectedSeriesMultipleMode,i._setSelectedSeries=i._setSelectedSeriesMultipleMode):(i._releaseSelectedSeries=i._releaseSelectedSeriesSingleMode,i._setSelectedSeries=i._setSelectedSeriesSingleMode),i._renderer=t.renderer,i._eventTrigger=t.eventTrigger;n(t.seriesGroup.element).off().on(s.selectSeries,{tracker:i},i._selectSeries).on(s.deselectSeries,{tracker:i},i._deselectSeries).on(s.selectPoint,{tracker:i},i._selectPoint).on(s.deselectPoint,{tracker:i},i._deselectPoint).on(s.showPointTooltip,{tracker:i},i._showPointTooltip).on(s.hidePointTooltip,{tracker:i},i._hidePointTooltip)},update:function(n){var t=this,i=n.tooltip;t._storedSeries!==n.series?(t._storedSeries=n.series||[],t._clean()):(t._hideTooltip(t.pointAtShownTooltip),t._clearHover(),t.clearSelection()),t._tooltip=i,t._tooltipEnabled=i.enabled(),t._legend=n.legend,t.legendCallback=n.legendCallback,t._prepare(t._renderer.root)},setCanvases:function(n,t){this._mainCanvas=n,this._canvases=t},repairTooltip:function(){this._showTooltip(this.pointAtShownTooltip)},_prepare:function(t){var i=this,r={tracker:i};n(t.element).off().on(l,r,i._pointerHandler).on("dxclick",r,i._clickHandler).on("dxhold",{timeout:300},n.noop)},_selectPointMultipleMode:function(t){var i=this;i._selectedPoint=i._selectedPoint||[],n.inArray(t,i._selectedPoint)<0&&(i._selectedPoint.push(t),i._setPointState(t,tt,e(t.getOptions().selectionMode),a,i.legendCallback(t)))},_releaseSelectedPointMultipleMode:function(t){var i=this,r=i._selectedPoint||[],f=n.inArray(t,r);f>=0?(i._setPointState(t,nt,e(t.getOptions().selectionMode),a,i.legendCallback(t)),r.splice(f,1)):t||u(r,function(n,t){i._releaseSelectedPoint(t)})},_selectPointSingleMode:function(n){var t=this;t._selectedPoint!==n&&(t._releaseSelectedPoint(),t._selectedPoint=n,t._setPointState(n,tt,e(n.getOptions().selectionMode),a,t.legendCallback(n)))},_releaseSelectedPointSingleMode:function(){var n=this,t=n._selectedPoint;t&&(n._setPointState(t,nt,e(t.getOptions().selectionMode),a,n.legendCallback(t)),n._selectedPoint=null)},_setPointState:function(n,t,i,r,f){var e=this;switch(i){case v:e._toAllArgumentPoints(n.argument,t,r);break;case d:u(n.series.getPoints(),function(n,i){i.series[t](i),e._eventTrigger(r,{target:i})});break;case y:break;default:n.series[t](n,f),e._eventTrigger(r,{target:n})}},_toAllArgumentPoints:function(n,t,i){var r=this;u(r._storedSeries,function(f,e){var o=e.getPointsByArg(n);u(o||[],function(n,u){e[t](u),i&&r._eventTrigger(i,{target:u})})})},_setHoveredPoint:function(n,t){var i=this;i.hoveredPoint!==n&&n.series&&(i._releaseHoveredPoint(),n&&n.getOptions()&&t!==y&&(i.hoveredPoint=n,i._setPointState(n,"setPointHoverState",t||e(n.getOptions().hoverMode),"pointHoverChanged",i.legendCallback(n))))},_releaseHoveredPoint:function(){var t=this,n=t.hoveredPoint,i;n&&n.getOptions()&&(i=e(n.getOptions().hoverMode),i===d?u(n.series.getPoints(),function(n,i){i.series.releasePointHoverState(i),t._eventTrigger("pointHoverChanged",{target:i})}):i===v?t._toAllArgumentPoints(n.argument,"releasePointHoverState","pointHoverChanged"):(n.releaseHoverState(t.legendCallback(n)),t._eventTrigger("pointHoverChanged",{target:n})),t._tooltipEnabled&&t._hideTooltip(n),t.hoveredPoint=null)},_setSelectedSeriesMultipleMode:function(t,i){var r=this;r._selectedSeries=r._selectedSeries||[],n.inArray(t,r._selectedSeries)<0&&(r._selectedSeries.push(t),t.setSelectedState(!0,i,r.legendCallback(t)),r._eventTrigger("seriesSelectionChanged",{target:t}))},_setSelectedSeriesSingleMode:function(n,t){var i=this;(n!==i._selectedSeries||n.lastSelectionMode!==t)&&(this._releaseSelectedSeries(),i._selectedSeries=n,n.setSelectedState(!0,t,i.legendCallback(n)),i._eventTrigger("seriesSelectionChanged",{target:n}))},_releaseSelectedSeriesMultipleMode:function(t){var i=this,r=i._selectedSeries||[],f=n.inArray(t,r);f>=0?(t.setSelectedState(!1,undefined,i.legendCallback(t)),i._eventTrigger("seriesSelectionChanged",{target:t}),r.splice(f,1)):t||u(r,function(n,t){i._releaseSelectedSeries(t)})},_releaseSelectedSeriesSingleMode:function(){var n=this,t=n._selectedSeries;t&&(t.setSelectedState(!1,undefined,n.legendCallback(t)),n._eventTrigger("seriesSelectionChanged",{target:t}),n._selectedSeries=null)},_setHoveredSeries:function(n,t){var i=this;(t!==y&&i.hoveredSeries!==n||n.lastHoverMode!==t)&&(i._clearHover(),n.setHoverState(!0,t,i.legendCallback(n)),i._eventTrigger("seriesHoverChanged",{target:n})),i.hoveredSeries=n},_releaseHoveredSeries:function(){var n=this;n.hoveredSeries&&(n.hoveredSeries.setHoverState(!1,undefined,n.legendCallback(n.hoveredSeries)),n._eventTrigger("seriesHoverChanged",{target:n.hoveredSeries}),n.hoveredSeries=null)},_selectSeries:function(n,t){n.data.tracker._setSelectedSeries(n.target,t)},_deselectSeries:function(n,t){n.data.tracker._releaseSelectedSeries(n.target,t)},_selectPoint:function(n,t){n.data.tracker._setSelectedPoint(t)},_deselectPoint:function(n,t){n.data.tracker._releaseSelectedPoint(t)},_clearPointSelection:function(){this._releaseSelectedPoint()},clearSelection:function(){this._clearPointSelection(),this._releaseSelectedPoint()},_clean:function(){var n=this;n._selectedPoint=n._selectedSeries=n.hoveredPoint=n.hoveredSeries=null,n._hideTooltip(n.pointAtShownTooltip)},_clearHover:function(){this._releaseHoveredSeries(),this._releaseHoveredPoint()},_hideTooltip:function(n){var t=this._tooltip;t&&(!n||this.pointAtShownTooltip===n)&&(n=n||this.pointAtShownTooltip,t.hide(),this.pointAtShownTooltip&&(this.pointAtShownTooltip=null,this._eventTrigger("tooltipHidden",{target:n})))},_showTooltip:function(n){var t=this._tooltip,i;if(n&&n.getOptions()){if(i=n.getTooltipFormatObject(t),!c(i.valueText)&&!i.points||!n.isVisible())return;if(!t.prepare(i,n.getTooltipParams(t.getLocation())))return;t.show(),this.pointAtShownTooltip||this._eventTrigger("tooltipShown",{target:n}),this.pointAtShownTooltip=n}},_showPointTooltip:function(n,t){n.data.tracker._showTooltip(t)},_hidePointTooltip:function(n,t){n.data.tracker._hideTooltip(t)},_enableOutHandler:function(){if(!this._outHandler){var t=this,i=function(n){var i=f.getRootOffset(t._renderer),u=r(n.pageX-i.left),e=r(n.pageY-i.top);t._inCanvas(t._mainCanvas,u,e)||(t._pointerOut(),t._disableOutHandler())};n(document).on(l,i);this._outHandler=i}},_disableOutHandler:function(){this._outHandler&&n(document).off(l,this._outHandler),this._outHandler=null},_pointerOut:function(){this._clearHover(),this._tooltipEnabled&&this._hideTooltip(this.pointAtShownTooltip)},_inCanvas:function(n,t,i){return t>=n.left&&t<=n.right&&i>=n.top&&i<=n.bottom},dispose:function(){var n=this;n._disableOutHandler(),u(n,function(t){n[t]=null})}};h.ChartTracker=function(n){this.ctor(n)},n.extend(h.ChartTracker.prototype,o,{ctor:function(n){o.ctor.call(this,n)},_pointClick:function(n,t){var u=this,i=u._eventTrigger,r=n.series;i(w,{target:n,jQueryEvent:t},function(){b(t,r)||i(p,{target:r,jQueryEvent:t})})},_legendClick:function(n,t){var u=this,i={target:n,jQueryEvent:t},r=u._eventTrigger;r(g,i,function(){b(t,n)||r(p,i)})},update:function(n){var t=this;t._zoomingMode=(n.zoomingMode+"").toLowerCase(),t._scrollingMode=(n.scrollingMode+"").toLowerCase(),o.update.call(this,n),t._argumentAxis=rt(n.argumentAxis||[]),t._axisHoverEnabled=t._argumentAxis&&e(t._argumentAxis.getOptions().hoverMode)===v,t._chart=n.chart,t._rotated=n.rotated,t._crosshair=n.crosshair},_getAxisArgument:function(t){var i=n(t.target);return t.target.tagName==="tspan"?i.parent().data("argument"):i.data("argument")},_getCanvas:function(n,t){for(var u=this,f=u._canvases||[],r,i=0;i<f.length;i++)if(r=f[i],u._inCanvas(r,n,t))return r;return null},_focusOnCanvas:function(n){!n&&this._stickedSeries&&this._pointerOut()},_resetHoveredArgument:function(){c(this.hoveredArgument)&&(this._toAllArgumentPoints(this.hoveredArgument,"releasePointHoverState"),this.hoveredArgument=null)},_hideCrosshair:function(){this._crosshair&&this._crosshair.hide()},_moveCrosshair:function(n,t,i){if(n&&this._crosshair){var r=n.getCrosshairCoords(t,i),u=n.getPointRadius();this._crosshair.shift(r.x,r.y,u)}},_prepare:function(t){var i=this,u=i._scrollingMode==="all"||i._scrollingMode==="touch",e=i._zoomingMode==="all"||i._zoomingMode==="touch",r=(u?"":"pan-x pan-y ")+(e?"":"pinch-zoom")||"none",s={"touch-action":r,"-ms-touch-action":r},h=i._zoomingMode==="all"||i._zoomingMode==="mouse";if(o._prepare.call(i,t),!i._gestureEndHandler){i._gestureEndHandler=function(){i._gestureEnd()};n(document).on("dxpointerup",i._gestureEndHandler)}h&&n(t.element).on("dxmousewheel",function(n){var t=f.getRootOffset(i._renderer),r=i._rotated?n.pageY-t.top:n.pageX-t.left,u=i._argumentAxis.getTranslator().getMinScale(n.delta>0),o=r-r*u,e=i._argumentAxis.getTranslator().zoom(-o,u);i._pointerOut(),i._chart.zoomArgument(e.min,e.max,!0),n.preventDefault()});n(t.element).on("dxc-scroll-start",function(n){i._gestureStart(i._getGestureParams(n,{left:0,top:0}))}).on("dxc-scroll-move",function(n){i._gestureChange(i._getGestureParams(n,{left:0,top:0}))&&n.preventDefault()});i._tooltip.off().on(l,{tracker:i},i._tooltipPointerHandler);t.css(s)},_getGestureParams:function(n,t){var h=this,r,u,e=n.pointers.length,f,o,s=h._rotated?"pageY":"pageX";return t=h._rotated?t.top:t.left,e===2?(r=n.pointers[0][s]-t,u=n.pointers[1][s]-t):e===1&&(r=u=n.pointers[0][s]-t),f=i.min(r,u),o=i.max(r,u),{center:f+(o-f)/2,distance:o-f,touches:e,scale:1,pointerType:n.pointerType}},_gestureStart:function(n){var t=this;t._startGesture=t._startGesture||n,t._startGesture.touches!==n.touches&&(t._startGesture=n)},_gestureChange:function(n){var r=this,t=r._startGesture,u=!1,f=r._scrollingMode==="all"||r._scrollingMode!=="none"&&r._scrollingMode===n.pointerType,e=r._zoomingMode==="all"||r._zoomingMode==="touch";return t?t.touches===1&&i.abs(t.center-n.center)<3?(r._gestureStart(n),u):(t.touches===2&&e?(u=!0,t.scale=n.distance/t.distance,t.scroll=n.center-t.center+(t.center-t.center*t.scale)):t.touches===1&&f&&(u=!0,t.scroll=n.center-t.center),u&&(t.changed=u,r._chart._transformArgument(t.scroll,t.scale)),u):u},_gestureEnd:function(){function u(){i._chart.zoomArgument(t.min,t.max,!0)}var i=this,n=i._startGesture,t,r=i._renderer,f,e;i._startGesture=null,n&&n.changed&&(t=i._argumentAxis._translator.zoom(-n.scroll,n.scale),r.animationEnabled()&&(-n.scroll!==t.translate||n.scale!==t.scale)?(f=-(n.scroll+t.translate),e=n.scale-t.scale,r.root.animate({_:0},{step:function(t){var r=-n.scroll-f*t,u=n.scale-e*t;i._chart._transformArgument(-r,u)},complete:u,duration:250})):u())},_clean:function(){var n=this;o._clean.call(n),n._resetTimer(),n._stickedSeries=null},_getSeriesForShared:function(n,t){var r=this,e=[],f=null,o=Infinity;return r._tooltip.shared()&&!r.hoveredSeries&&(u(r._storedSeries,function(i,r){var u=r.getNeighborPoint(n,t);u&&e.push(u)}),u(e,function(r,u){var e=u.getCrosshairCoords(n,t),s=i.sqrt((n-e.x)*(n-e.x)+(t-e.y)*(t-e.y));s<o&&(f=u,o=s)})),f&&f.series},_setTimeout:function(n,t){var i=this;i._timeoutKeeper!==t&&(i._resetTimer(),i._hoverTimeout=setTimeout(function(){n(),i._timeoutKeeper=null},it),i._timeoutKeeper=t)},_resetTimer:function(){clearTimeout(this._hoverTimeout),this._timeoutKeeper=this._hoverTimeout=null},_pointerHandler:function(t){var i=t.data.tracker,l=f.getRootOffset(i._renderer),o=r(t.pageX-l.left),s=r(t.pageY-l.top),a=i._getCanvas(o,s),u=n(t.target).data("series"),e=n(t.target).data("point")||u&&u.getPointByCoord(o,s),v,h,y;if(i._enableOutHandler(),i._x=o,i._y=s,t.type==="dxpointerdown")a&&i._gestureStart(i._getGestureParams(t,l));else if(i._startGesture&&a&&i._gestureChange(i._getGestureParams(t,l))){i._pointerOut(),t.preventDefault();return}if(i._legend.coordsIn(o,s)){v=i._legend.getItemByCoord(o,s),v?(u=i._storedSeries[v.id],i._setHoveredSeries(u,i._legend._options.hoverMode),i._stickedSeries=u):i._clearHover(),i._hideCrosshair();return}if(i._axisHoverEnabled&&i._argumentAxis.coordsIn(o,s)){h=i._getAxisArgument(t),y=c(h),y&&i.hoveredArgument!==h?(i._clearHover(),i._resetHoveredArgument(),i._toAllArgumentPoints(h,"setPointHoverState"),i.hoveredArgument=h):y||i._resetHoveredArgument();return}if(i._resetHoveredArgument(),i._focusOnCanvas(a),a||e){if(u||e||(i._stickedSeries=i._stickedSeries||i._getSeriesForShared(o,s)),u&&!e){if(e=u.getNeighborPoint(o,s),u!==i.hoveredSeries){i._setTimeout(function(){i._setHoveredSeries(u,u.getOptions().hoverMode),i._stickedSeries=u,i._pointerComplete(e)},u);return}}else{if(e){i.hoveredSeries?i._setTimeout(function(){i._pointerOnPoint(e)},e):i._pointerOnPoint(e);return}i._stickedSeries&&(u=i._stickedSeries,e=u.getNeighborPoint(o,s),i.hoveredSeries&&i._releaseHoveredSeries(),e&&i._setHoveredPoint(e))}i._pointerComplete(e)}},_pointerOnPoint:function(n){var t=this;t._stickedSeries=n.series,t._setHoveredPoint(n),t.hoveredSeries&&t._releaseHoveredSeries(),t._pointerComplete(n)},_pointerComplete:function(n){var t=this;t.hoveredSeries&&t.hoveredSeries.updateHover(t._x,t._y),t._resetTimer(),t._moveCrosshair(n,t._x,t._y),t.pointAtShownTooltip!==n&&t._tooltipEnabled&&t._showTooltip(n)},_pointerOut:function(){var n=this;n._stickedSeries=null,n._hideCrosshair(),n._resetHoveredArgument(),n._resetTimer(),o._pointerOut.call(n)},_clickHandler:function(t){var i=t.data.tracker,v=f.getRootOffset(i._renderer),o=r(t.pageX-v.left),s=r(t.pageY-v.top),u=n(t.target).data("point"),e=i._stickedSeries||n(t.target).data("series")||u&&u.series,h=i._argumentAxis,l,a;if(i._legend.coordsIn(o,s)){l=i._legend.getItemByCoord(o,s),l&&(e=i._storedSeries[l.id],i._legendClick(e,t));return}if(h&&h.coordsIn(o,s)&&(a=i._getAxisArgument(t),c(a))){i._eventTrigger("argumentAxisClick",{target:h,argument:a,jQueryEvent:t});return}e&&(u=u||e.getPointByCoord(o,s),u?i._pointClick(u,t):n(t.target).data("series")&&i._eventTrigger(p,{target:e,jQueryEvent:t}))},_tooltipPointerHandler:function(n){var t=n.data.tracker,e=f.getRootOffset(t._renderer),o=r(n.pageX-e.left),s=r(n.pageY-e.top),h=t._stickedSeries,i;h&&!h.getPointByCoord(o,s)&&(u(t._storedSeries,function(n,t){return i=t.getPointByCoord(o,s),i?!1:void 0}),i&&(t._stickedSeries=i.series))},dispose:function(){this._gestureEndHandler&&n(document).off("dxpointerup",this._gestureEndHandler),this._resetTimer(),o.dispose.call(this)}}),h.PieTracker=function(n){this.ctor(n)},n.extend(h.PieTracker.prototype,o,{_legendClick:function(n,t){var u=this,i={target:n,jQueryEvent:t},r=u._eventTrigger;r(g,i,function(){b(t,n)||r(w,i)})},_pointerHandler:function(t){var i=t.data.tracker,c=f.getRootOffset(i._renderer),e=r(t.pageX-c.left),o=r(t.pageY-c.top),s=i._storedSeries[0],u=n(t.target).data("point")||s&&s.getPointByCoord(e,o),h,l;i._enableOutHandler(),i._legend.coordsIn(e,o)&&(h=i._legend.getItemByCoord(e,o),h&&(u=s.getPoints()[h.id],l=i._legend._options.hoverMode)),u&&u!==i.hoveredPoint?(i._tooltipEnabled&&i._showTooltip(u),i._setHoveredPoint(u,l)):u||i._pointerOut()},_clickHandler:function(t){var i=t.data.tracker,c=f.getRootOffset(i._renderer),e=r(t.pageX-c.left),o=r(t.pageY-c.top),s=i._storedSeries[0],u,h;i._legend.coordsIn(e,o)?(h=i._legend.getItemByCoord(e,o),h&&(u=s.getPoints()[h.id],i._legendClick(u,t))):(u=n(t.target).data("point")||s&&s.getPointByCoord(e,o),u&&i._eventTrigger(w,{target:u,jQueryEvent:t}))}})}(jQuery,DevExpress,Math),function(n,t){function c(){this.ctor.apply(this,arguments)}var r=Math.abs,u=Math.min,f=Math.max,l="horizontal",a="vertical",e=8,o=4,v="center",s="right",y="left",p="top",h="bottom",w=t.utils.isDefined;t.viz.charts.Crosshair=c,c.prototype={ctor:function(n,t,i,r){var u=this;u._renderer=n,u._crosshairGroup=r,u._options={},u._init(t,i)},update:function(n,t){this._init(n,t)},dispose:function(){var n=this;n._renderer=null,n._crosshairGroup=null,n._options=null,n._axes=null,n._canvas=null,n._horizontalGroup=null,n._verticalGroup=null,n._horizontal=null,n._vertical=null,n._circle=null,n._panes=null},_init:function(n,t){var r=this,i=t.canvas;r._canvas={top:i.top,bottom:i.height-i.bottom,left:i.left,right:i.width-i.right,width:i.width,height:i.height},r._axes=t.axes,r._panes=t.panes,r._prepareOptions(n,l),r._prepareOptions(n,a)},_prepareOptions:function(t,i){this._options[i]={visible:t[i+"Line"].visible,line:{stroke:t[i+"Line"].color||t.color,"stroke-width":t[i+"Line"].width||t.width,dashStyle:t[i+"Line"].dashStyle||t.dashStyle,opacity:t[i+"Line"].opacity||t.opacity,"stroke-linecap":"butt"},label:n.extend(!0,{},t.label,t[i+"Line"].label)}},_createLines:function(n,t,i){for(var f=[],r=this._canvas,e=[r.left,r.top,r.left,r.top],u=0;u<2;u++)f.push(this._renderer.path(e,"line").attr(n).sharp(t).append(i));return f},render:function(){var n=this,u=n._renderer,f=n._options,i=f.vertical,t=f.horizontal,r=t.visible?t.line:i.line,o={stroke:r.stroke,"stroke-width":r["stroke-width"],dashStyle:r.dashStyle,opacity:r.opacity},e=n._canvas;n._horizontal={},n._vertical={},n._horizontalGroup=u.g().append(n._crosshairGroup),n._verticalGroup=u.g().append(n._crosshairGroup),i.visible&&(n._vertical.lines=n._createLines(i.line,"h",n._verticalGroup),n._vertical.labels=n._createLabels(n._axes[0],i,!1,n._verticalGroup)),t.visible&&(n._horizontal.lines=n._createLines(t.line,"v",n._horizontalGroup),n._horizontal.labels=n._createLabels(n._axes[1],t,!0,n._horizontalGroup)),(i.visible||t.visible)&&(n._circle=u.circle(e.left,e.top,0).attr(o).append(n._crosshairGroup))},_createLabels:function(i,r,u,f){var w=this,b=w._canvas,k=w._renderer,a,e,c,d=[],g,l,o;if(r.label&&r.label.visible)return n.each(i,function(n,i){var nt=i.getOptions(),w=nt.position;i._virtual||nt.stubData||(l=i.getCurrentLabelPos(),u?(e=b.top,a=l):(a=b.left,e=l),c=k.text("0",a,e).css(t.viz.core.utils.patchFontOptions(r.label.font)).attr({align:w===p||w===h?v:w===s?y:s}).append(f),o=c.getBBox(),c.attr({y:u?2*e-o.y-o.height/2:w===h?2*e-o.y:2*e-(o.y+o.height)}),g=k.rect(0,0,0,0).attr({fill:r.label.backgroundColor||r.line.stroke}).append(f).toBackground(),d.push({text:c,background:g,axis:i,pos:{coord:l,side:w}}))}),d},_updateText:function(t,i){var h=this,r,f,u,c,s;i&&n.each(i,function(n,i){(u=i.text,s=i.background,u)&&(f=i.axis.getUntranslatedValue(t),w(f)?(u.attr({text:f}),r=u.getBBox(),h._updateLinesCanvas(i.pos.side,i.pos.coord),s.attr({x:r.x-e,y:r.y-o,width:r.width+e*2,height:r.height+o*2})):(u.attr({text:""}),s.attr({x:0,y:0,width:0,height:0})))})},show:function(){this._crosshairGroup.attr({visibility:"visible"})},hide:function(){this._crosshairGroup.attr({visibility:"hidden"})},_updateLinesCanvas:function(n,t){var i=this._linesCanvas,u=this._canvas;i[n]=i[n]!==u[n]&&r(i[n]-u[n])<r(t-u[n])?i[n]:t},_updateLines:function(n,t,i,r,e){for(var h=this._linesCanvas,o=this._canvas,c=e?[[u(t-r,h.left),o.top,t-r,o.top],[t+r,o.top,f(h.right,t+r),o.top]]:[[o.left,u(h.top,i-r),o.left,i-r],[o.left,i+r,o.left,f(h.bottom,i+r)]],s=0;s<2;s++)n[s].attr({points:c[s]})},_resetLinesCanvas:function(){var n=this._canvas;this._linesCanvas={left:n.left,right:n.right,top:n.top,bottom:n.bottom}},_getClipRectForPane:function(n,t){for(var u=this._panes,i,r=0;r<u.length;r++)if(i=u[r].coords,i.left<=n&&i.right>=n&&i.top<=t&&i.bottom>=t)return u[r].clipRect;return{id:null}},shift:function(n,t,i){var r=this,f=r._horizontal,e=r._vertical,s,o=i?i+3:0,u=r._canvas;n>=u.left&&n<=u.right&&t>=u.top&&t<=u.bottom?(r.show(),r._resetLinesCanvas(),s=r._getClipRectForPane(n,t),r._circle.attr({cx:n,cy:t,r:o,clipId:s.id}),f.lines&&(r._updateText(t,f.labels),r._updateLines(f.lines,n,t,o,!0),r._horizontalGroup.attr({translateY:t-u.top})),e.lines&&(r._updateText(n,e.labels),r._updateLines(e.lines,n,t,o,!1),r._verticalGroup.attr({translateX:n-u.left}))):r.hide()}}}(jQuery,DevExpress),DevExpress.MOD_VIZ_CHARTS=!0}if(!DevExpress.MOD_VIZ_GAUGES){if(!DevExpress.MOD_VIZ_CORE)throw Error("Required module is not referenced: viz-core");(function(n){n.viz.gauges={__internals:{circularNeedles:{},circularMarkers:{},linearNeedles:{},linearMarkers:{}}}})(DevExpress),function(n,t){var r=n.viz.gauges.__internals,u=r.circularNeedles,o=r.circularMarkers,e=r.linearNeedles,s=r.linearMarkers,f=String;n.viz.gauges.__factory={createCircularValueIndicator:function(n){var t=u.RectangleNeedle;switch(f(n).toLowerCase()){case"rectangleneedle":t=u.RectangleNeedle;break;case"triangleneedle":t=u.TriangleNeedle;break;case"twocolorneedle":t=u.TwoColorRectangleNeedle;break;case"rangebar":t=r.CircularRangeBar}return new t},createLinearValueIndicator:function(n){var t=r.LinearRangeBar;switch(f(n).toLowerCase()){case"rectangle":t=e.RectangleNeedle;break;case"rhombus":t=e.RhombusNeedle;break;case"circle":t=e.CircleNeedle;break;case"rangebar":t=r.LinearRangeBar}return new t},createCircularSubvalueIndicator:function(n){var t=o.TriangleMarker;switch(f(n).toLowerCase()){case"trianglemarker":t=o.TriangleMarker;break;case"textcloud":t=o.TextCloudMarker}return new t},createLinearSubvalueIndicator:function(n){var t=s.TriangleMarker;switch(f(n).toLowerCase()){case"trianglemarker":t=s.TriangleMarker;break;case"textcloud":t=s.TextCloudMarker}return new t},createCircularValueIndicatorInHardMode:function(n){var t=null;switch(f(n).toLowerCase()){case"rectangleneedle":t=u.RectangleNeedle;break;case"triangleneedle":t=u.TriangleNeedle;break;case"twocolorneedle":t=u.TwoColorRectangleNeedle;break;case"rangebar":t=r.CircularRangeBar;break;case"trianglemarker":t=o.TriangleMarker;break;case"textcloud":t=o.TextCloudMarker}return t?new t:null},createLinearValueIndicatorInHardMode:function(n){var t=null;switch(f(n).toLowerCase()){case"rectangle":t=e.RectangleNeedle;break;case"rhombus":t=e.RhombusNeedle;break;case"circle":t=e.CircleNeedle;break;case"rangebar":t=r.LinearRangeBar;break;case"trianglemarker":t=s.TriangleMarker;break;case"textcloud":t=s.TextCloudMarker}return t?new t:null},createCircularScale:function(n){return new r.CircularScale(n)},createLinearScale:function(n){return new r.LinearScale(n)},createCircularRangeContainer:function(n){return new r.CircularRangeContainer(n)},createLinearRangeContainer:function(n){return new r.LinearRangeContainer(n)},createTitle:function(n){return new r.Title(n)},createIndicator:function(){return r.Indicator&&new r.Indicator||null},createLayoutManager:function(){return new r.LayoutManager},createThemeManager:function(n){return new r.ThemeManager(n)},createTracker:function(n){return new r.Tracker(n)}};var h=n.utils.isFunction,f=window.String,c=t.extend,l=n.formatHelper;r.formatValue=function(n,t,i){var r,u;return(t=t||{},r=l.format(n,t.format,t.precision),h(t.customizeText))?(u=c({value:n,valueText:r},i),f(t.customizeText.call(u,u))):r},r.getSampleText=function(n,t){var i=r.formatValue(n.getDomainStart(),t),u=r.formatValue(n.getDomainEnd(),t);return i.length>=u.length?i:u}}(DevExpress,jQuery),function(n,t,i){function a(n,t){var i=0,r=t.length-1,e=t[i]-t[r]<0,u,f=-1;for(t[i]===n&&(f=i),t[r]===n&&(f=r);f<0&&i<=r;)u=~~((i+r)/2),t[u]===n?f=u:t[u]-n<0===e?i=u+1:r=u-1;return f}function v(n,t){return n-t}var e=n.viz,h=e.core,r=Number,p=String,w=isFinite,u=Math,c=u.min,o=u.max,s=u.abs,it=u.atan,rt=u.acos,ut=u.ceil,b=u.PI/180,l=n.utils,k=l.isFunction,d=l.isArray,g=l.getCosAndSin,nt=l.convertAngleToRendererSpace,f=t.map,tt=n.formatHelper,y=h.CoreFactory.createTickManager;e.gauges.__internals.BaseScale=n.Class.inherit({ctor:function(n){var t=this,i;t._renderer=i=n.renderer,t._container=n.container,t._translator=n.translator,t._root=i.g().attr({"class":"dxg-scale"}),t._majorTicks=i.g().attr({"class":"dxg-major-ticks"}),t._minorTicks=i.g().attr({"class":"dxg-minor-ticks"}),t._labels=i.g().attr({"class":"dxg-labels"})},dispose:function(){var n=this;return n._renderer=n._container=n._renderer=n._root=n._majorTicks=n._minorTicks=n._labels=null,n},clean:function(){var n=this;return n._root.remove(),n._majorTicks.remove().clear(),n._minorTicks.remove().clear(),n._labels.remove().clear(),n._majorTicksEnabled=n._minorTicksEnabled=n._labelsEnabled=n._options=n.enabled=null,n},render:function(n){var t=this;return t._options=n,t._processOptions(n),(t._majorTicksEnabled||t._minorTicksEnabled||t._labelsEnabled)&&(t.enabled=!0,t._root.append(t._container),t._majorTicksEnabled&&t._majorTicks.append(t._root),t._minorTicksEnabled&&t._minorTicks.append(t._root),t._labelsEnabled&&(t._labels.append(t._root),t._measureText())),t},_processOptions:function(n){var t=this;t._majorTicksEnabled=n.majorTick.visible&&n.majorTick.length>0&&n.majorTick.width>0,t._minorTicksEnabled=n.minorTick.visible&&n.minorTick.length>0&&n.minorTick.width>0,t._labelsEnabled=n.label.visible&&r(n.label.indentFromTick)!==0,t._setupOrientation()},_measureText:function(){var n=this,f=n._translator.getDomain(),u=n._options,e=y({},{min:f[0],max:f[1],screenDelta:u.approximateScreenDelta},{tickInterval:u.majorTick.tickInterval>0?r(u.majorTick.tickInterval):i,stick:!0,textFontStyles:h.utils.patchFontOptions(u.label.font),gridSpacingFactor:n._getGridSpacingFactor().majorTicks,renderText:function(t,i,r,u){return n._renderer.text(t,i,r,u).append(n._renderer.root)},getText:function(t){return n._formatValue(t)},overlappingBehaviorType:n._overlappingBehaviorType}),t=e.getMaxLabelParams();n._textVerticalOffset=-t.y-t.height/2,n._textWidth=t.width,n._textHeight=t.height,n._textLength=t.length},_formatValue:function(n){var i=this._options.label,t=tt.format(n,i.format,i.precision);return k(i.customizeText)&&(t={value:n,valueText:t},t=p(i.customizeText.call(t,t))),t},_setupOrientation:null,_getCustomValues:function(n,t){var u=this._translator,i=[];return d(n)&&(i=f(n,function(n){return w(u.translate(n))?r(n):null}).sort(t),i=f(i,function(n,t){return n!==i[t-1]?n:null})),i},_getLabelPosition:function(n){return this._getAxisLabelPosition(r(this._options.majorTick.length),r(this._options.label.indentFromTick),n)},_generateTicks:function(n){var t=this,u=t._options,o=t._translator.getDomain(),c={min:o[0],max:o[1],screenDelta:t._getScreenDelta(n)},s=t._getGridSpacingFactor(),f={tickInterval:u.majorTick.tickInterval>0?r(u.majorTick.tickInterval):i,minorTickInterval:u.minorTick.tickInterval>0?r(u.minorTick.tickInterval):i,gridSpacingFactor:s.majorTicks,minorGridSpacingFactor:s.minorTicks,numberMultipliers:[1,2,5],textFontStyles:h.utils.patchFontOptions(u.label.font),labelOptions:u.label,getText:function(n){return t._formatValue(n)},isHorizontal:!t.vertical,stick:!0,showMinorTicks:!0},e;return u.majorTick.useTicksAutoArrangement&&(f.useTicksAutoArrangement=!0,f.renderText=function(n,i,r,u){return t._renderer.text(n,i,r,u).append(t._renderer.root)},f.translate=t._getTranslateFunction(n),t._applyOverlappingOptions(f,n)),e=y({},c,f),{majorTicks:e.getTicks(!0),minorTicks:e.getMinorTicks()}},_getTicks:function(n){var t=this,i=t._options,o=t._generateTicks(n),r=i.majorTick.showCalculatedTicks?o.majorTicks:[],u=f(t._getCustomValues(i.majorTick.customTickValues,v),function(n){return a(n,r)===-1?n:null}),s=f(i.minorTick.showCalculatedTicks?o.minorTicks:[],function(n){return a(n,u)===-1?n:null}),e=t._getCustomValues(i.minorTick.customTickValues,v),h=r.concat(s,u).sort(v);return e=f(e,function(n){return a(n,h)===-1?n:null}),{major:f(r.concat(u),function(n){return{value:n,position:t._translator.translate(n)}}),minor:f(s.concat(e),function(n){return{value:n,position:t._translator.translate(n)}})}},_createMajorTicks:function(n,t){var i=this,f,u=0,o=n.length,e;if(i._majorTicks.clear().attr({fill:i._options.majorTick.color}),f=i._getTickPoints(r(i._options.majorTick.length),r(i._options.majorTick.width),t),f)for(i._options.hideFirstTick&&++u,i._options.hideLastTick&&--o;u<o;++u)e=i._renderer.path(f,"area"),i._moveTick(e,n[u],t),e.append(i._majorTicks)},_createMinorTicks:function(n,t){var i=this,u,f=0,o=n.length,e;if(i._minorTicks.clear().attr({fill:i._options.minorTick.color}),u=i._getTickPoints(r(i._options.minorTick.length),r(i._options.minorTick.width),t),u)for(;f<o;++f)e=i._renderer.path(u,"area"),i._moveTick(e,n[f],t),e.append(i._minorTicks)},_createLabels:function(n,t){var i=this,c=r(i._options.label.indentFromTick),f,u=0,l=n.length,e,o,a={},s;if(i._labels.clear().attr({align:i._getLabelAlign(c)}).css(h.utils.patchFontOptions(i._options.label.font)),f=i._getLabelPosition(t),f)for(s=i._options.label.useRangeColors?i._options.rangeContainer:null,i._options.hideFirstLabel&&++u,i._options.hideLastLabel&&--l;u<l;++u)o=i._formatValue(n[u].value),a.fill=s?s.getColorForValue(n[u].value):null,e=i._getLabelOptions(o,f,c,n[u],t),i._renderer.text(o,e.x,e.y+i._textVerticalOffset).css(a).append(i._labels)},resize:function(n){var t=this,i=t._getTicks(n);return t._majorTicksEnabled&&t._createMajorTicks(i.major,n),t._minorTicksEnabled&&t._createMinorTicks(i.minor,n),t._labelsEnabled&&t._createLabels(i.major,n),t}}),e.gauges.__internals.CircularScale=e.gauges.__internals.BaseScale.inherit({_getGridSpacingFactor:function(){return{majorTicks:17,minorTicks:5}},_getTranslateFunction:function(n){var t=this,i=r(t._options.label.indentFromTick),u=this._translator;return n=n||{x:0,y:0,radius:0},function(r){var f=t._getLabelPosition(n),e=t._formatValue(r);return t._getLabelOptions(e,f,i,{position:u.translate(r)},n)}},_overlappingBehaviorType:"circular",_getScreenDelta:function(n){return(this._translator.getCodomainStart()-this._translator.getCodomainEnd())*n.radius*b},_setupOrientation:function(){var n=this;n._inner=n._outer=0;switch(n._options.orientation){case"inside":n._inner=1;break;case"center":n._inner=n._outer=.5;break;default:n._outer=1}},_getTickPoints:function(n,t,i){var f=i.x-t/2,e=i.x+t/2,r=i.y-i.radius-n*this._outer,u=i.y-i.radius+n*this._inner;return r>0&&u>0?[f,r,e,r,e,u,f,u]:null},_moveTick:function(n,t,i){n.rotate(nt(t.position),i.x,i.y)},_getAxisLabelPosition:function(n,t,i){var r=i.radius+n*(t>=0?this._outer:-this._inner)+t;return r>0?r:null},_getLabelAlign:function(){return"center"},_applyOverlappingOptions:function(n,t){n.circularRadius=this._getLabelPosition(t),n.circularStartAngle=this._translator.getCodomainStart(),n.circularEndAngle=this._translator.getCodomainEnd(),n.overlappingBehaviorType="circular"},_getLabelOptions:function(n,t,i,r,u){var f=g(r.position),e=u.x+f.cos*t,o=u.y-f.sin*t,s=f.cos*(n.length/this._textLength)*this._textWidth/2,h=f.sin*this._textHeight/2;return i>0?(e+=s,o-=h):(e-=s,o+=h),{x:e,y:o}},measure:function(n){var t=this,i={min:n.radius,max:n.radius};return t._majorTicksEnabled&&(i.min=c(i.min,n.radius-t._inner*t._options.majorTick.length),i.max=o(i.max,n.radius+t._outer*t._options.majorTick.length)),t._minorTicksEnabled&&(i.min=c(i.min,n.radius-t._inner*t._options.minorTick.length),i.max=o(i.max,n.radius+t._outer*t._options.minorTick.length)),t._labelsEnabled&&(t._options.label.indentFromTick>0?(i.horizontalOffset=r(t._options.label.indentFromTick)+t._textWidth,i.verticalOffset=r(t._options.label.indentFromTick)+t._textHeight):(i.horizontalOffset=i.verticalOffset=0,i.min-=-r(t._options.label.indentFromTick)+o(t._textWidth,t._textHeight)),i.inverseHorizontalOffset=t._textWidth/2,i.inverseVerticalOffset=t._textHeight/2),i}}),e.gauges.__internals.LinearScale=e.gauges.__internals.BaseScale.inherit({_getGridSpacingFactor:function(){return{majorTicks:25,minorTicks:5}},_getTranslateFunction:function(){var t=this._translator;return function(n){return t.translate(n)}},_overlappingBehaviorType:"linear",_getScreenDelta:function(){return s(this._translator.getCodomainEnd()-this._translator.getCodomainStart())},_setupOrientation:function(){var n=this;if(n.vertical=n._options.vertical,n._inner=n._outer=0,n.vertical)switch(n._options.horizontalOrientation){case"left":n._inner=1;break;case"center":n._inner=n._outer=.5;break;default:n._outer=1}else switch(n._options.verticalOrientation){case"top":n._inner=1;break;case"middle":n._inner=n._outer=.5;break;default:n._outer=1}},_getTickPoints:function(n,t,i){var r=this,u,f,e,o;return r.vertical?(u=i.x-n*r._inner,f=i.x+n*r._outer,e=-t/2,o=+t/2):(u=-t/2,f=+t/2,e=i.y-n*r._inner,o=i.y+n*r._outer),[u,e,f,e,f,o,u,o]},_moveTick:function(n,t){var r=0,u=0;this.vertical?u=t.position:r=t.position,n.move(r,u)},_getAxisLabelPosition:function(n,t,i){var r=n*(t>=0?this._outer:-this._inner)+t;return r+=this.vertical?i.x:i.y+(t>=0?1:-1)*(this._textVerticalOffset||0)},_getLabelAlign:function(n){return this.vertical?n>0?"left":"right":"center"},_applyOverlappingOptions:function(n){n.overlappingBehaviorType="linear"},_getLabelOptions:function(n,t,i,r){var u,f;return this.vertical?(u=t,f=r.position):(u=r.position,f=t),{x:u,y:f}},measure:function(n){var t=this,u=n[t.vertical?"x":"y"],i={min:u,max:u};return t._majorTicksEnabled&&(i.min=c(i.min,u-t._inner*t._options.majorTick.length),i.max=o(i.max,u+t._outer*t._options.majorTick.length)),t._minorTicksEnabled&&(i.min=c(i.min,u-t._inner*t._options.minorTick.length),i.max=o(i.max,u+t._outer*t._options.minorTick.length)),t._labelsEnabled&&(t._options.label.indentFromTick>0?i.max+=+r(t._options.label.indentFromTick)+t[t.vertical?"_textWidth":"_textHeight"]:i.min-=-r(t._options.label.indentFromTick)+t[t.vertical?"_textWidth":"_textHeight"],i.indent=t[t.vertical?"_textHeight":"_textWidth"]/2),i}})}(DevExpress,jQuery),function(n,t,i){var r=isFinite,u=Number,f=t.extend;n.viz.gauges.__internals.BaseIndicator=n.Class.inherit({setup:function(n){var t=this;return t._renderer=n.renderer,t._translator=n.translator,t._owner=n.owner,t._tracker=n.tracker,t._className=n.className,t._options={},t._rootElement=t._createRoot(),t._trackerElement=t._createTracker(),t},dispose:function(){var n=this;return n._renderer=n._owner=n._translator=n._tracker=n._options=n._rootElement=n._trackerElement=null,n},_setupAnimation:function(){var n=this;n._options.animation&&(n._animation={step:function(t){n._actualValue=n._animation.start+n._animation.delta*t,n._actualPosition=n._translator.translate(n._actualValue),n._move()},duration:n._options.animation.duration>0?u(n._options.animation.duration):0,easing:n._options.animation.easing})},_runAnimation:function(n){var i=this,t=i._animation;t.start=i._actualValue,t.delta=n-i._actualValue,i._rootElement.animate({_:0},{step:t.step,duration:t.duration,easing:t.easing})},_createRoot:function(){return this._renderer.g().attr({"class":this._className})},_createTracker:function(){return this._renderer.path([],"area")},_getTrackerSettings:t.noop,clean:function(){var n=this;return n._animation&&n._rootElement.stopAnimation(),n._rootElement.remove(),n._rootElement.clear(),n._clear(),n._tracker.detach(n._trackerElement),n._options=n.enabled=n._animation=null,n},render:function(n){var t=this;return t.type=n.type,t._options=n,t._actualValue=t._currentValue=t._translator.adjust(t._options.currentValue),t.enabled=t._isEnabled(),t.enabled&&(t._setupAnimation(),t._rootElement.attr({fill:t._options.color}).append(t._owner),t._tracker.attach(t._trackerElement,t,t._trackerInfo)),t},resize:function(n){var t=this;return t._rootElement.clear(),t._clear(),t.visible=t._isVisible(n),t.visible&&(f(t._options,n),t._actualPosition=t._translator.translate(t._actualValue),t._render(),t._trackerElement.attr(t._getTrackerSettings()),t._move()),t},value:function(n,t){var u=this,f;return n!==i?(f=u._translator.adjust(n),u._currentValue!==f&&r(f)&&(u._currentValue=f,u.visible&&(u._animation&&!t?u._runAnimation(f):(u._actualValue=f,u._actualPosition=u._translator.translate(f),u._move()))),u):u._currentValue},_isEnabled:null,_isVisible:null,_render:null,_clear:null,_move:null})}(DevExpress,jQuery),function(n){var i=n.viz,r=i.core,u=r.TextCloud,f=i.gauges.__internals.formatValue,e=i.gauges.__internals.getSampleText;i.gauges.__internals.BaseTextCloudMarker=i.gauges.__internals.BaseIndicator.inherit({_move:function(){var n=this,i,t=new u,r=n._getTextCloudOptions();n._text.attr({text:f(n._actualValue,n._options.text)}),i=n._text.getBBox(),t.setup({x:r.x,y:r.y,textWidth:i.width,textHeight:i.height,horMargin:n._options.horizontalOffset,verMargin:n._options.verticalOffset,tailLength:n._options.arrowLength,type:r.type}),n._text.attr({x:t.cx(),y:t.cy()+n._textVerticalOffset}),n._cloud.attr({points:t.points()}).sharp(),n._trackerElement&&n._trackerElement.attr({points:t.points()})},_measureText:function(){var n=this,i,u,t;n._textVerticalOffset||(i=n._createRoot().append(n._owner),u=n._renderer.text(e(n._translator,n._options.text),0,0).attr({align:"center"}).css(r.utils.patchFontOptions(n._options.text.font)).append(i),t=u.getBBox(),i.remove(),n._textVerticalOffset=-t.y-t.height/2,n._textWidth=t.width,n._textHeight=t.height,n._textFullWidth=n._textWidth+2*n._options.horizontalOffset,n._textFullHeight=n._textHeight+2*n._options.verticalOffset)},_render:function(){var n=this;n._measureText(),n._cloud=n._cloud||n._renderer.path([],"area").append(n._rootElement),n._text=n._text||n._renderer.text().append(n._rootElement),n._text.attr({align:"center"}).css(r.utils.patchFontOptions(n._options.text.font))},_clear:function(){delete this._cloud,delete this._text},getTooltipParameters:function(){var n=this._getTextCloudOptions();return{x:n.x,y:n.y,value:this._currentValue,color:this._options.color}}})}(DevExpress),function(n,t){var r=n.viz,u=r.core,f=t.extend,e=r.gauges.__internals.formatValue,o=r.gauges.__internals.getSampleText;r.gauges.__internals.BaseRangeBar=r.gauges.__internals.BaseIndicator.inherit({_measureText:function(){var n=this,i,r,t;n._hasText=n._isTextVisible(),n._hasText&&!n._textVerticalOffset&&(i=n._createRoot().append(n._owner),r=n._renderer.text(o(n._translator,n._options.text),0,0).attr({"class":"dxg-text",align:"center"}).css(u.utils.patchFontOptions(n._options.text.font)).append(i),t=r.getBBox(),i.remove(),n._textVerticalOffset=-t.y-t.height/2,n._textWidth=t.width,n._textHeight=t.height)},_move:function(){var n=this;n._updateBarItemsPositions(),n._hasText&&(n._text.attr({text:e(n._actualValue,n._options.text)}),n._updateTextPosition(),n._updateLinePosition())},_updateBarItems:function(){var n=this,u=n._options,i,r,t=n._translator;n._setBarSides(),n._startPosition=t.translate(t.getDomainStart()),n._endPosition=t.translate(t.getDomainEnd()),n._basePosition=t.translate(u.baseValue),n._space=n._getSpace(),i=u.backgroundColor||"none",i!=="none"&&n._space>0?r=u.containerBackgroundColor||"none":(n._space=0,r="none"),n._backItem1.attr({fill:i}),n._backItem2.attr({fill:i}),n._spaceItem1.attr({fill:r}),n._spaceItem2.attr({fill:r})},_getSpace:function(){return 0},_updateTextItems:function(){var n=this;n._hasText?(n._line=n._line||n._renderer.path([],"line").attr({"class":"dxg-main-bar","stroke-linecap":"square"}).append(n._rootElement),n._text=n._text||n._renderer.text("",0,0).attr({"class":"dxg-text"}).append(n._rootElement),n._text.attr({align:n._getTextAlign()}).css(n._getFontOptions()),n._setTextItemsSides()):(n._line&&(n._line.remove(),delete n._line),n._text&&(n._text.remove(),delete n._text))},_isTextVisible:function(){return!1},_getTextAlign:function(){return"center"},_getFontOptions:function(){var t=this._options,n=t.text.font;return n&&n.color||(n=f({},n,{color:t.color})),u.utils.patchFontOptions(n)},_updateBarItemsPositions:function(){var n=this,t=n._getPositions();n._backItem1.attr(n._buildItemSettings(t.start,t.back1)),n._backItem2.attr(n._buildItemSettings(t.back2,t.end)),n._spaceItem1.attr(n._buildItemSettings(t.back1,t.main1)),n._spaceItem2.attr(n._buildItemSettings(t.main2,t.back2)),n._mainItem.attr(n._buildItemSettings(t.main1,t.main2)),n._trackerElement&&n._trackerElement.attr(n._buildItemSettings(t.main1,t.main2))},_render:function(){var n=this;n._measureText(),n._backItem1||(n._backItem1=n._createBarItem(),n._backItem1.attr({"class":"dxg-back-bar"})),n._backItem2||(n._backItem2=n._createBarItem(),n._backItem2.attr({"class":"dxg-back-bar"})),n._spaceItem1||(n._spaceItem1=n._createBarItem(),n._spaceItem1.attr({"class":"dxg-space-bar"})),n._spaceItem2||(n._spaceItem2=n._createBarItem(),n._spaceItem2.attr({"class":"dxg-space-bar"})),n._mainItem||(n._mainItem=n._createBarItem(),n._mainItem.attr({"class":"dxg-main-bar"})),n._updateBarItems(),n._updateTextItems()},_clear:function(){var n=this;delete n._backItem1,delete n._backItem2,delete n._spaceItem1,delete n._spaceItem2,delete n._mainItem,delete n._hasText,delete n._line,delete n._text},getTooltipParameters:function(){var n=this._getTooltipPosition();return{x:n.x,y:n.y,value:this._currentValue,color:this._options.color,offset:0}}})}(DevExpress,jQuery),function(n){var r=n.viz.gauges.__internals.circularNeedles,i=Number;r.SimpleIndicator=n.viz.gauges.__internals.BaseIndicator.inherit({_move:function(){var t=this,i=t._options,r=n.utils.convertAngleToRendererSpace(t._actualPosition);t._rootElement.rotate(r,i.x,i.y),t._trackerElement&&t._trackerElement.rotate(r,i.x,i.y)},_isEnabled:function(){return this._options.width>0},_isVisible:function(n){return n.radius-i(this._options.indentFromCenter)>0},_getTrackerSettings:function(){var n=this._options,u=n.x,f=n.y-(n.radius+i(n.indentFromCenter))/2,t=n.width/2,r=(n.radius-i(n.indentFromCenter))/2;return t>10||(t=10),r>10||(r=10),{points:[u-t,f-r,u-t,f+r,u+t,f+r,u+t,f-r]}},_renderSpindle:function(){var n=this,t=n._options,r;t.spindleSize>0&&(r=i(t.spindleGapSize)||0,r>0&&(r=r<=t.spindleSize?r:i(t.spindleSize)),n._spindleOuter=n._spindleOuter||n._renderer.circle().append(n._rootElement),n._spindleInner=n._spindleInner||n._renderer.circle().append(n._rootElement),n._spindleOuter.attr({"class":"dxg-spindle-border",cx:t.x,cy:t.y,r:t.spindleSize/2}),n._spindleInner.attr({"class":"dxg-spindle-hole",cx:t.x,cy:t.y,r:r/2,fill:t.containerBackgroundColor}))},_render:function(){var n=this;n._renderPointer(),n._renderSpindle()},_clearSpindle:function(){delete this._spindleOuter,delete this._spindleInner},_clearPointer:function(){delete this._element},_clear:function(){this._clearPointer(),this._clearSpindle()},measure:function(n){var t={max:n.radius};return this._options.indentFromCenter<0&&(t.inverseHorizontalOffset=t.inverseVerticalOffset=-i(this._options.indentFromCenter)),t},getTooltipParameters:function(){var t=this._options,r=n.utils.getCosAndSin(this._actualPosition),u=(t.radius+i(t.indentFromCenter))/2;return{x:t.x+r.cos*u,y:t.y-r.sin*u,value:this._currentValue,color:t.color,offset:t.width/2}}}),r.RectangleNeedle=r.SimpleIndicator.inherit({_renderPointer:function(){var t=this,n=t._options,u=n.y-n.radius,f=n.y-i(n.indentFromCenter),r=n.x-n.width/2,e=r+i(n.width);t._element=t._element||t._renderer.path([],"area").append(t._rootElement),t._element.attr({points:[r,f,r,u,e,u,e,f]})}}),r.TriangleNeedle=r.SimpleIndicator.inherit({_renderPointer:function(){var t=this,n=t._options,u=n.y-n.radius,r=n.y-i(n.indentFromCenter),f=n.x-n.width/2,e=n.x+n.width/2;t._element=t._element||t._renderer.path([],"area").append(t._rootElement),t._element.attr({points:[f,r,n.x,u,e,r]})}}),r.TwoColorRectangleNeedle=r.SimpleIndicator.inherit({_renderPointer:function(){var n=this,t=n._options,f=t.x-t.width/2,e=t.x+t.width/2,o=t.y-t.radius,s=t.y-i(t.indentFromCenter),h=i(t.secondFraction)||0,r,u;h>=1?r=u=s:h<=0?r=u=r:(u=o+(s-o)*h,r=u+t.space),n._firstElement=n._firstElement||n._renderer.path([],"area").append(n._rootElement),n._spaceElement=n._spaceElement||n._renderer.path([],"area").append(n._rootElement),n._secondElement=n._secondElement||n._renderer.path([],"area").append(n._rootElement),n._firstElement.attr({points:[f,s,f,r,e,r,e,s]}),n._spaceElement.attr({points:[f,r,f,u,e,u,e,r],"class":"dxg-hole",fill:t.containerBackgroundColor}),n._secondElement.attr({points:[f,u,f,o,e,o,e,u],"class":"dxg-part",fill:t.secondColor})},_clearPointer:function(){delete this._firstElement,delete this._secondElement,delete this._spaceElement}})}(DevExpress),function(n){var i=n.viz.gauges.__internals.linearNeedles;i.SimpleIndicator=n.viz.gauges.__internals.BaseIndicator.inherit({_move:function(){var n=this,t=n._actualPosition-n._zeroPosition;n._rootElement.move(n.vertical?0:t,n.vertical?t:0),n._trackerElement&&n._trackerElement.move(n.vertical?0:t,n.vertical?t:0)},_isEnabled:function(){return this.vertical=this._options.vertical,this._options.length>0&&this._options.width>0},_isVisible:function(){return!0},_getTrackerSettings:function(){var n=this._options,r,u,f,e,t=n.width/2,i=n.length/2,o=this._zeroPosition;return t>10||(t=10),i>10||(i=10),this.vertical?(r=n.x-i,u=n.x+i,f=o+t,e=o-t):(r=o-t,u=o+t,f=n.y+i,e=n.y-i),{points:[r,f,r,e,u,e,u,f]}},_render:function(){var n=this;n._zeroPosition=n._translator.getCodomainStart()},_clear:function(){delete this._element},measure:function(n){var t=this.vertical?n.x:n.y;return{min:t-this._options.length/2,max:t+this._options.length/2}},getTooltipParameters:function(){var n=this,t=n._options,r=n._actualPosition,i={x:r,y:r,value:n._currentValue,color:t.color,offset:t.width/2};return n.vertical?i.x=t.x:i.y=t.y,i}}),i.RectangleNeedle=i.SimpleIndicator.inherit({_render:function(){var t=this,n=t._options,i,r,u,f,e;t.callBase(),i=t._zeroPosition,t.vertical?(r=n.x-n.length/2,u=n.x+n.length/2,f=i+n.width/2,e=i-n.width/2):(r=i-n.width/2,u=i+n.width/2,f=n.y+n.length/2,e=n.y-n.length/2),t._element=t._element||t._renderer.path([],"area").append(t._rootElement),t._element.attr({points:[r,f,r,e,u,e,u,f]})}}),i.RhombusNeedle=i.SimpleIndicator.inherit({_render:function(){var n=this,t=n._options,i,r,u,f;n.callBase(),n.vertical?(i=t.x,r=n._zeroPosition,u=t.length/2||0,f=t.width/2||0):(i=n._zeroPosition,r=t.y,u=t.width/2||0,f=t.length/2||0),n._element=n._element||n._renderer.path([],"area").append(n._rootElement),n._element.attr({points:[i-u,r,i,r-f,i+u,r,i,r+f]})}}),i.CircleNeedle=i.SimpleIndicator.inherit({_render:function(){var n=this,t=n._options,i,r,u;n.callBase(),n.vertical?(i=t.x,r=n._zeroPosition):(i=n._zeroPosition,r=t.y),u=t.length/2||0,n._element=n._element||n._renderer.circle().append(n._rootElement),n._element.attr({cx:i,cy:r,r:u})}})}(DevExpress),function(n){var r=n.viz.gauges.__internals.circularMarkers,i=Number;r.TriangleMarker=n.viz.gauges.__internals.circularNeedles.SimpleIndicator.inherit({_isEnabled:function(){return this._options.length>0&&this._options.width>0},_isVisible:function(n){return n.radius>0},_render:function(){var t=this,n=t._options,u=n.x,f=n.y-n.radius,e=n.width/2||0,o=f-i(n.length),r;t._element=t._element||t._renderer.path([],"area").append(t._rootElement),r={points:[u,f,u-e,o,u+e,o],stroke:"none","stroke-width":0,"stroke-linecap":"square"},n.space>0&&(r["stroke-width"]=Math.min(n.space,n.width/4)||0,r.stroke=r["stroke-width"]>0?n.containerBackgroundColor||"none":"none"),t._element.attr(r).sharp()},_clear:function(){delete this._element},_getTrackerSettings:function(){var n=this._options,r=n.x,u=n.y-n.radius-n.length/2,t=n.width/2,i=n.length/2;return t>10||(t=10),i>10||(i=10),{points:[r-t,u-i,r-t,u+i,r+t,u+i,r+t,u-i]}},measure:function(n){return{min:n.radius,max:n.radius+i(this._options.length)}},getTooltipParameters:function(){var t=this._options,r=n.utils.getCosAndSin(this._actualPosition),u=t.radius+t.length/2,i=this.callBase();return i.x=t.x+r.cos*u,i.y=t.y-r.sin*u,i.offset=t.length/2,i}}),r.TextCloudMarker=n.viz.gauges.__internals.BaseTextCloudMarker.inherit({_isEnabled:function(){return!0},_isVisible:function(n){return n.radius>0},_getTextCloudOptions:function(){var t=this,r=n.utils.getCosAndSin(t._actualPosition),i=n.utils.normalizeAngle(t._actualPosition);return{x:t._options.x+r.cos*t._options.radius,y:t._options.y-r.sin*t._options.radius,type:i>270?"left-top":i>180?"top-right":i>90?"right-bottom":"bottom-left"}},measure:function(n){var t=this,f=i(t._options.arrowLength)||0,r,u;return t._measureText(),r=t._textFullHeight+f,u=t._textFullWidth+f,{min:n.radius,max:n.radius,horizontalOffset:u,verticalOffset:r,inverseHorizontalOffset:u,inverseVerticalOffset:r}}})}(DevExpress),function(n){var u=n.viz.gauges.__internals.linearMarkers,i=Number,r=String;u.TriangleMarker=n.viz.gauges.__internals.linearNeedles.SimpleIndicator.inherit({_isEnabled:function(){var n=this;return n.vertical=n._options.vertical,n._inverted=n.vertical?r(n._options.horizontalOrientation).toLowerCase()==="right":r(n._options.verticalOrientation).toLowerCase()==="bottom",n._options.length>0&&n._options.width>0},_isVisible:function(){return!0},_render:function(){var t=this,n=t._options,r,e,u,o,f={stroke:"none","stroke-width":0,"stroke-linecap":"square"};t.callBase(),t.vertical?(r=n.x,u=t._zeroPosition,e=r+i(t._inverted?n.length:-n.length),f.points=[r,u,e,u-n.width/2,e,u+n.width/2]):(u=n.y,r=t._zeroPosition,o=u+i(t._inverted?n.length:-n.length),f.points=[r,u,r-n.width/2,o,r+n.width/2,o]),n.space>0&&(f["stroke-width"]=Math.min(n.space,n.width/4)||0,f.stroke=f["stroke-width"]>0?n.containerBackgroundColor||"none":"none"),t._element=t._element||t._renderer.path([],"area").append(t._rootElement),t._element.attr(f).sharp()},_getTrackerSettings:function(){var n=this,s=n._options,f=s.width/2,e=i(s.length),t,r,u,o,h;return f>10||(f=10),e>20||(e=20),n.vertical?(t=r=s.x,r=t+(n._inverted?e:-e),u=n._zeroPosition+f,o=n._zeroPosition-f,h=[t,u,r,u,r,o,t,o]):(u=s.y,o=u+(n._inverted?e:-e),t=n._zeroPosition-f,r=n._zeroPosition+f,h=[t,u,t,o,r,o,r,u]),{points:h}},measure:function(n){var u=this,f=i(u._options.length),t,r;return u.vertical?(t=r=n.x,u._inverted?r=t+f:t=r-f):(t=r=n.y,u._inverted?r=t+f:t=r-f),{min:t,max:r,indent:u._options.width/2}},getTooltipParameters:function(){var n=this,i=n._options,r=(n._inverted?i.length:-i.length)/2,t=n.callBase();return n.vertical?t.x+=r:t.y+=r,t.offset=i.length/2,t}}),u.TextCloudMarker=n.viz.gauges.__internals.BaseTextCloudMarker.inherit({_isEnabled:function(){var n=this;return n.vertical=n._options.vertical,n._inverted=n.vertical?r(n._options.horizontalOrientation).toLowerCase()==="right":r(n._options.verticalOrientation).toLowerCase()==="bottom",!0},_isVisible:function(){return!0},_getTextCloudOptions:function(){var n=this,i=n._actualPosition,r=n._actualPosition,t;return n.vertical?(i=n._options.x,t=n._inverted?"top-left":"top-right"):(r=n._options.y,t=n._inverted?"right-top":"right-bottom"),{x:i,y:r,type:t}},measure:function(n){var t=this,r,u,f=i(t._options.arrowLength)||0,e;return t._measureText(),t.vertical?(e=t._textFullHeight,t._inverted?(r=n.x,u=n.x+f+t._textFullWidth):(r=n.x-f-t._textFullWidth,u=n.x)):(e=t._textFullWidth,t._inverted?(r=n.y,u=n.y+f+t._textFullHeight):(r=n.y-f-t._textFullHeight,u=n.y)),{min:r,max:u,indent:e}}})}(DevExpress),function(n){var i=Number,r=n.utils.getCosAndSin,u=n.utils.convertAngleToRendererSpace,f=Math.max,e=Math.min;n.viz.gauges.__internals.CircularRangeBar=n.viz.gauges.__internals.BaseRangeBar.inherit({_isEnabled:function(){return this._options.size>0},_isVisible:function(n){return n.radius-i(this._options.size)>0},_createBarItem:function(){return this._renderer.arc().attr({"stroke-linejoin":"round"}).append(this._rootElement)},_createTracker:function(){return this._renderer.arc().attr({"stroke-linejoin":"round"})},_setBarSides:function(){var n=this;n._maxSide=n._options.radius,n._minSide=n._maxSide-i(n._options.size)},_getSpace:function(){var n=this._options;return n.space>0?n.space*180/n.radius/Math.PI:0},_isTextVisible:function(){var n=this._options.text||{};return n.indent>0},_setTextItemsSides:function(){var n=this,t=n._options,r=i(t.text.indent);n._lineFrom=t.y-t.radius,n._lineTo=n._lineFrom-r,n._textRadius=t.radius+r},_getPositions:function(){var n=this,r=n._basePosition,u=n._actualPosition,t,i;return r>=u?(t=r,i=u):(t=u,i=r),{start:n._startPosition,end:n._endPosition,main1:t,main2:i,back1:e(t+n._space,n._startPosition),back2:f(i-n._space,n._endPosition)}},_buildItemSettings:function(n,t){var i=this;return{x:i._options.x,y:i._options.y,innerRadius:i._minSide,outerRadius:i._maxSide,startAngle:t,endAngle:n}},_updateTextPosition:function(){var n=this,t=r(n._actualPosition),i=n._options.x+n._textRadius*t.cos,u=n._options.y-n._textRadius*t.sin;i+=t.cos*n._textWidth*.6,u-=t.sin*n._textHeight*.6,n._text.attr({x:i,y:u+n._textVerticalOffset})},_updateLinePosition:function(){var n=this,t=n._options.x,i,r;n._basePosition>n._actualPosition?(i=t-2,r=t):n._basePosition<n._actualPosition?(i=t,r=t+2):(i=t-1,r=t+1),n._line.attr({points:[i,n._lineFrom,i,n._lineTo,r,n._lineTo,r,n._lineFrom]}).rotate(u(n._actualPosition),t,n._options.y).sharp()},_getTooltipPosition:function(){var n=this,t=r((n._basePosition+n._actualPosition)/2),i=(n._minSide+n._maxSide)/2;return{x:n._options.x+t.cos*i,y:n._options.y-t.sin*i}},measure:function(n){var t=this,r={min:n.radius-i(t._options.size),max:n.radius};return t._measureText(),t._hasText&&(r.max+=i(t._options.text.indent),r.horizontalOffset=t._textWidth,r.verticalOffset=t._textHeight),r}})}(DevExpress),function(n){var i=Number,r=String;n.viz.gauges.__internals.LinearRangeBar=n.viz.gauges.__internals.BaseRangeBar.inherit({_isEnabled:function(){var n=this;return n.vertical=n._options.vertical,n._inverted=n.vertical?r(n._options.horizontalOrientation).toLowerCase()==="right":r(n._options.verticalOrientation).toLowerCase()==="bottom",n._options.size>0},_isVisible:function(){return!0},_createBarItem:function(){return this._renderer.path([],"area").append(this._rootElement)},_createTracker:function(){return this._renderer.path([],"area")},_setBarSides:function(){var t=this,n=t._options,f=i(n.size),r,u;t.vertical?t._inverted?(r=n.x,u=n.x+f):(r=n.x-f,u=n.x):t._inverted?(r=n.y,u=n.y+f):(r=n.y-f,u=n.y),t._minSide=r,t._maxSide=u,t._minBound=r,t._maxBound=u},_getSpace:function(){var n=this._options;return n.space>0?i(n.space):0},_isTextVisible:function(){var n=this._options.text||{};return n.indent>0||n.indent<0},_getTextAlign:function(){return this.vertical?this._options.text.indent>0?"left":"right":"center"},_setTextItemsSides:function(){var n=this,t=i(n._options.text.indent);t>0?(n._lineStart=n._maxSide,n._lineEnd=n._maxSide+t,n._textPosition=n._lineEnd+(n.vertical?2:n._textHeight/2),n._maxBound=n._textPosition+(n.vertical?n._textWidth:n._textHeight/2)):t<0&&(n._lineStart=n._minSide,n._lineEnd=n._minSide+t,n._textPosition=n._lineEnd-(n.vertical?2:n._textHeight/2),n._minBound=n._textPosition-(n.vertical?n._textWidth:n._textHeight/2))},_getPositions:function(){var u=this,s=u._startPosition,h=u._endPosition,f=u._space,i=u._basePosition,r=u._actualPosition,n,t,e,o;return s<h?(i<r?(n=i,t=r):(n=r,t=i),e=n-f,o=t+f):(i>r?(n=i,t=r):(n=r,t=i),e=n+f,o=t-f),{start:s,end:h,main1:n,main2:t,back1:e,back2:o}},_buildItemSettings:function(n,t){var u=this,i=u._minSide,r=u._maxSide,f=u.vertical?[i,n,i,t,r,t,r,n]:[n,i,n,r,t,r,t,i];return{points:f}},_updateTextPosition:function(){var n=this;n._text.attr(n.vertical?{x:n._textPosition,y:n._actualPosition+n._textVerticalOffset}:{x:n._actualPosition,y:n._textPosition+n._textVerticalOffset})},_updateLinePosition:function(){var n=this,t=n._actualPosition,i,r,u;n.vertical?(n._basePosition>=t?(i=t,r=t+2):(i=t-2,r=t),u=[n._lineStart,i,n._lineStart,r,n._lineEnd,r,n._lineEnd,i]):(n._basePosition<=t?(i=t-2,r=t):(i=t,r=t+2),u=[i,n._lineStart,i,n._lineEnd,r,n._lineEnd,r,n._lineStart]),n._line.attr({points:u}).sharp()},_getTooltipPosition:function(){var n=this,t=(n._minSide+n._maxSide)/2,i=(n._basePosition+n._actualPosition)/2;return n.vertical?{x:t,y:i}:{x:i,y:t}},measure:function(n){var t=this,e=i(t._options.size),f=i(t._options.text.indent),r,u,o;return t._measureText(),t.vertical?(r=u=n.x,t._inverted?u=u+e:r=r-e,t._hasText&&(o=t._textHeight/2,f>0&&(u+=f+t._textWidth),f<0&&(r+=f-t._textWidth))):(r=u=n.y,t._inverted?u=u+e:r=r-e,t._hasText&&(o=t._textWidth/2,f>0&&(u+=f+t._textHeight),f<0&&(r+=f-t._textHeight))),{min:r,max:u,indent:o}}})}(DevExpress),function(n,t,i){function v(n,t,i,r){var u;return i>n&&r<t?u=[{start:n,end:i},{start:r,end:t}]:i>=t||r<=n?u=[{start:n,end:t}]:i<=n&&r>=t?u=[]:i>n?u=[{start:n,end:i}]:r<t&&(u=[{start:r,end:t}]),u}function y(n,t,i,r){var u;return i<n&&r>t?u=[{start:n,end:i},{start:r,end:t}]:i<=t||r>=n?u=[{start:n,end:t}]:i>=n&&r<=t?u=[]:i<n?u=[{start:n,end:i}]:r>t&&(u=[{start:r,end:t}]),u}function p(n,t,i){return t-n>=i}function w(n,t,i){return n-t>=i}var r=Number,f=String,e=Math.max,c=Math.abs,o=n.utils.isString,s=n.utils.isArray,h=isFinite,u=t.each,l=t.map,a=n.viz.core.Palette;n.viz.gauges.__internals.BaseRangeContainer=n.Class.inherit({ctor:function(n){var t=this;t._renderer=n.renderer,t._container=n.container,t._translator=n.translator,t._root=t._renderer.g().attr({"class":"dxg-range-container"})},dispose:function(){var n=this;n._renderer=n._container=n._translator=n._root=null},clean:function(){return this._root.remove().clear(),this._options=this.enabled=null,this},_getRanges:function(){var it=this,n=it._options,k=it._translator,d=k.getDomain()[0],rt=k.getDomain()[1],e=rt-d,et=e>=0?p:w,ut=e>=0?v:y,nt=[],t=[],g=[{start:d,end:rt}],ot=c(e)/1e4,st=new a(n.palette,{type:"indicatingSet",theme:n.themeName}),ht=o(n.backgroundColor)?n.backgroundColor:"none",f=n.width||{},b=r(f>0?f:f.start),tt=r(f>0?f:f.end),ft=tt-b;return n.ranges!==i&&!s(n.ranges)?null:b>=0&&tt>=0&&b+tt>0?(nt=l(s(n.ranges)?n.ranges:[],function(n,t){n=n||{};var i=k.adjust(n.startValue),r=k.adjust(n.endValue);return h(i)&&h(r)&&et(i,r,ot)?{start:i,end:r,color:n.color,classIndex:t}:null}),u(nt,function(n,t){var i=st.getNextColor();t.color=o(t.color)&&t.color||i||"none",t.className="dxg-range dxg-range-"+t.classIndex,delete t.classIndex}),u(nt,function(n,i){for(var r,e,u,o=[],h=[],f=0,s=t.length;f<s;++f)u=t[f],e=ut(u.start,u.end,i.start,i.end),(r=e[0])&&(r.color=u.color)&&(r.className=u.className)&&o.push(r),(r=e[1])&&(r.color=u.color)&&(r.className=u.className)&&o.push(r);for(o.push(i),t=o,f=0,s=g.length;f<s;++f)u=g[f],e=ut(u.start,u.end,i.start,i.end),(r=e[0])&&h.push(r),(r=e[1])&&h.push(r);g=h}),u(g,function(n,i){i.color=ht,i.className="dxg-range dxg-background-range",t.push(i)}),u(t,function(n,t){t.startWidth=(t.start-d)/e*ft+b,t.endWidth=(t.end-d)/e*ft+b}),t):null},render:function(n){var t=this;return t._options=n,t._processOptions(),t._ranges=t._getRanges(),t._ranges&&(t.enabled=!0,t._root.append(t._container)),t},resize:function(n){var t=this;return t._root.clear(),t._isVisible(n)&&u(t._ranges,function(i,r){t._createRange(r,n).attr({fill:r.color,"class":r.className}).append(t._root)}),t},_processOptions:null,_isVisible:null,_createRange:null,getColorForValue:function(n){var t=null;return u(this._ranges,function(i,r){if(r.start<=n&&n<=r.end||r.start>=n&&n>=r.end)return t=r.color,!1}),t}}),n.viz.gauges.__internals.CircularRangeContainer=n.viz.gauges.__internals.BaseRangeContainer.inherit({_processOptions:function(){var n=this;n._inner=n._outer=0;switch(f(n._options.orientation).toLowerCase()){case"inside":n._inner=1;break;case"center":n._inner=n._outer=.5;break;default:n._outer=1}},_isVisible:function(n){var t=this._options.width;return t=r(t)||e(r(t.start),r(t.end)),n.radius-this._inner*t>0},_createRange:function(n,t){var i=this,r=(n.startWidth+n.endWidth)/2;return i._renderer.arc(t.x,t.y,t.radius-i._inner*r,t.radius+i._outer*r,i._translator.translate(n.end),i._translator.translate(n.start)).attr({"stroke-linejoin":"round"})},measure:function(n){var t=this._options.width;return t=r(t)||e(r(t.start),r(t.end)),{min:n.radius-this._inner*t,max:n.radius+this._outer*t}}}),n.viz.gauges.__internals.LinearRangeContainer=n.viz.gauges.__internals.BaseRangeContainer.inherit({_processOptions:function(){var n=this;if(n.vertical=n._options.vertical,n._inner=n._outer=0,n.vertical)switch(f(n._options.horizontalOrientation).toLowerCase()){case"left":n._inner=1;break;case"center":n._inner=n._outer=.5;break;default:n._outer=1}else switch(f(n._options.verticalOrientation).toLowerCase()){case"top":n._inner=1;break;case"middle":n._inner=n._outer=.5;break;default:n._outer=1}},_isVisible:function(){return!0},_createRange:function(n,t){var i=this,r=i._inner,u=i._outer,f=i._translator.translate(n.start),e=i._translator.translate(n.end),l,o=t.x,s=t.y,h=n.startWidth,c=n.endWidth;return l=i.vertical?[o-h*r,f,o-c*r,e,o+c*u,e,o+h*u,f]:[f,s+h*u,f,s-h*r,e,s-c*r,e,s+c*u],i._renderer.path(l,"area")},measure:function(n){var i={},t;return i.min=i.max=n[this.vertical?"x":"y"],t=this._options.width,t=r(t)||e(r(t.start),r(t.end)),i.min-=this._inner*t,i.max+=this._outer*t,i}})}(DevExpress,jQuery),function(n,t){var r=n.viz,u=r.core,f=n.utils.isString,e=Math.max,o=t.extend;r.gauges.__internals.Title=n.Class.inherit({ctor:function(n){this._renderer=n.renderer,this._container=n.container},dispose:function(){return this._renderer=this._container=null,this},clean:function(){var n=this;return n._root&&(n._root.remove().clear(),n._root=n._layout=null),n},render:function(n,t){var i=this,v=f(n.text)&&n.text.length>0,y=f(t.text)&&t.text.length>0,r,s,h,c,l=0,a=i._renderer;return!v&&!y?i:(i._root=a.g().attr({"class":"dxg-title"}).append(i._container),r=v?a.text(n.text,0,0).attr({align:"center"}).css(u.utils.patchFontOptions(n.font)).append(i._root):null,s=y?a.text(t.text,0,0).attr({align:"center"}).css(u.utils.patchFontOptions(t.font)).append(i._root):null,h=r?r.getBBox():{},c=s?s.getBBox():{},r&&(l+=-h.y,r.attr({x:0,y:l})),s&&(l+=-c.y,s.attr({x:0,y:l})),i._layout=o({position:n.position,width:e(h.width||0,c.width||0),height:r&&s?-h.y+c.height:h.height||c.height},n.layout),i)},getLayoutOptions:function(){return this._layout},locate:function(n,t){return this._root.attr({translateX:n+this._layout.width/2,translateY:t}),this}})}(DevExpress,jQuery),function(n,t){var r=t.extend;n.viz.gauges.__internals.Tooltip=n.viz.core.Tooltip.inherit({ctor:function(n){var t=this;t._container=n.container,t._tracker=n.tracker,t._root=n.renderer.g().attr({"class":"dxg-tooltip"}),t.callBase(null,t._root,n.renderer),t._setTrackerCallbacks()},dispose:function(){var n=this;return n._container=n._tracker=n._root=null,n._shadow?n.callBase.apply(n,arguments):n},_setTrackerCallbacks:function(){function t(t,i){var u=t.getTooltipParameters(),f=r({value:u.value,valueText:n.formatValue(u.value),color:u.color},i);return n.prepare(f,{x:u.x,y:u.y,offset:u.offset})}function i(){return n.show()}function u(){return n.hide()}var n=this;n._tracker.setCallbacks({"tooltip-prepare":t,"tooltip-show":i,"tooltip-hide":u})},clean:function(){return this._root.remove(),this},render:function(n,t){var i=this;return n.canvasWidth=t.width,n.canvasHeight=t.height,n.text={"class":"dxg-text"},i.update(n),i._tracker.setTooltipState(i.enabled()),i.enabled()&&i._root.append(i._container),i}})}(DevExpress,jQuery),function(n,t){function o(n){if(n.position){var t=r(n.position).toLowerCase().split("-");n.verticalAlignment=t[0],n.horizontalAlignment=t[1]}}var f=Number,r=String,s=Math.min,u=Math.max,e=t.each;n.viz.gauges.__internals.LayoutManager=n.Class.inherit({setRect:function(n){return this._currentRect=n.clone(),this},getRect:function(){return this._currentRect.clone()},beginLayout:function(n){return this._rootRect=n.clone(),this._currentRect=n.clone(),this._cache=[],this},applyLayout:function(n){var t=n.getLayoutOptions(),i,e;if(!t)return this;i=this._currentRect,e=f(t.overlay)||0,o(t);switch(r(t.verticalAlignment).toLowerCase()){case"bottom":i.bottom-=u(t.height-e,0);break;default:i.top+=u(t.height-e,0)}return this._cache.push({target:n,options:t}),this},endLayout:function(){var n=this,i=n._rootRect,t=n._currentRect;return e(n._cache,function(n,e){var o=e.options,s,c,h=f(o.overlay)||0;switch(r(o.verticalAlignment).toLowerCase()){case"bottom":c=t.bottom-h,t.bottom+=u(o.height-h,0);break;default:c=t.top-o.height+h,t.top-=u(o.height-h,0)}switch(r(o.horizontalAlignment).toLowerCase()){case"left":s=i.left;break;case"right":s=i.right-o.width;break;default:s=i.horizontalMiddle()-o.width/2}e.target.locate(s,c)}),n._cache=null,n},selectRectByAspectRatio:function(n,t){var i=this._currentRect.clone(),f,r=0,u=0;return t=t||{},n>0&&(i.left+=t.left||0,i.right-=t.right||0,i.top+=t.top||0,i.bottom-=t.bottom||0,i.width()>0&&i.height()>0?(f=i.height()/i.width(),f>1?n<f?r=i.width():u=i.height():n>f?u=i.height():r=i.width(),r>0||(r=u/n),u>0||(u=r*n),r=(i.width()-r)/2,u=(i.height()-u)/2,i.left+=r,i.right-=r,i.top+=u,i.bottom-=u):(i.left=i.right=i.horizontalMiddle(),i.top=i.bottom=i.verticalMiddle())),i},selectRectBySizes:function(n,t){var i=this._currentRect.clone(),r;return t=t||{},n&&(i.left+=t.left||0,i.right-=t.right||0,i.top+=t.top||0,i.bottom-=t.bottom||0,n.width>0&&(r=(i.width()-n.width)/2,r>0&&(i.left+=r,i.right-=r)),n.height>0&&(r=(i.height()-n.height)/2,r>0&&(i.top+=r,i.bottom-=r))),i}})}(DevExpress,jQuery),function(n,t){var r=t.extend;n.viz.gauges.__internals.ThemeManager=n.viz.core.BaseThemeManager.inherit({_themeSection:"gauge",_fontFields:["scale.label.font","valueIndicator.rangebar.text.font","subvalueIndicator.textcloud.text.font","valueIndicators.rangebar.text.font","valueIndicators.textcloud.text.font","title.font","subtitle.font","tooltip.font","indicator.text.font","loadingIndicator.font"],_initializeTheme:function(){var n=this,t;n._subTheme&&(t=r(!0,{},n._theme[n._subTheme],n._theme),r(!0,n._theme,t)),n.callBase.apply(n,arguments)}})}(DevExpress,jQuery),function(n,t,i){function u(n){return e(n)?{text:n}:n||{}}var f=Number,e=n.utils.isString,o=n.utils.getAppropriateFormat,r=t.extend,s=t.each;n.viz.gauges.dxBaseGauge=n.viz.core.BaseWidget.inherit({_init:function(){var n=this;n._themeManager=n._factory.createThemeManager(),n._themeManager.setTheme(n.option("theme")),n.callBase.apply(n,arguments)},_initCore:function(){var n=this;n._root=n._renderer.root,n._translator=n._factory.createTranslator(),n._tracker=n._factory.createTracker({renderer:n._renderer,container:n._root}),n._layoutManager=n._factory.createLayoutManager(),n._tooltip=n._factory.createTooltip({renderer:n._renderer,container:n._root,tracker:n._tracker}),n._title=n._factory.createTitle({renderer:n._renderer,container:n._root}),n._deltaIndicator=n._factory.createDeltaIndicator({renderer:n._renderer,container:n._root}),n._setupDomain()},_getRendererParameters:function(){return{width:1,height:1,pathModified:this.option("pathModified"),rtl:this.option("rtlEnabled"),cssClass:"dxg "+this._rootClass}},_getOption:function(n,t){var f=this._themeManager.theme(n),u=this.option(n);return t?u!==i?u:f:r(!0,{},f,u)},_disposeCore:function(){var n=this;n._themeManager.dispose(),n._tracker.dispose(),n._title.dispose(),n._deltaIndicator&&n._deltaIndicator.dispose(),n._tooltip.dispose(),n._disposeLoadIndicator(),n._root=n._translator=n._themeManager=n._tracker=n._layoutManager=n._title=n._tooltip=null},_refresh:function(){var n=this,t=n.callBase;n._endLoading(function(){t.call(n)})},_clean:function(){this._cleanCore()},_render:function(){var n=this;n._setupCodomain(),n._setupAnimationSettings(),n._setupDefaultFormat(),n._renderCore(),n._drawn()},_cleanCore:function(){var n=this;n._tooltip.clean(),n._title.clean(),n._deltaIndicator&&n._deltaIndicator.clean(),n._tracker.deactivate(),n._cleanContent()},_renderCore:function(){var n=this;if(n._isValidDomain){var t=n._themeManager.theme(),f=r(!0,{},t.title,u(n.option("title"))),e=r(!0,{},t.subtitle,u(n.option("subtitle")));n._title.render(f,e),n._deltaIndicator&&n._deltaIndicator.render(r(!0,{},t.indicator,n.option("indicator"))),n._layoutManager.beginLayout(n._rootRect),s([n._deltaIndicator,n._title],function(t,i){i&&n._layoutManager.applyLayout(i)}),n._mainRect=n._layoutManager.getRect(),n._renderContent(),n._layoutManager.endLayout(),n._tooltip.render(r(!0,{},t.tooltip,n.option("tooltip")),{width:n._width,height:n._height}),n._tracker.activate(),n._updateLoadIndicator(i,n._width,n._height),n._noAnimation=null}},_applySize:function(){var t=this._canvas;this._rootRect=new n.viz.core.Rectangle({left:t.left,top:t.top,right:t.width-t.right,bottom:t.height-t.bottom}),this._width=t.width,this._height=t.height},_resize:function(){var n=this;n._resizing=n._noAnimation=!0,n._cleanCore(),n._renderCore(),n._resizing=null},showLoadingIndicator:function(){this._showLoadIndicator(this._getLoadIndicatorOption(),{width:this._width,height:this._height})},_getLoadIndicatorOption:function(){return r(!0,{},this._themeManager.theme().loadingIndicator,this.option("loadingIndicator"))},_optionChanged:function(n){var t=this;switch(n.name){case"theme":t._themeManager.setTheme(n.value),t._invalidate();break;case"startValue":case"endValue":t._setupDomain(),t._invalidate();break;default:t.callBase(n)}},_setupDomain:function(){var n=this;n._setupDomainCore(),n._isValidDomain=isFinite(1/(n._translator.getDomain()[1]-n._translator.getDomain()[0])),n._isValidDomain||n._incidentOccured("W2301")},_setupAnimationSettings:function(){var t=this,n=t.option("animation");t._animationSettings=null,(n===i||n)&&(n=r({enabled:!0,duration:1e3,easing:"easeOutCubic"},n),n.enabled&&n.duration>0&&(t._animationSettings={duration:f(n.duration),easing:n.easing})),t._containerBackgroundColor=t.option("containerBackgroundColor")||t._themeManager.theme().containerBackgroundColor},_setupDefaultFormat:function(){var n=this._translator.getDomain();this._defaultFormatOptions=o(n[0],n[1],this._getApproximateScreenRange())},_setupDomainCore:null,_calculateSize:null,_cleanContent:null,_renderContent:null,_setupCodomain:null,_getApproximateScreenRange:null,_factory:{createRenderer:n.viz.core.CoreFactory.createRenderer,createTranslator:function(){return new n.viz.core.Translator1D},createTracker:function(t){return new n.viz.gauges.__internals.Tracker(t)},createLayoutManager:function(){return new n.viz.gauges.__internals.LayoutManager},createTitle:function(t){return new n.viz.gauges.__internals.Title(t)},createDeltaIndicator:function(t){return n.viz.gauges.__internals.DeltaIndicator?new n.viz.gauges.__internals.DeltaIndicator(t):null},createTooltip:function(t){return new n.viz.gauges.__internals.Tooltip(t)}}})}(DevExpress,jQuery),function(n,t,i){function l(n,t){return v(n)?e(n):t}function w(n){return f(n)?n:h(n)?[n]:null}function g(n){return n?n.value:NaN}function b(n,t,i){for(var o=n[t],u=f(i)?c(i,g):[],r=0,s=u.length,e=[];r<s;++r)e.push(l(u[r],o[r]));n[t]=e}function nt(n){n.value=n.subvalues=p,n._setupValue=n._setupSubvalues=n._updateValueIndicator=n._updateSubvalueIndicators=null}function tt(n){n._indicatorValues=[],b(n,"_indicatorValues",n.option("valueIndicators")),n._valueIndicators=[],n._valueChangedHandler=function(n,t){return n==="valueIndicators"?(b(this,"_indicatorValues",t),this._invalidate(),!0):!1},n._updateActiveElements=function(){var n=this;r(n._valueIndicators,function(t,i){i.value(n._indicatorValues[i._index],n._noAnimation)}),n._resizing||n.hideLoadingIndicator()},n._prepareValueIndicators=function(){return it(this)},n._disposeValueIndicators=function(){r(this._valueIndicators,function(n,t){t.dispose()}),this._valueIndicators=null},n._cleanValueIndicators=function(){r(this._valueIndicators,function(n,t){t.clean()})},n.indicatorValue=function(n,t){return rt(this,this._valueIndicators,this._indicatorValues,n,t)}}function it(n){for(var h=n._valueIndicators||[],e=n.option("valueIndicators"),o=[],t=0,i=f(e)?e.length:0;t<i;++t)o.push(e[t]);for(i=h.length;t<i;++t)o.push(null);var s=n._themeManager.theme().valueIndicators,l={renderer:n._renderer,owner:n._root,translator:n._translator,tracker:n._tracker},c=[];return r(o,function(t,i){var r=h[t],f,e;if(!i){r&&r.dispose();return}f=y(i.type||s._type).toLowerCase(),r&&f!==r.type&&(r.dispose(),r=null),r||(r=n._createValueIndicatorInHardMode(f),r&&r.setup(l)),r&&(e=u(!0,{},s._default,s[f],i,{type:f,animation:n._animationSettings,containerBackgroundColor:n._containerBackgroundColor}),n._updateIndicatorSettings(e),r.render(e),r._index=t,r._trackerInfo={index:t},c.push(r))}),n._valueIndicators=c}function rt(n,t,r,u,f){return f!==i?(r[u]!==i&&(r[u]=l(f,r[u]),t[u]&&t[u].value(r[u]),n._resizing||n.hideLoadingIndicator()),n):r[u]}function ut(n,t){if(n===t)return!0;if(f(n)&&f(t)&&n.length===t.length){for(var i=0,r=n.length;i<r;++i)if(d(n[i]-t[i])>1e-8)return!1;return!0}return!1}var ft=n.viz.core.Rectangle,a=n.utils,k=a.isDefined,f=a.isArray,h=a.isNumber,v=isFinite,e=Number,y=String,d=Math.abs,u=t.extend,r=t.each,c=t.map,p=t.noop,o="value",s="subvalues";n.viz.gauges.dxGauge=n.viz.gauges.dxBaseGauge.inherit({_initCore:function(){var n=this;n._setupValue(n.option(o)),n.__subvalues=w(n.option(s)),n._setupSubvalues(n.__subvalues),n._selectMode(),n.callBase.apply(n,arguments),n._scale=n._createScale({renderer:n._renderer,container:n._root,translator:n._translator}),n._rangeContainer=n._createRangeContainer({renderer:n._renderer,container:n._root,translator:n._translator})},_disposeCore:function(){var n=this;n.callBase.apply(n,arguments),n._scale.dispose(),n._rangeContainer.dispose(),n._disposeValueIndicators(),n._scale=n._rangeContainer=null},_disposeValueIndicators:function(){var n=this;n._valueIndicator&&n._valueIndicator.dispose(),n._subvalueIndicatorsSet&&n._subvalueIndicatorsSet.dispose(),n._valueIndicator=n._subvalueIndicatorsSet=null},_selectMode:function(){var n=this;n.option(o)===i&&n.option(s)===i&&n.option("valueIndicators")!==i&&(nt(n),tt(n))},_setupDomainCore:function(){var i=this,r=i.option("scale")||{},n=i.option("startValue"),t=i.option("endValue");n=h(n)?e(n):h(r.startValue)?e(r.startValue):0,t=h(t)?e(t):h(r.endValue)?e(r.endValue):100,i._baseValue=n<t?n:t,i._translator.setDomain(n,t)},_cleanContent:function(){var n=this;n._rangeContainer.clean(),n._scale.clean(),n._cleanValueIndicators()},_renderContent:function(){var n=this,t;n._rangeContainer.render(u(!0,{},n._themeManager.theme().rangeContainer,n.option("rangeContainer"),{themeName:n._themeManager.themeName(),vertical:n._area.vertical})),n._scale.render(u(!0,{},n._themeManager.theme().scale,n.option("scale"),{rangeContainer:n._rangeContainer.enabled?n._rangeContainer:null,approximateScreenDelta:n._getApproximateScreenRange(),offset:0,vertical:n._area.vertical})),t=c([n._scale,n._rangeContainer].concat(n._prepareValueIndicators()),function(n){return n&&n.enabled?n:null}),n._applyMainLayout(t),r(t,function(t,i){n._updateElementPosition(i)}),n._updateActiveElements()},_updateIndicatorSettings:function(n){var t=this;n.currentValue=n.baseValue=v(t._translator.translate(n.baseValue))?e(n.baseValue):t._baseValue,n.vertical=t._area.vertical,!n.text||n.text.format||n.text.precision||(n.text.format=t._defaultFormatOptions.format,n.text.precision=t._defaultFormatOptions.precision)},_prepareValueIndicatorSettings:function(){var n=this,i=n.option("valueIndicator")||{},t=u(!0,{},n._themeManager.theme().valueIndicator),r=y(i.type||t.type).toLowerCase();n._valueIndicatorSettings=u(!0,t._default,t[r],i,{type:r,animation:n._animationSettings,containerBackgroundColor:n._containerBackgroundColor}),n._updateIndicatorSettings(n._valueIndicatorSettings)},_prepareSubvalueIndicatorSettings:function(){var n=this,i=n.option("subvalueIndicator")||{},t=u(!0,{},n._themeManager.theme().subvalueIndicator),r=y(i.type||t.type).toLowerCase();n._subvalueIndicatorSettings=u(!0,t._default,t[r],i,{type:r,animation:n._animationSettings,containerBackgroundColor:n._containerBackgroundColor}),n._updateIndicatorSettings(n._subvalueIndicatorSettings)},_cleanValueIndicators:function(){this._valueIndicator&&this._valueIndicator.clean(),this._subvalueIndicatorsSet&&this._subvalueIndicatorsSet.clean()},_prepareValueIndicators:function(){var n=this;return n._prepareValueIndicator(),n.__subvalues!==null&&n._prepareSubvalueIndicators(),[n._valueIndicator,n._subvalueIndicatorsSet]},_updateActiveElements:function(){this._updateValueIndicator(),this._updateSubvalueIndicators()},_prepareValueIndicator:function(){var n=this,t=n._valueIndicator;n._prepareValueIndicatorSettings(),t&&n._valueIndicatorType!==n._valueIndicatorSettings.type&&t.dispose()&&(t=null),n._valueIndicatorType=n._valueIndicatorSettings.type,t||(t=n._valueIndicator=n._createValueIndicator(n._valueIndicatorType),t&&(t.setup({renderer:n._renderer,translator:n._translator,owner:n._root,tracker:n._tracker,className:"dxg-value-indicator"}),t._trackerInfo={type:"value-indicator"})),t.render(n._valueIndicatorSettings)},_prepareSubvalueIndicators:function(){var t=this,i=t._subvalueIndicatorsSet,r;i||(i=t._subvalueIndicatorsSet=new n.viz.gauges.__internals.ValueIndicatorsSet({renderer:t._renderer,translator:t._translator,owner:t._root,tracker:t._tracker,className:"dxg-subvalue-indicators",indicatorClassName:"dxg-subvalue-indicator",trackerType:"subvalue-indicator",createIndicator:function(){return t._createSubvalueIndicator(t._subvalueIndicatorType)}})),t._prepareSubvalueIndicatorSettings(),r=t._subvalueIndicatorSettings.type!==t._subvalueIndicatorType,t._subvalueIndicatorType=t._subvalueIndicatorSettings.type,t._createSubvalueIndicator(t._subvalueIndicatorType)&&i.render(t._subvalueIndicatorSettings,r)},_setupValue:function(n){this.__value=l(n,this.__value)},_setupSubvalues:function(n){var r=n===i?this.__subvalues:w(n),t,f,u;if(r!==null){for(t=0,f=r.length,u=[];t<f;++t)u.push(l(r[t],this.__subvalues[t]));this.__subvalues=u}},_updateValueIndicator:function(){var n=this;n._valueIndicator&&n._valueIndicator.value(n.__value,n._noAnimation),n._resizing||n.hideLoadingIndicator()},_updateSubvalueIndicators:function(){var n=this;n._subvalueIndicatorsSet&&n._subvalueIndicatorsSet.values(n.__subvalues,n._noAnimation),n._resizing||n.hideLoadingIndicator()},value:function(n){var t=this;return n!==i?(t._setupValue(n),t._updateValueIndicator(),t.option(o,t.__value),t):t.__value},subvalues:function(n){var t=this;return n!==i?(t.__subvalues!==null&&(t._setupSubvalues(n),t._updateSubvalueIndicators(),t.option(s,t.__subvalues)),t):t.__subvalues!==null?t.__subvalues.slice():i},_valueChangedHandler:function(n,t){var i=this;switch(n){case o:return i._setupValue(t),i._updateValueIndicator(),i.option(o,i.__value),!0;case s:return i.__subvalues!==null?(i._setupSubvalues(t),i._updateSubvalueIndicators(),i.option(s,i.__subvalues),!0):!1;default:return!1}},_optionChanged:function(n){var t=this;if(!t._valueChangedHandler(n.name,n.value,n.previousValue))switch(n.name){case"scale":t._setupDomain(),t._invalidate();break;default:t.callBase.apply(t,arguments)}},_optionValuesEqual:function(n,t,i){switch(n){case o:return t===i;case s:return ut(t,i);default:return this.callBase.apply(this,arguments)}},_getDefaultContainerSize:null,_applyMainLayout:null,_updateElementPosition:null,_createScale:null,_createRangeContainer:null,_createValueIndicator:null,_createSubvalueIndicator:null,_getApproximateScreenRange:null}),n.viz.gauges.dxGauge.prototype._factory=n.utils.clone(n.viz.gauges.dxBaseGauge.prototype._factory),n.viz.gauges.dxGauge.prototype._factory.createThemeManager=function(){return new n.viz.gauges.__internals.ThemeManager},n.viz.gauges.__internals.ValueIndicatorsSet=n.Class.inherit({ctor:function(n){var t=this;t._parameters=n,t._createIndicator=t._parameters.createIndicator||p,t._root=t._parameters.renderer.g().attr({"class":t._parameters.className}),t._indicatorParameters=t._indicatorParameters||{renderer:t._parameters.renderer,translator:t._parameters.translator,owner:t._root,tracker:t._parameters.tracker,className:t._parameters.indicatorClassName},t._indicators=[]},dispose:function(){var n=this;return r(n._indicators,function(n,t){t.dispose()}),n._parameters=n._createIndicator=n._root=n._options=n._indicators=n._colorPalette=n._palette=null,n},clean:function(){var n=this;return n._root.remove(),n._sample&&n._sample.clean().dispose(),r(n._indicators,function(n,t){t.clean()}),n._sample=n._options=n._palette=null,n},render:function(t,i){var r=this;return r._options=t,r._sample=r._createIndicator(),r._sample&&r._sample.setup(r._indicatorParameters).render(t),r.enabled=r._sample&&r._sample.enabled,r._palette=k(t.palette)?new n.viz.core.Palette(t.palette):null,r.enabled&&(r._root.append(r._parameters.owner),r._generatePalette(r._indicators.length),r._indicators=c(r._indicators,function(n,t){return i&&(n.dispose(),n=r._createIndicator(),n.setup(r._indicatorParameters),n._trackerInfo={type:r._parameters.trackerType,index:t}),n.render(r._getIndicatorOptions(t)),n})),r},resize:function(n){var t=this;return t._layout=n,r(t._indicators,function(t,i){i.resize(n)}),t},measure:function(n){return this._sample.measure(n)},_getIndicatorOptions:function(n){var t=this._options;return this._colorPalette&&(t=u({},t,{color:this._colorPalette[n]})),t},_generatePalette:function(n){var t=this,i=null,r;if(t._palette)for(i=[],t._palette.reset(),r=0;r<n;++r)i.push(t._palette.getNextColor());t._colorPalette=i},_adjustIndicatorsCount:function(n){var t=this,r=t._indicators,i,f,o,u,e=r.length,s=t._parameters.palette;if(e>n){for(i=n,f=e;i<f;++i)r[i].clean().dispose();t._indicators=r.slice(0,n),t._generatePalette(r.length)}else if(e<n)for(t._generatePalette(n),i=e,f=n;i<f;++i)u=t._createIndicator(),u.setup(t._indicatorParameters),u._trackerInfo={type:t._parameters.trackerType,index:i},u.render(t._getIndicatorOptions(i)).resize(t._layout),r.push(u)},values:function(n,t){var u=this;if(u.enabled)return n!==i?(f(n)||(n=v(n)?[Number(n)]:null),n&&(u._adjustIndicatorsCount(n.length),r(u._indicators,function(i,r){r.value(n[i],t)})),u):c(u._indicators,function(n){return n.value()})}})}(DevExpress,jQuery),function(n,t,i){function p(n,t){var s=l(n),h=l(t),i=s.cos,u=s.sin,e=h.cos,o=h.sin;return{left:u<=0&&o>=0||u<=0&&o<=0&&i<=e||u>=0&&o>=0&&i>=e?-1:f(i,e,0),right:u>=0&&o<=0||u>=0&&o>=0&&i>=e||u<=0&&o<=0&&i<=e?1:r(i,e,0),up:i<=0&&e>=0||i<=0&&e<=0&&u>=o||i>=0&&e>=0&&u<=o?-1:-r(u,o,0),down:i>=0&&e<=0||i>=0&&e>=0&&u<=o||i<=0&&e<=0&&u>=o?1:-f(u,o,0)}}var u=n.viz.gauges.__factory,h=isFinite,o=Number,c=n.utils.normalizeAngle,l=n.utils.getCosAndSin,e=Math,a=e.abs,r=e.max,f=e.min,s=e.round,v=t.each,y=Math.PI;n.registerComponent("dxCircularGauge",n.viz.gauges,n.viz.gauges.dxGauge.inherit({_rootClass:"dxg-circular-gauge",_selectMode:function(){this.callBase.apply(this,arguments),typeof this.indicatorValue=="function"&&(this._createValueIndicatorInHardMode=function(n){return u.createCircularValueIndicatorInHardMode(n)})},_setupCodomain:function(){var u=this,r=u.option("geometry")||{},t=r.startAngle,n=r.endAngle,f;t=h(t)?c(t):225,n=h(n)?c(n):-45,a(t-n)<1?(n-=360,f={left:-1,up:-1,right:1,down:1}):(t<n&&(n-=360),f=p(t,n)),u._area={x:0,y:0,radius:100,startCoord:t,endCoord:n,scaleRadius:r.scaleRadius>0?o(r.scaleRadius):i,sides:f},u._translator.setCodomain(t,n)},_measureMainElements:function(n){var c=this,t=0,e=Infinity,i=0,u=0,s=0,h=0;return v(n,function(n,l){var a=l.measure({radius:c._area.radius-(o(l._options.offset)||0)});a.min>0&&(e=f(e,a.min)),a.max>0&&(t=r(t,a.max)),a.horizontalOffset>0&&(i=r(i,a.max+a.horizontalOffset)),a.verticalOffset>0&&(u=r(u,a.max+a.verticalOffset)),a.inverseHorizontalOffset>0&&(s=r(s,a.inverseHorizontalOffset)),a.inverseVerticalOffset>0&&(h=r(h,a.inverseVerticalOffset))}),i=r(i-t,0),u=r(u-t,0),{minRadius:e,maxRadius:t,horizontalMargin:i,verticalMargin:u,inverseHorizontalMargin:s,inverseVerticalMargin:h}},_applyMainLayout:function(n){var h=this,r=h._measureMainElements(n),u=h._area,t=u.sides,e={left:(t.left<-.1?r.horizontalMargin:r.inverseHorizontalMargin)||0,right:(t.right>.1?r.horizontalMargin:r.inverseHorizontalMargin)||0,top:(t.up<-.1?r.verticalMargin:r.inverseVerticalMargin)||0,bottom:(t.down>.1?r.verticalMargin:r.inverseVerticalMargin)||0},i=h._layoutManager.selectRectByAspectRatio((t.down-t.up)/(t.right-t.left),e),o=f(i.width()/(t.right-t.left),i.height()/(t.down-t.up)),l,a,c=(r.maxRadius-u.radius+u.scaleRadius)/o;0<c&&c<1&&(i=i.scale(c),o*=c),o=o-r.maxRadius+u.radius,l=i.left-i.width()*t.left/(t.right-t.left),a=i.top-i.height()*t.up/(t.down-t.up),u.x=s(l),u.y=s(a),u.radius=o,i.left-=e.left,i.right+=e.right,i.top-=e.top,i.bottom+=e.bottom,h._layoutManager.setRect(i)},_updateElementPosition:function(n){n.resize({x:this._area.x,y:this._area.y,radius:s(this._area.radius-(o(n._options.offset)||0))})},_createScale:function(n){return u.createCircularScale(n)},_createRangeContainer:function(n){return u.createCircularRangeContainer(n)},_createValueIndicator:function(n){return u.createCircularValueIndicator(n)},_createSubvalueIndicator:function(n){return u.createCircularSubvalueIndicator(n)},_getApproximateScreenRange:function(){var i=this,n=i._area,t=f(i._canvas.width/(n.sides.right-n.sides.left),i._canvas.height/(n.sides.down-n.sides.up));return t>n.totalRadius&&(t=n.totalRadius),t=.8*t,-i._translator.getCodomainRange()*t*y/180},_getDefaultSize:function(){return{width:300,height:300}}})),n.viz.gauges.dxCircularGauge.prototype._factory=n.utils.clone(n.viz.gauges.dxBaseGauge.prototype._factory),n.viz.gauges.dxCircularGauge.prototype._factory.createThemeManager=function(){var t=new n.viz.gauges.__internals.ThemeManager;return t._subTheme="_circular",t}}(DevExpress,jQuery),function(n,t,i){var r=n.viz.gauges.__factory,o=String,u=Number,e=Math.max,s=Math.min,f=Math.round,h=t.each;n.registerComponent("dxLinearGauge",n.viz.gauges,n.viz.gauges.dxGauge.inherit({_rootClass:"dxg-linear-gauge",_selectMode:function(){this.callBase.apply(this,arguments),typeof this.indicatorValue=="function"&&(this._createValueIndicatorInHardMode=function(n){return r.createLinearValueIndicatorInHardMode(n)})},_setupCodomain:function(){var n=this,t=n.option("geometry")||{},r=o(t.orientation).toLowerCase()==="vertical";n._area={vertical:r,x:0,y:0,startCoord:-100,endCoord:100,scaleSize:t.scaleSize>0?u(t.scaleSize):i},n._scale.vertical=r,n._rangeContainer.vertical=r},_measureMainElements:function(n){var f=this,t=1e3,i=0,r=0;return h(n,function(n,o){var h=o.measure({x:f._area.x+(u(o._options.offset)||0),y:f._area.y+(u(o._options.offset)||0)});i=e(i,h.max),t=s(t,h.min),h.indent>0&&(r=e(r,h.indent))}),{minBound:t,maxBound:i,indent:r}},_applyMainLayout:function(n){var u=this,t=u._measureMainElements(n),i=u._area,r,e,o=i.scaleSize+2*t.indent;i.vertical?(r=u._layoutManager.selectRectBySizes({width:t.maxBound-t.minBound,height:o}),e=r.horizontalMiddle()-(t.minBound+t.maxBound)/2,i.startCoord=r.bottom-t.indent,i.endCoord=r.top+t.indent,i.x=f(i.x+e)):(r=u._layoutManager.selectRectBySizes({height:t.maxBound-t.minBound,width:o}),e=r.verticalMiddle()-(t.minBound+t.maxBound)/2,i.startCoord=r.left+t.indent,i.endCoord=r.right-t.indent,i.y=f(i.y+e)),u._translator.setCodomain(i.startCoord,i.endCoord),u._layoutManager.setRect(r)},_updateElementPosition:function(n){var t=u(n._options.offset)||0;n.resize({x:f(this._area.x+t),y:f(this._area.y+t)})},_createScale:function(n){return r.createLinearScale(n)},_createRangeContainer:function(n){return r.createLinearRangeContainer(n)},_createValueIndicator:function(n){return r.createLinearValueIndicator(n)},_createSubvalueIndicator:function(n){return r.createLinearSubvalueIndicator(n)},_getApproximateScreenRange:function(){var t=this,i=t._area,n=i.vertical?t._canvas.height:t._canvas.width;return n>i.totalSize&&(n=i.totalSize),n=n*.8},_getDefaultSize:function(){var n=this.option("geometry")||{};return n.orientation==="vertical"?{width:100,height:300}:{width:300,height:100}}})),n.viz.gauges.dxLinearGauge.prototype._factory=n.utils.clone(n.viz.gauges.dxBaseGauge.prototype._factory),n.viz.gauges.dxLinearGauge.prototype._factory.createThemeManager=function(){var t=new n.viz.gauges.__internals.ThemeManager;return t._subTheme="_linear",t}}(DevExpress,jQuery),function(n,t,i){function nt(n,t){var i=this;i._context=t,i._background=t.renderer.arc().attr({"stroke-linejoin":"round",fill:t.backgroundColor}).append(t.group),i._bar=t.renderer.arc().attr({"stroke-linejoin":"round"}).append(t.group),t.textEnabled&&(i._line=t.renderer.path([],"line").attr({"stroke-width":t.lineWidth}).append(t.group),i._text=t.renderer.text("",0,0).css(t.fontStyles).attr(t.textOptions).append(t.group)),i._tracker=t.renderer.arc().attr({"stroke-linejoin":"round"}),t.tracker.attach(i._tracker,i,{index:n}),i._index=n,i._angle=t.baseAngle,i._settings={x:t.x,y:t.y,startAngle:t.baseAngle,endAngle:t.baseAngle}}function tt(n,t,i){n.startAngle=t<i?t:i,n.endAngle=t<i?i:t}function w(n,t){return rt(n-t)<.0001}function ht(n,t){if(n===t)return!0;if(y(n)&&y(t)&&n.length===t.length){for(var i=0,r=n.length;i<r;++i)if(!w(n[i],t[i]))return!1;return!0}return!1}var s=n.viz,h=s.core,f=s.gauges,c=n.utils,e=Math,it=e.PI,rt=e.abs,l=e.round,a=e.floor,v=e.min,b=e.max,y=c.isArray,ut=c.convertAngleToRendererSpace,k=c.getCosAndSin,r=Number,o=isFinite,ft=t.noop,u=t.extend,et=s.gauges.__internals.getSampleText,ot=s.gauges.__internals.formatValue,d=h.Rectangle,st=h.Palette,p=f.dxBaseGauge.inherit({_rootClass:"dxbg-bar-gauge",_initCore:function(){var n=this;n.callBase.apply(n,arguments),n._barsGroup=n._renderer.g().attr({"class":"dxbg-bars"}),n._values=[],n._context={renderer:n._renderer,translator:n._translator,tracker:n._tracker,group:n._barsGroup},n._animateStep=function(t){for(var r=n._bars,i=0,u=r.length;i<u;++i)r[i].animate(t)},n._animateComplete=function(){for(var i=n._bars,t=0,r=i.length;t<r;++t)i[t].endAnimation()}},_disposeCore:function(){var n=this;n.callBase.apply(n,arguments),n._barsGroup=n._values=n._context=n._animateStep=n._animateComplete=null},_setupDomainCore:function(){var n=this,t=n.option("startValue"),i=n.option("endValue");o(t)||(t=0),o(i)||(i=100),n._translator.setDomain(t,i),n._baseValue=n._translator.adjust(n.option("baseValue")),o(n._baseValue)||(n._baseValue=t<i?t:i)},_getDefaultSize:function(){return{width:300,height:300}},_calculateSize:function(){var n=this,t=n.option("size")||{};r(t.width)===0||r(t.height)===0?(n._width=n._height=0,n._rootRect=new d):(n._width=t.width>0?r(t.width):n.element().width()||300,n._height=t.height>0?r(t.height):n.element().height()||300,n._rootRect=new d({left:0,top:0,right:n._width,bottom:n._height}))},_setupCodomain:f.dxCircularGauge.prototype._setupCodomain,_getApproximateScreenRange:function(){var n=this,t=n._area.sides,i=n._canvas.width/(t.right-t.left),r=n._canvas.height/(t.down-t.up),u=i<r?i:r;return-n._translator.getCodomainRange()*u*it/180},_setupAnimationSettings:function(){this.callBase(),this._animationSettings&&u(this._animationSettings,{step:this._animateStep,complete:this._animateComplete})},_cleanContent:function(){var n=this,t,i;for(n._barsGroup.remove(),n._animationSettings&&n._barsGroup.stopAnimation(),t=0,i=n._bars?n._bars.length:0;t<i;++t)n._bars[t].dispose();n._palette=n._bars=null},_renderContent:function(){var t=this,n=t.option("label"),s,o,e=t._context;t._barsGroup.append(t._root),e.textEnabled=n===i||n&&(!("visible"in n)||n.visible),e.textEnabled&&(e.textColor=n&&n.font&&n.font.color||null,n=u(!0,{},t._themeManager.theme().label,n),e.formatOptions={format:n.format!==i||n.precision!==i?n.format:t._defaultFormatOptions.format,precision:n.format!==i||n.precision!==i?n.precision:t._defaultFormatOptions.precision,customizeText:n.customizeText},e.textOptions={align:"center"},e.fontStyles=h.utils.patchFontOptions(u({},t._themeManager.theme().label.font,n.font,{color:null})),t._textIndent=n.indent>0?r(n.indent):0,e.lineWidth=n.connectorWidth>0?r(n.connectorWidth):0,e.lineColor=n.connectorColor||null,s=t._renderer.text(et(t._translator,e.formatOptions),0,0).attr(e.textOptions).css(e.fontStyles).append(t._barsGroup),o=s.getBBox(),s.remove(),e.textVerticalOffset=-o.y-o.height/2,e.textWidth=o.width,e.textHeight=o.height),f.dxCircularGauge.prototype._applyMainLayout.call(t),t._renderBars()},_measureMainElements:function(){var n={maxRadius:this._area.radius};return this._context.textEnabled&&(n.horizontalMargin=this._context.textWidth,n.verticalMargin=this._context.textHeight),n},_renderBars:function(){var n=this,t=u({},n._themeManager.theme(),n.option()),e,i,f=n._area;n._palette=new st(t.palette,{stepHighlight:50,theme:n._themeManager.themeName()}),e=t.relativeInnerRadius>0&&t.relativeInnerRadius<1?r(t.relativeInnerRadius):.1,i=f.radius,n._context.textEnabled&&(n._textIndent=l(v(n._textIndent,i/2)),i-=n._textIndent),n._outerRadius=a(i),n._innerRadius=a(i*e),n._barSpacing=t.barSpacing>0?r(t.barSpacing):0,u(n._context,{backgroundColor:t.backgroundColor,x:f.x,y:f.y,startAngle:f.startCoord,endAngle:f.endCoord,baseAngle:n._translator.translate(n._baseValue)}),n._bars=[],n._updateValues(n.option("values"))},_arrangeBars:function(n){var t=this,i=t._outerRadius-t._innerRadius,r=t._context,u,f,o,e=0;for(r.barSize=n>0?b((i-(n-1)*t._barSpacing)/n,1):0,u=n>1?b(v((i-n*r.barSize)/(n-1),t._barSpacing),0):0,f=v(a((i+u)/r.barSize),n),t._setBarsCount(f),i=t._outerRadius,r.textRadius=i+t._textIndent,t._palette.reset(),o=r.barSize+u;e<f;++e,i-=o)t._bars[e].arrange({radius:i,color:t._palette.getNextColor()})},_setBarsCount:function(n){var t=this,i,r;if(t._bars.length>n){for(i=n,r=t._bars.length;i<r;++i)t._bars[i].dispose();t._bars.splice(n,r-n)}else if(t._bars.length<n)for(i=t._bars.length,r=n;i<r;++i)t._bars.push(new nt(i,t._context));t._bars.length>0?t._dummyBackground&&(t._dummyBackground.remove(),t._dummyBackground=null):(t._dummyBackground||(t._dummyBackground=t._renderer.arc().attr({"stroke-linejoin":"round"}).append(t._barsGroup)),t._dummyBackground.attr({x:t._context.x,y:t._context.y,outerRadius:t._outerRadius,innerRadius:t._innerRadius,startAngle:t._context.endAngle,endAngle:t._context.startAngle,fill:t._context.backgroundColor}))},_updateBars:function(){for(var t=this,n=0,i=t._bars.length;n<i;++n)t._bars[n].setValue(t._values[n])},_animateBars:function(){var n=this,t=0,i=n._bars.length;if(i>0){for(;t<i;++t)n._bars[t].beginAnimation(n._values[t]);n._barsGroup.animate({_:0},n._animationSettings)}},_updateValues:function(n){var i=this,f=y(n)&&n||o(n)&&[n]||[],r=0,e=f.length,u;for(i._values=[];r<e;++r)u=i._translator.adjust(f[r]),o(u)&&i._values.push(u);i._animationSettings&&i._barsGroup.stopAnimation(),i._bars&&(i._arrangeBars(i._values.length),i._animationSettings&&!i._noAnimation?i._animateBars():i._updateBars()),i._resizing||(i.option("values",i._values),i.hideLoadingIndicator())},values:function(n){return n!==i?(this._updateValues(n),this):this._values.slice(0)},_optionChanged:function(n){switch(n.name){case"values":this._updateValues(n.value);break;default:this.callBase(n)}},_optionValuesEqual:function(n,t,i){switch(n){case"values":return ht(t,i);default:return this.callBase.apply(this,arguments)}}}),g;n.registerComponent("dxBarGauge",f,p),g=f.__internals.ThemeManager.inherit({_themeSection:"barGauge",_fontFields:["label.font","title.font","tooltip.font","loadingIndicator.font"]}),p.prototype._factory=n.utils.clone(f.dxBaseGauge.prototype._factory),p.prototype._factory.createThemeManager=function(){return new g},u(nt.prototype,{dispose:function(){var n=this;return n._background.remove(),n._bar.remove(),n._context.textEnabled&&(n._line.remove(),n._text.remove()),n._context.tracker.detach(n._tracker),n._context=n._settings=n._background=n._bar=n._line=n._text=n._tracker=null,n},arrange:function(n){var t=this,i=t._context;return t._settings.outerRadius=n.radius,t._settings.innerRadius=n.radius-i.barSize,t._background.attr(u({},t._settings,{startAngle:i.endAngle,endAngle:i.startAngle})),t._bar.attr(t._settings),t._tracker.attr(t._settings),t._color=n.color,t._bar.attr({fill:n.color}),i.textEnabled&&(t._line.attr({points:[i.x,i.y-t._settings.innerRadius,i.x,i.y-i.textRadius],stroke:i.lineColor||n.color}).sharp(),t._text.css({fill:i.textColor||n.color})),t},getTooltipParameters:function(){var n=this,t=k((n._angle+n._context.baseAngle)/2);return{x:l(n._context.x+(n._settings.outerRadius+n._settings.innerRadius)/2*t.cos),y:l(n._context.y-(n._settings.outerRadius+n._settings.innerRadius)/2*t.sin),offset:0,color:n._color,value:n._value}},setAngle:function(n){var t=this,i;return t._angle=n,tt(t._settings,t._context.baseAngle,t._angle),t._bar.attr(t._settings),t._tracker.attr(t._settings),t._context.textEnabled&&(t._line.rotate(ut(t._angle),t._context.x,t._context.y),i=k(t._angle),t._text.attr({text:ot(t._value,t._context.formatOptions,{index:t._index}),x:t._context.x+(t._context.textRadius+t._context.textWidth*.6)*i.cos,y:t._context.y-(t._context.textRadius+t._context.textHeight*.6)*i.sin+t._context.textVerticalOffset})),t},setValue:function(n){return this._value=n,this.setAngle(this._context.translator.translate(n))},beginAnimation:function(n){var t=this,i;t._value=n,i=t._context.translator.translate(n),w(t._angle,i)?t.animate=ft:(t._start=t._angle,t._delta=i-t._angle,t._tracker.attr({visibility:"hidden"}),t._context.textEnabled&&(t._line.attr({visibility:"hidden"}),t._text.attr({visibility:"hidden"})))},animate:function(n){var t=this;t._angle=t._start+t._delta*n,tt(t._settings,t._context.baseAngle,t._angle),t._bar.attr(t._settings)},endAnimation:function(){var n=this;n._delta!==i?w(n._angle,n._start+n._delta)&&(n._tracker.attr({visibility:null}),n._context.textEnabled&&(n._line.attr({visibility:null}),n._text.attr({visibility:null})),n.setAngle(n._angle)):delete n.animate,delete n._start,delete n._delta}})}(DevExpress,jQuery),function(n,t){function y(n){var i=n.data.tracker;i._x=n.pageX,i._y=n.pageY;t(i._element.element).off(e).on(e,n.data);i._showTooltip(n,h)}function p(n){var t=n.data.tracker;(t._showTooltipTimeout&&s(n.pageX-t._x)>4||s(n.pageY-t._y)>4)&&(t._x=n.pageX,t._y=n.pageY,t._showTooltip(n,h))}function w(n){var i=n.data.tracker;t(i._element.element).off(e),i._hideTooltip(a)}function b(n){n.preventDefault();var t=r;t&&t!==n.data.tracker&&t._hideTooltip(f),t=r=n.data.tracker,t._showTooltip(n,v),t._touch=!0}function k(){var t=r;t&&(t._touch||(t._hideTooltip(f),r=null),t._touch=null)}function d(){var t=r;t&&t._showTooltipTimeout&&(t._hideTooltip(f),r=null)}var o=setTimeout,u=clearTimeout,s=Math.abs,h=300,a=300,v=400,f=300,r;n.viz.gauges.__internals.Tracker=n.Class.inherit({ctor:function(n){var t=this;t._container=n.container,t._element=n.renderer.g().attr({"class":"dxg-tracker",stroke:"none","stroke-width":0,fill:"#000000",opacity:.0001}),t._showTooltipCallback=function(){t._showTooltipTimeout=null;var n=t._tooltipEvent.target;t._targetEvent=null,t._tooltipTarget!==n&&(t._tooltipTarget=n,t._callbacks["tooltip-show"]())},t._hideTooltipCallback=function(){t._hideTooltipTimeout=null,t._targetEvent=null,t._tooltipTarget&&(t._callbacks["tooltip-hide"](),t._tooltipTarget=null)},t._dispose=function(){t._showTooltipCallback=t._hideTooltipCallback=t._dispose=null}},dispose:function(){var n=this;return n._dispose(),n.deactivate(),t(n._element.element).off(),n._container=n._element=n._context=n._callbacks=null,n},activate:function(){return this._element.append(this._container),this},deactivate:function(){return this._element.remove(),this._element.clear(),this},attach:function(n,i,r){return t(n.element).data({target:i,info:r}),n.append(this._element),this},detach:function(n){return n.remove(),t(n.element).removeData(),this},setTooltipState:function(n){var i=this,r;if(t(i._element.element).off(c).off(l),n){r={tracker:i};t(i._element.element).on(c,r).on(l,r)}return i},setCallbacks:function(n){return this._callbacks=n,this},_showTooltip:function(n,i){var r=this,f=t(n.target).data();(r._tooltipTarget===n.target||r._callbacks["tooltip-prepare"](f.target,f.info))&&(u(r._hideTooltipTimeout),r._hideTooltipTimeout=null,u(r._showTooltipTimeout),r._tooltipEvent=n,r._showTooltipTimeout=o(r._showTooltipCallback,i))},_hideTooltip:function(n){var t=this;u(t._showTooltipTimeout),t._showTooltipTimeout=null,u(t._hideTooltipTimeout),t._hideTooltipTimeout=o(t._hideTooltipCallback,n)}});var c={"mouseover.gauge-tooltip":y,"mouseout.gauge-tooltip":w},e={"mousemove.gauge-tooltip":p},l={"touchstart.gauge-tooltip":b};r=null;t(window.document).on({"touchstart.gauge-tooltip":k,"touchend.gauge-tooltip":d})}(DevExpress,jQuery),DevExpress.MOD_VIZ_GAUGES=!0}if(!DevExpress.MOD_VIZ_RANGESELECTOR){if(!DevExpress.MOD_VIZ_CORE)throw Error("Required module is not referenced: viz-core");(function(n){n.viz.rangeSelector={utils:{}}})(DevExpress),function(n,t,i){var o=t.viz.rangeSelector,r=o.utils,f=t.utils,e=-1e3,u=function(n,t){var u;if(!n||n.length===0)return-1;for(var r=0,i=n.length-1,u=0;i-r>1;)u=r+i>>1,n[u]>t?i=u:r=u;return n[i]<=t?i:r},s=function(n,t){var i=u(n,t);return n&&i>=0&&i<n.length?n[i]:t},h=function(n,t){var i=u(n,t);return n&&i>=0&&i<n.length?(i+1<n.length&&(f.isDate(t)?n[i+1].getTime()-t.getTime()<t.getTime()-n[i].getTime()&&i++:n[i+1]-t<t-n[i]&&i++),n[i]):t},c=function(n,t){var i=u(n,t);return n&&i>=0&&i<n.length?(n[i]<t&&i+1<n.length&&i++,n[i]):t},l=function(n){return f.getRootOffset(n).left||0},a=function(n){var t=0;return n.pageX?t=n.pageX:n.originalEvent&&n.originalEvent.pageX&&(t=n.originalEvent.pageX),n.originalEvent&&n.originalEvent.touches&&(n.originalEvent.touches.length>0?t=n.originalEvent.touches[0].pageX:n.originalEvent.changedTouches.length>0&&(t=n.originalEvent.changedTouches[0].pageX)),t},v=function(n,t,i){var r=n.text(t,e,e).css(i).append(n.root),u=r.getBBox();return r.remove(),u},y=function(t,r){var s=r.type==="discrete",c=s?r._categoriesInfo.categories:i,u=r.startValue,f=r.endValue,e,o,h;return s?(h=n.inArray(t,c),h<0?u:t):(e=u>f?f:u,o=u>f?u:f,t<e&&(t=e),t>o&&(t=o),t)};r.findLessOrEqualValue=s,r.findNearValue=h,r.findGreaterOrEqualValue=c,r.getRootOffsetLeft=l,r.getEventPageX=a,r.getTextBBox=v,r.truncateSelectedRange=y}(jQuery,DevExpress),function(){DevExpress.viz.rangeSelector.baseVisualElementMethods={init:function(n){this._renderer=n,this._isDrawn=!1},applyOptions:function(n){this._options=n||{},this._applyOptions(this._options)},_applyOptions:function(){},redraw:function(n){var t=this;t._isDrawn?t._update(n||t._group):(t._isDrawn=!(t._draw(n||t._group)===!1),n&&(t._group=n))},isDrawn:function(){return!!this._isDrawn},isInitialized:function(){return!!this._options},_draw:function(){},_update:function(n){n.clear(),this._draw(n)}}}(DevExpress),function(n,t,i){var u=t.viz.rangeSelector,e=t.utils,et=t.data.utils,s=u.utils,f=t.viz.core,ot=f.ParseUtils,v=t.formatHelper,st=5,r=e.isDefined,o=e.isNumber,h=e.isDate,c=Math.max,y=Math.ceil,d=n.extend,p="startValue",g="endValue",l="datetime",w="selectedRange",b="discrete",a="string",nt={size:i,margin:{left:0,top:0,right:0,bottom:0},scale:{showCustomBoundaryTicks:!0,showMinorTicks:!0,startValue:i,endValue:i,minorTickCount:i,minorTickInterval:i,majorTickInterval:i,useTicksAutoArrangement:!0,setTicksAtUnitBeginning:!0,minRange:i,maxRange:i,placeholderHeight:i,valueType:i,label:{visible:!0,format:i,precision:i,customizeText:i},marker:{visible:!0,label:{format:i,precision:i,customizeText:i}},logarithmBase:10},selectedRange:i,sliderMarker:{visible:!0,format:i,precision:i,customizeText:i,placeholderSize:i},behavior:{snapToTicks:!0,animationEnabled:!0,moveSelectedRangeByClick:!0,manualRangeSelectionEnabled:!0,allowSlidersSwap:!0,callSelectedRangeChanged:"onMovingComplete"},background:{color:"#C0BAE1",visible:!0,image:{url:i,location:"full"}},dataSource:i,dataSourceField:"arg",redrawOnResize:!0,theme:i,selectedRangeChanged:null};u.consts={fontHeightRatio:.55,emptySliderMarkerText:". . ."},u.formatValue=function(n,t){var i={value:n,valueText:v.format(n,t.format,t.precision)};return String(e.isFunction(t.customizeText)?t.customizeText.call(i,i):i.valueText)};var ht=function(n){return u.rangeSelectorFactory.createRangeContainer(n)},ct=function(n,t){return{x:f.CoreFactory.createTranslator2D(n.arg,t,{direction:"horizontal"}),y:f.CoreFactory.createTranslator2D(n.val,t)}},lt=function(n,t,i){return{left:t.left,top:t.top,right:n.width-t.width-t.left,bottom:n.height-t.height-t.top+i,width:n.width,height:n.height}},tt=function(n,t,r){var e=t===i?u.consts.emptySliderMarkerText:u.formatValue(t,r),f=s.getTextBBox(n,e,r.font);return{width:y(f.width)+2*r.padding,height:y(f.height*u.consts.fontHeightRatio)+2*r.padding+r.pointerSize}},it=function(n,t,i){var r=u.formatValue(t,i.label),f=s.getTextBBox(n,r,i.label.font);return y(f.width/2)},at=function(n,t,i){var r={left:t.left+i.left,top:t.top+i.top,width:n.width-t.left-t.right-i.left-i.right,height:n.height-t.top-t.bottom-i.top-i.bottom};return r.width<=0&&(r.width=1),r},vt=function(n){var t,i,r;return o(n)?t=i=r=n:n&&(o(n.height)&&(r=n.height),o(n.width)?t=i=n.width:n.width&&(o(n.width.left)&&(t=n.width.left),o(n.width.right)&&(i=n.width.right))),{widthLeft:t,widthRight:i,height:r}},yt=function(n,t,i,r){var s,a=0,v=0,h,u=0,f=0,e=0,o,l;return o=vt(r.placeholderSize),u=o.widthLeft||0,f=o.widthRight||0,e=o.height||0,r.visible&&(s=tt(n,i.startValue,r),h=tt(n,i.endValue,r),l=c(s.width,h.width),u||(u=l),f||(f=l),e||(e=c(s.height,h.height))),i.label.visible&&(a=it(n,i.startValue,i),v=it(n,i.endValue,i)),u=c(u,a),f=c(f,v),{left:u,right:f,top:e,bottom:0}},ni=function(n){n&&n.empty()},pt=function(n){return u.rangeSelectorFactory.createThemeManager(n)},rt=function(t,i){var u=n.type(t),f=n.type(i),r=function(n){return u===n||f===n};return r("date")?l:r("number")?"numeric":r(a)?a:""},wt=function(n){return n.valueType===l&&n.marker.visible},bt=function(n,t){var i=t.minorTickInterval||t.majorTickInterval;t.valueType==="datetime"&&(i=e.convertDateTickIntervalToMilliseconds(i)),n=n.arg.addRange({interval:i})},k=function(n){return new f.Range(n)},ut=function(n,t,r){n&&(n.type==="logarithmic"&&n.logarithmBase<=0||n.logarithmBase&&!o(n.logarithmBase)?(n.logarithmBase=t,r("E2104")):n.type!=="logarithmic"&&(n.logarithmBase=i))},kt=function(n,t,i){var r,u=t.label.visible;return t.placeholderHeight?t.placeholderHeight:(r=s.getTextBBox(n,"0",t.label.font),(u?t.label.topIndent+r.height:0)+(i?t.marker.topIndent+t.marker.separatorHeight:0))},dt=function(n,t,i,r,u,e){var s=n._categoriesInfo,o=f.CoreFactory.createTickManager({axisType:n.type,dataType:n.valueType},{min:u,max:e,screenDelta:t,customTicks:s&&s.categories},{labelOptions:{},boundCoef:1,minorTickInterval:n.minorTickInterval,tickInterval:n.majorTickInterval,incidentOccured:i,base:n.logarithmBase,showMinorTicks:!0,withMinorCorrection:!0,stick:r!==!1});return o.getTicks(!0),{majorTickInterval:o.getTickInterval(),minorTickInterval:o.getMinorTickInterval(),bounds:o.getTickBounds()}},gt=function(n,t){var s,c,v=!1,p,u=t.startValue,f=t.endValue,a,o,l=n?n.getBoundRange():{arg:k(),val:k({isValueRange:!0})},y;return t.type===b&&(y=k({categories:t.categories||(!n&&u&&f?[u,f]:i),startCategories:u,endCategories:f}),y.addRange(l.arg),l.arg=y,a=y.categories||[],t._categoriesInfo=o=e.getCategoriesInfo(a,u||a[0],f||a[a.length-1])),r(u)&&r(f)?(v=t.inverted=o?o.inverted:u>f,s=o?o.start:v?f:u,c=o?o.end:v?u:f):r(u)||r(f)?(s=u,c=f):o&&(s=o.start,c=o.end),p=h(s)&&h(c)&&s.getTime()===c.getTime(),s===c||p||l.arg.addRange({invert:v,min:s,max:c,minVisible:s,maxVisible:c,dataType:t.valueType}),l.arg.addRange({base:t.logarithmBase,axisType:t.type}),l.arg.isDefined()||(p&&(t.valueType="numeric"),l.arg.setStubData(t.valueType)),l},ft=function(n,t){return!r(n)||!r(t)};t.registerComponent("dxRangeSelector",u,f.BaseWidget.inherit({_setDefaultOptions:function(){this.callBase(),this.option(nt)},_eventsMap:n.extend({},f.BaseWidget.prototype._eventsMap,{onSelectedRangeChanged:{name:"selectedRangeChanged",deprecated:"selectedRangeChanged",deprecatedContext:function(){return null},deprecatedArgs:function(n){return[{startValue:n.startValue,endValue:n.endValue}]}},selectedRangeChanged:{newName:"onSelectedRangeChanged"}}),_setDeprecatedOptions:function(){this.callBase(),n.extend(this._deprecatedOptions,{selectedRangeChanged:{since:"14.2",message:"Use the 'onSelectedRangeChanged' option instead"}})},_dataSourceOptions:function(){return{paginate:!1,_preferSync:!0}},_dataIsReady:function(){return f.utils.notExistOrLoaded(this._dataSource)},_initCore:function(){var n=this;n.rangeContainer=ht(n._renderer),n._reinitDataSource()},_getRendererParameters:function(){return{pathModified:this.option("pathModified"),rtl:this.option("rtlEnabled")}},_getDefaultSize:function(){return{width:400,height:160}},_getOption:function(n){return this.option(n)},_reinitDataSource:function(){this._refreshDataSource()},_disposeCore:function(){var n=this,t=function(t){n[t]&&n[t].dispose(),n[t]=null};n.callBase(),t("renderer"),n.translators=null,t("rangeContainer")},_initOptions:function(n){var t=this,i;t._optionsInitializing=!0,n=n||{},t._userOptions=d(!0,{},n),i=pt(n.theme),i.setBackgroundColor(n.containerBackgroundColor),t.option(i.applyRangeSelectorTheme(n)),t._prepareChartThemeOptions(n),n.background&&(t._userBackgroundColor=n.background.color)},_refresh:function(){var n=this,t=n.callBase;n._endLoading(function(){t.call(n)})},_render:function(n){var t=this,r,i;t._optionsInitializing=!1,t._applyOptions(),n?(i=t.option("behavior"),r=i.animationEnabled,i.animationEnabled=!1,t.rangeContainer.redraw(),i.animationEnabled=r):t.rangeContainer.redraw(),!n&&(!t._dataSource||t._dataSource&&t._dataSource.isLoaded())&&t.hideLoadingIndicator(),t._drawn()},_optionChanged:function(n){var t=this,i=n.name;t._optionsInitializing||et.compileSetter(i)(t._userOptions,n.value,{functionsAsIs:!0,merge:!0}),i==="dataSource"?t._reinitDataSource():i==="selectedRange"?t.setSelectedRange(t.option(w)):i==="containerBackgroundColor"||i==="theme"?(t._initOptions(t._userOptions),t._invalidate()):t.callBase(n)},_applySize:n.noop,_resize:function(){this._render(!0)},_dataSourceChangedHandler:function(){var n=this;n._endLoading(function(){n._renderer.drawn&&n._render()})},_applyOptions:function(){var n=this,f,u,e,o,t=n._canvas,s,h,c,l=n.container,r;n._isUpdating=!0,u=n._createSeriesDataSource(),r=n._scaleOptions=n._prepareScaleOptions(u),n._updateLoadIndicator(i,t.width,t.height),e=gt(u,r),n._updateScaleOptions(u,e.arg,t.width),bt(e,r),h=n._prepareSliderMarkersOptions(t.width),c=n._initSelection(),s=yt(n._renderer,t,r,h),f=at(t,t,s),o=kt(n._renderer,r,wt(r)),n.translators=ct(e,lt(t,f,o)),r.ticksInfo=n._getTicksInfo(f.width),u&&u.adjustSeriesDimensions(n.translators),n.rangeContainer.applyOptions({canvas:f,scaleLabelsAreaHeight:o,sliderMarkerSpacing:s,translators:n.translators,selectedRange:c,scale:r,behavior:n.option("behavior"),background:n.option("background"),chart:n.option("chart"),seriesDataSource:u,sliderMarker:h,sliderHandle:n.option("sliderHandle"),shutter:n.option("shutter"),selectedRangeChanged:function(t,i){n.option(w,t),i||n._eventTrigger("selectedRangeChanged",t)},setSelectedRange:function(t){n.setSelectedRange(t)}}),n._isUpdating=!1},_initSelection:function(){var u=this,n=u._scaleOptions,f=u.option(w),t,i,o=n.parser||function(){return null},e=function(t,i){var f,e=n[i];return r(t)&&(f=o(t)),r(f)?e=f:u._incidentOccured("E2203",[i]),e};return f?(t=e(f.startValue,p),t=s.truncateSelectedRange(t,n),i=e(f.endValue,g),i=s.truncateSelectedRange(i,n),{startValue:t,endValue:i}):{startValue:n.startValue,endValue:n.endValue}},_prepareChartThemeOptions:function(n){var t,i=this.option("chart")||{};!i.theme&&n&&n.theme&&(t=n.theme,t&&(typeof t=="object"&&(t=t.chart||{},t.name=n.theme.name),i.theme=t))},_createSeriesDataSource:function(){var n=this,i,e=n._dataSource&&n._dataSource.items(),t=n.option("scale"),r=n.option("chart")||{},f=t.valueType;return f||(f=rt(t.startValue,t.endValue)),(e||r.series)&&(i=new u.SeriesDataSource({renderer:n._renderer,dataSource:e,valueType:(f||"").toLowerCase(),axisType:t.type,chart:r,dataSourceField:n.option("dataSourceField"),backgroundColor:n._userBackgroundColor,incidentOccured:n._incidentOccured,categories:t.categories}),ut(r.valueAxis,i.themeManager.theme().valueAxis.logarithmBase,n._incidentOccured)),i},_prepareScaleOptions:function(t){var e=this,u=n.extend(!0,{},e.option("scale")),l=e._incidentOccured,s=0,h=new ot,f=h.correctValueType((u.valueType||"").toLowerCase()),o,c=function(n,t){var f=n===p?"start":"end";r(u[n])&&(s=t(u[n]),r(s)?u[n]=s:(u[n]=i,e._incidentOccured("E2202",[f])))};return t&&(f=t.getCalculatedValueType()||f),f||(f=rt(u.startValue,u.endValue)||"numeric"),(f===a||u.categories)&&(u.type=b,f=a),u.valueType=f,o=h.getParser(f,"scale"),c(p,o),c(g,o),ut(u,nt.scale.logarithmBase,e._incidentOccured),u.type||(u.type="continuous"),u.parser=o,u},_prepareSliderMarkersOptions:function(n){var u=this,t=u._scaleOptions,i=d(!0,{},u.option("sliderMarker")),f;return i.format||(!u.option("behavior").snapToTicks&&o(t.startValue)&&(f=Math.abs(t.endValue-t.startValue),i.format="fixedPoint",i.precision=e.getSignificantDigitPosition(f/n)),t.valueType===l&&(t.marker.visible?i.format=e.getDateUnitInterval(r(t.minorTickInterval)&&t.minorTickInterval!==0?t.minorTickInterval:t.majorTickInterval):r(t.startValue)&&r(t.endValue)&&(i.format=v.getDateFormatByTickInterval(t.startValue,t.endValue,t.minorTickInterval!==0?t.minorTickInterval:t.majorTickInterval)))),i},_updateScaleOptions:function(n,t,u){var f=this._scaleOptions,y=r(t.minVisible)?t.minVisible:t.min,p=r(t.maxVisible)?t.maxVisible:t.max,s=dt(f,u,this._incidentOccured,t.stick,y,p),o,a,c=f._categoriesInfo;!n||n.isEmpty()||t.stubData||(o=s.bounds,t.addRange(o),f.startValue=f.inverted?o.maxVisible:o.minVisible,f.endValue=f.inverted?o.minVisible:o.maxVisible),c&&(f.startValue=c.start,f.endValue=c.end),a=h(f.startValue)&&h(f.endValue)&&f.startValue.getTime()===f.endValue.getTime()||f.startValue===f.endValue,f.isEmpty=ft(f.startValue,f.endValue)||a,f.isEmpty?f.startValue=f.endValue=i:(f.minorTickInterval=s.minorTickInterval,f.majorTickInterval=s.majorTickInterval,f.valueType!==l||r(f.label.format)||(f.label.format=f.marker.visible?e.getDateUnitInterval(f.majorTickInterval):v.getDateFormatByTickInterval(f.startValue,f.endValue,f.majorTickInterval)))},_getStubTicks:function(n){return n.isEmpty=!0,["canvas_position_left","canvas_position_center","canvas_position_right"]},_getTickManagerOptions:function(n,t,i,r){var e=this;return{labelOptions:{},minorTickInterval:t?0:e.option("scale").minorTickInterval,tickInterval:n.majorTickInterval,addMinMax:{min:!0,max:!0},minorTickCount:n.minorTickCount,textOptions:{align:"center",font:n.label.font},textFontStyles:f.utils.patchFontOptions(n.label.font),incidentOccured:e._incidentOccured,isHorizontal:!0,renderText:function(n,t,i,r){return e._renderer.text(n,t,i,r).append(e._renderer.root)},getText:ft(i,r)?function(n){return n}:function(t){return u.formatValue(t,n.label)},translate:function(n){return e.translators.x.translate(n)},textSpacing:st,setTicksAtUnitBeginning:n.setTicksAtUnitBeginning,useTicksAutoArrangement:n.useTicksAutoArrangement,base:n.logarithmBase,stick:!0,showMinorTicks:!0,withMinorCorrection:!0}},_getTicksInfo:function(n){var s=this,t=s._scaleOptions,w=s.translators,h=t.isEmpty,l=w.x.getBusinessRange(),a=t._categoriesInfo,k={axisType:t.type,dataType:t.valueType},i,v=t.startValue,y=t.endValue,d=s._getTickManagerOptions(t,h,v,y),u,e,g,o,p,c;return i={min:h?l.min:v,max:h?l.max:y,screenDelta:n,customTicks:a&&a.categories},o=f.CoreFactory.createTickManager(k,i,d),c=t.type===b?!r(i.min)||!r(i.max):!r(i.min)&&!r(i.max),u=c&&!r(i.customTicks)?s._getStubTicks(t):o.getTicks(!0),e=o.getBoundaryTicks(),p=o.getFullTicks(),e.length&&(u[0].valueOf()===e[0].valueOf()&&u.splice(0,1),u[u.length-1].valueOf()===e[e.length-1].valueOf()&&u.pop()),{majorTicks:u,minorTicks:o.getMinorTicks(),majorTickInterval:o.getTickInterval(),fullTicks:p,customBoundaryTicks:e}},_createRenderer:function(){var n=this.option("renderer");return n?n:f.CoreFactory.createRenderer({pathModified:this.option("pathModified"),rtl:this.option("rtlEnabled")})},_getContainer:function(){return this.element()},getSelectedRange:function(){var t=this,n=t.rangeContainer.slidersContainer.getSelectedRange();return{startValue:n.startValue,endValue:n.endValue}},setSelectedRange:function(n){var i=this,t;!i._isUpdating&&n&&((t=i.rangeContainer.slidersContainer.getSelectedRange(),t&&t.startValue===n.startValue&&t.endValue===n.endValue)||i.rangeContainer.slidersContainer.setSelectedRange(n))},resetSelectedRange:function(n){var t=this;t.setSelectedRange({startValue:t._scaleOptions.startValue,endValue:t._scaleOptions.endValue,blockSelectedRangeChanged:n})},render:function(n){var t=this;return t.__forceRender=n,t.callBase.apply(t,arguments),delete t.__isResizing,t.__forceRender=null,t}}).include(t.ui.DataHelperMixin))}(jQuery,DevExpress),function(n,t){var r=t.viz.rangeSelector,f=r.baseVisualElementMethods,u,o=function(n){return r.rangeSelectorFactory.createSlidersContainer(n)},s=function(n){return r.rangeSelectorFactory.createScale(n)},h=function(n){return r.rangeSelectorFactory.createRangeView(n)},e=function(n,t){return{left:n.left-t.left,top:n.top-t.top,width:n.width+t.right+t.left,height:n.height+t.bottom+t.top}};u=function(n){f.init.apply(this,arguments),this.slidersContainer=o(n),this.rangeView=h(n),this.scale=s(n)},u.prototype=n.extend({},f,{constructor:u,dispose:function(){this.slidersContainer.dispose(),this.slidersContainer=null},_applyOptions:function(n){var t=this,i=n.scale.isEmpty,r={left:n.canvas.left,top:n.canvas.top,width:n.canvas.width,height:n.canvas.height>=n.scaleLabelsAreaHeight?n.canvas.height-n.scaleLabelsAreaHeight:0};t._viewCanvas=r,t.slidersContainer.applyOptions({canvas:r,translator:n.translators.x,scale:n.scale,selectedRange:n.selectedRange,sliderMarker:n.sliderMarker,sliderHandle:n.sliderHandle,shutter:n.shutter,behavior:n.behavior,selectedRangeChanged:n.selectedRangeChanged,isEmpty:i}),t.rangeView.applyOptions({canvas:r,translators:n.translators,background:n.background,chart:n.chart,seriesDataSource:n.seriesDataSource,behavior:n.behavior,isEmpty:i}),t.scale.applyOptions({canvas:n.canvas,translator:n.translators.x,scale:n.scale,hideLabels:i,scaleLabelsAreaHeight:n.scaleLabelsAreaHeight,setSelectedRange:n.setSelectedRange})},_draw:function(){var n=this,t,f,o,s,u,i=e(n._options.canvas,n._options.sliderMarkerSpacing),r=n._viewCanvas;n._clipRect=n._renderer.clipRect(i.left,i.top,i.width,i.height),t=n._renderer.g().attr({"class":"rangeContainer",clipId:n._clipRect.id}).append(n._renderer.root),n._viewClipRect=n._renderer.clipRect(r.left,r.top,r.width,r.height),f=n._renderer.g().attr({"class":"view",clipId:n._viewClipRect.id}).append(t),n.rangeView.redraw(f),o=n._renderer.g().attr({"class":"slidersContainer"}).append(t),n.slidersContainer.redraw(o),s=n._renderer.g().attr({"class":"scale"}).append(t),n.scale.redraw(s),u=n._renderer.g().attr({"class":"trackers"}).append(t),n._trackersGroup=u,n.slidersContainer.appendTrackers(u)},_update:function(){var n=this,t=e(n._options.canvas,n._options.sliderMarkerSpacing),i=n._viewCanvas;n._clipRect.attr({x:t.left,y:t.top,width:t.width,height:t.height}),n._viewClipRect.attr({x:i.left,y:i.top,width:i.width,height:i.height}),n.rangeView.redraw(),n.slidersContainer.redraw(),n.slidersContainer.appendTrackers(n._trackersGroup),n.scale.redraw()}}),r.RangeContainer=u}(jQuery,DevExpress),function(n,t,i){function c(n,t,i){for(var r={},e,u,f=0;f<t.length;f++)u=t[f],i.inverted?n<u.posX?r.endValue=u.date:r.startValue||(r.startValue=u.date):n>=u.posX?r.startValue=u.date:r.endValue||(r.endValue=u.date);return r.startValue=r.startValue||i.startValue,r.endValue=r.endValue||i.endValue,r}function v(n,t){var i=new Date(n.getTime()),r=0;switch(t){case"quarter":r=e.getFirstQuarterMonth(n.getMonth());case"month":i.setMonth(r);case"week":case"day":i.setDate(1);case"hour":i.setHours(0,0,0,0);break;case"millisecond":i.setMilliseconds(0);break;case"second":i.setSeconds(0,0);break;case"minute":i.setMinutes(0,0,0)}return i}function l(n,t){var i=t,u,f;if(i==="week"&&(i="day"),i==="quarter"&&(i="month"),n[i])for(f=0;f<r.dateUnitIntervals.length;f++)if(u=r.dateUnitIntervals[f],n[u]&&(n[u]=!1,n.count--),u===i)break}function a(n,t){var i={value:n,valueText:e.format(n,t.format,t.precision)};return String(r.isFunction(t.customizeText)?t.customizeText.call(i,i):i.valueText)}var s=t.viz,u=s.rangeSelector,e=t.formatHelper,r=t.utils,h=r.isDefined,y=5,f,o=u.baseVisualElementMethods;f=function(){o.init.apply(this,arguments)},f.prototype=n.extend({},o,{constructor:f,_setupDateUnitInterval:function(t){var u,o=function(t){var i=0;return n.each(t,function(){return++i<2}),i===1},e,i=t.ticksInfo.majorTickInterval,f=t.ticksInfo.majorTicks;if(t.valueType==="datetime"){if(f&&f.autoArrangementStep>1){r.isString(i)&&(i=r.getDateIntervalByString(i));for(u in i)i.hasOwnProperty(u)&&(i[u]*=f.autoArrangementStep,e=r.convertDateTickIntervalToMilliseconds(i));i=r.convertMillisecondsToDateUnits(e)}this.dateUnitInterval=r.getDateUnitInterval(i)}},_drawDateMarker:function(n,t){var r,u,f,i,e;if(t.x!==null)return i=this._options.scale,this._renderer.path([t.x,t.y,t.x,t.y+i.marker.separatorHeight],"line").attr(this.lineOptions).append(t.group),f=a(n,t.label),r=t.x+i.tick.width+i.marker.textLeftIndent,u=t.y+i.marker.textTopIndent+this.fontOptions["font-size"],this.textOptions.align="left",e=this._renderer.text(f,r,u).attr(this.textOptions).css(this.fontOptions).css(this.textStyles).append(t.group),r+e.getBBox().width},_drawDateMarkers:function(n,t){var c,i,f,o,u,h=-1,s;if(this._options.scale.valueType==="datetime"&&this.visibleMarkers&&(s=[],n.length>1)){for(i=1;i<n.length;i++)f=r.getDatesDifferences(n[i-1],n[i]),l(f,this.dateUnitInterval),f.count>0&&(o=v(n[i],this.dateUnitInterval),u=this.translator.translate(o),u>h&&(u!==null&&s.push({date:o,posX:u}),h=this._drawDateMarker(o,{group:t,y:this._options.canvas.top+this._options.canvas.height-this.markersAreaHeight+this._options.scale.marker.topIndent,x:u,label:this._getLabelFormatOptions(e.getDateFormatByDifferences(f))})));this._initializeMarkersEvents(s,t)}},_getLabelFormatOptions:function(t){return h(this._options.scale.marker.label.format)?this._options.scale.marker.label:n.extend({},this._options.scale.marker.label,{format:t})},_initializeMarkersEvents:function(t,i){var r=this,h=this._options.canvas.top+this._options.canvas.height-this.markersAreaHeight+this._options.scale.marker.topIndent,f,e,l,o,s;if(t.length>0){f=r._renderer.rect(r._options.canvas.left,h,r._options.canvas.width,r._options.scale.marker.separatorHeight).attr({fill:"grey",stroke:"grey",opacity:.0001}).append(i);n(f.element).on(u.events.start,function(n){e=u.utils.getRootOffsetLeft(r._renderer),o=u.utils.getEventPageX(n)-e,s=c(o,t,r._options.scale),r._options.setSelectedRange(s)});r._markersTracker=f}},_drawLabel:function(n,t){var i=this._options.canvas.top+this._options.canvas.height-this.markersAreaHeight,r=this._renderer.text(a(n,this._options.scale.label),this.translator.translate(n),i).attr(this.textOptions).css(this.fontOptions).css(this.textStyles);r.append(t)},_drawTick:function(n,t,i){var r=this,f=r._options.canvas.top+r._options.canvas.height-r.scaleLabelsAreaHeight,u=r.translator.translate(n,i),e=r._renderer.path([u,r._options.canvas.top,u,f],"line").attr(r.lineOptions).append(t)},_redraw:function(n){for(var i=this,r=i._options.scale,u=i._renderer.g(),s=i._renderer.g().append(n),f=r.ticksInfo.majorTicks,c=r.ticksInfo.minorTicks,l=r.ticksInfo.customBoundaryTicks,v=i._options.hideLabels||r.isEmpty||!r.label.visible,e=r.type==="discrete",a=e?-1:0,o=r._categoriesInfo,t=0;t<f.length;t++)v||i._drawLabel(f[t],s),i._drawTick(f[t],u,a);if(r.showMinorTicks||e)for(t=0;t<c.length;t++)i._drawTick(c[t],u,a);for(t=0;t<l.length;t++)i._drawTick(l[t],u);e&&o&&h(o.end)&&i._drawTick(o.end,u,1),u.append(n),i._drawDateMarkers(f,s)},_applyOptions:function(n){var t=n.scale,r;this.textOptions={align:"center"},this.textStyles={"-webkit-user-select":"none"},this.fontOptions=s.core.utils.patchFontOptions(t.label.font),this.lineOptions={"stroke-width":t.tick.width,stroke:t.tick.color,"stroke-opacity":t.tick.opacity,sharp:"h"},this._setupDateUnitInterval(t),this.visibleMarkers=t.marker.visible===i?!0:t.marker.visible,r=t.label.visible?t.label.topIndent+this.fontOptions["font-size"]:0,this.scaleLabelsAreaHeight=n.scaleLabelsAreaHeight,this.markersAreaHeight=this.scaleLabelsAreaHeight-r,this.translator=n.translator},_draw:function(n){this._redraw(n)},_update:function(){this._markersTracker&&n(this._markersTracker.element).off(u.events.start,"**"),o._update.apply(this,arguments)},_calculateRangeByMarkerPosition:c,_prepareDatesDifferences:l}),u.Scale=f}(jQuery,DevExpress),function(n,t){var r=t.viz.rangeSelector,u=t.viz.renderers;r.rangeSelectorFactory=function(){return{createRangeContainer:function(n){return new r.RangeContainer(n)},createSlidersContainer:function(n){return new r.SlidersContainer(n)},createScale:function(n){return new r.Scale(n)},createSliderMarker:function(n){return new r.SliderMarker(n)},createRangeView:function(n){return new r.RangeView(n)},createThemeManager:function(n){return new r.ThemeManager(n)},createSlider:function(n,t){return new r.Slider(n,t)},createSlidersEventsManager:function(n,t,i){return new r.SlidersEventsManager(n,t,i)},createSlidersController:function(n){return new r.SlidersController(n)}}}()}(jQuery,DevExpress),function(n,t){function f(){var n=this,t;c.init.apply(n,arguments),t=[n._createSlider(v),n._createSlider(y)],n._controller=n._createSlidersController(t),n._eventsManager=n._createSlidersEventsManager(n._controller),n._lastSelectedRange={}}var r=t.viz.rangeSelector,u=t.utils,a=window.navigator.msPointerEnabled||window.navigator.pointerEnabled,e=u.isNumber,o=u.isDate,s=u.isString,v=0,y=1,h=r.utils,c=r.baseVisualElementMethods,l={fill:"grey",stroke:"grey",opacity:.0001};f.prototype=n.extend({},c,{constructor:f,_drawAreaTracker:function(n){var i=this,r,u,t=i._options.canvas;r=i._renderer.rect(t.left,t.top,t.width,t.height).attr(l).append(n),u=i._renderer.rect(t.left,t.top,t.width,t.height).attr(l).css({cursor:"pointer"}).append(n),i._controller.setAreaTrackers(r,u)},dispose:function(){this._eventsManager.dispose(),this._controller.dispose(),this._eventManager=null},_processSelectionChanged:function(n,t){var i=this,f=function(n){return n&&i._lastSelectedRange.startValue===n.startValue&&i._lastSelectedRange.endValue===n.endValue},r=i.getSelectedRange();n&&(i._options.behavior.callSelectedRangeChanged||"").toLowerCase()!=="onmoving"||!i._options.selectedRangeChanged||f(r)||(i._updateLastSelectedRange(r),u.isFunction(i._options.selectedRangeChanged)&&i._options.selectedRangeChanged.call(null,r,t),n||f(r)||i.setSelectedRange(r))},_updateLastSelectedRange:function(n){n=n||this._options.selectedRange,this._lastSelectedRange={startValue:n.startValue,endValue:n.endValue}},_createSlider:function(n){return r.rangeSelectorFactory.createSlider(this._renderer,n)},_createSlidersController:function(n){return r.rangeSelectorFactory.createSlidersController(n)},_createSlidersEventsManager:function(n){var t=this;return r.rangeSelectorFactory.createSlidersEventsManager(t._renderer,n,function(n){t._processSelectionChanged(n)})},getSelectedRange:function(){return this._controller.getSelectedRange()},setSelectedRange:function(n){var i=this,r=i._options.scale,u,f,t=i._options.selectedRange,c=function(n,i){var u=r[n];(e(u)&&e(i)||o(u)&&o(i)||s(u)&&s(i))&&(t[n]=i)};n&&(u=n.startValue,f=n.endValue),c("startValue",u),c("endValue",f),t.startValue=h.truncateSelectedRange(t.startValue,r),t.endValue=h.truncateSelectedRange(t.endValue,r),i._controller.applySelectedRange(t),i._controller.applyPosition(),i._processSelectionChanged(!1,n&&n.blockSelectedRangeChanged)},appendTrackers:function(n){this._controller.appendTrackers(n)},_applyOptions:function(n){var t=this;t._controller.applyOptions({translator:n.translator,canvas:n.canvas,sliderMarker:n.sliderMarker,sliderHandle:n.sliderHandle,shutter:n.shutter,scale:n.scale,behavior:n.behavior}),t._eventsManager.applyOptions({behavior:n.behavior})},_draw:function(n){var t=this,i;a&&(i=t._renderer.root,i&&i.css({msTouchAction:"pinch-zoom"})),t._controller.redraw(n),t._drawAreaTracker(n),t._eventsManager.initialize(),t._update()},_update:function(){var n=this,t=n._options.isEmpty;n._eventsManager.setEnabled(!t),n._controller.applySelectedRange(t?{}:n._options.selectedRange),n._controller.applyPosition(n.isDrawn()),n._updateLastSelectedRange(),n._controller.redraw()}}),r.SlidersContainer=f}(jQuery,DevExpress),function(n,t,i){var e=t.viz.rangeSelector,s=t.utils,h=e.utils,f,r=0,u=1,o="discrete";f=e.SlidersController=function(n){this._sliders=n,n[r].setAnotherSlider(n[u]),n[u].setAnotherSlider(n[r])},f.prototype={constructor:f,setAreaTrackers:function(n,t){this._areaTracker=n,this._selectedAreaTracker=t},applyOptions:function(n){var i=this,t=null,f=i.getSlider(r),e=i.getSlider(u),s=n.scale;i._options=n,f.applyOptions(n),e.applyOptions(n),n.behavior.snapToTicks&&s.type!==o&&(t=s.ticksInfo.fullTicks,t.length>1&&t[0]>t[t.length-1]&&(t=t.reverse())),f.setAvailableValues(t),e.setAvailableValues(t)},processDocking:function(n){var t=this;n!==i?t.getSlider(n).processDocking():(t.getSlider(r).processDocking(),t.getSlider(u).processDocking()),t.setTrackersCursorStyle("default"),t.applyAreaTrackersPosition()},getSelectedRangeInterval:function(){var n=this;return n.getSlider(u).getPosition()-n.getSlider(r).getPosition()},moveSliders:function(n,t){var i=this,u=i.getSlider(r),f;u.setPosition(u.getPosition()+n,!1,t),i.applyPosition(!0)},moveSlider:function(n,t,i,u,f,e){var o=this,s=o.getSlider(n),h=s.getAnotherSlider(),c;s.canSwap()&&(n===r?i>h.getPosition():i<h.getPosition())&&(c=t,t||Math.abs(u)>=Math.abs(f)&&u*f<0&&(c=!0,i+=2*f,e(-f)),c&&(o.swapSliders(),h.applyPosition(!0))),s.setPosition(i,!0),s.applyPosition(!0),o.applyAreaTrackersPosition(),o.setTrackersCursorStyle("w-resize")},applySelectedAreaCenterPosition:function(n){var t=this,i=t.getSlider(r),f=(t.getSlider(u).getPosition()-i.getPosition())/2,e=t.getSelectedRangeInterval();i.setPosition(n-f,!1,e),t.applyPosition(),t.processDocking()},processManualSelection:function(n,t,i){var e=this,o,f,s=[Math.min(n,t),Math.max(n,t)];o=n<t?r:u,f=n<t?u:r,e.getSlider(f).setPosition(s[f]),e.getSlider(o).setPosition(s[o]),e.getSlider(f).setPosition(s[f],!0),e.getSlider(f).startEventHandler(i),e.getSlider(o).processDocking(),e.getSlider(f).applyPosition(!0)},applySelectedRange:function(n){var h=this,f=h._options.scale,l=f.inverted,a=h.getSlider(r),v=h.getSlider(u),t=n.startValue,i=n.endValue,e,c=function(n,t,i){(i?v:a).setValue(n),(i?a:v).setValue(t)};f.type!==o?!l&&t>i||l&&t<i?c(t,i,!0):c(t,i):(e=s.getCategoriesInfo(f._categoriesInfo.categories,t,i),c(e.start,e.end,e.inverted^f.inverted))},getSelectedRange:function(){var n=this;return{startValue:n.getSlider(r).getValue(),endValue:n.getSlider(u).getValue()}},swapSliders:function(){var n=this;n._sliders.reverse(),n.getSlider(r).changeLocation(),n.getSlider(u).changeLocation()},applyAreaTrackersPosition:function(){var n=this,t=n.getSelectedRange(),i=n._options.scale,f=n.getSlider(r),e=n.getSlider(u).getPosition()-f.getPosition(),o={x:f.getPosition(),width:e<0?0:e,y:n._options.canvas.top,height:n._options.canvas.height},s={cursor:i.endValue-i.startValue==t.endValue-t.startValue?"default":"pointer"};n._selectedAreaTracker.attr(o).css(s),n._areaTracker.attr({x:n._options.canvas.left,width:n._options.canvas.width,y:n._options.canvas.top,height:n._options.canvas.height})},applyPosition:function(n){var t=this;t.getSlider(r).applyPosition(n),t.getSlider(u).applyPosition(n),t.applyAreaTrackersPosition()},redraw:function(n){var t=this;t.getSlider(r).redraw(n),t.getSlider(u).redraw(n)},appendTrackers:function(n){var t=this;t._areaTracker&&t._selectedAreaTracker&&(t._areaTracker.append(n),t._selectedAreaTracker.append(n)),t.getSlider(r).appendTrackers(n),t.getSlider(u).appendTrackers(n)},getSlider:function(n){return this._sliders[n]},getAreaTracker:function(){return this._areaTracker},getSelectedAreaTracker:function(){return this._selectedAreaTracker},setTrackersCursorStyle:function(n){var t=this;t._selectedAreaTracker.css({cursor:n}),t._areaTracker.css({cursor:n})},dispose:function(){var n=this._sliders;n[0].dispose(),n[1].dispose()}}}(jQuery,DevExpress),function(n,t,i){var e=t.viz.rangeSelector,p=t.utils,l=10,s=0,a=1,h=t.ui.events.addNamespace,v=function(){var n=window,t="ontouchstart"in n,i=n.navigator.msPointerEnabled,r=n.navigator.pointerEnabled;e.events={start:r?"pointerdown":i?"MSPointerDown":t?"touchstart mousedown":"mousedown",move:r?"pointermove":i?"MSPointerMove":t?"touchmove mousemove":"mousemove",end:r?"pointerup pointercancel":i?"MSPointerUp MSPointerCancel":t?"touchend mouseup":"mouseup"}},c,r=e.utils.getEventPageX,y=0;v();var u=function(n){var r=n||window.event,t=r.originalEvent,f=r.touches,u=t?t.pointerType:!1,e=t?t.touches:!1,o=r.which===i&&r.button===1,s=t&&u!==i&&(u===(t.MSPOINTER_TYPE_TOUCH||"touch")||u===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&t.buttons===1),h=o||r.which===1,c=f&&f.length>0||e&&e.length>0;return h||s||c},o=function(n){var t=n.originalEvent,i=n.touches,r=t?t.touches:!1;return i&&i.length>1||r&&r.length>1||null},f=function(n){return n&&n.type&&n.type.indexOf("touch")===0};c=e.SlidersEventsManager=function(n,t,i){var r=this,u=r._uniqueNS="dx-range-selector_"+y++,f=e.events;r._renderer=n,r._slidersController=t,r._processSelectionChanged=i,r._enabled=!0,r._eventsNames={start:h(f.start,u),move:h(f.move,u),end:h(f.end,u)}},c.prototype={constructor:c,_getRootOffsetLeft:function(){return e.utils.getRootOffsetLeft(this._renderer)},_initializeSliderEvents:function(t){var s=this,v,h=s._slidersController,l=s._processSelectionChanged,i=h.getSlider(t),b=i.getAnotherSlider(),y,c,e,p=function(){e&&(e=!1,h.processDocking(),l(!1))},w=function(n){var k,t,a,p=s._getRootOffsetLeft(),w,b=i.getIndex();v===f(n)&&(!u(n,!0)&&e?(e=!1,h.processDocking(),l(!1)):e&&(o(n)||n.preventDefault(),t=r(n),w=t-c-p,a=t-i.getPosition()-p,h.moveSlider(b,y,w,a,c,function(n){c=n}),l(!0)))},a=s._eventsNames;i.startEventHandler=function(n){s._enabled&&u(n)&&!e&&(y=this===i.getSliderTracker().element,e=!0,v=f(n),c=r(n)-i.getPosition()-s._getRootOffsetLeft(),o(n)||(n.stopPropagation(),n.preventDefault()))};i.on(a.start,i.startEventHandler);n(document).on(a.end,p).on(a.move,w)},_initializeAreaEvents:function(){var t=this,c,o=t._slidersController,s=t._processSelectionChanged,a=o.getAreaTracker(),i=!1,p=!1,e,v=function(n){var u;i&&(u=r(n),t._options.behavior.moveSelectedRangeByClick&&Math.abs(e-u)<l&&o.applySelectedAreaCenterPosition(u-t._getRootOffsetLeft()),i=!1,s(!1))},y=function(n){var h,a,v,y=t._getRootOffsetLeft();c===f(n)&&(i&&!u(n)&&(i=!1,s(!1)),i&&(h=r(n),t._options.behavior.manualRangeSelectionEnabled&&Math.abs(e-h)>=l&&(a=e-y,v=h-y,o.processManualSelection(a,v,n),i=!1,s(!0))))},h=t._eventsNames;n(a.element).on(h.start,function(n){t._enabled&&u(n)&&!i&&(i=!0,c=f(n),e=r(n))});n(document).on(h.end,v).on(h.move,y)},_initializeSelectedAreaEvents:function(){var e=this,l,t=e._slidersController,h=e._processSelectionChanged,y=t.getSelectedAreaTracker(),i=!1,a,v,p=function(){i&&(i=!1,t.processDocking(),h(!1))},w=function(n){var e,c;l===f(n)&&(i&&!u(n)&&(i=!1,t.processDocking(),h(!1)),i&&(o(n)||n.preventDefault(),c=r(n),e=c-t.getSlider(s).getPosition()-a,t.moveSliders(e,v),h(!0)))},c=e._eventsNames;n(y.element).on(c.start,function(n){e._enabled&&u(n)&&!i&&(i=!0,l=f(n),a=r(n)-t.getSlider(s).getPosition(),v=t.getSelectedRangeInterval(),o(n)||(n.stopPropagation(),n.preventDefault()))});n(document).on(c.end,p).on(c.move,w)},applyOptions:function(n){this._options=n},dispose:function(){n(document).off("."+this._uniqueNS)},initialize:function(){var n=this;n._initializeSelectedAreaEvents(n),n._initializeAreaEvents(),n._initializeSliderEvents(s),n._initializeSliderEvents(a)},setEnabled:function(n){this._enabled=n}}}(jQuery,DevExpress),function(n,t,i){function b(n,t,i){return Math.abs(t-n)<i}function k(n,t,i,r){var u=v(t,n);return u===0||u===n.length-1?i:n[u-r]}function c(n,t){a.init.apply(this,arguments),this._index=t}var u=t.viz.rangeSelector,e=t.utils,s=u.utils,v=n.inArray,y="ontouchstart"in window,p=window.navigator.msPointerEnabled||window.navigator.pointerEnabled,h={duration:250},l=8,w=20,r=0,f=1,o="discrete",a=u.baseVisualElementMethods;c.prototype=n.extend({},a,{constructor:c,_createSlider:function(){var n=this,i,t,r=n._options.sliderHandle;return t=n._renderer.g().attr({"class":"slider",translateX:n._options.canvas.left,translateY:n._options.canvas.top}),i=n._renderer.path([0,0,0,n._options.canvas.height],"line").attr({"class":"dx-range-selector-slider","stroke-width":r.width,stroke:r.color,"stroke-opacity":r.opacity,sharp:"h"}).append(t),t.setValid=function(t){i.attr({stroke:t?n._options.sliderHandle.color:n._options.sliderMarker.invalidRangeColor})},t.updateHeight=function(){i.attr({points:[0,0,0,n._options.canvas.height]})},t.applyOptions=function(n){i.attr(n)},t},_createSliderTracker:function(){var n=this,i=n._options.sliderHandle.width,f=l<i?i:l,r=y||p?w:f,u,t;return t=n._renderer.g().attr({"class":"sliderTracker",translateX:0,translateY:n._options.canvas.top}),u=n._renderer.rect(-r/2,0,r,n._options.canvas.height).attr({fill:"grey",stroke:"grey",opacity:.0001}).css({cursor:"w-resize"}).append(t),t.updateHeight=function(){u.attr({height:n._options.canvas.height})},t},_drawSliderTracker:function(n){var i=this,t=i._createSliderTracker();t&&(t.append(n),i._sliderTracker=t)},_createSliderMarker:function(n){return u.rangeSelectorFactory.createSliderMarker(n)},_setPosition:function(n,t){var i=this,r=i._correctPosition(n),u=i._options.translator.untranslate(r,i._getValueDirection());i.setValue(u,t,!1),i._position=r},_getValueDirection:function(){return this._options.scale.type===o?this.getIndex()===r?-1:1:0},_setPositionForBothSliders:function(n,t){var r=this,h=r.getAnotherSlider(),u,f,o,c=r._options,v=c.scale,y=c.canvas,p=y.left+y.width,l=c.translator,a=r._getValueDirection(),w=h._getValueDirection(),s=function(n,i,u){var f=u?w:a,o=u?a:w;return l.untranslate(r._correctBounds(e.addInterval(l.translate(n,f),t,i)),o)};n=r._correctBounds(n),u=l.untranslate(n,a),f=s(u),o=n+t,o>p?(f=v.endValue,o=p,u=s(f,!0,!0),n=r._correctBounds(o-t)):o=r._correctBounds(o),r._values&&((v.inverted?u>r._values[r._values.length-1]:u<r._values[0])?(u=r._correctByAvailableValues(u,!1),f=s(u)):(f=r._correctByAvailableValues(f,!1),u=s(f,!0))),h.setValue(f,i,!1),r.setValue(u,i,!1),r._position=n,h._position=o},_correctPosition:function(n){var i=this,t=i._correctInversion(n);return t=i._correctBounds(t)},_correctInversion:function(n){var i=this,u=n,t=i.getAnotherSlider().getPosition(),f=i.getIndex()===r?n>t:n<t;return f&&(u=t),u},_correctBounds:function(n){var r=this,i=n,t=r._options.canvas;return n<t.left&&(i=t.left),n>t.left+t.width&&(i=t.left+t.width),i},_correctValue:function(n,t,i){var u=this,r=u._correctByAvailableValues(n,i);return t&&(r=u._correctByMinMaxRange(r)),u._options.scale.type!==o&&(r=u.correctByMinRange(r)),r},_correctByAvailableValues:function(n,t){var i=this._values;return!t&&i?s.findNearValue(i,n):n},_correctByMinMaxRange:function(n){var t=this,u=n,e=t._options.scale,l=t._values,w=t.getIndex(),d=t.getAnotherSlider(),a=d.getValue(),v=!0,h,c,y=e.maxRange,p=e.minRange,g;return e.type===o?(g=e._categoriesInfo,b(t.getPosition(),d.getPosition(),t._options.translator.getInterval()/2)&&(v=!1,u=k(g.categories,n,d.getValue(),w===r?1:-1))):(!e.inverted&&w===r||e.inverted&&w===f?(y&&(h=t._addInterval(a,y,!0)),p&&(c=t._addInterval(a,p,!0))):(y&&(c=t._addInterval(a,y)),p&&(h=t._addInterval(a,p))),c!==i&&u>c?(u=l?s.findLessOrEqualValue(l,c):c,v=!1):h!==i&&u<h&&(u=l?s.findGreaterOrEqualValue(l,h):h,v=!1)),t._setValid(v),u},_addInterval:function(n,t,i){var r,o=this._options.scale.type,u=o==="logarithmic"&&this._options.scale.logarithmBase,f;return u?(f=e.addInterval(e.getLog(n,u),t,i),r=Math.pow(u,f)):r=e.addInterval(n,t,i),r},correctByMinRange:function(n){var u=this,s=u._values,e,o,h=!0,t=u._options.scale,i=n;return t.minRange&&(u.getIndex()===f?(e=u._addInterval(t.startValue,t.minRange,t.inverted),(!t.inverted&&i<e||t.inverted&&i>e)&&(i=e)):u.getIndex()===r&&(o=u._addInterval(t.endValue,t.minRange,!t.inverted),(!t.inverted&&i>o||t.inverted&&i<o)&&(i=o))),i},_applySliderPosition:function(n,t){var i=this,u=i._options.behavior.animationEnabled&&!t,f=i._slider,r={translateX:n,translateY:i._options.canvas.top};u?(f.animate(r,h),i._sliderTracker.animate(r,h)):(i._slider.stopAnimation().attr(r),i._sliderTracker.stopAnimation().attr(r)),i._sliderTracker.updateHeight(),i._slider.updateHeight()},_applyShutterPosition:function(n,t){var e=this,u,o=e._shutter,c=e._options.behavior.animationEnabled&&!t,s=e.getIndex(),i=e._options.canvas;s===r?u={x:i.left,y:i.top,width:n-i.left,height:i.height}:s===f&&(u={x:n+1,y:i.top,width:i.left+i.width-n,height:i.height}),u&&(c?o.animate(u,h):o.stopAnimation().attr(u))},_setValid:function(n){var t=this._marker;t&&t.setValid(n),this._slider.setValid(n)},_setText:function(n){var t=this._marker;t&&t.setText(n)},_update:function(){var n=this,t=n._options,r=t.shutter,i=t.sliderHandle,u=n._marker;u&&u.applyOptions(t.sliderMarker),n._shutter&&n._shutter.attr({fill:r.color,"fill-opacity":r.opacity}),n._slider&&n._slider.applyOptions({"stroke-width":i.width,stroke:i.color,"stroke-opacity":i.opacity})},_draw:function(n){var t=this,i,e,o,u,h,c,s=t.getIndex();o=t._renderer.g().attr({"class":"sliderArea"}).append(n),s===r?u=t._renderer.rect(t._options.canvas.left,t._options.canvas.top,0,t._options.canvas.height):s===f&&(u=t._renderer.rect(t._options.canvas.left,t._options.canvas.top,t._options.canvas.width,t._options.canvas.height)),u&&(u.append(o),i=t._createSlider(),i&&i.append(o),t._options.sliderMarker.visible&&(e=t._createSliderMarker({renderer:t._renderer,isLeftPointer:s===f,sliderMarkerOptions:t._options.sliderMarker}),e.draw(i)),t._shutter=u,t._slider=i,t._marker=e),t._drawSliderTracker(n)},_applyOptions:function(){this._lastPosition=null},getIndex:function(){return this._index},setAvailableValues:function(n){this._values=n},setAnotherSlider:function(n){this._anotherSlider=n},getAnotherSlider:function(){return this._anotherSlider},appendTrackers:function(n){var t=this._sliderTracker;t&&t.append(n)},getSliderTracker:function(){return this._sliderTracker},changeLocation:function(){var n=this,t=n._marker;t&&t.changeLocation(),n._index=n._index===r?f:r,n._options.scale.type===o&&n.setPosition(n._position),n._lastPosition=null},setPosition:function(n,t,u){var f=this,e;u!==i?(e=f.getIndex()===r?f:f.getAnotherSlider(),e._setPositionForBothSliders(n,u)):f._setPosition(n,t)},getPosition:function(){return this._position},setValue:function(n,t,f){var o=this,s=o._options,h=s.canvas;n===i?(o._value=i,o._valuePosition=o._position=o.getIndex()===r?h.left:h.left+h.width,o._setText(u.consts.emptySliderMarkerText)):(o._value=o._correctValue(n,t,e.isDefined(f)?!!f:!0),o._valuePosition=o._position=s.translator.translate(o._value,o._getValueDirection()),o._setText(u.formatValue(o._value,s.sliderMarker)))},getValue:function(){return this._value},canSwap:function(){var t=this,n=t._options.scale,u,f,i;if(t._options.behavior.allowSlidersSwap){if(n.minRange)if(i=t.getAnotherSlider().getValue(),t.getIndex()===r){if(f=t._addInterval(n.endValue,n.minRange,!n.inverted),!n.inverted&&i>f||n.inverted&&i<f)return!1}else if(u=t._addInterval(n.startValue,n.minRange,n.inverted),!n.inverted&&i<u||n.inverted&&i>u)return!1;return!0}return!1},processDocking:function(){var n=this;n._position=n._valuePosition,n.applyPosition(!1),n._setValid(!0)},applyPosition:function(n){var t=this,i=t.getPosition();t._lastPosition!==i&&(t._applySliderPosition(i,n),t._applyShutterPosition(i,n),t._lastPosition=i)},on:function(t,i){var r=this,u=r._marker,f=u&&u.getTracker(),e=r._sliderTracker;e&&n(e.element).on(t,i),f&&n(f.element).on(t,i)},dispose:function(){var n=this._marker;n&&n.dispose()}}),u.Slider=c}(jQuery,DevExpress),function(n,t){var f=t.viz,e=f.core,o=f.rangeSelector,r,h=75;r=o.SliderMarker=function(t){var i=this;i._renderer=t.renderer,i._text=t.text,i._isLeftPointer=t.isLeftPointer,i._options=n.extend(!0,{},t.sliderMarkerOptions),i._options.textFontStyles=e.utils.patchFontOptions(i._options.font),i._isValid=!0,s(i,{width:10,height:10})};var u=function(n,t){return{width:Math.round(2*n._options.padding+t.width),height:Math.round(2*n._options.padding+t.height*o.consts.fontHeightRatio)}},s=function(n,t){var i=u(n,t);n._points=n._isLeftPointer?[0,0,i.width,0,i.width,i.height,n._options.pointerSize,i.height,0,i.height+n._options.pointerSize]:[0,0,i.width,0,i.width,i.height+n._options.pointerSize,i.width-n._options.pointerSize,i.height,0,i.height]},c=function(n,t){var i=u(n,t);return n._isLeftPointer?{x:0,y:i.height+n._options.pointerSize}:{x:i.width-1,y:i.height+n._options.pointerSize}},l=function(n){var t=n._label.getBBox();return!n._textHeight&&isFinite(t.height)&&(n._textHeight=t.height),{width:t.width,height:n._textHeight}};r.prototype={constructor:r,draw:function(t){var i=this,r=i._options.padding;i._sliderMarkerGroup=i._renderer.g().attr({"class":"sliderMarker"}).append(t),i._area=i._renderer.path(i.points,"area").attr({fill:i._options.color}).append(i._sliderMarkerGroup),i._label=i._renderer.text(i._text,r,r).attr({align:"left"}).css(n.extend({"-webkit-user-select":"none"},i._options.textFontStyles)).append(i._sliderMarkerGroup),i._tracker=i._renderer.rect(0,0,2*r,2*r+i._options.pointerSize).attr({fill:"grey",stroke:"grey",opacity:.0001}).css({cursor:"pointer"}).append(i._sliderMarkerGroup),i._drawn=!0,i.update()},update:function(n){var t=this,i,r,f;(clearInterval(t._interval),t._interval=null,t._drawn)&&(t._label.attr({text:t._text||""}),i=l(t),n?delete t._textSize:(t._textSize=t._textSize||i,t._textSize=i.width>t._textSize.width||i.height>t._textSize.height?i:t._textSize,i=t._textSize,t._interval=setInterval(function(){t.update(!0)},h)),r=u(t,i),f=c(t,i),t._sliderMarkerGroup.attr({translateX:-f.x,translateY:-f.y}),s(t,i),t._area.attr({points:t._points,fill:t._isValid?t._options.color:t._options.invalidRangeColor}),t._tracker.attr({width:r.width,height:r.height+t._options.pointerSize}),t._label.attr({x:t._options.padding,y:r.height-t._options.padding}))},getText:function(){return this._text},setText:function(n){var t=this;t._text!==n&&(t._text=n,t.update())},changeLocation:function(){var n=this;n._isLeftPointer=!n._isLeftPointer,n.update()},applyOptions:function(t){var i=this;i._options=n.extend(!0,{},t),i._options.textFontStyles=e.utils.patchFontOptions(i._options.font),i.update()},getTracker:function(){return this._tracker},setValid:function(n){var t=this;t._isValid=n,t.update()},dispose:function(){clearInterval(this._interval)}}}(jQuery,DevExpress),function(n,t){var u=t.viz.rangeSelector,r,f=u.baseVisualElementMethods;r=function(){f.init.apply(this,arguments)},r.prototype=n.extend({},f,{constructor:r,_draw:function(n){var s=this,c,l,f,u,r,e,i,t=s._options,a,h=t.isEmpty,o=s._renderer;if(e=t.seriesDataSource&&t.seriesDataSource.isShowChart()&&!h,i=t.canvas,e?f=t.seriesDataSource.getBackgroundColor():!h&&t.background.visible&&(f=t.background.color),t.background.visible&&f&&(c=o.rect(i.left,i.top,i.width+1,i.height).attr({fill:f,"class":"dx-range-selector-background"}).append(n)),t.background.visible&&t.background.image&&t.background.image.url&&(l=o.image(i.left,i.top,i.width+1,i.height,t.background.image.url,t.background.image.location).append(n)),e)for(u=t.seriesDataSource.getSeries(),t.seriesDataSource.adjustSeriesDimensions(t.translators,t.chart.useAggregation),r=0;r<u.length;r++)u[r]._extGroups.seriesGroup=n,u[r]._extGroups.labelsGroup=n,u[r].draw(t.translators,t.behavior&&t.behavior.animationEnabled&&o.animationEnabled())}}),u.RangeView=r}(jQuery,DevExpress),function(n,t,i){var o=t.viz.rangeSelector,s=t.viz.charts,u=t.viz.core,e=u.CoreFactory,r=t.utils,f,h=function(n){return s.factory.createThemeManager(n,"rangeSelector.chart")},c=function(t){return n.isArray(t)&&t.length>0&&(r.isNumber(t[0])||r.isDate(t[0]))},l=function(t){return n.map(t,function(n,t){return{arg:n,val:t}})},a=function(t,i,r,u){var o=[],f=[];return n.each(t,function(t,i){n.inArray(i.type,f)===-1&&f.push(i.type)}),n.each(f,function(n,f){var s=new e.createSeriesFamily({type:f,equalBarWidth:i,minBubbleSize:r,maxBubbleSize:u});s.add(t),s.adjustSeriesValues(),o.push(s)}),o},v=function(t){var r=["bar","candlestick","stock","bubble"],i=!0;return t=t.toLowerCase(),n.each(r,function(n,r){if(t.indexOf(r)!==-1)return i=!1,!1}),i};f=o.SeriesDataSource=function(n){var t=this,o,u,i=t.themeManager=h(n.chart),f=i.getOptions("topIndent"),e=i.getOptions("bottomIndent");t._indent={top:f>=0&&f<1?f:0,bottom:e>=0&&e<1?e:0},t._valueAxis=i.getOptions("valueAxisRangeSelector")||{},t._hideChart=!1,u=i.getOptions("seriesTemplate"),n.dataSource&&u&&(o=r.processSeriesTemplate(u,n.dataSource)),t._series=t._calculateSeries(n,o),t._seriesFamilies=a(t._series,i.getOptions("equalBarWidth"),i.getOptions("minBubbleSize"),i.getOptions("maxBubbleSize"))},f.prototype={constructor:f,_calculateSeries:function(t,r){var o=this,a=[],v,y,h,p,g,w=o.themeManager,d=!!w.getOptions("seriesTemplate"),f=d?r:t.chart.series,tt=t.chart.valueAxis&&t.chart.valueAxis.valueType,b,s,k,nt;for(o.teamplateData=[],t.dataSource&&!f&&(c(t.dataSource)&&(t.dataSource=l(t.dataSource)),b=t.dataSourceField||"arg",f={argumentField:b,valueField:b},o._hideChart=!0),f=n.isArray(f)?f:f?[f]:[],o._backgroundColor=t.backgroundColor!==i?t.backgroundColor:w.getOptions("backgroundColor"),s=0;s<f.length;s++)v=n.extend(!0,{incidentOccured:t.incidentOccured},f[s]),v.rotated=!1,h=v.data||t.dataSource,y=w.getOptions("series",v),y.argumentField=y.argumentField||t.dataSourceField,h&&h.length>0&&(k=e.createSeries({renderer:t.renderer},y),a.push(k)),d&&(n.each(h,function(t,i){n.each(k.getTeamplatedFields(),function(n,t){i[t.teamplateField]=i[t.originalField]}),o.teamplateData.push(i)}),k.updateTeamplateFieldNames());for(h=d?o.teamplateData:h,p=[a],p.argumentOptions={categories:t.categories,argumentType:t.valueType,type:t.axisType},p[0].valueOptions={valueType:b?t.valueType:tt},o._dataValidator=u.CoreFactory.createDataValidator(h,p,t.incidentOccured,w.getOptions("dataPrepareSettings")),g=o._dataValidator.validate(),s=0;s<a.length;s++)nt=a[s],nt.updateData(g);return a},adjustSeriesDimensions:function(t,i){var r=this;i&&n.each(r._series||[],function(n,i){i.resamplePoints(t.x)}),n.each(r._seriesFamilies,function(n,i){i.adjustSeriesDimensions({arg:t.x,val:t.y})})},getBoundRange:function(){var f=this,l,a=f._valueAxis.min,y=f._valueAxis.max,t=new u.Range({isValueRange:!0,min:a,minVisible:a,max:y,maxVisible:y,axisType:f._valueAxis.type,base:f._valueAxis.logarithmBase}),o=new u.Range({}),e,s,p,h,c;return n.each(f._series,function(n,i){l=i.getRangeData(),t.addRange(l.val),o.addRange(l.arg),v(i.type)||o.addRange({stick:!1})}),t.isDefined()&&o.isDefined()&&(h=f._valueAxis.inverted?f._indent.top:f._indent.bottom,c=f._valueAxis.inverted?f._indent.bottom:f._indent.top,e=t.max-t.min,s=(n.isNumeric(t.maxVisible)?t.maxVisible:t.max)-(n.isNumeric(t.minVisible)?t.minVisible:t.min),r.isDate(t.min)?t.min=new Date(t.min.valueOf()-e*h):t.min-=e*h,r.isDate(t.max)?t.max=new Date(t.max.valueOf()+e*c):t.max+=e*c,n.isNumeric(s)&&(t.maxVisible=t.maxVisible?t.maxVisible+s*c:i,t.minVisible=t.minVisible?t.minVisible-s*h:i),t.invert=f._valueAxis.inverted),{arg:o,val:t}},getSeries:function(){var n=this;return n._series},getBackgroundColor:function(){var n=this;return n._backgroundColor},isEmpty:function(){var n=this;return n.getSeries().length===0},isShowChart:function(){var n=this;return!n.isEmpty()&&!n._hideChart},getCalculatedValueType:function(){var n=this,t;return n._series.length&&(t=n._series[0].argumentType),t}}}(jQuery,DevExpress),function(n,t){t.viz.rangeSelector.ThemeManager=t.viz.core.BaseThemeManager.inherit({_themeSection:"rangeSelector",_fontFields:["scale.label.font","sliderMarker.font","loadingIndicator.font"],ctor:function(n){this.setTheme(n)},applyRangeSelectorTheme:function(t){var u=this,r=t.chart,f=t.dataSource,i;return delete t.dataSource,delete t.chart,i=n.extend(!0,{},u._theme,t),t.dataSource=i.dataSource=f,r&&(t.chart=i.chart=r),i},setBackgroundColor:function(n){var t=this._theme;n&&(t.containerBackgroundColor=n),t.shutter.color=t.shutter.color||t.containerBackgroundColor}})}(jQuery,DevExpress),DevExpress.MOD_VIZ_RANGESELECTOR=!0}if(!DevExpress.MOD_VIZ_VECTORMAP){if(!DevExpress.MOD_VIZ_CORE)throw Error("Required module is not referenced: viz-core");(function(n,t,i){function l(){return"vectormap-data-"+c++}function f(){this._store={}}var u;n.viz.map={};var a=Number,v=n.utils.isFunction,r=n.utils.getRootOffset,e=n.viz.core.utils.parseScalar,s=800,h=400,o=t.extend,c=1;u=n.viz.core.BaseWidget.inherit({_eventsMap:o({},n.viz.core.BaseWidget.prototype._eventsMap,{onClick:{name:"click",deprecated:"click",deprecatedContext:function(n){return n.component},deprecatedArgs:function(n){return[n.jQueryEvent]}},click:{newName:"onClick"},onCenterChanged:{name:"centerChanged",deprecated:"centerChanged",deprecatedContext:function(n){return n.component},deprecatedArgs:function(n){return[n.center]}},centerChanged:{newName:"onCenterChanged"},onZoomFactorChanged:{name:"zoomFactorChanged",deprecated:"zoomFactorChanged",deprecatedContext:function(n){return n.component},deprecatedArgs:function(n){return[n.zoomFactor]}},zoomFactorChanged:{newName:"onZoomFactorChanged"},onAreaClick:{name:"areaClick",deprecated:"areaSettings.click",deprecatedContext:function(n){return n.target},deprecatedArgs:function(n){return[n.target,n.jQueryEvent]}},onAreaHoverChanged:{name:"areaHoverChanged"},onAreaSelectionChanged:{name:"areaSelectionChanged",deprecated:"areaSettings.selectionChanged",deprecatedContext:function(n){return n.target},deprecatedArgs:function(n){return[n.target]}},onMarkerClick:{name:"markerClick",deprecated:"markerSettings.click",deprecatedContext:function(n){return n.target},deprecatedArgs:function(n){return[n.target,n.jQueryEvent]}},onMarkerHoverChanged:{name:"markerHoverChanged"},onMarkerSelectionChanged:{name:"markerSelectionChanged",deprecated:"markerSettings.selectionChanged",deprecatedContext:function(n){return n.target},deprecatedArgs:function(n){return[n.target]}}}),_setDeprecatedOptions:function(){this.callBase(),t.extend(this._deprecatedOptions,{click:{since:"14.2",message:'Use the "onClick" option instead'},centerChanged:{since:"14.2",message:'Use the "onCenterChanged" option instead'},zoomFactorChanged:{since:"14.2",message:'Use the "onZoomFactorChanged" option instead'},"areaSettings.click":{since:"14.2",message:'Use the "onAreaClick" option instead'},"areaSettings.selectionChanged":{since:"14.2",message:'Use the "onAreaSelectionChanged" option instead'},"markerSettings.click":{since:"14.2",message:'Use the "onMarkerClick" option instead'},"markerSettings.selectionChanged":{since:"14.2",message:'Use the "onMarkerSelectionChanged" option instead'},"tooltip.borderColor":{since:"14.1",message:'Use the "border.color" option instead'},"markerSettings.font":{since:"14.2",message:'Use the "label.font" option instead'}})},_initThemeManager:function(){this._themeManager=this._factory.createThemeManager(),this._themeManager.setTheme(this.option("theme"),this.option("rtlEnabled"))},_initBackground:function(n){this._background=this._renderer.rect(0,0,0,0).attr({"class":"dxm-background"}),t(this._background.element).data(n,{type:"background"})},_initAreasManager:function(n){var t=this;t._areasManager=t._factory.createAreasManager({container:t._root,renderer:t._renderer,projection:t._projection,themeManager:t._themeManager,tracker:t._tracker,dataKey:n,eventTrigger:t._eventTrigger,dataExchanger:t._dataExchanger,ready:function(){t.hideLoadingIndicator(),t._drawn()}})},_initMarkersManager:function(n){var t=this;t._markersManager=t._factory.createMarkersManager({container:t._root,renderer:t._renderer,projection:t._projection,themeManager:t._themeManager,tracker:t._tracker,eventTrigger:t._eventTrigger,dataExchanger:t._dataExchanger,dataKey:n,ready:function(){t._drawn()}})},_initLegendsControl:function(){var n=this;n._legendsControl=n._factory.createLegendsControl({container:n._root,renderer:n._renderer,layoutControl:n._layoutControl,dataExchanger:n._dataExchanger})},_initControlBar:function(n){var t=this;t._controlBar=t._factory.createControlBar({container:t._root,renderer:t._renderer,layoutControl:t._layoutControl,projection:t._projection,dataKey:n})},_initTooltip:function(){var n=this;n._tooltip=n._factory.createTooltip({container:n._root,renderer:n._renderer,tracker:n._tracker})},_initElements:function(){var n=this,t=l();n._dataExchanger=new f,n._initCenterHandler(),n._projection=n._factory.createProjection(),n._tracker=n._factory.createTracker({root:n._root,dataKey:t}),n._layoutControl=n._factory.createLayoutControl(),n._initBackground(t),n._initAreasManager(t),n._initMarkersManager(t),n._initLegendsControl(),n._initControlBar(t),n._initTooltip()},_init:function(){this._initThemeManager(),this.callBase.apply(this,arguments)},_initCore:function(){var n=this;n._root=n._renderer.root,n._root.attr({"class":"dxm",stroke:"none","stroke-width":0,fill:"none",align:"center",cursor:"default"}).css({overflow:"hidden"}),n._initElements(),n._setThemeDependentOptions(),n._areasManager.setData(n.option("mapData")),n._markersManager.setData(n.option("markers")),n._projection.setBounds(n.option("bounds")).setMaxZoom(n.option("maxZoomFactor")).setZoom(n.option("zoomFactor"),!0).setCenter(n.option("center"),!0),n._setTrackerOptions(),n._setupInteraction(),n._setTrackerCallbacks(),n._setControlBarCallbacks(),n._setProjectionCallbacks()},_disposeCore:function(){var n=this;n.callBase.apply(n,arguments),n._resetProjectionCallbacks(),n._resetTrackerCallbacks(),n._resetControlBarCallbacks(),n._themeManager.dispose(),n._tracker.dispose(),n._legendsControl.dispose(),n._areasManager.dispose(),n._markersManager.dispose(),n._controlBar.dispose(),n._tooltip.dispose(),n._layoutControl.dispose(),n._disposeCenterHandler(),n._dataExchanger.dispose(),n._projection.dispose(),n._disposeLoadIndicator(),n._themeManager=n._dataExchanger=n._projection=n._tracker=n._layoutControl=n._root=n._background=n._areasManager=n._markersManager=n._controlBar=n._legendsControl=n._tooltip=null},_getRendererParameters:function(){return{width:1,height:1,pathModified:this.option("pathModified"),rtl:this._getOption("rtlEnabled",!0)}},_getOption:function(n,t){var u=this._themeManager.theme(n),r=this.option(n);return t?r!==i?r:u:o(!0,{},u,r)},_initCenterHandler:function(){var n=this,i,r,t=!1;n._centerHandler={processStart:function(t){n._centeringEnabled&&(i=t.x,r=t.y,n._noCenterChanged=!0)},processMove:function(u){n._centeringEnabled&&(t||(n._root.attr({cursor:"move"}),t=!0),n._projection.moveCenter(i-u.x,r-u.y),i=u.x,r=u.y)},processEnd:function(){n._centeringEnabled&&(n._root.attr({cursor:"default"}),n._noCenterChanged=null,t&&n._raiseCenterChanged(),t=!1)}}},_disposeCenterHandler:function(){this._centerHandler=null},_setProjectionCallbacks:function(){var n=this;n._projection.on({center:function(){n._raiseCenterChanged()},zoom:function(){n._raiseZoomFactorChanged()}});n._resetProjectionCallbacks=function(){n._resetProjectionCallbacks=n=null}},_setTrackerCallbacks:function(){var n=this,e=n._centerHandler,o=n._renderer,t={area:n._areasManager,marker:n._markersManager},u=n._controlBar,i=n._tooltip,f=!1;n._tracker.setCallbacks({click:function(i){var f=r(o),u;i.$event.x=i.x-f.left,i.$event.y=i.y-f.top,u=t[i.data.type],u&&u.raiseClick(i.data.index,i.$event),(u||i.data.type==="background")&&n._eventTrigger("click",{jQueryEvent:i.$event})},start:function(n){f=n.data.type==="control-bar",f?(n.data=n.data.index,u.processStart(n)):e.processStart(n)},move:function(n){f?(n.data=n.data.index,u.processMove(n)):e.processMove(n)},end:function(n){f?(n.data=n.data.index,u.processEnd(n),f=!1):e.processEnd()},zoom:function(n){u.processZoom(n)},"hover-on":function(n){var i=t[n.data.type];i&&i.hoverItem(n.data.index,!0)},"hover-off":function(n){var i=t[n.data.type];i&&i.hoverItem(n.data.index,!1)},"focus-on":function(n,u){var s=!1,f,e;i.enabled()&&(f=t[n.data.type]?t[n.data.type].getProxyItem(n.data.index):null,!!f&&i.prepare(f,{offset:12})&&(e=r(o),i.show().move(n.x-e.left,n.y-e.top),s=!0)),u(s)},"focus-move":function(n){var t=r(o);i.move(n.x-t.left,n.y-t.top)},"focus-off":function(){i.hide()}}),n._resetTrackerCallbacks=function(){n._resetTrackerCallbacks=n=e=o=t=u=i=null}},_setControlBarCallbacks:function(){var n=this,t=n._projection,i;n._projection.on({zoom:function(){i=!0}});n._controlBar.setCallbacks({reset:function(n,i){n&&t.setCenter(null),i&&t.setZoom(null)},beginMove:function(){n._noCenterChanged=!0},endMove:function(){n._noCenterChanged=null,n._raiseCenterChanged()},move:function(n,i){t.moveCenter(n,i)},zoom:function(u,f){var o,e;f&&(e=r(n._renderer),e=[f[0]-e.left,f[1]-e.top],o=t.fromScreenPoint(e[0],e[1])),i=!1,t.setScaledZoom(u),i&&f&&t.setCenterByPoint(o,e)}}),n._resetControlBarCallbacks=function(){n._resetControlBarCallbacks=n=t=null}},_setupInteraction:function(){var n=this;n._centerHandler.processEnd(),n._centeringEnabled=!!e(this._getOption("panningEnabled",!0),!0),n._zoomingEnabled=!!e(this._getOption("zoomingEnabled",!0),!0),n._controlBar.setInteraction({centeringEnabled:n._centeringEnabled,zoomingEnabled:n._zoomingEnabled})},_getDefaultSize:function(){return{width:s,height:h}},_applySize:function(){var n=this,t=n._canvas.width,r=n._canvas.height;n._projection.setSize(t,r),n._layoutControl.setSize(t,r),n._tooltip.setSize(t,r),n._background.attr({x:0,y:0,width:t,height:r}),n._updateLoadIndicator(i,t,r)},_resize:t.noop,_clean:function(){var n=this;n._tracker.reset(),n._layoutControl.stop(),n._background.remove(),n._areasManager.clean(),n._markersManager.clean(),n._controlBar.clean(),n._legendsControl.clean(),n._tooltip.clean()},_render:function(){var n=this;n._background.append(n._root),n._areasManager.render(),n._markersManager.render(),n._controlBar.render(),n._legendsControl.render(),n._layoutControl.start(),n._tooltip.render()},_optionChanged:function(n){var t=this,i=n.value;switch(n.name){case"theme":t._themeManager.setTheme(i,t.option("rtlEnabled")),t._setThemeDependentOptions();break;case"mapData":t._areasManager.setData(i);break;case"markers":t._markersManager.setData(i);break;case"bounds":t._projection.setBounds(i);break;case"maxZoomFactor":t._projection.setMaxZoom(i);break;case"zoomFactor":t._projection.setZoom(i);break;case"center":t._projection.setCenter(i);break;case"background":t._setBackgroundOptions();break;case"areaSettings":t._setAreasManagerOptions();break;case"markerSettings":t._setMarkersManagerOptions();break;case"controlBar":t._setControlBarOptions();break;case"legends":t._setLegendsOptions();break;case"tooltip":t._setTooltipOptions();break;case"touchEnabled":case"wheelEnabled":t._setTrackerOptions();break;case"panningEnabled":case"zoomingEnabled":t._setupInteraction();break;default:t.callBase.apply(t,arguments)}},_setThemeDependentOptions:function(){var n=this;n._setBackgroundOptions(),n._setAreasManagerOptions(),n._setMarkersManagerOptions(),n._setControlBarOptions(),n._setLegendsOptions(),n._setTooltipOptions()},_setBackgroundOptions:function(){var n=this._getOption("background");this._background.attr({"stroke-width":n.borderWidth,stroke:n.borderColor,fill:n.color})},_setAreasManagerOptions:function(){this._areasManager.setOptions(this.option("areaSettings")),this._createEventTrigger("onAreaClick"),this._createEventTrigger("onAreaSelectionChanged")},_setMarkersManagerOptions:function(){this._markersManager.setOptions(this.option("markerSettings")),this._createEventTrigger("onMarkerClick"),this._createEventTrigger("onMarkerSelectionChanged")},_setControlBarOptions:function(){this._controlBar.setOptions(this._getOption("controlBar"))},_setLegendsOptions:function(){this._legendsControl.setOptions(this.option("legends"),this._themeManager.theme("legend"))},_setTooltipOptions:function(){this._tooltip.setOptions(this._getOption("tooltip"))},_setTrackerOptions:function(){this._tracker.setOptions({touchEnabled:this._getOption("touchEnabled",!0),wheelEnabled:this._getOption("wheelEnabled",!0)})},_raiseCenterChanged:function(){this._noCenterChanged||this._eventTrigger("centerChanged",{center:this._projection.getCenter()})},_raiseZoomFactorChanged:function(){this._noZoomFactorChanged||this._eventTrigger("zoomFactorChanged",{zoomFactor:this._projection.getZoom()})},_refresh:function(){var n=this,t=n.callBase;n._endLoading(function(){t.call(n)})},getAreas:function(){return this._areasManager.getProxyItems()},getMarkers:function(){return this._markersManager.getProxyItems()},clearAreaSelection:function(n){return this._areasManager.clearSelection(n),this},clearMarkerSelection:function(n){return this._markersManager.clearSelection(n),this},clearSelection:function(n){return this.clearAreaSelection(n).clearMarkerSelection(n)},center:function(n,t){var r=this;return n===i?r._projection.getCenter():(r._noCenterChanged=t,r._projection.setCenter(n),r._noCenterChanged=null,r)},zoomFactor:function(n,t){var r=this;return n===i?r._projection.getZoom():(r._noZoomFactorChanged=t,r._projection.setZoom(n),r._noZoomFactorChanged=null,r)},viewport:function(n,t){var r=this;return n===i?r._projection.getViewport():(r._noCenterChanged=r._noZoomFactorChanged=t,r._projection.setViewport(n),r._noCenterChanged=r._noZoomFactorChanged=null,r)},convertCoordinates:function(n,t){return this._projection.fromScreenPointStrict(n,t)},_getLoadIndicatorOption:function(){return this._getOption("loadingIndicator")},showLoadingIndicator:function(){this._showLoadIndicator(this._getLoadIndicatorOption(),{width:this._width,height:this._height})},_factory:{}}),u.prototype._factory.createRenderer=function(t){return new n.viz.renderers.Renderer(t)},f.prototype={constructor:f,dispose:function(){return this._store=null,this},_get:function(n,t){var i=this._store[n]||(this._store[n]={});return i[t]||(i[t]={})},set:function(n,t,i){var r=this._get(n,t);return r.data=i,r.callback&&r.callback(i),this},bind:function(n,t,i){var r=this._get(n,t);return r.callback=i,r.data&&i(r.data),this},unbind:function(n,t){var i=this._get(n,t);return i.data=i.callback=null,this}},n.registerComponent("dxVectorMap",n.viz.map,u),n.viz.map._internal={},n.viz.map.sources={}})(DevExpress,jQuery),function(n,t){function ct(n,t,i){var f=(n[0]+t[0])/2-i/2,e=(n[1]+t[1])/2-i/2,r=2/i;return{project:function(n){var t=u.project(n);return[-1+(t[0]-f)*r,-1+(t[1]-e)*r]},unproject:function(n){var t=[f+(n[0]+1)/r,e+(n[1]+1)/r];return u.unproject(t)}}}function y(n,t){return a(n-t)<1e-8}function f(n,t,i,r){var u=w(n);return u<t?u=t:u>i?u=i:t<=u&&u<=i||(u=r),u}function rt(n,t,i){return{lt:[f(n[0],t[0],i[0],t[0]),f(n[1],t[1],i[1],t[1])],rb:[f(n[2],t[0],i[0],i[0]),f(n[3],t[1],i[1],i[1])]}}function lt(n){var i=u.unproject([-1,-1]),r=u.unproject([1,1]),f=[e(i[0],r[0]),e(i[1],r[1])],s=[o(i[0],r[0]),o(i[1],r[1])],t=n;return t&&t.minLon&&(t=[t.minLon,t.minLat,t.maxLon,t.maxLat]),t&&(t=rt(t,f,s)),{minBase:f,maxBase:s,min:t?[e(t.lt[0],t.rb[0]),e(t.lt[1],t.rb[1])]:f,max:t?[o(t.lt[0],t.rb[0]),o(t.lt[1],t.rb[1])]:s}}function ut(n,t,i,r){var u;return u=n>-1&&t>=1?i:n<=-1&&t<1?r:(i+r)/2}function p(){this._events={project:t.Callbacks(),transform:t.Callbacks(),center:t.Callbacks(),zoom:t.Callbacks(),"max-zoom":t.Callbacks()},this.setBounds(null)}var w=Number,at=isFinite,h=n.utils.isArray,r=Math,e=r.min,o=r.max,a=r.abs,ft=r.tan,et=r.atan,ot=r.exp,s=r.round,c=r.log,st=r.pow,l=r.PI,b=l/4,k=l/360,ht=2/r.LN2,v=1,d=256,g=-180,nt=180,tt=-85.0511,it=85.0511,u={aspectRatio:1,project:function(n){var t=n[0],i=n[1];return[t<=g?-1:t>=nt?1:t/180,i<=tt?1:i>=it?-1:-c(ft(b+i*k))/l]},unproject:function(n){var t=n[0],i=n[1];return[t<=-1?g:t>=1?nt:180*t,i<=-1?it:i>=1?tt:(et(ot(-l*n[1]))-b)/k]}};p.prototype={constructor:p,_minZoom:v,_maxZoom:d,_zoom:v,_center:[NaN,NaN],dispose:function(){return this._events=null,this},setSize:function(n,t){var i=this;return i._x0=n/2,i._y0=t/2,n/t<=u.aspectRatio?(i._xradius=n/2,i._yradius=n/2/u.aspectRatio):(i._xradius=t/2*u.aspectRatio,i._yradius=t/2),i._events.transform.fire(i.getTransform()),i},setBounds:function(n){var t=this,i=lt(n),h,c,l,v,r,s;return t._minBase=i.minBase,t._maxBase=i.maxBase,t._minBound=i.min,t._maxBound=i.max,h=u.project(i.min),c=u.project(i.max),l=e(f(a(c[0]-h[0]),.1,2,2),f(a(c[1]-h[1]),.1,2,2)),v=l<2?ct(h,c,l):u,t._project=v.project,t._unproject=v.unproject,r=t._project(i.minBase),s=t._project(i.maxBase),t._minv=[e(r[0],s[0]),e(r[1],s[1])],t._maxv=[o(r[0],s[0]),o(r[1],s[1])],t._defaultCenter=t._unproject([0,0]),t.setCenter(t._defaultCenter),t._events.project.fire(),t},_toScreen:function(n){return[this._x0+this._xradius*n[0],this._y0+this._yradius*n[1]]},_fromScreen:function(n){return[(n[0]-this._x0)/this._xradius,(n[1]-this._y0)/this._yradius]},_toTransformed:function(n){return[n[0]*this._zoom+this._dxcenter,n[1]*this._zoom+this._dycenter]},_toTransformedFast:function(n){return[n[0]*this._zoom,n[1]*this._zoom]},_fromTransformed:function(n){return[(n[0]-this._dxcenter)/this._zoom,(n[1]-this._dycenter)/this._zoom]},_adjustCenter:function(){var n=this,t=n._project(n._center);n._dxcenter=-t[0]*n._zoom,n._dycenter=-t[1]*n._zoom},projectArea:function(n){for(var r=0,o=h(n)?n.length:0,t,i,f,u,e=[];r<o;++r){for(t=n[r],u=[],i=0,f=h(t)?t.length:0;i<f;++i)u.push(this._project(t[i]));e.push(u)}return e},projectPoint:function(n){return n?this._project(n):[]},getAreaCoordinates:function(n){for(var i=0,s=n.length,r,t,e,o=[],u,f;i<s;++i){for(r=n[i],u=[],t=0,e=r.length;t<e;++t)f=this._toScreen(this._toTransformedFast(r[t])),u.push(f[0],f[1]);o.push(u)}return o},getPointCoordinates:function(n){var t=this._toScreen(this._toTransformedFast(n));return{x:s(t[0]),y:s(t[1])}},getSquareSize:function(n){return[n[0]*this._zoom*this._xradius,n[1]*this._zoom*this._yradius]},getZoom:function(){return this._zoom},setZoom:function(n,t){var i=this,r=i._zoom;return i._zoom=f(n,i._minZoom,i._maxZoom,i._minZoom),i._adjustCenter(),(!y(r,i._zoom)||t)&&i._events.zoom.fire(i.getZoom(),i.getTransform()),i},getScaledZoom:function(){return s((this._scale.length-1)*c(this._zoom)/c(this._maxZoom))},setScaledZoom:function(n){return this.setZoom(this._scale[s(n)])},getZoomScalePartition:function(){return this._scale.length-1},_setupScaling:function(){var n=this,t=s(ht*c(n._maxZoom)),r,i,u=1;for(t=t>4?t:4,r=st(n._maxZoom,1/t),i=n._minZoom,n._scale=[i];u<=t;++u)n._scale.push(i*=r)},setMaxZoom:function(n){var t=this;return t._minZoom=v,t._maxZoom=f(n,t._minZoom,w.MAX_VALUE,d),t._setupScaling(),t._zoom>t._maxZoom&&t.setZoom(t._maxZoom),t._events["max-zoom"].fire(t._maxZoom),t},getMinZoom:function(){return this._minZoom},getMaxZoom:function(){return this._maxZoom},getCenter:function(){return[this._center[0],this._center[1]]},setCenter:function(n,t){var i=this,r=h(n)?n:null,u=i._center;return r=r||n&&(n.lon||n.lat)&&[n.lon,n.lat]||[],i._center=[f(r[0],i._minBound[0],i._maxBound[0],i._defaultCenter[0]),f(r[1],i._minBound[1],i._maxBound[1],i._defaultCenter[1])],i._adjustCenter(),y(u[0],i._center[0])&&y(u[1],i._center[1])&&!t||i._events.center.fire(i.getCenter(),i.getTransform()),i},setCenterByPoint:function(n,t){var i=this,r=i._project(n),u=i._fromScreen(t);return i.setCenter(i._unproject([-u[0]/i._zoom+r[0],-u[1]/i._zoom+r[1]]))},moveCenter:function(n,t){var i=this,r=i._toScreen(i._toTransformed(i._project(i._center))),u=i._unproject(i._fromTransformed(i._fromScreen([r[0]+n,r[1]+t])));return i.setCenter(u)},getViewport:function(){var n=this._unproject(this._fromTransformed([-1,-1])),t=this._unproject(this._fromTransformed([1,1]));return[n[0],n[1],t[0],t[1]]},setViewport:function(n){var t=this;if(!h(n))return t.setZoom(t._minZoom).setCenter(t._defaultCenter);var a=rt(n,t._minBase,t._maxBase),r=t._project(a.lt),u=t._project(a.rb),f=e(r[0],u[0]),s=e(r[1],u[1]),c=o(r[0],u[0]),l=o(r[1],u[1]),i=2/o(c-f,l-s),v=ut(f,c,-1-i*f,1-i*c),y=ut(s,l,-1-i*s,1-i*l);return t.setZoom(i).setCenter(t._unproject([-v/i,-y/i]))},getTransform:function(){return{translateX:this._dxcenter*this._xradius,translateY:this._dycenter*this._yradius}},fromScreenPoint:function(n,t){return this._unproject(this._fromTransformed(this._fromScreen([n,t])))},fromScreenPointStrict:function(n,t){var i=this,r=i._fromTransformed(i._fromScreen([n,t])),u=i._unproject(r);return[r[0]>=i._minv[0]&&r[0]<=i._maxv[0]?u[0]:NaN,r[1]>=i._minv[1]&&r[1]<=i._maxv[1]?u[1]:NaN]},on:function(n){return t.each(this._events,function(t,i){n[t]&&i.add(n[t])}),this}},n.viz.map.dxVectorMap.prototype._factory.createProjection=function(){return new p}}(DevExpress,jQuery),function(n,t){function e(n){delete n._owner,n.update=function(){},n.finish=function(){}}function s(n,t){this._owner=n,this._command=t.data}function h(n,t){function u(){n._callbacks.move(i,r),f=setTimeout(u,e)}this._command=t.data;var f=null,e=100,i=0,r=0;switch(this._command){case p:r=-10;break;case w:i=10;break;case b:r=10;break;case k:i=-10}this._stop=function(){return clearTimeout(f),n._callbacks.endMove(),this._stop=n=u=null,this},t=null,n._callbacks.beginMove(),u()}function c(n,t){function i(){n._adjustZoom(n._zoomFactor+f),r=setTimeout(i,u)}this._owner=n,this._command=t.data;var r=null,u=150,f=this._command===d?1:-1;this._stop=function(){return clearTimeout(r),this._stop=n=i=null,this},t=null,i()}function l(n,t){this._owner=n,this._zoomFactor=n._zoomFactor,this._pos=t.y}var ut=Number,pt=String,o=Math,a=o.round,ft=o.pow,et=o.log,ot=o.LN2,v=n.viz.core.utils,y=v.parseScalar,st=v.enumParser(["left","center","right"]),ht=v.enumParser(["top","bottom"]),g="command-reset",p="command-move-up",w="command-move-right",b="command-move-down",k="command-move-left",d="command-zoom-in",nt="command-zoom-out",ct="command-zoom-drag-line",tt="command-zoom-drag",i="control-bar",f=1,u=2,it={bigCircleSize:58,smallCircleSize:28,buttonSize:10,arrowButtonOffset:20,incdecButtonSize:11,incButtonOffset:66,decButtonOffset:227,sliderLineStartOffset:88.5,sliderLineEndOffset:205.5,sliderLength:20,sliderWidth:8,trackerGap:4},lt=30.5,at=30.5,vt=61,yt=274,r={},rt;r[g]=s,r[p]=r[w]=r[b]=r[k]=h,r[d]=r[nt]=c,r[tt]=l,rt=n.Class.inherit({_flags:0,ctor:function(n){var t=this;t._params=n,t._createElements(n.renderer,n.dataKey),n.layoutControl.addItem(t),t._subscribeToProjection(n.projection),t._setVisibility(!1)},setCallbacks:function(n){return this._callbacks=n,this},_createElements:function(n,t){var i=this,r,u;i._root=n.g().attr({"class":"dxm-control-bar"}),r=i._buttonsGroup=n.g().attr({"class":"dxm-control-buttons"}).append(i._root),u=n.g().attr({stroke:"none","stroke-width":0,fill:"#000000",opacity:.0001}).css({cursor:"pointer"}).append(i._root),i._createButtons(n,it,t,r),i._createTrackers(n,it,t,u)},_createButtons:function(n,t,i,r){var u=t.buttonSize/2,f=t.arrowButtonOffset-u,o=t.arrowButtonOffset,e=t.incdecButtonSize/2;n.circle(0,0,t.bigCircleSize/2).append(r),n.circle(0,0,u).append(r),n.path([-u,-f,0,-o,u,-f],"line").attr({"stroke-linecap":"square"}).append(r),n.path([f,-u,o,0,f,u],"line").attr({"stroke-linecap":"square"}).append(r),n.path([u,f,0,o,-u,f],"line").attr({"stroke-linecap":"square"}).append(r),n.path([-f,u,-o,0,-f,-u],"line").attr({"stroke-linecap":"square"}).append(r),n.circle(0,t.incButtonOffset,t.smallCircleSize/2).append(r),n.path([[-e,t.incButtonOffset,e,t.incButtonOffset],[0,t.incButtonOffset-e,0,t.incButtonOffset+e]],"area").append(r),n.circle(0,t.decButtonOffset,t.smallCircleSize/2).append(r),n.path([-e,t.decButtonOffset,e,t.decButtonOffset],"area").append(r),n.path([0,t.sliderLineStartOffset,0,t.sliderLineEndOffset],"area").append(r),this._zoomDrag=n.rect(-t.sliderLength/2,t.sliderLineEndOffset-t.sliderWidth/2,t.sliderLength,t.sliderWidth).append(r),this._sliderLineLength=t.sliderLineEndOffset-t.sliderLineStartOffset},_createTrackers:function(n,t,r,u){var f=a((t.arrowButtonOffset-t.trackerGap)/2),o=t.arrowButtonOffset-f,s=a(ft(t.bigCircleSize*t.bigCircleSize/4-f*f,.5)),e=s-o;$(n.rect(-f,-f,f*2,f*2).append(u).element).data(r,{index:g,type:i}),$(n.rect(-f,-s,f*2,e).append(u).element).data(r,{index:p,type:i}),$(n.rect(o,-f,e,f*2).append(u).element).data(r,{index:w,type:i}),$(n.rect(-f,o,f*2,e).append(u).element).data(r,{index:b,type:i}),$(n.rect(-s,-f,e,f*2).append(u).element).data(r,{index:k,type:i}),$(n.circle(0,t.incButtonOffset,t.smallCircleSize/2).append(u).element).data(r,{index:d,type:i}),$(n.circle(0,t.decButtonOffset,t.smallCircleSize/2).append(u).element).data(r,{index:nt,type:i}),$(n.rect(-2,t.sliderLineStartOffset-2,4,t.sliderLineEndOffset-t.sliderLineStartOffset+4).append(u).element).data(r,{index:ct,type:i}),this._zoomDragCover=n.rect(-t.sliderLength/2,t.sliderLineEndOffset-t.sliderWidth/2,t.sliderLength,t.sliderWidth).append(u),$(this._zoomDragCover.element).data(r,{index:tt,type:i})},_subscribeToProjection:function(n){var t=this;n.on({zoom:function(){t._adjustZoom(n.getScaledZoom())},"max-zoom":function(){t._zoomPartition=n.getZoomScalePartition(),t._sliderUnitLength=t._sliderLineLength/t._zoomPartition,t._adjustZoom(n.getScaledZoom())}})},dispose:function(){var n=this;return n._params.layoutControl.removeItem(n),n._root.clear(),n._params=n._callbacks=n._root=n._buttonsGroup=n._zoomDrag=n._zoomDragCover=null,n},resize:function(n){return this._setVisibility(n!==null&&this._options.enabled&&this._flags),this},_setVisibility:function(n){this._root.attr({visibility:n?null:"hidden"})},getLayoutOptions:function(){var n=this._options;return this._rendered&&n.enabled&&this._flags?{width:2*n.margin+vt,height:2*n.margin+yt,horizontalAlignment:n.horizontalAlignment,verticalAlignment:n.verticalAlignment}:null},locate:function(n,t){return this._root.attr({translateX:n+this._options.margin+lt,translateY:t+this._options.margin+at}),this},setInteraction:function(n){var t=this;return t.processEnd(),y(n.centeringEnabled,!0)?t._flags|=f:t._flags&=~f,y(n.zoomingEnabled,!0)?t._flags|=u:t._flags&=~u,t._rendered&&t._refresh(),t},setOptions:function(n){var t=this;return t.processEnd(),t._buttonsGroup.attr({"stroke-width":n.borderWidth,stroke:n.borderColor,fill:n.color}),t._options={enabled:!!y(n.enabled,!0),margin:n.margin>0?ut(n.margin):0,horizontalAlignment:st(n.horizontalAlignment,"left"),verticalAlignment:ht(n.verticalAlignment,"top")},t._rendered&&t._refresh(),t},_refresh:function(){var n=this._flags&&this._options.enabled;this._setVisibility(n),n&&this.updateLayout()},clean:function(){var n=this;return n._rendered=null,n._root.remove(),n},render:function(){var n=this;return n._rendered=!0,n._root.append(n._params.container),n._refresh(),n},_adjustZoom:function(n){var t=this,i;t._zoomFactor=a(n),t._zoomFactor>=0||(t._zoomFactor=0),t._zoomFactor<=t._zoomPartition||(t._zoomFactor=t._zoomPartition),i={translateY:-t._zoomFactor*t._sliderUnitLength},t._zoomDrag.attr(i),t._zoomDragCover.attr(i)},_applyZoom:function(n){this._callbacks.zoom(this._zoomFactor,this._flags&f?n:t)},processStart:function(n){var t=r[n.data];return this._command=t&&this._options.enabled&&t.flags&this._flags?new t(this,n):null,this},processMove:function(n){return this._command&&this._command.update(n),this},processEnd:function(){return this._command&&this._command.finish(),this._command=null,this},processZoom:function(n){var t=this,i;return t._flags&u&&(n.delta?i=n.delta:n.ratio&&(i=et(n.ratio)/ot),t._adjustZoom(t._zoomFactor+i),t._applyZoom([n.x,n.y])),t}}),s.flags=f|u,s.prototype.update=function(n){n.data!==this._command&&e(this)},s.prototype.finish=function(){var n=this._owner._flags;this._owner._callbacks.reset(!!(n&f),!!(n&u)),n&u&&this._owner._adjustZoom(0),e(this)},h.flags=f,h.prototype.update=function(n){this._command!==n.data&&this.finish()},h.prototype.finish=function(){e(this._stop())},c.flags=u,c.prototype.update=function(n){this._command!==n.data&&this.finish()},c.prototype.finish=function(){this._owner._applyZoom(),e(this._stop())},l.flags=u,l.prototype.update=function(n){var t=this._owner;t._adjustZoom(this._zoomFactor+t._zoomPartition*(this._pos-n.y)/t._sliderLineLength)},l.prototype.finish=function(){this._owner._applyZoom(),e(this)},n.viz.map.dxVectorMap.prototype._factory.createControlBar=function(n){return new rt(n)}}(DevExpress),function(n,t,i){function v(n){var t=this;t._root=n.root,t._callbacks={},t._createEventHandlers(n.dataKey),t._focus=new dt(t._callbacks),t._attachHandlers()}function dt(n){var i=this,r=null,f=null,h=!1,t=null,e=null,o,s;i.dispose=function(){clearTimeout(t),clearTimeout(e),i.turnOn=i.turnOff=i.cancel=i.cancelOn=i.dispose=i=n=r=f=t=e=null},i.turnOn=function(i,c,l,a){function v(n){h=!n,n&&(r=f,clearTimeout(e),e=null)}i===f&&h||(h=!1,f=i,r?(o=c.x,s=c.y,clearTimeout(t),t=setTimeout(function(){t=null,f===r?(n[ht]({data:f,x:o,y:s}),v(!0)):n[b]({data:f,x:o,y:s},v)},a?l:0)):(!t||u(c.x-o)>g||u(c.y-s)>g||a)&&(o=c.x,s=c.y,clearTimeout(t),t=setTimeout(function(){t=null,n[b]({data:f,x:o,y:s},v)},l)))},i.turnOff=function(i){clearTimeout(t),t=null,f=null,r&&!h&&(e=e||setTimeout(function(){e=null,n[k]({data:r}),r=null},i))},i.cancel=function(){clearTimeout(t),clearTimeout(e),r&&n[k]({data:r}),r=f=t=e=null},i.cancelOn=function(){clearTimeout(t),t=null}}function nt(n,t,i,r){return it((n-i)*(n-i)+(t-r)*(t-r))}function r(n){var t=n.originalEvent.type,i=n.originalEvent.pointerType;return/^touch/.test(t)||/^MSPointer/.test(t)&&i!==4||/^pointer/.test(t)&&i!=="mouse"}function c(n,t){for(var i=0,u=n.length,r;i<u;++i)if(n[i]){r=t[i];break}return o(r||t[i],s)}function gt(){var n=[navigator.pointerEnabled,navigator.msPointerEnabled,"ontouchstart"in window];h={start:c(n,["pointerdown","MSPointerDown","touchstart mousedown","mousedown"]),move:c(n,["pointermove","MSPointerMove","touchmove mousemove","mousemove"]),end:c(n,["pointerup","MSPointerUp","touchend mouseup","mouseup"]),wheel:c([],["mousewheel DOMMouseScroll"])}}function f(n){var t=n.originalEvent,i=t.touches&&t.touches[0]||{};return{x:i.pageX||t.pageX||n.pageX,y:i.pageY||t.pageY||n.pageY}}function tt(n){return n.originalEvent.pointerId}function l(n,t){var r=n.originalEvent;return r=r.pointerId!==i?r.pointerId===t?r:null:r.touches[t],r?{x:r.pageX||n.pageX,y:r.pageY||n.pageY}:null}function ni(n,t){if(n===0)return 0;var i=u(n),r=y(n/i);return t.dir&&r!==t.dir?0:(t.dir=r,i=i<.1?0:i<1?1:i>4?4:y(i),r*i)}var e=Math,u=e.abs,it=e.sqrt,y=e.round,ti=e.max,ii=e.min,o=n.ui.events.addNamespace,p=n.viz.core.utils.parseScalar,a=t.now,s=n.viz.map.dxVectorMap.prototype.NAME,h={};gt();var rt="start",ut="move",ft="end",w="zoom",et="hover-on",ot="hover-off",st="click",b="focus-on",ht="focus-move",k="focus-off",ct=500,d=5,lt=5,at=10,vt=300,yt=300,pt=300,wt=400,g=5,bt=50,kt=300;v.prototype={constructor:v,dispose:function(){var n=this;return n._detachHandlers(),n._focus.dispose(),n._root=n._callbacks=n._focus=n._handlers=null,n},_startClick:function(n,t){if(t){var i=f(n);this._clickState={x:i.x,y:i.y,time:a()}}},_endClick:function(n,t){var r=this._clickState,i;r&&(a()-r.time<=ct&&(i=f(n),u(i.x-r.x)<=d&&u(i.y-r.y)<=d&&this._callbacks[st]({data:t,x:i.x,y:i.y,$event:n})),this._clickState=null)},_startDrag:function(n,t){if(t){var r=f(n),i=this._dragState={x:r.x,y:r.y,data:t};this._callbacks[rt]({x:i.x,y:i.y,data:i.data})}},_moveDrag:function(n,t){var i=this._dragState,e,o;i&&(e=f(n),o=r(n)?at:lt,(i.active||u(e.x-i.x)>o||u(e.y-i.y)>o)&&(i.x=e.x,i.y=e.y,i.active=!0,i.data=t||{},this._callbacks[ut]({x:i.x,y:i.y,data:i.data})))},_endDrag:function(){var i=this._dragState;i&&(this._dragState=null,this._callbacks[ft]({x:i.x,y:i.y,data:i.data}))},_wheelZoom:function(n,t){if(t){var o=this,i=o._wheelLock,r=a(),u,e;r-i.time<=bt||(r-i.dirTime>kt&&(i.dir=0),u=ni(n.originalEvent.wheelDelta/120||n.originalEvent.detail/-3||0,i),u!==0)&&(e=f(n),o._callbacks[w]({delta:u,x:e.x,y:e.y}),i.time=i.dirTime=r)}},_startZoom:function(n,t){if(r(n)&&t){var u=this._zoomState=this._zoomState||{},f,e;u.pointer1&&u.pointer2||(u.pointer1===i&&(u.pointer1=tt(n)||0,f=l(n,u.pointer1),u.x1=u.x1_0=f.x,u.y1=u.y1_0=f.y),u.pointer2===i&&(e=tt(n)||1,e!==u.pointer1&&(f=l(n,e),f&&(u.x2=u.x2_0=f.x,u.y2=u.y2_0=f.y,u.pointer2=e,u.ready=!0,this._endDrag()))))}},_moveZoom:function(n){var u=this._zoomState,f;u&&r(n)&&(u.pointer1!==i&&(f=l(n,u.pointer1),f&&(u.x1=f.x,u.y1=f.y)),u.pointer2!==i&&(f=l(n,u.pointer2),f&&(u.x2=f.x,u.y2=f.y)))},_endZoom:function(n){var i=this._zoomState,u,f;i&&r(n)&&(i.ready&&(u=nt(i.x1_0,i.y1_0,i.x2_0,i.y2_0),f=nt(i.x1,i.y1,i.x2,i.y2),this._callbacks[w]({ratio:f/u,x:(i.x1_0+i.x2_0)/2,y:(i.y1_0+i.y2_0)/2})),this._zoomState=null)},_startHover:function(n,t){this._doHover(n,t,!0)},_moveHover:function(n,t){this._doHover(n,t,!1)},_doHover:function(n,t,i){var u=this;if(u._dragState&&u._dragState.active||u._zoomState&&u._zoomState.ready){u._cancelHover();return}r(n)!==i||u._hoverTarget===n.target||u._hoverState&&u._hoverState.data===t||(u._cancelHover(),t&&(u._hoverState={data:t},u._callbacks[et]({data:t})),u._hoverTarget=n.target)},_cancelHover:function(){var n=this._hoverState;this._hoverState=this._hoverTarget=null,n&&this._callbacks[ot]({data:n.data})},_startFocus:function(n,t){this._doFocus(n,t,!0)},_moveFocus:function(n,t){this._doFocus(n,t,!1)},_doFocus:function(n,t,i){var u=this;if(u._dragState&&u._dragState.active||u._zoomState&&u._zoomState.ready){u._cancelFocus();return}r(n)===i&&(u._focus.turnOff(i?wt:yt),t&&u._focus.turnOn(t,f(n),i?pt:vt,i))},_endFocus:function(n){r(n)&&this._focus.cancelOn()},_cancelFocus:function(){this._focus.cancel()},_createEventHandlers:function(n){var i=this;i._handlers={},i._handlers[h.start]=function(u){var e=r(u),f=t(u.target).data(n);(!e||i._isTouchEnabled)&&(f&&u.preventDefault(),i._startClick(u,f),i._startDrag(u,f),i._startZoom(u,f),i._startHover(u,f),i._startFocus(u,f))},i._handlers[h.move]=function(u){var e=r(u),f=t(u.target).data(n);(!e||i._isTouchEnabled)&&(i._moveDrag(u,f),i._moveZoom(u,f),i._moveHover(u,f),i._moveFocus(u,f))},i._handlers[h.end]=function(u){var e=r(u),f=t(u.target).data(n);(!e||i._isTouchEnabled)&&(i._endClick(u,f),i._endDrag(u,f),i._endZoom(u,f),i._endFocus(u,f))},i._handlers[h.wheel]=function(r){if(i._isWheelEnabled){var u=t(r.target).data(n);u&&r.preventDefault(),i._wheelZoom(r,u)}},i._wheelLock={dir:0}},reset:function(){var n=this;return n._clickState=null,n._endDrag(),n._cancelHover(),n._cancelFocus(),n},setCallbacks:function(n){return t.extend(this._callbacks,n),this},setOptions:function(n){var t=this;return t.reset(),t._detachHandlers(),t._isTouchEnabled=!!p(n.touchEnabled,!0),t._isWheelEnabled=!!p(n.wheelEnabled,!0),t._attachHandlers(),t},_detachHandlers:function(){this._isTouchEnabled&&(this._root.css({"touch-action":"","-ms-touch-action":"","-webkit-user-select":""}),t(this._root.element).off(o("MSHoldVisual",s)).off(o("contextmenu",s))),t(document).off(this._handlers)},_attachHandlers:function(){if(this._isTouchEnabled){this._root.css({"touch-action":"none","-ms-touch-action":"none","-webkit-user-select":"none"});t(this._root.element).on(o("MSHoldVisual",s),function(n){n.preventDefault()}).on(o("contextmenu",s),function(n){r(n)&&n.preventDefault()})}t(document).on(this._handlers)}},n.viz.map.dxVectorMap.prototype._factory.createTracker=function(n){return new v(n)}}(DevExpress,jQuery),function(n,t,i){var u=Number,e=n.viz.core.utils.parseScalar,r=t.extend,f=t.each,o=n.viz.core.BaseThemeManager.inherit({_themeSection:"map",_fontFields:["areaSettings.label.font","markerSettings.label.font","tooltip.font","legend.font","loadingIndicator.font"],getCommonAreaSettings:function(t){var i=r(!0,{},this._theme.areaSettings,t),e,u,f;if(i.paletteSize>0){for(e=new n.viz.core.GradientPalette(i.palette,i.paletteSize),u=0,f=[];u<i.paletteSize;++u)f.push(e.getColor(u));i._colors=f}return i},getAreaSettings:function(n,t){var f=r(!0,{},n,t);return f.borderWidth=u(f.borderWidth)||0,f.borderColor=f.borderColor||null,t.color===i&&t.paletteIndex>=0&&(f.color=n._colors[t.paletteIndex]),f.color=f.color||null,f.hoveredBorderWidth=u(f.hoveredBorderWidth)||f.borderWidth,f.hoveredBorderColor=f.hoveredBorderColor||f.borderColor,f.hoveredColor=f.hoveredColor||f.color,f.selectedBorderWidth=u(f.selectedBorderWidth)||f.borderWidth,f.selectedBorderColor=f.selectedBorderColor||f.borderColor,f.selectedColor=f.selectedColor||f.color,f},getCommonMarkerSettings:function(n){n&&!n.label&&n.font&&(n.label={font:n.font})&&(n.font=i);var t=r({},this._theme.markerSettings),u=r({},n),o={},s={},e;return f(t,function(n,r){n[0]==="_"&&(o[n]=r,s[n]=u[n],t[n]=u[n]=i)}),e=r(!0,{},t,u),f(o,function(n,i){e[n]=r(!0,{},t,i,u,s[n])}),e},getMarkerSettings:function(n,t,i){var f=r(!0,{},n["_"+i],t);return f.borderWidth=u(f.borderWidth)||0,f.borderColor=f.borderColor||null,f.color=f.color||null,f.opacity=f.opacity||null,f.hoveredBorderWidth=u(f.hoveredBorderWidth)||f.borderWidth,f.hoveredBorderColor=f.hoveredBorderColor||f.borderColor,f.hoveredColor=f.hoveredColor||f.color,f.hoveredOpacity=f.hoveredOpacity||f.opacity,f.selectedBorderWidth=u(f.selectedBorderWidth)||f.borderWidth,f.selectedBorderColor=f.selectedBorderColor||f.borderColor,f.selectedColor=f.selectedColor||f.color,f.selectedOpacity=f.selectedOpacity||f.opacity,f},getPieColors:function(t,i){var r=t._pie._colors||[],f,u,e=i>8?i:8;if(r.length<e){for(f=new n.viz.core.Palette(t._pie.palette,{stepHighlight:50,theme:this.themeName()}),u=0,r=[];u<e;++u)r.push(f.getNextColor());t._pie._colors=r}return r},setTheme:function(n,t){var i=this;return i.callBase(n),e(t,i._theme.rtlEnabled)&&r(!0,i._theme,i._theme._rtl),i}});n.viz.map.dxVectorMap.prototype._factory.createThemeManager=function(){return new o}}(DevExpress,jQuery),function(n,t){function e(n){var i=this;i._params=n,i._root=n.renderer.g().attr({"class":"dxm-legend"}),n.layoutControl.addItem(i),u.apply(i,[{renderer:n.renderer,group:i._root,backgroundClass:null,itemsGroupClass:null,textField:"text",getFormatObject:function(n){return n}}]),i._onDataChanged=function(n){var r=t.map(n,function(n){return s(!0,{states:{normal:{fill:n.color}}},n)});i.update(r,i._options),i._refresh()}}function o(n){this._parameters=n,this._items=[]}var l=String,a=n.utils.isArray,s=t.extend,f=t.each,u=n.viz.core.Legend,r=e.prototype=n.utils.clone(u.prototype),h,c;r.constructor=e,r.dispose=function(){var n=this;return n._params.layoutControl.removeItem(n),n._unbindData(),n._params=n._root=n._onDataChanged=null,u.prototype.dispose.apply(n,arguments)},r.clean=function(){return this._rendered=!1,this._root.remove(),this},r.render=function(){var n=this;return n._root.append(n._params.container),n._rendered=!0,n._refresh(),n},r.resize=function(n){return n===null?this.erase():this.setSize(n).draw(),this},r.locate=u.prototype.shift,r._unbindData=function(){this._dataCategory&&this._params.dataExchanger.unbind(this._dataCategory,this._dataName)},r._bindData=function(n){this._params.dataExchanger.bind(this._dataCategory=n.category,this._dataName=n.name,this._onDataChanged)},h={areacolorgroups:{category:"areas",name:"color"},markercolorgroups:{category:"markers",name:"color"},markersizegroups:{category:"markers",name:"size"}},c={category:"UNKNOWN",name:"UNKNOWN"},r.setOptions=function(n){var t=this;return t.update(t._data,n),t._unbindData(),t._bindData(h[l(n.source).toLowerCase()]||c),t._refresh(),t},r._refresh=function(){this._rendered&&this.updateLayout()},o.prototype={constructor:o,dispose:function(){return f(this._items,function(n,t){t.dispose()}),this._parameters=this._items=null,this},setOptions:function(n,t){for(var u=a(n)?n:[],i=0,r=u.length,o,h=[],f=this._items,r=u.length;i<r;++i)o=(f[i]||new e(this._parameters)).setOptions(s(!0,{},t,u[i])),h.push(o);for(r=f.length;i<r;++i)f[i].clean().dispose();this._items=h},clean:function(){return f(this._items,function(n,t){t.clean()}),this},render:function(){return f(this._items,function(n,t){t.render()}),this}},n.viz.map.dxVectorMap.prototype._factory.createLegendsControl=function(n){return new o(n)}}(DevExpress,jQuery),function(n){var i=n.viz.core.Tooltip.inherit({ctor:function(n){var t=this;t._container=n.container,t._root=n.renderer.g().attr({"class":"dxm-tooltip"}),t.callBase(null,t._root,n.renderer)},dispose:function(){var n=this;return n._container=n._root=null,n.callBase.apply(n,arguments)},clean:function(){return this._root.remove(),this},setOptions:function(n){return n.border.color=n.borderColor||n.border.color,this.update(n),this},render:function(){return this._root.append(this._container),this}});n.viz.map.dxVectorMap.prototype._factory.createTooltip=function(n){return new i(n)}}(DevExpress),function(n,t){function a(n){return l[n.verticalAlignment]*3+c[n.horizontalAlignment]}function v(n,t){var h=(n.right-n.left)/3,p=(n.bottom-n.top)/2,f=n.left,e=u(f+h),o=u(f+h+h),v=n.right,s=n.top,i=u(s+p),c=n.bottom,y=[{rect:[f,s,e,i]},{rect:[e,s,o,i],center:!0},{rect:[o,s,v,i],horInv:!0},{rect:[f,i,e,c],verInv:!0},{rect:[e,i,o,c],center:!0,verInv:!0},{rect:[o,i,v,c],horInv:!0,verInv:!0}],l=[[],[],[],[],[],[]];return r(t,function(n,t){var i=t.getLayoutOptions();i&&l[a(i)].push({item:t,width:i.width,height:i.height})}),r(y,function(n,t){l[n].length?t.items=l[n]:(t.center?t.rect[0]=t.rect[2]=(t.rect[0]+t.rect[2])/2:t.rect[t.horInv?0:2]=t.rect[t.horInv?2:0],t.rect[t.verInv?1:3]=t.rect[t.verInv?3:1])}),y}function y(n){r([0,1,2,3,4,5],function(t,i){var r=n[i],u=n[(i+3)%6];r.items&&(u.items||(r.rect[1]=e(r.rect[1],u.rect[3]),r.rect[3]=f(r.rect[3],u.rect[1])))}),r([1,4],function(t,i){var r=n[i],e=n[i-1],o=n[i+1],u,f;r.items?e.items||o.items||(u=r.rect[0]-e.rect[2],f=o.rect[0]-r.rect[2],u>f?u/f>=2?(r.rect[0]-=u,r.right=!0):(r.rect[0]-=f,r.rect[2]+=f):f/u>=2?(r.rect[2]+=f,r.center=null):(r.rect[0]-=u,r.rect[2]+=u)):(e.items&&(e.rect[2]=(r.rect[0]+r.rect[2])/2),o.items&&(o.rect[0]=(r.rect[0]+r.rect[2])/2))})}function s(n,t){var i=!1;return y(n),r(n,function(n,r){r.items&&(i=p(r,t)||i)}),i}function p(n,t){var i=n.rect,w=i[2]-i[0],b=i[3]-i[1],o=0,c=0,l=0,s=i[2],y=i[3],h=i[0],p=i[1],a=[],v=!1;return r(n.items,function(r,u){if(u.width>w||u.height>b||(o+u.width>w&&(c+=l,o=l=0),c+u.height>b))return a.push(null),v=!0,t||!1;l=f(l,u.height);var k=n.horInv?i[2]-u.width-o:i[0]+o,d=n.verInv?i[3]-u.height-c:i[1]+c;o+=u.width,s=e(s,k),y=e(y,d),h=f(h,k+u.width),p=f(p,d+u.height),a.push([k,d])}),(t||!v)&&(o=0,n.right?o=i[2]-i[0]-h+s:n.center&&(o=u((i[2]-i[0]-h+s)/2)),r(n.items,function(n,t){var i=a[n];i?t.item.locate(i[0]+o,i[1]):t.item.resize(null)}),n.rect=[s,y,h,p],n.items=null),v}function w(n,t){var i=v(n,t);s(i)&&s(i,!0)}function o(){var n=this;n._items=[],n._suspended=!0,n._updateLayout=function(){n._update()}}var u=Math.round,e=Math.min,f=Math.max,r=t.each,h=t.inArray,c={left:0,center:1,right:2},l={top:0,bottom:1};o.prototype={constructor:o,dispose:function(){return this._items=this._updateLayout=null,this},setSize:function(n,t){return this._size={width:n,height:t},this._update(),this},stop:function(){return this._suspended=!0,this},start:function(){return this._suspended=null,this._update(),this},addItem:function(n){return this._items.push(n),n.updateLayout=this._updateLayout,this},removeItem:function(n){return this._items.splice(h(n,this._items),1),n.updateLayout=null,this},_update:function(){if(!this._suspended){var n=this._size;r(this._items,function(t,i){i.resize(n)}),w({left:0,top:0,right:n.width,bottom:n.height},this._items)}}},n.viz.map.dxVectorMap.prototype._factory.createLayoutControl=function(){return new o}}(DevExpress,jQuery),function(n,t){function k(n,t,i){n.raiseHoverChanged=function(n,r){t(i.hoverChanged,{target:n.proxy,state:r})},n.raiseSelectionChanged=function(n){t(i.selectionChanged,{target:n.proxy})}}function e(n,t,i,r,u){var f=this;f._ctx=n,i=w({},i),f.proxy={index:r,type:u,coordinates:function(){return t},attribute:function(n,t){return arguments.length>1?(i[n]=t,this):arguments.length>0?i[n]:i},selected:function(n,t){return arguments.length>0?(f.setSelected(!!n,t),this):f._selected}}}function o(n){r(n,function(t){n[t]=null})}function g(n){var t,r,i=null;if(h(n)&&n.length>1)for(i=[],t=0,r=n.length-1;t<r;++t)i.push({start:s(n[t]),end:s(n[t+1])});return i}function nt(n,t){for(var u,i=0,r=t.length;i<r;++i)if(t[i].start<=n&&n<=t[i].end)return i;return-1}var s=Number,a=String,v=isFinite,u=n.utils,y=u.isString,h=u.isArray,p=u.isFunction,w=t.extend,r=t.each,c=t.map,tt=t.noop,l="none",f="single",b="multiple",d=n.Class.inherit({_rootClass:null,ctor:function(n){var t=this;t._params=n,t._init();n.projection.on({project:function(){t._reproject()},transform:function(n){t._transform(n),t._relocate()},center:function(n,i){t._transform(i)},zoom:function(n,i){t._transform(i),t._relocate()}})},_init:function(){var n=this;n._root=n._params.renderer.g().attr({"class":n._rootClass}),n._context={renderer:n._params.renderer,root:n._root,projection:n._params.projection,dataKey:n._params.dataKey},k(n._context,n._params.eventTrigger,n._eventNames)},dispose:function(){return this._destroyHandles(),this._params=null,this._dispose(),this},_dispose:function(){this._root=this._context=null},clean:function(){return this._rendered=!1,this._clean(),this._destroyItems(),this},_clean:function(){this._root.remove()},setOptions:function(n){var t=this;return t._processOptions(n||{}),t._rendered&&(t._destroyItems(),t._createItems()),t},render:function(){return this._rendered=!0,this._render(),this._createItems(),this},_processOptions:function(n){var u=this,i=u._commonSettings=u._getCommonSettings(n),r=u._context,t=a(i.selectionMode).toLowerCase();u._customizeCallback=p(i.customize)?i.customize:null,r.isHoverEnabled="hoverEnabled"in i?!!i.hoverEnabled:!0,t=t===l||t===f||t===b?t:f,r.isSelectionEnabled=t!==l,r.isSingleSelection=t===f,r.selected=r.isSingleSelection?null:{}},_getCommonSettings:null,_render:function(){this._root.append(this._params.container)},_destroyItems:function(){this._root.clear(),this._handles&&r(this._handles,function(n,t){t.item&&(t.item.clean().dispose(),t.item=null)})},_destroyHandles:function(){var n=this;n._handles&&r(n._handles,function(n,t){t.dispose()}),n._handles=null},_itemType:null,_initProxy:null,_getItemSettings:null,_createItem:null,_arrangeItems:null,_prepareItems:null,_createHandles:function(n){var t=this;h(n)&&(t._handles=c(n,function(n,i){n=n||{};var r=new e(t._context,t._getItemCoordinates(n),t._getItemAttributes(n),i,t._itemType),u=r.proxy;return t._initProxy(u,n),r.settings=t._customizeCallback&&t._customizeCallback.call(u,u)||{},r.settings.isSelected&&u.selected(!0),r}),t._prepareItems())},_createItems:function(){var n=this,t=[];n._handles&&(r(n._handles,function(i,r){var u=n._getItemSettings(r.proxy,r.settings);r.item=n._createItem(u).init(n._context,r.proxy).render(u).project().locate(),r.proxy.selected()&&t.push(r.item)}),r(t,function(n,t){t.setSelectedState()}),n._arrangeItems(),n._commonSettings.label.enabled&&(n._labelsTimeout&&clearTimeout(n._labelsTimeout),n._labelsTimeout=setTimeout(function(){n._labelsTimeout=null,n._rendered&&r(n._handles,function(n,t){t.item.createLabel()})}))),n._params.ready&&n._params.ready()},_processSource:null,setData:function(n){function r(n){i._rendered&&i._params.tracker.reset(),i._destroyItems(),i._destroyHandles(),i._createHandles(i._processSource(n)),i._rendered&&i._createItems()}var i=this;return y(n)?t.getJSON(n).done(r).fail(function(){r(null)}):r(n),i},_transform:function(n){this._root.attr(n)},_reproject:function(){this._rendered&&this._handles&&r(this._handles,function(n,t){t.item.project().locate()})},_relocate:function(){this._rendered&&this._handles&&r(this._handles,function(n,t){t.item.locate()})},hoverItem:function(n,t){return this._handles[n].setHovered(t),this},selectItem:function(n,t,i){return this._handles[n].setSelected(t,i),this},clearSelection:function(){var n=this._context;return n.isSelectionEnabled&&(n.isSingleSelection?n.selected&&n.selected.setSelected(!1):(r(n.selected,function(n,t){t&&t.setSelected(!1)}),n.selected={})),this},raiseClick:function(n,t){return this._params.eventTrigger(this._eventNames.click,{target:this._handles[n].proxy,jQueryEvent:t}),this},getProxyItems:function(){return c(this._handles,function(n){return n.proxy})},getProxyItem:function(n){return this._handles[n].proxy},_performGrouping:function(n,t,i,u){var f=g(n),e;f&&(e=u(f.length),r(this._handles,function(n,r){var u,o;v(u=i(r,n))&&(o=nt(u,f))>=0&&(r.settings[t]=e[o])}),r(f,function(n,i){i.index=n,i[t]=e[n]}),this._params.dataExchanger.set(this._dataCategory,t,f))},_groupByColor:function(t,i,r){this._performGrouping(t,"color",r,function(t){for(var f=new n.viz.core.GradientPalette(i,t),r=0,u=[];r<t;++r)u.push(f.getColor(r));return u})}});n.viz.map._internal.mapItemBehavior={init:function(n,t){return this._ctx=n,this._data={index:t.index,type:t.type},this._proxy=t,this},dispose:function(){return o(this),this},project:function(){var n=this;return n._coords=n._project(n._ctx.projection,n._proxy.coordinates()),this},locate:function(){var n=this;return n._locate(n._transform(n._ctx.projection,n._coords)),n},clean:function(){return this._root.remove(),this._root=null,this},render:function(n){var t=this;return t._root=t._createRoot().append(t._ctx.root),t._settings=n,t._render(n),t}},e.prototype={constructor:e,_hovered:!1,_selected:!1,dispose:function(){return o(this.proxy),o(this),this},setHovered:function(n){var t=this,i;return t._ctx.isHoverEnabled?(t._hovered!==!!n&&(t._hovered=!!n,i=t.item,i&&(t._hovered&&i.onHover(),t._selected||(i[t._hovered?"setHoveredState":"setDefaultState"](),t._ctx.raiseHoverChanged(t,t._hovered)))),t):t},setSelected:function(n,t){var i=this,r=i._ctx,u,f;return r.isSelectionEnabled?(i._selected!==!!n&&(i._selected=!!n,u=r.selected,r.isSingleSelection?(r.selected=null,u&&u.setSelected(!1),i._selected&&(r.selected=i)):r.selected[i.proxy.index]=i._selected?i:null,f=i.item,f&&(f[i._selected?"setSelectedState":i._hovered?"setHoveredState":"setDefaultState"](),t||r.raiseSelectionChanged(i))),i):i}},n.viz.map.dxVectorMap.prototype._factory.MapItemsManager=d}(DevExpress,jQuery),function(n,t,i){function l(n){return n.coordinates}function a(n){var t,r;return n.geometry&&(r=n.geometry.type,t=n.geometry.coordinates,t&&(r==="Polygon"||r==="MultiPolygon")?r==="MultiPolygon"&&(t=[].concat.apply([],t)):t=i),t}function v(n){return n.attributes}function y(n){return n.properties}function u(){}function p(n){for(var f=0,h=n.length,i,t=n[h-1],u,e=0,o=0,r=0;f<h;++f)i=t,t=n[f],u=i[0]*t[1]-t[0]*i[1],r+=u,e+=(i[0]+t[0])*u,o+=(i[1]+t[1])*u;return r/=2,e/=6*r,o/=6*r,{coords:[e,o],area:s(r)}}function w(n){for(var i=0,f=n.length,t,r,u=0;i<f;++i)t=p(n[i]),t.area>u&&(u=t.area,r=t);return r}var o=String,s=Math.abs,h=Math.sqrt,b=n.utils.isArray,r=t.noop,c=n.viz.core.utils.patchFontOptions,f=1,e=n.viz.map.dxVectorMap.prototype._factory.MapItemsManager.inherit({_rootClass:"dxm-areas",_dataCategory:"areas",_eventNames:{click:"areaClick",hoverChanged:"areaHoverChanged",selectionChanged:"areaSelectionChanged"},_init:function(){var n=this;n.callBase.apply(n,arguments),n._labelRoot=n._params.renderer.g().attr({"class":"dxm-area-labels"}),n._context.labelRoot=n._labelRoot},_dispose:function(){this.callBase.apply(this,arguments),this._labelRoot=null},_processSource:function(n){var t=n&&n.type==="FeatureCollection";return this._getItemCoordinates=t?a:l,this._getItemAttributes=t?y:v,t?n.features:n},_getCommonSettings:function(n){return this._params.themeManager.getCommonAreaSettings(n)},_initProxy:r,_itemType:"area",_clean:function(){this.callBase.apply(this,arguments),this._labelRoot.remove()},_render:function(){var n=this;n.callBase.apply(n,arguments),n._commonSettings.label.enabled&&n._labelRoot.append(n._params.container)},_getItemSettings:function(n,t){return this._params.themeManager.getAreaSettings(this._commonSettings,t)},_transform:function(n){this.callBase.apply(this,arguments),this._labelRoot.attr(n)},_createItem:function(){return new u},_prepareItems:function(){var n=this._commonSettings,t=n.colorGroupingField;n.colorGroups&&this._groupByColor(n.colorGroups,n.palette,function(n){return n.proxy.attribute(t)})},_arrangeItems:r});t.extend(u.prototype,n.viz.map._internal.mapItemBehavior,{_project:function(n,t){return n.projectArea(t)},_createRoot:function(){return this._ctx.renderer.path([],"area")},_render:function(n){var i=this;return i._styles={normal:{"class":"dxm-area",stroke:n.borderColor,"stroke-width":n.borderWidth,fill:n.color},hovered:{"class":"dxm-area dxm-area-hovered",stroke:n.hoveredBorderColor,"stroke-width":n.hoveredBorderWidth,fill:n.hoveredColor},selected:{"class":"dxm-area dxm-area-selected",stroke:n.selectedBorderColor,"stroke-width":n.selectedBorderWidth,fill:n.selectedColor}},t(i._root.attr(i._styles.normal).element).data(i._ctx.dataKey,i._data),i},_transform:function(n,t){return n.getAreaCoordinates(t)},_locate:function(n){this._root.attr({points:n}),this._label&&this._locateLabel()},onHover:r,setDefaultState:function(){this._root.attr(this._styles.normal).toBackground()},setHoveredState:function(){this._root.attr(this._styles.hovered).toForeground()},setSelectedState:function(){this._root.attr(this._styles.selected).toForeground()},createLabel:function(){var n=this,e=o(n._proxy.text||n._proxy.attribute(n._settings.label.dataField)||""),u,r,s,i,f;return e?(u=w(n._coords),n._centroid=u.coords,n._areaSize=h(u.area),n._label=n._ctx.renderer.g().attr({"class":"dxm-area-label"}).append(n._ctx.labelRoot),r=n._settings.label,s=n._ctx.renderer.text(e,0,0).css(c(r.font)).attr({align:"center",stroke:r.stroke,"stroke-width":r["stroke-width"],"stroke-opacity":r["stroke-opacity"]}).append(n._label),i=n._label.getBBox(),f=-i.y-i.height/2,s.attr({y:f}),n._labelSize={w:i.width,h:i.height},t(n._ctx.renderer.rect(i.x,i.y+f,i.width,i.height).attr({"stroke-width":0,stroke:"none",fill:"#000000",opacity:.0001}).append(n._label).element).data(n._ctx.dataKey,n._data),n._locateLabel(),n):n},_locateLabel:function(){var n=this,t=n._ctx.projection.getPointCoordinates(n._centroid),i=n._ctx.projection.getSquareSize([n._areaSize,n._areaSize]);n._label.attr({translateX:t.x,translateY:t.y,visibility:n._labelSize.w/i[0]<f&&n._labelSize.h/i[1]<f?null:"hidden"})}}),n.viz.map._internal.AreasManager=e,n.viz.map._internal.Area=u,n.viz.map.dxVectorMap.prototype._factory.createAreasManager=function(n){return new e(n)}}(DevExpress,jQuery),function(n,t,i){function b(){}function k(){}function d(){}function g(){}function nt(n,t){var i=tt(n).toLowerCase();return a[i]?i:t}var r=Number,tt=String,f=isFinite,o=Math,v=o.round,it=o.max,rt=o.min,u=t.extend,s=t.each,ut=n.utils.isArray,ft=n.viz.core.utils.patchFontOptions,y="dxm-marker",et="dxm-marker dxm-marker-hovered",ot="dxm-marker dxm-marker-selected",p={stroke:"none","stroke-width":0,fill:"#000000",opacity:.0001},w="dot",h="bubble",c="pie",st="image",l=null,a={},ht=n.viz.map.dxVectorMap.prototype._factory.MapItemsManager.inherit({_rootClass:"dxm-markers",_dataCategory:"markers",_eventNames:{click:"markerClick",hoverChanged:"markerHoverChanged",selectionChanged:"markerSelectionChanged"},_init:function(){var n=this;n.callBase.apply(n,arguments),n._context.getPieColors=function(t){return n._params.themeManager.getPieColors(n._commonSettings,t)},n._filter=n._params.renderer.shadowFilter("-40%","-40%","180%","200%",0,1,1,"#000000",.2)},_dispose:function(){this.callBase.apply(this,arguments),this._filter.dispose(),this._filter=null},_getItemCoordinates:function(n){return n.coordinates},_getItemAttributes:function(n){return n.attributes},_processSource:function(n){return n},_getCommonSettings:function(n){return this._params.themeManager.getCommonMarkerSettings(n)},_processOptions:function(n){var t=this;t.callBase.apply(t,arguments),t._commonSettings._filter=t._filter.ref,t._commonType=nt(n&&n.type,l)},_arrangeBubbles:function(){var o=this._handles,i=[],t,r=o.length,n,u=[],e,s,c;if(!this._commonSettings._bubble.sizeGroups){for(t=0;t<r;++t)n=o[t],n.item.type===h&&(i.push(n),f(n.proxy.value)&&u.push(n.proxy.value));for(e=rt.apply(null,u),s=it.apply(null,u),c=s-e||1,t=0,r=i.length;t<r;++t)n=i[t],n.item.setSize(f(n.proxy.value)?(n.proxy.value-e)/c:0)}},_itemType:"marker",_initProxy:function(n,t){s(t,function(t,r){n[t]===i&&(n[t]=r)}),n._TYPE=nt(t.type,null)},_getItemSettings:function(n,t){var r=n._TYPE||this._commonType,i=this._params.themeManager.getMarkerSettings(this._commonSettings,u({},n.style,t),r);return n.text=n.text||i.text,i._type=r,i},_createItem:function(n){return new a[n._type]},_prepareItems:function(){var i=this,t=i._commonType,u,n=i._commonSettings["_"+t];(t===w||t===h)&&n.colorGroups&&(u=n.colorGroupingField,i._groupByColor(n.colorGroups,n.palette,function(n){var i=n.proxy;return!i._TYPE||i._TYPE===t?i.attribute(u):NaN})),t===c&&i._updateLegendForPies(),n.sizeGroups&&(u=n.sizeGroupingField,i._performGrouping(n.sizeGroups,"size",function(n){var i=n.proxy;return!i._TYPE||i._TYPE===t?i.value||i.attribute(u):NaN},function(t){for(var u=n.minSize>0?r(n.minSize):0,e=n.maxSize>=u?r(n.maxSize):0,i=0,f=[],i=0;i<t;++i)f.push((u*(t-i-1)+e*i)/(t-1));return f}))},_updateLegendForPies:function(){var n=0;s(this._handles,function(t,i){var u=i.proxy,r;u._TYPE&&u._TYPE!==c||(r=u.values,r&&r.length>n&&(n=r.length))}),this._params.dataExchanger.set(this._dataCategory,"color",t.map(this._context.getPieColors(n).slice(0,n),function(n,t){return{index:t,color:n}}))},_arrangeItems:function(){this._arrangeBubbles()}}),e=u({},n.viz.map._internal.mapItemBehavior,{_project:function(n,t){return n.projectPoint(t)},_createRoot:function(){return this._ctx.renderer.g()},_render:function(n){var t=this;return t._root.attr({"class":y}),t._create(n,t._ctx.renderer,t._root),t},_transform:function(n,t){return n.getPointCoordinates(t)},_locate:function(n){this._root.attr({translateX:n.x,translateY:n.y})},onHover:function(){this._root.toForeground()},setDefaultState:function(){this._root.attr({"class":y}).toBackground(),this._applyDefault()},setHoveredState:function(){this._root.attr({"class":et}),this._applyHovered()},setSelectedState:function(){this._root.attr({"class":ot}).toForeground(),this._applySelected()},createLabel:function(){var n=this;if(n._proxy.text){var o=n._root.getBBox(),r=n._settings.label,u=n._ctx.renderer.text(n._proxy.text,0,0).css(ft(r.font)).attr({align:"center",stroke:r.stroke,"stroke-width":r["stroke-width"],"stroke-opacity":r["stroke-opacity"]}).append(n._root),i=u.getBBox(),f=v(-i.x+o.width/2)+2,e=v(-i.y-i.height/2)-1;u.attr({x:f,y:e}),t(n._ctx.renderer.rect(f+i.x-1,e+i.y-1,i.width+2,i.height+2).attr(p).append(n._root).element).data(n._ctx.dataKey,n._data)}}});u(b.prototype,e,{type:w,_create:function(n,i,u){var f=this,e=n.size>0?r(n.size):0,o=e,s=e+(n.selectedStep>0?r(n.selectedStep):0),c=o+(n.backStep>0?r(n.backStep):0),l=s+(n.backStep>0?r(n.backStep):0),h=e/2;f._dotDefault={cx:0,cy:0,r:h,stroke:n.borderColor,"stroke-width":n.borderWidth,fill:n.color,filter:n.shadow?n._filter:null},f._dotHovered={cx:0,cy:0,r:o/2,stroke:n.hoveredBorderColor,"stroke-width":n.hoveredBorderWidth,fill:n.hoveredColor},f._dotSelected={cx:0,cy:0,r:s/2,stroke:n.selectedBorderColor,"stroke-width":n.selectedBorderWidth,fill:n.selectedColor},f._backDefault={cx:0,cy:0,r:h,stroke:"none","stroke-width":0,fill:n.backColor,opacity:n.backOpacity},f._backHovered={cx:0,cy:0,r:c/2,stroke:"none","stroke-width":0,fill:n.backColor,opacity:n.backOpacity},f._backSelected={cx:0,cy:0,r:l/2,stroke:"none","stroke-width":0,fill:n.backColor,opacity:n.backOpacity},f._back=i.circle().sharp().attr(f._backDefault).append(u),f._dot=i.circle().sharp().attr(f._dotDefault).append(u),t(f._back.element).data(f._ctx.dataKey,f._data),t(f._dot.element).data(f._ctx.dataKey,f._data)},_destroy:function(){this._back=this._dot=null},_applyDefault:function(){this._back.attr(this._backDefault),this._dot.attr(this._dotDefault)},_applyHovered:function(){this._back.attr(this._backHovered),this._dot.attr(this._dotHovered)},_applySelected:function(){this._back.attr(this._backSelected),this._dot.attr(this._dotSelected)}}),u(k.prototype,e,{type:h,_create:function(n,i,u){var e=this;e._minSize=n.minSize>0?r(n.minSize):0,e._maxSize=n.maxSize>e._minSize?r(n.maxSize):e._minSize,e.value=f(e._proxy.value)?r(e._proxy.value):null,e._default={stroke:n.borderColor,"stroke-width":n.borderWidth,fill:n.color,opacity:n.opacity},e._hovered={stroke:n.hoveredBorderColor,"stroke-width":n.hoveredBorderWidth,fill:n.hoveredColor,opacity:n.hoveredOpacity},e._selected={stroke:n.selectedBorderColor,"stroke-width":n.selectedBorderWidth,fill:n.selectedColor,opacity:n.selectedOpacity},e._bubble=i.circle(0,0,(n.size||n.maxSize)/2).sharp().attr(e._default).append(u),t(e._bubble.element).data(e._ctx.dataKey,e._data)},_applyDefault:function(){this._bubble.attr(this._default)},_applyHovered:function(){this._bubble.attr(this._hovered)},_applySelected:function(){this._bubble.attr(this._selected)},setSize:function(n){var t=this,i=(t._minSize+n*(t._maxSize-t._minSize))/2;return t._default.r=t._hovered.r=t._selected.r=i,t._bubble.attr({r:i}),t}}),u(d.prototype,e,{type:c,_create:function(i,u,e){var o=this,w=(i.size>0?r(i.size):0)/2,l,s=0,a,c,h,b=0,v,y,p,k;for(o._pieDefault={opacity:i.opacity},o._pieHovered={opacity:i.hoveredOpacity},o._pieSelected={opacity:i.selectedOpacity},o._borderDefault={stroke:i.borderColor,"stroke-width":i.borderWidth},o._borderHovered={stroke:i.hoveredBorderColor,"stroke-width":i.hoveredBorderWidth},o._borderSelected={stroke:i.selectedBorderColor,"stroke-width":i.selectedBorderWidth},l=o._proxy.values,a=ut(l)?l.length:0,c=[];s<a;++s)h=r(l[s]),f(h)&&(c.push(h),b+=h);for(o._pie=u.g().attr(o._pieDefault),v=new n.viz.core.Translator1D(0,b,90,450),y=v.translate(0),k=o._ctx.getPieColors(c.length),h=0,s=0,a=c.length;s<a;++s)h+=c[s],p=v.translate(h),t(u.arc(0,0,0,w,y,p).attr({"stroke-linejoin":"round",fill:k[s]}).append(o._pie).element).data(o._ctx.dataKey,o._data),y=p;o._pie.append(e),o._border=u.circle(0,0,w).sharp().attr(o._borderDefault).append(e),t(o._border.element).data(o._ctx.dataKey,o._data)},_applyDefault:function(){this._pie.attr(this._pieDefault),this._border.attr(this._borderDefault)},_applyHovered:function(){this._pie.attr(this._pieHovered),this._border.attr(this._borderHovered)},_applySelected:function(){this._pie.attr(this._pieSelected),this._border.attr(this._borderSelected)}}),u(g.prototype,e,{type:st,_create:function(n,i,u){var f=this,e=n.size>0?r(n.size):0,o=e+(n.hoveredStep>0?r(n.hoveredStep):0),s=e+(n.selectedStep>0?r(n.selectedStep):0);f._default={x:-e/2,y:-e/2,width:e,height:e},f._hovered={x:-o/2,y:-o/2,width:o,height:o},f._selected={x:-s/2,y:-s/2,width:s,height:s},f._image=i.image().attr(f._default).attr({href:f._proxy.url,location:"center"}).append(u),f._tracker=i.rect().attr(f._default).attr(p).append(u),t(f._tracker.element).data(f._ctx.dataKey,f._data)},_applyDefault:function(){this._image.attr(this._default),this._tracker.attr(this._default)},_applyHovered:function(){this._image.attr(this._hovered),this._tracker.attr(this._hovered)},_applySelected:function(){this._image.attr(this._selected),this._tracker.attr(this._selected)}}),s([b,k,d,g],function(n,t){l=l||t.prototype.type,a[t.prototype.type]=t}),n.viz.map.dxVectorMap.prototype._factory.createMarkersManager=function(n){return new ht(n)}}(DevExpress,jQuery),DevExpress.MOD_VIZ_VECTORMAP=!0}if(!DevExpress.MOD_VIZ_SPARKLINES){if(!DevExpress.MOD_VIZ_CORE)throw Error("Required module is not referenced: viz-core");(function(n,t,i){function d(n){return{text:n.valueText.join("<br/>")}}var o=100,w=10,b=6,r=200,k=1e3,l=n.extend,a=Math.abs,it=Number,u=Math.round,e=t.viz.core,s=e.CoreFactory;t.viz.sparklines={},t.viz.sparklines.BaseSparkline=e.BaseWidget.inherit({_clean:function(){this._tooltipShown&&(this._tooltip.dispose(),this._tooltip=null,this._tooltipShown=null,this._tooltipGroup.clear()),this._tooltipContainer.detach(),this._cleanWidgetElements(),this._cleanTranslators()},_initCore:function(){this._createHtmlElements(),this._createTooltipGroups(),this._initTooltipEvents()},_getRendererParameters:function(){return{cssClass:this._widgetClass+" "+this._widgetClass+"-"+this._widgetType,pathModified:this.option("pathModified"),rtl:this.option("rtlEnabled")}},_getOption:function(n){return this.option(n)},_getDefaultSize:function(){return this._defaultSize},_isContainerVisible:function(){return!0},_disposeCore:function(){this.callBase(),this._disposeWidgetElements(),this._disposeTooltipEvents(),this._tooltipRenderer.dispose(),this._ranges=null,delete this._tooltipRenderer,delete this._tooltipTrackerGroup,delete this._tooltipGroup,delete this._tooltipContainer},_render:function(){var n=this;n._prepareOptions(),n._updateWidgetElements(),n._drawWidgetElements(),n._drawn()},_updateWidgetElements:function(){this._updateRange(),this._updateTranslator()},_applySize:function(){this._allOptions&&(this._allOptions.size={width:this._canvas.width,height:this._canvas.height})},_cleanTranslators:function(){this._translatorX=null,this._translatorY=null},_setupResizeHandler:n.noop,_resize:function(){this._redrawWidgetElements(),this._prepareTooltipContainer()},_prepareOptions:function(n){var u=this,f=u.option()||{},t,r,i;return r=e.findTheme("default"),r=r[this._widgetType],t=l(!0,{},n,f),typeof t.theme=="string"?(i=e.findTheme(t.theme),i=i[this._widgetType]):i=t.theme,l(!0,{},r,i,t)},_createTooltipGroups:function(){var i=this,r,f,u=i._widgetClass;i._tooltipRenderer=r=new t.viz.renderers.Renderer({width:1,height:1,cssClass:u+" "+u+"-tooltip",pathModified:this.option("pathModified"),rtl:this.option("rtlEnabled")}),i._tooltipContainer=n('<div style="position: relative">'),r.draw(i._tooltipContainer[0]),f=r.root,i._tooltipGroup=r.g().attr({"class":u+"-tooltip-group"}).css({"z-index":1}).append(f),i._tooltipTrackerGroup=r.g().attr({"class":u+"-tooltip-tracker-group"}).append(f),i._tooltipTracker=i._createTooltipTracker().append(i._tooltipTrackerGroup)},_createTooltipTracker:function(){return this._tooltipRenderer.rect().attr({fill:"grey",opacity:0})},_initTooltipEvents:function(){var t=this,i={widget:t,container:t._tooltipTracker};t._showTooltipCallback=function(){t._showTooltipTimeout=null,t._tooltipShown||(t._tooltipShown=!0,t._showTooltip())},t._hideTooltipCallback=function(){t._hideTooltipTimeout=null,t._tooltipShown&&(t._tooltipShown=!1,t._hideTooltip())},t._disposeCallbacks=function(){t=t._showTooltipCallback=t._hideTooltipCallback=t._disposeCallbacks=null};n(t._tooltipTracker.element).on(nt,i).on(tt,i);n(t._tooltipTracker.element).on(g)},_disposeTooltipEvents:function(){clearTimeout(this._showTooltipTimeout),clearTimeout(this._hideTooltipTimeout),this._showTooltipTimeout=this._hideTooltipTimeout=null,n(this._tooltipTracker.element).off(),this._disposeCallbacks()},_updateTranslator:function(){this._translatorX=s.createTranslator2D(this._ranges.arg,this._canvas,{direction:"horizontal"}),this._translatorY=s.createTranslator2D(this._ranges.val,this._canvas)},_prepareTooltipOptions:function(){var t=this,r=t._allOptions.tooltip,u=t._getTooltipSize(!0),o={canvasWidth:u.width,canvasHeight:u.height,paddingLeftRight:r.paddingLeftRight,paddingTopBottom:r.paddingTopBottom,arrowLength:r.arrowLength,lineSpacing:r.font.lineSpacing!==i&&r.font.lineSpacing!==null?r.font.lineSpacing:b},f=!n.isFunction(t._allOptions.tooltip.customizeText)&&!n.isFunction(t._allOptions.tooltip.customizeTooltip),e=n.extend(o,t._allOptions.tooltip,{customizeTooltip:f?d:t._allOptions.tooltip.customizeTooltip,_justify:t._allOptions.tooltip._justify||f,_rtl:t.option("rtlEnabled")});return t._tooltipOptions={size:u,options:e},e},_prepareTooltipContainer:function(){var n=this,t=n._canvas;n._updateTooltipSizeToNormal(),n._tooltipTracker.attr({width:t.width,height:t.height}),n._tooltipContainer.appendTo(n.element()),n._tooltipInitializated=!1,n._canShowTooltip=n._allOptions.tooltip.enabled},_isTooltipVisible:function(){return this._tooltip.enabled()&&this._tooltip.prepare(this._getTooltipData(),{offset:0,cloudVerticalPosition:this._allOptions.tooltip.verticalAlignment,cloudHorizontalPosition:this._allOptions.tooltip.horizontalAlignment})},_createTooltip:function(){var n=this;n._tooltip=s.createTooltip(n._prepareTooltipOptions(),n._tooltipGroup,n._tooltipRenderer),n._isTooltipVisible()?(n._tooltip.show(),n._updateTooltipSizeToWide(),n._checkTooltipSize(),n._updateTooltipSizeToNormal()):n._canShowTooltip=!1},_doShowTooltip:function(n){var t=this;t._canShowTooltip&&(clearTimeout(t._hideTooltipTimeout),t._hideTooltipTimeout=null,clearTimeout(t._showTooltipTimeout),t._showTooltipTimeout=setTimeout(t._showTooltipCallback,n))},_doHideTooltip:function(n){var t=this;t._canShowTooltip&&(clearTimeout(t._showTooltipTimeout),t._showTooltipTimeout=null,clearTimeout(t._hideTooltipTimeout),t._hideTooltipTimeout=setTimeout(t._hideTooltipCallback,n))},_getNormalTooltipSize:function(){var n={};return n.width=this._canvas.width,n.left=0,n.tooltipLeft=u(n.width/2),n},_getWideTooltipSize:function(n,t){var f=this,r=f._canvas,e=f._allOptions.tooltip.horizontalAlignment,o=n+t,i={};return i.width=r.width+o,i.left=-n,i.tooltipLeft=e==="right"?u(r.width/2):e==="left"?u(r.width/2)+o:u(i.width/2),i},_getTooltipSize:function(n,t,i,r){var e=this,s=e._canvas,h=!(e._allOptions.tooltip.verticalAlignment==="bottom"),f=!n&&(t||i)?e._getWideTooltipSize(t,i):e._getNormalTooltipSize(),c=r>0?r+o:o;return f.height=s.height+c,f.top=h?-f.height:-s.height,f.trackerY=h?c:0,f.tooltipY=h?u(s.height/2)+c-w:u(s.height/2),f},_checkTooltipSize:function(){var n=this,i=n._tooltip,t=i.getBBox(),s=n._allOptions.tooltip.allowContainerResizing,r=-t.x,u=t.x+t.width-n._canvas.width,f=t.height-o,e;(r>0||u>0||f>0)&&(s?(n._tooltipOptions.size=e=n._getTooltipSize(!1,r>0?r:0,u>0?u:0,f>0?f:0),i.setSize(e.width,e.height),n._updateTooltipSizeToWide()):(n._canShowTooltip=!1,i.hide()))},_updateTooltipSizeToWide:function(){var t=this,n=t._tooltipOptions.size,i=t._tooltipRenderer;i.resize(n.width,n.height),i.root.css({left:n.left,top:n.top,position:"absolute",overflow:"hidden"}),t._tooltipTracker.attr({y:n.trackerY,x:-n.left}),t._tooltip.move(n.tooltipLeft,n.tooltipY)},_updateTooltipSizeToNormal:function(){var n=this,i=n._tooltipRenderer,t=n._canvas;i.resize(t.width,t.height),i.root.css({left:0,top:-t.height,position:"absolute"}),n._tooltipTracker.attr({y:0,x:0})},_showTooltip:function(){(this._tooltipInitializated||(this._createTooltip(),this._tooltipInitializated=!0,this._canShowTooltip))&&(this._updateTooltipSizeToWide(),this._tooltip.show())},_hideTooltip:function(){this._updateTooltipSizeToNormal(),this._tooltip.hide()},showLoadingIndicator:n.noop});var g={"contextmenu.sparkline-tooltip":function(n){(t.ui.events.isTouchEvent(n)||t.ui.events.isPointerEvent(n))&&n.preventDefault()},"MSHoldVisual.sparkline-tooltip":function(n){n.preventDefault()}},nt={"mouseover.sparkline-tooltip":function(t){c=!1;var i=t.data.widget;i._x=t.pageX,i._y=t.pageY;n(i._tooltipTracker.element).off(h).on(h,t.data);i._doShowTooltip(r)},"mouseout.sparkline-tooltip":function(t){if(!c){var i=t.data.widget;n(i._tooltipTracker.element).off(h),i._doHideTooltip(r)}}},h={"mousemove.sparkline-tooltip":function(n){var t=n.data.widget;t._showTooltipTimeout&&(a(t._x-n.pageX)>3||a(t._y-n.pageY)>3)&&(t._x=n.pageX,t._y=n.pageY,t._doShowTooltip(r))}},f=null,v=function(n){n.preventDefault();var t=f;t&&t!==n.data.widget&&t._doHideTooltip(r),t=f=n.data.widget,t._doShowTooltip(k),t._touch=!0},y=function(){var n=f;n&&(n._touch||(n._doHideTooltip(r),f=null),n._touch=null)},p=function(){var n=f;n&&n._showTooltipTimeout&&(n._doHideTooltip(r),f=null)},c=!1,tt={"pointerdown.sparkline-tooltip":function(n){v(n)},"touchstart.sparkline-tooltip":function(n){v(n)}};n(document).on({"pointerdown.sparkline-tooltip":function(){c=!0,y()},"touchstart.sparkline-tooltip":function(){y()},"pointerup.sparkline-tooltip":function(){p()},"touchend.sparkline-tooltip":function(){p()}})})(jQuery,DevExpress),function(n,t,i){var r=t.viz,g=r.charts,u=r.core,f=1,e=50,l=4,a=250,v=30,o=5,s=3,y={disabled:!1,theme:"default",dataSource:[],size:{},margin:{},type:"line",argumentField:"arg",valueField:"val",winlossThreshold:0,showFirstLast:!0,showMinMax:!1,redrawOnResize:!1},p={line:!0,spline:!0,stepline:!0,area:!0,steparea:!0,splinearea:!0,bar:!0,winloss:!0},h=n.map,w=Math.abs,b=Math.round,k=isFinite,d=Number,c=String;t.registerComponent("dxSparkline",r.sparklines,r.sparklines.BaseSparkline.inherit({_widgetType:"sparkline",_widgetClass:"dxsl",_defaultSize:{width:a,height:v,left:o,right:o,top:s,bottom:s},_initCore:function(){this.callBase(),this._refreshDataSource(),this._createSeries()},_dataSourceChangedHandler:function(){this._initialized&&(this._clean(),this._updateWidgetElements(),this._drawWidgetElements())},_updateWidgetElements:function(){this._updateSeries(),this.callBase()},_dataSourceOptions:function(){return{paginate:!1,_preferSync:!0}},_redrawWidgetElements:function(){this._updateTranslator(),this._correctPoints(),this._series.draw({x:this._translatorX,y:this._translatorY}),this._seriesGroup.append(this._renderer.root)},_disposeWidgetElements:function(){var n=this;delete n._seriesGroup,delete n._seriesLabelGroup,n._series&&n._series.dispose(),n._series=null},_cleanWidgetElements:function(){this._seriesGroup.remove(),this._seriesLabelGroup.remove(),this._seriesGroup.clear(),this._seriesLabelGroup.clear()},_drawWidgetElements:function(){this._dataSource&&this._dataSource.isLoaded()&&this._drawSeries()},_prepareOptions:function(){this._allOptions=this.callBase(y),this._allOptions.type=c(this._allOptions.type).toLowerCase(),p[this._allOptions.type]||(this._allOptions.type="line")},_createHtmlElements:function(){this._seriesGroup=this._renderer.g().attr({"class":"dxsl-series"}),this._seriesLabelGroup=this._renderer.g().attr({"class":"dxsl-series-labels"})},_createSeries:function(){this._series=u.CoreFactory.createSeries({renderer:this._renderer,seriesGroup:this._seriesGroup,labelsGroup:this._seriesLabelGroup},{widgetType:"chart",type:"line"})},_updateSeries:function(){var n=this,t,f,r;n._prepareDataSource(),r=n._prepareSeriesOptions(),n._series.updateOptions(r),t=[[n._series]],t.argumentOptions={type:r.type==="bar"?"discrete":i},f=u.CoreFactory.createDataValidator(n._simpleDataSource,t,n._incidentOccured,{checkTypeForAllData:!1,convertToAxisDataType:!0,sortingMethod:!0}),n._simpleDataSource=f.validate(),n._series.updateData(n._simpleDataSource)},_optionChanged:function(n){n.name==="dataSource"&&this._allOptions?this._refreshDataSource():this.callBase.apply(this,arguments)},_parseNumericDataSource:function(n,t,r){var u=this.option("ignoreEmptyPoints");return h(n,function(n,f){var e=null,s,o;return n!==i&&(e={},s=k(n),e[t]=s?c(f):n[t],o=s?n:n[r],e[r]=o===null?u?i:o:d(o),e=e[t]!==i&&e[r]!==i?e:null),e})},_parseWinlossDataSource:function(n,t,i){var u=-1,f=0,e=1,o=.0001,r=this._allOptions.winlossThreshold;return h(n,function(n){var s={};return s[t]=n[t],s[i]=w(n[i]-r)<o?f:n[i]>r?e:u,s})},_prepareDataSource:function(){var n=this,t=n._allOptions,r=t.argumentField,u=t.valueField,f=n._dataSource?n._dataSource.items():[],i=n._parseNumericDataSource(f,r,u);t.type==="winloss"?(n._winlossDataSource=i,n._simpleDataSource=n._parseWinlossDataSource(i,r,u)):n._simpleDataSource=i},_prepareSeriesOptions:function(){var t=this,n=t._allOptions,r=n.type==="winloss"?"bar":n.type;return{visible:!0,argumentField:n.argumentField,valueField:n.valueField,color:n.lineColor,width:n.lineWidth,widgetType:"chart",type:r,opacity:r.indexOf("area")!==-1?t._allOptions.areaOpacity:i,customizePoint:t._getCustomizeFunction(),point:{size:n.pointSize,symbol:n.pointSymbol,border:{visible:!0,width:2},color:n.pointColor,visible:!1,hoverStyle:{border:{}},selectionStyle:{border:{}}},border:{color:n.lineColor,width:n.lineWidth,visible:r!=="bar"}}},_createBarCustomizeFunction:function(n){var i=this,t=i._allOptions,r=i._winlossDataSource;return function(){var u=this.index,f=t.type==="winloss",e=f?t.winlossThreshold:0,o=f?r[u][t.valueField]:this.value,s=f?t.winColor:t.barPositiveColor,h=f?t.lossColor:t.barNegativeColor,i;return i=o>=e?s:h,(u===n.first||u===n.last)&&(i=t.firstLastColor),u===n.min&&(i=t.minColor),u===n.max&&(i=t.maxColor),{color:i}}},_createLineCustomizeFunction:function(n){var i=this,t=i._allOptions;return function(){var i,r=this.index;return(r===n.first||r===n.last)&&(i=t.firstLastColor),r===n.min&&(i=t.minColor),r===n.max&&(i=t.maxColor),i?{visible:!0,border:{color:i}}:{}}},_getCustomizeFunction:function(){var n=this,i=n._allOptions,u=n._winlossDataSource||n._simpleDataSource,r=n._getExtremumPointsIndexes(u),t;return t=i.type==="winloss"||i.type==="bar"?n._createBarCustomizeFunction(r):n._createLineCustomizeFunction(r)},_getExtremumPointsIndexes:function(n){var t=this,r=t._allOptions,u=n.length-1,i={};return t._minMaxIndexes=t._findMinMax(n),r.showFirstLast&&(i.first=0,i.last=u),r.showMinMax&&(i.min=t._minMaxIndexes.minIndex,i.max=t._minMaxIndexes.maxIndex),i},_findMinMax:function(n){for(var h=this,r=h._allOptions.valueField,c=n[0]||{},u=c[r]||0,f=u,e=u,o=0,s=0,l=n.length,i,t=1;t<l;t++)i=n[t][r],i<f&&(f=i,o=t),i>e&&(e=i,s=t);return{minIndex:o,maxIndex:s}},_updateRange:function(){var u=this,t=u._series,f=t.type==="bar",e=.15,o=.1,n=t.getRangeData(),i=(n.val.max-n.val.min)*e,r;f||t.type==="area"||t.type==="winloss"?(n.val.min!==0&&(n.val.min=n.val.min-i),n.val.max!==0&&(n.val.max=n.val.max+i)):(n.val.min=n.val.min-i,n.val.max=n.val.max+i),t.getPoints().length>1&&(f?(r=(n.arg.max-n.arg.min)*o,n.arg.min=n.arg.min-r,n.arg.max=n.arg.max+r):n.arg.stick=!0),u._ranges=n},_getBarWidth:function(n){var r=this,i=r._canvas,u=n*l,o=i.width-i.left-i.right-u,t=b(o/n);return t<f&&(t=f),t>e&&(t=e),t},_correctPoints:function(){var t=this,i=t._allOptions.type,r=t._series.getPoints(),u=r.length,f,n;if(i==="bar"||i==="winloss")for(f=t._getBarWidth(u),n=0;n<u;n++)r[n].correctCoordinates({width:f,offset:0})},_drawSeries:function(){var n=this;n._simpleDataSource.length!==0&&(n._correctPoints(),n._series.draw({x:n._translatorX,y:n._translatorY}),n._seriesGroup.append(n._renderer.root),n._prepareTooltipContainer())},_dataIsReady:function(){return u.utils.notExistOrLoaded(this._dataSource)},_isTooltipVisible:function(){return this.callBase()&&this._dataSource.length!==0},_getTooltipData:function(){var t=this,r=t._allOptions,n=t._winlossDataSource||t._simpleDataSource,i=t._tooltip;if(n.length===0)return{};var e=t._minMaxIndexes,u=r.valueField,o=n[0][u],s=n[n.length-1][u],h=n[e.minIndex][u],c=n[e.maxIndex][u],l=i.formatValue(o),a=i.formatValue(s),v=i.formatValue(h),y=i.formatValue(c),f={firstValue:l,lastValue:a,minValue:v,maxValue:y,originalFirstValue:o,originalLastValue:s,originalMinValue:h,originalMaxValue:c,valueText:["Start:",l,"End:",a,"Min:",v,"Max:",y]};return r.type==="winloss"&&(f.originalThresholdValue=r.winlossThreshold,f.thresholdValue=i.formatValue(r.winlossThreshold)),f}}).include(t.ui.DataHelperMixin))}(jQuery,DevExpress),function(n,t,i){var e=.02,o=.98,c=.1,l=.9,a=300,v=30,s=1,h=2,y={disabled:!1,theme:"default",size:{},margin:{}},r=Number,u=Math.round,f=isFinite;t.registerComponent("dxBullet",t.viz.sparklines,t.viz.sparklines.BaseSparkline.inherit({_widgetType:"bullet",_widgetClass:"dxb",_defaultSize:{width:a,height:v,left:s,right:s,top:h,bottom:h},_disposeWidgetElements:function(){delete this._zeroLevelPath,delete this._targetPath,delete this._barValuePath},_redrawWidgetElements:function(){this._updateTranslator(),this._drawBarValue(),this._drawTarget(),this._drawZeroLevel()},_cleanWidgetElements:function(){this._zeroLevelPath.remove(),this._targetPath.remove(),this._barValuePath.remove()},_drawWidgetElements:function(){this._drawBullet()},_createHtmlElements:function(){var n=this._renderer;this._zeroLevelPath=n.path(i,"line").attr({"class":"dxb-zero-level","stroke-linecap":"square"}),this._targetPath=n.path(i,"line").attr({"class":"dxb-target","stroke-linecap":"square"}),this._barValuePath=n.path(i,"line").attr({"class":"dxb-bar-value","stroke-linecap":"square"})},_prepareOptions:function(){var n=this,t,e,o,s,u,f;n._allOptions=t=n.callBase(y),n._allOptions.value===i&&(n._allOptions.value=0),n._allOptions.target===i&&(n._allOptions.target=0),t.value=u=r(t.value),t.target=f=r(t.target),n._allOptions.startScaleValue===i&&(n._allOptions.startScaleValue=f<u?f:u,n._allOptions.startScaleValue=n._allOptions.startScaleValue<0?n._allOptions.startScaleValue:0),n._allOptions.endScaleValue===i&&(n._allOptions.endScaleValue=f>u?f:u),t.startScaleValue=e=r(t.startScaleValue),t.endScaleValue=o=r(t.endScaleValue),o<e&&(s=o,n._allOptions.endScaleValue=e,n._allOptions.startScaleValue=s,n._allOptions.inverted=!0)},_updateRange:function(){var t=this,n=t._allOptions;t._ranges={arg:{invert:n.inverted,min:n.startScaleValue,max:n.endScaleValue,axisType:"continuous",dataType:"numeric"},val:{min:0,max:1,axisType:"continuous",dataType:"numeric"}}},_drawBullet:function(){var t=this,n=t._allOptions,i=n.startScaleValue!==n.endScaleValue,r=f(n.startScaleValue),u=f(n.endScaleValue),e=f(n.value),o=f(n.target);i&&u&&r&&o&&e&&(this._drawBarValue(),this._drawTarget(),this._drawZeroLevel(),this._prepareTooltipContainer())},_getTargetParams:function(){var n=this,t=n._allOptions,i=n._translatorY,r=n._translatorX.translate(t.target);return{points:[r,i.translate(e),r,i.translate(o)],stroke:t.targetColor,"stroke-width":t.targetWidth}},_getBarValueParams:function(){var e=this,r=e._allOptions,o=e._translatorX,s=e._translatorY,u=r.startScaleValue,f=r.endScaleValue,t=r.value,h=s.translate(c),a=s.translate(l),n,i;return t>0?(n=u<=0?0:u,i=t>=f?f:t<n?n:t):(n=f>=0?0:f,i=t<u?u:t>n?n:t),n=o.translate(n),i=o.translate(i),{points:[n,a,i,a,i,h,n,h],fill:r.color}},_getZeroLevelParams:function(){var n=this,t=n._translatorY,i=n._translatorX.translate(0);return{points:[i,t.translate(e),i,t.translate(o)],stroke:n._allOptions.targetColor,"stroke-width":1}},_drawZeroLevel:function(){var n=this,t=n._allOptions;0>t.endScaleValue||0<t.startScaleValue||!t.showZeroLevel||n._zeroLevelPath.attr(n._getZeroLevelParams()).sharp().append(n._renderer.root)},_drawTarget:function(){var n=this,t=n._allOptions,i=t.target;i>t.endScaleValue||i<t.startScaleValue||!t.showTarget||n._targetPath.attr(n._getTargetParams()).sharp().append(n._renderer.root)},_drawBarValue:function(){this._barValuePath.attr(this._getBarValueParams()).append(this._renderer.root)},_getTooltipData:function(){var i=this,r=i._tooltip,u=i._allOptions,n=u.value,t=u.target;return{originalValue:n,originalTarget:t,value:r.formatValue(n),target:r.formatValue(t),valueText:["Actual Value:",n,"Target Value:",t]}},_getNormalTooltipSize:function(){var n={},t=this._barValuePath.getBBox();return n.width=this._canvas.width,n.left=0,n.tooltipLeft=t.x+u(t.width/2),n},_getWideTooltipSize:function(n,t){var f=this,i=f._barValuePath.getBBox(),e=f._allOptions.tooltip.horizontalAlignment,r={};return r.width=n+t+f._canvas.width,r.left=-n,r.tooltipLeft=e==="right"?i.x+u(i.width/2):e==="left"?u(i.width/2)+n+t+i.x:u(i.width/2)+i.x+n,r}}))}(jQuery,DevExpress),DevExpress.MOD_VIZ_SPARKLINES=!0}
;
/* jquery.nicescroll 3.6.8 InuYaksa*2015 MIT http://nicescroll.areaaperta.com */
(function(f){"function"===typeof define&&define.amd?define(["jquery"],f):"object"===typeof exports?module.exports=f(require("jquery")):f(jQuery)})(function(f){var B=!1,F=!1,O=0,P=2E3,A=0,J=["webkit","ms","moz","o"],v=window.requestAnimationFrame||!1,w=window.cancelAnimationFrame||!1;if(!v)for(var Q in J){var G=J[Q];if(v=window[G+"RequestAnimationFrame"]){w=window[G+"CancelAnimationFrame"]||window[G+"CancelRequestAnimationFrame"];break}}var x=window.MutationObserver||window.WebKitMutationObserver||
!1,K={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:24,touchbehavior:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},
disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var f=document.getElementsByTagName("script"),f=f.length?f[f.length-
1].src.split("?")[0]:"";return 0<f.split("/").length?f.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1},H=!1,R=function(){if(H)return H;var f=document.createElement("DIV"),c=f.style,k=navigator.userAgent,l=navigator.platform,d={haspointerlock:"pointerLockElement"in document||"webkitPointerLockElement"in document||"mozPointerLockElement"in document};d.isopera="opera"in window;d.isopera12=d.isopera&&"getUserMedia"in navigator;d.isoperamini="[object OperaMini]"===
Object.prototype.toString.call(window.operamini);d.isie="all"in document&&"attachEvent"in f&&!d.isopera;d.isieold=d.isie&&!("msInterpolationMode"in c);d.isie7=d.isie&&!d.isieold&&(!("documentMode"in document)||7==document.documentMode);d.isie8=d.isie&&"documentMode"in document&&8==document.documentMode;d.isie9=d.isie&&"performance"in window&&9==document.documentMode;d.isie10=d.isie&&"performance"in window&&10==document.documentMode;d.isie11="msRequestFullscreen"in f&&11<=document.documentMode;d.isieedge12=
navigator.userAgent.match(/Edge\/12\./);d.isieedge="msOverflowStyle"in f;d.ismodernie=d.isie11||d.isieedge;d.isie9mobile=/iemobile.9/i.test(k);d.isie9mobile&&(d.isie9=!1);d.isie7mobile=!d.isie9mobile&&d.isie7&&/iemobile/i.test(k);d.ismozilla="MozAppearance"in c;d.iswebkit="WebkitAppearance"in c;d.ischrome="chrome"in window;d.ischrome38=d.ischrome&&"touchAction"in c;d.ischrome22=!d.ischrome38&&d.ischrome&&d.haspointerlock;d.ischrome26=!d.ischrome38&&d.ischrome&&"transition"in c;d.cantouch="ontouchstart"in
document.documentElement||"ontouchstart"in window;d.hasw3ctouch=(window.PointerEvent||!1)&&(0<navigator.MaxTouchPoints||0<navigator.msMaxTouchPoints);d.hasmstouch=!d.hasw3ctouch&&(window.MSPointerEvent||!1);d.ismac=/^mac$/i.test(l);d.isios=d.cantouch&&/iphone|ipad|ipod/i.test(l);d.isios4=d.isios&&!("seal"in Object);d.isios7=d.isios&&"webkitHidden"in document;d.isios8=d.isios&&"hidden"in document;d.isandroid=/android/i.test(k);d.haseventlistener="addEventListener"in f;d.trstyle=!1;d.hastransform=!1;
d.hastranslate3d=!1;d.transitionstyle=!1;d.hastransition=!1;d.transitionend=!1;l=["transform","msTransform","webkitTransform","MozTransform","OTransform"];for(k=0;k<l.length;k++)if(void 0!==c[l[k]]){d.trstyle=l[k];break}d.hastransform=!!d.trstyle;d.hastransform&&(c[d.trstyle]="translate3d(1px,2px,3px)",d.hastranslate3d=/translate3d/.test(c[d.trstyle]));d.transitionstyle=!1;d.prefixstyle="";d.transitionend=!1;for(var l="transition webkitTransition msTransition MozTransition OTransition OTransition KhtmlTransition".split(" "),
q=" -webkit- -ms- -moz- -o- -o -khtml-".split(" "),t="transitionend webkitTransitionEnd msTransitionEnd transitionend otransitionend oTransitionEnd KhtmlTransitionEnd".split(" "),k=0;k<l.length;k++)if(l[k]in c){d.transitionstyle=l[k];d.prefixstyle=q[k];d.transitionend=t[k];break}d.ischrome26&&(d.prefixstyle=q[1]);d.hastransition=d.transitionstyle;a:{k=["grab","-webkit-grab","-moz-grab"];if(d.ischrome&&!d.ischrome38||d.isie)k=[];for(l=0;l<k.length;l++)if(q=k[l],c.cursor=q,c.cursor==q){c=q;break a}c=
"url(//patriciaportfolio.googlecode.com/files/openhand.cur),n-resize"}d.cursorgrabvalue=c;d.hasmousecapture="setCapture"in f;d.hasMutationObserver=!1!==x;return H=d},S=function(h,c){function k(){var b=a.doc.css(e.trstyle);return b&&"matrix"==b.substr(0,6)?b.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1}function l(){var b=a.win;if("zIndex"in b)return b.zIndex();for(;0<b.length&&9!=b[0].nodeType;){var g=b.css("zIndex");if(!isNaN(g)&&0!=g)return parseInt(g);b=b.parent()}return!1}function d(b,
g,u){g=b.css(g);b=parseFloat(g);return isNaN(b)?(b=z[g]||0,u=3==b?u?a.win.outerHeight()-a.win.innerHeight():a.win.outerWidth()-a.win.innerWidth():1,a.isie8&&b&&(b+=1),u?b:0):b}function q(b,g,u,c){a._bind(b,g,function(a){a=a?a:window.event;var c={original:a,target:a.target||a.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==a.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){a.preventDefault?a.preventDefault():a.returnValue=!1;return!1},stopImmediatePropagation:function(){a.stopImmediatePropagation?
a.stopImmediatePropagation():a.cancelBubble=!0}};"mousewheel"==g?(a.wheelDeltaX&&(c.deltaX=-.025*a.wheelDeltaX),a.wheelDeltaY&&(c.deltaY=-.025*a.wheelDeltaY),c.deltaY||c.deltaX||(c.deltaY=-.025*a.wheelDelta)):c.deltaY=a.detail;return u.call(b,c)},c)}function t(b,g,c){var d,e;0==b.deltaMode?(d=-Math.floor(a.opt.mousescrollstep/54*b.deltaX),e=-Math.floor(a.opt.mousescrollstep/54*b.deltaY)):1==b.deltaMode&&(d=-Math.floor(b.deltaX*a.opt.mousescrollstep),e=-Math.floor(b.deltaY*a.opt.mousescrollstep));
g&&a.opt.oneaxismousemode&&0==d&&e&&(d=e,e=0,c&&(0>d?a.getScrollLeft()>=a.page.maxw:0>=a.getScrollLeft())&&(e=d,d=0));a.isrtlmode&&(d=-d);d&&(a.scrollmom&&a.scrollmom.stop(),a.lastdeltax+=d,a.debounced("mousewheelx",function(){var b=a.lastdeltax;a.lastdeltax=0;a.rail.drag||a.doScrollLeftBy(b)},15));if(e){if(a.opt.nativeparentscrolling&&c&&!a.ispage&&!a.zoomactive)if(0>e){if(a.getScrollTop()>=a.page.maxh)return!0}else if(0>=a.getScrollTop())return!0;a.scrollmom&&a.scrollmom.stop();a.lastdeltay+=e;
a.synched("mousewheely",function(){var b=a.lastdeltay;a.lastdeltay=0;a.rail.drag||a.doScrollBy(b)},15)}b.stopImmediatePropagation();return b.preventDefault()}var a=this;this.version="3.6.8";this.name="nicescroll";this.me=c;this.opt={doc:f("body"),win:!1};f.extend(this.opt,K);this.opt.snapbackspeed=80;if(h)for(var r in a.opt)void 0!==h[r]&&(a.opt[r]=h[r]);a.opt.disablemutationobserver&&(x=!1);this.iddoc=(this.doc=a.opt.doc)&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/^BODY|HTML/.test(a.opt.win?
a.opt.win[0].nodeName:this.doc[0].nodeName);this.haswrapper=!1!==a.opt.win;this.win=a.opt.win||(this.ispage?f(window):this.doc);this.docscroll=this.ispage&&!this.haswrapper?f(window):this.win;this.body=f("body");this.iframe=this.isfixed=this.viewport=!1;this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName;this.istextarea="TEXTAREA"==this.win[0].nodeName;this.forcescreen=!1;this.canshowonmouseevent="scroll"!=a.opt.autohidemode;this.page=this.view=this.onzoomout=this.onzoomin=
this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;if("auto"==this.opt.rtlmode){r=this.win[0]==window?this.body:this.win;var p=r.css("writing-mode")||r.css("-webkit-writing-mode")||r.css("-ms-writing-mode")||r.css("-moz-writing-mode");"horizontal-tb"==p||"lr-tb"==p||""==p?(this.isrtlmode=
"rtl"==r.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==p||"tb"==p||"tb-rl"==p||"rl-tb"==p,this.isvertical="vertical-rl"==p||"tb"==p||"tb-rl"==p)}else this.isrtlmode=!0===this.opt.rtlmode,this.isvertical=!1;this.observerbody=this.observerremover=this.observer=this.scrollmom=this.scrollrunning=!1;do this.id="ascrail"+P++;while(document.getElementById(this.id));this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=this.rail=
!1;this.visibility=!0;this.hidden=this.locked=this.railslocked=!1;this.cursoractive=!0;this.wheelprevented=!1;this.overflowx=a.opt.overflowx;this.overflowy=a.opt.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltay=this.lastdeltax=0;this.detected=R();var e=f.extend({},this.detected);this.ishwscroll=(this.canhwscroll=e.hastransform&&a.opt.hwacceleration)&&a.haswrapper;this.hasreversehr=this.isrtlmode?this.isvertical?
!(e.iswebkit||e.isie||e.isie11):!(e.iswebkit||e.isie&&!e.isie10&&!e.isie11):!1;this.istouchcapable=!1;e.cantouch||!e.hasw3ctouch&&!e.hasmstouch?!e.cantouch||e.isios||e.isandroid||!e.iswebkit&&!e.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0;a.opt.enablemouselockapi||(e.hasmousecapture=!1,e.haspointerlock=!1);this.debounced=function(b,g,c){a&&(a.delaylist[b]||(g.call(a),a.delaylist[b]={h:v(function(){a.delaylist[b].fn.call(a);a.delaylist[b]=!1},c)}),a.delaylist[b].fn=g)};var I=!1;this.synched=
function(b,g){a.synclist[b]=g;(function(){I||(v(function(){if(a){I=!1;for(var b in a.synclist){var g=a.synclist[b];g&&g.call(a);a.synclist[b]=!1}}}),I=!0)})();return b};this.unsynched=function(b){a.synclist[b]&&(a.synclist[b]=!1)};this.css=function(b,g){for(var c in g)a.saved.css.push([b,c,b.css(c)]),b.css(c,g[c])};this.scrollTop=function(b){return void 0===b?a.getScrollTop():a.setScrollTop(b)};this.scrollLeft=function(b){return void 0===b?a.getScrollLeft():a.setScrollLeft(b)};var D=function(a,g,
c,d,e,f,k){this.st=a;this.ed=g;this.spd=c;this.p1=d||0;this.p2=e||1;this.p3=f||0;this.p4=k||1;this.ts=(new Date).getTime();this.df=this.ed-this.st};D.prototype={B2:function(a){return 3*a*a*(1-a)},B3:function(a){return 3*a*(1-a)*(1-a)},B4:function(a){return(1-a)*(1-a)*(1-a)},getNow:function(){var a=1-((new Date).getTime()-this.ts)/this.spd,g=this.B2(a)+this.B3(a)+this.B4(a);return 0>a?this.ed:this.st+Math.round(this.df*g)},update:function(a,g){this.st=this.getNow();this.ed=a;this.spd=g;this.ts=(new Date).getTime();
this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};e.hastranslate3d&&e.isios&&this.doc.css("-webkit-backface-visibility","hidden");this.getScrollTop=function(b){if(!b){if(b=k())return 16==b.length?-b[13]:-b[5];if(a.timerscroll&&a.timerscroll.bz)return a.timerscroll.bz.getNow()}return a.doc.translate.y};this.getScrollLeft=function(b){if(!b){if(b=k())return 16==b.length?-b[12]:-b[4];if(a.timerscroll&&a.timerscroll.bh)return a.timerscroll.bh.getNow()}return a.doc.translate.x};
this.notifyScrollEvent=function(a){var g=document.createEvent("UIEvents");g.initUIEvent("scroll",!1,!0,window,1);g.niceevent=!0;a.dispatchEvent(g)};var y=this.isrtlmode?1:-1;e.hastranslate3d&&a.opt.enabletranslate3d?(this.setScrollTop=function(b,g){a.doc.translate.y=b;a.doc.translate.ty=-1*b+"px";a.doc.css(e.trstyle,"translate3d("+a.doc.translate.tx+","+a.doc.translate.ty+",0px)");g||a.notifyScrollEvent(a.win[0])},this.setScrollLeft=function(b,g){a.doc.translate.x=b;a.doc.translate.tx=b*y+"px";a.doc.css(e.trstyle,
"translate3d("+a.doc.translate.tx+","+a.doc.translate.ty+",0px)");g||a.notifyScrollEvent(a.win[0])}):(this.setScrollTop=function(b,g){a.doc.translate.y=b;a.doc.translate.ty=-1*b+"px";a.doc.css(e.trstyle,"translate("+a.doc.translate.tx+","+a.doc.translate.ty+")");g||a.notifyScrollEvent(a.win[0])},this.setScrollLeft=function(b,g){a.doc.translate.x=b;a.doc.translate.tx=b*y+"px";a.doc.css(e.trstyle,"translate("+a.doc.translate.tx+","+a.doc.translate.ty+")");g||a.notifyScrollEvent(a.win[0])})}else this.getScrollTop=
function(){return a.docscroll.scrollTop()},this.setScrollTop=function(b){return setTimeout(function(){a&&a.docscroll.scrollTop(b)},1)},this.getScrollLeft=function(){return a.hasreversehr?a.detected.ismozilla?a.page.maxw-Math.abs(a.docscroll.scrollLeft()):a.page.maxw-a.docscroll.scrollLeft():a.docscroll.scrollLeft()},this.setScrollLeft=function(b){return setTimeout(function(){if(a)return a.hasreversehr&&(b=a.detected.ismozilla?-(a.page.maxw-b):a.page.maxw-b),a.docscroll.scrollLeft(b)},1)};this.getTarget=
function(a){return a?a.target?a.target:a.srcElement?a.srcElement:!1:!1};this.hasParent=function(a,g){if(!a)return!1;for(var c=a.target||a.srcElement||a||!1;c&&c.id!=g;)c=c.parentNode||!1;return!1!==c};var z={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:window.pageYOffset||document.documentElement.scrollTop,left:window.pageXOffset||document.documentElement.scrollLeft}};this.getOffset=function(){if(a.isfixed){var b=a.win.offset(),g=a.getDocumentScrollOffset();b.top-=g.top;
b.left-=g.left;return b}b=a.win.offset();if(!a.viewport)return b;g=a.viewport.offset();return{top:b.top-g.top,left:b.left-g.left}};this.updateScrollBar=function(b){var g,c,e;if(a.ishwscroll)a.rail.css({height:a.win.innerHeight()-(a.opt.railpadding.top+a.opt.railpadding.bottom)}),a.railh&&a.railh.css({width:a.win.innerWidth()-(a.opt.railpadding.left+a.opt.railpadding.right)});else{var f=a.getOffset();g=f.top;c=f.left-(a.opt.railpadding.left+a.opt.railpadding.right);g+=d(a.win,"border-top-width",!0);
c+=a.rail.align?a.win.outerWidth()-d(a.win,"border-right-width")-a.rail.width:d(a.win,"border-left-width");if(e=a.opt.railoffset)e.top&&(g+=e.top),e.left&&(c+=e.left);a.railslocked||a.rail.css({top:g,left:c,height:(b?b.h:a.win.innerHeight())-(a.opt.railpadding.top+a.opt.railpadding.bottom)});a.zoom&&a.zoom.css({top:g+1,left:1==a.rail.align?c-20:c+a.rail.width+4});if(a.railh&&!a.railslocked){g=f.top;c=f.left;if(e=a.opt.railhoffset)e.top&&(g+=e.top),e.left&&(c+=e.left);b=a.railh.align?g+d(a.win,"border-top-width",
!0)+a.win.innerHeight()-a.railh.height:g+d(a.win,"border-top-width",!0);c+=d(a.win,"border-left-width");a.railh.css({top:b-(a.opt.railpadding.top+a.opt.railpadding.bottom),left:c,width:a.railh.width})}}};this.doRailClick=function(b,g,c){var d;a.railslocked||(a.cancelEvent(b),g?(g=c?a.doScrollLeft:a.doScrollTop,d=c?(b.pageX-a.railh.offset().left-a.cursorwidth/2)*a.scrollratio.x:(b.pageY-a.rail.offset().top-a.cursorheight/2)*a.scrollratio.y,g(d)):(g=c?a.doScrollLeftBy:a.doScrollBy,d=c?a.scroll.x:a.scroll.y,
b=c?b.pageX-a.railh.offset().left:b.pageY-a.rail.offset().top,c=c?a.view.w:a.view.h,g(d>=b?c:-c)))};a.hasanimationframe=v;a.hascancelanimationframe=w;a.hasanimationframe?a.hascancelanimationframe||(w=function(){a.cancelAnimationFrame=!0}):(v=function(a){return setTimeout(a,15-Math.floor(+new Date/1E3)%16)},w=clearTimeout);this.init=function(){a.saved.css=[];if(e.isie7mobile||e.isoperamini)return!0;e.hasmstouch&&a.css(a.ispage?f("html"):a.win,{_touchaction:"none"});var b=e.ismodernie||e.isie10?{"-ms-overflow-style":"none"}:
{"overflow-y":"hidden"};a.zindex="auto";a.zindex=a.ispage||"auto"!=a.opt.zindex?a.opt.zindex:l()||"auto";!a.ispage&&"auto"!=a.zindex&&a.zindex>A&&(A=a.zindex);a.isie&&0==a.zindex&&"auto"==a.opt.zindex&&(a.zindex="auto");if(!a.ispage||!e.cantouch&&!e.isieold&&!e.isie9mobile){var c=a.docscroll;a.ispage&&(c=a.haswrapper?a.win:a.doc);e.isie9mobile||a.css(c,b);a.ispage&&e.isie7&&("BODY"==a.doc[0].nodeName?a.css(f("html"),{"overflow-y":"hidden"}):"HTML"==a.doc[0].nodeName&&a.css(f("body"),b));!e.isios||
a.ispage||a.haswrapper||a.css(f("body"),{"-webkit-overflow-scrolling":"touch"});var d=f(document.createElement("div"));d.css({position:"relative",top:0,"float":"right",width:a.opt.cursorwidth,height:0,"background-color":a.opt.cursorcolor,border:a.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":a.opt.cursorborderradius,"-moz-border-radius":a.opt.cursorborderradius,"border-radius":a.opt.cursorborderradius});d.hborder=parseFloat(d.outerHeight()-d.innerHeight());d.addClass("nicescroll-cursors");
a.cursor=d;var m=f(document.createElement("div"));m.attr("id",a.id);m.addClass("nicescroll-rails nicescroll-rails-vr");var k,h,p=["left","right","top","bottom"],L;for(L in p)h=p[L],(k=a.opt.railpadding[h])?m.css("padding-"+h,k+"px"):a.opt.railpadding[h]=0;m.append(d);m.width=Math.max(parseFloat(a.opt.cursorwidth),d.outerWidth());m.css({width:m.width+"px",zIndex:a.zindex,background:a.opt.background,cursor:"default"});m.visibility=!0;m.scrollable=!0;m.align="left"==a.opt.railalign?0:1;a.rail=m;d=a.rail.drag=
!1;!a.opt.boxzoom||a.ispage||e.isieold||(d=document.createElement("div"),a.bind(d,"click",a.doZoom),a.bind(d,"mouseenter",function(){a.zoom.css("opacity",a.opt.cursoropacitymax)}),a.bind(d,"mouseleave",function(){a.zoom.css("opacity",a.opt.cursoropacitymin)}),a.zoom=f(d),a.zoom.css({cursor:"pointer",zIndex:a.zindex,backgroundImage:"url("+a.opt.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),a.opt.dblclickzoom&&a.bind(a.win,"dblclick",a.doZoom),e.cantouch&&a.opt.gesturezoom&&
(a.ongesturezoom=function(b){1.5<b.scale&&a.doZoomIn(b);.8>b.scale&&a.doZoomOut(b);return a.cancelEvent(b)},a.bind(a.win,"gestureend",a.ongesturezoom)));a.railh=!1;var n;a.opt.horizrailenabled&&(a.css(c,{overflowX:"hidden"}),d=f(document.createElement("div")),d.css({position:"absolute",top:0,height:a.opt.cursorwidth,width:0,backgroundColor:a.opt.cursorcolor,border:a.opt.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":a.opt.cursorborderradius,"-moz-border-radius":a.opt.cursorborderradius,
"border-radius":a.opt.cursorborderradius}),e.isieold&&d.css("overflow","hidden"),d.wborder=parseFloat(d.outerWidth()-d.innerWidth()),d.addClass("nicescroll-cursors"),a.cursorh=d,n=f(document.createElement("div")),n.attr("id",a.id+"-hr"),n.addClass("nicescroll-rails nicescroll-rails-hr"),n.height=Math.max(parseFloat(a.opt.cursorwidth),d.outerHeight()),n.css({height:n.height+"px",zIndex:a.zindex,background:a.opt.background}),n.append(d),n.visibility=!0,n.scrollable=!0,n.align="top"==a.opt.railvalign?
0:1,a.railh=n,a.railh.drag=!1);a.ispage?(m.css({position:"fixed",top:0,height:"100%"}),m.align?m.css({right:0}):m.css({left:0}),a.body.append(m),a.railh&&(n.css({position:"fixed",left:0,width:"100%"}),n.align?n.css({bottom:0}):n.css({top:0}),a.body.append(n))):(a.ishwscroll?("static"==a.win.css("position")&&a.css(a.win,{position:"relative"}),c="HTML"==a.win[0].nodeName?a.body:a.win,f(c).scrollTop(0).scrollLeft(0),a.zoom&&(a.zoom.css({position:"absolute",top:1,right:0,"margin-right":m.width+4}),c.append(a.zoom)),
m.css({position:"absolute",top:0}),m.align?m.css({right:0}):m.css({left:0}),c.append(m),n&&(n.css({position:"absolute",left:0,bottom:0}),n.align?n.css({bottom:0}):n.css({top:0}),c.append(n))):(a.isfixed="fixed"==a.win.css("position"),c=a.isfixed?"fixed":"absolute",a.isfixed||(a.viewport=a.getViewport(a.win[0])),a.viewport&&(a.body=a.viewport,0==/fixed|absolute/.test(a.viewport.css("position"))&&a.css(a.viewport,{position:"relative"})),m.css({position:c}),a.zoom&&a.zoom.css({position:c}),a.updateScrollBar(),
a.body.append(m),a.zoom&&a.body.append(a.zoom),a.railh&&(n.css({position:c}),a.body.append(n))),e.isios&&a.css(a.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),e.isie&&a.opt.disableoutline&&a.win.attr("hideFocus","true"),e.iswebkit&&a.opt.disableoutline&&a.win.css("outline","none"));!1===a.opt.autohidemode?(a.autohidedom=!1,a.rail.css({opacity:a.opt.cursoropacitymax}),a.railh&&a.railh.css({opacity:a.opt.cursoropacitymax})):!0===a.opt.autohidemode||"leave"===a.opt.autohidemode?
(a.autohidedom=f().add(a.rail),e.isie8&&(a.autohidedom=a.autohidedom.add(a.cursor)),a.railh&&(a.autohidedom=a.autohidedom.add(a.railh)),a.railh&&e.isie8&&(a.autohidedom=a.autohidedom.add(a.cursorh))):"scroll"==a.opt.autohidemode?(a.autohidedom=f().add(a.rail),a.railh&&(a.autohidedom=a.autohidedom.add(a.railh))):"cursor"==a.opt.autohidemode?(a.autohidedom=f().add(a.cursor),a.railh&&(a.autohidedom=a.autohidedom.add(a.cursorh))):"hidden"==a.opt.autohidemode&&(a.autohidedom=!1,a.hide(),a.railslocked=
!1);if(e.isie9mobile)a.scrollmom=new M(a),a.onmangotouch=function(){var b=a.getScrollTop(),c=a.getScrollLeft();if(b==a.scrollmom.lastscrolly&&c==a.scrollmom.lastscrollx)return!0;var g=b-a.mangotouch.sy,d=c-a.mangotouch.sx;if(0!=Math.round(Math.sqrt(Math.pow(d,2)+Math.pow(g,2)))){var e=0>g?-1:1,f=0>d?-1:1,u=+new Date;a.mangotouch.lazy&&clearTimeout(a.mangotouch.lazy);80<u-a.mangotouch.tm||a.mangotouch.dry!=e||a.mangotouch.drx!=f?(a.scrollmom.stop(),a.scrollmom.reset(c,b),a.mangotouch.sy=b,a.mangotouch.ly=
b,a.mangotouch.sx=c,a.mangotouch.lx=c,a.mangotouch.dry=e,a.mangotouch.drx=f,a.mangotouch.tm=u):(a.scrollmom.stop(),a.scrollmom.update(a.mangotouch.sx-d,a.mangotouch.sy-g),a.mangotouch.tm=u,g=Math.max(Math.abs(a.mangotouch.ly-b),Math.abs(a.mangotouch.lx-c)),a.mangotouch.ly=b,a.mangotouch.lx=c,2<g&&(a.mangotouch.lazy=setTimeout(function(){a.mangotouch.lazy=!1;a.mangotouch.dry=0;a.mangotouch.drx=0;a.mangotouch.tm=0;a.scrollmom.doMomentum(30)},100)))}},m=a.getScrollTop(),n=a.getScrollLeft(),a.mangotouch=
{sy:m,ly:m,dry:0,sx:n,lx:n,drx:0,lazy:!1,tm:0},a.bind(a.docscroll,"scroll",a.onmangotouch);else{if(e.cantouch||a.istouchcapable||a.opt.touchbehavior||e.hasmstouch){a.scrollmom=new M(a);a.ontouchstart=function(b){if(b.pointerType&&2!=b.pointerType&&"touch"!=b.pointerType)return!1;a.hasmoving=!1;if(!a.railslocked){var c;if(e.hasmstouch)for(c=b.target?b.target:!1;c;){var g=f(c).getNiceScroll();if(0<g.length&&g[0].me==a.me)break;if(0<g.length)return!1;if("DIV"==c.nodeName&&c.id==a.id)break;c=c.parentNode?
c.parentNode:!1}a.cancelScroll();if((c=a.getTarget(b))&&/INPUT/i.test(c.nodeName)&&/range/i.test(c.type))return a.stopPropagation(b);!("clientX"in b)&&"changedTouches"in b&&(b.clientX=b.changedTouches[0].clientX,b.clientY=b.changedTouches[0].clientY);a.forcescreen&&(g=b,b={original:b.original?b.original:b},b.clientX=g.screenX,b.clientY=g.screenY);a.rail.drag={x:b.clientX,y:b.clientY,sx:a.scroll.x,sy:a.scroll.y,st:a.getScrollTop(),sl:a.getScrollLeft(),pt:2,dl:!1};if(a.ispage||!a.opt.directionlockdeadzone)a.rail.drag.dl=
"f";else{var g=f(window).width(),d=f(window).height(),d=Math.max(0,Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)-d),g=Math.max(0,Math.max(document.body.scrollWidth,document.documentElement.scrollWidth)-g);a.rail.drag.ck=!a.rail.scrollable&&a.railh.scrollable?0<d?"v":!1:a.rail.scrollable&&!a.railh.scrollable?0<g?"h":!1:!1;a.rail.drag.ck||(a.rail.drag.dl="f")}a.opt.touchbehavior&&a.isiframe&&e.isie&&(g=a.win.position(),a.rail.drag.x+=g.left,a.rail.drag.y+=g.top);a.hasmoving=
!1;a.lastmouseup=!1;a.scrollmom.reset(b.clientX,b.clientY);if(!e.cantouch&&!this.istouchcapable&&!b.pointerType){if(!c||!/INPUT|SELECT|TEXTAREA/i.test(c.nodeName))return!a.ispage&&e.hasmousecapture&&c.setCapture(),a.opt.touchbehavior?(c.onclick&&!c._onclick&&(c._onclick=c.onclick,c.onclick=function(b){if(a.hasmoving)return!1;c._onclick.call(this,b)}),a.cancelEvent(b)):a.stopPropagation(b);/SUBMIT|CANCEL|BUTTON/i.test(f(c).attr("type"))&&(pc={tg:c,click:!1},a.preventclick=pc)}}};a.ontouchend=function(b){if(!a.rail.drag)return!0;
if(2==a.rail.drag.pt){if(b.pointerType&&2!=b.pointerType&&"touch"!=b.pointerType)return!1;a.scrollmom.doMomentum();a.rail.drag=!1;if(a.hasmoving&&(a.lastmouseup=!0,a.hideCursor(),e.hasmousecapture&&document.releaseCapture(),!e.cantouch))return a.cancelEvent(b)}else if(1==a.rail.drag.pt)return a.onmouseup(b)};var q=a.opt.touchbehavior&&a.isiframe&&!e.hasmousecapture;a.ontouchmove=function(b,c){if(!a.rail.drag||b.targetTouches&&a.opt.preventmultitouchscrolling&&1<b.targetTouches.length||b.pointerType&&
2!=b.pointerType&&"touch"!=b.pointerType)return!1;if(2==a.rail.drag.pt){if(e.cantouch&&e.isios&&void 0===b.original)return!0;a.hasmoving=!0;a.preventclick&&!a.preventclick.click&&(a.preventclick.click=a.preventclick.tg.onclick||!1,a.preventclick.tg.onclick=a.onpreventclick);b=f.extend({original:b},b);"changedTouches"in b&&(b.clientX=b.changedTouches[0].clientX,b.clientY=b.changedTouches[0].clientY);if(a.forcescreen){var g=b;b={original:b.original?b.original:b};b.clientX=g.screenX;b.clientY=g.screenY}var d,
g=d=0;q&&!c&&(d=a.win.position(),g=-d.left,d=-d.top);var u=b.clientY+d;d=u-a.rail.drag.y;var m=b.clientX+g,k=m-a.rail.drag.x,h=a.rail.drag.st-d;a.ishwscroll&&a.opt.bouncescroll?0>h?h=Math.round(h/2):h>a.page.maxh&&(h=a.page.maxh+Math.round((h-a.page.maxh)/2)):(0>h&&(u=h=0),h>a.page.maxh&&(h=a.page.maxh,u=0));var l;a.railh&&a.railh.scrollable&&(l=a.isrtlmode?k-a.rail.drag.sl:a.rail.drag.sl-k,a.ishwscroll&&a.opt.bouncescroll?0>l?l=Math.round(l/2):l>a.page.maxw&&(l=a.page.maxw+Math.round((l-a.page.maxw)/
2)):(0>l&&(m=l=0),l>a.page.maxw&&(l=a.page.maxw,m=0)));g=!1;if(a.rail.drag.dl)g=!0,"v"==a.rail.drag.dl?l=a.rail.drag.sl:"h"==a.rail.drag.dl&&(h=a.rail.drag.st);else{d=Math.abs(d);var k=Math.abs(k),C=a.opt.directionlockdeadzone;if("v"==a.rail.drag.ck){if(d>C&&k<=.3*d)return a.rail.drag=!1,!0;k>C&&(a.rail.drag.dl="f",f("body").scrollTop(f("body").scrollTop()))}else if("h"==a.rail.drag.ck){if(k>C&&d<=.3*k)return a.rail.drag=!1,!0;d>C&&(a.rail.drag.dl="f",f("body").scrollLeft(f("body").scrollLeft()))}}a.synched("touchmove",
function(){a.rail.drag&&2==a.rail.drag.pt&&(a.prepareTransition&&a.prepareTransition(0),a.rail.scrollable&&a.setScrollTop(h),a.scrollmom.update(m,u),a.railh&&a.railh.scrollable?(a.setScrollLeft(l),a.showCursor(h,l)):a.showCursor(h),e.isie10&&document.selection.clear())});e.ischrome&&a.istouchcapable&&(g=!1);if(g)return a.cancelEvent(b)}else if(1==a.rail.drag.pt)return a.onmousemove(b)}}a.onmousedown=function(b,c){if(!a.rail.drag||1==a.rail.drag.pt){if(a.railslocked)return a.cancelEvent(b);a.cancelScroll();
a.rail.drag={x:b.clientX,y:b.clientY,sx:a.scroll.x,sy:a.scroll.y,pt:1,hr:!!c};var g=a.getTarget(b);!a.ispage&&e.hasmousecapture&&g.setCapture();a.isiframe&&!e.hasmousecapture&&(a.saved.csspointerevents=a.doc.css("pointer-events"),a.css(a.doc,{"pointer-events":"none"}));a.hasmoving=!1;return a.cancelEvent(b)}};a.onmouseup=function(b){if(a.rail.drag){if(1!=a.rail.drag.pt)return!0;e.hasmousecapture&&document.releaseCapture();a.isiframe&&!e.hasmousecapture&&a.doc.css("pointer-events",a.saved.csspointerevents);
a.rail.drag=!1;a.hasmoving&&a.triggerScrollEnd();return a.cancelEvent(b)}};a.onmousemove=function(b){if(a.rail.drag){if(1==a.rail.drag.pt){if(e.ischrome&&0==b.which)return a.onmouseup(b);a.cursorfreezed=!0;a.hasmoving=!0;if(a.rail.drag.hr){a.scroll.x=a.rail.drag.sx+(b.clientX-a.rail.drag.x);0>a.scroll.x&&(a.scroll.x=0);var c=a.scrollvaluemaxw;a.scroll.x>c&&(a.scroll.x=c)}else a.scroll.y=a.rail.drag.sy+(b.clientY-a.rail.drag.y),0>a.scroll.y&&(a.scroll.y=0),c=a.scrollvaluemax,a.scroll.y>c&&(a.scroll.y=
c);a.synched("mousemove",function(){a.rail.drag&&1==a.rail.drag.pt&&(a.showCursor(),a.rail.drag.hr?a.hasreversehr?a.doScrollLeft(a.scrollvaluemaxw-Math.round(a.scroll.x*a.scrollratio.x),a.opt.cursordragspeed):a.doScrollLeft(Math.round(a.scroll.x*a.scrollratio.x),a.opt.cursordragspeed):a.doScrollTop(Math.round(a.scroll.y*a.scrollratio.y),a.opt.cursordragspeed))});return a.cancelEvent(b)}}else a.checkarea=0};if(e.cantouch||a.opt.touchbehavior)a.onpreventclick=function(b){if(a.preventclick)return a.preventclick.tg.onclick=
a.preventclick.click,a.preventclick=!1,a.cancelEvent(b)},a.bind(a.win,"mousedown",a.ontouchstart),a.onclick=e.isios?!1:function(b){return a.lastmouseup?(a.lastmouseup=!1,a.cancelEvent(b)):!0},a.opt.grabcursorenabled&&e.cursorgrabvalue&&(a.css(a.ispage?a.doc:a.win,{cursor:e.cursorgrabvalue}),a.css(a.rail,{cursor:e.cursorgrabvalue}));else{var r=function(b){if(a.selectiondrag){if(b){var c=a.win.outerHeight();b=b.pageY-a.selectiondrag.top;0<b&&b<c&&(b=0);b>=c&&(b-=c);a.selectiondrag.df=b}0!=a.selectiondrag.df&&
(a.doScrollBy(2*-Math.floor(a.selectiondrag.df/6)),a.debounced("doselectionscroll",function(){r()},50))}};a.hasTextSelected="getSelection"in document?function(){return 0<document.getSelection().rangeCount}:"selection"in document?function(){return"None"!=document.selection.type}:function(){return!1};a.onselectionstart=function(b){a.ispage||(a.selectiondrag=a.win.offset())};a.onselectionend=function(b){a.selectiondrag=!1};a.onselectiondrag=function(b){a.selectiondrag&&a.hasTextSelected()&&a.debounced("selectionscroll",
function(){r(b)},250)}}e.hasw3ctouch?(a.css(a.rail,{"touch-action":"none"}),a.css(a.cursor,{"touch-action":"none"}),a.bind(a.win,"pointerdown",a.ontouchstart),a.bind(document,"pointerup",a.ontouchend),a.bind(document,"pointermove",a.ontouchmove)):e.hasmstouch?(a.css(a.rail,{"-ms-touch-action":"none"}),a.css(a.cursor,{"-ms-touch-action":"none"}),a.bind(a.win,"MSPointerDown",a.ontouchstart),a.bind(document,"MSPointerUp",a.ontouchend),a.bind(document,"MSPointerMove",a.ontouchmove),a.bind(a.cursor,"MSGestureHold",
function(a){a.preventDefault()}),a.bind(a.cursor,"contextmenu",function(a){a.preventDefault()})):this.istouchcapable&&(a.bind(a.win,"touchstart",a.ontouchstart),a.bind(document,"touchend",a.ontouchend),a.bind(document,"touchcancel",a.ontouchend),a.bind(document,"touchmove",a.ontouchmove));if(a.opt.cursordragontouch||!e.cantouch&&!a.opt.touchbehavior)a.rail.css({cursor:"default"}),a.railh&&a.railh.css({cursor:"default"}),a.jqbind(a.rail,"mouseenter",function(){if(!a.ispage&&!a.win.is(":visible"))return!1;
a.canshowonmouseevent&&a.showCursor();a.rail.active=!0}),a.jqbind(a.rail,"mouseleave",function(){a.rail.active=!1;a.rail.drag||a.hideCursor()}),a.opt.sensitiverail&&(a.bind(a.rail,"click",function(b){a.doRailClick(b,!1,!1)}),a.bind(a.rail,"dblclick",function(b){a.doRailClick(b,!0,!1)}),a.bind(a.cursor,"click",function(b){a.cancelEvent(b)}),a.bind(a.cursor,"dblclick",function(b){a.cancelEvent(b)})),a.railh&&(a.jqbind(a.railh,"mouseenter",function(){if(!a.ispage&&!a.win.is(":visible"))return!1;a.canshowonmouseevent&&
a.showCursor();a.rail.active=!0}),a.jqbind(a.railh,"mouseleave",function(){a.rail.active=!1;a.rail.drag||a.hideCursor()}),a.opt.sensitiverail&&(a.bind(a.railh,"click",function(b){a.doRailClick(b,!1,!0)}),a.bind(a.railh,"dblclick",function(b){a.doRailClick(b,!0,!0)}),a.bind(a.cursorh,"click",function(b){a.cancelEvent(b)}),a.bind(a.cursorh,"dblclick",function(b){a.cancelEvent(b)})));e.cantouch||a.opt.touchbehavior?(a.bind(e.hasmousecapture?a.win:document,"mouseup",a.ontouchend),a.bind(document,"mousemove",
a.ontouchmove),a.onclick&&a.bind(document,"click",a.onclick),a.opt.cursordragontouch?(a.bind(a.cursor,"mousedown",a.onmousedown),a.bind(a.cursor,"mouseup",a.onmouseup),a.cursorh&&a.bind(a.cursorh,"mousedown",function(b){a.onmousedown(b,!0)}),a.cursorh&&a.bind(a.cursorh,"mouseup",a.onmouseup)):(a.bind(a.rail,"mousedown",function(a){a.preventDefault()}),a.railh&&a.bind(a.railh,"mousedown",function(a){a.preventDefault()}))):(a.bind(e.hasmousecapture?a.win:document,"mouseup",a.onmouseup),a.bind(document,
"mousemove",a.onmousemove),a.onclick&&a.bind(document,"click",a.onclick),a.bind(a.cursor,"mousedown",a.onmousedown),a.bind(a.cursor,"mouseup",a.onmouseup),a.railh&&(a.bind(a.cursorh,"mousedown",function(b){a.onmousedown(b,!0)}),a.bind(a.cursorh,"mouseup",a.onmouseup)),!a.ispage&&a.opt.enablescrollonselection&&(a.bind(a.win[0],"mousedown",a.onselectionstart),a.bind(document,"mouseup",a.onselectionend),a.bind(a.cursor,"mouseup",a.onselectionend),a.cursorh&&a.bind(a.cursorh,"mouseup",a.onselectionend),
a.bind(document,"mousemove",a.onselectiondrag)),a.zoom&&(a.jqbind(a.zoom,"mouseenter",function(){a.canshowonmouseevent&&a.showCursor();a.rail.active=!0}),a.jqbind(a.zoom,"mouseleave",function(){a.rail.active=!1;a.rail.drag||a.hideCursor()})));a.opt.enablemousewheel&&(a.isiframe||a.mousewheel(e.isie&&a.ispage?document:a.win,a.onmousewheel),a.mousewheel(a.rail,a.onmousewheel),a.railh&&a.mousewheel(a.railh,a.onmousewheelhr));a.ispage||e.cantouch||/HTML|^BODY/.test(a.win[0].nodeName)||(a.win.attr("tabindex")||
a.win.attr({tabindex:O++}),a.jqbind(a.win,"focus",function(b){B=a.getTarget(b).id||!0;a.hasfocus=!0;a.canshowonmouseevent&&a.noticeCursor()}),a.jqbind(a.win,"blur",function(b){B=!1;a.hasfocus=!1}),a.jqbind(a.win,"mouseenter",function(b){F=a.getTarget(b).id||!0;a.hasmousefocus=!0;a.canshowonmouseevent&&a.noticeCursor()}),a.jqbind(a.win,"mouseleave",function(){F=!1;a.hasmousefocus=!1;a.rail.drag||a.hideCursor()}))}a.onkeypress=function(b){if(a.railslocked&&0==a.page.maxh)return!0;b=b?b:window.e;var c=
a.getTarget(b);if(c&&/INPUT|TEXTAREA|SELECT|OPTION/.test(c.nodeName)&&(!c.getAttribute("type")&&!c.type||!/submit|button|cancel/i.tp)||f(c).attr("contenteditable"))return!0;if(a.hasfocus||a.hasmousefocus&&!B||a.ispage&&!B&&!F){c=b.keyCode;if(a.railslocked&&27!=c)return a.cancelEvent(b);var g=b.ctrlKey||!1,d=b.shiftKey||!1,e=!1;switch(c){case 38:case 63233:a.doScrollBy(72);e=!0;break;case 40:case 63235:a.doScrollBy(-72);e=!0;break;case 37:case 63232:a.railh&&(g?a.doScrollLeft(0):a.doScrollLeftBy(72),
e=!0);break;case 39:case 63234:a.railh&&(g?a.doScrollLeft(a.page.maxw):a.doScrollLeftBy(-72),e=!0);break;case 33:case 63276:a.doScrollBy(a.view.h);e=!0;break;case 34:case 63277:a.doScrollBy(-a.view.h);e=!0;break;case 36:case 63273:a.railh&&g?a.doScrollPos(0,0):a.doScrollTo(0);e=!0;break;case 35:case 63275:a.railh&&g?a.doScrollPos(a.page.maxw,a.page.maxh):a.doScrollTo(a.page.maxh);e=!0;break;case 32:a.opt.spacebarenabled&&(d?a.doScrollBy(a.view.h):a.doScrollBy(-a.view.h),e=!0);break;case 27:a.zoomactive&&
(a.doZoom(),e=!0)}if(e)return a.cancelEvent(b)}};a.opt.enablekeyboard&&a.bind(document,e.isopera&&!e.isopera12?"keypress":"keydown",a.onkeypress);a.bind(document,"keydown",function(b){b.ctrlKey&&(a.wheelprevented=!0)});a.bind(document,"keyup",function(b){b.ctrlKey||(a.wheelprevented=!1)});a.bind(window,"blur",function(b){a.wheelprevented=!1});a.bind(window,"resize",a.lazyResize);a.bind(window,"orientationchange",a.lazyResize);a.bind(window,"load",a.lazyResize);if(e.ischrome&&!a.ispage&&!a.haswrapper){var t=
a.win.attr("style"),m=parseFloat(a.win.css("width"))+1;a.win.css("width",m);a.synched("chromefix",function(){a.win.attr("style",t)})}a.onAttributeChange=function(b){a.lazyResize(a.isieold?250:30)};a.isie11||!1===x||(a.observerbody=new x(function(b){b.forEach(function(b){if("attributes"==b.type)return f("body").hasClass("modal-open")&&f("body").hasClass("modal-dialog")&&!f.contains(f(".modal-dialog")[0],a.doc[0])?a.hide():a.show()});if(document.body.scrollHeight!=a.page.maxh)return a.lazyResize(30)}),
a.observerbody.observe(document.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]}));a.ispage||a.haswrapper||(!1!==x?(a.observer=new x(function(b){b.forEach(a.onAttributeChange)}),a.observer.observe(a.win[0],{childList:!0,characterData:!1,attributes:!0,subtree:!1}),a.observerremover=new x(function(b){b.forEach(function(b){if(0<b.removedNodes.length)for(var c in b.removedNodes)if(a&&b.removedNodes[c]==a.win[0])return a.remove()})}),a.observerremover.observe(a.win[0].parentNode,
{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(a.bind(a.win,e.isie&&!e.isie9?"propertychange":"DOMAttrModified",a.onAttributeChange),e.isie9&&a.win[0].attachEvent("onpropertychange",a.onAttributeChange),a.bind(a.win,"DOMNodeRemoved",function(b){b.target==a.win[0]&&a.remove()})));!a.ispage&&a.opt.boxzoom&&a.bind(window,"resize",a.resizeZoom);a.istextarea&&(a.bind(a.win,"keydown",a.lazyResize),a.bind(a.win,"mouseup",a.lazyResize));a.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var N=
function(){a.iframexd=!1;var c;try{c="contentDocument"in this?this.contentDocument:this.contentWindow.document}catch(g){a.iframexd=!0,c=!1}if(a.iframexd)return"console"in window&&console.log("NiceScroll error: policy restriced iframe"),!0;a.forcescreen=!0;a.isiframe&&(a.iframe={doc:f(c),html:a.doc.contents().find("html")[0],body:a.doc.contents().find("body")[0]},a.getContentSize=function(){return{w:Math.max(a.iframe.html.scrollWidth,a.iframe.body.scrollWidth),h:Math.max(a.iframe.html.scrollHeight,
a.iframe.body.scrollHeight)}},a.docscroll=f(a.iframe.body));if(!e.isios&&a.opt.iframeautoresize&&!a.isiframe){a.win.scrollTop(0);a.doc.height("");var d=Math.max(c.getElementsByTagName("html")[0].scrollHeight,c.body.scrollHeight);a.doc.height(d)}a.lazyResize(30);e.isie7&&a.css(f(a.iframe.html),b);a.css(f(a.iframe.body),b);e.isios&&a.haswrapper&&a.css(f(c.body),{"-webkit-transform":"translate3d(0,0,0)"});"contentWindow"in this?a.bind(this.contentWindow,"scroll",a.onscroll):a.bind(c,"scroll",a.onscroll);
a.opt.enablemousewheel&&a.mousewheel(c,a.onmousewheel);a.opt.enablekeyboard&&a.bind(c,e.isopera?"keypress":"keydown",a.onkeypress);if(e.cantouch||a.opt.touchbehavior)a.bind(c,"mousedown",a.ontouchstart),a.bind(c,"mousemove",function(b){return a.ontouchmove(b,!0)}),a.opt.grabcursorenabled&&e.cursorgrabvalue&&a.css(f(c.body),{cursor:e.cursorgrabvalue});a.bind(c,"mouseup",a.ontouchend);a.zoom&&(a.opt.dblclickzoom&&a.bind(c,"dblclick",a.doZoom),a.ongesturezoom&&a.bind(c,"gestureend",a.ongesturezoom))};
this.doc[0].readyState&&"complete"==this.doc[0].readyState&&setTimeout(function(){N.call(a.doc[0],!1)},500);a.bind(this.doc,"load",N)}};this.showCursor=function(b,c){a.cursortimeout&&(clearTimeout(a.cursortimeout),a.cursortimeout=0);if(a.rail){a.autohidedom&&(a.autohidedom.stop().css({opacity:a.opt.cursoropacitymax}),a.cursoractive=!0);a.rail.drag&&1==a.rail.drag.pt||(void 0!==b&&!1!==b&&(a.scroll.y=Math.round(1*b/a.scrollratio.y)),void 0!==c&&(a.scroll.x=Math.round(1*c/a.scrollratio.x)));a.cursor.css({height:a.cursorheight,
top:a.scroll.y});if(a.cursorh){var d=a.hasreversehr?a.scrollvaluemaxw-a.scroll.x:a.scroll.x;!a.rail.align&&a.rail.visibility?a.cursorh.css({width:a.cursorwidth,left:d+a.rail.width}):a.cursorh.css({width:a.cursorwidth,left:d});a.cursoractive=!0}a.zoom&&a.zoom.stop().css({opacity:a.opt.cursoropacitymax})}};this.hideCursor=function(b){a.cursortimeout||!a.rail||!a.autohidedom||a.hasmousefocus&&"leave"==a.opt.autohidemode||(a.cursortimeout=setTimeout(function(){a.rail.active&&a.showonmouseevent||(a.autohidedom.stop().animate({opacity:a.opt.cursoropacitymin}),
a.zoom&&a.zoom.stop().animate({opacity:a.opt.cursoropacitymin}),a.cursoractive=!1);a.cursortimeout=0},b||a.opt.hidecursordelay))};this.noticeCursor=function(b,c,d){a.showCursor(c,d);a.rail.active||a.hideCursor(b)};this.getContentSize=a.ispage?function(){return{w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}}:a.haswrapper?function(){return{w:a.doc.outerWidth()+parseInt(a.win.css("paddingLeft"))+
parseInt(a.win.css("paddingRight")),h:a.doc.outerHeight()+parseInt(a.win.css("paddingTop"))+parseInt(a.win.css("paddingBottom"))}}:function(){return{w:a.docscroll[0].scrollWidth,h:a.docscroll[0].scrollHeight}};this.onResize=function(b,c){if(!a||!a.win)return!1;if(!a.haswrapper&&!a.ispage){if("none"==a.win.css("display"))return a.visibility&&a.hideRail().hideRailHr(),!1;a.hidden||a.visibility||a.showRail().showRailHr()}var d=a.page.maxh,e=a.page.maxw,f=a.view.h,k=a.view.w;a.view={w:a.ispage?a.win.width():
parseInt(a.win[0].clientWidth),h:a.ispage?a.win.height():parseInt(a.win[0].clientHeight)};a.page=c?c:a.getContentSize();a.page.maxh=Math.max(0,a.page.h-a.view.h);a.page.maxw=Math.max(0,a.page.w-a.view.w);if(a.page.maxh==d&&a.page.maxw==e&&a.view.w==k&&a.view.h==f){if(a.ispage)return a;d=a.win.offset();if(a.lastposition&&(e=a.lastposition,e.top==d.top&&e.left==d.left))return a;a.lastposition=d}0==a.page.maxh?(a.hideRail(),a.scrollvaluemax=0,a.scroll.y=0,a.scrollratio.y=0,a.cursorheight=0,a.setScrollTop(0),
a.rail&&(a.rail.scrollable=!1)):(a.page.maxh-=a.opt.railpadding.top+a.opt.railpadding.bottom,a.rail.scrollable=!0);0==a.page.maxw?(a.hideRailHr(),a.scrollvaluemaxw=0,a.scroll.x=0,a.scrollratio.x=0,a.cursorwidth=0,a.setScrollLeft(0),a.railh&&(a.railh.scrollable=!1)):(a.page.maxw-=a.opt.railpadding.left+a.opt.railpadding.right,a.railh&&(a.railh.scrollable=a.opt.horizrailenabled));a.railslocked=a.locked||0==a.page.maxh&&0==a.page.maxw;if(a.railslocked)return a.ispage||a.updateScrollBar(a.view),!1;a.hidden||
a.visibility?!a.railh||a.hidden||a.railh.visibility||a.showRailHr():a.showRail().showRailHr();a.istextarea&&a.win.css("resize")&&"none"!=a.win.css("resize")&&(a.view.h-=20);a.cursorheight=Math.min(a.view.h,Math.round(a.view.h/a.page.h*a.view.h));a.cursorheight=a.opt.cursorfixedheight?a.opt.cursorfixedheight:Math.max(a.opt.cursorminheight,a.cursorheight);a.cursorwidth=Math.min(a.view.w,Math.round(a.view.w/a.page.w*a.view.w));a.cursorwidth=a.opt.cursorfixedheight?a.opt.cursorfixedheight:Math.max(a.opt.cursorminheight,
a.cursorwidth);a.scrollvaluemax=a.view.h-a.cursorheight-a.cursor.hborder-(a.opt.railpadding.top+a.opt.railpadding.bottom);a.railh&&(a.railh.width=0<a.page.maxh?a.view.w-a.rail.width:a.view.w,a.scrollvaluemaxw=a.railh.width-a.cursorwidth-a.cursorh.wborder-(a.opt.railpadding.left+a.opt.railpadding.right));a.ispage||a.updateScrollBar(a.view);a.scrollratio={x:a.page.maxw/a.scrollvaluemaxw,y:a.page.maxh/a.scrollvaluemax};a.getScrollTop()>a.page.maxh?a.doScrollTop(a.page.maxh):(a.scroll.y=Math.round(a.getScrollTop()*
(1/a.scrollratio.y)),a.scroll.x=Math.round(a.getScrollLeft()*(1/a.scrollratio.x)),a.cursoractive&&a.noticeCursor());a.scroll.y&&0==a.getScrollTop()&&a.doScrollTo(Math.floor(a.scroll.y*a.scrollratio.y));return a};this.resize=a.onResize;this.hlazyresize=0;this.lazyResize=function(b){a.haswrapper||a.hide();a.hlazyresize&&clearTimeout(a.hlazyresize);a.hlazyresize=setTimeout(function(){a&&a.show().resize()},240);return a};this.jqbind=function(b,c,d){a.events.push({e:b,n:c,f:d,q:!0});f(b).bind(c,d)};this.mousewheel=
function(b,c,d){b="jquery"in b?b[0]:b;if("onwheel"in document.createElement("div"))a._bind(b,"wheel",c,d||!1);else{var e=void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";q(b,e,c,d||!1);"DOMMouseScroll"==e&&q(b,"MozMousePixelScroll",c,d||!1)}};e.haseventlistener?(this.bind=function(b,c,d,e){a._bind("jquery"in b?b[0]:b,c,d,e||!1)},this._bind=function(b,c,d,e){a.events.push({e:b,n:c,f:d,b:e,q:!1});b.addEventListener(c,d,e||!1)},this.cancelEvent=function(a){if(!a)return!1;a=a.original?a.original:
a;a.cancelable&&a.preventDefault();a.stopPropagation();a.preventManipulation&&a.preventManipulation();return!1},this.stopPropagation=function(a){if(!a)return!1;a=a.original?a.original:a;a.stopPropagation();return!1},this._unbind=function(a,c,d,e){a.removeEventListener(c,d,e)}):(this.bind=function(b,c,d,e){var f="jquery"in b?b[0]:b;a._bind(f,c,function(b){(b=b||window.event||!1)&&b.srcElement&&(b.target=b.srcElement);"pageY"in b||(b.pageX=b.clientX+document.documentElement.scrollLeft,b.pageY=b.clientY+
document.documentElement.scrollTop);return!1===d.call(f,b)||!1===e?a.cancelEvent(b):!0})},this._bind=function(b,c,d,e){a.events.push({e:b,n:c,f:d,b:e,q:!1});b.attachEvent?b.attachEvent("on"+c,d):b["on"+c]=d},this.cancelEvent=function(a){a=window.event||!1;if(!a)return!1;a.cancelBubble=!0;a.cancel=!0;return a.returnValue=!1},this.stopPropagation=function(a){a=window.event||!1;if(!a)return!1;a.cancelBubble=!0;return!1},this._unbind=function(a,c,d,e){a.detachEvent?a.detachEvent("on"+c,d):a["on"+c]=!1});
this.unbindAll=function(){for(var b=0;b<a.events.length;b++){var c=a.events[b];c.q?c.e.unbind(c.n,c.f):a._unbind(c.e,c.n,c.f,c.b)}};this.showRail=function(){0==a.page.maxh||!a.ispage&&"none"==a.win.css("display")||(a.visibility=!0,a.rail.visibility=!0,a.rail.css("display","block"));return a};this.showRailHr=function(){if(!a.railh)return a;0==a.page.maxw||!a.ispage&&"none"==a.win.css("display")||(a.railh.visibility=!0,a.railh.css("display","block"));return a};this.hideRail=function(){a.visibility=
!1;a.rail.visibility=!1;a.rail.css("display","none");return a};this.hideRailHr=function(){if(!a.railh)return a;a.railh.visibility=!1;a.railh.css("display","none");return a};this.show=function(){a.hidden=!1;a.railslocked=!1;return a.showRail().showRailHr()};this.hide=function(){a.hidden=!0;a.railslocked=!0;return a.hideRail().hideRailHr()};this.toggle=function(){return a.hidden?a.show():a.hide()};this.remove=function(){a.stop();a.cursortimeout&&clearTimeout(a.cursortimeout);for(var b in a.delaylist)a.delaylist[b]&&
w(a.delaylist[b].h);a.doZoomOut();a.unbindAll();e.isie9&&a.win[0].detachEvent("onpropertychange",a.onAttributeChange);!1!==a.observer&&a.observer.disconnect();!1!==a.observerremover&&a.observerremover.disconnect();!1!==a.observerbody&&a.observerbody.disconnect();a.events=null;a.cursor&&a.cursor.remove();a.cursorh&&a.cursorh.remove();a.rail&&a.rail.remove();a.railh&&a.railh.remove();a.zoom&&a.zoom.remove();for(b=0;b<a.saved.css.length;b++){var c=a.saved.css[b];c[0].css(c[1],void 0===c[2]?"":c[2])}a.saved=
!1;a.me.data("__nicescroll","");var d=f.nicescroll;d.each(function(b){if(this&&this.id===a.id){delete d[b];for(var c=++b;c<d.length;c++,b++)d[b]=d[c];d.length--;d.length&&delete d[d.length]}});for(var k in a)a[k]=null,delete a[k];a=null};this.scrollstart=function(b){this.onscrollstart=b;return a};this.scrollend=function(b){this.onscrollend=b;return a};this.scrollcancel=function(b){this.onscrollcancel=b;return a};this.zoomin=function(b){this.onzoomin=b;return a};this.zoomout=function(b){this.onzoomout=
b;return a};this.isScrollable=function(a){a=a.target?a.target:a;if("OPTION"==a.nodeName)return!0;for(;a&&1==a.nodeType&&!/^BODY|HTML/.test(a.nodeName);){var c=f(a),c=c.css("overflowY")||c.css("overflowX")||c.css("overflow")||"";if(/scroll|auto/.test(c))return a.clientHeight!=a.scrollHeight;a=a.parentNode?a.parentNode:!1}return!1};this.getViewport=function(a){for(a=a&&a.parentNode?a.parentNode:!1;a&&1==a.nodeType&&!/^BODY|HTML/.test(a.nodeName);){var c=f(a);if(/fixed|absolute/.test(c.css("position")))return c;
var d=c.css("overflowY")||c.css("overflowX")||c.css("overflow")||"";if(/scroll|auto/.test(d)&&a.clientHeight!=a.scrollHeight||0<c.getNiceScroll().length)return c;a=a.parentNode?a.parentNode:!1}return!1};this.triggerScrollEnd=function(){if(a.onscrollend){var b=a.getScrollLeft(),c=a.getScrollTop();a.onscrollend.call(a,{type:"scrollend",current:{x:b,y:c},end:{x:b,y:c}})}};this.onmousewheel=function(b){if(!a.wheelprevented){if(a.railslocked)return a.debounced("checkunlock",a.resize,250),!0;if(a.rail.drag)return a.cancelEvent(b);
"auto"==a.opt.oneaxismousemode&&0!=b.deltaX&&(a.opt.oneaxismousemode=!1);if(a.opt.oneaxismousemode&&0==b.deltaX&&!a.rail.scrollable)return a.railh&&a.railh.scrollable?a.onmousewheelhr(b):!0;var c=+new Date,d=!1;a.opt.preservenativescrolling&&a.checkarea+600<c&&(a.nativescrollingarea=a.isScrollable(b),d=!0);a.checkarea=c;if(a.nativescrollingarea)return!0;if(b=t(b,!1,d))a.checkarea=0;return b}};this.onmousewheelhr=function(b){if(!a.wheelprevented){if(a.railslocked||!a.railh.scrollable)return!0;if(a.rail.drag)return a.cancelEvent(b);
var c=+new Date,d=!1;a.opt.preservenativescrolling&&a.checkarea+600<c&&(a.nativescrollingarea=a.isScrollable(b),d=!0);a.checkarea=c;return a.nativescrollingarea?!0:a.railslocked?a.cancelEvent(b):t(b,!0,d)}};this.stop=function(){a.cancelScroll();a.scrollmon&&a.scrollmon.stop();a.cursorfreezed=!1;a.scroll.y=Math.round(a.getScrollTop()*(1/a.scrollratio.y));a.noticeCursor();return a};this.getTransitionSpeed=function(b){b=Math.min(Math.round(10*a.opt.scrollspeed),Math.round(b/20*a.opt.scrollspeed));return 20<
b?b:0};a.opt.smoothscroll?a.ishwscroll&&e.hastransition&&a.opt.usetransition&&a.opt.smoothscroll?(this.prepareTransition=function(b,c){var d=c?20<b?b:0:a.getTransitionSpeed(b),f=d?e.prefixstyle+"transform "+d+"ms ease-out":"";a.lasttransitionstyle&&a.lasttransitionstyle==f||(a.lasttransitionstyle=f,a.doc.css(e.transitionstyle,f));return d},this.doScrollLeft=function(b,c){var d=a.scrollrunning?a.newscrolly:a.getScrollTop();a.doScrollPos(b,d,c)},this.doScrollTop=function(b,c){var d=a.scrollrunning?
a.newscrollx:a.getScrollLeft();a.doScrollPos(d,b,c)},this.doScrollPos=function(b,c,d){var f=a.getScrollTop(),k=a.getScrollLeft();(0>(a.newscrolly-f)*(c-f)||0>(a.newscrollx-k)*(b-k))&&a.cancelScroll();0==a.opt.bouncescroll&&(0>c?c=0:c>a.page.maxh&&(c=a.page.maxh),0>b?b=0:b>a.page.maxw&&(b=a.page.maxw));if(a.scrollrunning&&b==a.newscrollx&&c==a.newscrolly)return!1;a.newscrolly=c;a.newscrollx=b;a.newscrollspeed=d||!1;if(a.timer)return!1;a.timer=setTimeout(function(){var d=a.getScrollTop(),f=a.getScrollLeft(),
k=Math.round(Math.sqrt(Math.pow(b-f,2)+Math.pow(c-d,2))),k=a.newscrollspeed&&1<a.newscrollspeed?a.newscrollspeed:a.getTransitionSpeed(k);a.newscrollspeed&&1>=a.newscrollspeed&&(k*=a.newscrollspeed);a.prepareTransition(k,!0);a.timerscroll&&a.timerscroll.tm&&clearInterval(a.timerscroll.tm);0<k&&(!a.scrollrunning&&a.onscrollstart&&a.onscrollstart.call(a,{type:"scrollstart",current:{x:f,y:d},request:{x:b,y:c},end:{x:a.newscrollx,y:a.newscrolly},speed:k}),e.transitionend?a.scrollendtrapped||(a.scrollendtrapped=
!0,a.bind(a.doc,e.transitionend,a.onScrollTransitionEnd,!1)):(a.scrollendtrapped&&clearTimeout(a.scrollendtrapped),a.scrollendtrapped=setTimeout(a.onScrollTransitionEnd,k)),a.timerscroll={bz:new D(d,a.newscrolly,k,0,0,.58,1),bh:new D(f,a.newscrollx,k,0,0,.58,1)},a.cursorfreezed||(a.timerscroll.tm=setInterval(function(){a.showCursor(a.getScrollTop(),a.getScrollLeft())},60)));a.synched("doScroll-set",function(){a.timer=0;a.scrollendtrapped&&(a.scrollrunning=!0);a.setScrollTop(a.newscrolly);a.setScrollLeft(a.newscrollx);
if(!a.scrollendtrapped)a.onScrollTransitionEnd()})},50)},this.cancelScroll=function(){if(!a.scrollendtrapped)return!0;var b=a.getScrollTop(),c=a.getScrollLeft();a.scrollrunning=!1;e.transitionend||clearTimeout(e.transitionend);a.scrollendtrapped=!1;a._unbind(a.doc[0],e.transitionend,a.onScrollTransitionEnd);a.prepareTransition(0);a.setScrollTop(b);a.railh&&a.setScrollLeft(c);a.timerscroll&&a.timerscroll.tm&&clearInterval(a.timerscroll.tm);a.timerscroll=!1;a.cursorfreezed=!1;a.showCursor(b,c);return a},
this.onScrollTransitionEnd=function(){a.scrollendtrapped&&a._unbind(a.doc[0],e.transitionend,a.onScrollTransitionEnd);a.scrollendtrapped=!1;a.prepareTransition(0);a.timerscroll&&a.timerscroll.tm&&clearInterval(a.timerscroll.tm);a.timerscroll=!1;var b=a.getScrollTop(),c=a.getScrollLeft();a.setScrollTop(b);a.railh&&a.setScrollLeft(c);a.noticeCursor(!1,b,c);a.cursorfreezed=!1;0>b?b=0:b>a.page.maxh&&(b=a.page.maxh);0>c?c=0:c>a.page.maxw&&(c=a.page.maxw);if(b!=a.newscrolly||c!=a.newscrollx)return a.doScrollPos(c,
b,a.opt.snapbackspeed);a.onscrollend&&a.scrollrunning&&a.triggerScrollEnd();a.scrollrunning=!1}):(this.doScrollLeft=function(b,c){var d=a.scrollrunning?a.newscrolly:a.getScrollTop();a.doScrollPos(b,d,c)},this.doScrollTop=function(b,c){var d=a.scrollrunning?a.newscrollx:a.getScrollLeft();a.doScrollPos(d,b,c)},this.doScrollPos=function(b,c,d){function e(){if(a.cancelAnimationFrame)return!0;a.scrollrunning=!0;if(p=1-p)return a.timer=v(e)||1;var b=0,c,d,f=d=a.getScrollTop();if(a.dst.ay){f=a.bzscroll?
a.dst.py+a.bzscroll.getNow()*a.dst.ay:a.newscrolly;c=f-d;if(0>c&&f<a.newscrolly||0<c&&f>a.newscrolly)f=a.newscrolly;a.setScrollTop(f);f==a.newscrolly&&(b=1)}else b=1;d=c=a.getScrollLeft();if(a.dst.ax){d=a.bzscroll?a.dst.px+a.bzscroll.getNow()*a.dst.ax:a.newscrollx;c=d-c;if(0>c&&d<a.newscrollx||0<c&&d>a.newscrollx)d=a.newscrollx;a.setScrollLeft(d);d==a.newscrollx&&(b+=1)}else b+=1;2==b?(a.timer=0,a.cursorfreezed=!1,a.bzscroll=!1,a.scrollrunning=!1,0>f?f=0:f>a.page.maxh&&(f=Math.max(0,a.page.maxh)),
0>d?d=0:d>a.page.maxw&&(d=a.page.maxw),d!=a.newscrollx||f!=a.newscrolly?a.doScrollPos(d,f):a.onscrollend&&a.triggerScrollEnd()):a.timer=v(e)||1}c=void 0===c||!1===c?a.getScrollTop(!0):c;if(a.timer&&a.newscrolly==c&&a.newscrollx==b)return!0;a.timer&&w(a.timer);a.timer=0;var f=a.getScrollTop(),k=a.getScrollLeft();(0>(a.newscrolly-f)*(c-f)||0>(a.newscrollx-k)*(b-k))&&a.cancelScroll();a.newscrolly=c;a.newscrollx=b;a.bouncescroll&&a.rail.visibility||(0>a.newscrolly?a.newscrolly=0:a.newscrolly>a.page.maxh&&
(a.newscrolly=a.page.maxh));a.bouncescroll&&a.railh.visibility||(0>a.newscrollx?a.newscrollx=0:a.newscrollx>a.page.maxw&&(a.newscrollx=a.page.maxw));a.dst={};a.dst.x=b-k;a.dst.y=c-f;a.dst.px=k;a.dst.py=f;var h=Math.round(Math.sqrt(Math.pow(a.dst.x,2)+Math.pow(a.dst.y,2)));a.dst.ax=a.dst.x/h;a.dst.ay=a.dst.y/h;var l=0,n=h;0==a.dst.x?(l=f,n=c,a.dst.ay=1,a.dst.py=0):0==a.dst.y&&(l=k,n=b,a.dst.ax=1,a.dst.px=0);h=a.getTransitionSpeed(h);d&&1>=d&&(h*=d);a.bzscroll=0<h?a.bzscroll?a.bzscroll.update(n,h):
new D(l,n,h,0,1,0,1):!1;if(!a.timer){(f==a.page.maxh&&c>=a.page.maxh||k==a.page.maxw&&b>=a.page.maxw)&&a.checkContentSize();var p=1;a.cancelAnimationFrame=!1;a.timer=1;a.onscrollstart&&!a.scrollrunning&&a.onscrollstart.call(a,{type:"scrollstart",current:{x:k,y:f},request:{x:b,y:c},end:{x:a.newscrollx,y:a.newscrolly},speed:h});e();(f==a.page.maxh&&c>=f||k==a.page.maxw&&b>=k)&&a.checkContentSize();a.noticeCursor()}},this.cancelScroll=function(){a.timer&&w(a.timer);a.timer=0;a.bzscroll=!1;a.scrollrunning=
!1;return a}):(this.doScrollLeft=function(b,c){var d=a.getScrollTop();a.doScrollPos(b,d,c)},this.doScrollTop=function(b,c){var d=a.getScrollLeft();a.doScrollPos(d,b,c)},this.doScrollPos=function(b,c,d){var e=b>a.page.maxw?a.page.maxw:b;0>e&&(e=0);var f=c>a.page.maxh?a.page.maxh:c;0>f&&(f=0);a.synched("scroll",function(){a.setScrollTop(f);a.setScrollLeft(e)})},this.cancelScroll=function(){});this.doScrollBy=function(b,c){var d=0,d=c?Math.floor((a.scroll.y-b)*a.scrollratio.y):(a.timer?a.newscrolly:
a.getScrollTop(!0))-b;if(a.bouncescroll){var e=Math.round(a.view.h/2);d<-e?d=-e:d>a.page.maxh+e&&(d=a.page.maxh+e)}a.cursorfreezed=!1;e=a.getScrollTop(!0);if(0>d&&0>=e)return a.noticeCursor();if(d>a.page.maxh&&e>=a.page.maxh)return a.checkContentSize(),a.noticeCursor();a.doScrollTop(d)};this.doScrollLeftBy=function(b,c){var d=0,d=c?Math.floor((a.scroll.x-b)*a.scrollratio.x):(a.timer?a.newscrollx:a.getScrollLeft(!0))-b;if(a.bouncescroll){var e=Math.round(a.view.w/2);d<-e?d=-e:d>a.page.maxw+e&&(d=a.page.maxw+
e)}a.cursorfreezed=!1;e=a.getScrollLeft(!0);if(0>d&&0>=e||d>a.page.maxw&&e>=a.page.maxw)return a.noticeCursor();a.doScrollLeft(d)};this.doScrollTo=function(b,c){a.cursorfreezed=!1;a.doScrollTop(b)};this.checkContentSize=function(){var b=a.getContentSize();b.h==a.page.h&&b.w==a.page.w||a.resize(!1,b)};a.onscroll=function(b){a.rail.drag||a.cursorfreezed||a.synched("scroll",function(){a.scroll.y=Math.round(a.getScrollTop()*(1/a.scrollratio.y));a.railh&&(a.scroll.x=Math.round(a.getScrollLeft()*(1/a.scrollratio.x)));
a.noticeCursor()})};a.bind(a.docscroll,"scroll",a.onscroll);this.doZoomIn=function(b){if(!a.zoomactive){a.zoomactive=!0;a.zoomrestore={style:{}};var c="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),d=a.win[0].style,k;for(k in c){var h=c[k];a.zoomrestore.style[h]=void 0!==d[h]?d[h]:""}a.zoomrestore.style.width=a.win.css("width");a.zoomrestore.style.height=a.win.css("height");a.zoomrestore.padding={w:a.win.outerWidth()-a.win.width(),h:a.win.outerHeight()-
a.win.height()};e.isios4&&(a.zoomrestore.scrollTop=f(window).scrollTop(),f(window).scrollTop(0));a.win.css({position:e.isios4?"absolute":"fixed",top:0,left:0,zIndex:A+100,margin:0});c=a.win.css("backgroundColor");(""==c||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(c))&&a.win.css("backgroundColor","#fff");a.rail.css({zIndex:A+101});a.zoom.css({zIndex:A+102});a.zoom.css("backgroundPosition","0px -18px");a.resizeZoom();a.onzoomin&&a.onzoomin.call(a);return a.cancelEvent(b)}};this.doZoomOut=
function(b){if(a.zoomactive)return a.zoomactive=!1,a.win.css("margin",""),a.win.css(a.zoomrestore.style),e.isios4&&f(window).scrollTop(a.zoomrestore.scrollTop),a.rail.css({"z-index":a.zindex}),a.zoom.css({"z-index":a.zindex}),a.zoomrestore=!1,a.zoom.css("backgroundPosition","0px 0px"),a.onResize(),a.onzoomout&&a.onzoomout.call(a),a.cancelEvent(b)};this.doZoom=function(b){return a.zoomactive?a.doZoomOut(b):a.doZoomIn(b)};this.resizeZoom=function(){if(a.zoomactive){var b=a.getScrollTop();a.win.css({width:f(window).width()-
a.zoomrestore.padding.w+"px",height:f(window).height()-a.zoomrestore.padding.h+"px"});a.onResize();a.setScrollTop(Math.min(a.page.maxh,b))}};this.init();f.nicescroll.push(this)},M=function(f){var c=this;this.nc=f;this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx=!1;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.time=function(){return+new Date};this.reset=function(f,h){c.stop();var d=c.time();c.steptime=
0;c.lasttime=d;c.speedx=0;c.speedy=0;c.lastx=f;c.lasty=h;c.lastscrollx=-1;c.lastscrolly=-1};this.update=function(f,h){var d=c.time();c.steptime=d-c.lasttime;c.lasttime=d;var d=h-c.lasty,q=f-c.lastx,t=c.nc.getScrollTop(),a=c.nc.getScrollLeft(),t=t+d,a=a+q;c.snapx=0>a||a>c.nc.page.maxw;c.snapy=0>t||t>c.nc.page.maxh;c.speedx=q;c.speedy=d;c.lastx=f;c.lasty=h};this.stop=function(){c.nc.unsynched("domomentum2d");c.timer&&clearTimeout(c.timer);c.timer=0;c.lastscrollx=-1;c.lastscrolly=-1};this.doSnapy=function(f,
h){var d=!1;0>h?(h=0,d=!0):h>c.nc.page.maxh&&(h=c.nc.page.maxh,d=!0);0>f?(f=0,d=!0):f>c.nc.page.maxw&&(f=c.nc.page.maxw,d=!0);d?c.nc.doScrollPos(f,h,c.nc.opt.snapbackspeed):c.nc.triggerScrollEnd()};this.doMomentum=function(f){var h=c.time(),d=f?h+f:c.lasttime;f=c.nc.getScrollLeft();var q=c.nc.getScrollTop(),t=c.nc.page.maxh,a=c.nc.page.maxw;c.speedx=0<a?Math.min(60,c.speedx):0;c.speedy=0<t?Math.min(60,c.speedy):0;d=d&&60>=h-d;if(0>q||q>t||0>f||f>a)d=!1;f=c.speedx&&d?c.speedx:!1;if(c.speedy&&d&&c.speedy||
f){var r=Math.max(16,c.steptime);50<r&&(f=r/50,c.speedx*=f,c.speedy*=f,r=50);c.demulxy=0;c.lastscrollx=c.nc.getScrollLeft();c.chkx=c.lastscrollx;c.lastscrolly=c.nc.getScrollTop();c.chky=c.lastscrolly;var p=c.lastscrollx,e=c.lastscrolly,v=function(){var d=600<c.time()-h?.04:.02;c.speedx&&(p=Math.floor(c.lastscrollx-c.speedx*(1-c.demulxy)),c.lastscrollx=p,0>p||p>a)&&(d=.1);c.speedy&&(e=Math.floor(c.lastscrolly-c.speedy*(1-c.demulxy)),c.lastscrolly=e,0>e||e>t)&&(d=.1);c.demulxy=Math.min(1,c.demulxy+
d);c.nc.synched("domomentum2d",function(){c.speedx&&(c.nc.getScrollLeft(),c.chkx=p,c.nc.setScrollLeft(p));c.speedy&&(c.nc.getScrollTop(),c.chky=e,c.nc.setScrollTop(e));c.timer||(c.nc.hideCursor(),c.doSnapy(p,e))});1>c.demulxy?c.timer=setTimeout(v,r):(c.stop(),c.nc.hideCursor(),c.doSnapy(p,e))};v()}else c.doSnapy(c.nc.getScrollLeft(),c.nc.getScrollTop())}},y=f.fn.scrollTop;f.cssHooks.pageYOffset={get:function(h,c,k){return(c=f.data(h,"__nicescroll")||!1)&&c.ishwscroll?c.getScrollTop():y.call(h)},set:function(h,
c){var k=f.data(h,"__nicescroll")||!1;k&&k.ishwscroll?k.setScrollTop(parseInt(c)):y.call(h,c);return this}};f.fn.scrollTop=function(h){if(void 0===h){var c=this[0]?f.data(this[0],"__nicescroll")||!1:!1;return c&&c.ishwscroll?c.getScrollTop():y.call(this)}return this.each(function(){var c=f.data(this,"__nicescroll")||!1;c&&c.ishwscroll?c.setScrollTop(parseInt(h)):y.call(f(this),h)})};var z=f.fn.scrollLeft;f.cssHooks.pageXOffset={get:function(h,c,k){return(c=f.data(h,"__nicescroll")||!1)&&c.ishwscroll?
c.getScrollLeft():z.call(h)},set:function(h,c){var k=f.data(h,"__nicescroll")||!1;k&&k.ishwscroll?k.setScrollLeft(parseInt(c)):z.call(h,c);return this}};f.fn.scrollLeft=function(h){if(void 0===h){var c=this[0]?f.data(this[0],"__nicescroll")||!1:!1;return c&&c.ishwscroll?c.getScrollLeft():z.call(this)}return this.each(function(){var c=f.data(this,"__nicescroll")||!1;c&&c.ishwscroll?c.setScrollLeft(parseInt(h)):z.call(f(this),h)})};var E=function(h){var c=this;this.length=0;this.name="nicescrollarray";
this.each=function(d){f.each(c,d);return c};this.push=function(d){c[c.length]=d;c.length++};this.eq=function(d){return c[d]};if(h)for(var k=0;k<h.length;k++){var l=f.data(h[k],"__nicescroll")||!1;l&&(this[this.length]=l,this.length++)}return this};(function(f,c,k){for(var l=0;l<c.length;l++)k(f,c[l])})(E.prototype,"show hide toggle onResize resize remove stop doScrollPos".split(" "),function(f,c){f[c]=function(){var f=arguments;return this.each(function(){this[c].apply(this,f)})}});f.fn.getNiceScroll=
function(h){return void 0===h?new E(this):this[h]&&f.data(this[h],"__nicescroll")||!1};f.expr[":"].nicescroll=function(h){return void 0!==f.data(h,"__nicescroll")};f.fn.niceScroll=function(h,c){void 0!==c||"object"!=typeof h||"jquery"in h||(c=h,h=!1);c=f.extend({},c);var k=new E;void 0===c&&(c={});h&&(c.doc=f(h),c.win=f(this));var l=!("doc"in c);l||"win"in c||(c.win=f(this));this.each(function(){var d=f(this).data("__nicescroll")||!1;d||(c.doc=l?f(this):c.doc,d=new S(c,f(this)),f(this).data("__nicescroll",
d));k.push(d)});return 1==k.length?k[0]:k};window.NiceScroll={getjQuery:function(){return f}};f.nicescroll||(f.nicescroll=new E,f.nicescroll.options=K)});
(function() {


}).call(this);
(function() {


}).call(this);
(function() {


}).call(this);
(function() {


}).call(this);
(function() {


}).call(this);
(function() {


}).call(this);
(function() {


}).call(this);
(function() {


}).call(this);
(function() {


}).call(this);
function user_perf_open_map_window(loginid){
	console.log(loginid)
	get_to_page_with_parametr('map','loginid='+loginid)
}
;
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//












	var color_lg='#ecf0f1';
	var color_gray='#95a5a6';
	var color_db='#34495e';
	var color_blue='#2980b9';
	var color_red='#c0392b';
	var color_green='#27ae60';
	var color_yellow='#f39c12';
	var color_dr='#96281B';
	var color_white='#fff';
	
	Date.prototype.date_format = function(){
		date=this
		return date.getDate()+'-'+(date.getMonth()+1)+'-'+date.getFullYear()+' '+date.getHours()+':'+date.getMinutes()+':'+date.getSeconds()
	}
	Number.prototype.add_zero = function(){
		if (this < 10){
			return "0"+this
		}else{
			return this
		}
	}
	function compare_elements(real,norm){
		if (real != norm){
			image='<div style="left:-17px;width:12px;height:12px;float:left;;position:relative;top:4px;border-radius:6px;background:'+(real < norm ? 'transparent' : color_red)+'" ></div>'
		}else{
			image=''
		}
		result=	image+
					'<div style="height:20px;line-height:20px;position:absolute">'+
						second_to_hour_converter(real)+
					'</div>'
		return result
	}
	function build_image_kpi(status,KPI){
		if (kpi_calc_color(status,KPI) == "normal"){color="green_text"}else if(kpi_calc_color(status,KPI) == "warning"){color="yellow_text"}else{color="red_text"}
		result='<img style="position:relative;left:0px;float:left;height:20px;width:20px" src="/images/&#39;+kpi_calc_color(status,KPI)+&#39;" alt="&#39;+kpi calc color(status,kpi)+&#39;" />'+
			'<div class="'+color+'" style="font-size:12px;height:20px;line-height:20px;float:left;position:relative;left:10px">'+(status*100).toFixed(0)+'%</div>'
		return result
	} 
	

	
	function kpi_calc_color(value,kpi){
		if (Math.floor(value*100) <= 100){
			return "normal"
		}else if(Math.floor(value*100) > 100 && Math.floor(value*100) <= kpi*100){
			return "warning"
		}else{
			return "error"
		}
	}
	
	function build_status_view(data){
		result = '<div class="text_m" style="width:120px;height:30px">'+
			'<div class="status_green_block">'+data.green+'</div>'+
			'<div class="status_yellow_block">'+data.yellow+'</div>'+
			'<div class="status_red_block">'+data.red+'</div>'+
		'</div>'
		return result
	}
	
	Date.prototype.getWeekNumber = function(){
			var d = new Date(+this);
			d.setHours(0,0,0);
			d.setDate(d.getDate()+4-(d.getDay()||7));
			return Math.ceil((((d-new Date(d.getFullYear(),0,1))/8.64e7)+1)/7);
	};
	
	
	function oper_system_source(data){
		return '<div style="width:36px;heigth:20px;background:'+data.color+';color:white;font-size:14px;line-height:20px;text-align:center"><b>'+data.short_name+'</b></div>'
	}
;
