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HL,CAGa,gBAHb,EAG+B,UAAU,KAAV,EAAiB,GAAjB,EAAsB;AAC7C,yBAAK,IAAL,CAAU,GAAV;AACH,iBALL;;AAOA;AACA;AACA;AACA;AACA;AACA,uBAAO,CAAC,SAAS,MAAT,KAAoB,CAApB,GAAwB,CAAC,SAAD,CAAxB,GAAsC,CAAC,SAAD,EAAY,SAAZ,EAAuB,QAAvB,CAAvC,EAAyE,MAAzE,CAAgF,IAAhF,CAAP;AACH;AACJ;;AAED;AACA;AACA,YAAI,cAAJ,EAAoB;AAChB,mBAAO,yBAAyB,sBAAhC;AACA,gBAAI,IAAJ,EAAU;AACN,oBAAI,CAAC,IAAL,EAAW;AACP,2BAAO,KAAK,YAAL,CAAkB,oBAAlB,CAAP;AACH;AACD,0BAAU,SAAS,KAAK,YAAL,CAAkB,qBAAlB,CAAT,CAAV;AACH;AACJ;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,YAAI,OAAJ,EAAa;AACT,oBAAQ,QAAR,CAAiB,IAAjB,CAAsB,CAAC,IAAD,EAAO,IAAP,EAAa,QAAb,CAAtB;AACA,oBAAQ,WAAR,CAAoB,IAApB,IAA4B,IAA5B;AACH,SAHD,MAGO;AACH,2BAAe,IAAf,CAAoB,CAAC,IAAD,EAAO,IAAP,EAAa,QAAb,CAApB;AACH;AACJ,KAjED;;AAmEA,WAAO,GAAP,GAAa;AACT,gBAAQ;AADC,KAAb;;AAIA;;;;;;AAMA,QAAI,IAAJ,GAAW,UAAU,IAAV,EAAgB;AACvB;AACA,eAAO,KAAK,IAAL,CAAP;AACH,KAHD;;AAKA;AACA,QAAI,GAAJ;AACH,CArlEA,EAqlEC,IArlED,EAqlEQ,OAAO,UAAP,KAAsB,WAAtB,GAAoC,SAApC,GAAgD,UArlExD,CAAD","file":"require-compiled.js","sourcesContent":["/** vim: et:ts=4:sw=4:sts=4\n * @license RequireJS 2.3.5 Copyright jQuery Foundation and other contributors.\n * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE\n */\n//Not using strict: uneven strict support in browsers, #392, and causes\n//problems with requirejs.exec()/transpiler plugins that may not be strict.\n/*jslint regexp: true, nomen: true, sloppy: true */\n/*global window, navigator, document, importScripts, setTimeout, opera */\n\nvar requirejs, require, define;\n(function (global, setTimeout) {\n var req, s, head, baseElement, dataMain, src,\n interactiveScript, currentlyAddingScript, mainScript, subPath,\n version = '2.3.5',\n commentRegExp = /\\/\\*[\\s\\S]*?\\*\\/|([^:\"'=]|^)\\/\\/.*$/mg,\n cjsRequireRegExp = /[^.]\\s*require\\s*\\(\\s*[\"']([^'\"\\s]+)[\"']\\s*\\)/g,\n jsSuffixRegExp = /\\.js$/,\n currDirRegExp = /^\\.\\//,\n op = Object.prototype,\n ostring = op.toString,\n hasOwn = op.hasOwnProperty,\n isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),\n isWebWorker = !isBrowser && typeof importScripts !== 'undefined',\n //PS3 indicates loaded and complete, but need to wait for complete\n //specifically. Sequence is 'loading', 'loaded', execution,\n // then 'complete'. The UA check is unfortunate, but not sure how\n //to feature test w/o causing perf issues.\n readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ?\n /^complete$/ : /^(complete|loaded)$/,\n defContextName = '_',\n //Oh the tragedy, detecting opera. See the usage of isOpera for reason.\n isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]',\n contexts = {},\n cfg = {},\n globalDefQueue = [],\n useInteractive = false;\n\n //Could match something like ')//comment', do not lose the prefix to comment.\n function commentReplace(match, singlePrefix) {\n return singlePrefix || '';\n }\n\n function isFunction(it) {\n return ostring.call(it) === '[object Function]';\n }\n\n function isArray(it) {\n return ostring.call(it) === '[object Array]';\n }\n\n /**\n * Helper function for iterating over an array. If the func returns\n * a true value, it will break out of the loop.\n */\n function each(ary, func) {\n if (ary) {\n var i;\n for (i = 0; i < ary.length; i += 1) {\n if (ary[i] && func(ary[i], i, ary)) {\n break;\n }\n }\n }\n }\n\n /**\n * Helper function for iterating over an array backwards. If the func\n * returns a true value, it will break out of the loop.\n */\n function eachReverse(ary, func) {\n if (ary) {\n var i;\n for (i = ary.length - 1; i > -1; i -= 1) {\n if (ary[i] && func(ary[i], i, ary)) {\n break;\n }\n }\n }\n }\n\n function hasProp(obj, prop) {\n return hasOwn.call(obj, prop);\n }\n\n function getOwn(obj, prop) {\n return hasProp(obj, prop) && obj[prop];\n }\n\n /**\n * Cycles over properties in an object and calls a function for each\n * property value. If the function returns a truthy value, then the\n * iteration is stopped.\n */\n function eachProp(obj, func) {\n var prop;\n for (prop in obj) {\n if (hasProp(obj, prop)) {\n if (func(obj[prop], prop)) {\n break;\n }\n }\n }\n }\n\n /**\n * Simple function to mix in properties from source into target,\n * but only if target does not already have a property of the same name.\n */\n function mixin(target, source, force, deepStringMixin) {\n if (source) {\n eachProp(source, function (value, prop) {\n if (force || !hasProp(target, prop)) {\n if (deepStringMixin && typeof value === 'object' && value &&\n !isArray(value) && !isFunction(value) &&\n !(value instanceof RegExp)) {\n\n if (!target[prop]) {\n target[prop] = {};\n }\n mixin(target[prop], value, force, deepStringMixin);\n } else {\n target[prop] = value;\n }\n }\n });\n }\n return target;\n }\n\n //Similar to Function.prototype.bind, but the 'this' object is specified\n //first, since it is easier to read/figure out what 'this' will be.\n function bind(obj, fn) {\n return function () {\n return fn.apply(obj, arguments);\n };\n }\n\n function scripts() {\n return document.getElementsByTagName('script');\n }\n\n function defaultOnError(err) {\n throw err;\n }\n\n //Allow getting a global that is expressed in\n //dot notation, like 'a.b.c'.\n function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }\n\n /**\n * Constructs an error with a pointer to an URL with more information.\n * @param {String} id the error ID that maps to an ID on a web page.\n * @param {String} message human readable error.\n * @param {Error} [err] the original error, if there is one.\n *\n * @returns {Error}\n */\n function makeError(id, msg, err, requireModules) {\n var e = new Error(msg + '\\nhttp://requirejs.org/docs/errors.html#' + id);\n e.requireType = id;\n e.requireModules = requireModules;\n if (err) {\n e.originalError = err;\n }\n return e;\n }\n\n if (typeof define !== 'undefined') {\n //If a define is already in play via another AMD loader,\n //do not overwrite.\n return;\n }\n\n if (typeof requirejs !== 'undefined') {\n if (isFunction(requirejs)) {\n //Do not overwrite an existing requirejs instance.\n return;\n }\n cfg = requirejs;\n requirejs = undefined;\n }\n\n //Allow for a require config object\n if (typeof require !== 'undefined' && !isFunction(require)) {\n //assume it is a config object.\n cfg = require;\n require = undefined;\n }\n\n function newContext(contextName) {\n var inCheckLoaded, Module, context, handlers,\n checkLoadedTimeoutId,\n config = {\n //Defaults. Do not set a default for map\n //config to speed up normalize(), which\n //will run faster if there is no default.\n waitSeconds: 7,\n baseUrl: './',\n paths: {},\n bundles: {},\n pkgs: {},\n shim: {},\n config: {}\n },\n registry = {},\n //registry of just enabled modules, to speed\n //cycle breaking code when lots of modules\n //are registered, but not activated.\n enabledRegistry = {},\n undefEvents = {},\n defQueue = [],\n defined = {},\n urlFetched = {},\n bundlesMap = {},\n requireCounter = 1,\n unnormalizedCounter = 1;\n\n /**\n * Trims the . and .. from an array of path segments.\n * It will keep a leading path segment if a .. will become\n * the first path segment, to help with module name lookups,\n * which act like paths, but can be remapped. But the end result,\n * all paths that use this function should look normalized.\n * NOTE: this method MODIFIES the input array.\n * @param {Array} ary the array of path segments.\n */\n function trimDots(ary) {\n var i, part;\n for (i = 0; i < ary.length; i++) {\n part = ary[i];\n if (part === '.') {\n ary.splice(i, 1);\n i -= 1;\n } else if (part === '..') {\n // If at the start, or previous value is still ..,\n // keep them so that when converted to a path it may\n // still work when converted to a path, even though\n // as an ID it is less than ideal. In larger point\n // releases, may be better to just kick out an error.\n if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') {\n continue;\n } else if (i > 0) {\n ary.splice(i - 1, 2);\n i -= 2;\n }\n }\n }\n }\n\n /**\n * Given a relative module name, like ./something, normalize it to\n * a real name that can be mapped to a path.\n * @param {String} name the relative name\n * @param {String} baseName a real name that the name arg is relative\n * to.\n * @param {Boolean} applyMap apply the map config to the value. Should\n * only be done if this normalization is for a dependency ID.\n * @returns {String} normalized name\n */\n function normalize(name, baseName, applyMap) {\n var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,\n foundMap, foundI, foundStarMap, starI, normalizedBaseParts,\n baseParts = (baseName && baseName.split('/')),\n map = config.map,\n starMap = map && map['*'];\n\n //Adjust any relative paths.\n if (name) {\n name = name.split('/');\n lastIndex = name.length - 1;\n\n // If wanting node ID compatibility, strip .js from end\n // of IDs. Have to do this here, and not in nameToUrl\n // because node allows either .js or non .js to map\n // to same file.\n if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {\n name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');\n }\n\n // Starts with a '.' so need the baseName\n if (name[0].charAt(0) === '.' && baseParts) {\n //Convert baseName to array, and lop off the last part,\n //so that . matches that 'directory' and not name of the baseName's\n //module. For instance, baseName of 'one/two/three', maps to\n //'one/two/three.js', but we want the directory, 'one/two' for\n //this normalization.\n normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);\n name = normalizedBaseParts.concat(name);\n }\n\n trimDots(name);\n name = name.join('/');\n }\n\n //Apply map config if available.\n if (applyMap && map && (baseParts || starMap)) {\n nameParts = name.split('/');\n\n outerLoop: for (i = nameParts.length; i > 0; i -= 1) {\n nameSegment = nameParts.slice(0, i).join('/');\n\n if (baseParts) {\n //Find the longest baseName segment match in the config.\n //So, do joins on the biggest to smallest lengths of baseParts.\n for (j = baseParts.length; j > 0; j -= 1) {\n mapValue = getOwn(map, baseParts.slice(0, j).join('/'));\n\n //baseName segment has config, find if it has one for\n //this name.\n if (mapValue) {\n mapValue = getOwn(mapValue, nameSegment);\n if (mapValue) {\n //Match, update name to the new value.\n foundMap = mapValue;\n foundI = i;\n break outerLoop;\n }\n }\n }\n }\n\n //Check for a star map match, but just hold on to it,\n //if there is a shorter segment match later in a matching\n //config, then favor over this star map.\n if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {\n foundStarMap = getOwn(starMap, nameSegment);\n starI = i;\n }\n }\n\n if (!foundMap && foundStarMap) {\n foundMap = foundStarMap;\n foundI = starI;\n }\n\n if (foundMap) {\n nameParts.splice(0, foundI, foundMap);\n name = nameParts.join('/');\n }\n }\n\n // If the name points to a package's name, use\n // the package main instead.\n pkgMain = getOwn(config.pkgs, name);\n\n return pkgMain ? pkgMain : name;\n }\n\n function removeScript(name) {\n if (isBrowser) {\n each(scripts(), function (scriptNode) {\n if (scriptNode.getAttribute('data-requiremodule') === name &&\n scriptNode.getAttribute('data-requirecontext') === context.contextName) {\n scriptNode.parentNode.removeChild(scriptNode);\n return true;\n }\n });\n }\n }\n\n function hasPathFallback(id) {\n var pathConfig = getOwn(config.paths, id);\n if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {\n //Pop off the first array value, since it failed, and\n //retry\n pathConfig.shift();\n context.require.undef(id);\n\n //Custom require that does not do map translation, since\n //ID is \"absolute\", already mapped/resolved.\n context.makeRequire(null, {\n skipMap: true\n })([id]);\n\n return true;\n }\n }\n\n //Turns a plugin!resource to [plugin, resource]\n //with the plugin being undefined if the name\n //did not have a plugin prefix.\n function splitPrefix(name) {\n var prefix,\n index = name ? name.indexOf('!') : -1;\n if (index > -1) {\n prefix = name.substring(0, index);\n name = name.substring(index + 1, name.length);\n }\n return [prefix, name];\n }\n\n /**\n * Creates a module mapping that includes plugin prefix, module\n * name, and path. If parentModuleMap is provided it will\n * also normalize the name via require.normalize()\n *\n * @param {String} name the module name\n * @param {String} [parentModuleMap] parent module map\n * for the module name, used to resolve relative names.\n * @param {Boolean} isNormalized: is the ID already normalized.\n * This is true if this call is done for a define() module ID.\n * @param {Boolean} applyMap: apply the map config to the ID.\n * Should only be true if this map is for a dependency.\n *\n * @returns {Object}\n */\n function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {\n var url, pluginModule, suffix, nameParts,\n prefix = null,\n parentName = parentModuleMap ? parentModuleMap.name : null,\n originalName = name,\n isDefine = true,\n normalizedName = '';\n\n //If no name, then it means it is a require call, generate an\n //internal name.\n if (!name) {\n isDefine = false;\n name = '_@r' + (requireCounter += 1);\n }\n\n nameParts = splitPrefix(name);\n prefix = nameParts[0];\n name = nameParts[1];\n\n if (prefix) {\n prefix = normalize(prefix, parentName, applyMap);\n pluginModule = getOwn(defined, prefix);\n }\n\n //Account for relative paths if there is a base name.\n if (name) {\n if (prefix) {\n if (isNormalized) {\n normalizedName = name;\n } else if (pluginModule && pluginModule.normalize) {\n //Plugin is loaded, use its normalize method.\n normalizedName = pluginModule.normalize(name, function (name) {\n return normalize(name, parentName, applyMap);\n });\n } else {\n // If nested plugin references, then do not try to\n // normalize, as it will not normalize correctly. This\n // places a restriction on resourceIds, and the longer\n // term solution is not to normalize until plugins are\n // loaded and all normalizations to allow for async\n // loading of a loader plugin. But for now, fixes the\n // common uses. Details in #1131\n normalizedName = name.indexOf('!') === -1 ?\n normalize(name, parentName, applyMap) :\n name;\n }\n } else {\n //A regular module.\n normalizedName = normalize(name, parentName, applyMap);\n\n //Normalized name may be a plugin ID due to map config\n //application in normalize. The map config values must\n //already be normalized, so do not need to redo that part.\n nameParts = splitPrefix(normalizedName);\n prefix = nameParts[0];\n normalizedName = nameParts[1];\n isNormalized = true;\n\n url = context.nameToUrl(normalizedName);\n }\n }\n\n //If the id is a plugin id that cannot be determined if it needs\n //normalization, stamp it with a unique ID so two matching relative\n //ids that may conflict can be separate.\n suffix = prefix && !pluginModule && !isNormalized ?\n '_unnormalized' + (unnormalizedCounter += 1) :\n '';\n\n return {\n prefix: prefix,\n name: normalizedName,\n parentMap: parentModuleMap,\n unnormalized: !!suffix,\n url: url,\n originalName: originalName,\n isDefine: isDefine,\n id: (prefix ?\n prefix + '!' + normalizedName :\n normalizedName) + suffix\n };\n }\n\n function getModule(depMap) {\n var id = depMap.id,\n mod = getOwn(registry, id);\n\n if (!mod) {\n mod = registry[id] = new context.Module(depMap);\n }\n\n return mod;\n }\n\n function on(depMap, name, fn) {\n var id = depMap.id,\n mod = getOwn(registry, id);\n\n if (hasProp(defined, id) &&\n (!mod || mod.defineEmitComplete)) {\n if (name === 'defined') {\n fn(defined[id]);\n }\n } else {\n mod = getModule(depMap);\n if (mod.error && name === 'error') {\n fn(mod.error);\n } else {\n mod.on(name, fn);\n }\n }\n }\n\n function onError(err, errback) {\n var ids = err.requireModules,\n notified = false;\n\n if (errback) {\n errback(err);\n } else {\n each(ids, function (id) {\n var mod = getOwn(registry, id);\n if (mod) {\n //Set error on module, so it skips timeout checks.\n mod.error = err;\n if (mod.events.error) {\n notified = true;\n mod.emit('error', err);\n }\n }\n });\n\n if (!notified) {\n req.onError(err);\n }\n }\n }\n\n /**\n * Internal method to transfer globalQueue items to this context's\n * defQueue.\n */\n function takeGlobalQueue() {\n //Push all the globalDefQueue items into the context's defQueue\n if (globalDefQueue.length) {\n each(globalDefQueue, function(queueItem) {\n var id = queueItem[0];\n if (typeof id === 'string') {\n context.defQueueMap[id] = true;\n }\n defQueue.push(queueItem);\n });\n globalDefQueue = [];\n }\n }\n\n handlers = {\n 'require': function (mod) {\n if (mod.require) {\n return mod.require;\n } else {\n return (mod.require = context.makeRequire(mod.map));\n }\n },\n 'exports': function (mod) {\n mod.usingExports = true;\n if (mod.map.isDefine) {\n if (mod.exports) {\n return (defined[mod.map.id] = mod.exports);\n } else {\n return (mod.exports = defined[mod.map.id] = {});\n }\n }\n },\n 'module': function (mod) {\n if (mod.module) {\n return mod.module;\n } else {\n return (mod.module = {\n id: mod.map.id,\n uri: mod.map.url,\n config: function () {\n return getOwn(config.config, mod.map.id) || {};\n },\n exports: mod.exports || (mod.exports = {})\n });\n }\n }\n };\n\n function cleanRegistry(id) {\n //Clean up machinery used for waiting modules.\n delete registry[id];\n delete enabledRegistry[id];\n }\n\n function breakCycle(mod, traced, processed) {\n var id = mod.map.id;\n\n if (mod.error) {\n mod.emit('error', mod.error);\n } else {\n traced[id] = true;\n each(mod.depMaps, function (depMap, i) {\n var depId = depMap.id,\n dep = getOwn(registry, depId);\n\n //Only force things that have not completed\n //being defined, so still in the registry,\n //and only if it has not been matched up\n //in the module already.\n if (dep && !mod.depMatched[i] && !processed[depId]) {\n if (getOwn(traced, depId)) {\n mod.defineDep(i, defined[depId]);\n mod.check(); //pass false?\n } else {\n breakCycle(dep, traced, processed);\n }\n }\n });\n processed[id] = true;\n }\n }\n\n function checkLoaded() {\n var err, usingPathFallback,\n waitInterval = config.waitSeconds * 1000,\n //It is possible to disable the wait interval by using waitSeconds of 0.\n expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),\n noLoads = [],\n reqCalls = [],\n stillLoading = false,\n needCycleCheck = true;\n\n //Do not bother if this call was a result of a cycle break.\n if (inCheckLoaded) {\n return;\n }\n\n inCheckLoaded = true;\n\n //Figure out the state of all the modules.\n eachProp(enabledRegistry, function (mod) {\n var map = mod.map,\n modId = map.id;\n\n //Skip things that are not enabled or in error state.\n if (!mod.enabled) {\n return;\n }\n\n if (!map.isDefine) {\n reqCalls.push(mod);\n }\n\n if (!mod.error) {\n //If the module should be executed, and it has not\n //been inited and time is up, remember it.\n if (!mod.inited && expired) {\n if (hasPathFallback(modId)) {\n usingPathFallback = true;\n stillLoading = true;\n } else {\n noLoads.push(modId);\n removeScript(modId);\n }\n } else if (!mod.inited && mod.fetched && map.isDefine) {\n stillLoading = true;\n if (!map.prefix) {\n //No reason to keep looking for unfinished\n //loading. If the only stillLoading is a\n //plugin resource though, keep going,\n //because it may be that a plugin resource\n //is waiting on a non-plugin cycle.\n return (needCycleCheck = false);\n }\n }\n }\n });\n\n if (expired && noLoads.length) {\n //If wait time expired, throw error of unloaded modules.\n err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads);\n err.contextName = context.contextName;\n return onError(err);\n }\n\n //Not expired, check for a cycle.\n if (needCycleCheck) {\n each(reqCalls, function (mod) {\n breakCycle(mod, {}, {});\n });\n }\n\n //If still waiting on loads, and the waiting load is something\n //other than a plugin resource, or there are still outstanding\n //scripts, then just try back later.\n if ((!expired || usingPathFallback) && stillLoading) {\n //Something is still waiting to load. Wait for it, but only\n //if a timeout is not already in effect.\n if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {\n checkLoadedTimeoutId = setTimeout(function () {\n checkLoadedTimeoutId = 0;\n checkLoaded();\n }, 50);\n }\n }\n\n inCheckLoaded = false;\n }\n\n Module = function (map) {\n this.events = getOwn(undefEvents, map.id) || {};\n this.map = map;\n this.shim = getOwn(config.shim, map.id);\n this.depExports = [];\n this.depMaps = [];\n this.depMatched = [];\n this.pluginMaps = {};\n this.depCount = 0;\n\n /* this.exports this.factory\n this.depMaps = [],\n this.enabled, this.fetched\n */\n };\n\n Module.prototype = {\n init: function (depMaps, factory, errback, options) {\n options = options || {};\n\n //Do not do more inits if already done. Can happen if there\n //are multiple define calls for the same module. That is not\n //a normal, common case, but it is also not unexpected.\n if (this.inited) {\n return;\n }\n\n this.factory = factory;\n\n if (errback) {\n //Register for errors on this module.\n this.on('error', errback);\n } else if (this.events.error) {\n //If no errback already, but there are error listeners\n //on this module, set up an errback to pass to the deps.\n errback = bind(this, function (err) {\n this.emit('error', err);\n });\n }\n\n //Do a copy of the dependency array, so that\n //source inputs are not modified. For example\n //\"shim\" deps are passed in here directly, and\n //doing a direct modification of the depMaps array\n //would affect that config.\n this.depMaps = depMaps && depMaps.slice(0);\n\n this.errback = errback;\n\n //Indicate this module has be initialized\n this.inited = true;\n\n this.ignore = options.ignore;\n\n //Could have option to init this module in enabled mode,\n //or could have been previously marked as enabled. However,\n //the dependencies are not known until init is called. So\n //if enabled previously, now trigger dependencies as enabled.\n if (options.enabled || this.enabled) {\n //Enable this module and dependencies.\n //Will call this.check()\n this.enable();\n } else {\n this.check();\n }\n },\n\n defineDep: function (i, depExports) {\n //Because of cycles, defined callback for a given\n //export can be called more than once.\n if (!this.depMatched[i]) {\n this.depMatched[i] = true;\n this.depCount -= 1;\n this.depExports[i] = depExports;\n }\n },\n\n fetch: function () {\n if (this.fetched) {\n return;\n }\n this.fetched = true;\n\n context.startTime = (new Date()).getTime();\n\n var map = this.map;\n\n //If the manager is for a plugin managed resource,\n //ask the plugin to load it now.\n if (this.shim) {\n context.makeRequire(this.map, {\n enableBuildCallback: true\n })(this.shim.deps || [], bind(this, function () {\n return map.prefix ? this.callPlugin() : this.load();\n }));\n } else {\n //Regular dependency.\n return map.prefix ? this.callPlugin() : this.load();\n }\n },\n\n load: function () {\n var url = this.map.url;\n\n //Regular dependency.\n if (!urlFetched[url]) {\n urlFetched[url] = true;\n context.load(this.map.id, url);\n }\n },\n\n /**\n * Checks if the module is ready to define itself, and if so,\n * define it.\n */\n check: function () {\n if (!this.enabled || this.enabling) {\n return;\n }\n\n var err, cjsModule,\n id = this.map.id,\n depExports = this.depExports,\n exports = this.exports,\n factory = this.factory;\n\n if (!this.inited) {\n // Only fetch if not already in the defQueue.\n if (!hasProp(context.defQueueMap, id)) {\n this.fetch();\n }\n } else if (this.error) {\n this.emit('error', this.error);\n } else if (!this.defining) {\n //The factory could trigger another require call\n //that would result in checking this module to\n //define itself again. If already in the process\n //of doing that, skip this work.\n this.defining = true;\n\n if (this.depCount < 1 && !this.defined) {\n if (isFunction(factory)) {\n //If there is an error listener, favor passing\n //to that instead of throwing an error. However,\n //only do it for define()'d modules. require\n //errbacks should not be called for failures in\n //their callbacks (#699). However if a global\n //onError is set, use that.\n if ((this.events.error && this.map.isDefine) ||\n req.onError !== defaultOnError) {\n try {\n exports = context.execCb(id, factory, depExports, exports);\n } catch (e) {\n err = e;\n }\n } else {\n exports = context.execCb(id, factory, depExports, exports);\n }\n\n // Favor return value over exports. If node/cjs in play,\n // then will not have a return value anyway. Favor\n // module.exports assignment over exports object.\n if (this.map.isDefine && exports === undefined) {\n cjsModule = this.module;\n if (cjsModule) {\n exports = cjsModule.exports;\n } else if (this.usingExports) {\n //exports already set the defined value.\n exports = this.exports;\n }\n }\n\n if (err) {\n err.requireMap = this.map;\n err.requireModules = this.map.isDefine ? [this.map.id] : null;\n err.requireType = this.map.isDefine ? 'define' : 'require';\n return onError((this.error = err));\n }\n\n } else {\n //Just a literal value\n exports = factory;\n }\n\n this.exports = exports;\n\n if (this.map.isDefine && !this.ignore) {\n defined[id] = exports;\n\n if (req.onResourceLoad) {\n var resLoadMaps = [];\n each(this.depMaps, function (depMap) {\n resLoadMaps.push(depMap.normalizedMap || depMap);\n });\n req.onResourceLoad(context, this.map, resLoadMaps);\n }\n }\n\n //Clean up\n cleanRegistry(id);\n\n this.defined = true;\n }\n\n //Finished the define stage. Allow calling check again\n //to allow define notifications below in the case of a\n //cycle.\n this.defining = false;\n\n if (this.defined && !this.defineEmitted) {\n this.defineEmitted = true;\n this.emit('defined', this.exports);\n this.defineEmitComplete = true;\n }\n\n }\n },\n\n callPlugin: function () {\n var map = this.map,\n id = map.id,\n //Map already normalized the prefix.\n pluginMap = makeModuleMap(map.prefix);\n\n //Mark this as a dependency for this plugin, so it\n //can be traced for cycles.\n this.depMaps.push(pluginMap);\n\n on(pluginMap, 'defined', bind(this, function (plugin) {\n var load, normalizedMap, normalizedMod,\n bundleId = getOwn(bundlesMap, this.map.id),\n name = this.map.name,\n parentName = this.map.parentMap ? this.map.parentMap.name : null,\n localRequire = context.makeRequire(map.parentMap, {\n enableBuildCallback: true\n });\n\n //If current map is not normalized, wait for that\n //normalized name to load instead of continuing.\n if (this.map.unnormalized) {\n //Normalize the ID if the plugin allows it.\n if (plugin && plugin.normalize) {\n name = plugin.normalize(name, function (name) {\n return normalize(name, parentName, true);\n }) || '';\n }\n\n //prefix and name should already be normalized, no need\n //for applying map config again either.\n normalizedMap = makeModuleMap(map.prefix + '!' + name,\n this.map.parentMap,\n true);\n on(normalizedMap,\n 'defined', bind(this, function (value) {\n this.map.normalizedMap = normalizedMap;\n this.init([], function () { return value; }, null, {\n enabled: true,\n ignore: true\n });\n }));\n\n normalizedMod = getOwn(registry, normalizedMap.id);\n if (normalizedMod) {\n //Mark this as a dependency for this plugin, so it\n //can be traced for cycles.\n this.depMaps.push(normalizedMap);\n\n if (this.events.error) {\n normalizedMod.on('error', bind(this, function (err) {\n this.emit('error', err);\n }));\n }\n normalizedMod.enable();\n }\n\n return;\n }\n\n //If a paths config, then just load that file instead to\n //resolve the plugin, as it is built into that paths layer.\n if (bundleId) {\n this.map.url = context.nameToUrl(bundleId);\n this.load();\n return;\n }\n\n load = bind(this, function (value) {\n this.init([], function () { return value; }, null, {\n enabled: true\n });\n });\n\n load.error = bind(this, function (err) {\n this.inited = true;\n this.error = err;\n err.requireModules = [id];\n\n //Remove temp unnormalized modules for this module,\n //since they will never be resolved otherwise now.\n eachProp(registry, function (mod) {\n if (mod.map.id.indexOf(id + '_unnormalized') === 0) {\n cleanRegistry(mod.map.id);\n }\n });\n\n onError(err);\n });\n\n //Allow plugins to load other code without having to know the\n //context or how to 'complete' the load.\n load.fromText = bind(this, function (text, textAlt) {\n /*jslint evil: true */\n var moduleName = map.name,\n moduleMap = makeModuleMap(moduleName),\n hasInteractive = useInteractive;\n\n //As of 2.1.0, support just passing the text, to reinforce\n //fromText only being called once per resource. Still\n //support old style of passing moduleName but discard\n //that moduleName in favor of the internal ref.\n if (textAlt) {\n text = textAlt;\n }\n\n //Turn off interactive script matching for IE for any define\n //calls in the text, then turn it back on at the end.\n if (hasInteractive) {\n useInteractive = false;\n }\n\n //Prime the system by creating a module instance for\n //it.\n getModule(moduleMap);\n\n //Transfer any config to this other module.\n if (hasProp(config.config, id)) {\n config.config[moduleName] = config.config[id];\n }\n\n try {\n req.exec(text);\n } catch (e) {\n return onError(makeError('fromtexteval',\n 'fromText eval for ' + id +\n ' failed: ' + e,\n e,\n [id]));\n }\n\n if (hasInteractive) {\n useInteractive = true;\n }\n\n //Mark this as a dependency for the plugin\n //resource\n this.depMaps.push(moduleMap);\n\n //Support anonymous modules.\n context.completeLoad(moduleName);\n\n //Bind the value of that module to the value for this\n //resource ID.\n localRequire([moduleName], load);\n });\n\n //Use parentName here since the plugin's name is not reliable,\n //could be some weird string with no path that actually wants to\n //reference the parentName's path.\n plugin.load(map.name, localRequire, load, config);\n }));\n\n context.enable(pluginMap, this);\n this.pluginMaps[pluginMap.id] = pluginMap;\n },\n\n enable: function () {\n enabledRegistry[this.map.id] = this;\n this.enabled = true;\n\n //Set flag mentioning that the module is enabling,\n //so that immediate calls to the defined callbacks\n //for dependencies do not trigger inadvertent load\n //with the depCount still being zero.\n this.enabling = true;\n\n //Enable each dependency\n each(this.depMaps, bind(this, function (depMap, i) {\n var id, mod, handler;\n\n if (typeof depMap === 'string') {\n //Dependency needs to be converted to a depMap\n //and wired up to this module.\n depMap = makeModuleMap(depMap,\n (this.map.isDefine ? this.map : this.map.parentMap),\n false,\n !this.skipMap);\n this.depMaps[i] = depMap;\n\n handler = getOwn(handlers, depMap.id);\n\n if (handler) {\n this.depExports[i] = handler(this);\n return;\n }\n\n this.depCount += 1;\n\n on(depMap, 'defined', bind(this, function (depExports) {\n if (this.undefed) {\n return;\n }\n this.defineDep(i, depExports);\n this.check();\n }));\n\n if (this.errback) {\n on(depMap, 'error', bind(this, this.errback));\n } else if (this.events.error) {\n // No direct errback on this module, but something\n // else is listening for errors, so be sure to\n // propagate the error correctly.\n on(depMap, 'error', bind(this, function(err) {\n this.emit('error', err);\n }));\n }\n }\n\n id = depMap.id;\n mod = registry[id];\n\n //Skip special modules like 'require', 'exports', 'module'\n //Also, don't call enable if it is already enabled,\n //important in circular dependency cases.\n if (!hasProp(handlers, id) && mod && !mod.enabled) {\n context.enable(depMap, this);\n }\n }));\n\n //Enable each plugin that is used in\n //a dependency\n eachProp(this.pluginMaps, bind(this, function (pluginMap) {\n var mod = getOwn(registry, pluginMap.id);\n if (mod && !mod.enabled) {\n context.enable(pluginMap, this);\n }\n }));\n\n this.enabling = false;\n\n this.check();\n },\n\n on: function (name, cb) {\n var cbs = this.events[name];\n if (!cbs) {\n cbs = this.events[name] = [];\n }\n cbs.push(cb);\n },\n\n emit: function (name, evt) {\n each(this.events[name], function (cb) {\n cb(evt);\n });\n if (name === 'error') {\n //Now that the error handler was triggered, remove\n //the listeners, since this broken Module instance\n //can stay around for a while in the registry.\n delete this.events[name];\n }\n }\n };\n\n function callGetModule(args) {\n //Skip modules already defined.\n if (!hasProp(defined, args[0])) {\n getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);\n }\n }\n\n function removeListener(node, func, name, ieName) {\n //Favor detachEvent because of IE9\n //issue, see attachEvent/addEventListener comment elsewhere\n //in this file.\n if (node.detachEvent && !isOpera) {\n //Probably IE. If not it will throw an error, which will be\n //useful to know.\n if (ieName) {\n node.detachEvent(ieName, func);\n }\n } else {\n node.removeEventListener(name, func, false);\n }\n }\n\n /**\n * Given an event from a script node, get the requirejs info from it,\n * and then removes the event listeners on the node.\n * @param {Event} evt\n * @returns {Object}\n */\n function getScriptData(evt) {\n //Using currentTarget instead of target for Firefox 2.0's sake. Not\n //all old browsers will be supported, but this one was easy enough\n //to support and still makes sense.\n var node = evt.currentTarget || evt.srcElement;\n\n //Remove the listeners once here.\n removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');\n removeListener(node, context.onScriptError, 'error');\n\n return {\n node: node,\n id: node && node.getAttribute('data-requiremodule')\n };\n }\n\n function intakeDefines() {\n var args;\n\n //Any defined modules in the global queue, intake them now.\n takeGlobalQueue();\n\n //Make sure any remaining defQueue items get properly processed.\n while (defQueue.length) {\n args = defQueue.shift();\n if (args[0] === null) {\n return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' +\n args[args.length - 1]));\n } else {\n //args are id, deps, factory. Should be normalized by the\n //define() function.\n callGetModule(args);\n }\n }\n context.defQueueMap = {};\n }\n\n context = {\n config: config,\n contextName: contextName,\n registry: registry,\n defined: defined,\n urlFetched: urlFetched,\n defQueue: defQueue,\n defQueueMap: {},\n Module: Module,\n makeModuleMap: makeModuleMap,\n nextTick: req.nextTick,\n onError: onError,\n\n /**\n * Set a configuration for the context.\n * @param {Object} cfg config object to integrate.\n */\n configure: function (cfg) {\n //Make sure the baseUrl ends in a slash.\n if (cfg.baseUrl) {\n if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {\n cfg.baseUrl += '/';\n }\n }\n\n // Convert old style urlArgs string to a function.\n if (typeof cfg.urlArgs === 'string') {\n var urlArgs = cfg.urlArgs;\n cfg.urlArgs = function(id, url) {\n return (url.indexOf('?') === -1 ? '?' : '&') + urlArgs;\n };\n }\n\n //Save off the paths since they require special processing,\n //they are additive.\n var shim = config.shim,\n objs = {\n paths: true,\n bundles: true,\n config: true,\n map: true\n };\n\n eachProp(cfg, function (value, prop) {\n if (objs[prop]) {\n if (!config[prop]) {\n config[prop] = {};\n }\n mixin(config[prop], value, true, true);\n } else {\n config[prop] = value;\n }\n });\n\n //Reverse map the bundles\n if (cfg.bundles) {\n eachProp(cfg.bundles, function (value, prop) {\n each(value, function (v) {\n if (v !== prop) {\n bundlesMap[v] = prop;\n }\n });\n });\n }\n\n //Merge shim\n if (cfg.shim) {\n eachProp(cfg.shim, function (value, id) {\n //Normalize the structure\n if (isArray(value)) {\n value = {\n deps: value\n };\n }\n if ((value.exports || value.init) && !value.exportsFn) {\n value.exportsFn = context.makeShimExports(value);\n }\n shim[id] = value;\n });\n config.shim = shim;\n }\n\n //Adjust packages if necessary.\n if (cfg.packages) {\n each(cfg.packages, function (pkgObj) {\n var location, name;\n\n pkgObj = typeof pkgObj === 'string' ? {name: pkgObj} : pkgObj;\n\n name = pkgObj.name;\n location = pkgObj.location;\n if (location) {\n config.paths[name] = pkgObj.location;\n }\n\n //Save pointer to main module ID for pkg name.\n //Remove leading dot in main, so main paths are normalized,\n //and remove any trailing .js, since different package\n //envs have different conventions: some use a module name,\n //some use a file name.\n config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main')\n .replace(currDirRegExp, '')\n .replace(jsSuffixRegExp, '');\n });\n }\n\n //If there are any \"waiting to execute\" modules in the registry,\n //update the maps for them, since their info, like URLs to load,\n //may have changed.\n eachProp(registry, function (mod, id) {\n //If module already has init called, since it is too\n //late to modify them, and ignore unnormalized ones\n //since they are transient.\n if (!mod.inited && !mod.map.unnormalized) {\n mod.map = makeModuleMap(id, null, true);\n }\n });\n\n //If a deps array or a config callback is specified, then call\n //require with those args. This is useful when require is defined as a\n //config object before require.js is loaded.\n if (cfg.deps || cfg.callback) {\n context.require(cfg.deps || [], cfg.callback);\n }\n },\n\n makeShimExports: function (value) {\n function fn() {\n var ret;\n if (value.init) {\n ret = value.init.apply(global, arguments);\n }\n return ret || (value.exports && getGlobal(value.exports));\n }\n return fn;\n },\n\n makeRequire: function (relMap, options) {\n options = options || {};\n\n function localRequire(deps, callback, errback) {\n var id, map, requireMod;\n\n if (options.enableBuildCallback && callback && isFunction(callback)) {\n callback.__requireJsBuild = true;\n }\n\n if (typeof deps === 'string') {\n if (isFunction(callback)) {\n //Invalid call\n return onError(makeError('requireargs', 'Invalid require call'), errback);\n }\n\n //If require|exports|module are requested, get the\n //value for them from the special handlers. Caveat:\n //this only works while module is being defined.\n if (relMap && hasProp(handlers, deps)) {\n return handlers[deps](registry[relMap.id]);\n }\n\n //Synchronous access to one module. If require.get is\n //available (as in the Node adapter), prefer that.\n if (req.get) {\n return req.get(context, deps, relMap, localRequire);\n }\n\n //Normalize module name, if it contains . or ..\n map = makeModuleMap(deps, relMap, false, true);\n id = map.id;\n\n if (!hasProp(defined, id)) {\n return onError(makeError('notloaded', 'Module name \"' +\n id +\n '\" has not been loaded yet for context: ' +\n contextName +\n (relMap ? '' : '. Use require([])')));\n }\n return defined[id];\n }\n\n //Grab defines waiting in the global queue.\n intakeDefines();\n\n //Mark all the dependencies as needing to be loaded.\n context.nextTick(function () {\n //Some defines could have been added since the\n //require call, collect them.\n intakeDefines();\n\n requireMod = getModule(makeModuleMap(null, relMap));\n\n //Store if map config should be applied to this require\n //call for dependencies.\n requireMod.skipMap = options.skipMap;\n\n requireMod.init(deps, callback, errback, {\n enabled: true\n });\n\n checkLoaded();\n });\n\n return localRequire;\n }\n\n mixin(localRequire, {\n isBrowser: isBrowser,\n\n /**\n * Converts a module name + .extension into an URL path.\n * *Requires* the use of a module name. It does not support using\n * plain URLs like nameToUrl.\n */\n toUrl: function (moduleNamePlusExt) {\n var ext,\n index = moduleNamePlusExt.lastIndexOf('.'),\n segment = moduleNamePlusExt.split('/')[0],\n isRelative = segment === '.' || segment === '..';\n\n //Have a file extension alias, and it is not the\n //dots from a relative path.\n if (index !== -1 && (!isRelative || index > 1)) {\n ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);\n moduleNamePlusExt = moduleNamePlusExt.substring(0, index);\n }\n\n return context.nameToUrl(normalize(moduleNamePlusExt,\n relMap && relMap.id, true), ext, true);\n },\n\n defined: function (id) {\n return hasProp(defined, makeModuleMap(id, relMap, false, true).id);\n },\n\n specified: function (id) {\n id = makeModuleMap(id, relMap, false, true).id;\n return hasProp(defined, id) || hasProp(registry, id);\n }\n });\n\n //Only allow undef on top level require calls\n if (!relMap) {\n localRequire.undef = function (id) {\n //Bind any waiting define() calls to this context,\n //fix for #408\n takeGlobalQueue();\n\n var map = makeModuleMap(id, relMap, true),\n mod = getOwn(registry, id);\n\n mod.undefed = true;\n removeScript(id);\n\n delete defined[id];\n delete urlFetched[map.url];\n delete undefEvents[id];\n\n //Clean queued defines too. Go backwards\n //in array so that the splices do not\n //mess up the iteration.\n eachReverse(defQueue, function(args, i) {\n if (args[0] === id) {\n defQueue.splice(i, 1);\n }\n });\n delete context.defQueueMap[id];\n\n if (mod) {\n //Hold on to listeners in case the\n //module will be attempted to be reloaded\n //using a different config.\n if (mod.events.defined) {\n undefEvents[id] = mod.events;\n }\n\n cleanRegistry(id);\n }\n };\n }\n\n return localRequire;\n },\n\n /**\n * Called to enable a module if it is still in the registry\n * awaiting enablement. A second arg, parent, the parent module,\n * is passed in for context, when this method is overridden by\n * the optimizer. Not shown here to keep code compact.\n */\n enable: function (depMap) {\n var mod = getOwn(registry, depMap.id);\n if (mod) {\n getModule(depMap).enable();\n }\n },\n\n /**\n * Internal method used by environment adapters to complete a load event.\n * A load event could be a script load or just a load pass from a synchronous\n * load call.\n * @param {String} moduleName the name of the module to potentially complete.\n */\n completeLoad: function (moduleName) {\n var found, args, mod,\n shim = getOwn(config.shim, moduleName) || {},\n shExports = shim.exports;\n\n takeGlobalQueue();\n\n while (defQueue.length) {\n args = defQueue.shift();\n if (args[0] === null) {\n args[0] = moduleName;\n //If already found an anonymous module and bound it\n //to this name, then this is some other anon module\n //waiting for its completeLoad to fire.\n if (found) {\n break;\n }\n found = true;\n } else if (args[0] === moduleName) {\n //Found matching define call for this script!\n found = true;\n }\n\n callGetModule(args);\n }\n context.defQueueMap = {};\n\n //Do this after the cycle of callGetModule in case the result\n //of those calls/init calls changes the registry.\n mod = getOwn(registry, moduleName);\n\n if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {\n if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {\n if (hasPathFallback(moduleName)) {\n return;\n } else {\n return onError(makeError('nodefine',\n 'No define call for ' + moduleName,\n null,\n [moduleName]));\n }\n } else {\n //A script that does not call define(), so just simulate\n //the call for it.\n callGetModule([moduleName, (shim.deps || []), shim.exportsFn]);\n }\n }\n\n checkLoaded();\n },\n\n /**\n * Converts a module name to a file path. Supports cases where\n * moduleName may actually be just an URL.\n * Note that it **does not** call normalize on the moduleName,\n * it is assumed to have already been normalized. This is an\n * internal API, not a public one. Use toUrl for the public API.\n */\n nameToUrl: function (moduleName, ext, skipExt) {\n var paths, syms, i, parentModule, url,\n parentPath, bundleId,\n pkgMain = getOwn(config.pkgs, moduleName);\n\n if (pkgMain) {\n moduleName = pkgMain;\n }\n\n bundleId = getOwn(bundlesMap, moduleName);\n\n if (bundleId) {\n return context.nameToUrl(bundleId, ext, skipExt);\n }\n\n //If a colon is in the URL, it indicates a protocol is used and it is just\n //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)\n //or ends with .js, then assume the user meant to use an url and not a module id.\n //The slash is important for protocol-less URLs as well as full paths.\n if (req.jsExtRegExp.test(moduleName)) {\n //Just a plain path, not module name lookup, so just return it.\n //Add extension if it is included. This is a bit wonky, only non-.js things pass\n //an extension, this method probably needs to be reworked.\n url = moduleName + (ext || '');\n } else {\n //A module that needs to be converted to a path.\n paths = config.paths;\n\n syms = moduleName.split('/');\n //For each module name segment, see if there is a path\n //registered for it. Start with most specific name\n //and work up from it.\n for (i = syms.length; i > 0; i -= 1) {\n parentModule = syms.slice(0, i).join('/');\n\n parentPath = getOwn(paths, parentModule);\n if (parentPath) {\n //If an array, it means there are a few choices,\n //Choose the one that is desired\n if (isArray(parentPath)) {\n parentPath = parentPath[0];\n }\n syms.splice(0, i, parentPath);\n break;\n }\n }\n\n //Join the path parts together, then figure out if baseUrl is needed.\n url = syms.join('/');\n url += (ext || (/^data\\:|^blob\\:|\\?/.test(url) || skipExt ? '' : '.js'));\n url = (url.charAt(0) === '/' || url.match(/^[\\w\\+\\.\\-]+:/) ? '' : (config.baseUrl)) + url;\n }\n\n return config.urlArgs && !/^blob\\:/.test(url) ?\n url + config.urlArgs(moduleName, url) : url;\n },\n\n //Delegates to req.load. Broken out as a separate function to\n //allow overriding in the optimizer.\n load: function (id, url) {\n req.load(context, id, url);\n },\n\n /**\n * Executes a module callback function. Broken out as a separate function\n * solely to allow the build system to sequence the files in the built\n * layer in the right sequence.\n *\n * @private\n */\n execCb: function (name, callback, args, exports) {\n return callback.apply(exports, args);\n },\n\n /**\n * callback for script loads, used to check status of loading.\n *\n * @param {Event} evt the event from the browser for the script\n * that was loaded.\n */\n onScriptLoad: function (evt) {\n //Using currentTarget instead of target for Firefox 2.0's sake. Not\n //all old browsers will be supported, but this one was easy enough\n //to support and still makes sense.\n if (evt.type === 'load' ||\n (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) {\n //Reset interactive script so a script node is not held onto for\n //to long.\n interactiveScript = null;\n\n //Pull out the name of the module and the context.\n var data = getScriptData(evt);\n context.completeLoad(data.id);\n }\n },\n\n /**\n * Callback for script errors.\n */\n onScriptError: function (evt) {\n var data = getScriptData(evt);\n if (!hasPathFallback(data.id)) {\n var parents = [];\n eachProp(registry, function(value, key) {\n if (key.indexOf('_@r') !== 0) {\n each(value.depMaps, function(depMap) {\n if (depMap.id === data.id) {\n parents.push(key);\n return true;\n }\n });\n }\n });\n return onError(makeError('scripterror', 'Script error for \"' + data.id +\n (parents.length ?\n '\", needed by: ' + parents.join(', ') :\n '\"'), evt, [data.id]));\n }\n }\n };\n\n context.require = context.makeRequire();\n return context;\n }\n\n /**\n * Main entry point.\n *\n * If the only argument to require is a string, then the module that\n * is represented by that string is fetched for the appropriate context.\n *\n * If the first argument is an array, then it will be treated as an array\n * of dependency string names to fetch. An optional function callback can\n * be specified to execute when all of those dependencies are available.\n *\n * Make a local req variable to help Caja compliance (it assumes things\n * on a require that are not standardized), and to give a short\n * name for minification/local scope use.\n */\n req = requirejs = function (deps, callback, errback, optional) {\n\n //Find the right context, use default\n var context, config,\n contextName = defContextName;\n\n // Determine if have config object in the call.\n if (!isArray(deps) && typeof deps !== 'string') {\n // deps is a config object\n config = deps;\n if (isArray(callback)) {\n // Adjust args if there are dependencies\n deps = callback;\n callback = errback;\n errback = optional;\n } else {\n deps = [];\n }\n }\n\n if (config && config.context) {\n contextName = config.context;\n }\n\n context = getOwn(contexts, contextName);\n if (!context) {\n context = contexts[contextName] = req.s.newContext(contextName);\n }\n\n if (config) {\n context.configure(config);\n }\n return context.require(deps, callback, errback);\n };\n\n /**\n * Support require.config() to make it easier to cooperate with other\n * AMD loaders on globally agreed names.\n */\n req.config = function (config) {\n return req(config);\n };\n\n /**\n * Execute something after the current tick\n * of the event loop. Override for other envs\n * that have a better solution than setTimeout.\n * @param {Function} fn function to execute later.\n */\n req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) {\n setTimeout(fn, 4);\n } : function (fn) { fn(); };\n\n /**\n * Export require as a global, but only if it does not already exist.\n */\n if (!require) {\n require = req;\n }\n\n req.version = version;\n\n //Used to filter out dependencies that are already paths.\n req.jsExtRegExp = /^\\/|:|\\?|\\.js$/;\n req.isBrowser = isBrowser;\n s = req.s = {\n contexts: contexts,\n newContext: newContext\n };\n\n //Create default context.\n req({});\n\n //Exports some context-sensitive methods on global require.\n each([\n 'toUrl',\n 'undef',\n 'defined',\n 'specified'\n ], function (prop) {\n //Reference from contexts instead of early binding to default context,\n //so that during builds, the latest instance of the default context\n //with its config gets used.\n req[prop] = function () {\n var ctx = contexts[defContextName];\n return ctx.require[prop].apply(ctx, arguments);\n };\n });\n\n if (isBrowser) {\n head = s.head = document.getElementsByTagName('head')[0];\n //If BASE tag is in play, using appendChild is a problem for IE6.\n //When that browser dies, this can be removed. Details in this jQuery bug:\n //http://dev.jquery.com/ticket/2709\n baseElement = document.getElementsByTagName('base')[0];\n if (baseElement) {\n head = s.head = baseElement.parentNode;\n }\n }\n\n /**\n * Any errors that require explicitly generates will be passed to this\n * function. Intercept/override it if you want custom error handling.\n * @param {Error} err the error object.\n */\n req.onError = defaultOnError;\n\n /**\n * Creates the node for the load command. Only used in browser envs.\n */\n req.createNode = function (config, moduleName, url) {\n var node = config.xhtml ?\n document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :\n document.createElement('script');\n node.type = config.scriptType || 'text/javascript';\n node.charset = 'utf-8';\n node.async = true;\n return node;\n };\n\n /**\n * Does the request to load a module for the browser case.\n * Make this a separate function to allow other environments\n * to override it.\n *\n * @param {Object} context the require context to find state.\n * @param {String} moduleName the name of the module.\n * @param {Object} url the URL to the module.\n */\n req.load = function (context, moduleName, url) {\n var config = (context && context.config) || {},\n node;\n if (isBrowser) {\n //In the browser so use a script tag\n node = req.createNode(config, moduleName, url);\n\n node.setAttribute('data-requirecontext', context.contextName);\n node.setAttribute('data-requiremodule', moduleName);\n\n //Set up load listener. Test attachEvent first because IE9 has\n //a subtle issue in its addEventListener and script onload firings\n //that do not match the behavior of all other browsers with\n //addEventListener support, which fire the onload event for a\n //script right after the script execution. See:\n //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution\n //UNFORTUNATELY Opera implements attachEvent but does not follow the script\n //script execution mode.\n if (node.attachEvent &&\n //Check if node.attachEvent is artificially added by custom script or\n //natively supported by browser\n //read https://github.com/requirejs/requirejs/issues/187\n //if we can NOT find [native code] then it must NOT natively supported.\n //in IE8, node.attachEvent does not have toString()\n //Note the test for \"[native code\" with no closing brace, see:\n //https://github.com/requirejs/requirejs/issues/273\n !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) &&\n !isOpera) {\n //Probably IE. IE (at least 6-8) do not fire\n //script onload right after executing the script, so\n //we cannot tie the anonymous define call to a name.\n //However, IE reports the script as being in 'interactive'\n //readyState at the time of the define call.\n useInteractive = true;\n\n node.attachEvent('onreadystatechange', context.onScriptLoad);\n //It would be great to add an error handler here to catch\n //404s in IE9+. However, onreadystatechange will fire before\n //the error handler, so that does not help. If addEventListener\n //is used, then IE will fire error before load, but we cannot\n //use that pathway given the connect.microsoft.com issue\n //mentioned above about not doing the 'script execute,\n //then fire the script load event listener before execute\n //next script' that other browsers do.\n //Best hope: IE10 fixes the issues,\n //and then destroys all installs of IE 6-9.\n //node.attachEvent('onerror', context.onScriptError);\n } else {\n node.addEventListener('load', context.onScriptLoad, false);\n node.addEventListener('error', context.onScriptError, false);\n }\n node.src = url;\n\n //Calling onNodeCreated after all properties on the node have been\n //set, but before it is placed in the DOM.\n if (config.onNodeCreated) {\n config.onNodeCreated(node, config, moduleName, url);\n }\n\n //For some cache cases in IE 6-8, the script executes before the end\n //of the appendChild execution, so to tie an anonymous define\n //call to the module name (which is stored on the node), hold on\n //to a reference to this node, but clear after the DOM insertion.\n currentlyAddingScript = node;\n if (baseElement) {\n head.insertBefore(node, baseElement);\n } else {\n head.appendChild(node);\n }\n currentlyAddingScript = null;\n\n return node;\n } else if (isWebWorker) {\n try {\n //In a web worker, use importScripts. This is not a very\n //efficient use of importScripts, importScripts will block until\n //its script is downloaded and evaluated. However, if web workers\n //are in play, the expectation is that a build has been done so\n //that only one script needs to be loaded anyway. This may need\n //to be reevaluated if other use cases become common.\n\n // Post a task to the event loop to work around a bug in WebKit\n // where the worker gets garbage-collected after calling\n // importScripts(): https://webkit.org/b/153317\n setTimeout(function() {}, 0);\n importScripts(url);\n\n //Account for anonymous modules\n context.completeLoad(moduleName);\n } catch (e) {\n context.onError(makeError('importscripts',\n 'importScripts failed for ' +\n moduleName + ' at ' + url,\n e,\n [moduleName]));\n }\n }\n };\n\n function getInteractiveScript() {\n if (interactiveScript && interactiveScript.readyState === 'interactive') {\n return interactiveScript;\n }\n\n eachReverse(scripts(), function (script) {\n if (script.readyState === 'interactive') {\n return (interactiveScript = script);\n }\n });\n return interactiveScript;\n }\n\n //Look for a data-main script attribute, which could also adjust the baseUrl.\n if (isBrowser && !cfg.skipDataMain) {\n //Figure out baseUrl. Get it from the script tag with require.js in it.\n eachReverse(scripts(), function (script) {\n //Set the 'head' where we can append children by\n //using the script's parent.\n if (!head) {\n head = script.parentNode;\n }\n\n //Look for a data-main attribute to set main script for the page\n //to load. If it is there, the path to data main becomes the\n //baseUrl, if it is not already set.\n dataMain = script.getAttribute('data-main');\n if (dataMain) {\n //Preserve dataMain in case it is a path (i.e. contains '?')\n mainScript = dataMain;\n\n //Set final baseUrl if there is not already an explicit one,\n //but only do so if the data-main value is not a loader plugin\n //module ID.\n if (!cfg.baseUrl && mainScript.indexOf('!') === -1) {\n //Pull off the directory of data-main for use as the\n //baseUrl.\n src = mainScript.split('/');\n mainScript = src.pop();\n subPath = src.length ? src.join('/') + '/' : './';\n\n cfg.baseUrl = subPath;\n }\n\n //Strip off any trailing .js since mainScript is now\n //like a module name.\n mainScript = mainScript.replace(jsSuffixRegExp, '');\n\n //If mainScript is still a path, fall back to dataMain\n if (req.jsExtRegExp.test(mainScript)) {\n mainScript = dataMain;\n }\n\n //Put the data-main script in the files to load.\n cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];\n\n return true;\n }\n });\n }\n\n /**\n * The function that handles definitions of modules. Differs from\n * require() in that a string for the module should be the first argument,\n * and the function to execute after dependencies are loaded should\n * return a value to define the module corresponding to the first argument's\n * name.\n */\n define = function (name, deps, callback) {\n var node, context;\n\n //Allow for anonymous modules\n if (typeof name !== 'string') {\n //Adjust args appropriately\n callback = deps;\n deps = name;\n name = null;\n }\n\n //This module may not have dependencies\n if (!isArray(deps)) {\n callback = deps;\n deps = null;\n }\n\n //If no name, and callback is a function, then figure out if it a\n //CommonJS thing with dependencies.\n if (!deps && isFunction(callback)) {\n deps = [];\n //Remove comments from the callback string,\n //look for require calls, and pull them into the dependencies,\n //but only if there are function args.\n if (callback.length) {\n callback\n .toString()\n .replace(commentRegExp, commentReplace)\n .replace(cjsRequireRegExp, function (match, dep) {\n deps.push(dep);\n });\n\n //May be a CommonJS thing even without require calls, but still\n //could use exports, and module. Avoid doing exports and module\n //work though if it just needs require.\n //REQUIRES the function to expect the CommonJS variables in the\n //order listed below.\n deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps);\n }\n }\n\n //If in IE 6-8 and hit an anonymous define() call, do the interactive\n //work.\n if (useInteractive) {\n node = currentlyAddingScript || getInteractiveScript();\n if (node) {\n if (!name) {\n name = node.getAttribute('data-requiremodule');\n }\n context = contexts[node.getAttribute('data-requirecontext')];\n }\n }\n\n //Always save off evaluating the def call until the script onload handler.\n //This allows multiple modules to be in a file without prematurely\n //tracing dependencies, and allows for anonymous module support,\n //where the module name is not known until the script onload event\n //occurs. If no context, use the global queue, and get it processed\n //in the onscript load callback.\n if (context) {\n context.defQueue.push([name, deps, callback]);\n context.defQueueMap[name] = true;\n } else {\n globalDefQueue.push([name, deps, callback]);\n }\n };\n\n define.amd = {\n jQuery: true\n };\n\n /**\n * Executes the text. Normally just uses eval, but can be modified\n * to use a better, environment-specific call. Only used for transpiling\n * loader plugins, not for plain JS modules.\n * @param {String} text the text to execute/evaluate.\n */\n req.exec = function (text) {\n /*jslint evil: true */\n return eval(text);\n };\n\n //Set up with config info.\n req(cfg);\n}(this, (typeof setTimeout === 'undefined' ? undefined : setTimeout)));\n"]}
|