| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735 | 
							
- 'use strict';
 
- var _amdLoaderGlobal = this;
 
- var _commonjsGlobal = typeof global === 'object' ? global : {};
 
- var AMDLoader;
 
- (function (AMDLoader) {
 
-     AMDLoader.global = _amdLoaderGlobal;
 
-     var Environment = (function () {
 
-         function Environment() {
 
-             this._detected = false;
 
-             this._isWindows = false;
 
-             this._isNode = false;
 
-             this._isElectronRenderer = false;
 
-             this._isWebWorker = false;
 
-         }
 
-         Object.defineProperty(Environment.prototype, "isWindows", {
 
-             get: function () {
 
-                 this._detect();
 
-                 return this._isWindows;
 
-             },
 
-             enumerable: true,
 
-             configurable: true
 
-         });
 
-         Object.defineProperty(Environment.prototype, "isNode", {
 
-             get: function () {
 
-                 this._detect();
 
-                 return this._isNode;
 
-             },
 
-             enumerable: true,
 
-             configurable: true
 
-         });
 
-         Object.defineProperty(Environment.prototype, "isElectronRenderer", {
 
-             get: function () {
 
-                 this._detect();
 
-                 return this._isElectronRenderer;
 
-             },
 
-             enumerable: true,
 
-             configurable: true
 
-         });
 
-         Object.defineProperty(Environment.prototype, "isWebWorker", {
 
-             get: function () {
 
-                 this._detect();
 
-                 return this._isWebWorker;
 
-             },
 
-             enumerable: true,
 
-             configurable: true
 
-         });
 
-         Environment.prototype._detect = function () {
 
-             if (this._detected) {
 
-                 return;
 
-             }
 
-             this._detected = true;
 
-             this._isWindows = Environment._isWindows();
 
-             this._isNode = (typeof module !== 'undefined' && !!module.exports);
 
-             this._isElectronRenderer = (typeof process !== 'undefined' && typeof process.versions !== 'undefined' && typeof process.versions.electron !== 'undefined' && process.type === 'renderer');
 
-             this._isWebWorker = (typeof AMDLoader.global.importScripts === 'function');
 
-         };
 
-         Environment._isWindows = function () {
 
-             if (typeof navigator !== 'undefined') {
 
-                 if (navigator.userAgent && navigator.userAgent.indexOf('Windows') >= 0) {
 
-                     return true;
 
-                 }
 
-             }
 
-             if (typeof process !== 'undefined') {
 
-                 return (process.platform === 'win32');
 
-             }
 
-             return false;
 
-         };
 
-         return Environment;
 
-     }());
 
-     AMDLoader.Environment = Environment;
 
- })(AMDLoader || (AMDLoader = {}));
 
- var AMDLoader;
 
- (function (AMDLoader) {
 
-     var LoaderEvent = (function () {
 
-         function LoaderEvent(type, detail, timestamp) {
 
-             this.type = type;
 
-             this.detail = detail;
 
-             this.timestamp = timestamp;
 
-         }
 
-         return LoaderEvent;
 
-     }());
 
-     AMDLoader.LoaderEvent = LoaderEvent;
 
-     var LoaderEventRecorder = (function () {
 
-         function LoaderEventRecorder(loaderAvailableTimestamp) {
 
-             this._events = [new LoaderEvent(1 , '', loaderAvailableTimestamp)];
 
-         }
 
-         LoaderEventRecorder.prototype.record = function (type, detail) {
 
-             this._events.push(new LoaderEvent(type, detail, AMDLoader.Utilities.getHighPerformanceTimestamp()));
 
-         };
 
-         LoaderEventRecorder.prototype.getEvents = function () {
 
-             return this._events;
 
-         };
 
-         return LoaderEventRecorder;
 
-     }());
 
-     AMDLoader.LoaderEventRecorder = LoaderEventRecorder;
 
-     var NullLoaderEventRecorder = (function () {
 
-         function NullLoaderEventRecorder() {
 
-         }
 
-         NullLoaderEventRecorder.prototype.record = function (type, detail) {
 
-             
 
-         };
 
-         NullLoaderEventRecorder.prototype.getEvents = function () {
 
-             return [];
 
-         };
 
-         return NullLoaderEventRecorder;
 
-     }());
 
-     NullLoaderEventRecorder.INSTANCE = new NullLoaderEventRecorder();
 
-     AMDLoader.NullLoaderEventRecorder = NullLoaderEventRecorder;
 
- })(AMDLoader || (AMDLoader = {}));
 
- var AMDLoader;
 
- (function (AMDLoader) {
 
-     var Utilities = (function () {
 
-         function Utilities() {
 
-         }
 
-         
 
-         Utilities.fileUriToFilePath = function (isWindows, uri) {
 
-             uri = decodeURI(uri).replace(/%23/g, '#');
 
-             if (isWindows) {
 
-                 if (/^file:\/\/\//.test(uri)) {
 
-                     
 
-                     return uri.substr(8);
 
-                 }
 
-                 if (/^file:\/\//.test(uri)) {
 
-                     return uri.substr(5);
 
-                 }
 
-             }
 
-             else {
 
-                 if (/^file:\/\//.test(uri)) {
 
-                     return uri.substr(7);
 
-                 }
 
-             }
 
-             
 
-             return uri;
 
-         };
 
-         Utilities.startsWith = function (haystack, needle) {
 
-             return haystack.length >= needle.length && haystack.substr(0, needle.length) === needle;
 
-         };
 
-         Utilities.endsWith = function (haystack, needle) {
 
-             return haystack.length >= needle.length && haystack.substr(haystack.length - needle.length) === needle;
 
-         };
 
-         
 
-         Utilities.containsQueryString = function (url) {
 
-             return /^[^\#]*\?/gi.test(url);
 
-         };
 
-         
 
-         Utilities.isAbsolutePath = function (url) {
 
-             return /^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(url);
 
-         };
 
-         Utilities.forEachProperty = function (obj, callback) {
 
-             if (obj) {
 
-                 var key = void 0;
 
-                 for (key in obj) {
 
-                     if (obj.hasOwnProperty(key)) {
 
-                         callback(key, obj[key]);
 
-                     }
 
-                 }
 
-             }
 
-         };
 
-         Utilities.isEmpty = function (obj) {
 
-             var isEmpty = true;
 
-             Utilities.forEachProperty(obj, function () {
 
-                 isEmpty = false;
 
-             });
 
-             return isEmpty;
 
-         };
 
-         Utilities.recursiveClone = function (obj) {
 
-             if (!obj || typeof obj !== 'object') {
 
-                 return obj;
 
-             }
 
-             var result = Array.isArray(obj) ? [] : {};
 
-             Utilities.forEachProperty(obj, function (key, value) {
 
-                 if (value && typeof value === 'object') {
 
-                     result[key] = Utilities.recursiveClone(value);
 
-                 }
 
-                 else {
 
-                     result[key] = value;
 
-                 }
 
-             });
 
-             return result;
 
-         };
 
-         Utilities.generateAnonymousModule = function () {
 
-             return '===anonymous' + (Utilities.NEXT_ANONYMOUS_ID++) + '===';
 
-         };
 
-         Utilities.isAnonymousModule = function (id) {
 
-             return Utilities.startsWith(id, '===anonymous');
 
-         };
 
-         Utilities.getHighPerformanceTimestamp = function () {
 
-             if (!this.PERFORMANCE_NOW_PROBED) {
 
-                 this.PERFORMANCE_NOW_PROBED = true;
 
-                 this.HAS_PERFORMANCE_NOW = (AMDLoader.global.performance && typeof AMDLoader.global.performance.now === 'function');
 
-             }
 
-             return (this.HAS_PERFORMANCE_NOW ? AMDLoader.global.performance.now() : Date.now());
 
-         };
 
-         return Utilities;
 
-     }());
 
-     Utilities.NEXT_ANONYMOUS_ID = 1;
 
-     Utilities.PERFORMANCE_NOW_PROBED = false;
 
-     Utilities.HAS_PERFORMANCE_NOW = false;
 
-     AMDLoader.Utilities = Utilities;
 
- })(AMDLoader || (AMDLoader = {}));
 
- var AMDLoader;
 
- (function (AMDLoader) {
 
-     var ConfigurationOptionsUtil = (function () {
 
-         function ConfigurationOptionsUtil() {
 
-         }
 
-         
 
-         ConfigurationOptionsUtil.validateConfigurationOptions = function (options) {
 
-             function defaultOnError(err) {
 
-                 if (err.errorCode === 'load') {
 
-                     console.error('Loading "' + err.moduleId + '" failed');
 
-                     console.error('Detail: ', err.detail);
 
-                     if (err.detail && err.detail.stack) {
 
-                         console.error(err.detail.stack);
 
-                     }
 
-                     console.error('Here are the modules that depend on it:');
 
-                     console.error(err.neededBy);
 
-                     return;
 
-                 }
 
-                 if (err.errorCode === 'factory') {
 
-                     console.error('The factory method of "' + err.moduleId + '" has thrown an exception');
 
-                     console.error(err.detail);
 
-                     if (err.detail && err.detail.stack) {
 
-                         console.error(err.detail.stack);
 
-                     }
 
-                     return;
 
-                 }
 
-             }
 
-             options = options || {};
 
-             if (typeof options.baseUrl !== 'string') {
 
-                 options.baseUrl = '';
 
-             }
 
-             if (typeof options.isBuild !== 'boolean') {
 
-                 options.isBuild = false;
 
-             }
 
-             if (typeof options.paths !== 'object') {
 
-                 options.paths = {};
 
-             }
 
-             if (typeof options.config !== 'object') {
 
-                 options.config = {};
 
-             }
 
-             if (typeof options.catchError === 'undefined') {
 
-                 options.catchError = false;
 
-             }
 
-             if (typeof options.urlArgs !== 'string') {
 
-                 options.urlArgs = '';
 
-             }
 
-             if (typeof options.onError !== 'function') {
 
-                 options.onError = defaultOnError;
 
-             }
 
-             if (typeof options.ignoreDuplicateModules !== 'object' || !Array.isArray(options.ignoreDuplicateModules)) {
 
-                 options.ignoreDuplicateModules = [];
 
-             }
 
-             if (options.baseUrl.length > 0) {
 
-                 if (!AMDLoader.Utilities.endsWith(options.baseUrl, '/')) {
 
-                     options.baseUrl += '/';
 
-                 }
 
-             }
 
-             if (typeof options.cspNonce !== 'string') {
 
-                 options.cspNonce = '';
 
-             }
 
-             if (!Array.isArray(options.nodeModules)) {
 
-                 options.nodeModules = [];
 
-             }
 
-             if (typeof options.nodeCachedDataWriteDelay !== 'number' || options.nodeCachedDataWriteDelay < 0) {
 
-                 options.nodeCachedDataWriteDelay = 1000 * 7;
 
-             }
 
-             if (typeof options.onNodeCachedData !== 'function') {
 
-                 options.onNodeCachedData = function (err, data) {
 
-                     if (!err) {
 
-                         
 
-                     }
 
-                     else if (err.errorCode === 'cachedDataRejected') {
 
-                         console.warn('Rejected cached data from file: ' + err.path);
 
-                     }
 
-                     else if (err.errorCode === 'unlink' || err.errorCode === 'writeFile') {
 
-                         console.error('Problems writing cached data file: ' + err.path);
 
-                         console.error(err.detail);
 
-                     }
 
-                     else {
 
-                         console.error(err);
 
-                     }
 
-                 };
 
-             }
 
-             return options;
 
-         };
 
-         ConfigurationOptionsUtil.mergeConfigurationOptions = function (overwrite, base) {
 
-             if (overwrite === void 0) { overwrite = null; }
 
-             if (base === void 0) { base = null; }
 
-             var result = AMDLoader.Utilities.recursiveClone(base || {});
 
-             
 
-             AMDLoader.Utilities.forEachProperty(overwrite, function (key, value) {
 
-                 if (key === 'ignoreDuplicateModules' && typeof result.ignoreDuplicateModules !== 'undefined') {
 
-                     result.ignoreDuplicateModules = result.ignoreDuplicateModules.concat(value);
 
-                 }
 
-                 else if (key === 'paths' && typeof result.paths !== 'undefined') {
 
-                     AMDLoader.Utilities.forEachProperty(value, function (key2, value2) { return result.paths[key2] = value2; });
 
-                 }
 
-                 else if (key === 'config' && typeof result.config !== 'undefined') {
 
-                     AMDLoader.Utilities.forEachProperty(value, function (key2, value2) { return result.config[key2] = value2; });
 
-                 }
 
-                 else {
 
-                     result[key] = AMDLoader.Utilities.recursiveClone(value);
 
-                 }
 
-             });
 
-             return ConfigurationOptionsUtil.validateConfigurationOptions(result);
 
-         };
 
-         return ConfigurationOptionsUtil;
 
-     }());
 
-     AMDLoader.ConfigurationOptionsUtil = ConfigurationOptionsUtil;
 
-     var Configuration = (function () {
 
-         function Configuration(env, options) {
 
-             this._env = env;
 
-             this.options = ConfigurationOptionsUtil.mergeConfigurationOptions(options);
 
-             this._createIgnoreDuplicateModulesMap();
 
-             this._createNodeModulesMap();
 
-             this._createSortedPathsRules();
 
-             if (this.options.baseUrl === '') {
 
-                 if (this.options.nodeRequire && this.options.nodeRequire.main && this.options.nodeRequire.main.filename && this._env.isNode) {
 
-                     var nodeMain = this.options.nodeRequire.main.filename;
 
-                     var dirnameIndex = Math.max(nodeMain.lastIndexOf('/'), nodeMain.lastIndexOf('\\'));
 
-                     this.options.baseUrl = nodeMain.substring(0, dirnameIndex + 1);
 
-                 }
 
-                 if (this.options.nodeMain && this._env.isNode) {
 
-                     var nodeMain = this.options.nodeMain;
 
-                     var dirnameIndex = Math.max(nodeMain.lastIndexOf('/'), nodeMain.lastIndexOf('\\'));
 
-                     this.options.baseUrl = nodeMain.substring(0, dirnameIndex + 1);
 
-                 }
 
-             }
 
-         }
 
-         Configuration.prototype._createIgnoreDuplicateModulesMap = function () {
 
-             
 
-             this.ignoreDuplicateModulesMap = {};
 
-             for (var i = 0; i < this.options.ignoreDuplicateModules.length; i++) {
 
-                 this.ignoreDuplicateModulesMap[this.options.ignoreDuplicateModules[i]] = true;
 
-             }
 
-         };
 
-         Configuration.prototype._createNodeModulesMap = function () {
 
-             
 
-             this.nodeModulesMap = Object.create(null);
 
-             for (var _i = 0, _a = this.options.nodeModules; _i < _a.length; _i++) {
 
-                 var nodeModule = _a[_i];
 
-                 this.nodeModulesMap[nodeModule] = true;
 
-             }
 
-         };
 
-         Configuration.prototype._createSortedPathsRules = function () {
 
-             var _this = this;
 
-             
 
-             
 
-             this.sortedPathsRules = [];
 
-             AMDLoader.Utilities.forEachProperty(this.options.paths, function (from, to) {
 
-                 if (!Array.isArray(to)) {
 
-                     _this.sortedPathsRules.push({
 
-                         from: from,
 
-                         to: [to]
 
-                     });
 
-                 }
 
-                 else {
 
-                     _this.sortedPathsRules.push({
 
-                         from: from,
 
-                         to: to
 
-                     });
 
-                 }
 
-             });
 
-             this.sortedPathsRules.sort(function (a, b) {
 
-                 return b.from.length - a.from.length;
 
-             });
 
-         };
 
-         
 
-         Configuration.prototype.cloneAndMerge = function (options) {
 
-             return new Configuration(this._env, ConfigurationOptionsUtil.mergeConfigurationOptions(options, this.options));
 
-         };
 
-         
 
-         Configuration.prototype.getOptionsLiteral = function () {
 
-             return this.options;
 
-         };
 
-         Configuration.prototype._applyPaths = function (moduleId) {
 
-             var pathRule;
 
-             for (var i = 0, len = this.sortedPathsRules.length; i < len; i++) {
 
-                 pathRule = this.sortedPathsRules[i];
 
-                 if (AMDLoader.Utilities.startsWith(moduleId, pathRule.from)) {
 
-                     var result = [];
 
-                     for (var j = 0, lenJ = pathRule.to.length; j < lenJ; j++) {
 
-                         result.push(pathRule.to[j] + moduleId.substr(pathRule.from.length));
 
-                     }
 
-                     return result;
 
-                 }
 
-             }
 
-             return [moduleId];
 
-         };
 
-         Configuration.prototype._addUrlArgsToUrl = function (url) {
 
-             if (AMDLoader.Utilities.containsQueryString(url)) {
 
-                 return url + '&' + this.options.urlArgs;
 
-             }
 
-             else {
 
-                 return url + '?' + this.options.urlArgs;
 
-             }
 
-         };
 
-         Configuration.prototype._addUrlArgsIfNecessaryToUrl = function (url) {
 
-             if (this.options.urlArgs) {
 
-                 return this._addUrlArgsToUrl(url);
 
-             }
 
-             return url;
 
-         };
 
-         Configuration.prototype._addUrlArgsIfNecessaryToUrls = function (urls) {
 
-             if (this.options.urlArgs) {
 
-                 for (var i = 0, len = urls.length; i < len; i++) {
 
-                     urls[i] = this._addUrlArgsToUrl(urls[i]);
 
-                 }
 
-             }
 
-             return urls;
 
-         };
 
-         
 
-         Configuration.prototype.moduleIdToPaths = function (moduleId) {
 
-             if (this.nodeModulesMap[moduleId] === true) {
 
-                 
 
-                 if (this.isBuild()) {
 
-                     
 
-                     return ['empty:'];
 
-                 }
 
-                 else {
 
-                     
 
-                     return ['node|' + moduleId];
 
-                 }
 
-             }
 
-             var result = moduleId;
 
-             var results;
 
-             if (!AMDLoader.Utilities.endsWith(result, '.js') && !AMDLoader.Utilities.isAbsolutePath(result)) {
 
-                 results = this._applyPaths(result);
 
-                 for (var i = 0, len = results.length; i < len; i++) {
 
-                     if (this.isBuild() && results[i] === 'empty:') {
 
-                         continue;
 
-                     }
 
-                     if (!AMDLoader.Utilities.isAbsolutePath(results[i])) {
 
-                         results[i] = this.options.baseUrl + results[i];
 
-                     }
 
-                     if (!AMDLoader.Utilities.endsWith(results[i], '.js') && !AMDLoader.Utilities.containsQueryString(results[i])) {
 
-                         results[i] = results[i] + '.js';
 
-                     }
 
-                 }
 
-             }
 
-             else {
 
-                 if (!AMDLoader.Utilities.endsWith(result, '.js') && !AMDLoader.Utilities.containsQueryString(result)) {
 
-                     result = result + '.js';
 
-                 }
 
-                 results = [result];
 
-             }
 
-             return this._addUrlArgsIfNecessaryToUrls(results);
 
-         };
 
-         
 
-         Configuration.prototype.requireToUrl = function (url) {
 
-             var result = url;
 
-             if (!AMDLoader.Utilities.isAbsolutePath(result)) {
 
-                 result = this._applyPaths(result)[0];
 
-                 if (!AMDLoader.Utilities.isAbsolutePath(result)) {
 
-                     result = this.options.baseUrl + result;
 
-                 }
 
-             }
 
-             return this._addUrlArgsIfNecessaryToUrl(result);
 
-         };
 
-         
 
-         Configuration.prototype.isBuild = function () {
 
-             return this.options.isBuild;
 
-         };
 
-         
 
-         Configuration.prototype.isDuplicateMessageIgnoredFor = function (moduleId) {
 
-             return this.ignoreDuplicateModulesMap.hasOwnProperty(moduleId);
 
-         };
 
-         
 
-         Configuration.prototype.getConfigForModule = function (moduleId) {
 
-             if (this.options.config) {
 
-                 return this.options.config[moduleId];
 
-             }
 
-         };
 
-         
 
-         Configuration.prototype.shouldCatchError = function () {
 
-             return this.options.catchError;
 
-         };
 
-         
 
-         Configuration.prototype.shouldRecordStats = function () {
 
-             return this.options.recordStats;
 
-         };
 
-         
 
-         Configuration.prototype.onError = function (err) {
 
-             this.options.onError(err);
 
-         };
 
-         return Configuration;
 
-     }());
 
-     AMDLoader.Configuration = Configuration;
 
- })(AMDLoader || (AMDLoader = {}));
 
- var AMDLoader;
 
- (function (AMDLoader) {
 
-     
 
-     var OnlyOnceScriptLoader = (function () {
 
-         function OnlyOnceScriptLoader(env) {
 
-             this._env = env;
 
-             this._scriptLoader = null;
 
-             this._callbackMap = {};
 
-         }
 
-         OnlyOnceScriptLoader.prototype.load = function (moduleManager, scriptSrc, callback, errorback) {
 
-             var _this = this;
 
-             if (!this._scriptLoader) {
 
-                 this._scriptLoader = (this._env.isWebWorker
 
-                     ? new WorkerScriptLoader()
 
-                     : this._env.isNode
 
-                         ? new NodeScriptLoader(this._env)
 
-                         : new BrowserScriptLoader());
 
-             }
 
-             var scriptCallbacks = {
 
-                 callback: callback,
 
-                 errorback: errorback
 
-             };
 
-             if (this._callbackMap.hasOwnProperty(scriptSrc)) {
 
-                 this._callbackMap[scriptSrc].push(scriptCallbacks);
 
-                 return;
 
-             }
 
-             this._callbackMap[scriptSrc] = [scriptCallbacks];
 
-             this._scriptLoader.load(moduleManager, scriptSrc, function () { return _this.triggerCallback(scriptSrc); }, function (err) { return _this.triggerErrorback(scriptSrc, err); });
 
-         };
 
-         OnlyOnceScriptLoader.prototype.triggerCallback = function (scriptSrc) {
 
-             var scriptCallbacks = this._callbackMap[scriptSrc];
 
-             delete this._callbackMap[scriptSrc];
 
-             for (var i = 0; i < scriptCallbacks.length; i++) {
 
-                 scriptCallbacks[i].callback();
 
-             }
 
-         };
 
-         OnlyOnceScriptLoader.prototype.triggerErrorback = function (scriptSrc, err) {
 
-             var scriptCallbacks = this._callbackMap[scriptSrc];
 
-             delete this._callbackMap[scriptSrc];
 
-             for (var i = 0; i < scriptCallbacks.length; i++) {
 
-                 scriptCallbacks[i].errorback(err);
 
-             }
 
-         };
 
-         return OnlyOnceScriptLoader;
 
-     }());
 
-     var BrowserScriptLoader = (function () {
 
-         function BrowserScriptLoader() {
 
-         }
 
-         
 
-         BrowserScriptLoader.prototype.attachListeners = function (script, callback, errorback) {
 
-             var unbind = function () {
 
-                 script.removeEventListener('load', loadEventListener);
 
-                 script.removeEventListener('error', errorEventListener);
 
-             };
 
-             var loadEventListener = function (e) {
 
-                 unbind();
 
-                 callback();
 
-             };
 
-             var errorEventListener = function (e) {
 
-                 unbind();
 
-                 errorback(e);
 
-             };
 
-             script.addEventListener('load', loadEventListener);
 
-             script.addEventListener('error', errorEventListener);
 
-         };
 
-         BrowserScriptLoader.prototype.load = function (moduleManager, scriptSrc, callback, errorback) {
 
-             var script = document.createElement('script');
 
-             script.setAttribute('async', 'async');
 
-             script.setAttribute('type', 'text/javascript');
 
-             this.attachListeners(script, callback, errorback);
 
-             script.setAttribute('src', scriptSrc);
 
-             
 
-             var cspNonce = moduleManager.getConfig().getOptionsLiteral().cspNonce;
 
-             if (cspNonce) {
 
-                 script.setAttribute('nonce', cspNonce);
 
-             }
 
-             document.getElementsByTagName('head')[0].appendChild(script);
 
-         };
 
-         return BrowserScriptLoader;
 
-     }());
 
-     var WorkerScriptLoader = (function () {
 
-         function WorkerScriptLoader() {
 
-         }
 
-         WorkerScriptLoader.prototype.load = function (moduleManager, scriptSrc, callback, errorback) {
 
-             try {
 
-                 importScripts(scriptSrc);
 
-                 callback();
 
-             }
 
-             catch (e) {
 
-                 errorback(e);
 
-             }
 
-         };
 
-         return WorkerScriptLoader;
 
-     }());
 
-     var NodeScriptLoader = (function () {
 
-         function NodeScriptLoader(env) {
 
-             this._env = env;
 
-             this._didInitialize = false;
 
-             this._didPatchNodeRequire = false;
 
-         }
 
-         NodeScriptLoader.prototype._init = function (nodeRequire) {
 
-             if (this._didInitialize) {
 
-                 return;
 
-             }
 
-             this._didInitialize = true;
 
-             
 
-             this._fs = nodeRequire('fs');
 
-             this._vm = nodeRequire('vm');
 
-             this._path = nodeRequire('path');
 
-             this._crypto = nodeRequire('crypto');
 
-             
 
-             this._jsflags = '';
 
-             for (var _i = 0, _a = process.argv; _i < _a.length; _i++) {
 
-                 var arg = _a[_i];
 
-                 if (arg.indexOf('--js-flags=') === 0) {
 
-                     this._jsflags = arg;
 
-                     break;
 
-                 }
 
-             }
 
-         };
 
-         
 
-         
 
-         NodeScriptLoader.prototype._initNodeRequire = function (nodeRequire, moduleManager) {
 
-             var nodeCachedDataDir = moduleManager.getConfig().getOptionsLiteral().nodeCachedDataDir;
 
-             if (!nodeCachedDataDir || this._didPatchNodeRequire) {
 
-                 return;
 
-             }
 
-             this._didPatchNodeRequire = true;
 
-             var that = this;
 
-             var Module = nodeRequire('module');
 
-             function makeRequireFunction(mod) {
 
-                 var Module = mod.constructor;
 
-                 var require = function require(path) {
 
-                     try {
 
-                         return mod.require(path);
 
-                     }
 
-                     finally {
 
-                         
 
-                     }
 
-                 };
 
-                 require.resolve = function resolve(request) {
 
-                     return Module._resolveFilename(request, mod);
 
-                 };
 
-                 require.main = process.mainModule;
 
-                 require.extensions = Module._extensions;
 
-                 require.cache = Module._cache;
 
-                 return require;
 
-             }
 
-             Module.prototype._compile = function (content, filename) {
 
-                 
 
-                 content = content.replace(/^#!.*/, '');
 
-                 
 
-                 var wrapper = Module.wrap(content);
 
-                 var cachedDataPath = that._getCachedDataPath(nodeCachedDataDir, filename);
 
-                 var options = { filename: filename };
 
-                 try {
 
-                     options.cachedData = that._fs.readFileSync(cachedDataPath);
 
-                 }
 
-                 catch (e) {
 
-                     options.produceCachedData = true;
 
-                 }
 
-                 var script = new that._vm.Script(wrapper, options);
 
-                 var compileWrapper = script.runInThisContext(options);
 
-                 var dirname = that._path.dirname(filename);
 
-                 var require = makeRequireFunction(this);
 
-                 var args = [this.exports, require, this, filename, dirname, process, _commonjsGlobal, Buffer];
 
-                 var result = compileWrapper.apply(this.exports, args);
 
-                 that._processCachedData(moduleManager, script, cachedDataPath);
 
-                 return result;
 
-             };
 
-         };
 
-         NodeScriptLoader.prototype.load = function (moduleManager, scriptSrc, callback, errorback) {
 
-             var _this = this;
 
-             var opts = moduleManager.getConfig().getOptionsLiteral();
 
-             var nodeRequire = (opts.nodeRequire || AMDLoader.global.nodeRequire);
 
-             var nodeInstrumenter = (opts.nodeInstrumenter || function (c) { return c; });
 
-             this._init(nodeRequire);
 
-             this._initNodeRequire(nodeRequire, moduleManager);
 
-             var recorder = moduleManager.getRecorder();
 
-             if (/^node\|/.test(scriptSrc)) {
 
-                 var pieces = scriptSrc.split('|');
 
-                 var moduleExports_1 = null;
 
-                 try {
 
-                     moduleExports_1 = nodeRequire(pieces[1]);
 
-                 }
 
-                 catch (err) {
 
-                     errorback(err);
 
-                     return;
 
-                 }
 
-                 moduleManager.enqueueDefineAnonymousModule([], function () { return moduleExports_1; });
 
-                 callback();
 
-             }
 
-             else {
 
-                 scriptSrc = AMDLoader.Utilities.fileUriToFilePath(this._env.isWindows, scriptSrc);
 
-                 this._fs.readFile(scriptSrc, { encoding: 'utf8' }, function (err, data) {
 
-                     if (err) {
 
-                         errorback(err);
 
-                         return;
 
-                     }
 
-                     var normalizedScriptSrc = _this._path.normalize(scriptSrc);
 
-                     var vmScriptSrc = normalizedScriptSrc;
 
-                     
 
-                     if (_this._env.isElectronRenderer) {
 
-                         var driveLetterMatch = vmScriptSrc.match(/^([a-z])\:(.*)/i);
 
-                         if (driveLetterMatch) {
 
-                             
 
-                             vmScriptSrc = "file:///" + (driveLetterMatch[1].toUpperCase() + ':' + driveLetterMatch[2]).replace(/\\/g, '/');
 
-                         }
 
-                         else {
 
-                             
 
-                             vmScriptSrc = "file://" + vmScriptSrc;
 
-                         }
 
-                     }
 
-                     var contents, prefix = '(function (require, define, __filename, __dirname) { ', suffix = '\n});';
 
-                     if (data.charCodeAt(0) === NodeScriptLoader._BOM) {
 
-                         contents = prefix + data.substring(1) + suffix;
 
-                     }
 
-                     else {
 
-                         contents = prefix + data + suffix;
 
-                     }
 
-                     contents = nodeInstrumenter(contents, normalizedScriptSrc);
 
-                     if (!opts.nodeCachedDataDir) {
 
-                         _this._loadAndEvalScript(moduleManager, scriptSrc, vmScriptSrc, contents, { filename: vmScriptSrc }, recorder, callback, errorback);
 
-                     }
 
-                     else {
 
-                         var cachedDataPath_1 = _this._getCachedDataPath(opts.nodeCachedDataDir, scriptSrc);
 
-                         _this._fs.readFile(cachedDataPath_1, function (err, cachedData) {
 
-                             
 
-                             var options = {
 
-                                 filename: vmScriptSrc,
 
-                                 produceCachedData: typeof cachedData === 'undefined',
 
-                                 cachedData: cachedData
 
-                             };
 
-                             var script = _this._loadAndEvalScript(moduleManager, scriptSrc, vmScriptSrc, contents, options, recorder, callback, errorback);
 
-                             _this._processCachedData(moduleManager, script, cachedDataPath_1);
 
-                         });
 
-                     }
 
-                 });
 
-             }
 
-         };
 
-         NodeScriptLoader.prototype._loadAndEvalScript = function (moduleManager, scriptSrc, vmScriptSrc, contents, options, recorder, callback, errorback) {
 
-             
 
-             recorder.record(31 , scriptSrc);
 
-             var script = new this._vm.Script(contents, options);
 
-             var r = script.runInThisContext(options);
 
-             var globalDefineFunc = moduleManager.getGlobalAMDDefineFunc();
 
-             var receivedDefineCall = false;
 
-             var localDefineFunc = function () {
 
-                 receivedDefineCall = true;
 
-                 return globalDefineFunc.apply(null, arguments);
 
-             };
 
-             localDefineFunc.amd = globalDefineFunc.amd;
 
-             r.call(AMDLoader.global, moduleManager.getGlobalAMDRequireFunc(), localDefineFunc, vmScriptSrc, this._path.dirname(scriptSrc));
 
-             
 
-             recorder.record(32 , scriptSrc);
 
-             if (receivedDefineCall) {
 
-                 callback();
 
-             }
 
-             else {
 
-                 errorback(new Error("Didn't receive define call in " + scriptSrc + "!"));
 
-             }
 
-             return script;
 
-         };
 
-         NodeScriptLoader.prototype._getCachedDataPath = function (basedir, filename) {
 
-             var hash = this._crypto.createHash('md5').update(filename, 'utf8').update(this._jsflags, 'utf8').digest('hex');
 
-             var basename = this._path.basename(filename).replace(/\.js$/, '');
 
-             return this._path.join(basedir, basename + "-" + hash + ".code");
 
-         };
 
-         NodeScriptLoader.prototype._processCachedData = function (moduleManager, script, cachedDataPath) {
 
-             var _this = this;
 
-             if (script.cachedDataRejected) {
 
-                 
 
-                 moduleManager.getConfig().getOptionsLiteral().onNodeCachedData({
 
-                     errorCode: 'cachedDataRejected',
 
-                     path: cachedDataPath
 
-                 });
 
-                 NodeScriptLoader._runSoon(function () {
 
-                     return _this._fs.unlink(cachedDataPath, function (err) {
 
-                         if (err) {
 
-                             moduleManager.getConfig().getOptionsLiteral().onNodeCachedData({
 
-                                 errorCode: 'unlink',
 
-                                 path: cachedDataPath,
 
-                                 detail: err
 
-                             });
 
-                         }
 
-                     });
 
-                 }, moduleManager.getConfig().getOptionsLiteral().nodeCachedDataWriteDelay);
 
-             }
 
-             else if (script.cachedDataProduced) {
 
-                 
 
-                 moduleManager.getConfig().getOptionsLiteral().onNodeCachedData(undefined, {
 
-                     path: cachedDataPath,
 
-                     length: script.cachedData.length
 
-                 });
 
-                 
 
-                 NodeScriptLoader._runSoon(function () {
 
-                     return _this._fs.writeFile(cachedDataPath, script.cachedData, function (err) {
 
-                         if (err) {
 
-                             moduleManager.getConfig().getOptionsLiteral().onNodeCachedData({
 
-                                 errorCode: 'writeFile',
 
-                                 path: cachedDataPath,
 
-                                 detail: err
 
-                             });
 
-                         }
 
-                     });
 
-                 }, moduleManager.getConfig().getOptionsLiteral().nodeCachedDataWriteDelay);
 
-             }
 
-         };
 
-         NodeScriptLoader._runSoon = function (callback, minTimeout) {
 
-             var timeout = minTimeout + Math.ceil(Math.random() * minTimeout);
 
-             setTimeout(callback, timeout);
 
-         };
 
-         return NodeScriptLoader;
 
-     }());
 
-     NodeScriptLoader._BOM = 0xFEFF;
 
-     function createScriptLoader(env) {
 
-         return new OnlyOnceScriptLoader(env);
 
-     }
 
-     AMDLoader.createScriptLoader = createScriptLoader;
 
- })(AMDLoader || (AMDLoader = {}));
 
- var AMDLoader;
 
- (function (AMDLoader) {
 
-     
 
-     
 
-     var ModuleIdResolver = (function () {
 
-         function ModuleIdResolver(fromModuleId) {
 
-             var lastSlash = fromModuleId.lastIndexOf('/');
 
-             if (lastSlash !== -1) {
 
-                 this.fromModulePath = fromModuleId.substr(0, lastSlash + 1);
 
-             }
 
-             else {
 
-                 this.fromModulePath = '';
 
-             }
 
-         }
 
-         
 
-         ModuleIdResolver._normalizeModuleId = function (moduleId) {
 
-             var r = moduleId, pattern;
 
-             
 
-             pattern = /\/\.\//;
 
-             while (pattern.test(r)) {
 
-                 r = r.replace(pattern, '/');
 
-             }
 
-             
 
-             r = r.replace(/^\.\//g, '');
 
-             
 
-             pattern = /\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;
 
-             while (pattern.test(r)) {
 
-                 r = r.replace(pattern, '/');
 
-             }
 
-             
 
-             r = r.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//, '');
 
-             return r;
 
-         };
 
-         
 
-         ModuleIdResolver.prototype.resolveModule = function (moduleId) {
 
-             var result = moduleId;
 
-             if (!AMDLoader.Utilities.isAbsolutePath(result)) {
 
-                 if (AMDLoader.Utilities.startsWith(result, './') || AMDLoader.Utilities.startsWith(result, '../')) {
 
-                     result = ModuleIdResolver._normalizeModuleId(this.fromModulePath + result);
 
-                 }
 
-             }
 
-             return result;
 
-         };
 
-         return ModuleIdResolver;
 
-     }());
 
-     ModuleIdResolver.ROOT = new ModuleIdResolver('');
 
-     AMDLoader.ModuleIdResolver = ModuleIdResolver;
 
-     
 
-     
 
-     var Module = (function () {
 
-         function Module(id, strId, dependencies, callback, errorback, moduleIdResolver) {
 
-             this.id = id;
 
-             this.strId = strId;
 
-             this.dependencies = dependencies;
 
-             this._callback = callback;
 
-             this._errorback = errorback;
 
-             this.moduleIdResolver = moduleIdResolver;
 
-             this.exports = {};
 
-             this.exportsPassedIn = false;
 
-             this.unresolvedDependenciesCount = this.dependencies.length;
 
-             this._isComplete = false;
 
-         }
 
-         Module._safeInvokeFunction = function (callback, args) {
 
-             try {
 
-                 return {
 
-                     returnedValue: callback.apply(AMDLoader.global, args),
 
-                     producedError: null
 
-                 };
 
-             }
 
-             catch (e) {
 
-                 return {
 
-                     returnedValue: null,
 
-                     producedError: e
 
-                 };
 
-             }
 
-         };
 
-         Module._invokeFactory = function (config, strModuleId, callback, dependenciesValues) {
 
-             if (config.isBuild() && !AMDLoader.Utilities.isAnonymousModule(strModuleId)) {
 
-                 return {
 
-                     returnedValue: null,
 
-                     producedError: null
 
-                 };
 
-             }
 
-             if (config.shouldCatchError()) {
 
-                 return this._safeInvokeFunction(callback, dependenciesValues);
 
-             }
 
-             return {
 
-                 returnedValue: callback.apply(AMDLoader.global, dependenciesValues),
 
-                 producedError: null
 
-             };
 
-         };
 
-         Module.prototype.complete = function (recorder, config, dependenciesValues) {
 
-             this._isComplete = true;
 
-             var producedError = null;
 
-             if (this._callback) {
 
-                 if (typeof this._callback === 'function') {
 
-                     recorder.record(21 , this.strId);
 
-                     var r = Module._invokeFactory(config, this.strId, this._callback, dependenciesValues);
 
-                     producedError = r.producedError;
 
-                     recorder.record(22 , this.strId);
 
-                     if (!producedError && typeof r.returnedValue !== 'undefined' && (!this.exportsPassedIn || AMDLoader.Utilities.isEmpty(this.exports))) {
 
-                         this.exports = r.returnedValue;
 
-                     }
 
-                 }
 
-                 else {
 
-                     this.exports = this._callback;
 
-                 }
 
-             }
 
-             if (producedError) {
 
-                 config.onError({
 
-                     errorCode: 'factory',
 
-                     moduleId: this.strId,
 
-                     detail: producedError
 
-                 });
 
-             }
 
-             this.dependencies = null;
 
-             this._callback = null;
 
-             this._errorback = null;
 
-             this.moduleIdResolver = null;
 
-         };
 
-         
 
-         Module.prototype.onDependencyError = function (err) {
 
-             if (this._errorback) {
 
-                 this._errorback(err);
 
-                 return true;
 
-             }
 
-             return false;
 
-         };
 
-         
 
-         Module.prototype.isComplete = function () {
 
-             return this._isComplete;
 
-         };
 
-         return Module;
 
-     }());
 
-     AMDLoader.Module = Module;
 
-     var ModuleIdProvider = (function () {
 
-         function ModuleIdProvider() {
 
-             this._nextId = 0;
 
-             this._strModuleIdToIntModuleId = new Map();
 
-             this._intModuleIdToStrModuleId = [];
 
-             
 
-             this.getModuleId('exports');
 
-             this.getModuleId('module');
 
-             this.getModuleId('require');
 
-         }
 
-         ModuleIdProvider.prototype.getMaxModuleId = function () {
 
-             return this._nextId;
 
-         };
 
-         ModuleIdProvider.prototype.getModuleId = function (strModuleId) {
 
-             var id = this._strModuleIdToIntModuleId.get(strModuleId);
 
-             if (typeof id === 'undefined') {
 
-                 id = this._nextId++;
 
-                 this._strModuleIdToIntModuleId.set(strModuleId, id);
 
-                 this._intModuleIdToStrModuleId[id] = strModuleId;
 
-             }
 
-             return id;
 
-         };
 
-         ModuleIdProvider.prototype.getStrModuleId = function (moduleId) {
 
-             return this._intModuleIdToStrModuleId[moduleId];
 
-         };
 
-         return ModuleIdProvider;
 
-     }());
 
-     var RegularDependency = (function () {
 
-         function RegularDependency(id) {
 
-             this.id = id;
 
-         }
 
-         return RegularDependency;
 
-     }());
 
-     RegularDependency.EXPORTS = new RegularDependency(0 );
 
-     RegularDependency.MODULE = new RegularDependency(1 );
 
-     RegularDependency.REQUIRE = new RegularDependency(2 );
 
-     AMDLoader.RegularDependency = RegularDependency;
 
-     var PluginDependency = (function () {
 
-         function PluginDependency(id, pluginId, pluginParam) {
 
-             this.id = id;
 
-             this.pluginId = pluginId;
 
-             this.pluginParam = pluginParam;
 
-         }
 
-         return PluginDependency;
 
-     }());
 
-     AMDLoader.PluginDependency = PluginDependency;
 
-     var ModuleManager = (function () {
 
-         function ModuleManager(env, scriptLoader, defineFunc, requireFunc, loaderAvailableTimestamp) {
 
-             if (loaderAvailableTimestamp === void 0) { loaderAvailableTimestamp = 0; }
 
-             this._env = env;
 
-             this._scriptLoader = scriptLoader;
 
-             this._loaderAvailableTimestamp = loaderAvailableTimestamp;
 
-             this._defineFunc = defineFunc;
 
-             this._requireFunc = requireFunc;
 
-             this._moduleIdProvider = new ModuleIdProvider();
 
-             this._config = new AMDLoader.Configuration(this._env);
 
-             this._modules2 = [];
 
-             this._knownModules2 = [];
 
-             this._inverseDependencies2 = [];
 
-             this._inversePluginDependencies2 = new Map();
 
-             this._currentAnnonymousDefineCall = null;
 
-             this._recorder = null;
 
-             this._buildInfoPath = [];
 
-             this._buildInfoDefineStack = [];
 
-             this._buildInfoDependencies = [];
 
-         }
 
-         ModuleManager.prototype.reset = function () {
 
-             return new ModuleManager(this._env, this._scriptLoader, this._defineFunc, this._requireFunc, this._loaderAvailableTimestamp);
 
-         };
 
-         ModuleManager.prototype.getGlobalAMDDefineFunc = function () {
 
-             return this._defineFunc;
 
-         };
 
-         ModuleManager.prototype.getGlobalAMDRequireFunc = function () {
 
-             return this._requireFunc;
 
-         };
 
-         ModuleManager._findRelevantLocationInStack = function (needle, stack) {
 
-             var normalize = function (str) { return str.replace(/\\/g, '/'); };
 
-             var normalizedPath = normalize(needle);
 
-             var stackPieces = stack.split(/\n/);
 
-             for (var i = 0; i < stackPieces.length; i++) {
 
-                 var m = stackPieces[i].match(/(.*):(\d+):(\d+)\)?$/);
 
-                 if (m) {
 
-                     var stackPath = m[1];
 
-                     var stackLine = m[2];
 
-                     var stackColumn = m[3];
 
-                     var trimPathOffset = Math.max(stackPath.lastIndexOf(' ') + 1, stackPath.lastIndexOf('(') + 1);
 
-                     stackPath = stackPath.substr(trimPathOffset);
 
-                     stackPath = normalize(stackPath);
 
-                     if (stackPath === normalizedPath) {
 
-                         var r = {
 
-                             line: parseInt(stackLine, 10),
 
-                             col: parseInt(stackColumn, 10)
 
-                         };
 
-                         if (r.line === 1) {
 
-                             r.col -= '(function (require, define, __filename, __dirname) { '.length;
 
-                         }
 
-                         return r;
 
-                     }
 
-                 }
 
-             }
 
-             throw new Error('Could not correlate define call site for needle ' + needle);
 
-         };
 
-         ModuleManager.prototype.getBuildInfo = function () {
 
-             if (!this._config.isBuild()) {
 
-                 return null;
 
-             }
 
-             var result = [], resultLen = 0;
 
-             for (var i = 0, len = this._modules2.length; i < len; i++) {
 
-                 var m = this._modules2[i];
 
-                 if (!m) {
 
-                     continue;
 
-                 }
 
-                 var location_1 = this._buildInfoPath[m.id] || null;
 
-                 var defineStack = this._buildInfoDefineStack[m.id] || null;
 
-                 var dependencies = this._buildInfoDependencies[m.id];
 
-                 result[resultLen++] = {
 
-                     id: m.strId,
 
-                     path: location_1,
 
-                     defineLocation: (location_1 && defineStack ? ModuleManager._findRelevantLocationInStack(location_1, defineStack) : null),
 
-                     dependencies: dependencies,
 
-                     shim: null,
 
-                     exports: m.exports
 
-                 };
 
-             }
 
-             return result;
 
-         };
 
-         ModuleManager.prototype.getRecorder = function () {
 
-             if (!this._recorder) {
 
-                 if (this._config.shouldRecordStats()) {
 
-                     this._recorder = new AMDLoader.LoaderEventRecorder(this._loaderAvailableTimestamp);
 
-                 }
 
-                 else {
 
-                     this._recorder = AMDLoader.NullLoaderEventRecorder.INSTANCE;
 
-                 }
 
-             }
 
-             return this._recorder;
 
-         };
 
-         ModuleManager.prototype.getLoaderEvents = function () {
 
-             return this.getRecorder().getEvents();
 
-         };
 
-         
 
-         ModuleManager.prototype.enqueueDefineAnonymousModule = function (dependencies, callback) {
 
-             if (this._currentAnnonymousDefineCall !== null) {
 
-                 throw new Error('Can only have one anonymous define call per script file');
 
-             }
 
-             var stack = null;
 
-             if (this._config.isBuild()) {
 
-                 stack = new Error('StackLocation').stack;
 
-             }
 
-             this._currentAnnonymousDefineCall = {
 
-                 stack: stack,
 
-                 dependencies: dependencies,
 
-                 callback: callback
 
-             };
 
-         };
 
-         
 
-         ModuleManager.prototype.defineModule = function (strModuleId, dependencies, callback, errorback, stack, moduleIdResolver) {
 
-             var _this = this;
 
-             if (moduleIdResolver === void 0) { moduleIdResolver = new ModuleIdResolver(strModuleId); }
 
-             var moduleId = this._moduleIdProvider.getModuleId(strModuleId);
 
-             if (this._modules2[moduleId]) {
 
-                 if (!this._config.isDuplicateMessageIgnoredFor(strModuleId)) {
 
-                     console.warn('Duplicate definition of module \'' + strModuleId + '\'');
 
-                 }
 
-                 
 
-                 return;
 
-             }
 
-             var m = new Module(moduleId, strModuleId, this._normalizeDependencies(dependencies, moduleIdResolver), callback, errorback, moduleIdResolver);
 
-             this._modules2[moduleId] = m;
 
-             if (this._config.isBuild()) {
 
-                 this._buildInfoDefineStack[moduleId] = stack;
 
-                 this._buildInfoDependencies[moduleId] = m.dependencies.map(function (dep) { return _this._moduleIdProvider.getStrModuleId(dep.id); });
 
-             }
 
-             
 
-             
 
-             this._resolve(m);
 
-         };
 
-         ModuleManager.prototype._normalizeDependency = function (dependency, moduleIdResolver) {
 
-             if (dependency === 'exports') {
 
-                 return RegularDependency.EXPORTS;
 
-             }
 
-             if (dependency === 'module') {
 
-                 return RegularDependency.MODULE;
 
-             }
 
-             if (dependency === 'require') {
 
-                 return RegularDependency.REQUIRE;
 
-             }
 
-             
 
-             var bangIndex = dependency.indexOf('!');
 
-             if (bangIndex >= 0) {
 
-                 var strPluginId = moduleIdResolver.resolveModule(dependency.substr(0, bangIndex));
 
-                 var pluginParam = moduleIdResolver.resolveModule(dependency.substr(bangIndex + 1));
 
-                 var dependencyId = this._moduleIdProvider.getModuleId(strPluginId + '!' + pluginParam);
 
-                 var pluginId = this._moduleIdProvider.getModuleId(strPluginId);
 
-                 return new PluginDependency(dependencyId, pluginId, pluginParam);
 
-             }
 
-             return new RegularDependency(this._moduleIdProvider.getModuleId(moduleIdResolver.resolveModule(dependency)));
 
-         };
 
-         ModuleManager.prototype._normalizeDependencies = function (dependencies, moduleIdResolver) {
 
-             var result = [], resultLen = 0;
 
-             for (var i = 0, len = dependencies.length; i < len; i++) {
 
-                 result[resultLen++] = this._normalizeDependency(dependencies[i], moduleIdResolver);
 
-             }
 
-             return result;
 
-         };
 
-         ModuleManager.prototype._relativeRequire = function (moduleIdResolver, dependencies, callback, errorback) {
 
-             if (typeof dependencies === 'string') {
 
-                 return this.synchronousRequire(dependencies, moduleIdResolver);
 
-             }
 
-             this.defineModule(AMDLoader.Utilities.generateAnonymousModule(), dependencies, callback, errorback, null, moduleIdResolver);
 
-         };
 
-         
 
-         ModuleManager.prototype.synchronousRequire = function (_strModuleId, moduleIdResolver) {
 
-             if (moduleIdResolver === void 0) { moduleIdResolver = new ModuleIdResolver(_strModuleId); }
 
-             var dependency = this._normalizeDependency(_strModuleId, moduleIdResolver);
 
-             var m = this._modules2[dependency.id];
 
-             if (!m) {
 
-                 throw new Error('Check dependency list! Synchronous require cannot resolve module \'' + _strModuleId + '\'. This is the first mention of this module!');
 
-             }
 
-             if (!m.isComplete()) {
 
-                 throw new Error('Check dependency list! Synchronous require cannot resolve module \'' + _strModuleId + '\'. This module has not been resolved completely yet.');
 
-             }
 
-             return m.exports;
 
-         };
 
-         ModuleManager.prototype.configure = function (params, shouldOverwrite) {
 
-             var oldShouldRecordStats = this._config.shouldRecordStats();
 
-             if (shouldOverwrite) {
 
-                 this._config = new AMDLoader.Configuration(this._env, params);
 
-             }
 
-             else {
 
-                 this._config = this._config.cloneAndMerge(params);
 
-             }
 
-             if (this._config.shouldRecordStats() && !oldShouldRecordStats) {
 
-                 this._recorder = null;
 
-             }
 
-         };
 
-         ModuleManager.prototype.getConfig = function () {
 
-             return this._config;
 
-         };
 
-         
 
-         ModuleManager.prototype._onLoad = function (moduleId) {
 
-             if (this._currentAnnonymousDefineCall !== null) {
 
-                 var defineCall = this._currentAnnonymousDefineCall;
 
-                 this._currentAnnonymousDefineCall = null;
 
-                 
 
-                 this.defineModule(this._moduleIdProvider.getStrModuleId(moduleId), defineCall.dependencies, defineCall.callback, null, defineCall.stack);
 
-             }
 
-         };
 
-         ModuleManager.prototype._createLoadError = function (moduleId, err) {
 
-             var _this = this;
 
-             var strModuleId = this._moduleIdProvider.getStrModuleId(moduleId);
 
-             var neededBy = (this._inverseDependencies2[moduleId] || []).map(function (intModuleId) { return _this._moduleIdProvider.getStrModuleId(intModuleId); });
 
-             return {
 
-                 errorCode: 'load',
 
-                 moduleId: strModuleId,
 
-                 neededBy: neededBy,
 
-                 detail: err
 
-             };
 
-         };
 
-         
 
-         ModuleManager.prototype._onLoadError = function (moduleId, err) {
 
-             var error = this._createLoadError(moduleId, err);
 
-             
 
-             var seenModuleId = [];
 
-             for (var i = 0, len = this._moduleIdProvider.getMaxModuleId(); i < len; i++) {
 
-                 seenModuleId[i] = false;
 
-             }
 
-             var someoneNotified = false;
 
-             var queue = [];
 
-             queue.push(moduleId);
 
-             seenModuleId[moduleId] = true;
 
-             while (queue.length > 0) {
 
-                 var queueElement = queue.shift();
 
-                 var m = this._modules2[queueElement];
 
-                 if (m) {
 
-                     someoneNotified = m.onDependencyError(error) || someoneNotified;
 
-                 }
 
-                 var inverseDeps = this._inverseDependencies2[queueElement];
 
-                 if (inverseDeps) {
 
-                     for (var i = 0, len = inverseDeps.length; i < len; i++) {
 
-                         var inverseDep = inverseDeps[i];
 
-                         if (!seenModuleId[inverseDep]) {
 
-                             queue.push(inverseDep);
 
-                             seenModuleId[inverseDep] = true;
 
-                         }
 
-                     }
 
-                 }
 
-             }
 
-             if (!someoneNotified) {
 
-                 this._config.onError(error);
 
-             }
 
-         };
 
-         
 
-         ModuleManager.prototype._hasDependencyPath = function (fromId, toId) {
 
-             var from = this._modules2[fromId];
 
-             if (!from) {
 
-                 return false;
 
-             }
 
-             var inQueue = [];
 
-             for (var i = 0, len = this._moduleIdProvider.getMaxModuleId(); i < len; i++) {
 
-                 inQueue[i] = false;
 
-             }
 
-             var queue = [];
 
-             
 
-             queue.push(from);
 
-             inQueue[fromId] = true;
 
-             while (queue.length > 0) {
 
-                 
 
-                 var element = queue.shift();
 
-                 var dependencies = element.dependencies;
 
-                 if (dependencies) {
 
-                     
 
-                     for (var i = 0, len = dependencies.length; i < len; i++) {
 
-                         var dependency = dependencies[i];
 
-                         if (dependency.id === toId) {
 
-                             
 
-                             return true;
 
-                         }
 
-                         var dependencyModule = this._modules2[dependency.id];
 
-                         if (dependencyModule && !inQueue[dependency.id]) {
 
-                             
 
-                             inQueue[dependency.id] = true;
 
-                             queue.push(dependencyModule);
 
-                         }
 
-                     }
 
-                 }
 
-             }
 
-             
 
-             return false;
 
-         };
 
-         
 
-         ModuleManager.prototype._findCyclePath = function (fromId, toId, depth) {
 
-             if (fromId === toId || depth === 50) {
 
-                 return [fromId];
 
-             }
 
-             var from = this._modules2[fromId];
 
-             if (!from) {
 
-                 return null;
 
-             }
 
-             
 
-             var dependencies = from.dependencies;
 
-             for (var i = 0, len = dependencies.length; i < len; i++) {
 
-                 var path = this._findCyclePath(dependencies[i].id, toId, depth + 1);
 
-                 if (path !== null) {
 
-                     path.push(fromId);
 
-                     return path;
 
-                 }
 
-             }
 
-             return null;
 
-         };
 
-         
 
-         ModuleManager.prototype._createRequire = function (moduleIdResolver) {
 
-             var _this = this;
 
-             var result = (function (dependencies, callback, errorback) {
 
-                 return _this._relativeRequire(moduleIdResolver, dependencies, callback, errorback);
 
-             });
 
-             result.toUrl = function (id) {
 
-                 return _this._config.requireToUrl(moduleIdResolver.resolveModule(id));
 
-             };
 
-             result.getStats = function () {
 
-                 return _this.getLoaderEvents();
 
-             };
 
-             result.__$__nodeRequire = AMDLoader.global.nodeRequire;
 
-             return result;
 
-         };
 
-         ModuleManager.prototype._loadModule = function (moduleId) {
 
-             var _this = this;
 
-             if (this._modules2[moduleId] || this._knownModules2[moduleId]) {
 
-                 
 
-                 return;
 
-             }
 
-             this._knownModules2[moduleId] = true;
 
-             var strModuleId = this._moduleIdProvider.getStrModuleId(moduleId);
 
-             var paths = this._config.moduleIdToPaths(strModuleId);
 
-             var scopedPackageRegex = /^@[^\/]+\/[^\/]+$/; 
 
-             if (this._env.isNode && (strModuleId.indexOf('/') === -1 || scopedPackageRegex.test(strModuleId))) {
 
-                 paths.push('node|' + strModuleId);
 
-             }
 
-             var lastPathIndex = -1;
 
-             var loadNextPath = function (err) {
 
-                 lastPathIndex++;
 
-                 if (lastPathIndex >= paths.length) {
 
-                     
 
-                     _this._onLoadError(moduleId, err);
 
-                 }
 
-                 else {
 
-                     var currentPath_1 = paths[lastPathIndex];
 
-                     var recorder_1 = _this.getRecorder();
 
-                     if (_this._config.isBuild() && currentPath_1 === 'empty:') {
 
-                         _this._buildInfoPath[moduleId] = currentPath_1;
 
-                         _this.defineModule(_this._moduleIdProvider.getStrModuleId(moduleId), [], null, null, null);
 
-                         _this._onLoad(moduleId);
 
-                         return;
 
-                     }
 
-                     recorder_1.record(10 , currentPath_1);
 
-                     _this._scriptLoader.load(_this, currentPath_1, function () {
 
-                         if (_this._config.isBuild()) {
 
-                             _this._buildInfoPath[moduleId] = currentPath_1;
 
-                         }
 
-                         recorder_1.record(11 , currentPath_1);
 
-                         _this._onLoad(moduleId);
 
-                     }, function (err) {
 
-                         recorder_1.record(12 , currentPath_1);
 
-                         loadNextPath(err);
 
-                     });
 
-                 }
 
-             };
 
-             loadNextPath(null);
 
-         };
 
-         
 
-         ModuleManager.prototype._loadPluginDependency = function (plugin, pluginDependency) {
 
-             var _this = this;
 
-             if (this._modules2[pluginDependency.id] || this._knownModules2[pluginDependency.id]) {
 
-                 
 
-                 return;
 
-             }
 
-             this._knownModules2[pluginDependency.id] = true;
 
-             
 
-             var load = (function (value) {
 
-                 _this.defineModule(_this._moduleIdProvider.getStrModuleId(pluginDependency.id), [], value, null, null);
 
-             });
 
-             load.error = function (err) {
 
-                 _this._config.onError(_this._createLoadError(pluginDependency.id, err));
 
-             };
 
-             plugin.load(pluginDependency.pluginParam, this._createRequire(ModuleIdResolver.ROOT), load, this._config.getOptionsLiteral());
 
-         };
 
-         
 
-         ModuleManager.prototype._resolve = function (module) {
 
-             var _this = this;
 
-             var dependencies = module.dependencies;
 
-             for (var i = 0, len = dependencies.length; i < len; i++) {
 
-                 var dependency = dependencies[i];
 
-                 if (dependency === RegularDependency.EXPORTS) {
 
-                     module.exportsPassedIn = true;
 
-                     module.unresolvedDependenciesCount--;
 
-                     continue;
 
-                 }
 
-                 if (dependency === RegularDependency.MODULE) {
 
-                     module.unresolvedDependenciesCount--;
 
-                     continue;
 
-                 }
 
-                 if (dependency === RegularDependency.REQUIRE) {
 
-                     module.unresolvedDependenciesCount--;
 
-                     continue;
 
-                 }
 
-                 var dependencyModule = this._modules2[dependency.id];
 
-                 if (dependencyModule && dependencyModule.isComplete()) {
 
-                     module.unresolvedDependenciesCount--;
 
-                     continue;
 
-                 }
 
-                 if (this._hasDependencyPath(dependency.id, module.id)) {
 
-                     console.warn('There is a dependency cycle between \'' + this._moduleIdProvider.getStrModuleId(dependency.id) + '\' and \'' + this._moduleIdProvider.getStrModuleId(module.id) + '\'. The cyclic path follows:');
 
-                     var cyclePath = this._findCyclePath(dependency.id, module.id, 0);
 
-                     cyclePath.reverse();
 
-                     cyclePath.push(dependency.id);
 
-                     console.warn(cyclePath.map(function (id) { return _this._moduleIdProvider.getStrModuleId(id); }).join(' => \n'));
 
-                     
 
-                     module.unresolvedDependenciesCount--;
 
-                     continue;
 
-                 }
 
-                 
 
-                 this._inverseDependencies2[dependency.id] = this._inverseDependencies2[dependency.id] || [];
 
-                 this._inverseDependencies2[dependency.id].push(module.id);
 
-                 if (dependency instanceof PluginDependency) {
 
-                     var plugin = this._modules2[dependency.pluginId];
 
-                     if (plugin && plugin.isComplete()) {
 
-                         this._loadPluginDependency(plugin.exports, dependency);
 
-                         continue;
 
-                     }
 
-                     
 
-                     var inversePluginDeps = this._inversePluginDependencies2.get(dependency.pluginId);
 
-                     if (!inversePluginDeps) {
 
-                         inversePluginDeps = [];
 
-                         this._inversePluginDependencies2.set(dependency.pluginId, inversePluginDeps);
 
-                     }
 
-                     inversePluginDeps.push(dependency);
 
-                     this._loadModule(dependency.pluginId);
 
-                     continue;
 
-                 }
 
-                 this._loadModule(dependency.id);
 
-             }
 
-             if (module.unresolvedDependenciesCount === 0) {
 
-                 this._onModuleComplete(module);
 
-             }
 
-         };
 
-         ModuleManager.prototype._onModuleComplete = function (module) {
 
-             var _this = this;
 
-             var recorder = this.getRecorder();
 
-             if (module.isComplete()) {
 
-                 
 
-                 return;
 
-             }
 
-             var dependencies = module.dependencies;
 
-             var dependenciesValues = [];
 
-             for (var i = 0, len = dependencies.length; i < len; i++) {
 
-                 var dependency = dependencies[i];
 
-                 if (dependency === RegularDependency.EXPORTS) {
 
-                     dependenciesValues[i] = module.exports;
 
-                     continue;
 
-                 }
 
-                 if (dependency === RegularDependency.MODULE) {
 
-                     dependenciesValues[i] = {
 
-                         id: module.strId,
 
-                         config: function () {
 
-                             return _this._config.getConfigForModule(module.strId);
 
-                         }
 
-                     };
 
-                     continue;
 
-                 }
 
-                 if (dependency === RegularDependency.REQUIRE) {
 
-                     dependenciesValues[i] = this._createRequire(module.moduleIdResolver);
 
-                     continue;
 
-                 }
 
-                 var dependencyModule = this._modules2[dependency.id];
 
-                 if (dependencyModule) {
 
-                     dependenciesValues[i] = dependencyModule.exports;
 
-                     continue;
 
-                 }
 
-                 dependenciesValues[i] = null;
 
-             }
 
-             module.complete(recorder, this._config, dependenciesValues);
 
-             
 
-             var inverseDeps = this._inverseDependencies2[module.id];
 
-             this._inverseDependencies2[module.id] = null;
 
-             if (inverseDeps) {
 
-                 
 
-                 
 
-                 for (var i = 0, len = inverseDeps.length; i < len; i++) {
 
-                     var inverseDependencyId = inverseDeps[i];
 
-                     var inverseDependency = this._modules2[inverseDependencyId];
 
-                     inverseDependency.unresolvedDependenciesCount--;
 
-                     if (inverseDependency.unresolvedDependenciesCount === 0) {
 
-                         this._onModuleComplete(inverseDependency);
 
-                     }
 
-                 }
 
-             }
 
-             var inversePluginDeps = this._inversePluginDependencies2.get(module.id);
 
-             if (inversePluginDeps) {
 
-                 
 
-                 
 
-                 this._inversePluginDependencies2.delete(module.id);
 
-                 
 
-                 for (var i = 0, len = inversePluginDeps.length; i < len; i++) {
 
-                     this._loadPluginDependency(module.exports, inversePluginDeps[i]);
 
-                 }
 
-             }
 
-         };
 
-         return ModuleManager;
 
-     }());
 
-     AMDLoader.ModuleManager = ModuleManager;
 
- })(AMDLoader || (AMDLoader = {}));
 
- var define;
 
- var AMDLoader;
 
- (function (AMDLoader) {
 
-     var env = new AMDLoader.Environment();
 
-     var moduleManager = null;
 
-     var DefineFunc = function (id, dependencies, callback) {
 
-         if (typeof id !== 'string') {
 
-             callback = dependencies;
 
-             dependencies = id;
 
-             id = null;
 
-         }
 
-         if (typeof dependencies !== 'object' || !Array.isArray(dependencies)) {
 
-             callback = dependencies;
 
-             dependencies = null;
 
-         }
 
-         if (!dependencies) {
 
-             dependencies = ['require', 'exports', 'module'];
 
-         }
 
-         if (id) {
 
-             moduleManager.defineModule(id, dependencies, callback, null, null);
 
-         }
 
-         else {
 
-             moduleManager.enqueueDefineAnonymousModule(dependencies, callback);
 
-         }
 
-     };
 
-     DefineFunc.amd = {
 
-         jQuery: true
 
-     };
 
-     var _requireFunc_config = function (params, shouldOverwrite) {
 
-         if (shouldOverwrite === void 0) { shouldOverwrite = false; }
 
-         moduleManager.configure(params, shouldOverwrite);
 
-     };
 
-     var RequireFunc = function () {
 
-         if (arguments.length === 1) {
 
-             if ((arguments[0] instanceof Object) && !Array.isArray(arguments[0])) {
 
-                 _requireFunc_config(arguments[0]);
 
-                 return;
 
-             }
 
-             if (typeof arguments[0] === 'string') {
 
-                 return moduleManager.synchronousRequire(arguments[0]);
 
-             }
 
-         }
 
-         if (arguments.length === 2 || arguments.length === 3) {
 
-             if (Array.isArray(arguments[0])) {
 
-                 moduleManager.defineModule(AMDLoader.Utilities.generateAnonymousModule(), arguments[0], arguments[1], arguments[2], null);
 
-                 return;
 
-             }
 
-         }
 
-         throw new Error('Unrecognized require call');
 
-     };
 
-     RequireFunc.config = _requireFunc_config;
 
-     RequireFunc.getConfig = function () {
 
-         return moduleManager.getConfig().getOptionsLiteral();
 
-     };
 
-     RequireFunc.reset = function () {
 
-         moduleManager = moduleManager.reset();
 
-     };
 
-     RequireFunc.getBuildInfo = function () {
 
-         return moduleManager.getBuildInfo();
 
-     };
 
-     RequireFunc.getStats = function () {
 
-         return moduleManager.getLoaderEvents();
 
-     };
 
-     RequireFunc.define = function () {
 
-         return DefineFunc.apply(null, arguments);
 
-     };
 
-     function init() {
 
-         if (typeof AMDLoader.global.require !== 'undefined' || typeof require !== 'undefined') {
 
-             var _nodeRequire_1 = (AMDLoader.global.require || require);
 
-             if (typeof _nodeRequire_1 === 'function' && typeof _nodeRequire_1.resolve === 'function') {
 
-                 
 
-                 var nodeRequire = function (what) {
 
-                     moduleManager.getRecorder().record(33 , what);
 
-                     try {
 
-                         return _nodeRequire_1(what);
 
-                     }
 
-                     finally {
 
-                         moduleManager.getRecorder().record(34 , what);
 
-                     }
 
-                 };
 
-                 AMDLoader.global.nodeRequire = nodeRequire;
 
-                 RequireFunc.nodeRequire = nodeRequire;
 
-                 RequireFunc.__$__nodeRequire = nodeRequire;
 
-             }
 
-         }
 
-         if (env.isNode && !env.isElectronRenderer) {
 
-             module.exports = RequireFunc;
 
-             require = RequireFunc;
 
-         }
 
-         else {
 
-             if (!env.isElectronRenderer) {
 
-                 AMDLoader.global.define = DefineFunc;
 
-             }
 
-             AMDLoader.global.require = RequireFunc;
 
-         }
 
-     }
 
-     AMDLoader.init = init;
 
-     if (typeof AMDLoader.global.define !== 'function' || !AMDLoader.global.define.amd) {
 
-         moduleManager = new AMDLoader.ModuleManager(env, AMDLoader.createScriptLoader(env), DefineFunc, RequireFunc, AMDLoader.Utilities.getHighPerformanceTimestamp());
 
-         
 
-         if (typeof AMDLoader.global.require !== 'undefined' && typeof AMDLoader.global.require !== 'function') {
 
-             RequireFunc.config(AMDLoader.global.require);
 
-         }
 
-         
 
-         define = function () {
 
-             return DefineFunc.apply(null, arguments);
 
-         };
 
-         define.amd = DefineFunc.amd;
 
-         if (typeof doNotInitLoader === 'undefined') {
 
-             init();
 
-         }
 
-     }
 
- })(AMDLoader || (AMDLoader = {}));
 
 
  |