require-jquery.js revision 2d7019e19039fd083850f76e54b6b26a7b06a8f2
/** vim: et:ts=4:sw=4:sts=4
* @license RequireJS 1.0.7 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
/*jslint strict: false, plusplus: false, sub: true */
/*global window, navigator, document, importScripts, jQuery, setTimeout, opera */
(function () {
//Change this version number for each release.
var version = "1.0.7",
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
currDirRegExp = /^\.\//,
jsSuffixRegExp = /\.js$/,
ostring = Object.prototype.toString,
ap = Array.prototype,
aps = ap.slice,
apsp = ap.splice,
//PS3 indicates loaded and complete, but need to wait for complete
//to feature test w/o causing perf issues.
readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ?
/^complete$/ : /^(complete|loaded)$/,
defContextName = "_",
//Oh the tragedy, detecting opera. See the usage of isOpera for reason.
empty = {},
contexts = {},
globalDefQueue = [],
interactiveScript = null,
checkLoadedDepth = 0,
useInteractive = false,
reservedDependencies = {
require: true,
module: true,
exports: true
},
req, cfg = {}, currentlyAddingScript, s, head, baseElement, scripts, script,
src, subPath, mainScript, dataMain, globalI, ctx, jQueryCheck, checkLoadedTimeoutId;
function isFunction(it) {
}
function isArray(it) {
}
/**
* Simple function to mix in properties from source into target,
* but only if target does not already have a property of the same name.
* This is not robust in IE for transferring methods that match
* Object.prototype names, but the uses of mixin here seem unlikely to
* trigger a problem related to that.
*/
function mixin(target, source, force) {
for (var prop in source) {
if (!(prop in empty) && (!(prop in target) || force)) {
target[prop] = source[prop];
}
}
return req;
}
/**
* Constructs an error with a pointer to an URL with more information.
* @param {String} id the error ID that maps to an ID on a web page.
* @param {String} message human readable error.
* @param {Error} [err] the original error, if there is one.
*
* @returns {Error}
*/
function makeError(id, msg, err) {
var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
if (err) {
e.originalError = err;
}
return e;
}
/**
* Used to set up package paths from a packagePaths or packages config object.
* @param {Object} pkgs the object to store the new package config
* @param {Array} currentPackages an array of packages to configure
* @param {String} [dir] a prefix dir to use.
*/
function configurePackageDir(pkgs, currentPackages, dir) {
var i, location, pkgObj;
for (i = 0; (pkgObj = currentPackages[i]); i++) {
location = pkgObj.location;
//Add dir to the path, but avoid paths that start with a slash
//or have a colon (indicates a protocol)
if (dir && (!location || (location.indexOf("/") !== 0 && location.indexOf(":") === -1))) {
location = dir + "/" + (location || pkgObj.name);
}
//Create a brand new object on pkgs, since currentPackages can
//be passed in again, and config.pkgs is the internal transformed
//state for all package configs.
pkgs[pkgObj.name] = {
name: pkgObj.name,
location: location || pkgObj.name,
//Remove leading dot in main, so main paths are normalized,
//and remove any trailing .js, since different package
//envs have different conventions: some use a module name,
//some use a file name.
.replace(currDirRegExp, '')
.replace(jsSuffixRegExp, '')
};
}
}
/**
* ready callbacks, but jQuery 1.6 supports a holdReady() API instead.
* with using holdReady.
*/
function jQueryHoldReady($, shouldHold) {
if ($.holdReady) {
$.holdReady(shouldHold);
} else if (shouldHold) {
$.readyWait += 1;
} else {
$.ready(true);
}
}
//If a define is already in play via another AMD loader,
//do not overwrite.
return;
}
if (isFunction(requirejs)) {
//Do not overwrite and existing requirejs instance.
return;
} else {
cfg = requirejs;
requirejs = undefined;
}
}
//Allow for a require config object
//assume it is a config object.
cfg = require;
require = undefined;
}
/**
* Creates a new context for use in require and define calls.
* Handle most of the heavy lifting. Do not want to use an object
* with prototype here to avoid using "this" in require, in case it
* needs to be used in more super secure envs that do not want this.
* Also there should not be that many contexts in the page. Usually just
* one for the default context, but could be extra for multiversion cases
* or if a package needs a special context for a dependency that conflicts
* with the standard context.
*/
function newContext(contextName) {
var context, resume,
config = {
waitSeconds: 7,
baseUrl: "./",
paths: {},
pkgs: {},
catchError: {}
},
defQueue = [],
specified = {
},
urlMap = {},
defined = {},
loaded = {},
waiting = {},
waitAry = [],
urlFetched = {},
managerCounter = 0,
managerCallbacks = {},
plugins = {},
//Used to indicate which modules in a build scenario
//need to be full executed.
needFullExec = {},
fullExec = {},
resumeDepth = 0;
/**
* Trims the . and .. from an array of path segments.
* It will keep a leading path segment if a .. will become
* the first path segment, to help with module name lookups,
* which act like paths, but can be remapped. But the end result,
* all paths that use this function should look normalized.
* NOTE: this method MODIFIES the input array.
* @param {Array} ary the array of path segments.
*/
function trimDots(ary) {
var i, part;
for (i = 0; (part = ary[i]); i++) {
if (part === ".") {
ary.splice(i, 1);
i -= 1;
} else if (part === "..") {
if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
//End of the line. Keep at least one non-dot
//path segment at the front so it can be mapped
//correctly to disk. Otherwise, there is likely
//no path mapping for a path starting with '..'.
//This can still fail, but catches the most reasonable
//uses of ..
break;
} else if (i > 0) {
ary.splice(i - 1, 2);
i -= 2;
}
}
}
}
/**
* Given a relative module name, like ./something, normalize it to
* a real name that can be mapped to a path.
* @param {String} name the relative name
* @param {String} baseName a real name that the name arg is relative
* to.
* @returns {String} normalized name
*/
function normalize(name, baseName) {
var pkgName, pkgConfig;
//Adjust any relative paths.
if (name && name.charAt(0) === ".") {
//If have a base name, try to normalize against it,
//otherwise, assume it is a top-level require that will
//be relative to baseUrl in the end.
if (baseName) {
if (config.pkgs[baseName]) {
//If the baseName is a package name, then just treat it as one
//name to concat the name with.
baseName = [baseName];
} else {
//Convert baseName to array, and lop off the last part,
//this normalization.
baseName = baseName.split("/");
baseName = baseName.slice(0, baseName.length - 1);
}
name = baseName.concat(name.split("/"));
trimDots(name);
//Some use of packages may use a . path to reference the
pkgConfig = config.pkgs[(pkgName = name[0])];
name = name.join("/");
if (pkgConfig && name === pkgName + '/' + pkgConfig.main) {
name = pkgName;
}
} else if (name.indexOf("./") === 0) {
// No baseName, so this is ID is resolved relative
// to baseUrl, pull off the leading dot.
name = name.substring(2);
}
}
return name;
}
/**
* Creates a module mapping that includes plugin prefix, module
* name, and path. If parentModuleMap is provided it will
* also normalize the name via require.normalize()
*
* @param {String} name the module name
* @param {String} [parentModuleMap] parent module map
* for the module name, used to resolve relative names.
*
* @returns {Object}
*/
function makeModuleMap(name, parentModuleMap) {
var index = name ? name.indexOf("!") : -1,
prefix = null,
parentName = parentModuleMap ? parentModuleMap.name : null,
originalName = name,
normalizedName, url, pluginModule;
if (index !== -1) {
prefix = name.substring(0, index);
name = name.substring(index + 1, name.length);
}
if (prefix) {
prefix = normalize(prefix, parentName);
}
//Account for relative paths if there is a base name.
if (name) {
if (prefix) {
pluginModule = defined[prefix];
if (pluginModule && pluginModule.normalize) {
//Plugin is loaded, use its normalize method.
normalizedName = pluginModule.normalize(name, function (name) {
return normalize(name, parentName);
});
} else {
normalizedName = normalize(name, parentName);
}
} else {
//A regular module.
normalizedName = normalize(name, parentName);
url = urlMap[normalizedName];
if (!url) {
//Calculate url for the module, if it has a name.
//Use name here since nameToUrl also calls normalize,
//and for relative names that are outside the baseUrl
//this causes havoc. Was thinking of just removing
//parentModuleMap to avoid extra normalization, but
//normalize() still does a dot removal because of
//issue #142, so just pass in name here and redo
//the normalization. Paths outside baseUrl are just
//messy to support.
url = context.nameToUrl(name, null, parentModuleMap);
//Store the URL mapping for later.
urlMap[normalizedName] = url;
}
}
}
return {
prefix: prefix,
name: normalizedName,
parentMap: parentModuleMap,
url: url,
originalName: originalName,
fullName: prefix ? prefix + "!" + (normalizedName || '') : normalizedName
};
}
/**
* Determine if priority loading is done. If so clear the priorityWait
*/
function isPriorityDone() {
var priorityDone = true,
priorityWait = config.priorityWait,
priorityName, i;
if (priorityWait) {
for (i = 0; (priorityName = priorityWait[i]); i++) {
if (!loaded[priorityName]) {
priorityDone = false;
break;
}
}
if (priorityDone) {
delete config.priorityWait;
}
}
return priorityDone;
}
function makeContextModuleFunc(func, relModuleMap, enableBuildCallback) {
return function () {
//A version of a require function that passes a moduleName
//value for items that may need to
//look up paths relative to the moduleName
var args = aps.call(arguments, 0), lastArg;
if (enableBuildCallback &&
isFunction((lastArg = args[args.length - 1]))) {
lastArg.__requireJsBuild = true;
}
args.push(relModuleMap);
return func.apply(null, args);
};
}
/**
* Helper function that creates a require function object to give to
* modules that ask for it as a dependency. It needs to be specific
* per module because of the implication of path mappings that may
* need to be relative to the module name.
*/
function makeRequire(relModuleMap, enableBuildCallback, altRequire) {
var modRequire = makeContextModuleFunc(altRequire || context.require, relModuleMap, enableBuildCallback);
mixin(modRequire, {
nameToUrl: makeContextModuleFunc(context.nameToUrl, relModuleMap),
toUrl: makeContextModuleFunc(context.toUrl, relModuleMap),
defined: makeContextModuleFunc(context.requireDefined, relModuleMap),
specified: makeContextModuleFunc(context.requireSpecified, relModuleMap),
isBrowser: req.isBrowser
});
return modRequire;
}
/*
* Queues a dependency for checking after the loader is out of a
* in the browser, where it may have many modules defined in it.
*/
function queueDependency(manager) {
context.paused.push(manager);
}
function execManager(manager) {
var i, ret, err, errFile, errModuleTree,
cb = manager.callback,
map = manager.map,
fullName = map.fullName,
args = manager.deps,
listeners = manager.listeners,
cjsModule;
//Call the callback to define the module, if necessary.
if (cb && isFunction(cb)) {
if (config.catchError.define) {
try {
ret = req.execCb(fullName, manager.callback, args, defined[fullName]);
} catch (e) {
err = e;
}
} else {
ret = req.execCb(fullName, manager.callback, args, defined[fullName]);
}
if (fullName) {
//favor that over return value and exports. After that,
//favor a non-undefined return value over exports use.
cjsModule = manager.cjsModule;
if (cjsModule &&
cjsModule.exports !== undefined &&
//Make sure it is not already the exports value
cjsModule.exports !== defined[fullName]) {
ret = defined[fullName] = manager.cjsModule.exports;
} else if (ret === undefined && manager.usingExports) {
//exports already set the defined value.
ret = defined[fullName];
} else {
//Use the return value from the function.
defined[fullName] = ret;
//If this module needed full execution in a build
//environment, mark that now.
if (needFullExec[fullName]) {
fullExec[fullName] = true;
}
}
}
} else if (fullName) {
//May just be an object definition for the module. Only
//worry about defining if have a module name.
ret = defined[fullName] = cb;
//If this module needed full execution in a build
//environment, mark that now.
if (needFullExec[fullName]) {
fullExec[fullName] = true;
}
}
//Clean up waiting. Do this before error calls, and before
//calling back listeners, so that bookkeeping is correct
//in the event of an error and error is reported in correct order,
//since the listeners will likely have errors if the
//onError function does not throw.
if (waiting[manager.id]) {
delete waiting[manager.id];
manager.isDone = true;
context.waitCount -= 1;
if (context.waitCount === 0) {
//Clear the wait array used for cycles.
waitAry = [];
}
}
//Do not need to track manager callback now that it is defined.
delete managerCallbacks[fullName];
//Allow instrumentation like the optimizer to know the order
//of modules executed and their dependencies.
if (req.onResourceLoad && !manager.placeholder) {
req.onResourceLoad(context, map, manager.depArray);
}
if (err) {
errFile = (fullName ? makeModuleMap(fullName).url : '') ||
err.fileName || err.sourceURL;
errModuleTree = err.moduleTree;
err = makeError('defineerror', 'Error evaluating ' +
'module "' + fullName + '" at location "' +
errFile + '":\n' +
err + '\nfileName:' + errFile +
'\nlineNumber: ' + (err.lineNumber || err.line), err);
err.moduleName = fullName;
err.moduleTree = errModuleTree;
return req.onError(err);
}
//Let listeners know of this manager's value.
for (i = 0; (cb = listeners[i]); i++) {
cb(ret);
}
return undefined;
}
/**
* Helper that creates a callack function that is called when a dependency
* is ready, and sets the i-th dependency for the manager as the
* value passed to the callback generated by this function.
*/
function makeArgCallback(manager, i) {
return function (value) {
//Only do the work if it has not been done
//already for a dependency. Cycle breaking
//logic in forceExec could mean this function
//is called more than once for a given dependency.
if (!manager.depDone[i]) {
manager.depDone[i] = true;
manager.deps[i] = value;
manager.depCount -= 1;
if (!manager.depCount) {
//All done, execute!
execManager(manager);
}
}
};
}
function callPlugin(pluginName, depManager) {
var map = depManager.map,
fullName = map.fullName,
name = map.name,
plugin = plugins[pluginName] ||
(plugins[pluginName] = defined[pluginName]),
load;
//No need to continue if the manager is already
//in the process of loading.
if (depManager.loading) {
return;
}
depManager.loading = true;
load = function (ret) {
depManager.callback = function () {
return ret;
};
execManager(depManager);
loaded[depManager.id] = true;
//The loading of this plugin
//might have placed other things
//in the paused queue. In particular,
//a loader plugin that depends on
//a different plugin loaded resource.
resume();
};
//Allow plugins to load other code without having to know the
load.fromText = function (moduleName, text) {
/*jslint evil: true */
var hasInteractive = useInteractive;
//Indicate a the module is in process of loading.
loaded[moduleName] = false;
context.scriptCount += 1;
//for builds, it does not map to a real file.
context.fake[moduleName] = true;
//Turn off interactive script matching for IE for any define
//calls in the text, then turn it back on at the end.
if (hasInteractive) {
useInteractive = false;
}
req.exec(text);
if (hasInteractive) {
useInteractive = true;
}
//Support anonymous modules.
context.completeLoad(moduleName);
};
//No need to continue if the plugin value has already been
//defined by a build.
if (fullName in defined) {
load(defined[fullName]);
} else {
//Use parentName here since the plugin's name is not reliable,
//could be some weird string with no path that actually wants to
//reference the parentName's path.
plugin.load(name, makeRequire(map.parentMap, true, function (deps, cb) {
var moduleDeps = [],
i, dep, depMap;
//Convert deps to full names and hold on to them
//for reference later, when figuring out if they
//are blocked by a circular dependency.
for (i = 0; (dep = deps[i]); i++) {
depMap = makeModuleMap(dep, map.parentMap);
deps[i] = depMap.fullName;
if (!depMap.prefix) {
moduleDeps.push(deps[i]);
}
}
depManager.moduleDeps = (depManager.moduleDeps || []).concat(moduleDeps);
return context.require(deps, cb);
}), load, config);
}
}
/**
* Adds the manager to the waiting queue. Only fully
* resolved items should be in the waiting queue.
*/
function addWait(manager) {
if (!waiting[manager.id]) {
waiting[manager.id] = manager;
waitAry.push(manager);
context.waitCount += 1;
}
}
/**
* Function added to every manager object. Created out here
* to avoid new function creation for each manager instance.
*/
function managerAdd(cb) {
this.listeners.push(cb);
}
function getManager(map, shouldQueue) {
var fullName = map.fullName,
prefix = map.prefix,
plugin = prefix ? plugins[prefix] ||
(plugins[prefix] = defined[prefix]) : null,
manager, created, pluginManager, prefixMap;
if (fullName) {
manager = managerCallbacks[fullName];
}
if (!manager) {
created = true;
manager = {
//ID is just the full name, but if it is a plugin resource
//for a plugin that has not been loaded,
//then add an ID counter to it.
id: (prefix && !plugin ?
(managerCounter++) + '__p@:' : '') +
(fullName || '__r@' + (managerCounter++)),
map: map,
depCount: 0,
depDone: [],
depCallbacks: [],
deps: [],
listeners: [],
add: managerAdd
};
specified[manager.id] = true;
//resource. Also only track plugin resources once
//the plugin has been loaded, and so the fullName is the
//true normalized value.
if (fullName && (!prefix || plugins[prefix])) {
managerCallbacks[fullName] = manager;
}
}
//If there is a plugin needed, but it is not loaded,
//first load the plugin, then continue on.
if (prefix && !plugin) {
prefixMap = makeModuleMap(prefix);
//Clear out defined and urlFetched if the plugin was previously
//situation). However, only do this work if the plugin is in
//defined but does not have a module export value.
if (prefix in defined && !defined[prefix]) {
delete defined[prefix];
delete urlFetched[prefixMap.url];
}
pluginManager = getManager(prefixMap, true);
pluginManager.add(function (plugin) {
//Create a new manager for the normalized
//resource ID and have it call this manager when
//done.
var newMap = makeModuleMap(map.originalName, map.parentMap),
normalizedManager = getManager(newMap, true);
//Indicate this manager is a placeholder for the real,
//normalized thing. Important for when trying to map
//modules and dependencies, for instance, in a build.
manager.placeholder = true;
normalizedManager.add(function (resource) {
manager.callback = function () {
return resource;
};
execManager(manager);
});
});
} else if (created && shouldQueue) {
//Indicate the resource is not loaded yet if it is to be
//queued.
loaded[manager.id] = false;
queueDependency(manager);
addWait(manager);
}
return manager;
}
function main(inName, depArray, callback, relModuleMap) {
var moduleMap = makeModuleMap(inName, relModuleMap),
name = moduleMap.name,
fullName = moduleMap.fullName,
manager = getManager(moduleMap),
id = manager.id,
deps = manager.deps,
i, depArg, depName, depPrefix, cjsMod;
if (fullName) {
//If module already defined for context, or already loaded,
//then leave. Also leave if jQuery is registering but it does
//not match the desired version number in the config.
if (fullName in defined || loaded[id] === true ||
config.jQuery !== callback().fn.jquery)) {
return;
}
//as part of a layer, where onScriptLoad is not fired
//for those cases. Do this after the inline define and
//dependency tracing is done.
specified[id] = true;
loaded[id] = true;
//If module is jQuery set up delaying its dom ready listeners.
jQueryCheck(callback());
}
}
//Attach real depArray and callback to the manager. Do this
//only if the module has not been defined already, so do this after
//the fullName checks above. IE can call main() more than once
//for a module.
manager.depArray = depArray;
manager.callback = callback;
//Add the dependencies to the deps field, and register for callbacks
//on the dependencies.
for (i = 0; i < depArray.length; i++) {
depArg = depArray[i];
//There could be cases like in IE, where a trailing comma will
//introduce a null dependency, so only treat a real dependency
//value as a dependency.
if (depArg) {
//Split the dependency name into plugin and name parts
depArg = makeModuleMap(depArg, (name ? moduleMap : relModuleMap));
depName = depArg.fullName;
depPrefix = depArg.prefix;
//Fix the name in depArray to be just the name, since
//that is how it will be called back later.
depArray[i] = depName;
//Fast path CommonJS standard dependencies.
deps[i] = makeRequire(moduleMap);
//CommonJS module spec 1.1
deps[i] = defined[fullName] = {};
manager.usingExports = true;
//CommonJS module spec 1.1
manager.cjsModule = cjsMod = deps[i] = {
id: name,
uri: name ? context.nameToUrl(name, null, relModuleMap) : undefined,
exports: defined[fullName]
};
} else if (depName in defined && !(depName in waiting) &&
(!(fullName in needFullExec) ||
(fullName in needFullExec && fullExec[depName]))) {
//Module already defined, and not in a build situation
//where the module is a something that needs full
//execution and this dependency has not been fully
//executed. See r.js's requirePatch.js for more info
//on fullExec.
deps[i] = defined[depName];
} else {
//Mark this dependency as needing full exec if
//the current module needs full exec.
if (fullName in needFullExec) {
needFullExec[depName] = true;
//Reset state so fully executed code will get
//picked up correctly.
delete defined[depName];
urlFetched[depArg.url] = false;
}
//Either a resource that is not loaded yet, or a plugin
//resource for either a plugin that has not
//loaded yet.
manager.depCount += 1;
manager.depCallbacks[i] = makeArgCallback(manager, i);
getManager(depArg, true).add(manager.depCallbacks[i]);
}
}
}
//Do not bother tracking the manager if it is all done.
if (!manager.depCount) {
//All done, execute!
execManager(manager);
} else {
addWait(manager);
}
}
/**
* Convenience method to call main for a define call that was put on
* hold in the defQueue.
*/
function callDefMain(args) {
main.apply(null, args);
}
/**
* jQuery 1.4.3+ supports ways to hold off calling
* calling jQuery ready callbacks until all scripts are loaded. Be sure
* to track it if the capability exists.. Also, since jQuery 1.4.3 does
* not register as a module, need to do some global inference checking.
* Even if it does register as a module, not guaranteed to be the precise
* name of the global. If a jQuery is tracked for this context, then go
* ahead and register it as a module too, if not already in process.
*/
jQueryCheck = function (jqCandidate) {
if (!context.jQuery) {
if ($) {
//If a specific version of jQuery is wanted, make sure to only
//use this jQuery if it matches.
if (config.jQuery && $.fn.jquery !== config.jQuery) {
return;
}
context.jQuery = $;
//or in process. Note this could trigger an attempt at
//a second jQuery registration, but does no harm since
//the first one wins, and it is the same value anyway.
return jQuery;
}]);
//Ask jQuery to hold DOM ready callbacks.
if (context.scriptCount) {
jQueryHoldReady($, true);
context.jQueryIncremented = true;
}
}
}
}
};
function findCycle(manager, traced) {
var fullName = manager.map.fullName,
depArray = manager.depArray,
fullyLoaded = true,
i, depName, depManager, result;
if (manager.isDone || !fullName || !loaded[fullName]) {
return result;
}
//Found the cycle.
if (traced[fullName]) {
return manager;
}
traced[fullName] = true;
//Trace through the dependencies.
if (depArray) {
for (i = 0; i < depArray.length; i++) {
//Some array members may be null, like if a trailing comma
//IE, so do the explicit [i] access and check if it has a value.
depName = depArray[i];
if (!loaded[depName] && !reservedDependencies[depName]) {
fullyLoaded = false;
break;
}
depManager = waiting[depName];
if (depManager && !depManager.isDone && loaded[depName]) {
result = findCycle(depManager, traced);
if (result) {
break;
}
}
}
if (!fullyLoaded) {
//Discard the cycle that was found, since it cannot
//be forced yet. Also clear this module from traced.
result = undefined;
delete traced[fullName];
}
}
return result;
}
function forceExec(manager, traced) {
var fullName = manager.map.fullName,
depArray = manager.depArray,
i, depName, depManager, prefix, prefixManager, value;
if (manager.isDone || !fullName || !loaded[fullName]) {
return undefined;
}
if (fullName) {
if (traced[fullName]) {
return defined[fullName];
}
traced[fullName] = true;
}
//Trace through the dependencies.
if (depArray) {
for (i = 0; i < depArray.length; i++) {
//Some array members may be null, like if a trailing comma
//IE, so do the explicit [i] access and check if it has a value.
depName = depArray[i];
if (depName) {
//First, make sure if it is a plugin resource that the
//plugin is not blocked.
prefix = makeModuleMap(depName).prefix;
if (prefix && (prefixManager = waiting[prefix])) {
forceExec(prefixManager, traced);
}
depManager = waiting[depName];
if (depManager && !depManager.isDone && loaded[depName]) {
value = forceExec(depManager, traced);
manager.depCallbacks[i](value);
}
}
}
}
return defined[fullName];
}
/**
* Checks if all modules for a context are loaded, and if so, evaluates the
* new ones in right dependency order.
*
* @private
*/
function checkLoaded() {
var waitInterval = config.waitSeconds * 1000,
//It is possible to disable the wait interval by using waitSeconds of 0.
expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
noLoads = "", hasLoadedProp = false, stillLoading = false,
cycleDeps = [],
i, prop, err, manager, cycleManager, moduleDeps;
//If there are items still in the paused queue processing wait.
//This is particularly important in the sync case where each paused
//item is processed right away but there may be more waiting.
if (context.pausedCount > 0) {
return undefined;
}
//Determine if priority loading is done. If so clear the priority. If
//not, then do not check
if (config.priorityWait) {
if (isPriorityDone()) {
//Call resume, since it could have
//some waiting dependencies to trace.
resume();
} else {
return undefined;
}
}
//See if anything is still in flight.
for (prop in loaded) {
if (!(prop in empty)) {
hasLoadedProp = true;
if (!loaded[prop]) {
if (expired) {
noLoads += prop + " ";
} else {
stillLoading = true;
if (prop.indexOf('!') === -1) {
//No reason to keep looking for unfinished
//loading. If the only stillLoading is a
//plugin resource though, keep going,
//because it may be that a plugin resource
//is waiting on a non-plugin cycle.
cycleDeps = [];
break;
} else {
moduleDeps = managerCallbacks[prop] && managerCallbacks[prop].moduleDeps;
if (moduleDeps) {
cycleDeps.push.apply(cycleDeps, moduleDeps);
}
}
}
}
}
}
//Check for exit conditions.
if (!hasLoadedProp && !context.waitCount) {
//If the loaded object had no items, then the rest of
//the work below does not need to be done.
return undefined;
}
if (expired && noLoads) {
//If wait time expired, throw error of unloaded modules.
err.requireModules = noLoads;
err.contextName = context.contextName;
return req.onError(err);
}
//If still loading but a plugin is waiting on a regular module cycle
//break the cycle.
if (stillLoading && cycleDeps.length) {
for (i = 0; (manager = waiting[cycleDeps[i]]); i++) {
if ((cycleManager = findCycle(manager, {}))) {
forceExec(cycleManager, {});
break;
}
}
}
//If still waiting on loads, and the waiting load is something
//other than a plugin resource, or there are still outstanding
//scripts, then just try back later.
if (!expired && (stillLoading || context.scriptCount)) {
//Something is still waiting to load. Wait for it, but only
//if a timeout is not already in effect.
if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {
checkLoadedTimeoutId = setTimeout(function () {
checkLoadedTimeoutId = 0;
checkLoaded();
}, 50);
}
return undefined;
}
//If still have items in the waiting cue, but all modules have
//been loaded, then it means there are some circular dependencies
//that need to be broken.
//However, as a waiting thing is fired, then it can add items to
//the waiting cue, and those items should not be fired yet, so
//make sure to redo the checkLoaded call after breaking a single
//cycle, if nothing else loaded then this logic will pick it up
//again.
if (context.waitCount) {
//Cycle through the waitAry, and call items in sequence.
for (i = 0; (manager = waitAry[i]); i++) {
forceExec(manager, {});
}
//If anything got placed in the paused queue, run it down.
if (context.paused.length) {
resume();
}
//Only allow this recursion to a certain depth. Only
//triggered by errors in calling a module in which its
//modules waiting on it cannot finish loading, or some circular
//dependencies that then may add more dependencies.
//The value of 5 is a bit arbitrary. Hopefully just one extra
//pass, or two for the case of circular dependencies generating
//more work that gets resolved in the sync node case.
if (checkLoadedDepth < 5) {
checkLoadedDepth += 1;
checkLoaded();
}
}
checkLoadedDepth = 0;
//Check for DOM ready, and nothing is waiting across contexts.
req.checkReadyState();
return undefined;
}
/**
* Resumes tracing of dependencies and then checks if everything is loaded.
*/
resume = function () {
var manager, map, url, i, p, args, fullName;
//Any defined modules in the global queue, intake them now.
context.takeGlobalQueue();
resumeDepth += 1;
if (context.scriptCount <= 0) {
//Synchronous envs will push the number below zero with the
//decrement above, be sure to set it back to zero for good measure.
//require() calls that also do not end up loading scripts could
//push the number negative too.
context.scriptCount = 0;
}
//Make sure any remaining defQueue items get properly processed.
while (defQueue.length) {
args = defQueue.shift();
if (args[0] === null) {
return req.onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1]));
} else {
callDefMain(args);
}
}
//Skip the resume of paused dependencies
//if current context is in priority wait.
if (!config.priorityWait || isPriorityDone()) {
while (context.paused.length) {
p = context.paused;
context.pausedCount += p.length;
//Reset paused list
context.paused = [];
for (i = 0; (manager = p[i]); i++) {
map = manager.map;
url = map.url;
fullName = map.fullName;
//If the manager is for a plugin managed resource,
//ask the plugin to load it now.
if (map.prefix) {
callPlugin(map.prefix, manager);
} else {
//Regular dependency.
if (!urlFetched[url] && !loaded[fullName]) {
req.load(context, fullName, url);
//Mark the URL as fetched, but only if it is
//not an empty: URL, used by the optimizer.
//In that case we need to be sure to call
//load() for each module that is mapped to
//empty: so that dependencies are satisfied
//correctly.
if (url.indexOf('empty:') !== 0) {
urlFetched[url] = true;
}
}
}
}
//Move the start time for timeout forward.
context.startTime = (new Date()).getTime();
context.pausedCount -= p.length;
}
}
//Only check if loaded when resume depth is 1. It is likely that
//it is only greater than 1 in sync environments where a factory
//function also then calls the callback-style require. In those
//cases, the checkLoaded should not occur until the resume
//depth is back at the top level.
if (resumeDepth === 1) {
checkLoaded();
}
resumeDepth -= 1;
return undefined;
};
//Define the context object. Many of these fields are on here
//just to make debugging easier.
context = {
contextName: contextName,
config: config,
defQueue: defQueue,
waiting: waiting,
waitCount: 0,
specified: specified,
loaded: loaded,
urlMap: urlMap,
urlFetched: urlFetched,
scriptCount: 0,
defined: defined,
paused: [],
pausedCount: 0,
plugins: plugins,
needFullExec: needFullExec,
fake: {},
fullExec: fullExec,
managerCallbacks: managerCallbacks,
makeModuleMap: makeModuleMap,
normalize: normalize,
/**
* Set a configuration for the context.
* @param {Object} cfg config object to integrate.
*/
configure: function (cfg) {
var paths, prop, packages, pkgs, packagePaths, requireWait;
//Make sure the baseUrl ends in a slash.
if (cfg.baseUrl) {
if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== "/") {
cfg.baseUrl += "/";
}
}
//Save off the paths and packages since they require special processing,
//they are additive.
paths = config.paths;
packages = config.packages;
pkgs = config.pkgs;
//Mix in the config values, favoring the new values over
//existing ones in context.config.
mixin(config, cfg, true);
//Adjust paths if necessary.
if (cfg.paths) {
for (prop in cfg.paths) {
if (!(prop in empty)) {
paths[prop] = cfg.paths[prop];
}
}
config.paths = paths;
}
packagePaths = cfg.packagePaths;
if (packagePaths || cfg.packages) {
//Convert packagePaths into a packages config.
if (packagePaths) {
for (prop in packagePaths) {
if (!(prop in empty)) {
configurePackageDir(pkgs, packagePaths[prop], prop);
}
}
}
//Adjust packages if necessary.
if (cfg.packages) {
configurePackageDir(pkgs, cfg.packages);
}
//Done with modifications, assing packages back to context config
config.pkgs = pkgs;
}
//If priority loading is in effect, trigger the loads now
if (cfg.priority) {
//Hold on to requireWait value, and reset it after done
requireWait = context.requireWait;
//Allow tracing some require calls to allow the fetching
//of the priority config.
context.requireWait = false;
//But first, call resume to register any defined modules that may
//be in a data-main built file before the priority config
//call.
resume();
context.require(cfg.priority);
//Trigger a resume right away, for the case when
//the script with the priority load is done as part
//of a data-main call. In that case the normal resume
//call will not happen because the scriptCount will be
//at 1, since the script for data-main is being processed.
resume();
//Restore previous state.
context.requireWait = requireWait;
config.priorityWait = cfg.priority;
}
//If a deps array or a config callback is specified, then call
//require with those args. This is useful when require is defined as a
//config object before require.js is loaded.
if (cfg.deps || cfg.callback) {
context.require(cfg.deps || [], cfg.callback);
}
},
requireDefined: function (moduleName, relModuleMap) {
return makeModuleMap(moduleName, relModuleMap).fullName in defined;
},
requireSpecified: function (moduleName, relModuleMap) {
return makeModuleMap(moduleName, relModuleMap).fullName in specified;
},
require: function (deps, callback, relModuleMap) {
var moduleName, fullName, moduleMap;
if (isFunction(callback)) {
//Invalid call
}
//Synchronous access to one module. If require.get is
//available (as in the Node adapter), prefer that.
//In this case deps is the moduleName and callback is
//the relModuleMap
if (req.get) {
return req.get(context, deps, callback);
}
//Just return the module wanted. In this scenario, the
//second arg (if passed) is just the relModuleMap.
moduleName = deps;
relModuleMap = callback;
//Normalize module name, if it contains . or ..
moduleMap = makeModuleMap(moduleName, relModuleMap);
fullName = moduleMap.fullName;
if (!(fullName in defined)) {
moduleMap.fullName +
contextName));
}
return defined[fullName];
}
//Call main but only if there are dependencies or
//a callback to call.
if (deps && deps.length || callback) {
main(null, deps, callback, relModuleMap);
}
//If the require call does not trigger anything new to load,
//then resume the dependency processing.
if (!context.requireWait) {
while (!context.scriptCount && context.paused.length) {
resume();
}
}
return context.require;
},
/**
* Internal method to transfer globalQueue items to this context's
* defQueue.
*/
takeGlobalQueue: function () {
//Push all the globalDefQueue items into the context's defQueue
if (globalDefQueue.length) {
//Array splice in the values since the context code has a
//local var ref to defQueue, so cannot just reassign the one
//on context.
apsp.apply(context.defQueue,
[context.defQueue.length - 1, 0].concat(globalDefQueue));
globalDefQueue = [];
}
},
/**
* Internal method used by environment adapters to complete a load event.
* A load event could be a script load or just a load pass from a synchronous
* load call.
* @param {String} moduleName the name of the module to potentially complete.
*/
completeLoad: function (moduleName) {
var args;
context.takeGlobalQueue();
while (defQueue.length) {
args = defQueue.shift();
if (args[0] === null) {
args[0] = moduleName;
break;
} else if (args[0] === moduleName) {
//Found matching define call for this script!
break;
} else {
//Some other named define call, most likely the result
//of a build layer that included many define calls.
callDefMain(args);
args = null;
}
}
if (args) {
callDefMain(args);
} else {
//A script that does not call define(), so just simulate
//the call for it. Special exception for jQuery dynamic load.
callDefMain([moduleName, [],
function () {
return jQuery;
} : null]);
}
//Doing this scriptCount decrement branching because sync envs
//need to decrement after resume, otherwise it looks like
//loading is complete after the first dependency is fetched.
//For browsers, it works fine to decrement after, but it means
//the checkLoaded setTimeout 50 ms cost is taken. To avoid
//that cost, decrement beforehand.
if (req.isAsync) {
context.scriptCount -= 1;
}
resume();
if (!req.isAsync) {
context.scriptCount -= 1;
}
},
/**
* Converts a module name + .extension into an URL path.
* *Requires* the use of a module name. It does not support using
* plain URLs like nameToUrl.
*/
toUrl: function (moduleNamePlusExt, relModuleMap) {
var index = moduleNamePlusExt.lastIndexOf("."),
ext = null;
if (index !== -1) {
ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);
moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
}
return context.nameToUrl(moduleNamePlusExt, ext, relModuleMap);
},
/**
* Converts a module name to a file path. Supports cases where
* moduleName may actually be just an URL.
*/
nameToUrl: function (moduleName, ext, relModuleMap) {
var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url,
config = context.config;
//Normalize module name if have a base relative module name to work from.
moduleName = normalize(moduleName, relModuleMap && relModuleMap.fullName);
//If a colon is in the URL, it indicates a protocol is used and it is just
//an URL to a file, or if it starts with a slash or ends with .js, it is just a plain file.
//The slash is important for protocol-less URLs as well as full paths.
if (req.jsExtRegExp.test(moduleName)) {
//Just a plain path, not module name lookup, so just return it.
//Add extension if it is included. This is a bit wonky, only non-.js things pass
//an extension, this method probably needs to be reworked.
url = moduleName + (ext ? ext : "");
} else {
//A module that needs to be converted to a path.
paths = config.paths;
pkgs = config.pkgs;
syms = moduleName.split("/");
//For each module name segment, see if there is a path
//registered for it. Start with most specific name
//and work up from it.
for (i = syms.length; i > 0; i--) {
parentModule = syms.slice(0, i).join("/");
if (paths[parentModule]) {
syms.splice(0, i, paths[parentModule]);
break;
} else if ((pkg = pkgs[parentModule])) {
//If module name is just the package name, then looking
//for the main module.
if (moduleName === pkg.name) {
pkgPath = pkg.location + '/' + pkg.main;
} else {
pkgPath = pkg.location;
}
syms.splice(0, i, pkgPath);
break;
}
}
//Join the path parts together, then figure out if baseUrl is needed.
url = (url.charAt(0) === '/' || url.match(/^\w+:/) ? "" : config.baseUrl) + url;
}
return config.urlArgs ? url +
((url.indexOf('?') === -1 ? '?' : '&') +
config.urlArgs) : url;
}
};
//Make these visible on the context so can be called at the very
//end of the file to bootstrap
context.jQueryCheck = jQueryCheck;
context.resume = resume;
return context;
}
/**
* Main entry point.
*
* If the only argument to require is a string, then the module that
* is represented by that string is fetched for the appropriate context.
*
* If the first argument is an array, then it will be treated as an array
* of dependency string names to fetch. An optional function callback can
* be specified to execute when all of those dependencies are available.
*
* Make a local req variable to help Caja compliance (it assumes things
* on a require that are not standardized), and to give a short
* name for minification/local scope use.
*/
req = requirejs = function (deps, callback) {
//Find the right context, use default
var contextName = defContextName,
context, config;
// Determine if have config object in the call.
// deps is a config object
config = deps;
if (isArray(callback)) {
// Adjust args if there are dependencies
deps = callback;
callback = arguments[2];
} else {
deps = [];
}
}
if (config && config.context) {
contextName = config.context;
}
context = contexts[contextName] ||
(contexts[contextName] = newContext(contextName));
if (config) {
context.configure(config);
}
return context.require(deps, callback);
};
/**
* Support require.config() to make it easier to cooperate with other
* AMD loaders on globally agreed names.
*/
req.config = function (config) {
return req(config);
};
/**
* Export require as a global, but only if it does not already exist.
*/
if (!require) {
require = req;
}
/**
* Global require.toUrl(), to match global require, mostly useful
*/
req.toUrl = function (moduleNamePlusExt) {
return contexts[defContextName].toUrl(moduleNamePlusExt);
};
req.version = version;
//Used to filter out dependencies that are already paths.
req.jsExtRegExp = /^\/|:|\?|\.js$/;
s = req.s = {
contexts: contexts,
//Stores a list of URLs that should not get async script tag treatment.
skipAsync: {}
};
req.isAsync = req.isBrowser = isBrowser;
if (isBrowser) {
//If BASE tag is in play, using appendChild is a problem for IE6.
//When that browser dies, this can be removed. Details in this jQuery bug:
if (baseElement) {
head = s.head = baseElement.parentNode;
}
}
/**
* Any errors that require explicitly generates will be passed to this
* @param {Error} err the error object.
*/
req.onError = function (err) {
throw err;
};
/**
* Does the request to load a module for the browser case.
* Make this a separate function to allow other environments
* to override it.
*
* @param {Object} context the require context to find state.
* @param {String} moduleName the name of the module.
* @param {Object} url the URL to the module.
*/
req.load = function (context, moduleName, url) {
req.resourcesReady(false);
context.scriptCount += 1;
req.attach(url, context, moduleName);
//If tracking a jQuery, then make sure its ready callbacks
//are put on hold to prevent its ready callbacks from
//triggering too soon.
if (context.jQuery && !context.jQueryIncremented) {
jQueryHoldReady(context.jQuery, true);
context.jQueryIncremented = true;
}
};
function getInteractiveScript() {
var scripts, i, script;
if (interactiveScript && interactiveScript.readyState === 'interactive') {
return interactiveScript;
}
scripts = document.getElementsByTagName('script');
for (i = scripts.length - 1; i > -1 && (script = scripts[i]); i--) {
if (script.readyState === 'interactive') {
return (interactiveScript = script);
}
}
return null;
}
/**
* The function that handles definitions of modules. Differs from
* require() in that a string for the module should be the first argument,
* and the function to execute after dependencies are loaded should
* return a value to define the module corresponding to the first argument's
* name.
*/
define = function (name, deps, callback) {
var node, context;
//Allow for anonymous functions
if (typeof name !== 'string') {
//Adjust args appropriately
callback = deps;
deps = name;
name = null;
}
//This module may not have dependencies
if (!isArray(deps)) {
callback = deps;
deps = [];
}
//If no name, and callback is a function, then figure out if it a
//CommonJS thing with dependencies.
if (!deps.length && isFunction(callback)) {
//Remove comments from the callback string,
//look for require calls, and pull them into the dependencies,
//but only if there are function args.
if (callback.length) {
callback
.toString()
.replace(commentRegExp, "")
.replace(cjsRequireRegExp, function (match, dep) {
deps.push(dep);
});
//May be a CommonJS thing even without require calls, but still
//could use exports, and module. Avoid doing exports and module
//work though if it just needs require.
//REQUIRES the function to expect the CommonJS variables in the
//order listed below.
}
}
//If in IE 6-8 and hit an anonymous define() call, do the interactive
//work.
if (useInteractive) {
node = currentlyAddingScript || getInteractiveScript();
if (node) {
if (!name) {
}
}
}
//Always save off evaluating the def call until the script onload handler.
//This allows multiple modules to be in a file without prematurely
//tracing dependencies, and allows for anonymous module support,
//where the module name is not known until the script onload event
//occurs. If no context, use the global queue, and get it processed
//in the onscript load callback.
(context ? context.defQueue : globalDefQueue).push([name, deps, callback]);
return undefined;
};
define.amd = {
multiversion: true,
plugins: true,
jQuery: true
};
/**
* Executes the text. Normally just uses eval, but can be modified
* to use a more environment specific call.
*/
req.exec = function (text) {
return eval(text);
};
/**
* Executes a module callack function. Broken out as a separate function
* solely to allow the build system to sequence the files in the built
* layer in the right sequence.
*
* @private
*/
req.execCb = function (name, callback, args, exports) {
return callback.apply(exports, args);
};
/**
* Adds a node to the DOM. Public function since used by the order plugin.
* This method should not normally be called by outside code.
*/
req.addScriptToDom = function (node) {
//For some cache cases in IE 6-8, the script executes before the end
//of the appendChild execution, so to tie an anonymous define
//call to the module name (which is stored on the node), hold on
//to a reference to this node, but clear after the DOM insertion.
currentlyAddingScript = node;
if (baseElement) {
head.insertBefore(node, baseElement);
} else {
head.appendChild(node);
}
currentlyAddingScript = null;
};
/**
* callback for script loads, used to check status of loading.
*
* @param {Event} evt the event from the browser for the script
* that was loaded.
*
* @private
*/
req.onScriptLoad = function (evt) {
//Using currentTarget instead of target for Firefox 2.0's sake. Not
//all old browsers will be supported, but this one was easy enough
//to support and still makes sense.
var node = evt.currentTarget || evt.srcElement, contextName, moduleName,
context;
//Reset interactive script so a script node is not held onto for
//to long.
interactiveScript = null;
//Pull out the name of the module and the context.
context = contexts[contextName];
contexts[contextName].completeLoad(moduleName);
//Clean up script binding. Favor detachEvent because of IE9
//issue, see attachEvent/addEventListener comment elsewhere
//in this file.
if (node.detachEvent && !isOpera) {
//Probably IE. If not it will throw an error, which will be
//useful to know.
} else {
}
}
};
/**
* Attaches the script represented by the URL to the current
* environment. Right now only supports browser loading,
* but can be redefined in other environments to do the right thing.
* @param {String} url the url of the script to attach.
* @param {Object} context the context that wants the script.
* @param {moduleName} the name of the module that is associated with the script.
* @param {Function} [callback] optional callback, defaults to require.onScriptLoad
* @param {String} [type] optional type, defaults to text/javascript
* @param {Function} [fetchOnlyFunction] optional function to indicate the script node
* should be set up to fetch the script but do not attach it to the DOM
* so that it can later be attached to execute it. This is a way for the
* order plugin to support ordered loading in IE. Once the script is fetched,
* but not executed, the fetchOnlyFunction will be called.
*/
req.attach = function (url, context, moduleName, callback, type, fetchOnlyFunction) {
var node;
if (isBrowser) {
//In the browser so use a script tag
callback = callback || req.onScriptLoad;
node = context && context.config && context.config.xhtml ?
"text/javascript";
//Use async so Gecko does not block on executing the script if something
//like a long-polling comet tag is being run first. Gecko likes
//to evaluate scripts in DOM order, even for dynamic scripts.
//It will fetch them async, but only evaluate the contents in DOM
//order, so a long-polling script tag can delay execution of scripts
//after it. But telling Gecko we expect async gets us the behavior
//we want -- execute it whenever it is finished downloading. Only
//Helps Firefox 3.6+
//Allow some URLs to not be fetched async. Mostly helps the order!
//plugin
if (context) {
}
//Set up load listener. Test attachEvent first because IE9 has
//a subtle issue in its addEventListener and script onload firings
//that do not match the behavior of all other browsers with
//addEventListener support, which fire the onload event for a
//script right after the script execution. See:
//UNFORTUNATELY Opera implements attachEvent but does not follow the script
//script execution mode.
//Probably IE. IE (at least 6-8) do not fire
//script onload right after executing the script, so
//we cannot tie the anonymous define call to a name.
//However, IE reports the script as being in "interactive"
//readyState at the time of the define call.
useInteractive = true;
if (fetchOnlyFunction) {
//Need to use old school onreadystate here since
//when the event fires and the node is not attached
//to the DOM, the evt.srcElement is null, so use
//a closure to remember the node.
//Script loaded but not executed.
//Clear loaded handler, set the real one that
//waits for script execution.
node.onreadystatechange = null;
}
};
} else {
}
} else {
}
//Fetch only means waiting to attach to DOM after loaded.
if (!fetchOnlyFunction) {
}
return node;
} else if (isWebWorker) {
//In a web worker, use importScripts. This is not a very
//efficient use of importScripts, importScripts will block until
//its script is downloaded and evaluated. However, if web workers
//are in play, the expectation that a build has been done so that
//only one script needs to be loaded anyway. This may need to be
//reevaluated if other use cases become common.
//Account for anonymous modules
}
return null;
};
//Look for a data-main script attribute, which could also adjust the baseUrl.
if (isBrowser) {
//Figure out baseUrl. Get it from the script tag with require.js in it.
//Set the "head" where we can append children by
//using the script's parent.
if (!head) {
}
//Look for a data-main attribute to set main script for the page
//to load. If it is there, the path to data main becomes the
//baseUrl, if it is not already set.
//Pull off the directory of data-main for use as the
//baseUrl.
//Set final config.
//Strip off any trailing .js since dataMain is now
//like a module name.
}
//Put the data-main script in the files to load.
break;
}
}
}
//See if there is nothing waiting across contexts, and if not, trigger
//resourcesReady.
req.checkReadyState = function () {
return;
}
}
}
req.resourcesReady(true);
};
/**
* have been loaded by the loader. Can be overridden by other, for
* instance the domReady plugin, which wants to know when all resources
* are loaded.
*/
//First, set the public variable indicating that resources are loading.
if (req.resourcesDone) {
//If jQuery with DOM ready delayed, release it now.
if (context.jQueryIncremented) {
context.jQueryIncremented = false;
}
}
}
}
};
//FF < 3.6 readyState fix. Needed so that domReady plugin
//works well in that environment, since require.js is normally
//loaded via an HTML script tag so it will be there before window load,
//where the domReady plugin is more likely to be loaded after window load.
req.pageLoaded = function () {
}
};
if (isBrowser) {
if (document.addEventListener) {
if (!document.readyState) {
}
}
}
//Set up default context. If require was a configuration object, use that as base config.
//If modules are built into require.js, then need to make sure dependencies are
//traced. Use a setTimeout in the browser world, to allow all the modules to register
//themselves. In a non-browser env, assume that modules are not built into require.js,
//which seems odd to do on the server.
//Indicate that the script that includes require() is still loading,
//so that require()'d dependencies are not traced until the end of the
//file is parsed (approximated via the setTimeout call).
ctx.requireWait = true;
setTimeout(function () {
ctx.requireWait = false;
if (!ctx.scriptCount) {
}
}, 0);
}
}());
/*!
* jQuery JavaScript Library v1.7.2
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Includes Sizzle.js
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Wed Mar 21 12:46:34 2012 -0700
*/
// Use the correct document accordingly with window argument (sandbox)
var jQuery = (function() {
// Define a local copy of jQuery
// The jQuery object is actually just the init constructor 'enhanced'
},
// Map over jQuery in case of overwrite
// Map over the $ in case of overwrite
// A central reference to the root jQuery(document)
// A simple way to check for HTML strings or ID strings
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
// Check if a string has a non-whitespace character in it
rnotwhite = /\S/,
// Used for trimming whitespace
trimLeft = /^\s+/,
trimRight = /\s+$/,
// Match a standalone tag
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
// JSON RegExp
rvalidchars = /^[\],:{}\s]*$/,
rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
// Useragent RegExp
// Matches dashed string for camelizing
// Used by jQuery.camelCase as callback to replace()
},
// Keep a UserAgent string for use with jQuery.browser
// For matching the engine and version of the browser
// The deferred used on DOM ready
// The ready event handler
// Save a reference to some core methods
// [[Class]] -> type pairs
class2type = {};
// Handle $(""), $(null), or $(undefined)
if ( !selector ) {
return this;
}
// Handle $(DOMElement)
this.length = 1;
return this;
}
// The body element only exists once, optimize finding it
this.length = 1;
return this;
}
// Handle HTML strings
if ( typeof selector === "string" ) {
// Are we dealing with HTML string or an ID?
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
} else {
}
// Verify a match, and that no context was specified for #id
// HANDLE: $(html) -> $(array)
if ( match[1] ) {
// If a single string is passed in and it's a single tag
// just do a createElement and skip the rest
if ( ret ) {
} else {
}
} else {
}
// HANDLE: $("#id")
} else {
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
// Handle the case where IE and Opera return items
// by name instead of ID
}
// Otherwise, we inject the element directly into the jQuery object
this.length = 1;
this[0] = elem;
}
return this;
}
// HANDLE: $(expr, $(...))
// HANDLE: $(expr, context)
// (which is just equivalent to: $(context).find(expr)
} else {
}
// HANDLE: $(function)
// Shortcut for document ready
}
}
},
// Start with an empty selector
selector: "",
// The current version of jQuery being used
jquery: "1.7.2",
// The default length of a jQuery object is 0
length: 0,
// The number of elements contained in the matched element set
size: function() {
return this.length;
},
toArray: function() {
},
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
return num == null ?
// Return a 'clean' array
this.toArray() :
// Return just the object
},
// Take an array of elements and push it onto the stack
// (returning the new matched element set)
// Build a new jQuery matched element set
var ret = this.constructor();
} else {
}
// Add the old object onto the stack (as a reference)
ret.prevObject = this;
if ( name === "find" ) {
} else if ( name ) {
}
// Return the newly-formed element set
return ret;
},
// Execute a callback for every element in the matched set.
// (You can seed the arguments with an array of args, but this is
// only used internally.)
},
// Attach the listeners
// Add the callback
return this;
},
eq: function( i ) {
i = +i;
return i === -1 ?
this.slice( i ) :
this.slice( i, i + 1 );
},
first: function() {
return this.eq( 0 );
},
last: function() {
return this.eq( -1 );
},
slice: function() {
},
}));
},
end: function() {
return this.prevObject || this.constructor(null);
},
// For internal use only.
// Behaves like an Array's method, not like a jQuery method.
};
// Give the init function the jQuery prototype for later instantiation
i = 1,
deep = false;
// Handle a deep copy situation
if ( typeof target === "boolean" ) {
// skip the boolean and the target
i = 2;
}
// Handle case when target is a string or something (possible in deep copy)
target = {};
}
// extend jQuery itself if only one argument is passed
if ( length === i ) {
target = this;
--i;
}
for ( ; i < length; i++ ) {
// Extend the base object
// Prevent never-ending loop
continue;
}
// Recurse if we're merging plain objects or arrays
if ( copyIsArray ) {
copyIsArray = false;
} else {
}
// Never move original objects, clone them
// Don't bring in undefined values
}
}
}
}
// Return the modified object
return target;
};
noConflict: function( deep ) {
}
}
return jQuery;
},
// 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
if ( hold ) {
} else {
}
},
// Handle when the DOM is ready
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
}
// Remember that the DOM is ready
// If a normal DOM Ready event fired, decrement, and wait if need be
return;
}
// If there are functions bound, to execute
// Trigger any bound ready events
}
}
},
bindReady: function() {
if ( readyList ) {
return;
}
// Catch cases where $(document).ready() is called after the
// browser event has already occurred.
// Handle it asynchronously to allow scripts the opportunity to delay ready
}
// Mozilla, Opera and webkit nightlies currently support this event
if ( document.addEventListener ) {
// Use the handy event callback
// A fallback to window.onload, that will always work
// If IE event model is used
} else if ( document.attachEvent ) {
// ensure firing before onload,
// maybe late but safe also for iframes
// A fallback to window.onload, that will always work
// If IE and not a frame
// continually check to see if the document is ready
var toplevel = false;
try {
} catch(e) {}
}
}
},
// Since version 1.3, DOM methods and functions like alert
// aren't supported. They return false on IE (#2968).
isFunction: function( obj ) {
},
},
},
},
return obj == null ?
String( obj ) :
},
isPlainObject: function( obj ) {
// 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
return false;
}
try {
// Not own constructor property must be Object
if ( obj.constructor &&
return false;
}
} catch ( e ) {
// IE8,9 Will throw exceptions on certain host objects #9897
return false;
}
// Own properties are enumerated firstly, so to speed up,
// if last one is own, then all properties are own.
var key;
},
isEmptyObject: function( obj ) {
return false;
}
return true;
},
},
return null;
}
// Attempt to parse using the native JSON parser first
}
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
return ( new Function( "return " + data ) )();
}
},
// Cross-browser xml parsing
return null;
}
try {
} else { // IE
}
} catch( e ) {
}
}
return xml;
},
noop: function() {},
// Evaluates a script in a global context
// Workarounds based on findings by Jim Driscoll
globalEval: function( data ) {
// We use execScript on Internet Explorer
// We use an anonymous function so that context is window
// rather than jQuery in Firefox
} )( data );
}
},
// Convert dashed to camelCase; used by the css and data modules
// Microsoft forgot to hump their vendor prefix (#9572)
},
},
// args is for internal usage only
var name, i = 0,
if ( args ) {
if ( isObj ) {
break;
}
}
} else {
for ( ; i < length; ) {
break;
}
}
}
// A special, fast, case for the most common use of each
} else {
if ( isObj ) {
break;
}
}
} else {
for ( ; i < length; ) {
break;
}
}
}
}
return object;
},
// Use native String.trim function wherever possible
function( text ) {
return text == null ?
"" :
} :
// Otherwise use our own trimming functionality
function( text ) {
return text == null ?
"" :
},
// results is for internal usage only
if ( array != null ) {
// The window, strings (and functions) also have 'length'
// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
} else {
}
}
return ret;
},
var len;
if ( array ) {
if ( indexOf ) {
}
for ( ; i < len; i++ ) {
// Skip accessing in sparse arrays
return i;
}
}
}
return -1;
},
j = 0;
}
} else {
}
}
return first;
},
// Go through the array, only saving the items
// that pass the validator function
}
}
return ret;
},
// arg is for internal usage only
i = 0,
// jquery objects are treated as arrays
isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
// Go through the array, translating each of the items to their
if ( isArray ) {
for ( ; i < length; i++ ) {
if ( value != null ) {
}
}
// Go through every key on the object,
} else {
if ( value != null ) {
}
}
}
// Flatten any nested arrays
},
// A global GUID counter for objects
guid: 1,
// Bind a function to a context, optionally partially applying any
// arguments.
if ( typeof context === "string" ) {
}
// Quick check to determine if target is callable, in the spec
// this throws a TypeError, but we will just return undefined.
return undefined;
}
// Simulated bind
proxy = function() {
};
// Set the guid of unique handler to the same of original handler, so it can be removed
return proxy;
},
// Mutifunctional method to get and set values to a collection
// The value/s can optionally be executed if it's a function
var exec,
i = 0,
// Sets many values
for ( i in key ) {
}
chainable = 1;
// Sets one value
// Optionally, function values get executed if exec is true
if ( bulk ) {
// Bulk operations only iterate when executing function values
if ( exec ) {
};
// Otherwise they run against the entire set
} else {
fn = null;
}
}
if ( fn ) {
for (; i < length; i++ ) {
}
}
chainable = 1;
}
return chainable ?
elems :
// Gets
bulk ?
},
now: function() {
return ( new Date() ).getTime();
},
// Use of jQuery.browser is frowned upon.
// More details: http://docs.jquery.com/Utilities/jQuery.browser
[];
},
sub: function() {
}
jQuerySub.superclass = this;
}
};
return jQuerySub;
},
browser: {}
});
// Populate the class2type map
jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
});
if ( browserMatch.browser ) {
}
// Deprecated, use jQuery.browser.webkit instead
}
// IE doesn't match non-breaking spaces with \s
}
// All jQuery objects should point back to these
// Cleanup functions for the document ready method
if ( document.addEventListener ) {
DOMContentLoaded = function() {
};
} else if ( document.attachEvent ) {
DOMContentLoaded = function() {
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
}
};
}
// The DOM ready check for Internet Explorer
function doScrollCheck() {
return;
}
try {
// If IE is used, use the trick by Diego Perini
} catch(e) {
return;
}
// and execute any waiting functions
}
return jQuery;
})();
// String to Object flags format cache
var flagsCache = {};
// Convert String-formatted flags into Object-formatted ones and store in cache
function createFlags( flags ) {
i, length;
}
return object;
}
/*
* Create a callback list using the following parameters:
*
* flags: an optional list of space-separated flags that will change how
* the callback list behaves
*
* By default a callback list will act like an event callback list and can be
* "fired" multiple times.
*
* Possible flags:
*
* 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
*
*/
// Convert flags from String-formatted to Object-formatted
// (we check in cache first)
var // Actual callback list
list = [],
// Stack of fire calls for repeatable lists
stack = [],
// Last fire value (for non-forgettable lists)
// Flag to know if list was already fired
// Flag to know if list is currently firing
// First callback to fire (used internally by add and fireWith)
// End of the loop when firing
// Index of currently firing callback (modified by remove if needed)
// Add one or several callbacks to the list
var i,
elem,
type,
if ( type === "array" ) {
// Inspect recursively
} else if ( type === "function" ) {
// Add if not in unique mode and callback is not in
}
}
}
},
// Fire callbacks
fired = true;
firing = true;
firingStart = 0;
memory = true; // Mark as halted
break;
}
}
firing = false;
if ( list ) {
}
} else if ( memory === true ) {
} else {
list = [];
}
}
},
// Actual Callbacks object
self = {
// Add a callback or a collection of callbacks to the list
add: function() {
if ( list ) {
// Do we need to add the callbacks to the
// current firing batch?
if ( firing ) {
// With memory, if we're not firing then
// we should call right away, unless previous
// firing was halted (stopOnFalse)
}
}
return this;
},
// Remove a callback from the list
remove: function() {
if ( list ) {
argIndex = 0,
// Handle firingIndex and firingLength
if ( firing ) {
if ( i <= firingLength ) {
firingLength--;
if ( i <= firingIndex ) {
firingIndex--;
}
}
}
// Remove the element
// If we have some unicity property then
// we only need to do this once
break;
}
}
}
}
}
return this;
},
// Control if a given callback is in the list
if ( list ) {
var i = 0,
for ( ; i < length; i++ ) {
return true;
}
}
}
return false;
},
// Remove all callbacks from the list
empty: function() {
list = [];
return this;
},
// Have the list do nothing anymore
disable: function() {
return this;
},
// Is it disabled?
disabled: function() {
return !list;
},
// Lock the list in its current state
lock: function() {
}
return this;
},
// Is it locked?
locked: function() {
return !stack;
},
// Call all callbacks with the given context and arguments
if ( stack ) {
if ( firing ) {
}
}
}
return this;
},
// Call all the callbacks with the given arguments
fire: function() {
return this;
},
// To know if the callbacks have already been called at least once
fired: function() {
return !!fired;
}
};
return self;
};
var // Static reference to slice
sliceDeferred = [].slice;
state = "pending",
lists = {
},
promise = {
state: function() {
return state;
},
// Deprecated
return this;
},
always: function() {
return this;
},
} else {
}
});
} else {
}
});
}).promise();
},
// Get a promise for this deferred
// If obj is provided, the promise aspect is added to the object
if ( obj == null ) {
} else {
}
}
return obj;
}
},
key;
}
// Handle state
state = "resolved";
state = "rejected";
// Call given func if any
if ( func ) {
}
// All done!
return deferred;
},
// Deferred helper
when: function( firstParam ) {
i = 0,
function resolveFunc( i ) {
return function( value ) {
if ( !( --count ) ) {
}
};
}
function progressFunc( i ) {
return function( value ) {
};
}
if ( length > 1 ) {
for ( ; i < length; i++ ) {
} else {
--count;
}
}
if ( !count ) {
}
} else if ( deferred !== firstParam ) {
}
return promise;
}
});
var support,
all,
a,
opt,
tds,
i,
// Preliminary tests
div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
// Can't get basic test support
return {};
}
// First batch of supports tests
support = {
// IE strips leading whitespace when .innerHTML is used
// Make sure that tbody elements aren't automatically inserted
// IE will insert them into empty tables
// Make sure that link elements get serialized correctly by innerHTML
// This requires a wrapper element in IE
// Get the style information from getAttribute
// (IE uses .cssText instead)
// Make sure that URLs aren't manipulated
// (IE normalizes it by default)
// Make sure that element opacity exists
// (IE uses filter instead)
// Use a regex to work around a WebKit issue. See #5145
// Verify style float existence
// (IE uses styleFloat instead of cssFloat)
// Make sure that if no value is specified for a checkbox
// that it defaults to "on".
// (WebKit defaults to "" instead)
// 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)
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
// Tests for enctype support on a form(#6743)
// Makes sure cloning an html5 element does not cause problems
// Where outerHTML is undefined, this still works
// Will be defined later
submitBubbles: true,
changeBubbles: true,
focusinBubbles: false,
deleteExpando: true,
noCloneEvent: true,
inlineBlockNeedsLayout: false,
shrinkWrapBlocks: false,
reliableMarginRight: true,
pixelMargin: true
};
// jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
// Make sure checked status is properly cloned
// Make sure that the options inside disabled selects aren't marked as disabled
// (WebKit marks them as disabled)
// Test to see if it's possible to delete an expando from an element
// Fails in Internet Explorer
try {
} catch( e ) {
support.deleteExpando = false;
}
// Cloning a node shouldn't copy over any
// bound event handlers (IE does this)
support.noCloneEvent = false;
});
}
// Check if a radio maintains its value
// after being appended to the DOM
// #11217 - WebKit loses check when the name is after the checked attribute
// WebKit doesn't clone checked state correctly in fragments
// Check if a disconnected checkbox will retain its checked
// value of true after appended to the DOM (IE6/7)
// Technique from Juriy Zaytsev
// We only care about the case where non-standard event systems
// are used, namely in IE. Short-circuiting here helps us to
// avoid an eval call (in setAttribute) which can cause CSP
// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
if ( div.attachEvent ) {
for ( i in {
submit: 1,
change: 1,
focusin: 1
}) {
eventName = "on" + i;
if ( !isSupported ) {
}
}
}
// Null elements to avoid leaks in IE
// Run tests that need a body at doc ready
jQuery(function() {
if ( !body ) {
// Return for frameset docs that don't have a body
return;
}
conMarginTop = 1;
paddingMarginBorder = "padding:0;margin:0;border:";
positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;";
html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div>" +
"<tr><td></td></tr></table>";
container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
// Construct the test element
// 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).
// (only IE 8 fails this test)
div.innerHTML = "<table><tr><td style='" + paddingMarginBorder + "0;display:none'></td><td>t</td></tr></table>";
// Check if empty table cells still have offsetWidth/Height
// (IE <= 8 fail this test)
// Check if div with explicit width and no margin-right incorrectly
// gets computed margin-right based on width of container. For more
// info see bug #3333
// Fails in WebKit before Feb 2011 nightlies
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
if ( window.getComputedStyle ) {
( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
}
// Check if natively block-level elements act like inline-block
// elements when setting their display to 'inline' and giving
// them layout
// (IE < 8 does this)
// Check if elements with layout shrink-wrap their children
// (IE 6 does this)
}
offsetSupport = {
};
// safari subtracts parent border width here which is 5px
if ( window.getComputedStyle ) {
support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%";
}
}
});
return support;
})();
var rbrace = /^(?:\{.*\}|\[.*\])$/,
rmultiDash = /([A-Z])/g;
cache: {},
// Please use with caution
uuid: 0,
// Unique for each copy of jQuery on the page
// Non-digits removed to match rinlinejQuery
// The following elements throw uncatchable exceptions if you
// attempt to add expando properties to them.
noData: {
"embed": true,
// Ban all objects except for Flash (which handle expandos)
"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
"applet": true
},
},
return;
}
// We have to handle DOM nodes and JS objects differently because IE6-7
// can't GC object references properly across the DOM-JS boundary
// Only DOM nodes need the global jQuery cache; JS object data is
// attached directly to the object so GC can occur automatically
// 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
// 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] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
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 ) {
} else {
id = internalKey;
}
}
// Avoids exposing jQuery metadata on plain JS objects when the object
// is serialized using JSON.stringify
if ( !isNode ) {
}
}
// shallow copied over onto the existing cache
if ( pvt ) {
} else {
}
}
// 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 ) {
}
}
}
// Users should not attempt to inspect the internal events object using jQuery.data,
// it is undocumented and subject to change. But does anyone listen? No.
return privateCache.events;
}
// Check for both converted-to-camel and non-converted data property names
// If a data property was specified
if ( getByName ) {
// First Try to find as-is property data
// Test for null|undefined property data
if ( ret == null ) {
// Try to find the camelCased property
}
} else {
}
return ret;
},
return;
}
var thisCache, i, l,
// Reference to internal data cache key
// See jQuery.data for more information
// See jQuery.data for more information
// If there is already no cache entry for this object, there is no
// purpose in continuing
return;
}
if ( name ) {
if ( thisCache ) {
// Support array or space separated string names for data keys
// try the string as a key before any manipulation
} else {
// split the camel cased version by spaces unless a key with the spaces exists
} else {
}
}
}
}
// If there is no data left in the cache, we want to continue
// and let the cache object itself get destroyed
return;
}
}
}
// See jQuery.data for more information
if ( !pvt ) {
// Don't destroy the parent cache unless the internal data object
// had been the only thing left in it
return;
}
}
// Browsers that fail expando deletion also refuse to delete expandos on
// the window, but it will allow it on all other JS objects; other browsers
// don't care
// Ensure that `cache` is not a window object #10080
} else {
}
// We destroyed the cache and need to eliminate the expando on the node to avoid
// false lookups in the cache for entries that no longer exist
if ( isNode ) {
// IE does not allow us to delete expando properties from nodes,
// nor does it have a removeAttribute function on Document nodes;
// we must handle all of these cases
delete elem[ internalKey ];
} else if ( elem.removeAttribute ) {
} else {
elem[ internalKey ] = null;
}
}
},
// For internal use only.
},
// A method for determining if a DOM node can handle the data expando
acceptData: function( elem ) {
if ( match ) {
}
}
return true;
}
});
elem = this[0],
i = 0,
data = null;
// Gets all values
if ( this.length ) {
}
}
}
}
return data;
}
// Sets multiple values
if ( typeof key === "object" ) {
return this.each(function() {
});
}
// Try to fetch any internally stored data first
}
data;
}
this.each(function() {
});
},
removeData: function( key ) {
return this.each(function() {
});
}
});
// If nothing was found internally, try to fetch any
// data from the HTML5 data-* attribute
if ( typeof data === "string" ) {
try {
data === "false" ? false :
data === "null" ? null :
data;
} catch( e ) {}
// Make sure we set the data so it isn't changed later
} else {
}
}
return data;
}
// checks a cache object for emptiness
function isEmptyDataObject( obj ) {
// if the public data object is empty, the private is still empty
continue;
}
if ( name !== "toJSON" ) {
return false;
}
}
return true;
}
if ( defer &&
// Give room for hard-coded callbacks to fire first
setTimeout( function() {
}
}, 0 );
}
}
if ( elem ) {
}
},
if ( force !== true ) {
force = false;
}
if ( elem ) {
if ( count ) {
} else {
}
}
},
var q;
if ( elem ) {
// Speed up dequeue by getting out quickly if this is just a lookup
if ( data ) {
} else {
}
}
return q || [];
}
},
hooks = {};
// If the fx queue is dequeued, always remove the progress sentinel
if ( fn === "inprogress" ) {
}
if ( fn ) {
// Add a progress sentinel to prevent the fx queue from being
// automatically dequeued
if ( type === "fx" ) {
}
}, hooks );
}
}
}
});
var setter = 2;
if ( typeof type !== "string" ) {
type = "fx";
setter--;
}
}
this :
this.each(function() {
}
});
},
return this.each(function() {
});
},
// Based off of the plugin by Clint Helfers, with permission.
clearTimeout( timeout );
};
});
},
clearQueue: function( type ) {
},
// Get a promise resolved when queues of a certain type
// are emptied (fx is the type by default)
if ( typeof type !== "string" ) {
}
elements = this,
count = 1,
tmp;
function resolve() {
if ( !( --count ) ) {
}
}
while( i-- ) {
count++;
}
}
resolve();
}
});
var rclass = /[\n\t\r]/g,
rspace = /\s+/,
rreturn = /\r/g,
rclickable = /^a(?:rea)?$/i,
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
},
removeAttr: function( name ) {
return this.each(function() {
});
},
},
removeProp: function( name ) {
return this.each(function() {
try {
delete this[ name ];
} catch( e ) {}
});
},
var classNames, i, l, elem,
return this.each(function( j ) {
});
}
for ( i = 0, l = this.length; i < l; i++ ) {
elem = this[ i ];
} else {
}
}
}
}
}
}
return this;
},
removeClass: function( value ) {
return this.each(function( j ) {
});
}
for ( i = 0, l = this.length; i < l; i++ ) {
elem = this[ i ];
if ( value ) {
}
} else {
}
}
}
}
return this;
},
return this.each(function( i ) {
});
}
return this.each(function() {
if ( type === "string" ) {
// toggle individual class names
var className,
i = 0,
while ( (className = classNames[ i++ ]) ) {
// check each className given, space seperated list
}
if ( this.className ) {
// store className if set
}
// toggle whole className
this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
}
});
},
i = 0,
l = this.length;
for ( ; i < l; i++ ) {
if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
return true;
}
}
return false;
},
elem = this[0];
if ( elem ) {
return ret;
}
return typeof ret === "string" ?
// handle most common string cases
}
return;
}
return this.each(function( i ) {
if ( this.nodeType !== 1 ) {
return;
}
if ( isFunction ) {
} else {
}
if ( val == null ) {
val = "";
} else if ( typeof val === "number" ) {
val += "";
});
}
// If set returns undefined, fall back to normal setting
}
});
}
});
valHooks: {
option: {
// attributes.value is undefined in Blackberry 4.7 but
// uses .value. See #6932
}
},
select: {
values = [],
// Nothing was selected
if ( index < 0 ) {
return null;
}
// Loop through all the selected options
for ( ; i < max; i++ ) {
// Don't return options that are disabled or in a disabled optgroup
if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
// Get the specific value for the option
// We don't need an array for one selects
if ( one ) {
return value;
}
// Multi-Selects return an array
}
}
// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
}
return values;
},
});
}
return values;
}
}
},
attrFn: {
val: true,
css: true,
html: true,
text: true,
data: true,
width: true,
height: true,
offset: true
},
return;
}
}
// Fallback to prop when attributes are not supported
}
// All attributes are lowercase
// Grab necessary hook if one is defined
if ( notxml ) {
}
if ( value === null ) {
return;
} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
return ret;
} else {
return value;
}
return ret;
} else {
// Non-existent attributes return null, we normalize to undefined
return ret === null ?
ret;
}
},
i = 0;
for ( ; i < l; i++ ) {
if ( name ) {
// See #9699 for explanation of this approach (setting first, then removal)
// Do not do this for boolean attributes (see #10870)
if ( !isBool ) {
}
// Set corresponding property to false for boolean attributes
}
}
}
}
},
attrHooks: {
type: {
// We can't allow the type property to be changed (since it causes problems in IE)
// Setting the type on a radio button after the value resets the value in IE6-9
// Reset value to it's default in case type is set after value
// This is for element creation
if ( val ) {
}
return value;
}
}
},
// Use the value property for back compat
// Use the nodeHook for button elements in IE6/7 (#1954)
value: {
}
null;
},
}
// Does not return so that setAttribute is also used
}
}
},
propFix: {
tabindex: "tabIndex",
readonly: "readOnly",
"for": "htmlFor",
"class": "className",
maxlength: "maxLength",
cellspacing: "cellSpacing",
cellpadding: "cellPadding",
rowspan: "rowSpan",
colspan: "colSpan",
usemap: "useMap",
frameborder: "frameBorder",
contenteditable: "contentEditable"
},
return;
}
if ( notxml ) {
// Fix name and attach hooks
}
return ret;
} else {
}
} else {
return ret;
} else {
}
}
},
propHooks: {
tabIndex: {
// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
0 :
}
}
}
});
// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
// Hook for boolean attributes
boolHook = {
// Align boolean attributes with corresponding properties
// Fall back to attribute presence where some booleans are not supported
var attrNode,
return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
name.toLowerCase() :
},
var propName;
if ( value === false ) {
// Remove boolean attributes when set to false
} else {
// value is true since we know at this point it's type boolean and not false
// Set boolean attributes to the same name and set the DOM property
// Only set the IDL specifically if it already exists on the element
}
}
return name;
}
};
// IE6/7 do not support getting/setting some attributes with get/setAttribute
if ( !getSetAttribute ) {
fixSpecified = {
name: true,
id: true,
coords: true
};
// Use this for any attribute in IE6/7
// This fixes almost every IE6/7 issue
var ret;
},
// Set the existing or create a new attribute node
if ( !ret ) {
}
}
};
// Apply the nodeHook to tabindex
// Set width and height to auto instead of 0 on empty string( Bug #8150 )
// This is for removals
if ( value === "" ) {
return value;
}
}
});
});
// Set contenteditable to false on removals(#10429)
// Setting to empty string throws an error as an invalid value
if ( value === "" ) {
value = "false";
}
}
};
}
// Some attributes require a special call on IE
}
});
});
}
// Return undefined in the case of empty string
// Normalize to lowercase since IE uppercases css property names
},
}
};
}
// Safari mis-reports the default selected property of an option
// Accessing the parent's selectedIndex property fixes it
if ( parent ) {
// Make sure that it also works with optgroups, see #5701
if ( parent.parentNode ) {
}
}
return null;
}
});
}
// IE6/7 call enctype encoding
}
// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
}
};
});
}
}
}
});
});
rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
rhoverHack = /(?:^|\s)hover(\.\S+)?\b/,
rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
quickParse = function( selector ) {
if ( quick ) {
// 0 1 2 3
// [ _, tag, id, class ]
}
return quick;
},
return (
);
},
return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
};
/*
* Helper functions for managing events -- not part of the public interface.
* Props to Dean Edwards' addEvent library for many of the ideas.
*/
if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
return;
}
// Caller can pass in an object of custom data in lieu of the handler
}
}
// Init the element's event structure and main handler, if this is the first
if ( !events ) {
}
if ( !eventHandle ) {
// Discard the second event of a jQuery.event.trigger() and
// when an event is called after a page has unloaded
};
// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
}
// Handle multiple events separated by a space
// jQuery(...).bind("mouseover mouseout", fn);
// If event changes its type, use the special event handlers for the changed type
// If selector defined, determine special event api type, otherwise given type
// Update special based on newly reset type
// handleObj is passed to all event handlers
}, handleObjIn );
// Init the event handler queue if we're the first
if ( !handlers ) {
// Only use addEventListener/attachEvent if the special events handler returns false
// Bind the global event handler to the element
if ( elem.addEventListener ) {
} else if ( elem.attachEvent ) {
}
}
}
}
}
// Add to the element's handler list, delegates in front
if ( selector ) {
} else {
}
// Keep track of which events have ever been used, for event optimization
}
// Nullify elem to prevent memory leaks in IE
elem = null;
},
global: {},
// Detach an event or set of events from an element
return;
}
// Once for each type.namespace in types; type may be omitted
// Unbind all events (on this namespace, if provided) for the element
if ( !type ) {
}
continue;
}
namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
// Remove matching events
}
}
}
}
// Remove generic event handler if we removed something and no more handlers exist
// (avoids potential for endless recursion during removal of special event handlers)
}
}
}
// Remove the expando if it's no longer used
if ( handle ) {
}
// removeData also checks for emptiness and clears the expando if empty
// so use it instead of delete
}
},
// Events that are safe to short-circuit if no handlers are attached.
// Native DOM events should not be added, they may have inline handlers.
customEvent: {
"getData": true,
"setData": true,
"changeData": true
},
// Don't do events on text and comment nodes
return;
}
// Event object or event type
namespaces = [],
return;
}
// Exclusive events trigger only for the exact event (no namespaces)
exclusive = true;
}
// Namespaced trigger; create a regexp to match event type in handle()
namespaces.sort();
}
// No jQuery handlers for this event type, and it can't have inline handlers
return;
}
// Caller can pass in an Event, Object, or just an event type string
// jQuery.Event object
// Object literal
// Just the event type (string)
event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
// Handle a global trigger
if ( !elem ) {
// TODO: Stop taunting the data cache; remove global events and always attach to document
for ( i in cache ) {
}
}
return;
}
// Clean up the event in case it is being reused
}
// Clone any incoming data and prepend the event, creating the handler arg list
// Allow special events to draw outside the lines
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)
old = null;
}
// Only add window if we got to document (e.g., not plain obj or detached DOM)
}
}
// Fire handlers on the event path
if ( handle ) {
}
// Note that this is a bare JS function and not a jQuery handler
}
}
// If nobody prevented the default action, do it now
// 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 ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
// Don't re-trigger an onFOO event when we call its FOO() method
if ( old ) {
}
// Prevent re-triggering of the same event, since we already bubbled it above
if ( old ) {
}
}
}
}
},
// Make a writable jQuery.Event from the native event object
handlerQueue = [],
// Use the fix-ed jQuery.Event rather than the (read-only) native event
event.delegateTarget = this;
// Call the preDispatch hook for the mapped type, and let it bail if desired
return;
}
// Determine handlers that should run if there are delegated events
// Avoid non-left-click bubbling in Firefox (#3861)
// Pregenerate a single jQuery object for reuse with .is()
// Don't process events on disabled elements (#6911, #8165)
selMatch = {};
matches = [];
for ( i = 0; i < delegateCount; i++ ) {
);
}
}
}
}
}
}
}
// Add the remaining (directly-bound) handlers
}
// Run delegates first; they may want to stop propagation beneath us
matched = handlerQueue[ i ];
// Triggered event must either 1) be non-exclusive and have no namespace, or
// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
if ( ret === false ) {
}
}
}
}
}
// Call the postDispatch hook for the mapped type
if ( special.postDispatch ) {
}
},
// Includes some event props shared by KeyEvent and MouseEvent
// *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks: {},
keyHooks: {
// Add which for key events
}
return event;
}
},
mouseHooks: {
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
// Calculate pageX/Y if missing and clientX/Y available
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
}
// Add which for click: 1 === left; 2 === middle; 3 === right
// Note: button is not normalized, so don't use it
}
return event;
}
},
return event;
}
// Create a writable copy of the event object and normalize some properties
var i, prop,
}
// Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
}
// Target should not be a text node (#504, Safari)
}
}
},
special: {
ready: {
// Make sure the ready event is setup
},
load: {
// Prevent triggered image.load events from bubbling to window.load
noBubble: true
},
focus: {
delegateType: "focusin"
},
blur: {
delegateType: "focusout"
},
beforeunload: {
// We only want to do this special case on windows
this.onbeforeunload = eventHandle;
}
},
if ( this.onbeforeunload === eventHandle ) {
this.onbeforeunload = null;
}
}
}
},
// Piggyback on a donor event to simulate a different one.
// Fake originalEvent to avoid donor's stopPropagation, but if the
// simulated event prevents default then we do the same on the donor.
isSimulated: true,
originalEvent: {}
}
);
if ( bubble ) {
} else {
}
if ( e.isDefaultPrevented() ) {
}
}
};
// Some plugins are using, but it's undocumented/deprecated and will be removed.
// The 1.7 special event interface should provide all the hooks needed now.
if ( elem.removeEventListener ) {
}
} :
if ( elem.detachEvent ) {
}
};
// Allow instantiation without the 'new' keyword
}
// Event object
this.originalEvent = src;
// Events bubbling up the document may have been marked as prevented
// by a handler lower down the tree; reflect the correct value.
// Event type
} else {
}
// Put explicitly provided properties onto the event object
if ( props ) {
}
// Create a timestamp if incoming event doesn't have one
// Mark it as fixed
};
function returnFalse() {
return false;
}
function returnTrue() {
return true;
}
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
preventDefault: function() {
this.isDefaultPrevented = returnTrue;
var e = this.originalEvent;
if ( !e ) {
return;
}
// if preventDefault exists run it on the original event
if ( e.preventDefault ) {
e.preventDefault();
// otherwise set the returnValue property of the original event to false (IE)
} else {
e.returnValue = false;
}
},
stopPropagation: function() {
this.isPropagationStopped = returnTrue;
var e = this.originalEvent;
if ( !e ) {
return;
}
// if stopPropagation exists run it on the original event
if ( e.stopPropagation ) {
e.stopPropagation();
}
// otherwise set the cancelBubble property of the original event to true (IE)
e.cancelBubble = true;
},
stopImmediatePropagation: function() {
this.stopPropagation();
},
};
// Create mouseenter/leave events using mouseover/out and event-time checks
mouseenter: "mouseover",
mouseleave: "mouseout"
var target = this,
ret;
}
return ret;
}
};
});
// IE submit delegation
setup: function() {
// Only need this for delegated form submit events
return false;
}
// Lazy-add a submit handler when a descendant form may potentially be submitted
// Node name check avoids a VML-related crash in IE (#9807)
form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
event._submit_bubble = true;
});
form._submit_attached = 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._submit_bubble ) {
delete event._submit_bubble;
}
}
},
teardown: function() {
// Only need this for delegated form submit events
return false;
}
// Remove delegated handlers; cleanData eventually reaps submit handlers attached above
}
};
}
setup: function() {
// after a propertychange. Eat the blur-change in special.change.handle.
this._just_changed = true;
}
});
this._just_changed = false;
}
});
}
return false;
}
// Delegated event; lazy-add a change handler on descendant inputs
}
});
elem._change_attached = true;
}
});
},
if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
}
},
teardown: function() {
}
};
}
// Create "bubbling" focus and blur events
var attaches = 0,
};
setup: function() {
if ( attaches++ === 0 ) {
}
},
teardown: function() {
if ( --attaches === 0 ) {
}
}
};
});
}
if ( typeof types === "object" ) {
// ( types-Object, selector, data )
// ( types-Object, data )
}
}
return this;
}
// ( types, fn )
} else if ( fn == null ) {
if ( typeof selector === "string" ) {
// ( types, selector, fn )
} else {
// ( types, data, fn )
}
}
if ( fn === false ) {
fn = returnFalse;
} else if ( !fn ) {
return this;
}
if ( one === 1 ) {
// Can use an empty set, since event contains the info
};
// Use same guid so caller can remove using origFn
}
return this.each( function() {
});
},
},
// ( event ) dispatched jQuery.Event
);
return this;
}
if ( typeof types === "object" ) {
// ( types-object [, selector] )
}
return this;
}
// ( types [, fn] )
}
if ( fn === false ) {
fn = returnFalse;
}
return this.each(function() {
});
},
},
},
return this;
},
return this;
},
},
// ( namespace ) or ( selector, types [, fn] )
},
return this.each(function() {
});
},
if ( this[0] ) {
}
},
// Save reference to arguments for access in closure
i = 0,
// Figure out which function to execute
// Make sure that clicks stop
// and execute the function
};
// link all the functions, so any of them can unbind this click handler
}
},
}
});
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
// Handle event binding
if ( fn == null ) {
data = null;
}
};
}
}
}
});
/*!
* Sizzle CSS Selector Engine
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
* More information: http://sizzlejs.com/
*/
(function(){
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
expando = "sizcache" + (Math.random() + '').replace('.', ''),
done = 0,
toString = Object.prototype.toString,
hasDuplicate = false,
baseHasDuplicate = true,
rBackslash = /\\/g,
rReturn = /\r\n/g,
rNonWord = /\W/;
// Here we check if the JavaScript engine is using some sort of
// optimization where it does not always call our comparision
// function. If that is the case, discard the hasDuplicate value.
// Thus far that includes Google Chrome.
[0, 0].sort(function() {
baseHasDuplicate = false;
return 0;
});
var Sizzle = function( selector, context, results, seed ) {
results = results || [];
context = context || document;
var origContext = context;
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
return [];
}
if ( !selector || typeof selector !== "string" ) {
return results;
}
var m, set, checkSet, extra, ret, cur, pop, i,
prune = true,
contextXML = Sizzle.isXML( context ),
parts = [],
soFar = selector;
// Reset the position of the chunker regexp (start from head)
do {
chunker.exec( "" );
m = chunker.exec( soFar );
if ( m ) {
soFar = m[3];
parts.push( m[1] );
if ( m[2] ) {
extra = m[3];
break;
}
}
} while ( m );
if ( parts.length > 1 && origPOS.exec( selector ) ) {
if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
set = posProcess( parts[0] + parts[1], context, seed );
} else {
set = Expr.relative[ parts[0] ] ?
[ context ] :
Sizzle( parts.shift(), context );
while ( parts.length ) {
selector = parts.shift();
if ( Expr.relative[ selector ] ) {
selector += parts.shift();
}
set = posProcess( selector, set, seed );
}
}
} else {
// Take a shortcut and set the context if the root selector is an ID
}
if ( context ) {
Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
} else {
prune = false;
}
cur = "";
} else {
}
if ( pop == null ) {
}
}
} else {
}
}
if ( !checkSet ) {
}
if ( !checkSet ) {
}
if ( !prune ) {
for ( i = 0; checkSet[i] != null; i++ ) {
if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
}
}
} else {
for ( i = 0; checkSet[i] != null; i++ ) {
}
}
}
} else {
}
if ( extra ) {
}
return results;
};
if ( sortOrder ) {
if ( hasDuplicate ) {
}
}
}
}
return results;
};
};
};
if ( !expr ) {
return [];
}
if ( set != null ) {
break;
}
}
}
}
if ( !set ) {
[];
}
};
i, pass,
result = [],
anyFound = false;
continue;
}
result = [];
}
if ( !match ) {
} else if ( match === true ) {
continue;
}
}
if ( match ) {
if ( item ) {
if ( pass ) {
anyFound = true;
} else {
curLoop[i] = false;
}
} else if ( pass ) {
anyFound = true;
}
}
}
}
if ( !inplace ) {
}
if ( !anyFound ) {
return [];
}
break;
}
}
}
// Improper expression
if ( anyFound == null ) {
} else {
break;
}
}
}
return curLoop;
};
};
/**
* Utility function for retreiving the text value of an array of DOM nodes
* @param {Array|Element} elem
*/
var i, node,
ret = "";
if ( nodeType ) {
// Use textContent || innerText for elements
return elem.textContent;
// Replace IE's carriage returns
} else {
// Traverse it's children
}
}
}
} else {
// If no nodeType, this is expected to be an array
// Do not traverse comment nodes
}
}
}
return ret;
};
match: {
ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
},
leftMatch: {},
attrMap: {
"class": "className",
"for": "htmlFor"
},
attrHandle: {
href: function( elem ) {
return elem.getAttribute( "href" );
},
type: function( elem ) {
return elem.getAttribute( "type" );
}
},
relative: {
"+": function(checkSet, part){
var isPartStr = typeof part === "string",
isTag = isPartStr && !rNonWord.test( part ),
isPartStrNotTag = isPartStr && !isTag;
if ( isTag ) {
part = part.toLowerCase();
}
for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
if ( (elem = checkSet[i]) ) {
while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
elem || false :
elem === part;
}
}
if ( isPartStrNotTag ) {
Sizzle.filter( part, checkSet, true );
}
},
">": function( checkSet, part ) {
var elem,
isPartStr = typeof part === "string",
i = 0,
l = checkSet.length;
if ( isPartStr && !rNonWord.test( part ) ) {
part = part.toLowerCase();
for ( ; i < l; i++ ) {
elem = checkSet[i];
if ( elem ) {
var parent = elem.parentNode;
checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
}
}
} else {
for ( ; i < l; i++ ) {
elem = checkSet[i];
if ( elem ) {
checkSet[i] = isPartStr ?
elem.parentNode :
elem.parentNode === part;
}
}
if ( isPartStr ) {
Sizzle.filter( part, checkSet, true );
}
}
},
"": function(checkSet, part, isXML){
var nodeCheck,
doneName = done++,
checkFn = dirCheck;
if ( typeof part === "string" && !rNonWord.test( part ) ) {
part = part.toLowerCase();
nodeCheck = part;
checkFn = dirNodeCheck;
}
checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
},
"~": function( checkSet, part, isXML ) {
var nodeCheck,
doneName = done++,
checkFn = dirCheck;
if ( typeof part === "string" && !rNonWord.test( part ) ) {
part = part.toLowerCase();
nodeCheck = part;
checkFn = dirNodeCheck;
}
checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
}
},
find: {
ID: function( match, context, isXML ) {
if ( typeof context.getElementById !== "undefined" && !isXML ) {
var m = context.getElementById(match[1]);
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
return m && m.parentNode ? [m] : [];
}
},
NAME: function( match, context ) {
if ( typeof context.getElementsByName !== "undefined" ) {
var ret = [],
results = context.getElementsByName( match[1] );
for ( var i = 0, l = results.length; i < l; i++ ) {
if ( results[i].getAttribute("name") === match[1] ) {
ret.push( results[i] );
}
}
return ret.length === 0 ? null : ret;
}
},
TAG: function( match, context ) {
if ( typeof context.getElementsByTagName !== "undefined" ) {
return context.getElementsByTagName( match[1] );
}
}
},
preFilter: {
CLASS: function( match, curLoop, inplace, result, not, isXML ) {
match = " " + match[1].replace( rBackslash, "" ) + " ";
if ( isXML ) {
return match;
}
for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
if ( elem ) {
if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
if ( !inplace ) {
result.push( elem );
}
} else if ( inplace ) {
curLoop[i] = false;
}
}
}
return false;
},
ID: function( match ) {
return match[1].replace( rBackslash, "" );
},
TAG: function( match, curLoop ) {
return match[1].replace( rBackslash, "" ).toLowerCase();
},
CHILD: function( match ) {
if ( match[1] === "nth" ) {
if ( !match[2] ) {
Sizzle.error( match[0] );
}
match[2] = match[2].replace(/^\+|\s*/g, '');
var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
!/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
// calculate the numbers (first)n+(last) including if they are negative
match[2] = (test[1] + (test[2] || 1)) - 0;
match[3] = test[3] - 0;
}
else if ( match[2] ) {
Sizzle.error( match[0] );
}
// TODO: Move to normal caching system
match[0] = done++;
return match;
},
ATTR: function( match, curLoop, inplace, result, not, isXML ) {
var name = match[1] = match[1].replace( rBackslash, "" );
if ( !isXML && Expr.attrMap[name] ) {
match[1] = Expr.attrMap[name];
}
// Handle if an un-quoted value was used
match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
if ( match[2] === "~=" ) {
match[4] = " " + match[4] + " ";
}
return match;
},
PSEUDO: function( match, curLoop, inplace, result, not ) {
if ( match[1] === "not" ) {
} else {
if ( !inplace ) {
}
return false;
}
return true;
}
return match;
},
return match;
}
},
filters: {
},
},
},
// Accessing this property makes selected-by-default
// options in Safari work properly
if ( elem.parentNode ) {
}
},
return !!elem.firstChild;
},
return !elem.firstChild;
},
},
},
// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
// use getAttribute instead to test this case
return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
},
},
},
},
},
},
},
},
},
},
}
},
setFilters: {
return i === 0;
},
},
return i % 2 === 0;
},
return i % 2 === 1;
},
},
},
},
}
},
filter: {
if ( filter ) {
} else if ( name === "contains" ) {
} else if ( name === "not" ) {
return false;
}
}
return true;
} else {
}
},
switch ( type ) {
case "only":
case "first":
return false;
}
}
if ( type === "first" ) {
return true;
}
/* falls through */
case "last":
return false;
}
}
return true;
case "nth":
return true;
}
count = 0;
}
}
}
if ( first === 0 ) {
return diff === 0;
} else {
}
}
},
},
return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
},
},
return result == null ?
type === "!=" :
result != null :
type === "=" ?
type === "*=" ?
type === "~=" ?
!check ?
type === "!=" ?
type === "^=" ?
type === "$=" ?
type === "|=" ?
false;
},
if ( filter ) {
}
}
}
};
};
Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
}
// Expose origPOS
if ( results ) {
return results;
}
return array;
};
// Perform a simple check to determine if the browser is capable of
// converting a NodeList to an array using builtin methods.
// Also verifies that the returned array holds DOM nodes
// (which is not the case in the Blackberry browser)
try {
// Provide a fallback method if it does not work
} catch( e ) {
var i = 0,
} else {
}
} else {
for ( ; array[i]; i++ ) {
}
}
}
return ret;
};
}
var sortOrder, siblingCheck;
sortOrder = function( a, b ) {
if ( a === b ) {
hasDuplicate = true;
return 0;
}
if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
}
};
} else {
sortOrder = function( a, b ) {
// The nodes are identical, we can exit early
if ( a === b ) {
hasDuplicate = true;
return 0;
// Fallback to using sourceIndex (in IE) if it's available on both nodes
} else if ( a.sourceIndex && b.sourceIndex ) {
return a.sourceIndex - b.sourceIndex;
}
ap = [],
bp = [],
aup = a.parentNode,
bup = b.parentNode,
// If the nodes are siblings (or identical) we can do a quick check
return siblingCheck( a, b );
// If no parents were found then the nodes are disconnected
} else if ( !aup ) {
return -1;
} else if ( !bup ) {
return 1;
}
// Otherwise they're somewhere else in the tree so we need
// to build up a full list of the parentNodes for comparison
while ( cur ) {
}
while ( cur ) {
}
// Start walking down the tree looking for a discrepancy
}
}
// We ended someplace up the tree so do a sibling check
return i === al ?
};
siblingCheck = function( a, b, ret ) {
if ( a === b ) {
return ret;
}
var cur = a.nextSibling;
while ( cur ) {
if ( cur === b ) {
return -1;
}
}
return 1;
};
}
// Check to see if the browser returns elements by name when
// querying by getElementById (and provide a workaround)
(function(){
// We're going to inject a fake input element with a specified name
// Inject it into the root element, check its status, and remove it quickly
// The workaround has to do additional checks after a getElementById
// Which slows things down for other browsers (hence the branching)
return m ?
m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
[m] :
[];
}
};
};
}
// release memory in IE
})();
(function(){
// Check to see if the browser returns only elements
// when doing getElementsByTagName("*")
// Create a fake element
// Make sure no comments are found
// Filter out possible comments
var tmp = [];
for ( var i = 0; results[i]; i++ ) {
}
}
}
return results;
};
}
// Check to see if an attribute returns normalized href attributes
};
}
// release memory in IE
div = null;
})();
if ( document.querySelectorAll ) {
(function(){
id = "__sizzle__";
// Safari can't handle uppercase or unicode characters when
// in quirks mode.
return;
}
// Only use querySelectorAll on non-XML documents
// (ID selectors don't work in non-HTML documents)
// See if we find a selector to speed up
// Speed-up: Sizzle("TAG")
if ( match[1] ) {
// Speed-up: Sizzle(".CLASS")
}
}
// Speed-up: Sizzle("body")
// The body element only exists once, optimize finding it
// Speed-up: Sizzle("#ID")
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
// Handle the case where IE and Opera return items
// by name instead of ID
}
} else {
}
}
try {
} catch(qsaError) {}
// qSA works strangely on Element-rooted queries
// We can work around this by specifying an extra ID on the root
// and working up from there (Thanks to Andrew Dupont for the technique)
// IE 8 doesn't work on object elements
var oldContext = context,
if ( !old ) {
} else {
}
if ( relativeHierarchySelector && hasParent ) {
context = context.parentNode;
}
try {
if ( !relativeHierarchySelector || hasParent ) {
return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
}
} catch(pseudoError) {
} finally {
if ( !old ) {
oldContext.removeAttribute( "id" );
}
}
}
}
return oldSizzle(query, context, extra, seed);
};
for ( var prop in oldSizzle ) {
Sizzle[ prop ] = oldSizzle[ prop ];
}
// release memory in IE
div = null;
})();
}
(function(){
var html = document.documentElement,
matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
if ( matches ) {
// on a disconnected node (IE 9 fails this)
pseudoWorks = false;
try {
// This should fail with an exception
// Gecko does not error, returns false instead
} catch( pseudoError ) {
pseudoWorks = true;
}
// Make sure that attribute selectors are quoted
if ( !Sizzle.isXML( node ) ) {
try {
if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
var ret = matches.call( node, expr );
if ( ret || !disconnectedMatch ||
// As well, disconnected nodes are said to be in a document
// fragment in IE 9, so check for that
return ret;
}
}
} catch(e) {}
}
};
}
})();
(function(){
// Opera can't find a second classname (in 9.6)
// Also, make sure that getElementsByClassName actually exists
return;
}
// Safari caches class attributes, doesn't catch changes (in 3.2)
return;
}
}
};
// release memory in IE
div = null;
})();
if ( elem ) {
var match = false;
while ( elem ) {
break;
}
}
break;
}
}
}
}
}
if ( elem ) {
var match = false;
while ( elem ) {
break;
}
if ( !isXML ) {
}
if ( typeof cur !== "string" ) {
match = true;
break;
}
break;
}
}
}
}
}
}
};
return !!(a.compareDocumentPosition(b) & 16);
};
} else {
return false;
};
}
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
};
var match,
tmpSet = [],
later = "",
// Position selectors must be done after the filter
// And so must :not(positional) so we move all PSEUDOs to the end
}
}
};
// EXPOSE
// Override sizzle attribute retrieval
})();
// Note: This RegExp should be improved, or likely pulled from Sizzle
rmultiselector = /,/,
isSimple = /^.[^:#\[\.,]*$/,
// methods guaranteed to produce a unique set when starting from a unique set
guaranteedUnique = {
children: true,
contents: true,
next: true,
prev: true
};
var self = this,
i, l;
if ( typeof selector !== "string" ) {
return true;
}
}
});
}
length, n, r;
for ( i = 0, l = this.length; i < l; i++ ) {
if ( i > 0 ) {
// Make sure that the results are unique
for ( r = 0; r < length; r++ ) {
break;
}
}
}
}
}
return ret;
},
return this.filter(function() {
return true;
}
}
});
},
},
},
return !!selector && (
typeof selector === "string" ?
// If this is a positional selector, check membership in the returned set
// so $("p:first").is("p:last") won't return true for a doc with two "p".
},
// Array (deprecated as of jQuery 1.7)
var level = 1;
}
}
level++;
}
return ret;
}
// String
0;
for ( i = 0, l = this.length; i < l; i++ ) {
cur = this[i];
while ( cur ) {
break;
} else {
break;
}
}
}
}
},
// Determine the position of an element within
// the matched set of elements
// No argument, return index in parent
if ( !elem ) {
}
// index in selector
if ( typeof elem === "string" ) {
}
// Locate the position of the desired element
// If it receives a jQuery object, the first element is used
},
all :
},
andSelf: function() {
return this.add( this.prevObject );
}
});
// A painfully simple check to see if an element is disconnected
// from a document (should be improved, where feasible).
function isDisconnected( node ) {
}
},
},
},
},
},
},
},
},
},
},
},
}
}
}
}
};
});
if ( not ) {
}
},
var matched = [],
while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
}
}
return matched;
},
var num = 0;
break;
}
}
return cur;
},
var r = [];
for ( ; n; n = n.nextSibling ) {
r.push( n );
}
}
return r;
}
});
// Implement the identical functionality for filter and not
// Can't pass null or undefined to indexOf in Firefox 4
// Set to 0 to skip string check
});
});
} else if ( typeof qualifier === "string" ) {
});
} else {
}
}
});
}
function createSafeFragment( document ) {
if ( safeFrag.createElement ) {
);
}
}
return safeFrag;
}
var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
rleadingWhitespace = /^\s+/,
rtagName = /<([\w:]+)/,
rhtml = /<|&#?\w+;/,
// checked="checked" or checked
rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
wrapMap = {
},
// IE can't serialize <link> and <script> tags normally
}
},
return this.each(function(i) {
});
}
if ( this[0] ) {
// The elements to wrap the target around
if ( this[0].parentNode ) {
}
var elem = this;
}
return elem;
}).append( this );
}
return this;
},
return this.each(function(i) {
});
}
return this.each(function() {
} else {
}
});
},
return this.each(function(i) {
});
},
unwrap: function() {
}
}).end();
},
append: function() {
if ( this.nodeType === 1 ) {
this.appendChild( elem );
}
});
},
prepend: function() {
if ( this.nodeType === 1 ) {
}
});
},
before: function() {
});
}
},
after: function() {
});
return set;
}
},
// keepData is for internal use only--do not document
}
if ( elem.parentNode ) {
}
}
}
return this;
},
empty: function() {
// Remove element nodes and prevent memory leaks
}
// Remove any remaining nodes
while ( elem.firstChild ) {
}
}
return this;
},
return this.map( function () {
});
},
var elem = this[0] || {},
i = 0,
l = this.length;
null;
}
try {
for (; i < l; i++ ) {
// Remove element nodes and prevent memory leaks
elem = this[i] || {};
}
}
elem = 0;
// If using innerHTML throws an exception, use the fallback method
} catch(e) {}
}
if ( elem ) {
}
},
replaceWith: function( value ) {
// Make sure that the elements are removed from the DOM before they are inserted
// this can help fix replacing a parent with child elements
return this.each(function(i) {
});
}
if ( typeof value !== "string" ) {
}
return this.each(function() {
var next = this.nextSibling,
parent = this.parentNode;
if ( next ) {
} else {
}
});
} else {
return this.length ?
this;
}
},
},
scripts = [];
// We can't cloneNode fragments that contain checked, in WebKit
if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
return this.each(function() {
});
}
return this.each(function(i) {
});
}
if ( this[0] ) {
// If we're in a fragment, just use that instead of building a new one
if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
} else {
}
} else {
}
if ( first ) {
table ?
this[i],
// Make sure that we do not leak memory by inadvertently discarding
// the original fragment (which might have attached data) instead of
// using it; in addition, use the original fragment object for the last
// item instead of first because it can end up being emptied incorrectly
// in certain situations (Bug #8070).
// Fragments from the fragment cache must always be cloned and never used
// in place.
);
}
}
type: "GET",
global: false,
async: false,
dataType: "script"
});
} else {
jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
}
if ( elem.parentNode ) {
}
});
}
}
return this;
}
});
elem;
}
return;
}
var type, i, l,
if ( events ) {
}
}
}
// make the cloned public data object a copy from the original
}
}
var nodeName;
// We do not need to do anything for non-Elements
return;
}
// clearAttributes removes the attributes, which we don't want,
// but also removes the attachEvent events, which we *do* want
if ( dest.clearAttributes ) {
}
// mergeAttributes, in contrast, only merges back on the
// original attributes, not the events
if ( dest.mergeAttributes ) {
}
// IE6-8 fail to clone children inside object elements that use
// the proprietary classid attribute value (rather than the type
// attribute) to identify the type of content to display
if ( nodeName === "object" ) {
// 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
}
// IE6-7 get confused and end up setting the value of a cloned
}
// IE6-8 fails to return the selected option to the default selected
// state when cloning options
} else if ( nodeName === "option" ) {
// IE6-8 fails to set the defaultValue to the correct value when
// cloning other types of input fields
// IE blanks contents when cloning scripts
}
// Event data gets referenced instead of copied if the expando
// gets copied too
// be reattached when the newly cloned events are first activated
}
// nodes may contain either an explicit document object,
// a jQuery collection or context object.
// If nodes[0] contains a valid object to assign to doc
}
// Ensure that an attr object doesn't incorrectly stand in as a document object
// Chrome and Firefox seem to allow this to occur and will throw exception
// Fixes #8950
if ( !doc.createDocumentFragment ) {
}
// Only cache "small" (1/2 KB) HTML strings that are associated with the main document
// Cloning options loses the selected state, so don't cache them
// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
// Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
cacheable = true;
}
}
if ( !fragment ) {
}
if ( cacheable ) {
}
};
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
var ret = [],
return this;
} else {
}
}
};
});
} else {
return [];
}
}
// Used in clean, fixes the defaultChecked property
function fixDefaultChecked( elem ) {
}
}
// Finds all inputs and passes them to fixDefaultChecked
function findInputs( elem ) {
if ( nodeName === "input" ) {
// Skip scripts, get other children
}
}
// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js
function shimCloneNode( elem ) {
return div.firstChild;
}
var srcElements,
i,
// IE<=8 does not properly clone detached, unknown element nodes
clone = jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ?
shimCloneNode( elem );
// IE copies events bound via attachEvent when using cloneNode.
// Calling detachEvent on the clone will also remove the events
// from the original. In order to get around this, we use some
// proprietary methods to clear the events. Thanks to MooTools
// guys for this hotness.
// Using Sizzle here is crazy slow, so we use getElementsByTagName instead
// Weird iteration because IE will replace the length property
// with an element if you are cloning the body and one of the
// elements on the page has a name or id of "length"
for ( i = 0; srcElements[i]; ++i ) {
// Ensure that the destination node is not null; Fixes #9587
if ( destElements[i] ) {
}
}
}
// Copy the events from the original to the clone
if ( dataAndEvents ) {
if ( deepDataAndEvents ) {
for ( i = 0; srcElements[i]; ++i ) {
}
}
}
srcElements = destElements = null;
// Return the cloned set
return clone;
},
var checkScriptType, script, j,
ret = [];
// !context.createElement fails in IE with an error but returns typeof 'object'
}
if ( typeof elem === "number" ) {
elem += "";
}
if ( !elem ) {
continue;
}
// Convert html string into DOM nodes
if ( typeof elem === "string" ) {
} else {
// Fix "XHTML"-style tags in all browsers
// Trim whitespace, otherwise indexOf won't work as expected
// Append wrapper element to unknown element safe doc fragment
// Use the fragment we've already created for this document
} else {
// Use a fragment created with the owner document
}
// Go to html and back, then peel off extra wrappers
// Move to the right depth
while ( depth-- ) {
}
// Remove IE's autoinserted <tbody> from table fragments
// String was a <table>, *may* have spurious <tbody>
// String was a bare <thead> or <tfoot>
[];
}
}
}
// IE completely kills leading whitespace when innerHTML is used
}
// Clear elements from DocumentFragment (safeFragment or otherwise)
// to avoid hoarding elements. Fixes #11356
if ( div ) {
// Guard against -1 index exceptions in FF3.6
}
}
}
}
}
// Resets defaultChecked for any radios and checkboxes
// about to be appended to the DOM in IE 6/7 (#8060)
var len;
for ( j = 0; j < len; j++ ) {
findInputs( elem[j] );
}
} else {
findInputs( elem );
}
}
} else {
}
}
if ( fragment ) {
checkScriptType = function( elem ) {
};
for ( i = 0; ret[i]; i++ ) {
if ( scripts && jQuery.nodeName( script, "script" ) && (!script.type || rscriptType.test( script.type )) ) {
} else {
}
}
}
}
return ret;
},
continue;
}
if ( id ) {
// This is a shortcut to avoid jQuery.event.remove's overhead
} else {
}
}
// Null the DOM reference to avoid IE6/7/8 leak (#7054)
}
}
if ( deleteExpando ) {
} else if ( elem.removeAttribute ) {
}
}
}
}
});
// fixed for IE9, see #8346
rnum = /^[\-+]?(?:\d*\.)?\d+$/i,
// order is important!
};
// Add in style property hooks for overriding the default
// behavior of getting and setting a style property
cssHooks: {
opacity: {
if ( computed ) {
// We should always get a number back from opacity
} else {
}
}
}
},
// Exclude the following css properties to add px
cssNumber: {
"fillOpacity": true,
"fontWeight": true,
"lineHeight": true,
"opacity": 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
},
// Get and set the style property on a DOM Node
// Don't set styles on text and comment nodes
return;
}
// Make sure that we're working with the right name
// Check if we're setting a value
// convert relative number strings (+= or -=) to relative numbers. #7345
// Fixes bug #9237
type = "number";
}
// Make sure that NaN and null values aren't set. See: #7116
return;
}
// If a number was passed in, add 'px' to the (except for certain CSS properties)
value += "px";
}
// If a hook was provided, use that value, otherwise just set the specified value
// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
// Fixes bug #5509
try {
} catch(e) {}
}
} else {
// If a hook was provided get the non-computed value from there
return ret;
}
// Otherwise just get the value from the style object
}
},
// Make sure that we're working with the right name
// cssFloat needs a special treatment
if ( name === "cssFloat" ) {
name = "float";
}
// If a hook was provided get the computed value from there
return ret;
// Otherwise, if a way to get the computed value exists, use that
} else if ( curCSS ) {
}
},
var old = {},
// Remember the old values, and insert the new ones
}
// Revert the old values
}
return ret;
}
});
// DEPRECATED in 1.3, Use jQuery.css() instead
}
}
// A tribute to the "awesome hack by Dean Edwards"
// WebKit uses "computed value (percentage if specified)" instead of "used value" for margins
// which is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
if ( !jQuery.support.pixelMargin && computedStyle && rmargin.test( name ) && rnumnonpx.test( ret ) ) {
}
return ret;
};
}
// Avoid setting ret to empty string here
// so we don't default to auto
ret = uncomputed;
}
// 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
// Remember the original values
// Put in the new values to get a computed value out
if ( rsLeft ) {
}
// Revert the changed values
if ( rsLeft ) {
}
}
};
}
// Start with offset property
len = 4;
if ( val > 0 ) {
if ( extra !== "border" ) {
for ( ; i < len; i += 2 ) {
if ( !extra ) {
}
if ( extra === "margin" ) {
} else {
}
}
}
return val + "px";
}
// Fall back to computed then uncomputed css if necessary
}
// Computed unit is not pixels. Stop here and return.
return val;
}
// Normalize "", auto, and prepare for extra
// Add padding, border, margin
if ( extra ) {
for ( ; i < len; i += 2 ) {
if ( extra !== "padding" ) {
}
if ( extra === "margin" ) {
}
}
}
return val + "px";
}
if ( computed ) {
} else {
});
}
}
},
value + "px" :
}
};
});
// IE uses filters for opacity
return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
},
// IE has trouble with opacity if it does not have layout
// Force it by setting the zoom level
// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
// 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...
// if there there is no filter style applied in a css rule, we are done
return;
}
}
// otherwise, set new filter values
}
};
}
jQuery(function() {
// This hook cannot be added until DOM ready because the support test
// for it is not run until after DOM ready
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
// Work around by temporarily setting element display to inline-block
if ( computed ) {
} else {
}
});
}
};
}
});
return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
};
};
}
// These hooks are used by animate to expand properties
margin: "",
padding: "",
border: "Width"
var i,
// assumes a single number if not a string
expanded = {};
for ( i = 0; i < 4; i++ ) {
}
return expanded;
}
};
});
var r20 = /%20/g,
rbracket = /\[\]$/,
rCRLF = /\r?\n/g,
rhash = /#.*$/,
rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
// #7653, #8125, #8152: local protocol detection
rprotocol = /^\/\//,
rquery = /\?/,
rspacesAjax = /\s+/,
rts = /([?&])_=[^&]*/,
rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
// Keep a copy of the old load method
/* Prefilters
* 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 = {},
// Document location
// Document location segments
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
// #8138, IE may throw an exception when accessing
// a field from window.location if document.domain has been set
try {
} catch( e ) {
// Use the href attribute of an A element
// since IE will modify it given document.location
}
// Segment location into parts
// 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" ) {
dataTypeExpression = "*";
}
i = 0,
list,
// For each dataType in the dataTypeExpression
for ( ; i < length; i++ ) {
// We control if we're asked to add before
// any existing element
if ( placeBefore ) {
}
// then we add to the structure accordingly
}
}
};
}
// Base inspection function for prefilters and transports
i = 0,
// If we got redirected to another dataType
// we try there if executing only and not done already
if ( typeof selection === "string" ) {
} else {
}
}
}
// If we're only executing or nothing was selected
// we try the catchall dataType if not done already
}
// unnecessary when only executing (prefilters)
// but it'll be ignored by the caller in that case
return selection;
}
// A special extend for ajax options
// that takes "flat" options (not to be deep extended)
// Fixes #9887
}
}
if ( deep ) {
}
}
// Don't do a request if no elements are being requested
} else if ( !this.length ) {
return this;
}
if ( off >= 0 ) {
}
// Default to a GET request
var type = "GET";
// If the second parameter was provided
if ( params ) {
// If it's a function
// We assume that it's the callback
// Otherwise, build a param string
} else if ( typeof params === "object" ) {
type = "POST";
}
}
var self = this;
// Request the remote document
dataType: "html",
// Complete callback (responseText is used internally)
// Store the response as specified by the jqXHR object
// If successful, inject the HTML into all the matched elements
if ( jqXHR.isResolved() ) {
// #4825: Get the actual response in case
// a dataFilter is present in ajaxSettings
responseText = r;
});
// See if a selector was specified
// Create a dummy div to hold the results
jQuery("<div>")
// inject the contents of the document in, removing the scripts
// to avoid any 'Permission Denied' errors in IE
// Locate the specified elements
// If not, just inject the full result
responseText );
}
if ( callback ) {
}
}
});
return this;
},
serialize: function() {
},
serializeArray: function() {
return this.map(function(){
})
.filter(function(){
})
return val == null ?
null :
}) :
}).get();
}
});
// Attach a bunch of functions for handling common AJAX events
jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
return this.on( o, f );
};
});
// shift arguments if data argument was omitted
}
});
};
});
},
},
// Creates a full fledged settings object into target
// with both ajaxSettings and settings fields.
// If target is omitted, writes into ajaxSettings.
if ( settings ) {
// Building a settings object
} else {
// Extending ajaxSettings
}
return target;
},
ajaxSettings: {
global: true,
type: "GET",
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
processData: true,
async: true,
/*
timeout: 0,
data: null,
dataType: null,
username: null,
password: null,
cache: null,
traditional: false,
headers: {},
*/
accepts: {
xml: "application/xml, text/xml",
json: "application/json, text/javascript",
"*": allTypes
},
contents: {
},
xml: "responseXML",
text: "responseText"
},
// List of data converters
// 1) key format is "source_type destination_type" (a single space in-between)
// 2) the catchall symbol "*" can be used for source_type
converters: {
// Convert anything to text
"* text": window.String,
// Text to html (true = no transformation)
"text html": true,
// Evaluate text as a json expression
// Parse text as xml
},
// 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: {
context: true,
url: true
}
},
// Main method
// If url is an object, simulate pre-1.5 signature
if ( typeof url === "object" ) {
}
// Force options to be an object
var // Create the final options object
// Callbacks context
callbackContext = s.context || s,
// Context for global events
// It's the callbackContext if one was provided in the options
// and if it's a DOM node or a jQuery collection
globalEventContext = callbackContext !== s &&
// Deferreds
// Status-dependent callbacks
statusCode = s.statusCode || {},
// ifModified key
// Headers (they are sent all at once)
requestHeaders = {},
requestHeadersNames = {},
// Response headers
// transport
// timeout handle
// Cross-domain detection vars
// The jqXHR state
state = 0,
// To know if global events are to be dispatched
// Loop variable
i,
// Fake xhr
jqXHR = {
readyState: 0,
// Caches the header
if ( !state ) {
}
return this;
},
// Raw string
getAllResponseHeaders: function() {
},
// Builds headers hashtable if needed
getResponseHeader: function( key ) {
var match;
if ( state === 2 ) {
if ( !responseHeaders ) {
responseHeaders = {};
}
}
}
},
// Overrides response content-type header
overrideMimeType: function( type ) {
if ( !state ) {
}
return this;
},
// Cancel the request
abort: function( statusText ) {
if ( transport ) {
}
return this;
}
};
// Callback for when everything is done
// It is defined here because jslint complains if it is declared
// at the end of the function (which would be more logical and readable)
// Called once
if ( state === 2 ) {
return;
}
// State is "done" now
state = 2;
// Clear timeout if it exists
if ( timeoutTimer ) {
}
// Dereference transport for early garbage collection
// (no matter how long the jqXHR object will be used)
// Cache response headers
// Set readyState
var isSuccess,
etag;
// If successful, handle type chaining
if ( s.ifModified ) {
}
}
}
// If not modified
if ( status === 304 ) {
statusText = "notmodified";
isSuccess = true;
// If we have data
} else {
try {
statusText = "success";
isSuccess = true;
} catch(e) {
// We have a parsererror
statusText = "parsererror";
error = e;
}
}
} else {
// We extract error from statusText
// then normalize statusText and status for non-aborts
error = statusText;
if ( !statusText || status ) {
statusText = "error";
if ( status < 0 ) {
status = 0;
}
}
}
// Set data for the fake xhr object
if ( isSuccess ) {
} else {
}
// Status-dependent callbacks
if ( fireGlobals ) {
}
// Complete
if ( fireGlobals ) {
// Handle the global AJAX counter
}
}
}
// Attach deferreds
// Status-dependent callbacks
if ( map ) {
var tmp;
if ( state < 2 ) {
}
} else {
}
}
return this;
};
// Remove hash character (#7531: and string promotion)
// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
// We also use the url parameter if available
s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
// Extract dataTypes list
// Determine if a cross-domain request is in order
if ( s.crossDomain == null ) {
s.crossDomain = !!( parts &&
);
}
// Convert data if not already a string
}
// Apply prefilters
// If request was aborted inside a prefilter, stop there
if ( state === 2 ) {
return false;
}
// We can fire global events as of now if asked to
fireGlobals = s.global;
// Uppercase the type
// Determine if request has content
// Watch for a new set of requests
}
// More options handling for requests with no content
if ( !s.hasContent ) {
// If data is available, append data to url
if ( s.data ) {
// #9682: remove data so that it's not used in an eventual retry
delete s.data;
}
// Get ifModifiedKey before adding the anti-cache parameter
ifModifiedKey = s.url;
// Add anti-cache in url if needed
if ( s.cache === false ) {
// try replacing _= if it is there
// if nothing was replaced, add timestamp to the end
}
}
// Set the correct header, if data is being sent
}
if ( s.ifModified ) {
}
}
}
// Set the Accepts header for the server, depending on the dataType
"Accept",
s.accepts[ "*" ]
);
// Check for headers option
for ( i in s.headers ) {
}
if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
// Abort if not done already
return false;
}
// Install callbacks on deferreds
jqXHR[ i ]( s[ i ] );
}
// Get transport
// If no transport, we auto-abort
if ( !transport ) {
} else {
// Send global event
if ( fireGlobals ) {
}
// Timeout
timeoutTimer = setTimeout( function(){
}, s.timeout );
}
try {
state = 1;
} catch (e) {
// Propagate exception as error if not done
if ( state < 2 ) {
done( -1, e );
// Simply rethrow otherwise
} else {
throw e;
}
}
}
return jqXHR;
},
// Serialize an array of form elements or a set of
param: function( a, traditional ) {
var s = [],
// If value is a function, invoke it and return its value
};
// Set traditional to true for jQuery <= 1.3.2 behavior.
if ( traditional === undefined ) {
}
// If an array was passed in, assume that it is an array of form elements.
// Serialize the form elements
});
} else {
// If traditional, encode the "old" way (the way 1.3.2 or older
// did it), otherwise encode params recursively.
for ( var prefix in a ) {
}
}
// Return the resulting serialization
}
});
// Serialize array item.
// Treat each array item as a scalar.
} else {
// If array item is non-scalar (array or object), encode its
// numeric index to resolve deserialization ambiguity issues.
// Note that rack (as of 1.0.0) can't currently deserialize
// nested arrays properly, and attempting to do so may cause
// a server error. Possible fixes are to modify rack's
// deserialization algorithm or to provide an option or flag
// to force array serialization to be shallow.
}
});
// Serialize object item.
}
} else {
// Serialize scalar item.
}
}
// This is still on the jQuery object... for now
// Want to move this to jQuery.ajax some day
// Counter for holding the number of active queries
active: 0,
// Last-Modified header cache for next request
lastModified: {},
etag: {}
});
/* Handles responses to an ajax request:
* - sets all responseXXX fields accordingly
* - finds the right dataType (mediates between content-type and expected dataType)
* - returns the corresponding response
*/
ct,
type,
// Fill responseXXX fields
for ( type in responseFields ) {
}
}
// Remove auto dataType and get content-type in the process
}
}
// Check if we're dealing with a known content-type
if ( ct ) {
break;
}
}
}
// Check to see if we have a response for the expected dataType
} else {
// Try convertible dataTypes
break;
}
if ( !firstDataType ) {
}
}
// Or just use first one
}
// If we found a dataType
// We add the dataType to the list if needed
// and return the corresponding response
if ( finalDataType ) {
}
return responses[ finalDataType ];
}
}
// Chain conversions given the request and the original response
function ajaxConvert( s, response ) {
// Apply the dataFilter if provided
if ( s.dataFilter ) {
}
converters = {},
i,
key,
tmp,
// Current and previous dataTypes
prev,
// Conversion expression
// Conversion function
conv,
// Conversion functions (transitive conversion)
// For each dataType in the chain
for ( i = 1; i < length; i++ ) {
// Create converters map
// with lowercased keys
if ( i === 1 ) {
for ( key in s.converters ) {
if ( typeof key === "string" ) {
}
}
}
// Get the dataTypes
// If current is auto dataType, update it to prev
if ( current === "*" ) {
// If no auto and dataTypes are actually different
// Get the converter
// If there is no direct converter, search transitively
if ( !conv ) {
for ( conv1 in converters ) {
if ( conv2 ) {
if ( conv1 === true ) {
} else if ( conv2 === true ) {
}
break;
}
}
}
}
// If we found no converter, dispatch an error
}
// If found converter is not an equivalence
if ( conv !== true ) {
// Convert with 1 or 2 converters accordingly
}
}
}
return response;
}
jsre = /(\=)\?(&|$)|\?\?/i;
// Default jsonp settings
jsonp: "callback",
jsonpCallback: function() {
}
});
// Detect, normalize options and install callbacks for jsonp requests
var inspectData = ( typeof s.data === "string" ) && /^application\/x\-www\-form\-urlencoded/.test( s.contentType );
var responseContainer,
jsonpCallback = s.jsonpCallback =
if ( s.jsonp !== false ) {
if ( inspectData ) {
}
// Add callback manually
}
}
}
// Install callback
responseContainer = [ response ];
};
// Clean-up function
// Set callback back to previous value
// Call if it was a function and we have a response
}
});
// Use data converter to retrieve json after script execution
s.converters["script json"] = function() {
if ( !responseContainer ) {
}
return responseContainer[ 0 ];
};
// force json dataType
// Delegate to script
return "script";
}
});
// Install script dataType
accepts: {
},
contents: {
},
converters: {
"text script": function( text ) {
return text;
}
}
});
// Handle cache's special case and global
s.cache = false;
}
if ( s.crossDomain ) {
s.type = "GET";
s.global = false;
}
});
// Bind script tag hack transport
// This transport only deals with cross domain requests
if ( s.crossDomain ) {
var script,
return {
if ( s.scriptCharset ) {
}
// Attach handlers for all browsers
// Handle memory leak in IE
// Remove the script
}
// Dereference the script
// Callback if not abort
if ( !isAbort ) {
}
}
};
// Use insertBefore instead of appendChild to circumvent an IE6 bug.
// This arises when a base node is used (#2709 and #4378).
},
abort: function() {
if ( script ) {
}
}
};
}
});
var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
// Abort all pending requests
for ( var key in xhrCallbacks ) {
}
} : false,
xhrId = 0,
// Functions to create xhrs
function createStandardXHR() {
try {
return new window.XMLHttpRequest();
} catch( e ) {}
}
function createActiveXHR() {
try {
} catch( e ) {}
}
// Create the request object
// (This is still attached to ajaxSettings for backward compatibility)
/* Microsoft failed to properly
* implement the XMLHttpRequest in IE7 (can't request local files),
* so we use the ActiveXObject when it is available
* we need a fallback.
*/
function() {
} :
// For all other browsers, use the standard XMLHttpRequest object
// Determine support properties
(function( xhr ) {
});
// Create transport if the browser can provide an xhr
jQuery.ajaxTransport(function( s ) {
// Cross domain only allowed if supported through XMLHttpRequest
var callback;
return {
// Get a new xhr
i;
// Open the socket
// Passing null username, generates a login popup on Opera (#2865)
if ( s.username ) {
} else {
}
// Apply custom fields if provided
if ( s.xhrFields ) {
for ( i in s.xhrFields ) {
}
}
// Override mime type if needed
}
// 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.
}
try {
for ( i in headers ) {
}
} catch( _ ) {}
// Do send the request
// This may raise an exception which is actually
// Listener
var status,
xml;
// Firefox throws exceptions when accessing properties
// of an xhr when a network error occured
// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
try {
// Was never called and is aborted or complete
// Only called once
// Do not keep as active anymore
if ( handle ) {
if ( xhrOnUnloadAbort ) {
delete xhrCallbacks[ handle ];
}
}
// If it's an abort
if ( isAbort ) {
// Abort it manually if needed
}
} else {
responses = {};
// Construct response list
}
// When requesting binary data, IE6-9 will throw an exception
// on any attempt to access responseText (#11426)
try {
} catch( _ ) {
}
// Firefox throws an exception when accessing
// statusText for faulty cross-domain requests
try {
} 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)
// IE - #1450: sometimes returns 1223 when it should be 204
} else if ( status === 1223 ) {
status = 204;
}
}
}
} catch( firefoxAccessException ) {
if ( !isAbort ) {
}
}
// Call complete if needed
if ( responses ) {
}
};
// if we're in sync mode or it's in cache
// and has been retrieved directly (IE6 & IE7)
// we need to manually fire the callback
callback();
} else {
if ( xhrOnUnloadAbort ) {
// Create the active xhrs callbacks list if needed
// and attach the unload handler
if ( !xhrCallbacks ) {
xhrCallbacks = {};
}
// Add to list of active xhrs callbacks
}
}
},
abort: function() {
if ( callback ) {
}
}
};
}
});
}
var elemdisplay = {},
rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
fxAttrs = [
// height animations
[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
// width animations
[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
// opacity animations
[ "opacity" ]
],
} else {
for ( var i = 0, j = this.length; i < j; i++ ) {
elem = this[ i ];
// Reset the inline display of this element to learn if it is
// being hidden by cascaded rules or not
}
// Set elements which have been overridden with display: none
// in a stylesheet to whatever the default browser style is
// for such an element
}
}
}
// Set the display of most of the elements in a second loop
// to avoid the constant reflow
for ( i = 0; i < j; i++ ) {
elem = this[ i ];
}
}
}
return this;
}
},
} else {
i = 0,
j = this.length;
for ( ; i < j; i++ ) {
elem = this[i];
}
}
}
// Set the display of the elements in a second loop
// to avoid the constant reflow
for ( i = 0; i < j; i++ ) {
if ( this[i].style ) {
}
}
return this;
}
},
// Save the old toggle function
this.each(function() {
});
} else {
}
return this;
},
},
}
// Do not change referenced properties as per-property easing will be lost
function doAnimation() {
// XXX 'this' does not always have a nodeName when running the
// test suite
}
// will store per property easing and be used to determine when an animation is complete
opt.animatedProperties = {};
// first pass over propertys to expand / normalize
for ( p in prop ) {
if ( p !== name ) {
delete prop[ p ];
}
// not quite $.extend, this wont overwrite keys already present.
// also - reusing 'p' from above because we have the correct "name"
for ( p in replace ) {
if ( ! ( p in prop ) ) {
}
}
}
}
// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
} else {
opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
}
}
// 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
// inline-level elements accept inline-block;
// block-level elements need to be inline with layout
} else {
}
}
}
}
}
for ( p in prop ) {
// Tracks whether to show or hide based on private
// data attached to the element
if ( method ) {
e[ method ]();
} else {
e[ val ]();
}
} else {
if ( parts ) {
// We need to compute starting value
if ( unit !== "px" ) {
}
// If a +=/-= token was provided, we're doing a relative animation
if ( parts[1] ) {
}
} else {
}
}
}
// For JS strict compliance
return true;
}
this.each( doAnimation ) :
},
if ( typeof type !== "string" ) {
clearQueue = type;
}
if ( clearQueue && type !== false ) {
}
return this.each(function() {
var index,
hadTimers = false,
// clear marker counters if we know they won't be
if ( !gotoEnd ) {
}
}
if ( type == null ) {
}
}
}
if ( gotoEnd ) {
// force the next step to be the last
} else {
}
hadTimers = true;
}
}
// 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
}
});
}
});
// Animations created synchronously will run synchronously
function createFxNow() {
}
function clearFxNow() {
}
// Generate parameters to create a standard animation
var obj = {};
});
return obj;
}
// Generate shortcuts for custom animations
};
});
};
}
// Queueing
}
} else if ( noUnmark !== false ) {
}
};
return opt;
},
easing: {
linear: function( p ) {
return p;
},
swing: function( p ) {
}
},
timers: [],
}
});
// Simple function for setting a style value
update: function() {
}
},
// Get the current size
cur: function() {
if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {
}
var parsed,
// Empty strings, null, undefined and "auto" are converted to 0,
// complex values such as "rotate(1rad)" are returned as is,
// simple values such as "10px" are parsed to Float.
},
// Start an animation from one number to another
var self = this,
function t( gotoEnd ) {
}
t.saveState = function() {
}
}
};
}
},
// Simple 'show' function
show: function() {
// Remember where we started, so that we can go back to it later
// Begin the animation
// This show is picking up where a previous hide or show left off
} else {
}
// Start by showing the element
},
// Simple 'hide' function
hide: function() {
// Remember where we started, so that we can go back to it later
this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop );
// Begin the animation
},
// Each step of an animation
var p, n, complete,
t = fxNow || createFxNow(),
done = true,
this.update();
for ( p in options.animatedProperties ) {
if ( options.animatedProperties[ p ] !== true ) {
done = false;
}
}
if ( done ) {
// Reset the overflow
});
}
// Hide the element if the "hide" operation was done
}
// Reset the properties, if the item has been hidden or shown
for ( p in options.animatedProperties ) {
// Toggle data is no longer needed
}
}
// Execute the complete function
// in the event that the complete function throws an exception
// we must ensure it won't be called twice. #5684
if ( complete ) {
}
}
return false;
} else {
// classical easing cannot be used with an Infinity duration
this.now = t;
} else {
n = t - this.startTime;
// Perform the easing function, defaults to swing
this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );
}
// Perform the next step of the animation
this.update();
}
return true;
}
};
tick: function() {
var timer,
i = 0;
// Checks the timer has not already been removed
}
}
}
},
interval: 13,
stop: function() {
clearInterval( timerId );
timerId = null;
},
speeds: {
slow: 600,
fast: 200,
// Default speed
_default: 400
},
step: {
},
} else {
}
}
}
});
// Ensure props that can't be negative don't go there on undershoot easing
// exclude marginTop, marginLeft, marginBottom and marginRight from this list
};
}
});
}).length;
};
}
// Try to restore the default display value of an element
function defaultDisplay( nodeName ) {
if ( !elemdisplay[ nodeName ] ) {
// If the simple way fails,
// get element's real default display by attaching it to a temp iframe
// No iframe to use yet, so create it
if ( !iframe ) {
}
// Create a cacheable copy of the iframe document on first call.
// IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
// document to it; WebKit & Firefox won't allow reusing the iframe document.
}
}
// Store the correct default display
}
return elemdisplay[ nodeName ];
}
var getOffset,
try {
} catch(e) {}
// Make sure we're not dealing with a disconnected DOM node
}
};
} else {
var computedStyle,
break;
}
if ( elem === offsetParent ) {
if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
}
}
if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
}
}
}
}
};
}
this :
this.each(function( i ) {
});
}
var elem = this[0],
if ( !doc ) {
return null;
}
}
};
bodyOffset: function( body ) {
}
},
if ( position === "static" ) {
}
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 ) {
} else {
}
}
}
}
if ( "using" in options ) {
} else {
}
}
};
position: function() {
if ( !this[0] ) {
return null;
}
var elem = this[0],
// Get *real* offsetParent
offsetParent = this.offsetParent(),
// Get correct offsets
// Subtract 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
// Add offsetParent borders
// Subtract the two offsets
return {
};
},
offsetParent: function() {
return this.map(function() {
while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
}
return offsetParent;
});
}
});
// Create scrollLeft and scrollTop methods
}
if ( win ) {
);
} else {
}
};
});
elem :
false;
}
// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
// innerHeight and innerWidth
var elem = this[0];
return elem ?
this[ type ]() :
null;
};
// outerHeight and outerWidth
var elem = this[0];
return elem ?
this[ type ]() :
null;
};
// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
}
// Get document width or height
// support:IE6
return doc[ clientProp ];
}
return Math.max(
);
}
// Get width or height on the element
}
// Set the width or height on the element
};
});
// Expose jQuery to the global object
// Expose jQuery as an AMD module, but only for AMD loaders that
// understand the issues with loading multiple versions of jQuery
// in a page that all might call define(). The loader will indicate
// they have special allowances for multiple jQuery versions by
// specifying define.amd.jQuery = true. Register as a named module,
// since jQuery can be concatenated with other files that may use define,
// but not use 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.
}
})( window );