diff --git a/CHANGELOG.md b/CHANGELOG.md index caa58dc..6f41ee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ + +# 1.0.2 (2015-07-10) + + +## Bug Fixes + +- add extra condition to improve karma testing + ([f0c33aae](https://github.com/ocombe/ocLazyLoad/commit/f0c33aaea84511a276dd946dd48bfe2cb20d1e73)) + + +## Features + +- add interoperability with CommonJS + ([b0536ad4](https://github.com/ocombe/ocLazyLoad/commit/b0536ad4104467922c36bcf55a8a072343d102bc)) + + # 1.0.1 (2015-06-01) diff --git a/bower.json b/bower.json index 5aa9097..0506b73 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "oclazyload", - "version": "1.0.1", + "version": "1.0.2", "description": "Load modules on demand (lazy load) with angularJS", "main": "dist/ocLazyLoad.js", "homepage": "https://github.com/ocombe/ocLazyLoad", diff --git a/dist/modules/ocLazyLoad.core.js b/dist/modules/ocLazyLoad.core.js index 4161eae..7488bb5 100644 --- a/dist/modules/ocLazyLoad.core.js +++ b/dist/modules/ocLazyLoad.core.js @@ -71,7 +71,7 @@ names[name] = true; append(document.getElementById(name)); name = name.replace(':', '\\:'); - if (element[0].querySelectorAll) { + if (typeof element[0] !== 'undefined' && element[0].querySelectorAll) { angular.forEach(element[0].querySelectorAll('.' + name), append); angular.forEach(element[0].querySelectorAll('.' + name + '\\:'), append); angular.forEach(element[0].querySelectorAll('[' + name + ']'), append); diff --git a/dist/modules/ocLazyLoad.loaders.requirejsLoader.js b/dist/modules/ocLazyLoad.loaders.requireJSLoader.js similarity index 100% rename from dist/modules/ocLazyLoad.loaders.requirejsLoader.js rename to dist/modules/ocLazyLoad.loaders.requireJSLoader.js diff --git a/dist/ocLazyLoad.js b/dist/ocLazyLoad.js index 8bce4bb..d7881c6 100644 --- a/dist/ocLazyLoad.js +++ b/dist/ocLazyLoad.js @@ -1,6 +1,6 @@ /** * oclazyload - Load modules on demand (lazy load) with angularJS - * @version v1.0.1 + * @version v1.0.2 * @link https://github.com/ocombe/ocLazyLoad * @license MIT * @author Olivier Combe @@ -78,7 +78,7 @@ names[name] = true; append(document.getElementById(name)); name = name.replace(':', '\\:'); - if (element[0].querySelectorAll) { + if (typeof element[0] !== 'undefined' && element[0].querySelectorAll) { angular.forEach(element[0].querySelectorAll('.' + name), append); angular.forEach(element[0].querySelectorAll('.' + name + '\\:'), append); angular.forEach(element[0].querySelectorAll('[' + name + ']'), append); diff --git a/dist/ocLazyLoad.js.map b/dist/ocLazyLoad.js.map index dc6f36c..959f1e1 100644 --- a/dist/ocLazyLoad.js.map +++ b/dist/ocLazyLoad.js.map @@ -1 +1 @@ -{"version":3,"sources":["ocLazyLoad.core.js","ocLazyLoad.directive.js","ocLazyLoad.loaders.common.js","ocLazyLoad.loaders.core.js","ocLazyLoad.loaders.cssLoader.js","ocLazyLoad.loaders.jsLoader.js","ocLazyLoad.loaders.templatesLoader.js","ocLazyLoad.polyfill.ie8.js"],"names":[],"mappings":"AAAA,CAAC,UAAC,SAAS,QAAW;IAClB;;IAEA,IAAI,aAAa,CAAC,MAAM;QACpB,aAAa;QACb,aAAa;QACb,gBAAgB;QAChB,qBAAqB;QACrB,YAAY,QAAQ;QACpB,YAAY;QACZ,aAAa;;IAEjB,IAAI,aAAa,QAAQ,OAAO,eAAe,CAAC;;IAEhD,WAAW,SAAS,2HAAe,UAAS,qBAAqB,UAAU,kBAAkB,iBAAiB,WAAW,kBAAkB;QACvI,IAAI,UAAU;YACV,YAAY;YACR,qBAAqB;YACrB,kBAAkB;YAClB,iBAAiB;YACjB,UAAU;YACV,WAAW;YACX,kBAAkB;;YAEtB,QAAQ;YACR,SAAS;YACT,cAAc;;QAElB,YAAY,OAAO,UAAS,OAAO;YAC/B,IAAG,KAAK,QAAQ,WAAW,CAAC,GAAG;gBAC3B,MAAM,UAAU,KAAK,MAAM,MAAM;;;;QAIzC,KAAK,SAAS,UAAS,QAAQ;;YAE3B,IAAG,QAAQ,UAAU,OAAO,UAAU;gB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mBAAmB;;YAE7C,OAAO;;;GAIhB,SAAS;AChDZ;AACA,IAAG,CAAC,MAAM,UAAU,SAAS;QACzB,MAAM,UAAU,UAAU,UAAS,eAAe,WAAW;gBACzD,IAAI;;;;gBAIJ,IAAG,QAAQ,MAAM;wBACb,MAAM,IAAI,UAAU;;;gBAGxB,IAAI,IAAI,OAAO;;;;;gBAKf,IAAI,MAAM,EAAE,WAAW;;;gBAGvB,IAAG,QAAQ,GAAG;wBACV,OAAO,CAAC;;;;;gBAKZ,IAAI,IAAI,CAAC,aAAa;;gBAEtB,IAAG,KAAK,IAAI,OAAO,UAAU;wBACzB,IAAI;;;;gBAIR,IAAG,KAAK,KAAK;wBACT,OAAO,CAAC;;;;;;gBAMZ,IAAI,KAAK,IAAI,KAAK,IAAI,IAAI,MAAM,KAAK,IAAI,IAAI;;;gBAG7C,OAAM,IAAI,KAAK;;;;;;;;;;;;;wBAaX,IAAG,KAAK,KAAK,EAAE,OAAO,eAAe;gCACjC,OAAO;;wBAEX;;gBAEJ,OAAO,CAAC;;CAEf","file":"ocLazyLoad.js","sourcesContent":["((angular, window) => {\r\n 'use strict';\r\n\r\n var regModules = ['ng', 'oc.lazyLoad'],\r\n regInvokes = {},\r\n regConfigs = [],\r\n modulesToLoad = [],\r\n recordDeclarations = [],\r\n broadcast = angular.noop,\r\n runBlocks = {},\r\n justLoaded = [];\r\n\r\n var ocLazyLoad = angular.module('oc.lazyLoad', ['ng']);\r\n\r\n ocLazyLoad.provider('$ocLazyLoad', function($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\r\n var modules = {},\r\n providers = {\r\n $controllerProvider: $controllerProvider,\r\n $compileProvider: $compileProvider,\r\n $filterProvider: $filterProvider,\r\n $provide: $provide, // other things (constant, decorator, provider, factory, service)\r\n $injector: $injector,\r\n $animateProvider: $animateProvider\r\n },\r\n debug = false,\r\n events = false,\r\n moduleCache = [];\r\n\r\n moduleCache.push = function(value) {\r\n if(this.indexOf(value) === -1) {\r\n Array.prototype.push.apply(this, arguments);\r\n }\r\n };\r\n\r\n this.config = function(config) {\r\n // If we want to define modules configs\r\n if(angular.isDefined(config.modules)) {\r\n if(angular.isArray(config.modules)) {\r\n angular.forEach(config.modules, moduleConfig => {\r\n modules[moduleConfig.name] = moduleConfig;\r\n });\r\n } else {\r\n modules[config.modules.name] = config.modules;\r\n }\r\n }\r\n\r\n if(angular.isDefined(config.debug)) {\r\n debug = config.debug;\r\n }\r\n\r\n if(angular.isDefined(config.events)) {\r\n events = config.events;\r\n }\r\n };\r\n\r\n /**\r\n * Get the list of existing registered modules\r\n * @param element\r\n */\r\n this._init = function _init(element) {\r\n // this is probably useless now because we override angular.bootstrap\r\n if(modulesToLoad.length === 0) {\r\n var elements = [element],\r\n names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],\r\n NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\r\n append = function append(elm) {\r\n return (elm && elements.push(elm));\r\n };\r\n\r\n angular.forEach(names, name => {\r\n names[name] = true;\r\n append(document.getElementById(name));\r\n name = name.replace(':', '\\\\:');\r\n if(element[0].querySelectorAll) {\r\n angular.forEach(element[0].querySelectorAll(`.${ name }`), append);\r\n angular.forEach(element[0].querySelectorAll(`.${ name }\\\\:`), append);\r\n angular.forEach(element[0].querySelectorAll(`[${ name }]`), append);\r\n }\r\n });\r\n\r\n angular.forEach(elements, elm => {\r\n if(modulesToLoad.length === 0) {\r\n var className = ` ${ element.className } `;\r\n var match = NG_APP_CLASS_REGEXP.exec(className);\r\n if(match) {\r\n modulesToLoad.push((match[2] || '').replace(/\\s+/g, ','));\r\n } else {\r\n angular.forEach(elm.attributes, attr => {\r\n if(modulesToLoad.length === 0 && names[attr.name]) {\r\n modulesToLoad.push(attr.value);\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n if(modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\r\n console.error('No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.');\r\n }\r\n\r\n var addReg = function addReg(moduleName) {\r\n if(regModules.indexOf(moduleName) === -1) {\r\n // register existing modules\r\n regModules.push(moduleName);\r\n var mainModule = angular.module(moduleName);\r\n\r\n // register existing components (directives, services, ...)\r\n _invokeQueue(null, mainModule._invokeQueue, moduleName);\r\n _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\r\n\r\n angular.forEach(mainModule.requires, addReg);\r\n }\r\n };\r\n\r\n angular.forEach(modulesToLoad, moduleName => {\r\n addReg(moduleName);\r\n });\r\n\r\n modulesToLoad = []; // reset for next bootstrap\r\n recordDeclarations.pop(); // wait for the next lazy load\r\n };\r\n\r\n /**\r\n * Like JSON.stringify but that doesn't throw on circular references\r\n * @param obj\r\n */\r\n var stringify = function stringify(obj) {\r\n var cache = [];\r\n return JSON.stringify(obj, (key, value) => {\r\n if(angular.isObject(value) && value !== null) {\r\n if(cache.indexOf(value) !== -1) {\r\n // Circular reference found, discard key\r\n return;\r\n }\r\n // Store value in our collection\r\n cache.push(value);\r\n }\r\n return value;\r\n });\r\n };\r\n\r\n var hashCode = function hashCode(str) {\r\n var hash = 0, i, chr, len;\r\n if(str.length == 0) {\r\n return hash;\r\n }\r\n for(i = 0, len = str.length; i < len; i++) {\r\n chr = str.charCodeAt(i);\r\n hash = (hash << 5) - hash + chr;\r\n hash |= 0; // Convert to 32bit integer\r\n }\r\n return hash;\r\n };\r\n\r\n function _register(providers, registerModules, params) {\r\n if(registerModules) {\r\n var k, moduleName, moduleFn, tempRunBlocks = [];\r\n for(k = registerModules.length - 1; k >= 0; k--) {\r\n moduleName = registerModules[k];\r\n if(!angular.isString(moduleName)) {\r\n moduleName = getModuleName(moduleName);\r\n }\r\n if(!moduleName || justLoaded.indexOf(moduleName) !== -1) {\r\n continue;\r\n }\r\n var newModule = regModules.indexOf(moduleName) === -1;\r\n moduleFn = ngModuleFct(moduleName);\r\n if(newModule) { // new module\r\n regModules.push(moduleName);\r\n _register(providers, moduleFn.requires, params);\r\n }\r\n if(moduleFn._runBlocks.length > 0) {\r\n // new run blocks detected! Replace the old ones (if existing)\r\n runBlocks[moduleName] = [];\r\n while(moduleFn._runBlocks.length > 0) {\r\n runBlocks[moduleName].push(moduleFn._runBlocks.shift());\r\n }\r\n }\r\n if(angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\r\n tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\r\n }\r\n _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\r\n _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\r\n broadcast(newModule ? 'ocLazyLoad.moduleLoaded' : 'ocLazyLoad.moduleReloaded', moduleName);\r\n registerModules.pop();\r\n justLoaded.push(moduleName);\r\n }\r\n // execute the run blocks at the end\r\n var instanceInjector = providers.getInstanceInjector();\r\n angular.forEach(tempRunBlocks, fn => {\r\n instanceInjector.invoke(fn);\r\n });\r\n }\r\n }\r\n\r\n function _registerInvokeList(args, moduleName) {\r\n var invokeList = args[2][0],\r\n type = args[1],\r\n newInvoke = false;\r\n if(angular.isUndefined(regInvokes[moduleName])) {\r\n regInvokes[moduleName] = {};\r\n }\r\n if(angular.isUndefined(regInvokes[moduleName][type])) {\r\n regInvokes[moduleName][type] = {};\r\n }\r\n var onInvoke = function(invokeName, signature) {\r\n if(!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\r\n regInvokes[moduleName][type][invokeName] = [];\r\n }\r\n if(regInvokes[moduleName][type][invokeName].indexOf(signature) === -1) {\r\n newInvoke = true;\r\n regInvokes[moduleName][type][invokeName].push(signature);\r\n broadcast('ocLazyLoad.componentLoaded', [moduleName, type, invokeName]);\r\n }\r\n };\r\n\r\n function signature(data) {\r\n if(angular.isArray(data)) { // arrays are objects, we need to test for it first\r\n return hashCode(data.toString());\r\n } else if(angular.isObject(data)) { // constants & values for example\r\n return hashCode(stringify(data));\r\n } else {\r\n if(angular.isDefined(data) && data !== null) {\r\n return hashCode(data.toString());\r\n } else { // null & undefined constants\r\n return data;\r\n }\r\n }\r\n }\r\n\r\n if(angular.isString(invokeList)) {\r\n onInvoke(invokeList, signature(args[2][1]));\r\n } else if(angular.isObject(invokeList)) {\r\n angular.forEach(invokeList, function(invoke, key) {\r\n if(angular.isString(invoke)) { // decorators for example\r\n onInvoke(invoke, signature(invokeList[1]));\r\n } else { // components registered as object lists {\"componentName\": function() {}}\r\n onInvoke(key, signature(invoke));\r\n }\r\n });\r\n } else {\r\n return false;\r\n }\r\n return newInvoke;\r\n }\r\n\r\n function _invokeQueue(providers, queue, moduleName, reconfig) {\r\n if(!queue) {\r\n return;\r\n }\r\n\r\n var i, len, args, provider;\r\n for(i = 0, len = queue.length; i < len; i++) {\r\n args = queue[i];\r\n if(angular.isArray(args)) {\r\n if(providers !== null) {\r\n if(providers.hasOwnProperty(args[0])) {\r\n provider = providers[args[0]];\r\n } else {\r\n throw new Error(`unsupported provider ${ args[0] }`);\r\n }\r\n }\r\n var isNew = _registerInvokeList(args, moduleName);\r\n if(args[1] !== 'invoke') {\r\n if(isNew && angular.isDefined(provider)) {\r\n provider[args[1]].apply(provider, args[2]);\r\n }\r\n } else { // config block\r\n var callInvoke = function(fct) {\r\n var invoked = regConfigs.indexOf(`${ moduleName }-${ fct }`);\r\n if(invoked === -1 || reconfig) {\r\n if(invoked === -1) {\r\n regConfigs.push(`${ moduleName }-${ fct }`);\r\n }\r\n if(angular.isDefined(provider)) {\r\n provider[args[1]].apply(provider, args[2]);\r\n }\r\n }\r\n };\r\n if(angular.isFunction(args[2][0])) {\r\n callInvoke(args[2][0]);\r\n } else if(angular.isArray(args[2][0])) {\r\n for(var j = 0, jlen = args[2][0].length; j < jlen; j++) {\r\n if(angular.isFunction(args[2][0][j])) {\r\n callInvoke(args[2][0][j]);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getModuleName(module) {\r\n var moduleName = null;\r\n if(angular.isString(module)) {\r\n moduleName = module;\r\n } else if(angular.isObject(module) && module.hasOwnProperty('name') && angular.isString(module.name)) {\r\n moduleName = module.name;\r\n }\r\n return moduleName;\r\n }\r\n\r\n function moduleExists(moduleName) {\r\n if(!angular.isString(moduleName)) {\r\n return false;\r\n }\r\n try {\r\n return ngModuleFct(moduleName);\r\n } catch(e) {\r\n if(/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n this.$get = function($log, $rootElement, $rootScope, $cacheFactory, $q) {\r\n var instanceInjector,\r\n filesCache = $cacheFactory('ocLazyLoad');\r\n\r\n if(!debug) {\r\n $log = {};\r\n $log['error'] = angular.noop;\r\n $log['warn'] = angular.noop;\r\n $log['info'] = angular.noop;\r\n }\r\n\r\n // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\r\n providers.getInstanceInjector = function() {\r\n return instanceInjector ? instanceInjector : (instanceInjector = ($rootElement.data('$injector') || angular.injector()));\r\n };\r\n\r\n broadcast = function broadcast(eventName, params) {\r\n if(events) {\r\n $rootScope.$broadcast(eventName, params);\r\n }\r\n if(debug) {\r\n $log.info(eventName, params);\r\n }\r\n };\r\n\r\n function reject(e) {\r\n var deferred = $q.defer();\r\n $log.error(e.message);\r\n deferred.reject(e);\r\n return deferred.promise;\r\n }\r\n\r\n return {\r\n _broadcast: broadcast,\r\n\r\n _$log: $log,\r\n\r\n /**\r\n * Returns the files cache used by the loaders to store the files currently loading\r\n * @returns {*}\r\n */\r\n _getFilesCache: function getFilesCache() {\r\n return filesCache;\r\n },\r\n\r\n /**\r\n * Let the service know that it should monitor angular.module because files are loading\r\n * @param watch boolean\r\n */\r\n toggleWatch: function(watch) {\r\n if(watch) {\r\n recordDeclarations.push(true);\r\n } else {\r\n recordDeclarations.pop();\r\n }\r\n },\r\n\r\n /**\r\n * Let you get a module config object\r\n * @param moduleName String the name of the module\r\n * @returns {*}\r\n */\r\n getModuleConfig: function(moduleName) {\r\n if(!angular.isString(moduleName)) {\r\n throw new Error('You need to give the name of the module to get');\r\n }\r\n if(!modules[moduleName]) {\r\n return null;\r\n }\r\n return angular.copy(modules[moduleName]);\r\n },\r\n\r\n /**\r\n * Let you define a module config object\r\n * @param moduleConfig Object the module config object\r\n * @returns {*}\r\n */\r\n setModuleConfig: function(moduleConfig) {\r\n if(!angular.isObject(moduleConfig)) {\r\n throw new Error('You need to give the module config object to set');\r\n }\r\n modules[moduleConfig.name] = moduleConfig;\r\n return moduleConfig;\r\n },\r\n\r\n /**\r\n * Returns the list of loaded modules\r\n * @returns {string[]}\r\n */\r\n getModules: () => regModules,\r\n\r\n /**\r\n * Let you check if a module has been loaded into Angular or not\r\n * @param modulesNames String/Object a module name, or a list of module names\r\n * @returns {boolean}\r\n */\r\n isLoaded: function(modulesNames) {\r\n var moduleLoaded = function(module) {\r\n var isLoaded = regModules.indexOf(module) > -1;\r\n if(!isLoaded) {\r\n isLoaded = !!moduleExists(module);\r\n }\r\n return isLoaded;\r\n };\r\n if(angular.isString(modulesNames)) {\r\n modulesNames = [modulesNames];\r\n }\r\n if(angular.isArray(modulesNames)) {\r\n var i, len;\r\n for(i = 0, len = modulesNames.length; i < len; i++) {\r\n if(!moduleLoaded(modulesNames[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n } else {\r\n throw new Error('You need to define the module(s) name(s)');\r\n }\r\n },\r\n\r\n /**\r\n * Given a module, return its name\r\n * @param module\r\n * @returns {String}\r\n */\r\n _getModuleName: getModuleName,\r\n\r\n /**\r\n * Returns a module if it exists\r\n * @param moduleName\r\n * @returns {module}\r\n */\r\n _getModule: function getModule(moduleName) {\r\n try {\r\n return ngModuleFct(moduleName);\r\n } catch(e) {\r\n // this error message really suxx\r\n if(/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\r\n e.message = `The module \"${ stringify(moduleName) }\" that you are trying to load does not exist. ${ e.message }`;\r\n }\r\n throw e;\r\n }\r\n },\r\n\r\n /**\r\n * Check if a module exists and returns it if it does\r\n * @param moduleName\r\n * @returns {boolean}\r\n */\r\n moduleExists: moduleExists,\r\n\r\n /**\r\n * Load the dependencies, and might try to load new files depending on the config\r\n * @param moduleName (String or Array of Strings)\r\n * @param localParams\r\n * @returns {*}\r\n * @private\r\n */\r\n _loadDependencies: function _loadDependencies(moduleName, localParams) {\r\n var loadedModule,\r\n requires,\r\n diff,\r\n promisesList = [],\r\n self = this;\r\n\r\n moduleName = self._getModuleName(moduleName);\r\n\r\n if(moduleName === null) {\r\n return $q.when();\r\n } else {\r\n try {\r\n loadedModule = self._getModule(moduleName);\r\n } catch(e) {\r\n return reject(e);\r\n }\r\n // get unloaded requires\r\n requires = self.getRequires(loadedModule);\r\n }\r\n\r\n angular.forEach(requires, requireEntry => {\r\n // If no configuration is provided, try and find one from a previous load.\r\n // If there isn't one, bail and let the normal flow run\r\n if(angular.isString(requireEntry)) {\r\n var config = self.getModuleConfig(requireEntry);\r\n if(config === null) {\r\n moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\r\n return;\r\n }\r\n requireEntry = config;\r\n }\r\n\r\n // Check if this dependency has been loaded previously\r\n if(self.moduleExists(requireEntry.name)) {\r\n // compare against the already loaded module to see if the new definition adds any new files\r\n diff = requireEntry.files.filter(n => self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0);\r\n\r\n // If the module was redefined, advise via the console\r\n if(diff.length !== 0) {\r\n self._$log.warn('Module \"', moduleName, '\" attempted to redefine configuration for dependency. \"', requireEntry.name, '\"\\n Additional Files Loaded:', diff);\r\n }\r\n\r\n // Push everything to the file loader, it will weed out the duplicates.\r\n if(angular.isDefined(self.filesLoader)) { // if a files loader is defined\r\n promisesList.push(self.filesLoader(requireEntry, localParams).then(() => self._loadDependencies(requireEntry)));\r\n } else {\r\n return reject(new Error(`Error: New dependencies need to be loaded from external files (${requireEntry.files}), but no loader has been defined.`));\r\n }\r\n return;\r\n } else if(angular.isArray(requireEntry)) {\r\n requireEntry = {\r\n files: requireEntry\r\n };\r\n } else if(angular.isObject(requireEntry)) {\r\n if(requireEntry.hasOwnProperty('name') && requireEntry['name']) {\r\n // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\r\n self.setModuleConfig(requireEntry);\r\n moduleCache.push(requireEntry['name']);\r\n }\r\n }\r\n\r\n // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\r\n if(angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\r\n if(angular.isDefined(self.filesLoader)) { // if a files loader is defined\r\n promisesList.push(self.filesLoader(requireEntry, localParams).then(() => self._loadDependencies(requireEntry)));\r\n } else {\r\n return reject(new Error(`Error: the module \"${requireEntry.name}\" is defined in external files (${requireEntry.files}), but no loader has been defined.`));\r\n }\r\n }\r\n });\r\n\r\n // Create a wrapper promise to watch the promise list and resolve it once everything is done.\r\n return $q.all(promisesList);\r\n },\r\n\r\n /**\r\n * Inject new modules into Angular\r\n * @param moduleName\r\n * @param localParams\r\n */\r\n inject: function(moduleName, localParams = {}) {\r\n var self = this,\r\n deferred = $q.defer();\r\n if(angular.isDefined(moduleName) && moduleName !== null) {\r\n if(angular.isArray(moduleName)) {\r\n var promisesList = [];\r\n angular.forEach(moduleName, module => {\r\n promisesList.push(self.inject(module));\r\n });\r\n return $q.all(promisesList);\r\n } else {\r\n self._addToLoadList(self._getModuleName(moduleName), true);\r\n }\r\n }\r\n if(modulesToLoad.length > 0) {\r\n var res = modulesToLoad.slice(); // clean copy\r\n var loadNext = function loadNext(moduleName) {\r\n moduleCache.push(moduleName);\r\n self._loadDependencies(moduleName, localParams).then(function success() {\r\n try {\r\n justLoaded = [];\r\n _register(providers, moduleCache, localParams);\r\n } catch(e) {\r\n self._$log.error(e.message);\r\n deferred.reject(e);\r\n return;\r\n }\r\n\r\n if(modulesToLoad.length > 0) {\r\n loadNext(modulesToLoad.shift()); // load the next in list\r\n } else {\r\n deferred.resolve(res); // everything has been loaded, resolve\r\n }\r\n }, function error(err) {\r\n deferred.reject(err);\r\n });\r\n };\r\n\r\n // load the first in list\r\n loadNext(modulesToLoad.shift());\r\n } else {\r\n deferred.resolve();\r\n }\r\n return deferred.promise;\r\n },\r\n\r\n /**\r\n * Get the list of required modules/services/... for this module\r\n * @param module\r\n * @returns {Array}\r\n */\r\n getRequires: function getRequires(module) {\r\n var requires = [];\r\n angular.forEach(module.requires, requireModule => {\r\n if(regModules.indexOf(requireModule) === -1) {\r\n requires.push(requireModule);\r\n }\r\n });\r\n return requires;\r\n },\r\n\r\n /**\r\n * Invoke the new modules & component by their providers\r\n * @param providers\r\n * @param queue\r\n * @param moduleName\r\n * @param reconfig\r\n * @private\r\n */\r\n _invokeQueue: _invokeQueue,\r\n\r\n /**\r\n * Check if a module has been invoked and registers it if not\r\n * @param args\r\n * @param moduleName\r\n * @returns {boolean} is new\r\n */\r\n _registerInvokeList: _registerInvokeList,\r\n\r\n /**\r\n * Register a new module and loads it, executing the run/config blocks if needed\r\n * @param providers\r\n * @param registerModules\r\n * @param params\r\n * @private\r\n */\r\n _register: _register,\r\n\r\n /**\r\n * Add a module name to the list of modules that will be loaded in the next inject\r\n * @param name\r\n * @param force\r\n * @private\r\n */\r\n _addToLoadList: _addToLoadList\r\n };\r\n };\r\n\r\n // Let's get the list of loaded modules & components\r\n this._init(angular.element(window.document));\r\n });\r\n\r\n var bootstrapFct = angular.bootstrap;\r\n angular.bootstrap = function(element, modules, config) {\r\n // we use slice to make a clean copy\r\n angular.forEach(modules.slice(), module => {\r\n _addToLoadList(module, true);\r\n });\r\n return bootstrapFct(element, modules, config);\r\n };\r\n\r\n var _addToLoadList = function _addToLoadList(name, force) {\r\n if((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\r\n modulesToLoad.push(name);\r\n }\r\n };\r\n\r\n var ngModuleFct = angular.module;\r\n angular.module = function(name, requires, configFn) {\r\n _addToLoadList(name);\r\n return ngModuleFct(name, requires, configFn);\r\n };\r\n\r\n // CommonJS package manager support:\r\n if(typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports) {\r\n module.exports = 'oc.lazyLoad';\r\n }\r\n\r\n})(angular, window);\r\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').directive('ocLazyLoad', function($ocLazyLoad, $compile, $animate, $parse) {\r\n return {\r\n restrict: 'A',\r\n terminal: true,\r\n priority: 1000,\r\n compile: function(element, attrs) {\r\n // we store the content and remove it before compilation\r\n var content = element[0].innerHTML;\r\n element.html('');\r\n\r\n return function($scope, $element, $attr) {\r\n var model = $parse($attr.ocLazyLoad);\r\n $scope.$watch(() => {\r\n return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\r\n }, moduleName => {\r\n if(angular.isDefined(moduleName)) {\r\n $ocLazyLoad.load(moduleName).then(() => {\r\n $animate.enter(content, $element);\r\n let contents = element.contents();\r\n angular.forEach(contents, content => {\r\n if(content.nodeType !== 3) { // 3 is a text node\r\n $compile(content)($scope);\r\n }\r\n });\r\n });\r\n }\r\n }, true);\r\n };\r\n }\r\n };\r\n });\r\n\r\n})(angular);\r\n","(angular => {\n 'use strict';\n\n angular.module('oc.lazyLoad').config($provide => {\n $provide.decorator('$ocLazyLoad', function($delegate, $q, $window, $interval) {\n var uaCssChecked = false,\n useCssLoadPatch = false,\n anchor = $window.document.getElementsByTagName('head')[0] || $window.document.getElementsByTagName('body')[0];\n\n /**\n * Load a js/css file\n * @param type\n * @param path\n * @param params\n * @returns promise\n */\n $delegate.buildElement = function buildElement(type, path, params) {\n var deferred = $q.defer(),\n el,\n loaded,\n filesCache = $delegate._getFilesCache(),\n cacheBuster = function cacheBuster(url) {\n var dc = new Date().getTime();\n if(url.indexOf('?') >= 0) {\n if(url.substring(0, url.length - 1) === '&') {\n return `${ url }_dc=${ dc }`;\n }\n return `${ url }&_dc=${ dc }`;\n } else {\n return `${ url }?_dc=${ dc }`;\n }\n };\n\n // Store the promise early so the file load can be detected by other parallel lazy loads\n // (ie: multiple routes on one page) a 'true' value isn't sufficient\n // as it causes false positive load results.\n if(angular.isUndefined(filesCache.get(path))) {\n filesCache.put(path, deferred.promise);\n }\n\n // Switch in case more content types are added later\n switch(type) {\n case 'css':\n el = $window.document.createElement('link');\n el.type = 'text/css';\n el.rel = 'stylesheet';\n el.href = params.cache === false ? cacheBuster(path) : path;\n break;\n case 'js':\n el = $window.document.createElement('script');\n el.src = params.cache === false ? cacheBuster(path) : path;\n break;\n default:\n filesCache.remove(path);\n deferred.reject(new Error(`Requested type \"${ type }\" is not known. Could not inject \"${ path }\"`));\n break;\n }\n el.onload = el['onreadystatechange'] = function(e) {\n if((el['readyState'] && !/^c|loade/.test(el['readyState'])) || loaded) return;\n el.onload = el['onreadystatechange'] = null;\n loaded = 1;\n $delegate._broadcast('ocLazyLoad.fileLoaded', path);\n deferred.resolve();\n };\n el.onerror = function() {\n filesCache.remove(path);\n deferred.reject(new Error(`Unable to load ${ path }`));\n };\n el.async = params.serie ? 0 : 1;\n\n var insertBeforeElem = anchor.lastChild;\n if(params.insertBefore) {\n var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n if(element && element.length > 0) {\n insertBeforeElem = element[0];\n }\n }\n insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n /*\n The event load or readystatechange doesn't fire in:\n - iOS < 6 (default mobile browser)\n - Android < 4.4 (default mobile browser)\n - Safari < 6 (desktop browser)\n */\n if(type == 'css') {\n if(!uaCssChecked) {\n var ua = $window.navigator.userAgent.toLowerCase();\n\n // iOS < 6\n if(/iP(hone|od|ad)/.test($window.navigator.platform)) {\n var v = ($window.navigator.appVersion).match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.'));\n useCssLoadPatch = iOSVersion < 6;\n } else if(ua.indexOf(\"android\") > -1) { // Android < 4.4\n var androidVersion = parseFloat(ua.slice(ua.indexOf(\"android\") + 8));\n useCssLoadPatch = androidVersion < 4.4;\n } else if(ua.indexOf('safari') > -1) {\n var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n useCssLoadPatch = (versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6);\n }\n }\n\n if(useCssLoadPatch) {\n var tries = 1000; // * 20 = 20000 miliseconds\n var interval = $interval(() => {\n try {\n el.sheet.cssRules;\n $interval.cancel(interval);\n el.onload();\n } catch(e) {\n if(--tries <= 0) {\n el.onerror();\n }\n }\n }, 20);\n }\n }\n\n return deferred.promise;\n };\n\n return $delegate;\n })\n });\n\n})(angular);\n","(angular => {\n 'use strict';\n\n angular.module('oc.lazyLoad').config(function($provide) {\n $provide.decorator('$ocLazyLoad', function($delegate, $q) {\n /**\n * The function that loads new files\n * @param config\n * @param params\n * @returns {*}\n */\n $delegate.filesLoader = function filesLoader(config, params = {}) {\n var cssFiles = [],\n templatesFiles = [],\n jsFiles = [],\n promises = [],\n cachePromise = null,\n filesCache = $delegate._getFilesCache();\n\n $delegate.toggleWatch(true); // start watching angular.module calls\n\n angular.extend(params, config);\n\n var pushFile = function(path) {\n var file_type = null, m;\n if(angular.isObject(path)) {\n file_type = path.type;\n path = path.path;\n }\n cachePromise = filesCache.get(path);\n if(angular.isUndefined(cachePromise) || params.cache === false) {\n\n // always check for requirejs syntax just in case\n if((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) { // Detect file type using preceding type declaration (ala requireJS)\n file_type = m[1];\n path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n }\n\n if(!file_type) {\n if((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) { // Detect file type via file extension\n file_type = m[1];\n } else if(!$delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader') && $delegate.jsLoader.hasOwnProperty('load')) { // requirejs\n file_type = 'js';\n } else {\n $delegate._$log.error(`File type could not be determined. ${ path }`);\n return;\n }\n }\n\n if((file_type === 'css' || file_type === 'less') && cssFiles.indexOf(path) === -1) {\n cssFiles.push(path);\n } else if((file_type === 'html' || file_type === 'htm') && templatesFiles.indexOf(path) === -1) {\n templatesFiles.push(path);\n } else if(file_type === 'js' || jsFiles.indexOf(path) === -1) {\n jsFiles.push(path);\n } else {\n $delegate._$log.error(`File type is not valid. ${ path }`);\n }\n\n } else if(cachePromise) {\n promises.push(cachePromise);\n }\n };\n\n if(params.serie) {\n pushFile(params.files.shift());\n } else {\n angular.forEach(params.files, path => {\n pushFile(path);\n });\n }\n\n if(cssFiles.length > 0) {\n var cssDeferred = $q.defer();\n $delegate.cssLoader(cssFiles, err => {\n if(angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n cssDeferred.reject(err);\n } else {\n cssDeferred.resolve();\n }\n }, params);\n promises.push(cssDeferred.promise);\n }\n\n if(templatesFiles.length > 0) {\n var templatesDeferred = $q.defer();\n $delegate.templatesLoader(templatesFiles, err => {\n if(angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n templatesDeferred.reject(err);\n } else {\n templatesDeferred.resolve();\n }\n }, params);\n promises.push(templatesDeferred.promise);\n }\n\n if(jsFiles.length > 0) {\n var jsDeferred = $q.defer();\n $delegate.jsLoader(jsFiles, err => {\n if(angular.isDefined(err) && $delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n jsDeferred.reject(err);\n } else {\n jsDeferred.resolve();\n }\n }, params);\n promises.push(jsDeferred.promise);\n }\n\n if(promises.length === 0) {\n let deferred = $q.defer(),\n err = \"Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.\";\n $delegate._$log.error(err);\n deferred.reject(err);\n return deferred.promise;\n } else if(params.serie && params.files.length > 0) {\n return $q.all(promises).then(() => $delegate.filesLoader(config, params));\n } else {\n return $q.all(promises).finally(res => {\n $delegate.toggleWatch(false); // stop watching angular.module calls\n return res;\n });\n }\n };\n\n /**\n * Load a module or a list of modules into Angular\n * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n * @param params Object optional parameters\n * @returns promise\n */\n $delegate.load = function(originalModule, originalParams = {}) {\n var self = this,\n config = null,\n deferredList = [],\n deferred = $q.defer(),\n errText;\n\n // clean copy\n var module = angular.copy(originalModule);\n var params = angular.copy(originalParams);\n\n // If module is an array, break it down\n if(angular.isArray(module)) {\n // Resubmit each entry as a single module\n angular.forEach(module, m => {\n deferredList.push(self.load(m, params));\n });\n\n // Resolve the promise once everything has loaded\n $q.all(deferredList).then(res => {\n deferred.resolve(res);\n }, err => {\n deferred.reject(err);\n });\n\n return deferred.promise;\n }\n\n // Get or Set a configuration depending on what was passed in\n if(angular.isString(module)) {\n config = self.getModuleConfig(module);\n if(!config) {\n config = {\n files: [module]\n };\n }\n } else if(angular.isObject(module)) {\n // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n if(angular.isDefined(module.path) && angular.isDefined(module.type)) {\n config = {\n files: [module]\n };\n } else {\n config = self.setModuleConfig(module);\n }\n }\n\n if(config === null) {\n var moduleName = self._getModuleName(module);\n errText = `Module \"${ moduleName || 'unknown' }\" is not configured, cannot load.`;\n $delegate._$log.error(errText);\n deferred.reject(new Error(errText));\n return deferred.promise;\n } else {\n // deprecated\n if(angular.isDefined(config.template)) {\n if(angular.isUndefined(config.files)) {\n config.files = [];\n }\n if(angular.isString(config.template)) {\n config.files.push(config.template);\n } else if(angular.isArray(config.template)) {\n config.files.concat(config.template);\n }\n }\n }\n\n var localParams = angular.extend({}, params, config);\n\n // if someone used an external loader and called the load function with just the module name\n if(angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n return $delegate.inject(config.name, localParams);\n }\n\n $delegate.filesLoader(config, localParams).then(() => {\n $delegate.inject(null, localParams).then(res => {\n deferred.resolve(res);\n }, err => {\n deferred.reject(err);\n });\n }, err => {\n deferred.reject(err);\n });\n\n return deferred.promise;\n };\n\n // return the patched service\n return $delegate;\n });\n });\n\n})(angular);\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').config(function($provide) {\r\n $provide.decorator('$ocLazyLoad', function ($delegate, $q) {\r\n /**\r\n * cssLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite cssLoader and it will probably not use promises :(\r\n */\r\n $delegate.cssLoader = function(paths, callback, params) {\r\n var promises = [];\r\n angular.forEach(paths, path => {\r\n promises.push($delegate.buildElement('css', path, params));\r\n });\r\n $q.all(promises).then(() => {\r\n callback();\r\n }, err => {\r\n callback(err);\r\n });\r\n };\r\n $delegate.cssLoader.ocLazyLoadLoader = true;\r\n\r\n return $delegate;\r\n })\r\n });\r\n\r\n})(angular);\r\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').config(function($provide) {\r\n $provide.decorator('$ocLazyLoad', function ($delegate, $q) {\r\n /**\r\n * jsLoader function\r\n * @type Function\r\n * @param paths array list of js files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite jsLoader and it will probably not use promises :(\r\n */\r\n $delegate.jsLoader = function(paths, callback, params) {\r\n var promises = [];\r\n angular.forEach(paths, path => {\r\n promises.push($delegate.buildElement('js', path, params));\r\n });\r\n $q.all(promises).then(() => {\r\n callback();\r\n }, err => {\r\n callback(err);\r\n });\r\n };\r\n $delegate.jsLoader.ocLazyLoadLoader = true;\r\n\r\n return $delegate;\r\n })\r\n });\r\n\r\n})(angular);\r\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').config(function($provide) {\r\n $provide.decorator('$ocLazyLoad', function ($delegate, $templateCache, $q, $http) {\r\n /**\r\n * templatesLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters for $http\r\n * because the user can overwrite templatesLoader and it will probably not use promises :(\r\n */\r\n $delegate.templatesLoader = function(paths, callback, params) {\r\n var promises = [],\r\n filesCache = $delegate._getFilesCache();\r\n\r\n angular.forEach(paths, url => {\r\n var deferred = $q.defer();\r\n promises.push(deferred.promise);\r\n $http.get(url, params).success(data => {\r\n if(angular.isString(data) && data.length > 0) {\r\n angular.forEach(angular.element(data), node => {\r\n if(node.nodeName === 'SCRIPT' && node.type === 'text/ng-template') {\r\n $templateCache.put(node.id, node.innerHTML);\r\n }\r\n });\r\n }\r\n if(angular.isUndefined(filesCache.get(url))) {\r\n filesCache.put(url, true);\r\n }\r\n deferred.resolve();\r\n }).error(function(err) {\r\n deferred.reject(new Error(`Unable to load template file \"${ url }\": ${ err }`));\r\n });\r\n });\r\n return $q.all(promises).then(() => {\r\n callback();\r\n }, err => {\r\n callback(err);\r\n });\r\n };\r\n $delegate.templatesLoader.ocLazyLoadLoader = true;\r\n\r\n return $delegate;\r\n })\r\n });\r\n\r\n})(angular);\r\n","// Array.indexOf polyfill for IE8\r\nif(!Array.prototype.indexOf) {\r\n Array.prototype.indexOf = function(searchElement, fromIndex) {\r\n var k;\r\n\r\n // 1. Let O be the result of calling ToObject passing\r\n // the this value as the argument.\r\n if(this == null) {\r\n throw new TypeError('\"this\" is null or not defined');\r\n }\r\n\r\n var O = Object(this);\r\n\r\n // 2. Let lenValue be the result of calling the Get\r\n // internal method of O with the argument \"length\".\r\n // 3. Let len be ToUint32(lenValue).\r\n var len = O.length >>> 0;\r\n\r\n // 4. If len is 0, return -1.\r\n if(len === 0) {\r\n return -1;\r\n }\r\n\r\n // 5. If argument fromIndex was passed let n be\r\n // ToInteger(fromIndex); else let n be 0.\r\n var n = +fromIndex || 0;\r\n\r\n if(Math.abs(n) === Infinity) {\r\n n = 0;\r\n }\r\n\r\n // 6. If n >= len, return -1.\r\n if(n >= len) {\r\n return -1;\r\n }\r\n\r\n // 7. If n >= 0, then Let k be n.\r\n // 8. Else, n<0, Let k be len - abs(n).\r\n // If k is less than 0, then let k be 0.\r\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\r\n\r\n // 9. Repeat, while k < len\r\n while(k < len) {\r\n // a. Let Pk be ToString(k).\r\n // This is implicit for LHS operands of the in operator\r\n // b. Let kPresent be the result of calling the\r\n // HasProperty internal method of O with argument Pk.\r\n // This step can be combined with c\r\n // c. If kPresent is true, then\r\n // i. Let elementK be the result of calling the Get\r\n // internal method of O with the argument ToString(k).\r\n // ii. Let same be the result of applying the\r\n // Strict Equality Comparison Algorithm to\r\n // searchElement and elementK.\r\n // iii. If same is true, return k.\r\n if(k in O && O[k] === searchElement) {\r\n return k;\r\n }\r\n k++;\r\n }\r\n return -1;\r\n };\r\n}\r\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["ocLazyLoad.core.js","ocLazyLoad.directive.js","ocLazyLoad.loaders.common.js","ocLazyLoad.loaders.core.js","ocLazyLoad.loaders.cssLoader.js","ocLazyLoad.loaders.jsLoader.js","ocLazyLoad.loaders.templatesLoader.js","ocLazyLoad.polyfill.ie8.js"],"names":[],"mappings":"AAAA,CAAC,UAAC,SAAS,QAAW;IAClB;;IAEA,IAAI,aAAa,CAAC,MAAM;QACpB,aAAa;QACb,aAAa;QACb,gBAAgB;QAChB,qBAAqB;QACrB,YAAY,QAAQ;QACpB,YAAY;QACZ,aAAa;;IAEjB,IAAI,aAAa,QAAQ,OAAO,eAAe,CAAC;;IAEhD,WAAW,SAAS,2HAAe,UAAS,qBAAqB,UAAU,kBAAkB,iBAAiB,WAAW,kBAAkB;QACvI,IAAI,UAAU;YACV,YAAY;YACR,qBAAqB;YACrB,kBAAkB;YAClB,iBAAiB;YACjB,UAAU;YACV,WAAW;YACX,kBAAkB;;YAEtB,QAAQ;YACR,SAAS;YACT,cAAc;;QAElB,YAAY,OAAO,UAAS,OAAO;YAC/B,IAAG,KAAK,QAAQ,WAAW,CAAC,GAAG;gBAC3B,MAAM,UAAU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MAAG,QAAQ;;;gBAG/E,OAAO,GAAG,IAAI,UAAU,KAAK,YAAM;oBAC/B;mBACD,UAAA,KAAO;oBACN,SAAS;;;YAGjB,UAAU,gBAAgB,mBAAmB;;YAE7C,OAAO;;;GAIhB,SAAS;AChDZ;AACA,IAAG,CAAC,MAAM,UAAU,SAAS;QACzB,MAAM,UAAU,UAAU,UAAS,eAAe,WAAW;gBACzD,IAAI;;;;gBAIJ,IAAG,QAAQ,MAAM;wBACb,MAAM,IAAI,UAAU;;;gBAGxB,IAAI,IAAI,OAAO;;;;;gBAKf,IAAI,MAAM,EAAE,WAAW;;;gBAGvB,IAAG,QAAQ,GAAG;wBACV,OAAO,CAAC;;;;;gBAKZ,IAAI,IAAI,CAAC,aAAa;;gBAEtB,IAAG,KAAK,IAAI,OAAO,UAAU;wBACzB,IAAI;;;;gBAIR,IAAG,KAAK,KAAK;wBACT,OAAO,CAAC;;;;;;gBAMZ,IAAI,KAAK,IAAI,KAAK,IAAI,IAAI,MAAM,KAAK,IAAI,IAAI;;;gBAG7C,OAAM,IAAI,KAAK;;;;;;;;;;;;;wBAaX,IAAG,KAAK,KAAK,EAAE,OAAO,eAAe;gCACjC,OAAO;;wBAEX;;gBAEJ,OAAO,CAAC;;CAEf","file":"ocLazyLoad.js","sourcesContent":["((angular, window) => {\r\n 'use strict';\r\n\r\n var regModules = ['ng', 'oc.lazyLoad'],\r\n regInvokes = {},\r\n regConfigs = [],\r\n modulesToLoad = [],\r\n recordDeclarations = [],\r\n broadcast = angular.noop,\r\n runBlocks = {},\r\n justLoaded = [];\r\n\r\n var ocLazyLoad = angular.module('oc.lazyLoad', ['ng']);\r\n\r\n ocLazyLoad.provider('$ocLazyLoad', function($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\r\n var modules = {},\r\n providers = {\r\n $controllerProvider: $controllerProvider,\r\n $compileProvider: $compileProvider,\r\n $filterProvider: $filterProvider,\r\n $provide: $provide, // other things (constant, decorator, provider, factory, service)\r\n $injector: $injector,\r\n $animateProvider: $animateProvider\r\n },\r\n debug = false,\r\n events = false,\r\n moduleCache = [];\r\n\r\n moduleCache.push = function(value) {\r\n if(this.indexOf(value) === -1) {\r\n Array.prototype.push.apply(this, arguments);\r\n }\r\n };\r\n\r\n this.config = function(config) {\r\n // If we want to define modules configs\r\n if(angular.isDefined(config.modules)) {\r\n if(angular.isArray(config.modules)) {\r\n angular.forEach(config.modules, moduleConfig => {\r\n modules[moduleConfig.name] = moduleConfig;\r\n });\r\n } else {\r\n modules[config.modules.name] = config.modules;\r\n }\r\n }\r\n\r\n if(angular.isDefined(config.debug)) {\r\n debug = config.debug;\r\n }\r\n\r\n if(angular.isDefined(config.events)) {\r\n events = config.events;\r\n }\r\n };\r\n\r\n /**\r\n * Get the list of existing registered modules\r\n * @param element\r\n */\r\n this._init = function _init(element) {\r\n // this is probably useless now because we override angular.bootstrap\r\n if(modulesToLoad.length === 0) {\r\n var elements = [element],\r\n names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],\r\n NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\r\n append = function append(elm) {\r\n return (elm && elements.push(elm));\r\n };\r\n\r\n angular.forEach(names, name => {\r\n names[name] = true;\r\n append(document.getElementById(name));\r\n name = name.replace(':', '\\\\:');\r\n if(typeof(element[0]) !== 'undefined' && element[0].querySelectorAll) {\r\n angular.forEach(element[0].querySelectorAll(`.${ name }`), append);\r\n angular.forEach(element[0].querySelectorAll(`.${ name }\\\\:`), append);\r\n angular.forEach(element[0].querySelectorAll(`[${ name }]`), append);\r\n }\r\n });\r\n\r\n angular.forEach(elements, elm => {\r\n if(modulesToLoad.length === 0) {\r\n var className = ` ${ element.className } `;\r\n var match = NG_APP_CLASS_REGEXP.exec(className);\r\n if(match) {\r\n modulesToLoad.push((match[2] || '').replace(/\\s+/g, ','));\r\n } else {\r\n angular.forEach(elm.attributes, attr => {\r\n if(modulesToLoad.length === 0 && names[attr.name]) {\r\n modulesToLoad.push(attr.value);\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n if(modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\r\n console.error('No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.');\r\n }\r\n\r\n var addReg = function addReg(moduleName) {\r\n if(regModules.indexOf(moduleName) === -1) {\r\n // register existing modules\r\n regModules.push(moduleName);\r\n var mainModule = angular.module(moduleName);\r\n\r\n // register existing components (directives, services, ...)\r\n _invokeQueue(null, mainModule._invokeQueue, moduleName);\r\n _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\r\n\r\n angular.forEach(mainModule.requires, addReg);\r\n }\r\n };\r\n\r\n angular.forEach(modulesToLoad, moduleName => {\r\n addReg(moduleName);\r\n });\r\n\r\n modulesToLoad = []; // reset for next bootstrap\r\n recordDeclarations.pop(); // wait for the next lazy load\r\n };\r\n\r\n /**\r\n * Like JSON.stringify but that doesn't throw on circular references\r\n * @param obj\r\n */\r\n var stringify = function stringify(obj) {\r\n var cache = [];\r\n return JSON.stringify(obj, (key, value) => {\r\n if(angular.isObject(value) && value !== null) {\r\n if(cache.indexOf(value) !== -1) {\r\n // Circular reference found, discard key\r\n return;\r\n }\r\n // Store value in our collection\r\n cache.push(value);\r\n }\r\n return value;\r\n });\r\n };\r\n\r\n var hashCode = function hashCode(str) {\r\n var hash = 0, i, chr, len;\r\n if(str.length == 0) {\r\n return hash;\r\n }\r\n for(i = 0, len = str.length; i < len; i++) {\r\n chr = str.charCodeAt(i);\r\n hash = (hash << 5) - hash + chr;\r\n hash |= 0; // Convert to 32bit integer\r\n }\r\n return hash;\r\n };\r\n\r\n function _register(providers, registerModules, params) {\r\n if(registerModules) {\r\n var k, moduleName, moduleFn, tempRunBlocks = [];\r\n for(k = registerModules.length - 1; k >= 0; k--) {\r\n moduleName = registerModules[k];\r\n if(!angular.isString(moduleName)) {\r\n moduleName = getModuleName(moduleName);\r\n }\r\n if(!moduleName || justLoaded.indexOf(moduleName) !== -1) {\r\n continue;\r\n }\r\n var newModule = regModules.indexOf(moduleName) === -1;\r\n moduleFn = ngModuleFct(moduleName);\r\n if(newModule) { // new module\r\n regModules.push(moduleName);\r\n _register(providers, moduleFn.requires, params);\r\n }\r\n if(moduleFn._runBlocks.length > 0) {\r\n // new run blocks detected! Replace the old ones (if existing)\r\n runBlocks[moduleName] = [];\r\n while(moduleFn._runBlocks.length > 0) {\r\n runBlocks[moduleName].push(moduleFn._runBlocks.shift());\r\n }\r\n }\r\n if(angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\r\n tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\r\n }\r\n _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\r\n _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\r\n broadcast(newModule ? 'ocLazyLoad.moduleLoaded' : 'ocLazyLoad.moduleReloaded', moduleName);\r\n registerModules.pop();\r\n justLoaded.push(moduleName);\r\n }\r\n // execute the run blocks at the end\r\n var instanceInjector = providers.getInstanceInjector();\r\n angular.forEach(tempRunBlocks, fn => {\r\n instanceInjector.invoke(fn);\r\n });\r\n }\r\n }\r\n\r\n function _registerInvokeList(args, moduleName) {\r\n var invokeList = args[2][0],\r\n type = args[1],\r\n newInvoke = false;\r\n if(angular.isUndefined(regInvokes[moduleName])) {\r\n regInvokes[moduleName] = {};\r\n }\r\n if(angular.isUndefined(regInvokes[moduleName][type])) {\r\n regInvokes[moduleName][type] = {};\r\n }\r\n var onInvoke = function(invokeName, signature) {\r\n if(!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\r\n regInvokes[moduleName][type][invokeName] = [];\r\n }\r\n if(regInvokes[moduleName][type][invokeName].indexOf(signature) === -1) {\r\n newInvoke = true;\r\n regInvokes[moduleName][type][invokeName].push(signature);\r\n broadcast('ocLazyLoad.componentLoaded', [moduleName, type, invokeName]);\r\n }\r\n };\r\n\r\n function signature(data) {\r\n if(angular.isArray(data)) { // arrays are objects, we need to test for it first\r\n return hashCode(data.toString());\r\n } else if(angular.isObject(data)) { // constants & values for example\r\n return hashCode(stringify(data));\r\n } else {\r\n if(angular.isDefined(data) && data !== null) {\r\n return hashCode(data.toString());\r\n } else { // null & undefined constants\r\n return data;\r\n }\r\n }\r\n }\r\n\r\n if(angular.isString(invokeList)) {\r\n onInvoke(invokeList, signature(args[2][1]));\r\n } else if(angular.isObject(invokeList)) {\r\n angular.forEach(invokeList, function(invoke, key) {\r\n if(angular.isString(invoke)) { // decorators for example\r\n onInvoke(invoke, signature(invokeList[1]));\r\n } else { // components registered as object lists {\"componentName\": function() {}}\r\n onInvoke(key, signature(invoke));\r\n }\r\n });\r\n } else {\r\n return false;\r\n }\r\n return newInvoke;\r\n }\r\n\r\n function _invokeQueue(providers, queue, moduleName, reconfig) {\r\n if(!queue) {\r\n return;\r\n }\r\n\r\n var i, len, args, provider;\r\n for(i = 0, len = queue.length; i < len; i++) {\r\n args = queue[i];\r\n if(angular.isArray(args)) {\r\n if(providers !== null) {\r\n if(providers.hasOwnProperty(args[0])) {\r\n provider = providers[args[0]];\r\n } else {\r\n throw new Error(`unsupported provider ${ args[0] }`);\r\n }\r\n }\r\n var isNew = _registerInvokeList(args, moduleName);\r\n if(args[1] !== 'invoke') {\r\n if(isNew && angular.isDefined(provider)) {\r\n provider[args[1]].apply(provider, args[2]);\r\n }\r\n } else { // config block\r\n var callInvoke = function(fct) {\r\n var invoked = regConfigs.indexOf(`${ moduleName }-${ fct }`);\r\n if(invoked === -1 || reconfig) {\r\n if(invoked === -1) {\r\n regConfigs.push(`${ moduleName }-${ fct }`);\r\n }\r\n if(angular.isDefined(provider)) {\r\n provider[args[1]].apply(provider, args[2]);\r\n }\r\n }\r\n };\r\n if(angular.isFunction(args[2][0])) {\r\n callInvoke(args[2][0]);\r\n } else if(angular.isArray(args[2][0])) {\r\n for(var j = 0, jlen = args[2][0].length; j < jlen; j++) {\r\n if(angular.isFunction(args[2][0][j])) {\r\n callInvoke(args[2][0][j]);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getModuleName(module) {\r\n var moduleName = null;\r\n if(angular.isString(module)) {\r\n moduleName = module;\r\n } else if(angular.isObject(module) && module.hasOwnProperty('name') && angular.isString(module.name)) {\r\n moduleName = module.name;\r\n }\r\n return moduleName;\r\n }\r\n\r\n function moduleExists(moduleName) {\r\n if(!angular.isString(moduleName)) {\r\n return false;\r\n }\r\n try {\r\n return ngModuleFct(moduleName);\r\n } catch(e) {\r\n if(/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n this.$get = function($log, $rootElement, $rootScope, $cacheFactory, $q) {\r\n var instanceInjector,\r\n filesCache = $cacheFactory('ocLazyLoad');\r\n\r\n if(!debug) {\r\n $log = {};\r\n $log['error'] = angular.noop;\r\n $log['warn'] = angular.noop;\r\n $log['info'] = angular.noop;\r\n }\r\n\r\n // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\r\n providers.getInstanceInjector = function() {\r\n return instanceInjector ? instanceInjector : (instanceInjector = ($rootElement.data('$injector') || angular.injector()));\r\n };\r\n\r\n broadcast = function broadcast(eventName, params) {\r\n if(events) {\r\n $rootScope.$broadcast(eventName, params);\r\n }\r\n if(debug) {\r\n $log.info(eventName, params);\r\n }\r\n };\r\n\r\n function reject(e) {\r\n var deferred = $q.defer();\r\n $log.error(e.message);\r\n deferred.reject(e);\r\n return deferred.promise;\r\n }\r\n\r\n return {\r\n _broadcast: broadcast,\r\n\r\n _$log: $log,\r\n\r\n /**\r\n * Returns the files cache used by the loaders to store the files currently loading\r\n * @returns {*}\r\n */\r\n _getFilesCache: function getFilesCache() {\r\n return filesCache;\r\n },\r\n\r\n /**\r\n * Let the service know that it should monitor angular.module because files are loading\r\n * @param watch boolean\r\n */\r\n toggleWatch: function(watch) {\r\n if(watch) {\r\n recordDeclarations.push(true);\r\n } else {\r\n recordDeclarations.pop();\r\n }\r\n },\r\n\r\n /**\r\n * Let you get a module config object\r\n * @param moduleName String the name of the module\r\n * @returns {*}\r\n */\r\n getModuleConfig: function(moduleName) {\r\n if(!angular.isString(moduleName)) {\r\n throw new Error('You need to give the name of the module to get');\r\n }\r\n if(!modules[moduleName]) {\r\n return null;\r\n }\r\n return angular.copy(modules[moduleName]);\r\n },\r\n\r\n /**\r\n * Let you define a module config object\r\n * @param moduleConfig Object the module config object\r\n * @returns {*}\r\n */\r\n setModuleConfig: function(moduleConfig) {\r\n if(!angular.isObject(moduleConfig)) {\r\n throw new Error('You need to give the module config object to set');\r\n }\r\n modules[moduleConfig.name] = moduleConfig;\r\n return moduleConfig;\r\n },\r\n\r\n /**\r\n * Returns the list of loaded modules\r\n * @returns {string[]}\r\n */\r\n getModules: () => regModules,\r\n\r\n /**\r\n * Let you check if a module has been loaded into Angular or not\r\n * @param modulesNames String/Object a module name, or a list of module names\r\n * @returns {boolean}\r\n */\r\n isLoaded: function(modulesNames) {\r\n var moduleLoaded = function(module) {\r\n var isLoaded = regModules.indexOf(module) > -1;\r\n if(!isLoaded) {\r\n isLoaded = !!moduleExists(module);\r\n }\r\n return isLoaded;\r\n };\r\n if(angular.isString(modulesNames)) {\r\n modulesNames = [modulesNames];\r\n }\r\n if(angular.isArray(modulesNames)) {\r\n var i, len;\r\n for(i = 0, len = modulesNames.length; i < len; i++) {\r\n if(!moduleLoaded(modulesNames[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n } else {\r\n throw new Error('You need to define the module(s) name(s)');\r\n }\r\n },\r\n\r\n /**\r\n * Given a module, return its name\r\n * @param module\r\n * @returns {String}\r\n */\r\n _getModuleName: getModuleName,\r\n\r\n /**\r\n * Returns a module if it exists\r\n * @param moduleName\r\n * @returns {module}\r\n */\r\n _getModule: function getModule(moduleName) {\r\n try {\r\n return ngModuleFct(moduleName);\r\n } catch(e) {\r\n // this error message really suxx\r\n if(/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\r\n e.message = `The module \"${ stringify(moduleName) }\" that you are trying to load does not exist. ${ e.message }`;\r\n }\r\n throw e;\r\n }\r\n },\r\n\r\n /**\r\n * Check if a module exists and returns it if it does\r\n * @param moduleName\r\n * @returns {boolean}\r\n */\r\n moduleExists: moduleExists,\r\n\r\n /**\r\n * Load the dependencies, and might try to load new files depending on the config\r\n * @param moduleName (String or Array of Strings)\r\n * @param localParams\r\n * @returns {*}\r\n * @private\r\n */\r\n _loadDependencies: function _loadDependencies(moduleName, localParams) {\r\n var loadedModule,\r\n requires,\r\n diff,\r\n promisesList = [],\r\n self = this;\r\n\r\n moduleName = self._getModuleName(moduleName);\r\n\r\n if(moduleName === null) {\r\n return $q.when();\r\n } else {\r\n try {\r\n loadedModule = self._getModule(moduleName);\r\n } catch(e) {\r\n return reject(e);\r\n }\r\n // get unloaded requires\r\n requires = self.getRequires(loadedModule);\r\n }\r\n\r\n angular.forEach(requires, requireEntry => {\r\n // If no configuration is provided, try and find one from a previous load.\r\n // If there isn't one, bail and let the normal flow run\r\n if(angular.isString(requireEntry)) {\r\n var config = self.getModuleConfig(requireEntry);\r\n if(config === null) {\r\n moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\r\n return;\r\n }\r\n requireEntry = config;\r\n }\r\n\r\n // Check if this dependency has been loaded previously\r\n if(self.moduleExists(requireEntry.name)) {\r\n // compare against the already loaded module to see if the new definition adds any new files\r\n diff = requireEntry.files.filter(n => self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0);\r\n\r\n // If the module was redefined, advise via the console\r\n if(diff.length !== 0) {\r\n self._$log.warn('Module \"', moduleName, '\" attempted to redefine configuration for dependency. \"', requireEntry.name, '\"\\n Additional Files Loaded:', diff);\r\n }\r\n\r\n // Push everything to the file loader, it will weed out the duplicates.\r\n if(angular.isDefined(self.filesLoader)) { // if a files loader is defined\r\n promisesList.push(self.filesLoader(requireEntry, localParams).then(() => self._loadDependencies(requireEntry)));\r\n } else {\r\n return reject(new Error(`Error: New dependencies need to be loaded from external files (${requireEntry.files}), but no loader has been defined.`));\r\n }\r\n return;\r\n } else if(angular.isArray(requireEntry)) {\r\n requireEntry = {\r\n files: requireEntry\r\n };\r\n } else if(angular.isObject(requireEntry)) {\r\n if(requireEntry.hasOwnProperty('name') && requireEntry['name']) {\r\n // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\r\n self.setModuleConfig(requireEntry);\r\n moduleCache.push(requireEntry['name']);\r\n }\r\n }\r\n\r\n // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\r\n if(angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\r\n if(angular.isDefined(self.filesLoader)) { // if a files loader is defined\r\n promisesList.push(self.filesLoader(requireEntry, localParams).then(() => self._loadDependencies(requireEntry)));\r\n } else {\r\n return reject(new Error(`Error: the module \"${requireEntry.name}\" is defined in external files (${requireEntry.files}), but no loader has been defined.`));\r\n }\r\n }\r\n });\r\n\r\n // Create a wrapper promise to watch the promise list and resolve it once everything is done.\r\n return $q.all(promisesList);\r\n },\r\n\r\n /**\r\n * Inject new modules into Angular\r\n * @param moduleName\r\n * @param localParams\r\n */\r\n inject: function(moduleName, localParams = {}) {\r\n var self = this,\r\n deferred = $q.defer();\r\n if(angular.isDefined(moduleName) && moduleName !== null) {\r\n if(angular.isArray(moduleName)) {\r\n var promisesList = [];\r\n angular.forEach(moduleName, module => {\r\n promisesList.push(self.inject(module));\r\n });\r\n return $q.all(promisesList);\r\n } else {\r\n self._addToLoadList(self._getModuleName(moduleName), true);\r\n }\r\n }\r\n if(modulesToLoad.length > 0) {\r\n var res = modulesToLoad.slice(); // clean copy\r\n var loadNext = function loadNext(moduleName) {\r\n moduleCache.push(moduleName);\r\n self._loadDependencies(moduleName, localParams).then(function success() {\r\n try {\r\n justLoaded = [];\r\n _register(providers, moduleCache, localParams);\r\n } catch(e) {\r\n self._$log.error(e.message);\r\n deferred.reject(e);\r\n return;\r\n }\r\n\r\n if(modulesToLoad.length > 0) {\r\n loadNext(modulesToLoad.shift()); // load the next in list\r\n } else {\r\n deferred.resolve(res); // everything has been loaded, resolve\r\n }\r\n }, function error(err) {\r\n deferred.reject(err);\r\n });\r\n };\r\n\r\n // load the first in list\r\n loadNext(modulesToLoad.shift());\r\n } else {\r\n deferred.resolve();\r\n }\r\n return deferred.promise;\r\n },\r\n\r\n /**\r\n * Get the list of required modules/services/... for this module\r\n * @param module\r\n * @returns {Array}\r\n */\r\n getRequires: function getRequires(module) {\r\n var requires = [];\r\n angular.forEach(module.requires, requireModule => {\r\n if(regModules.indexOf(requireModule) === -1) {\r\n requires.push(requireModule);\r\n }\r\n });\r\n return requires;\r\n },\r\n\r\n /**\r\n * Invoke the new modules & component by their providers\r\n * @param providers\r\n * @param queue\r\n * @param moduleName\r\n * @param reconfig\r\n * @private\r\n */\r\n _invokeQueue: _invokeQueue,\r\n\r\n /**\r\n * Check if a module has been invoked and registers it if not\r\n * @param args\r\n * @param moduleName\r\n * @returns {boolean} is new\r\n */\r\n _registerInvokeList: _registerInvokeList,\r\n\r\n /**\r\n * Register a new module and loads it, executing the run/config blocks if needed\r\n * @param providers\r\n * @param registerModules\r\n * @param params\r\n * @private\r\n */\r\n _register: _register,\r\n\r\n /**\r\n * Add a module name to the list of modules that will be loaded in the next inject\r\n * @param name\r\n * @param force\r\n * @private\r\n */\r\n _addToLoadList: _addToLoadList\r\n };\r\n };\r\n\r\n // Let's get the list of loaded modules & components\r\n this._init(angular.element(window.document));\r\n });\r\n\r\n var bootstrapFct = angular.bootstrap;\r\n angular.bootstrap = function(element, modules, config) {\r\n // we use slice to make a clean copy\r\n angular.forEach(modules.slice(), module => {\r\n _addToLoadList(module, true);\r\n });\r\n return bootstrapFct(element, modules, config);\r\n };\r\n\r\n var _addToLoadList = function _addToLoadList(name, force) {\r\n if((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\r\n modulesToLoad.push(name);\r\n }\r\n };\r\n\r\n var ngModuleFct = angular.module;\r\n angular.module = function(name, requires, configFn) {\r\n _addToLoadList(name);\r\n return ngModuleFct(name, requires, configFn);\r\n };\r\n\r\n // CommonJS package manager support:\r\n if(typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports) {\r\n module.exports = 'oc.lazyLoad';\r\n }\r\n\r\n})(angular, window);\r\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').directive('ocLazyLoad', function($ocLazyLoad, $compile, $animate, $parse) {\r\n return {\r\n restrict: 'A',\r\n terminal: true,\r\n priority: 1000,\r\n compile: function(element, attrs) {\r\n // we store the content and remove it before compilation\r\n var content = element[0].innerHTML;\r\n element.html('');\r\n\r\n return function($scope, $element, $attr) {\r\n var model = $parse($attr.ocLazyLoad);\r\n $scope.$watch(() => {\r\n return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\r\n }, moduleName => {\r\n if(angular.isDefined(moduleName)) {\r\n $ocLazyLoad.load(moduleName).then(() => {\r\n $animate.enter(content, $element);\r\n let contents = element.contents();\r\n angular.forEach(contents, content => {\r\n if(content.nodeType !== 3) { // 3 is a text node\r\n $compile(content)($scope);\r\n }\r\n });\r\n });\r\n }\r\n }, true);\r\n };\r\n }\r\n };\r\n });\r\n\r\n})(angular);\r\n","(angular => {\n 'use strict';\n\n angular.module('oc.lazyLoad').config($provide => {\n $provide.decorator('$ocLazyLoad', function($delegate, $q, $window, $interval) {\n var uaCssChecked = false,\n useCssLoadPatch = false,\n anchor = $window.document.getElementsByTagName('head')[0] || $window.document.getElementsByTagName('body')[0];\n\n /**\n * Load a js/css file\n * @param type\n * @param path\n * @param params\n * @returns promise\n */\n $delegate.buildElement = function buildElement(type, path, params) {\n var deferred = $q.defer(),\n el,\n loaded,\n filesCache = $delegate._getFilesCache(),\n cacheBuster = function cacheBuster(url) {\n var dc = new Date().getTime();\n if(url.indexOf('?') >= 0) {\n if(url.substring(0, url.length - 1) === '&') {\n return `${ url }_dc=${ dc }`;\n }\n return `${ url }&_dc=${ dc }`;\n } else {\n return `${ url }?_dc=${ dc }`;\n }\n };\n\n // Store the promise early so the file load can be detected by other parallel lazy loads\n // (ie: multiple routes on one page) a 'true' value isn't sufficient\n // as it causes false positive load results.\n if(angular.isUndefined(filesCache.get(path))) {\n filesCache.put(path, deferred.promise);\n }\n\n // Switch in case more content types are added later\n switch(type) {\n case 'css':\n el = $window.document.createElement('link');\n el.type = 'text/css';\n el.rel = 'stylesheet';\n el.href = params.cache === false ? cacheBuster(path) : path;\n break;\n case 'js':\n el = $window.document.createElement('script');\n el.src = params.cache === false ? cacheBuster(path) : path;\n break;\n default:\n filesCache.remove(path);\n deferred.reject(new Error(`Requested type \"${ type }\" is not known. Could not inject \"${ path }\"`));\n break;\n }\n el.onload = el['onreadystatechange'] = function(e) {\n if((el['readyState'] && !/^c|loade/.test(el['readyState'])) || loaded) return;\n el.onload = el['onreadystatechange'] = null;\n loaded = 1;\n $delegate._broadcast('ocLazyLoad.fileLoaded', path);\n deferred.resolve();\n };\n el.onerror = function() {\n filesCache.remove(path);\n deferred.reject(new Error(`Unable to load ${ path }`));\n };\n el.async = params.serie ? 0 : 1;\n\n var insertBeforeElem = anchor.lastChild;\n if(params.insertBefore) {\n var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n if(element && element.length > 0) {\n insertBeforeElem = element[0];\n }\n }\n insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n /*\n The event load or readystatechange doesn't fire in:\n - iOS < 6 (default mobile browser)\n - Android < 4.4 (default mobile browser)\n - Safari < 6 (desktop browser)\n */\n if(type == 'css') {\n if(!uaCssChecked) {\n var ua = $window.navigator.userAgent.toLowerCase();\n\n // iOS < 6\n if(/iP(hone|od|ad)/.test($window.navigator.platform)) {\n var v = ($window.navigator.appVersion).match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.'));\n useCssLoadPatch = iOSVersion < 6;\n } else if(ua.indexOf(\"android\") > -1) { // Android < 4.4\n var androidVersion = parseFloat(ua.slice(ua.indexOf(\"android\") + 8));\n useCssLoadPatch = androidVersion < 4.4;\n } else if(ua.indexOf('safari') > -1) {\n var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n useCssLoadPatch = (versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6);\n }\n }\n\n if(useCssLoadPatch) {\n var tries = 1000; // * 20 = 20000 miliseconds\n var interval = $interval(() => {\n try {\n el.sheet.cssRules;\n $interval.cancel(interval);\n el.onload();\n } catch(e) {\n if(--tries <= 0) {\n el.onerror();\n }\n }\n }, 20);\n }\n }\n\n return deferred.promise;\n };\n\n return $delegate;\n })\n });\n\n})(angular);\n","(angular => {\n 'use strict';\n\n angular.module('oc.lazyLoad').config(function($provide) {\n $provide.decorator('$ocLazyLoad', function($delegate, $q) {\n /**\n * The function that loads new files\n * @param config\n * @param params\n * @returns {*}\n */\n $delegate.filesLoader = function filesLoader(config, params = {}) {\n var cssFiles = [],\n templatesFiles = [],\n jsFiles = [],\n promises = [],\n cachePromise = null,\n filesCache = $delegate._getFilesCache();\n\n $delegate.toggleWatch(true); // start watching angular.module calls\n\n angular.extend(params, config);\n\n var pushFile = function(path) {\n var file_type = null, m;\n if(angular.isObject(path)) {\n file_type = path.type;\n path = path.path;\n }\n cachePromise = filesCache.get(path);\n if(angular.isUndefined(cachePromise) || params.cache === false) {\n\n // always check for requirejs syntax just in case\n if((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) { // Detect file type using preceding type declaration (ala requireJS)\n file_type = m[1];\n path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n }\n\n if(!file_type) {\n if((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) { // Detect file type via file extension\n file_type = m[1];\n } else if(!$delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader') && $delegate.jsLoader.hasOwnProperty('load')) { // requirejs\n file_type = 'js';\n } else {\n $delegate._$log.error(`File type could not be determined. ${ path }`);\n return;\n }\n }\n\n if((file_type === 'css' || file_type === 'less') && cssFiles.indexOf(path) === -1) {\n cssFiles.push(path);\n } else if((file_type === 'html' || file_type === 'htm') && templatesFiles.indexOf(path) === -1) {\n templatesFiles.push(path);\n } else if(file_type === 'js' || jsFiles.indexOf(path) === -1) {\n jsFiles.push(path);\n } else {\n $delegate._$log.error(`File type is not valid. ${ path }`);\n }\n\n } else if(cachePromise) {\n promises.push(cachePromise);\n }\n };\n\n if(params.serie) {\n pushFile(params.files.shift());\n } else {\n angular.forEach(params.files, path => {\n pushFile(path);\n });\n }\n\n if(cssFiles.length > 0) {\n var cssDeferred = $q.defer();\n $delegate.cssLoader(cssFiles, err => {\n if(angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n cssDeferred.reject(err);\n } else {\n cssDeferred.resolve();\n }\n }, params);\n promises.push(cssDeferred.promise);\n }\n\n if(templatesFiles.length > 0) {\n var templatesDeferred = $q.defer();\n $delegate.templatesLoader(templatesFiles, err => {\n if(angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n templatesDeferred.reject(err);\n } else {\n templatesDeferred.resolve();\n }\n }, params);\n promises.push(templatesDeferred.promise);\n }\n\n if(jsFiles.length > 0) {\n var jsDeferred = $q.defer();\n $delegate.jsLoader(jsFiles, err => {\n if(angular.isDefined(err) && $delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n jsDeferred.reject(err);\n } else {\n jsDeferred.resolve();\n }\n }, params);\n promises.push(jsDeferred.promise);\n }\n\n if(promises.length === 0) {\n let deferred = $q.defer(),\n err = \"Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.\";\n $delegate._$log.error(err);\n deferred.reject(err);\n return deferred.promise;\n } else if(params.serie && params.files.length > 0) {\n return $q.all(promises).then(() => $delegate.filesLoader(config, params));\n } else {\n return $q.all(promises).finally(res => {\n $delegate.toggleWatch(false); // stop watching angular.module calls\n return res;\n });\n }\n };\n\n /**\n * Load a module or a list of modules into Angular\n * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n * @param params Object optional parameters\n * @returns promise\n */\n $delegate.load = function(originalModule, originalParams = {}) {\n var self = this,\n config = null,\n deferredList = [],\n deferred = $q.defer(),\n errText;\n\n // clean copy\n var module = angular.copy(originalModule);\n var params = angular.copy(originalParams);\n\n // If module is an array, break it down\n if(angular.isArray(module)) {\n // Resubmit each entry as a single module\n angular.forEach(module, m => {\n deferredList.push(self.load(m, params));\n });\n\n // Resolve the promise once everything has loaded\n $q.all(deferredList).then(res => {\n deferred.resolve(res);\n }, err => {\n deferred.reject(err);\n });\n\n return deferred.promise;\n }\n\n // Get or Set a configuration depending on what was passed in\n if(angular.isString(module)) {\n config = self.getModuleConfig(module);\n if(!config) {\n config = {\n files: [module]\n };\n }\n } else if(angular.isObject(module)) {\n // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n if(angular.isDefined(module.path) && angular.isDefined(module.type)) {\n config = {\n files: [module]\n };\n } else {\n config = self.setModuleConfig(module);\n }\n }\n\n if(config === null) {\n var moduleName = self._getModuleName(module);\n errText = `Module \"${ moduleName || 'unknown' }\" is not configured, cannot load.`;\n $delegate._$log.error(errText);\n deferred.reject(new Error(errText));\n return deferred.promise;\n } else {\n // deprecated\n if(angular.isDefined(config.template)) {\n if(angular.isUndefined(config.files)) {\n config.files = [];\n }\n if(angular.isString(config.template)) {\n config.files.push(config.template);\n } else if(angular.isArray(config.template)) {\n config.files.concat(config.template);\n }\n }\n }\n\n var localParams = angular.extend({}, params, config);\n\n // if someone used an external loader and called the load function with just the module name\n if(angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n return $delegate.inject(config.name, localParams);\n }\n\n $delegate.filesLoader(config, localParams).then(() => {\n $delegate.inject(null, localParams).then(res => {\n deferred.resolve(res);\n }, err => {\n deferred.reject(err);\n });\n }, err => {\n deferred.reject(err);\n });\n\n return deferred.promise;\n };\n\n // return the patched service\n return $delegate;\n });\n });\n\n})(angular);\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').config(function($provide) {\r\n $provide.decorator('$ocLazyLoad', function ($delegate, $q) {\r\n /**\r\n * cssLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite cssLoader and it will probably not use promises :(\r\n */\r\n $delegate.cssLoader = function(paths, callback, params) {\r\n var promises = [];\r\n angular.forEach(paths, path => {\r\n promises.push($delegate.buildElement('css', path, params));\r\n });\r\n $q.all(promises).then(() => {\r\n callback();\r\n }, err => {\r\n callback(err);\r\n });\r\n };\r\n $delegate.cssLoader.ocLazyLoadLoader = true;\r\n\r\n return $delegate;\r\n })\r\n });\r\n\r\n})(angular);\r\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').config(function($provide) {\r\n $provide.decorator('$ocLazyLoad', function ($delegate, $q) {\r\n /**\r\n * jsLoader function\r\n * @type Function\r\n * @param paths array list of js files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite jsLoader and it will probably not use promises :(\r\n */\r\n $delegate.jsLoader = function(paths, callback, params) {\r\n var promises = [];\r\n angular.forEach(paths, path => {\r\n promises.push($delegate.buildElement('js', path, params));\r\n });\r\n $q.all(promises).then(() => {\r\n callback();\r\n }, err => {\r\n callback(err);\r\n });\r\n };\r\n $delegate.jsLoader.ocLazyLoadLoader = true;\r\n\r\n return $delegate;\r\n })\r\n });\r\n\r\n})(angular);\r\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').config(function($provide) {\r\n $provide.decorator('$ocLazyLoad', function ($delegate, $templateCache, $q, $http) {\r\n /**\r\n * templatesLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters for $http\r\n * because the user can overwrite templatesLoader and it will probably not use promises :(\r\n */\r\n $delegate.templatesLoader = function(paths, callback, params) {\r\n var promises = [],\r\n filesCache = $delegate._getFilesCache();\r\n\r\n angular.forEach(paths, url => {\r\n var deferred = $q.defer();\r\n promises.push(deferred.promise);\r\n $http.get(url, params).success(data => {\r\n if(angular.isString(data) && data.length > 0) {\r\n angular.forEach(angular.element(data), node => {\r\n if(node.nodeName === 'SCRIPT' && node.type === 'text/ng-template') {\r\n $templateCache.put(node.id, node.innerHTML);\r\n }\r\n });\r\n }\r\n if(angular.isUndefined(filesCache.get(url))) {\r\n filesCache.put(url, true);\r\n }\r\n deferred.resolve();\r\n }).error(function(err) {\r\n deferred.reject(new Error(`Unable to load template file \"${ url }\": ${ err }`));\r\n });\r\n });\r\n return $q.all(promises).then(() => {\r\n callback();\r\n }, err => {\r\n callback(err);\r\n });\r\n };\r\n $delegate.templatesLoader.ocLazyLoadLoader = true;\r\n\r\n return $delegate;\r\n })\r\n });\r\n\r\n})(angular);\r\n","// Array.indexOf polyfill for IE8\r\nif(!Array.prototype.indexOf) {\r\n Array.prototype.indexOf = function(searchElement, fromIndex) {\r\n var k;\r\n\r\n // 1. Let O be the result of calling ToObject passing\r\n // the this value as the argument.\r\n if(this == null) {\r\n throw new TypeError('\"this\" is null or not defined');\r\n }\r\n\r\n var O = Object(this);\r\n\r\n // 2. Let lenValue be the result of calling the Get\r\n // internal method of O with the argument \"length\".\r\n // 3. Let len be ToUint32(lenValue).\r\n var len = O.length >>> 0;\r\n\r\n // 4. If len is 0, return -1.\r\n if(len === 0) {\r\n return -1;\r\n }\r\n\r\n // 5. If argument fromIndex was passed let n be\r\n // ToInteger(fromIndex); else let n be 0.\r\n var n = +fromIndex || 0;\r\n\r\n if(Math.abs(n) === Infinity) {\r\n n = 0;\r\n }\r\n\r\n // 6. If n >= len, return -1.\r\n if(n >= len) {\r\n return -1;\r\n }\r\n\r\n // 7. If n >= 0, then Let k be n.\r\n // 8. Else, n<0, Let k be len - abs(n).\r\n // If k is less than 0, then let k be 0.\r\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\r\n\r\n // 9. Repeat, while k < len\r\n while(k < len) {\r\n // a. Let Pk be ToString(k).\r\n // This is implicit for LHS operands of the in operator\r\n // b. Let kPresent be the result of calling the\r\n // HasProperty internal method of O with argument Pk.\r\n // This step can be combined with c\r\n // c. If kPresent is true, then\r\n // i. Let elementK be the result of calling the Get\r\n // internal method of O with the argument ToString(k).\r\n // ii. Let same be the result of applying the\r\n // Strict Equality Comparison Algorithm to\r\n // searchElement and elementK.\r\n // iii. If same is true, return k.\r\n if(k in O && O[k] === searchElement) {\r\n return k;\r\n }\r\n k++;\r\n }\r\n return -1;\r\n };\r\n}\r\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/dist/ocLazyLoad.min.js b/dist/ocLazyLoad.min.js index a84fc55..4752c87 100644 --- a/dist/ocLazyLoad.min.js +++ b/dist/ocLazyLoad.min.js @@ -1,9 +1,9 @@ /** * oclazyload - Load modules on demand (lazy load) with angularJS - * @version v1.0.1 + * @version v1.0.2 * @link https://github.com/ocombe/ocLazyLoad * @license MIT * @author Olivier Combe */ -!function(e,n){"use strict";var r=["ng","oc.lazyLoad"],o={},t=[],i=[],a=[],s=e.noop,u={},c=[],d=e.module("oc.lazyLoad",["ng"]);d.provider("$ocLazyLoad",["$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider",function(d,l,p,g,m,v){function y(n,o,t){if(o){var i,a,d,l=[];for(i=o.length-1;i>=0;i--)if(a=o[i],e.isString(a)||(a=j(a)),a&&-1===c.indexOf(a)){var f=-1===r.indexOf(a);if(d=h(a),f&&(r.push(a),y(n,d.requires,t)),d._runBlocks.length>0)for(u[a]=[];d._runBlocks.length>0;)u[a].push(d._runBlocks.shift());e.isDefined(u[a])&&(f||t.rerun)&&(l=l.concat(u[a])),$(n,d._invokeQueue,a,t.reconfig),$(n,d._configBlocks,a,t.reconfig),s(f?"ocLazyLoad.moduleLoaded":"ocLazyLoad.moduleReloaded",a),o.pop(),c.push(a)}var p=n.getInstanceInjector();e.forEach(l,function(e){p.invoke(e)})}}function L(n,r){function t(n){return e.isArray(n)?D(n.toString()):e.isObject(n)?D(z(n)):e.isDefined(n)&&null!==n?D(n.toString()):n}var i=n[2][0],a=n[1],u=!1;e.isUndefined(o[r])&&(o[r]={}),e.isUndefined(o[r][a])&&(o[r][a]={});var c=function(e,n){o[r][a].hasOwnProperty(e)||(o[r][a][e]=[]),-1===o[r][a][e].indexOf(n)&&(u=!0,o[r][a][e].push(n),s("ocLazyLoad.componentLoaded",[r,a,e]))};if(e.isString(i))c(i,t(n[2][1]));else{if(!e.isObject(i))return!1;e.forEach(i,function(n,r){e.isString(n)?c(n,t(i[1])):c(r,t(n))})}return u}function $(n,r,o,i){if(r){var a,s,u,c;for(a=0,s=r.length;s>a;a++)if(u=r[a],e.isArray(u)){if(null!==n){if(!n.hasOwnProperty(u[0]))throw new Error("unsupported provider "+u[0]);c=n[u[0]]}var d=L(u,o);if("invoke"!==u[1])d&&e.isDefined(c)&&c[u[1]].apply(c,u[2]);else{var l=function(n){var r=t.indexOf(""+o+"-"+n);(-1===r||i)&&(-1===r&&t.push(""+o+"-"+n),e.isDefined(c)&&c[u[1]].apply(c,u[2]))};if(e.isFunction(u[2][0]))l(u[2][0]);else if(e.isArray(u[2][0]))for(var f=0,h=u[2][0].length;h>f;f++)e.isFunction(u[2][0][f])&&l(u[2][0][f])}}}}function j(n){var r=null;return e.isString(n)?r=n:e.isObject(n)&&n.hasOwnProperty("name")&&e.isString(n.name)&&(r=n.name),r}function E(n){if(!e.isString(n))return!1;try{return h(n)}catch(r){if(/No module/.test(r)||r.message.indexOf("$injector:nomod")>-1)return!1}}var _={},w={$controllerProvider:d,$compileProvider:p,$filterProvider:g,$provide:l,$injector:m,$animateProvider:v},x=!1,O=!1,b=[];b.push=function(e){-1===this.indexOf(e)&&Array.prototype.push.apply(this,arguments)},this.config=function(n){e.isDefined(n.modules)&&(e.isArray(n.modules)?e.forEach(n.modules,function(e){_[e.name]=e}):_[n.modules.name]=n.modules),e.isDefined(n.debug)&&(x=n.debug),e.isDefined(n.events)&&(O=n.events)},this._init=function(o){if(0===i.length){var t=[o],s=["ng:app","ng-app","x-ng-app","data-ng-app"],u=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/,c=function(e){return e&&t.push(e)};e.forEach(s,function(n){s[n]=!0,c(document.getElementById(n)),n=n.replace(":","\\:"),o[0].querySelectorAll&&(e.forEach(o[0].querySelectorAll("."+n),c),e.forEach(o[0].querySelectorAll("."+n+"\\:"),c),e.forEach(o[0].querySelectorAll("["+n+"]"),c))}),e.forEach(t,function(n){if(0===i.length){var r=" "+o.className+" ",t=u.exec(r);t?i.push((t[2]||"").replace(/\s+/g,",")):e.forEach(n.attributes,function(e){0===i.length&&s[e.name]&&i.push(e.value)})}})}0!==i.length||(n.jasmine||n.mocha)&&e.isDefined(e.mock)||console.error("No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.");var d=function l(n){if(-1===r.indexOf(n)){r.push(n);var o=e.module(n);$(null,o._invokeQueue,n),$(null,o._configBlocks,n),e.forEach(o.requires,l)}};e.forEach(i,function(e){d(e)}),i=[],a.pop()};var z=function(n){var r=[];return JSON.stringify(n,function(n,o){if(e.isObject(o)&&null!==o){if(-1!==r.indexOf(o))return;r.push(o)}return o})},D=function(e){var n,r,o,t=0;if(0==e.length)return t;for(n=0,o=e.length;o>n;n++)r=e.charCodeAt(n),t=(t<<5)-t+r,t|=0;return t};this.$get=["$log","$rootElement","$rootScope","$cacheFactory","$q",function(n,o,t,u,d){function l(e){var r=d.defer();return n.error(e.message),r.reject(e),r.promise}var p,g=u("ocLazyLoad");return x||(n={},n.error=e.noop,n.warn=e.noop,n.info=e.noop),w.getInstanceInjector=function(){return p?p:p=o.data("$injector")||e.injector()},s=function(e,r){O&&t.$broadcast(e,r),x&&n.info(e,r)},{_broadcast:s,_$log:n,_getFilesCache:function(){return g},toggleWatch:function(e){e?a.push(!0):a.pop()},getModuleConfig:function(n){if(!e.isString(n))throw new Error("You need to give the name of the module to get");return _[n]?e.copy(_[n]):null},setModuleConfig:function(n){if(!e.isObject(n))throw new Error("You need to give the module config object to set");return _[n.name]=n,n},getModules:function(){return r},isLoaded:function(n){var o=function(e){var n=r.indexOf(e)>-1;return n||(n=!!E(e)),n};if(e.isString(n)&&(n=[n]),e.isArray(n)){var t,i;for(t=0,i=n.length;i>t;t++)if(!o(n[t]))return!1;return!0}throw new Error("You need to define the module(s) name(s)")},_getModuleName:j,_getModule:function(e){try{return h(e)}catch(n){throw(/No module/.test(n)||n.message.indexOf("$injector:nomod")>-1)&&(n.message='The module "'+z(e)+'" that you are trying to load does not exist. '+n.message),n}},moduleExists:E,_loadDependencies:function(n,r){var o,t,i,a=[],s=this;if(n=s._getModuleName(n),null===n)return d.when();try{o=s._getModule(n)}catch(u){return l(u)}return t=s.getRequires(o),e.forEach(t,function(o){if(e.isString(o)){var t=s.getModuleConfig(o);if(null===t)return void b.push(o);o=t}if(s.moduleExists(o.name))return i=o.files.filter(function(e){return s.getModuleConfig(o.name).files.indexOf(e)<0}),0!==i.length&&s._$log.warn('Module "',n,'" attempted to redefine configuration for dependency. "',o.name,'"\n Additional Files Loaded:',i),e.isDefined(s.filesLoader)?void a.push(s.filesLoader(o,r).then(function(){return s._loadDependencies(o)})):l(new Error("Error: New dependencies need to be loaded from external files ("+o.files+"), but no loader has been defined."));if(e.isArray(o)?o={files:o}:e.isObject(o)&&o.hasOwnProperty("name")&&o.name&&(s.setModuleConfig(o),b.push(o.name)),e.isDefined(o.files)&&0!==o.files.length){if(!e.isDefined(s.filesLoader))return l(new Error('Error: the module "'+o.name+'" is defined in external files ('+o.files+"), but no loader has been defined."));a.push(s.filesLoader(o,r).then(function(){return s._loadDependencies(o)}))}}),d.all(a)},inject:function(n){var r=void 0===arguments[1]?{}:arguments[1],o=this,t=d.defer();if(e.isDefined(n)&&null!==n){if(e.isArray(n)){var a=[];return e.forEach(n,function(e){a.push(o.inject(e))}),d.all(a)}o._addToLoadList(o._getModuleName(n),!0)}if(i.length>0){var s=i.slice(),u=function l(e){b.push(e),o._loadDependencies(e,r).then(function(){try{c=[],y(w,b,r)}catch(e){return o._$log.error(e.message),void t.reject(e)}i.length>0?l(i.shift()):t.resolve(s)},function(e){t.reject(e)})};u(i.shift())}else t.resolve();return t.promise},getRequires:function(n){var o=[];return e.forEach(n.requires,function(e){-1===r.indexOf(e)&&o.push(e)}),o},_invokeQueue:$,_registerInvokeList:L,_register:y,_addToLoadList:f}}],this._init(e.element(n.document))}]);var l=e.bootstrap;e.bootstrap=function(n,r,o){return e.forEach(r.slice(),function(e){f(e,!0)}),l(n,r,o)};var f=function(n,r){(a.length>0||r)&&e.isString(n)&&-1===i.indexOf(n)&&i.push(n)},h=e.module;e.module=function(e,n,r){return f(e),h(e,n,r)},"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="oc.lazyLoad")}(angular,window),function(e){"use strict";e.module("oc.lazyLoad").directive("ocLazyLoad",["$ocLazyLoad","$compile","$animate","$parse",function(n,r,o,t){return{restrict:"A",terminal:!0,priority:1e3,compile:function(i,a){var s=i[0].innerHTML;return i.html(""),function(a,u,c){var d=t(c.ocLazyLoad);a.$watch(function(){return d(a)||c.ocLazyLoad},function(t){e.isDefined(t)&&n.load(t).then(function(){o.enter(s,u);var n=i.contents();e.forEach(n,function(e){3!==e.nodeType&&r(e)(a)})})},!0)}}}}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q","$window","$interval",function(n,r,o,t){var i=!1,a=!1,s=o.document.getElementsByTagName("head")[0]||o.document.getElementsByTagName("body")[0];return n.buildElement=function(u,c,d){var l,f,h=r.defer(),p=n._getFilesCache(),g=function(e){var n=(new Date).getTime();return e.indexOf("?")>=0?"&"===e.substring(0,e.length-1)?""+e+"_dc="+n:""+e+"&_dc="+n:""+e+"?_dc="+n};switch(e.isUndefined(p.get(c))&&p.put(c,h.promise),u){case"css":l=o.document.createElement("link"),l.type="text/css",l.rel="stylesheet",l.href=d.cache===!1?g(c):c;break;case"js":l=o.document.createElement("script"),l.src=d.cache===!1?g(c):c;break;default:p.remove(c),h.reject(new Error('Requested type "'+u+'" is not known. Could not inject "'+c+'"'))}l.onload=l.onreadystatechange=function(e){l.readyState&&!/^c|loade/.test(l.readyState)||f||(l.onload=l.onreadystatechange=null,f=1,n._broadcast("ocLazyLoad.fileLoaded",c),h.resolve())},l.onerror=function(){p.remove(c),h.reject(new Error("Unable to load "+c))},l.async=d.serie?0:1;var m=s.lastChild;if(d.insertBefore){var v=e.element(e.isDefined(window.jQuery)?d.insertBefore:document.querySelector(d.insertBefore));v&&v.length>0&&(m=v[0])}if(m.parentNode.insertBefore(l,m),"css"==u){if(!i){var y=o.navigator.userAgent.toLowerCase();if(/iP(hone|od|ad)/.test(o.navigator.platform)){var L=o.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),$=parseFloat([parseInt(L[1],10),parseInt(L[2],10),parseInt(L[3]||0,10)].join("."));a=6>$}else if(y.indexOf("android")>-1){var j=parseFloat(y.slice(y.indexOf("android")+8));a=4.4>j}else if(y.indexOf("safari")>-1){var E=y.match(/version\/([\.\d]+)/i);a=E&&E[1]&&parseFloat(E[1])<6}}if(a)var _=1e3,w=t(function(){try{l.sheet.cssRules,t.cancel(w),l.onload()}catch(e){--_<=0&&l.onerror()}},20)}return h.promise},n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q",function(n,r){return n.filesLoader=function(o){var t=void 0===arguments[1]?{}:arguments[1],i=[],a=[],s=[],u=[],c=null,d=n._getFilesCache();n.toggleWatch(!0),e.extend(t,o);var l=function(r){var o,l=null;if(e.isObject(r)&&(l=r.type,r=r.path),c=d.get(r),e.isUndefined(c)||t.cache===!1){if(null!==(o=/^(css|less|html|htm|js)?(?=!)/.exec(r))&&(l=o[1],r=r.substr(o[1].length+1,r.length)),!l)if(null!==(o=/[.](css|less|html|htm|js)?((\?|#).*)?$/.exec(r)))l=o[1];else{if(n.jsLoader.hasOwnProperty("ocLazyLoadLoader")||!n.jsLoader.hasOwnProperty("load"))return void n._$log.error("File type could not be determined. "+r);l="js"}"css"!==l&&"less"!==l||-1!==i.indexOf(r)?"html"!==l&&"htm"!==l||-1!==a.indexOf(r)?"js"===l||-1===s.indexOf(r)?s.push(r):n._$log.error("File type is not valid. "+r):a.push(r):i.push(r)}else c&&u.push(c)};if(t.serie?l(t.files.shift()):e.forEach(t.files,function(e){l(e)}),i.length>0){var f=r.defer();n.cssLoader(i,function(r){e.isDefined(r)&&n.cssLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(r),f.reject(r)):f.resolve()},t),u.push(f.promise)}if(a.length>0){var h=r.defer();n.templatesLoader(a,function(r){e.isDefined(r)&&n.templatesLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(r),h.reject(r)):h.resolve()},t),u.push(h.promise)}if(s.length>0){var p=r.defer();n.jsLoader(s,function(r){e.isDefined(r)&&n.jsLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(r),p.reject(r)):p.resolve()},t),u.push(p.promise)}if(0===u.length){var g=r.defer(),m="Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.";return n._$log.error(m),g.reject(m),g.promise}return t.serie&&t.files.length>0?r.all(u).then(function(){return n.filesLoader(o,t)}):r.all(u)["finally"](function(e){return n.toggleWatch(!1),e})},n.load=function(o){var t,i=void 0===arguments[1]?{}:arguments[1],a=this,s=null,u=[],c=r.defer(),d=e.copy(o),l=e.copy(i);if(e.isArray(d))return e.forEach(d,function(e){u.push(a.load(e,l))}),r.all(u).then(function(e){c.resolve(e)},function(e){c.reject(e)}),c.promise;if(e.isString(d)?(s=a.getModuleConfig(d),s||(s={files:[d]})):e.isObject(d)&&(s=e.isDefined(d.path)&&e.isDefined(d.type)?{files:[d]}:a.setModuleConfig(d)),null===s){var f=a._getModuleName(d);return t='Module "'+(f||"unknown")+'" is not configured, cannot load.',n._$log.error(t),c.reject(new Error(t)),c.promise}e.isDefined(s.template)&&(e.isUndefined(s.files)&&(s.files=[]),e.isString(s.template)?s.files.push(s.template):e.isArray(s.template)&&s.files.concat(s.template));var h=e.extend({},l,s);return e.isUndefined(s.files)&&e.isDefined(s.name)&&n.moduleExists(s.name)?n.inject(s.name,h):(n.filesLoader(s,h).then(function(){n.inject(null,h).then(function(e){c.resolve(e)},function(e){c.reject(e)})},function(e){c.reject(e)}),c.promise)},n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q",function(n,r){return n.cssLoader=function(o,t,i){var a=[];e.forEach(o,function(e){a.push(n.buildElement("css",e,i))}),r.all(a).then(function(){t()},function(e){t(e)})},n.cssLoader.ocLazyLoadLoader=!0,n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q",function(n,r){return n.jsLoader=function(o,t,i){var a=[];e.forEach(o,function(e){a.push(n.buildElement("js",e,i))}),r.all(a).then(function(){t()},function(e){t(e)})},n.jsLoader.ocLazyLoadLoader=!0,n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$templateCache","$q","$http",function(n,r,o,t){return n.templatesLoader=function(i,a,s){var u=[],c=n._getFilesCache();return e.forEach(i,function(n){var i=o.defer();u.push(i.promise),t.get(n,s).success(function(o){e.isString(o)&&o.length>0&&e.forEach(e.element(o),function(e){"SCRIPT"===e.nodeName&&"text/ng-template"===e.type&&r.put(e.id,e.innerHTML)}),e.isUndefined(c.get(n))&&c.put(n,!0),i.resolve()}).error(function(e){i.reject(new Error('Unable to load template file "'+n+'": '+e))})}),o.all(u).then(function(){a()},function(e){a(e)})},n.templatesLoader.ocLazyLoadLoader=!0,n}])}])}(angular),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,n){var r;if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),t=o.length>>>0;if(0===t)return-1;var i=+n||0;if(Math.abs(i)===1/0&&(i=0),i>=t)return-1;for(r=Math.max(i>=0?i:t-Math.abs(i),0);t>r;){if(r in o&&o[r]===e)return r;r++}return-1}); +!function(e,n){"use strict";var o=["ng","oc.lazyLoad"],r={},t=[],i=[],a=[],s=e.noop,u={},c=[],d=e.module("oc.lazyLoad",["ng"]);d.provider("$ocLazyLoad",["$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider",function(d,l,p,g,m,v){function y(n,r,t){if(r){var i,a,d,l=[];for(i=r.length-1;i>=0;i--)if(a=r[i],e.isString(a)||(a=j(a)),a&&-1===c.indexOf(a)){var f=-1===o.indexOf(a);if(d=h(a),f&&(o.push(a),y(n,d.requires,t)),d._runBlocks.length>0)for(u[a]=[];d._runBlocks.length>0;)u[a].push(d._runBlocks.shift());e.isDefined(u[a])&&(f||t.rerun)&&(l=l.concat(u[a])),$(n,d._invokeQueue,a,t.reconfig),$(n,d._configBlocks,a,t.reconfig),s(f?"ocLazyLoad.moduleLoaded":"ocLazyLoad.moduleReloaded",a),r.pop(),c.push(a)}var p=n.getInstanceInjector();e.forEach(l,function(e){p.invoke(e)})}}function L(n,o){function t(n){return e.isArray(n)?D(n.toString()):e.isObject(n)?D(z(n)):e.isDefined(n)&&null!==n?D(n.toString()):n}var i=n[2][0],a=n[1],u=!1;e.isUndefined(r[o])&&(r[o]={}),e.isUndefined(r[o][a])&&(r[o][a]={});var c=function(e,n){r[o][a].hasOwnProperty(e)||(r[o][a][e]=[]),-1===r[o][a][e].indexOf(n)&&(u=!0,r[o][a][e].push(n),s("ocLazyLoad.componentLoaded",[o,a,e]))};if(e.isString(i))c(i,t(n[2][1]));else{if(!e.isObject(i))return!1;e.forEach(i,function(n,o){e.isString(n)?c(n,t(i[1])):c(o,t(n))})}return u}function $(n,o,r,i){if(o){var a,s,u,c;for(a=0,s=o.length;s>a;a++)if(u=o[a],e.isArray(u)){if(null!==n){if(!n.hasOwnProperty(u[0]))throw new Error("unsupported provider "+u[0]);c=n[u[0]]}var d=L(u,r);if("invoke"!==u[1])d&&e.isDefined(c)&&c[u[1]].apply(c,u[2]);else{var l=function(n){var o=t.indexOf(""+r+"-"+n);(-1===o||i)&&(-1===o&&t.push(""+r+"-"+n),e.isDefined(c)&&c[u[1]].apply(c,u[2]))};if(e.isFunction(u[2][0]))l(u[2][0]);else if(e.isArray(u[2][0]))for(var f=0,h=u[2][0].length;h>f;f++)e.isFunction(u[2][0][f])&&l(u[2][0][f])}}}}function j(n){var o=null;return e.isString(n)?o=n:e.isObject(n)&&n.hasOwnProperty("name")&&e.isString(n.name)&&(o=n.name),o}function E(n){if(!e.isString(n))return!1;try{return h(n)}catch(o){if(/No module/.test(o)||o.message.indexOf("$injector:nomod")>-1)return!1}}var _={},w={$controllerProvider:d,$compileProvider:p,$filterProvider:g,$provide:l,$injector:m,$animateProvider:v},x=!1,O=!1,b=[];b.push=function(e){-1===this.indexOf(e)&&Array.prototype.push.apply(this,arguments)},this.config=function(n){e.isDefined(n.modules)&&(e.isArray(n.modules)?e.forEach(n.modules,function(e){_[e.name]=e}):_[n.modules.name]=n.modules),e.isDefined(n.debug)&&(x=n.debug),e.isDefined(n.events)&&(O=n.events)},this._init=function(r){if(0===i.length){var t=[r],s=["ng:app","ng-app","x-ng-app","data-ng-app"],u=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/,c=function(e){return e&&t.push(e)};e.forEach(s,function(n){s[n]=!0,c(document.getElementById(n)),n=n.replace(":","\\:"),"undefined"!=typeof r[0]&&r[0].querySelectorAll&&(e.forEach(r[0].querySelectorAll("."+n),c),e.forEach(r[0].querySelectorAll("."+n+"\\:"),c),e.forEach(r[0].querySelectorAll("["+n+"]"),c))}),e.forEach(t,function(n){if(0===i.length){var o=" "+r.className+" ",t=u.exec(o);t?i.push((t[2]||"").replace(/\s+/g,",")):e.forEach(n.attributes,function(e){0===i.length&&s[e.name]&&i.push(e.value)})}})}0!==i.length||(n.jasmine||n.mocha)&&e.isDefined(e.mock)||console.error("No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.");var d=function l(n){if(-1===o.indexOf(n)){o.push(n);var r=e.module(n);$(null,r._invokeQueue,n),$(null,r._configBlocks,n),e.forEach(r.requires,l)}};e.forEach(i,function(e){d(e)}),i=[],a.pop()};var z=function(n){var o=[];return JSON.stringify(n,function(n,r){if(e.isObject(r)&&null!==r){if(-1!==o.indexOf(r))return;o.push(r)}return r})},D=function(e){var n,o,r,t=0;if(0==e.length)return t;for(n=0,r=e.length;r>n;n++)o=e.charCodeAt(n),t=(t<<5)-t+o,t|=0;return t};this.$get=["$log","$rootElement","$rootScope","$cacheFactory","$q",function(n,r,t,u,d){function l(e){var o=d.defer();return n.error(e.message),o.reject(e),o.promise}var p,g=u("ocLazyLoad");return x||(n={},n.error=e.noop,n.warn=e.noop,n.info=e.noop),w.getInstanceInjector=function(){return p?p:p=r.data("$injector")||e.injector()},s=function(e,o){O&&t.$broadcast(e,o),x&&n.info(e,o)},{_broadcast:s,_$log:n,_getFilesCache:function(){return g},toggleWatch:function(e){e?a.push(!0):a.pop()},getModuleConfig:function(n){if(!e.isString(n))throw new Error("You need to give the name of the module to get");return _[n]?e.copy(_[n]):null},setModuleConfig:function(n){if(!e.isObject(n))throw new Error("You need to give the module config object to set");return _[n.name]=n,n},getModules:function(){return o},isLoaded:function(n){var r=function(e){var n=o.indexOf(e)>-1;return n||(n=!!E(e)),n};if(e.isString(n)&&(n=[n]),e.isArray(n)){var t,i;for(t=0,i=n.length;i>t;t++)if(!r(n[t]))return!1;return!0}throw new Error("You need to define the module(s) name(s)")},_getModuleName:j,_getModule:function(e){try{return h(e)}catch(n){throw(/No module/.test(n)||n.message.indexOf("$injector:nomod")>-1)&&(n.message='The module "'+z(e)+'" that you are trying to load does not exist. '+n.message),n}},moduleExists:E,_loadDependencies:function(n,o){var r,t,i,a=[],s=this;if(n=s._getModuleName(n),null===n)return d.when();try{r=s._getModule(n)}catch(u){return l(u)}return t=s.getRequires(r),e.forEach(t,function(r){if(e.isString(r)){var t=s.getModuleConfig(r);if(null===t)return void b.push(r);r=t}if(s.moduleExists(r.name))return i=r.files.filter(function(e){return s.getModuleConfig(r.name).files.indexOf(e)<0}),0!==i.length&&s._$log.warn('Module "',n,'" attempted to redefine configuration for dependency. "',r.name,'"\n Additional Files Loaded:',i),e.isDefined(s.filesLoader)?void a.push(s.filesLoader(r,o).then(function(){return s._loadDependencies(r)})):l(new Error("Error: New dependencies need to be loaded from external files ("+r.files+"), but no loader has been defined."));if(e.isArray(r)?r={files:r}:e.isObject(r)&&r.hasOwnProperty("name")&&r.name&&(s.setModuleConfig(r),b.push(r.name)),e.isDefined(r.files)&&0!==r.files.length){if(!e.isDefined(s.filesLoader))return l(new Error('Error: the module "'+r.name+'" is defined in external files ('+r.files+"), but no loader has been defined."));a.push(s.filesLoader(r,o).then(function(){return s._loadDependencies(r)}))}}),d.all(a)},inject:function(n){var o=void 0===arguments[1]?{}:arguments[1],r=this,t=d.defer();if(e.isDefined(n)&&null!==n){if(e.isArray(n)){var a=[];return e.forEach(n,function(e){a.push(r.inject(e))}),d.all(a)}r._addToLoadList(r._getModuleName(n),!0)}if(i.length>0){var s=i.slice(),u=function l(e){b.push(e),r._loadDependencies(e,o).then(function(){try{c=[],y(w,b,o)}catch(e){return r._$log.error(e.message),void t.reject(e)}i.length>0?l(i.shift()):t.resolve(s)},function(e){t.reject(e)})};u(i.shift())}else t.resolve();return t.promise},getRequires:function(n){var r=[];return e.forEach(n.requires,function(e){-1===o.indexOf(e)&&r.push(e)}),r},_invokeQueue:$,_registerInvokeList:L,_register:y,_addToLoadList:f}}],this._init(e.element(n.document))}]);var l=e.bootstrap;e.bootstrap=function(n,o,r){return e.forEach(o.slice(),function(e){f(e,!0)}),l(n,o,r)};var f=function(n,o){(a.length>0||o)&&e.isString(n)&&-1===i.indexOf(n)&&i.push(n)},h=e.module;e.module=function(e,n,o){return f(e),h(e,n,o)},"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="oc.lazyLoad")}(angular,window),function(e){"use strict";e.module("oc.lazyLoad").directive("ocLazyLoad",["$ocLazyLoad","$compile","$animate","$parse",function(n,o,r,t){return{restrict:"A",terminal:!0,priority:1e3,compile:function(i,a){var s=i[0].innerHTML;return i.html(""),function(a,u,c){var d=t(c.ocLazyLoad);a.$watch(function(){return d(a)||c.ocLazyLoad},function(t){e.isDefined(t)&&n.load(t).then(function(){r.enter(s,u);var n=i.contents();e.forEach(n,function(e){3!==e.nodeType&&o(e)(a)})})},!0)}}}}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q","$window","$interval",function(n,o,r,t){var i=!1,a=!1,s=r.document.getElementsByTagName("head")[0]||r.document.getElementsByTagName("body")[0];return n.buildElement=function(u,c,d){var l,f,h=o.defer(),p=n._getFilesCache(),g=function(e){var n=(new Date).getTime();return e.indexOf("?")>=0?"&"===e.substring(0,e.length-1)?""+e+"_dc="+n:""+e+"&_dc="+n:""+e+"?_dc="+n};switch(e.isUndefined(p.get(c))&&p.put(c,h.promise),u){case"css":l=r.document.createElement("link"),l.type="text/css",l.rel="stylesheet",l.href=d.cache===!1?g(c):c;break;case"js":l=r.document.createElement("script"),l.src=d.cache===!1?g(c):c;break;default:p.remove(c),h.reject(new Error('Requested type "'+u+'" is not known. Could not inject "'+c+'"'))}l.onload=l.onreadystatechange=function(e){l.readyState&&!/^c|loade/.test(l.readyState)||f||(l.onload=l.onreadystatechange=null,f=1,n._broadcast("ocLazyLoad.fileLoaded",c),h.resolve())},l.onerror=function(){p.remove(c),h.reject(new Error("Unable to load "+c))},l.async=d.serie?0:1;var m=s.lastChild;if(d.insertBefore){var v=e.element(e.isDefined(window.jQuery)?d.insertBefore:document.querySelector(d.insertBefore));v&&v.length>0&&(m=v[0])}if(m.parentNode.insertBefore(l,m),"css"==u){if(!i){var y=r.navigator.userAgent.toLowerCase();if(/iP(hone|od|ad)/.test(r.navigator.platform)){var L=r.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),$=parseFloat([parseInt(L[1],10),parseInt(L[2],10),parseInt(L[3]||0,10)].join("."));a=6>$}else if(y.indexOf("android")>-1){var j=parseFloat(y.slice(y.indexOf("android")+8));a=4.4>j}else if(y.indexOf("safari")>-1){var E=y.match(/version\/([\.\d]+)/i);a=E&&E[1]&&parseFloat(E[1])<6}}if(a)var _=1e3,w=t(function(){try{l.sheet.cssRules,t.cancel(w),l.onload()}catch(e){--_<=0&&l.onerror()}},20)}return h.promise},n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q",function(n,o){return n.filesLoader=function(r){var t=void 0===arguments[1]?{}:arguments[1],i=[],a=[],s=[],u=[],c=null,d=n._getFilesCache();n.toggleWatch(!0),e.extend(t,r);var l=function(o){var r,l=null;if(e.isObject(o)&&(l=o.type,o=o.path),c=d.get(o),e.isUndefined(c)||t.cache===!1){if(null!==(r=/^(css|less|html|htm|js)?(?=!)/.exec(o))&&(l=r[1],o=o.substr(r[1].length+1,o.length)),!l)if(null!==(r=/[.](css|less|html|htm|js)?((\?|#).*)?$/.exec(o)))l=r[1];else{if(n.jsLoader.hasOwnProperty("ocLazyLoadLoader")||!n.jsLoader.hasOwnProperty("load"))return void n._$log.error("File type could not be determined. "+o);l="js"}"css"!==l&&"less"!==l||-1!==i.indexOf(o)?"html"!==l&&"htm"!==l||-1!==a.indexOf(o)?"js"===l||-1===s.indexOf(o)?s.push(o):n._$log.error("File type is not valid. "+o):a.push(o):i.push(o)}else c&&u.push(c)};if(t.serie?l(t.files.shift()):e.forEach(t.files,function(e){l(e)}),i.length>0){var f=o.defer();n.cssLoader(i,function(o){e.isDefined(o)&&n.cssLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(o),f.reject(o)):f.resolve()},t),u.push(f.promise)}if(a.length>0){var h=o.defer();n.templatesLoader(a,function(o){e.isDefined(o)&&n.templatesLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(o),h.reject(o)):h.resolve()},t),u.push(h.promise)}if(s.length>0){var p=o.defer();n.jsLoader(s,function(o){e.isDefined(o)&&n.jsLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(o),p.reject(o)):p.resolve()},t),u.push(p.promise)}if(0===u.length){var g=o.defer(),m="Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.";return n._$log.error(m),g.reject(m),g.promise}return t.serie&&t.files.length>0?o.all(u).then(function(){return n.filesLoader(r,t)}):o.all(u)["finally"](function(e){return n.toggleWatch(!1),e})},n.load=function(r){var t,i=void 0===arguments[1]?{}:arguments[1],a=this,s=null,u=[],c=o.defer(),d=e.copy(r),l=e.copy(i);if(e.isArray(d))return e.forEach(d,function(e){u.push(a.load(e,l))}),o.all(u).then(function(e){c.resolve(e)},function(e){c.reject(e)}),c.promise;if(e.isString(d)?(s=a.getModuleConfig(d),s||(s={files:[d]})):e.isObject(d)&&(s=e.isDefined(d.path)&&e.isDefined(d.type)?{files:[d]}:a.setModuleConfig(d)),null===s){var f=a._getModuleName(d);return t='Module "'+(f||"unknown")+'" is not configured, cannot load.',n._$log.error(t),c.reject(new Error(t)),c.promise}e.isDefined(s.template)&&(e.isUndefined(s.files)&&(s.files=[]),e.isString(s.template)?s.files.push(s.template):e.isArray(s.template)&&s.files.concat(s.template));var h=e.extend({},l,s);return e.isUndefined(s.files)&&e.isDefined(s.name)&&n.moduleExists(s.name)?n.inject(s.name,h):(n.filesLoader(s,h).then(function(){n.inject(null,h).then(function(e){c.resolve(e)},function(e){c.reject(e)})},function(e){c.reject(e)}),c.promise)},n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q",function(n,o){return n.cssLoader=function(r,t,i){var a=[];e.forEach(r,function(e){a.push(n.buildElement("css",e,i))}),o.all(a).then(function(){t()},function(e){t(e)})},n.cssLoader.ocLazyLoadLoader=!0,n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q",function(n,o){return n.jsLoader=function(r,t,i){var a=[];e.forEach(r,function(e){a.push(n.buildElement("js",e,i))}),o.all(a).then(function(){t()},function(e){t(e)})},n.jsLoader.ocLazyLoadLoader=!0,n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$templateCache","$q","$http",function(n,o,r,t){return n.templatesLoader=function(i,a,s){var u=[],c=n._getFilesCache();return e.forEach(i,function(n){var i=r.defer();u.push(i.promise),t.get(n,s).success(function(r){e.isString(r)&&r.length>0&&e.forEach(e.element(r),function(e){"SCRIPT"===e.nodeName&&"text/ng-template"===e.type&&o.put(e.id,e.innerHTML)}),e.isUndefined(c.get(n))&&c.put(n,!0),i.resolve()}).error(function(e){i.reject(new Error('Unable to load template file "'+n+'": '+e))})}),r.all(u).then(function(){a()},function(e){a(e)})},n.templatesLoader.ocLazyLoadLoader=!0,n}])}])}(angular),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,n){var o;if(null==this)throw new TypeError('"this" is null or not defined');var r=Object(this),t=r.length>>>0;if(0===t)return-1;var i=+n||0;if(Math.abs(i)===1/0&&(i=0),i>=t)return-1;for(o=Math.max(i>=0?i:t-Math.abs(i),0);t>o;){if(o in r&&r[o]===e)return o;o++}return-1}); //# sourceMappingURL=ocLazyLoad.min.js.map \ No newline at end of file diff --git a/dist/ocLazyLoad.min.js.map b/dist/ocLazyLoad.min.js.map index c65436a..a0409a5 100644 --- a/dist/ocLazyLoad.min.js.map +++ b/dist/ocLazyLoad.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["ocLazyLoad.js"],"names":["angular","window","regModules","regInvokes","regConfigs","modulesToLoad","recordDeclarations","broadcast","noop","runBlocks","justLoaded","ocLazyLoad","module","provider","$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider","_register","providers","registerModules","params","k","moduleName","moduleFn","tempRunBlocks","length","isString","getModuleName","indexOf","newModule","ngModuleFct","push","requires","_runBlocks","shift","isDefined","rerun","concat","_invokeQueue","reconfig","_configBlocks","pop","instanceInjector","getInstanceInjector","forEach","fn","invoke","_registerInvokeList","args","signature","data","isArray","hashCode","toString","isObject","stringify","invokeList","type","newInvoke","isUndefined","onInvoke","invokeName","hasOwnProperty","key","queue","i","len","Error","isNew","apply","callInvoke","fct","invoked","isFunction","j","jlen","name","moduleExists","e","test","message","modules","debug","events","moduleCache","value","this","Array","prototype","arguments","config","moduleConfig","_init","element","elements","names","NG_APP_CLASS_REGEXP","append","elm","document","getElementById","replace","querySelectorAll","className","match","exec","attributes","attr","jasmine","mocha","mock","console","error","addReg","mainModule","obj","cache","JSON","str","chr","hash","charCodeAt","$get","$log","$rootElement","$rootScope","$cacheFactory","$q","reject","deferred","defer","promise","filesCache","injector","eventName","$broadcast","info","_broadcast","_$log","_getFilesCache","toggleWatch","watch","getModuleConfig","copy","setModuleConfig","getModules","isLoaded","modulesNames","moduleLoaded","_getModuleName","_getModule","_loadDependencies","localParams","loadedModule","diff","promisesList","self","when","getRequires","requireEntry","files","filter","n","warn","filesLoader","then","all","inject","undefined","_addToLoadList","res","slice","loadNext","resolve","err","requireModule","bootstrapFct","bootstrap","force","configFn","exports","directive","$ocLazyLoad","$compile","$animate","$parse","restrict","terminal","priority","compile","attrs","content","innerHTML","html","$scope","$element","$attr","model","$watch","load","enter","contents","nodeType","decorator","$delegate","$window","$interval","uaCssChecked","useCssLoadPatch","anchor","getElementsByTagName","buildElement","path","el","loaded","cacheBuster","url","dc","Date","getTime","substring","get","put","createElement","rel","href","src","remove","onload","onerror","async","serie","insertBeforeElem","lastChild","insertBefore","jQuery","querySelector","parentNode","ua","navigator","userAgent","toLowerCase","platform","v","appVersion","iOSVersion","parseFloat","parseInt","join","androidVersion","versionMatch","tries","interval","sheet","cssRules","cancel","cssFiles","templatesFiles","jsFiles","promises","cachePromise","extend","pushFile","m","file_type","substr","jsLoader","cssDeferred","cssLoader","templatesDeferred","templatesLoader","jsDeferred","originalModule","errText","originalParams","deferredList","template","paths","callback","ocLazyLoadLoader","$templateCache","$http","success","node","nodeName","id","searchElement","fromIndex","TypeError","O","Object","Math","abs","Infinity","max"],"mappings":"CAOA,SAAWA,EAASC,GAChB,YAEA,IAAIC,IAAc,KAAM,eACpBC,KACAC,KACAC,KACAC,KACAC,EAAYP,EAAQQ,KACpBC,KACAC,KAEAC,EAAaX,EAAQY,OAAO,eAAgB,MAEhDD,GAAWE,SAAS,eAAgB,sBAAuB,WAAY,mBAAoB,kBAAmB,YAAa,mBAAoB,SAAUC,EAAqBC,EAAUC,EAAkBC,EAAiBC,EAAWC,GAgJlO,QAASC,GAAUC,EAAWC,EAAiBC,GAC3C,GAAID,EAAiB,CACjB,GAAIE,GACAC,EACAC,EACAC,IACJ,KAAKH,EAAIF,EAAgBM,OAAS,EAAGJ,GAAK,EAAGA,IAKzC,GAJAC,EAAaH,EAAgBE,GACxBxB,EAAQ6B,SAASJ,KAClBA,EAAaK,EAAcL,IAE1BA,GAAiD,KAAnCf,EAAWqB,QAAQN,GAAtC,CAGA,GAAIO,GAA+C,KAAnC9B,EAAW6B,QAAQN,EAOnC,IANAC,EAAWO,EAAYR,GACnBO,IAEA9B,EAAWgC,KAAKT,GAChBL,EAAUC,EAAWK,EAASS,SAAUZ,IAExCG,EAASU,WAAWR,OAA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- Load modules on demand (lazy load) with angularJS\n * @version v1.0.1\n * @link https://github.com/ocombe/ocLazyLoad\n * @license MIT\n * @author Olivier Combe \n */\n(function (angular, window) {\n 'use strict';\n\n var regModules = ['ng', 'oc.lazyLoad'],\n regInvokes = {},\n regConfigs = [],\n modulesToLoad = [],\n recordDeclarations = [],\n broadcast = angular.noop,\n runBlocks = {},\n justLoaded = [];\n\n var ocLazyLoad = angular.module('oc.lazyLoad', ['ng']);\n\n ocLazyLoad.provider('$ocLazyLoad', [\"$controllerProvider\", \"$provide\", \"$compileProvider\", \"$filterProvider\", \"$injector\", \"$animateProvider\", function ($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\n var modules = {},\n providers = {\n $controllerProvider: $controllerProvider,\n $compileProvider: $compileProvider,\n $filterProvider: $filterProvider,\n $provide: $provide, // other things (constant, decorator, provider, factory, service)\n $injector: $injector,\n $animateProvider: $animateProvider\n },\n debug = false,\n events = false,\n moduleCache = [];\n\n moduleCache.push = function (value) {\n if (this.indexOf(value) === -1) {\n Array.prototype.push.apply(this, arguments);\n }\n };\n\n this.config = function (config) {\n // If we want to define modules configs\n if (angular.isDefined(config.modules)) {\n if (angular.isArray(config.modules)) {\n angular.forEach(config.modules, function (moduleConfig) {\n modules[moduleConfig.name] = moduleConfig;\n });\n } else {\n modules[config.modules.name] = config.modules;\n }\n }\n\n if (angular.isDefined(config.debug)) {\n debug = config.debug;\n }\n\n if (angular.isDefined(config.events)) {\n events = config.events;\n }\n };\n\n /**\r\n * Get the list of existing registered modules\r\n * @param element\r\n */\n this._init = function _init(element) {\n // this is probably useless now because we override angular.bootstrap\n if (modulesToLoad.length === 0) {\n var elements = [element],\n names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],\n NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\n append = function append(elm) {\n return elm && elements.push(elm);\n };\n\n angular.forEach(names, function (name) {\n names[name] = true;\n append(document.getElementById(name));\n name = name.replace(':', '\\\\:');\n if (element[0].querySelectorAll) {\n angular.forEach(element[0].querySelectorAll('.' + name), append);\n angular.forEach(element[0].querySelectorAll('.' + name + '\\\\:'), append);\n angular.forEach(element[0].querySelectorAll('[' + name + ']'), append);\n }\n });\n\n angular.forEach(elements, function (elm) {\n if (modulesToLoad.length === 0) {\n var className = ' ' + element.className + ' ';\n var match = NG_APP_CLASS_REGEXP.exec(className);\n if (match) {\n modulesToLoad.push((match[2] || '').replace(/\\s+/g, ','));\n } else {\n angular.forEach(elm.attributes, function (attr) {\n if (modulesToLoad.length === 0 && names[attr.name]) {\n modulesToLoad.push(attr.value);\n }\n });\n }\n }\n });\n }\n\n if (modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\n console.error('No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.');\n }\n\n var addReg = function addReg(moduleName) {\n if (regModules.indexOf(moduleName) === -1) {\n // register existing modules\n regModules.push(moduleName);\n var mainModule = angular.module(moduleName);\n\n // register existing components (directives, services, ...)\n _invokeQueue(null, mainModule._invokeQueue, moduleName);\n _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\n\n angular.forEach(mainModule.requires, addReg);\n }\n };\n\n angular.forEach(modulesToLoad, function (moduleName) {\n addReg(moduleName);\n });\n\n modulesToLoad = []; // reset for next bootstrap\n recordDeclarations.pop(); // wait for the next lazy load\n };\n\n /**\r\n * Like JSON.stringify but that doesn't throw on circular references\r\n * @param obj\r\n */\n var stringify = function stringify(obj) {\n var cache = [];\n return JSON.stringify(obj, function (key, value) {\n if (angular.isObject(value) && value !== null) {\n if (cache.indexOf(value) !== -1) {\n // Circular reference found, discard key\n return;\n }\n // Store value in our collection\n cache.push(value);\n }\n return value;\n });\n };\n\n var hashCode = function hashCode(str) {\n var hash = 0,\n i,\n chr,\n len;\n if (str.length == 0) {\n return hash;\n }\n for (i = 0, len = str.length; i < len; i++) {\n chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n };\n\n function _register(providers, registerModules, params) {\n if (registerModules) {\n var k,\n moduleName,\n moduleFn,\n tempRunBlocks = [];\n for (k = registerModules.length - 1; k >= 0; k--) {\n moduleName = registerModules[k];\n if (!angular.isString(moduleName)) {\n moduleName = getModuleName(moduleName);\n }\n if (!moduleName || justLoaded.indexOf(moduleName) !== -1) {\n continue;\n }\n var newModule = regModules.indexOf(moduleName) === -1;\n moduleFn = ngModuleFct(moduleName);\n if (newModule) {\n // new module\n regModules.push(moduleName);\n _register(providers, moduleFn.requires, params);\n }\n if (moduleFn._runBlocks.length > 0) {\n // new run blocks detected! Replace the old ones (if existing)\n runBlocks[moduleName] = [];\n while (moduleFn._runBlocks.length > 0) {\n runBlocks[moduleName].push(moduleFn._runBlocks.shift());\n }\n }\n if (angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\n tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\n }\n _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\n _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\n broadcast(newModule ? 'ocLazyLoad.moduleLoaded' : 'ocLazyLoad.moduleReloaded', moduleName);\n registerModules.pop();\n justLoaded.push(moduleName);\n }\n // execute the run blocks at the end\n var instanceInjector = providers.getInstanceInjector();\n angular.forEach(tempRunBlocks, function (fn) {\n instanceInjector.invoke(fn);\n });\n }\n }\n\n function _registerInvokeList(args, moduleName) {\n var invokeList = args[2][0],\n type = args[1],\n newInvoke = false;\n if (angular.isUndefined(regInvokes[moduleName])) {\n regInvokes[moduleName] = {};\n }\n if (angular.isUndefined(regInvokes[moduleName][type])) {\n regInvokes[moduleName][type] = {};\n }\n var onInvoke = function onInvoke(invokeName, signature) {\n if (!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\n regInvokes[moduleName][type][invokeName] = [];\n }\n if (regInvokes[moduleName][type][invokeName].indexOf(signature) === -1) {\n newInvoke = true;\n regInvokes[moduleName][type][invokeName].push(signature);\n broadcast('ocLazyLoad.componentLoaded', [moduleName, type, invokeName]);\n }\n };\n\n function signature(data) {\n if (angular.isArray(data)) {\n // arrays are objects, we need to test for it first\n return hashCode(data.toString());\n } else if (angular.isObject(data)) {\n // constants & values for example\n return hashCode(stringify(data));\n } else {\n if (angular.isDefined(data) && data !== null) {\n return hashCode(data.toString());\n } else {\n // null & undefined constants\n return data;\n }\n }\n }\n\n if (angular.isString(invokeList)) {\n onInvoke(invokeList, signature(args[2][1]));\n } else if (angular.isObject(invokeList)) {\n angular.forEach(invokeList, function (invoke, key) {\n if (angular.isString(invoke)) {\n // decorators for example\n onInvoke(invoke, signature(invokeList[1]));\n } else {\n // components registered as object lists {\"componentName\": function() {}}\n onInvoke(key, signature(invoke));\n }\n });\n } else {\n return false;\n }\n return newInvoke;\n }\n\n function _invokeQueue(providers, queue, moduleName, reconfig) {\n if (!queue) {\n return;\n }\n\n var i, len, args, provider;\n for (i = 0, len = queue.length; i < len; i++) {\n args = queue[i];\n if (angular.isArray(args)) {\n if (providers !== null) {\n if (providers.hasOwnProperty(args[0])) {\n provider = providers[args[0]];\n } else {\n throw new Error('unsupported provider ' + args[0]);\n }\n }\n var isNew = _registerInvokeList(args, moduleName);\n if (args[1] !== 'invoke') {\n if (isNew && angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n } else {\n // config block\n var callInvoke = function callInvoke(fct) {\n var invoked = regConfigs.indexOf('' + moduleName + '-' + fct);\n if (invoked === -1 || reconfig) {\n if (invoked === -1) {\n regConfigs.push('' + moduleName + '-' + fct);\n }\n if (angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n }\n };\n if (angular.isFunction(args[2][0])) {\n callInvoke(args[2][0]);\n } else if (angular.isArray(args[2][0])) {\n for (var j = 0, jlen = args[2][0].length; j < jlen; j++) {\n if (angular.isFunction(args[2][0][j])) {\n callInvoke(args[2][0][j]);\n }\n }\n }\n }\n }\n }\n }\n\n function getModuleName(module) {\n var moduleName = null;\n if (angular.isString(module)) {\n moduleName = module;\n } else if (angular.isObject(module) && module.hasOwnProperty('name') && angular.isString(module.name)) {\n moduleName = module.name;\n }\n return moduleName;\n }\n\n function moduleExists(moduleName) {\n if (!angular.isString(moduleName)) {\n return false;\n }\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\n return false;\n }\n }\n }\n\n this.$get = [\"$log\", \"$rootElement\", \"$rootScope\", \"$cacheFactory\", \"$q\", function ($log, $rootElement, $rootScope, $cacheFactory, $q) {\n var instanceInjector,\n filesCache = $cacheFactory('ocLazyLoad');\n\n if (!debug) {\n $log = {};\n $log['error'] = angular.noop;\n $log['warn'] = angular.noop;\n $log['info'] = angular.noop;\n }\n\n // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\n providers.getInstanceInjector = function () {\n return instanceInjector ? instanceInjector : instanceInjector = $rootElement.data('$injector') || angular.injector();\n };\n\n broadcast = function broadcast(eventName, params) {\n if (events) {\n $rootScope.$broadcast(eventName, params);\n }\n if (debug) {\n $log.info(eventName, params);\n }\n };\n\n function reject(e) {\n var deferred = $q.defer();\n $log.error(e.message);\n deferred.reject(e);\n return deferred.promise;\n }\n\n return {\n _broadcast: broadcast,\n\n _$log: $log,\n\n /**\r\n * Returns the files cache used by the loaders to store the files currently loading\r\n * @returns {*}\r\n */\n _getFilesCache: function getFilesCache() {\n return filesCache;\n },\n\n /**\r\n * Let the service know that it should monitor angular.module because files are loading\r\n * @param watch boolean\r\n */\n toggleWatch: function toggleWatch(watch) {\n if (watch) {\n recordDeclarations.push(true);\n } else {\n recordDeclarations.pop();\n }\n },\n\n /**\r\n * Let you get a module config object\r\n * @param moduleName String the name of the module\r\n * @returns {*}\r\n */\n getModuleConfig: function getModuleConfig(moduleName) {\n if (!angular.isString(moduleName)) {\n throw new Error('You need to give the name of the module to get');\n }\n if (!modules[moduleName]) {\n return null;\n }\n return angular.copy(modules[moduleName]);\n },\n\n /**\r\n * Let you define a module config object\r\n * @param moduleConfig Object the module config object\r\n * @returns {*}\r\n */\n setModuleConfig: function setModuleConfig(moduleConfig) {\n if (!angular.isObject(moduleConfig)) {\n throw new Error('You need to give the module config object to set');\n }\n modules[moduleConfig.name] = moduleConfig;\n return moduleConfig;\n },\n\n /**\r\n * Returns the list of loaded modules\r\n * @returns {string[]}\r\n */\n getModules: function getModules() {\n return regModules;\n },\n\n /**\r\n * Let you check if a module has been loaded into Angular or not\r\n * @param modulesNames String/Object a module name, or a list of module names\r\n * @returns {boolean}\r\n */\n isLoaded: function isLoaded(modulesNames) {\n var moduleLoaded = function moduleLoaded(module) {\n var isLoaded = regModules.indexOf(module) > -1;\n if (!isLoaded) {\n isLoaded = !!moduleExists(module);\n }\n return isLoaded;\n };\n if (angular.isString(modulesNames)) {\n modulesNames = [modulesNames];\n }\n if (angular.isArray(modulesNames)) {\n var i, len;\n for (i = 0, len = modulesNames.length; i < len; i++) {\n if (!moduleLoaded(modulesNames[i])) {\n return false;\n }\n }\n return true;\n } else {\n throw new Error('You need to define the module(s) name(s)');\n }\n },\n\n /**\r\n * Given a module, return its name\r\n * @param module\r\n * @returns {String}\r\n */\n _getModuleName: getModuleName,\n\n /**\r\n * Returns a module if it exists\r\n * @param moduleName\r\n * @returns {module}\r\n */\n _getModule: function getModule(moduleName) {\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n // this error message really suxx\n if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\n e.message = 'The module \"' + stringify(moduleName) + '\" that you are trying to load does not exist. ' + e.message;\n }\n throw e;\n }\n },\n\n /**\r\n * Check if a module exists and returns it if it does\r\n * @param moduleName\r\n * @returns {boolean}\r\n */\n moduleExists: moduleExists,\n\n /**\r\n * Load the dependencies, and might try to load new files depending on the config\r\n * @param moduleName (String or Array of Strings)\r\n * @param localParams\r\n * @returns {*}\r\n * @private\r\n */\n _loadDependencies: function _loadDependencies(moduleName, localParams) {\n var loadedModule,\n requires,\n diff,\n promisesList = [],\n self = this;\n\n moduleName = self._getModuleName(moduleName);\n\n if (moduleName === null) {\n return $q.when();\n } else {\n try {\n loadedModule = self._getModule(moduleName);\n } catch (e) {\n return reject(e);\n }\n // get unloaded requires\n requires = self.getRequires(loadedModule);\n }\n\n angular.forEach(requires, function (requireEntry) {\n // If no configuration is provided, try and find one from a previous load.\n // If there isn't one, bail and let the normal flow run\n if (angular.isString(requireEntry)) {\n var config = self.getModuleConfig(requireEntry);\n if (config === null) {\n moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\n return;\n }\n requireEntry = config;\n }\n\n // Check if this dependency has been loaded previously\n if (self.moduleExists(requireEntry.name)) {\n // compare against the already loaded module to see if the new definition adds any new files\n diff = requireEntry.files.filter(function (n) {\n return self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0;\n });\n\n // If the module was redefined, advise via the console\n if (diff.length !== 0) {\n self._$log.warn('Module \"', moduleName, '\" attempted to redefine configuration for dependency. \"', requireEntry.name, '\"\\n Additional Files Loaded:', diff);\n }\n\n // Push everything to the file loader, it will weed out the duplicates.\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error('Error: New dependencies need to be loaded from external files (' + requireEntry.files + '), but no loader has been defined.'));\n }\n return;\n } else if (angular.isArray(requireEntry)) {\n requireEntry = {\n files: requireEntry\n };\n } else if (angular.isObject(requireEntry)) {\n if (requireEntry.hasOwnProperty('name') && requireEntry['name']) {\n // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\n self.setModuleConfig(requireEntry);\n moduleCache.push(requireEntry['name']);\n }\n }\n\n // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\n if (angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error('Error: the module \"' + requireEntry.name + '\" is defined in external files (' + requireEntry.files + '), but no loader has been defined.'));\n }\n }\n });\n\n // Create a wrapper promise to watch the promise list and resolve it once everything is done.\n return $q.all(promisesList);\n },\n\n /**\r\n * Inject new modules into Angular\r\n * @param moduleName\r\n * @param localParams\r\n */\n inject: function inject(moduleName) {\n var localParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n deferred = $q.defer();\n if (angular.isDefined(moduleName) && moduleName !== null) {\n if (angular.isArray(moduleName)) {\n var promisesList = [];\n angular.forEach(moduleName, function (module) {\n promisesList.push(self.inject(module));\n });\n return $q.all(promisesList);\n } else {\n self._addToLoadList(self._getModuleName(moduleName), true);\n }\n }\n if (modulesToLoad.length > 0) {\n var res = modulesToLoad.slice(); // clean copy\n var loadNext = function loadNext(moduleName) {\n moduleCache.push(moduleName);\n self._loadDependencies(moduleName, localParams).then(function success() {\n try {\n justLoaded = [];\n _register(providers, moduleCache, localParams);\n } catch (e) {\n self._$log.error(e.message);\n deferred.reject(e);\n return;\n }\n\n if (modulesToLoad.length > 0) {\n loadNext(modulesToLoad.shift()); // load the next in list\n } else {\n deferred.resolve(res); // everything has been loaded, resolve\n }\n }, function error(err) {\n deferred.reject(err);\n });\n };\n\n // load the first in list\n loadNext(modulesToLoad.shift());\n } else {\n deferred.resolve();\n }\n return deferred.promise;\n },\n\n /**\r\n * Get the list of required modules/services/... for this module\r\n * @param module\r\n * @returns {Array}\r\n */\n getRequires: function getRequires(module) {\n var requires = [];\n angular.forEach(module.requires, function (requireModule) {\n if (regModules.indexOf(requireModule) === -1) {\n requires.push(requireModule);\n }\n });\n return requires;\n },\n\n /**\r\n * Invoke the new modules & component by their providers\r\n * @param providers\r\n * @param queue\r\n * @param moduleName\r\n * @param reconfig\r\n * @private\r\n */\n _invokeQueue: _invokeQueue,\n\n /**\r\n * Check if a module has been invoked and registers it if not\r\n * @param args\r\n * @param moduleName\r\n * @returns {boolean} is new\r\n */\n _registerInvokeList: _registerInvokeList,\n\n /**\r\n * Register a new module and loads it, executing the run/config blocks if needed\r\n * @param providers\r\n * @param registerModules\r\n * @param params\r\n * @private\r\n */\n _register: _register,\n\n /**\r\n * Add a module name to the list of modules that will be loaded in the next inject\r\n * @param name\r\n * @param force\r\n * @private\r\n */\n _addToLoadList: _addToLoadList\n };\n }];\n\n // Let's get the list of loaded modules & components\n this._init(angular.element(window.document));\n }]);\n\n var bootstrapFct = angular.bootstrap;\n angular.bootstrap = function (element, modules, config) {\n // we use slice to make a clean copy\n angular.forEach(modules.slice(), function (module) {\n _addToLoadList(module, true);\n });\n return bootstrapFct(element, modules, config);\n };\n\n var _addToLoadList = function _addToLoadList(name, force) {\n if ((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\n modulesToLoad.push(name);\n }\n };\n\n var ngModuleFct = angular.module;\n angular.module = function (name, requires, configFn) {\n _addToLoadList(name);\n return ngModuleFct(name, requires, configFn);\n };\n\n // CommonJS package manager support:\n if (typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports) {\n module.exports = 'oc.lazyLoad';\n }\n})(angular, window);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').directive('ocLazyLoad', [\"$ocLazyLoad\", \"$compile\", \"$animate\", \"$parse\", function ($ocLazyLoad, $compile, $animate, $parse) {\n return {\n restrict: 'A',\n terminal: true,\n priority: 1000,\n compile: function compile(element, attrs) {\n // we store the content and remove it before compilation\n var content = element[0].innerHTML;\n element.html('');\n\n return function ($scope, $element, $attr) {\n var model = $parse($attr.ocLazyLoad);\n $scope.$watch(function () {\n return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\n }, function (moduleName) {\n if (angular.isDefined(moduleName)) {\n $ocLazyLoad.load(moduleName).then(function () {\n $animate.enter(content, $element);\n var contents = element.contents();\n angular.forEach(contents, function (content) {\n if (content.nodeType !== 3) {\n // 3 is a text node\n $compile(content)($scope);\n }\n });\n });\n }\n }, true);\n };\n }\n };\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", \"$window\", \"$interval\", function ($delegate, $q, $window, $interval) {\n var uaCssChecked = false,\n useCssLoadPatch = false,\n anchor = $window.document.getElementsByTagName('head')[0] || $window.document.getElementsByTagName('body')[0];\n\n /**\n * Load a js/css file\n * @param type\n * @param path\n * @param params\n * @returns promise\n */\n $delegate.buildElement = function buildElement(type, path, params) {\n var deferred = $q.defer(),\n el,\n loaded,\n filesCache = $delegate._getFilesCache(),\n cacheBuster = function cacheBuster(url) {\n var dc = new Date().getTime();\n if (url.indexOf('?') >= 0) {\n if (url.substring(0, url.length - 1) === '&') {\n return '' + url + '_dc=' + dc;\n }\n return '' + url + '&_dc=' + dc;\n } else {\n return '' + url + '?_dc=' + dc;\n }\n };\n\n // Store the promise early so the file load can be detected by other parallel lazy loads\n // (ie: multiple routes on one page) a 'true' value isn't sufficient\n // as it causes false positive load results.\n if (angular.isUndefined(filesCache.get(path))) {\n filesCache.put(path, deferred.promise);\n }\n\n // Switch in case more content types are added later\n switch (type) {\n case 'css':\n el = $window.document.createElement('link');\n el.type = 'text/css';\n el.rel = 'stylesheet';\n el.href = params.cache === false ? cacheBuster(path) : path;\n break;\n case 'js':\n el = $window.document.createElement('script');\n el.src = params.cache === false ? cacheBuster(path) : path;\n break;\n default:\n filesCache.remove(path);\n deferred.reject(new Error('Requested type \"' + type + '\" is not known. Could not inject \"' + path + '\"'));\n break;\n }\n el.onload = el['onreadystatechange'] = function (e) {\n if (el['readyState'] && !/^c|loade/.test(el['readyState']) || loaded) return;\n el.onload = el['onreadystatechange'] = null;\n loaded = 1;\n $delegate._broadcast('ocLazyLoad.fileLoaded', path);\n deferred.resolve();\n };\n el.onerror = function () {\n filesCache.remove(path);\n deferred.reject(new Error('Unable to load ' + path));\n };\n el.async = params.serie ? 0 : 1;\n\n var insertBeforeElem = anchor.lastChild;\n if (params.insertBefore) {\n var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n if (element && element.length > 0) {\n insertBeforeElem = element[0];\n }\n }\n insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n /*\n The event load or readystatechange doesn't fire in:\n - iOS < 6 (default mobile browser)\n - Android < 4.4 (default mobile browser)\n - Safari < 6 (desktop browser)\n */\n if (type == 'css') {\n if (!uaCssChecked) {\n var ua = $window.navigator.userAgent.toLowerCase();\n\n // iOS < 6\n if (/iP(hone|od|ad)/.test($window.navigator.platform)) {\n var v = $window.navigator.appVersion.match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.'));\n useCssLoadPatch = iOSVersion < 6;\n } else if (ua.indexOf('android') > -1) {\n // Android < 4.4\n var androidVersion = parseFloat(ua.slice(ua.indexOf('android') + 8));\n useCssLoadPatch = androidVersion < 4.4;\n } else if (ua.indexOf('safari') > -1) {\n var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n useCssLoadPatch = versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6;\n }\n }\n\n if (useCssLoadPatch) {\n var tries = 1000; // * 20 = 20000 miliseconds\n var interval = $interval(function () {\n try {\n el.sheet.cssRules;\n $interval.cancel(interval);\n el.onload();\n } catch (e) {\n if (--tries <= 0) {\n el.onerror();\n }\n }\n }, 20);\n }\n }\n\n return deferred.promise;\n };\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\n * The function that loads new files\n * @param config\n * @param params\n * @returns {*}\n */\n $delegate.filesLoader = function filesLoader(config) {\n var params = arguments[1] === undefined ? {} : arguments[1];\n\n var cssFiles = [],\n templatesFiles = [],\n jsFiles = [],\n promises = [],\n cachePromise = null,\n filesCache = $delegate._getFilesCache();\n\n $delegate.toggleWatch(true); // start watching angular.module calls\n\n angular.extend(params, config);\n\n var pushFile = function pushFile(path) {\n var file_type = null,\n m;\n if (angular.isObject(path)) {\n file_type = path.type;\n path = path.path;\n }\n cachePromise = filesCache.get(path);\n if (angular.isUndefined(cachePromise) || params.cache === false) {\n\n // always check for requirejs syntax just in case\n if ((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) {\n // Detect file type using preceding type declaration (ala requireJS)\n file_type = m[1];\n path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n }\n\n if (!file_type) {\n if ((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) {\n // Detect file type via file extension\n file_type = m[1];\n } else if (!$delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader') && $delegate.jsLoader.hasOwnProperty('load')) {\n // requirejs\n file_type = 'js';\n } else {\n $delegate._$log.error('File type could not be determined. ' + path);\n return;\n }\n }\n\n if ((file_type === 'css' || file_type === 'less') && cssFiles.indexOf(path) === -1) {\n cssFiles.push(path);\n } else if ((file_type === 'html' || file_type === 'htm') && templatesFiles.indexOf(path) === -1) {\n templatesFiles.push(path);\n } else if (file_type === 'js' || jsFiles.indexOf(path) === -1) {\n jsFiles.push(path);\n } else {\n $delegate._$log.error('File type is not valid. ' + path);\n }\n } else if (cachePromise) {\n promises.push(cachePromise);\n }\n };\n\n if (params.serie) {\n pushFile(params.files.shift());\n } else {\n angular.forEach(params.files, function (path) {\n pushFile(path);\n });\n }\n\n if (cssFiles.length > 0) {\n var cssDeferred = $q.defer();\n $delegate.cssLoader(cssFiles, function (err) {\n if (angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n cssDeferred.reject(err);\n } else {\n cssDeferred.resolve();\n }\n }, params);\n promises.push(cssDeferred.promise);\n }\n\n if (templatesFiles.length > 0) {\n var templatesDeferred = $q.defer();\n $delegate.templatesLoader(templatesFiles, function (err) {\n if (angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n templatesDeferred.reject(err);\n } else {\n templatesDeferred.resolve();\n }\n }, params);\n promises.push(templatesDeferred.promise);\n }\n\n if (jsFiles.length > 0) {\n var jsDeferred = $q.defer();\n $delegate.jsLoader(jsFiles, function (err) {\n if (angular.isDefined(err) && $delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n jsDeferred.reject(err);\n } else {\n jsDeferred.resolve();\n }\n }, params);\n promises.push(jsDeferred.promise);\n }\n\n if (promises.length === 0) {\n var deferred = $q.defer(),\n err = 'Error: no file to load has been found, if you\\'re trying to load an existing module you should use the \\'inject\\' method instead of \\'load\\'.';\n $delegate._$log.error(err);\n deferred.reject(err);\n return deferred.promise;\n } else if (params.serie && params.files.length > 0) {\n return $q.all(promises).then(function () {\n return $delegate.filesLoader(config, params);\n });\n } else {\n return $q.all(promises)['finally'](function (res) {\n $delegate.toggleWatch(false); // stop watching angular.module calls\n return res;\n });\n }\n };\n\n /**\n * Load a module or a list of modules into Angular\n * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n * @param params Object optional parameters\n * @returns promise\n */\n $delegate.load = function (originalModule) {\n var originalParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n config = null,\n deferredList = [],\n deferred = $q.defer(),\n errText;\n\n // clean copy\n var module = angular.copy(originalModule);\n var params = angular.copy(originalParams);\n\n // If module is an array, break it down\n if (angular.isArray(module)) {\n // Resubmit each entry as a single module\n angular.forEach(module, function (m) {\n deferredList.push(self.load(m, params));\n });\n\n // Resolve the promise once everything has loaded\n $q.all(deferredList).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n }\n\n // Get or Set a configuration depending on what was passed in\n if (angular.isString(module)) {\n config = self.getModuleConfig(module);\n if (!config) {\n config = {\n files: [module]\n };\n }\n } else if (angular.isObject(module)) {\n // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n if (angular.isDefined(module.path) && angular.isDefined(module.type)) {\n config = {\n files: [module]\n };\n } else {\n config = self.setModuleConfig(module);\n }\n }\n\n if (config === null) {\n var moduleName = self._getModuleName(module);\n errText = 'Module \"' + (moduleName || 'unknown') + '\" is not configured, cannot load.';\n $delegate._$log.error(errText);\n deferred.reject(new Error(errText));\n return deferred.promise;\n } else {\n // deprecated\n if (angular.isDefined(config.template)) {\n if (angular.isUndefined(config.files)) {\n config.files = [];\n }\n if (angular.isString(config.template)) {\n config.files.push(config.template);\n } else if (angular.isArray(config.template)) {\n config.files.concat(config.template);\n }\n }\n }\n\n var localParams = angular.extend({}, params, config);\n\n // if someone used an external loader and called the load function with just the module name\n if (angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n return $delegate.inject(config.name, localParams);\n }\n\n $delegate.filesLoader(config, localParams).then(function () {\n $delegate.inject(null, localParams).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n };\n\n // return the patched service\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * cssLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite cssLoader and it will probably not use promises :(\r\n */\n $delegate.cssLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement('css', path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.cssLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * jsLoader function\r\n * @type Function\r\n * @param paths array list of js files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite jsLoader and it will probably not use promises :(\r\n */\n $delegate.jsLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement('js', path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.jsLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$templateCache\", \"$q\", \"$http\", function ($delegate, $templateCache, $q, $http) {\n /**\r\n * templatesLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters for $http\r\n * because the user can overwrite templatesLoader and it will probably not use promises :(\r\n */\n $delegate.templatesLoader = function (paths, callback, params) {\n var promises = [],\n filesCache = $delegate._getFilesCache();\n\n angular.forEach(paths, function (url) {\n var deferred = $q.defer();\n promises.push(deferred.promise);\n $http.get(url, params).success(function (data) {\n if (angular.isString(data) && data.length > 0) {\n angular.forEach(angular.element(data), function (node) {\n if (node.nodeName === 'SCRIPT' && node.type === 'text/ng-template') {\n $templateCache.put(node.id, node.innerHTML);\n }\n });\n }\n if (angular.isUndefined(filesCache.get(url))) {\n filesCache.put(url, true);\n }\n deferred.resolve();\n }).error(function (err) {\n deferred.reject(new Error('Unable to load template file \"' + url + '\": ' + err));\n });\n });\n return $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.templatesLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n// Array.indexOf polyfill for IE8\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement, fromIndex) {\n var k;\n\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n//# sourceMappingURL=ocLazyLoad.js.map"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["ocLazyLoad.js"],"names":["angular","window","regModules","regInvokes","regConfigs","modulesToLoad","recordDeclarations","broadcast","noop","runBlocks","justLoaded","ocLazyLoad","module","provider","$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider","_register","providers","registerModules","params","k","moduleName","moduleFn","tempRunBlocks","length","isString","getModuleName","indexOf","newModule","ngModuleFct","push","requires","_runBlocks","shift","isDefined","rerun","concat","_invokeQueue","reconfig","_configBlocks","pop","instanceInjector","getInstanceInjector","forEach","fn","invoke","_registerInvokeList","args","signature","data","isArray","hashCode","toString","isObject","stringify","invokeList","type","newInvoke","isUndefined","onInvoke","invokeName","hasOwnProperty","key","queue","i","len","Error","isNew","apply","callInvoke","fct","invoked","isFunction","j","jlen","name","moduleExists","e","test","message","modules","debug","events","moduleCache","value","this","Array","prototype","arguments","config","moduleConfig","_init","element","elements","names","NG_APP_CLASS_REGEXP","append","elm","document","getElementById","replace","querySelectorAll","className","match","exec","attributes","attr","jasmine","mocha","mock","console","error","addReg","mainModule","obj","cache","JSON","str","chr","hash","charCodeAt","$get","$log","$rootElement","$rootScope","$cacheFactory","$q","reject","deferred","defer","promise","filesCache","injector","eventName","$broadcast","info","_broadcast","_$log","_getFilesCache","toggleWatch","watch","getModuleConfig","copy","setModuleConfig","getModules","isLoaded","modulesNames","moduleLoaded","_getModuleName","_getModule","_loadDependencies","localParams","loadedModule","diff","promisesList","self","when","getRequires","requireEntry","files","filter","n","warn","filesLoader","then","all","inject","undefined","_addToLoadList","res","slice","loadNext","resolve","err","requireModule","bootstrapFct","bootstrap","force","configFn","exports","directive","$ocLazyLoad","$compile","$animate","$parse","restrict","terminal","priority","compile","attrs","content","innerHTML","html","$scope","$element","$attr","model","$watch","load","enter","contents","nodeType","decorator","$delegate","$window","$interval","uaCssChecked","useCssLoadPatch","anchor","getElementsByTagName","buildElement","path","el","loaded","cacheBuster","url","dc","Date","getTime","substring","get","put","createElement","rel","href","src","remove","onload","onerror","async","serie","insertBeforeElem","lastChild","insertBefore","jQuery","querySelector","parentNode","ua","navigator","userAgent","toLowerCase","platform","v","appVersion","iOSVersion","parseFloat","parseInt","join","androidVersion","versionMatch","tries","interval","sheet","cssRules","cancel","cssFiles","templatesFiles","jsFiles","promises","cachePromise","extend","pushFile","m","file_type","substr","jsLoader","cssDeferred","cssLoader","templatesDeferred","templatesLoader","jsDeferred","originalModule","errText","originalParams","deferredList","template","paths","callback","ocLazyLoadLoader","$templateCache","$http","success","node","nodeName","id","searchElement","fromIndex","TypeError","O","Object","Math","abs","Infinity","max"],"mappings":"CAOA,SAAWA,EAASC,GAChB,YAEA,IAAIC,IAAc,KAAM,eACpBC,KACAC,KACAC,KACAC,KACAC,EAAYP,EAAQQ,KACpBC,KACAC,KAEAC,EAAaX,EAAQY,OAAO,eAAgB,MAEhDD,GAAWE,SAAS,eAAgB,sBAAuB,WAAY,mBAAoB,kBAAmB,YAAa,mBAAoB,SAAUC,EAAqBC,EAAUC,EAAkBC,EAAiBC,EAAWC,GAgJlO,QAASC,GAAUC,EAAWC,EAAiBC,GAC3C,GAAID,EAAiB,CACjB,GAAIE,GACAC,EACAC,EACAC,IACJ,KAAKH,EAAIF,EAAgBM,OAAS,EAAGJ,GAAK,EAAGA,IAKzC,GAJAC,EAAaH,EAAgBE,GACxBxB,EAAQ6B,SAASJ,KAClBA,EAAaK,EAAcL,IAE1BA,GAAiD,KAAnCf,EAAWqB,QAAQN,GAAtC,CAGA,GAAIO,GAA+C,KAAnC9B,EAAW6B,QAAQN,EAOnC,IANAC,EAAWO,EAAYR,GACnBO,IAEA9B,EAAWgC,KAAKT,GAChBL,EAAUC,EAAWK,EAASS,SAAUZ,IAExCG,EAASU,WAAWR,OAAS,EAG7B,IADAnB,EAAUgB,MACHC,EAASU,WAAWR,OAAS,GAChCnB,EAAUgB,GAAYS,KAAKR,EAASU,WAAWC,QAGnDrC,GAAQsC,UAAU7B,EAAUgB,MAAiBO,GAAaT,EAAOgB,SACjEZ,EAAgBA,EAAca,OAAO/B,EAAUgB,KAEnDgB,EAAapB,EAAWK,EAASe,aAAchB,EAAYF,EAAOmB,UAClED,EAA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QAAQ3C,GAAO,SAAUyO,GACvB,WAAlBA,EAAKC,UAAuC,qBAAdD,EAAKlO,MACnC+N,EAAe1D,IAAI6D,EAAKE,GAAIF,EAAK3F,aAIzCnM,EAAQ8D,YAAYyE,EAAWyF,IAAIL,KACnCpF,EAAW0F,IAAIN,GAAK,GAExBvF,EAAS4C,YACV7D,MAAM,SAAU8D,GACf7C,EAASD,OAAO,GAAI7D,OAAM,iCAAmCqJ,EAAM,MAAQ1C,QAG5E/C,EAAGuC,IAAI6F,GAAU9F,KAAK,WACzBiH,KACD,SAAUxG,GACTwG,EAASxG,MAGjB8B,EAAUkE,gBAAgBS,kBAAmB,EAEtC3E,SAGhB/M,SAEE0F,MAAMC,UAAU5D,UACb2D,MAAMC,UAAU5D,QAAU,SAAUkQ,EAAeC,GAC3C,GAAI1Q,EAIJ,IAAY,MAARiE,KACI,KAAM,IAAI0M,WAAU,gCAG5B,IAAIC,GAAIC,OAAO5M,MAKXpB,EAAM+N,EAAExQ,SAAW,CAGvB,IAAY,IAARyC,EACI,MAAO,EAKf,IAAIgG,IAAK6H,GAAa,CAOtB,IALII,KAAKC,IAAIlI,KAAOmI,EAAAA,IACZnI,EAAI,GAIRA,GAAKhG,EACD,MAAO,EASf,KAHA7C,EAAI8Q,KAAKG,IAAIpI,GAAK,EAAIA,EAAIhG,EAAMiO,KAAKC,IAAIlI,GAAI,GAGlChG,EAAJ7C,GAAS,CAaR,GAAIA,IAAK4Q,IAAKA,EAAE5Q,KAAOyQ,EACf,MAAOzQ,EAEfA,KAER,MAAO","file":"ocLazyLoad.min.js","sourcesContent":["/**\n * oclazyload - Load modules on demand (lazy load) with angularJS\n * @version v1.0.2\n * @link https://github.com/ocombe/ocLazyLoad\n * @license MIT\n * @author Olivier Combe \n */\n(function (angular, window) {\n 'use strict';\n\n var regModules = ['ng', 'oc.lazyLoad'],\n regInvokes = {},\n regConfigs = [],\n modulesToLoad = [],\n recordDeclarations = [],\n broadcast = angular.noop,\n runBlocks = {},\n justLoaded = [];\n\n var ocLazyLoad = angular.module('oc.lazyLoad', ['ng']);\n\n ocLazyLoad.provider('$ocLazyLoad', [\"$controllerProvider\", \"$provide\", \"$compileProvider\", \"$filterProvider\", \"$injector\", \"$animateProvider\", function ($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\n var modules = {},\n providers = {\n $controllerProvider: $controllerProvider,\n $compileProvider: $compileProvider,\n $filterProvider: $filterProvider,\n $provide: $provide, // other things (constant, decorator, provider, factory, service)\n $injector: $injector,\n $animateProvider: $animateProvider\n },\n debug = false,\n events = false,\n moduleCache = [];\n\n moduleCache.push = function (value) {\n if (this.indexOf(value) === -1) {\n Array.prototype.push.apply(this, arguments);\n }\n };\n\n this.config = function (config) {\n // If we want to define modules configs\n if (angular.isDefined(config.modules)) {\n if (angular.isArray(config.modules)) {\n angular.forEach(config.modules, function (moduleConfig) {\n modules[moduleConfig.name] = moduleConfig;\n });\n } else {\n modules[config.modules.name] = config.modules;\n }\n }\n\n if (angular.isDefined(config.debug)) {\n debug = config.debug;\n }\n\n if (angular.isDefined(config.events)) {\n events = config.events;\n }\n };\n\n /**\r\n * Get the list of existing registered modules\r\n * @param element\r\n */\n this._init = function _init(element) {\n // this is probably useless now because we override angular.bootstrap\n if (modulesToLoad.length === 0) {\n var elements = [element],\n names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],\n NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\n append = function append(elm) {\n return elm && elements.push(elm);\n };\n\n angular.forEach(names, function (name) {\n names[name] = true;\n append(document.getElementById(name));\n name = name.replace(':', '\\\\:');\n if (typeof element[0] !== 'undefined' && element[0].querySelectorAll) {\n angular.forEach(element[0].querySelectorAll('.' + name), append);\n angular.forEach(element[0].querySelectorAll('.' + name + '\\\\:'), append);\n angular.forEach(element[0].querySelectorAll('[' + name + ']'), append);\n }\n });\n\n angular.forEach(elements, function (elm) {\n if (modulesToLoad.length === 0) {\n var className = ' ' + element.className + ' ';\n var match = NG_APP_CLASS_REGEXP.exec(className);\n if (match) {\n modulesToLoad.push((match[2] || '').replace(/\\s+/g, ','));\n } else {\n angular.forEach(elm.attributes, function (attr) {\n if (modulesToLoad.length === 0 && names[attr.name]) {\n modulesToLoad.push(attr.value);\n }\n });\n }\n }\n });\n }\n\n if (modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\n console.error('No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.');\n }\n\n var addReg = function addReg(moduleName) {\n if (regModules.indexOf(moduleName) === -1) {\n // register existing modules\n regModules.push(moduleName);\n var mainModule = angular.module(moduleName);\n\n // register existing components (directives, services, ...)\n _invokeQueue(null, mainModule._invokeQueue, moduleName);\n _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\n\n angular.forEach(mainModule.requires, addReg);\n }\n };\n\n angular.forEach(modulesToLoad, function (moduleName) {\n addReg(moduleName);\n });\n\n modulesToLoad = []; // reset for next bootstrap\n recordDeclarations.pop(); // wait for the next lazy load\n };\n\n /**\r\n * Like JSON.stringify but that doesn't throw on circular references\r\n * @param obj\r\n */\n var stringify = function stringify(obj) {\n var cache = [];\n return JSON.stringify(obj, function (key, value) {\n if (angular.isObject(value) && value !== null) {\n if (cache.indexOf(value) !== -1) {\n // Circular reference found, discard key\n return;\n }\n // Store value in our collection\n cache.push(value);\n }\n return value;\n });\n };\n\n var hashCode = function hashCode(str) {\n var hash = 0,\n i,\n chr,\n len;\n if (str.length == 0) {\n return hash;\n }\n for (i = 0, len = str.length; i < len; i++) {\n chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n };\n\n function _register(providers, registerModules, params) {\n if (registerModules) {\n var k,\n moduleName,\n moduleFn,\n tempRunBlocks = [];\n for (k = registerModules.length - 1; k >= 0; k--) {\n moduleName = registerModules[k];\n if (!angular.isString(moduleName)) {\n moduleName = getModuleName(moduleName);\n }\n if (!moduleName || justLoaded.indexOf(moduleName) !== -1) {\n continue;\n }\n var newModule = regModules.indexOf(moduleName) === -1;\n moduleFn = ngModuleFct(moduleName);\n if (newModule) {\n // new module\n regModules.push(moduleName);\n _register(providers, moduleFn.requires, params);\n }\n if (moduleFn._runBlocks.length > 0) {\n // new run blocks detected! Replace the old ones (if existing)\n runBlocks[moduleName] = [];\n while (moduleFn._runBlocks.length > 0) {\n runBlocks[moduleName].push(moduleFn._runBlocks.shift());\n }\n }\n if (angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\n tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\n }\n _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\n _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\n broadcast(newModule ? 'ocLazyLoad.moduleLoaded' : 'ocLazyLoad.moduleReloaded', moduleName);\n registerModules.pop();\n justLoaded.push(moduleName);\n }\n // execute the run blocks at the end\n var instanceInjector = providers.getInstanceInjector();\n angular.forEach(tempRunBlocks, function (fn) {\n instanceInjector.invoke(fn);\n });\n }\n }\n\n function _registerInvokeList(args, moduleName) {\n var invokeList = args[2][0],\n type = args[1],\n newInvoke = false;\n if (angular.isUndefined(regInvokes[moduleName])) {\n regInvokes[moduleName] = {};\n }\n if (angular.isUndefined(regInvokes[moduleName][type])) {\n regInvokes[moduleName][type] = {};\n }\n var onInvoke = function onInvoke(invokeName, signature) {\n if (!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\n regInvokes[moduleName][type][invokeName] = [];\n }\n if (regInvokes[moduleName][type][invokeName].indexOf(signature) === -1) {\n newInvoke = true;\n regInvokes[moduleName][type][invokeName].push(signature);\n broadcast('ocLazyLoad.componentLoaded', [moduleName, type, invokeName]);\n }\n };\n\n function signature(data) {\n if (angular.isArray(data)) {\n // arrays are objects, we need to test for it first\n return hashCode(data.toString());\n } else if (angular.isObject(data)) {\n // constants & values for example\n return hashCode(stringify(data));\n } else {\n if (angular.isDefined(data) && data !== null) {\n return hashCode(data.toString());\n } else {\n // null & undefined constants\n return data;\n }\n }\n }\n\n if (angular.isString(invokeList)) {\n onInvoke(invokeList, signature(args[2][1]));\n } else if (angular.isObject(invokeList)) {\n angular.forEach(invokeList, function (invoke, key) {\n if (angular.isString(invoke)) {\n // decorators for example\n onInvoke(invoke, signature(invokeList[1]));\n } else {\n // components registered as object lists {\"componentName\": function() {}}\n onInvoke(key, signature(invoke));\n }\n });\n } else {\n return false;\n }\n return newInvoke;\n }\n\n function _invokeQueue(providers, queue, moduleName, reconfig) {\n if (!queue) {\n return;\n }\n\n var i, len, args, provider;\n for (i = 0, len = queue.length; i < len; i++) {\n args = queue[i];\n if (angular.isArray(args)) {\n if (providers !== null) {\n if (providers.hasOwnProperty(args[0])) {\n provider = providers[args[0]];\n } else {\n throw new Error('unsupported provider ' + args[0]);\n }\n }\n var isNew = _registerInvokeList(args, moduleName);\n if (args[1] !== 'invoke') {\n if (isNew && angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n } else {\n // config block\n var callInvoke = function callInvoke(fct) {\n var invoked = regConfigs.indexOf('' + moduleName + '-' + fct);\n if (invoked === -1 || reconfig) {\n if (invoked === -1) {\n regConfigs.push('' + moduleName + '-' + fct);\n }\n if (angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n }\n };\n if (angular.isFunction(args[2][0])) {\n callInvoke(args[2][0]);\n } else if (angular.isArray(args[2][0])) {\n for (var j = 0, jlen = args[2][0].length; j < jlen; j++) {\n if (angular.isFunction(args[2][0][j])) {\n callInvoke(args[2][0][j]);\n }\n }\n }\n }\n }\n }\n }\n\n function getModuleName(module) {\n var moduleName = null;\n if (angular.isString(module)) {\n moduleName = module;\n } else if (angular.isObject(module) && module.hasOwnProperty('name') && angular.isString(module.name)) {\n moduleName = module.name;\n }\n return moduleName;\n }\n\n function moduleExists(moduleName) {\n if (!angular.isString(moduleName)) {\n return false;\n }\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\n return false;\n }\n }\n }\n\n this.$get = [\"$log\", \"$rootElement\", \"$rootScope\", \"$cacheFactory\", \"$q\", function ($log, $rootElement, $rootScope, $cacheFactory, $q) {\n var instanceInjector,\n filesCache = $cacheFactory('ocLazyLoad');\n\n if (!debug) {\n $log = {};\n $log['error'] = angular.noop;\n $log['warn'] = angular.noop;\n $log['info'] = angular.noop;\n }\n\n // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\n providers.getInstanceInjector = function () {\n return instanceInjector ? instanceInjector : instanceInjector = $rootElement.data('$injector') || angular.injector();\n };\n\n broadcast = function broadcast(eventName, params) {\n if (events) {\n $rootScope.$broadcast(eventName, params);\n }\n if (debug) {\n $log.info(eventName, params);\n }\n };\n\n function reject(e) {\n var deferred = $q.defer();\n $log.error(e.message);\n deferred.reject(e);\n return deferred.promise;\n }\n\n return {\n _broadcast: broadcast,\n\n _$log: $log,\n\n /**\r\n * Returns the files cache used by the loaders to store the files currently loading\r\n * @returns {*}\r\n */\n _getFilesCache: function getFilesCache() {\n return filesCache;\n },\n\n /**\r\n * Let the service know that it should monitor angular.module because files are loading\r\n * @param watch boolean\r\n */\n toggleWatch: function toggleWatch(watch) {\n if (watch) {\n recordDeclarations.push(true);\n } else {\n recordDeclarations.pop();\n }\n },\n\n /**\r\n * Let you get a module config object\r\n * @param moduleName String the name of the module\r\n * @returns {*}\r\n */\n getModuleConfig: function getModuleConfig(moduleName) {\n if (!angular.isString(moduleName)) {\n throw new Error('You need to give the name of the module to get');\n }\n if (!modules[moduleName]) {\n return null;\n }\n return angular.copy(modules[moduleName]);\n },\n\n /**\r\n * Let you define a module config object\r\n * @param moduleConfig Object the module config object\r\n * @returns {*}\r\n */\n setModuleConfig: function setModuleConfig(moduleConfig) {\n if (!angular.isObject(moduleConfig)) {\n throw new Error('You need to give the module config object to set');\n }\n modules[moduleConfig.name] = moduleConfig;\n return moduleConfig;\n },\n\n /**\r\n * Returns the list of loaded modules\r\n * @returns {string[]}\r\n */\n getModules: function getModules() {\n return regModules;\n },\n\n /**\r\n * Let you check if a module has been loaded into Angular or not\r\n * @param modulesNames String/Object a module name, or a list of module names\r\n * @returns {boolean}\r\n */\n isLoaded: function isLoaded(modulesNames) {\n var moduleLoaded = function moduleLoaded(module) {\n var isLoaded = regModules.indexOf(module) > -1;\n if (!isLoaded) {\n isLoaded = !!moduleExists(module);\n }\n return isLoaded;\n };\n if (angular.isString(modulesNames)) {\n modulesNames = [modulesNames];\n }\n if (angular.isArray(modulesNames)) {\n var i, len;\n for (i = 0, len = modulesNames.length; i < len; i++) {\n if (!moduleLoaded(modulesNames[i])) {\n return false;\n }\n }\n return true;\n } else {\n throw new Error('You need to define the module(s) name(s)');\n }\n },\n\n /**\r\n * Given a module, return its name\r\n * @param module\r\n * @returns {String}\r\n */\n _getModuleName: getModuleName,\n\n /**\r\n * Returns a module if it exists\r\n * @param moduleName\r\n * @returns {module}\r\n */\n _getModule: function getModule(moduleName) {\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n // this error message really suxx\n if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\n e.message = 'The module \"' + stringify(moduleName) + '\" that you are trying to load does not exist. ' + e.message;\n }\n throw e;\n }\n },\n\n /**\r\n * Check if a module exists and returns it if it does\r\n * @param moduleName\r\n * @returns {boolean}\r\n */\n moduleExists: moduleExists,\n\n /**\r\n * Load the dependencies, and might try to load new files depending on the config\r\n * @param moduleName (String or Array of Strings)\r\n * @param localParams\r\n * @returns {*}\r\n * @private\r\n */\n _loadDependencies: function _loadDependencies(moduleName, localParams) {\n var loadedModule,\n requires,\n diff,\n promisesList = [],\n self = this;\n\n moduleName = self._getModuleName(moduleName);\n\n if (moduleName === null) {\n return $q.when();\n } else {\n try {\n loadedModule = self._getModule(moduleName);\n } catch (e) {\n return reject(e);\n }\n // get unloaded requires\n requires = self.getRequires(loadedModule);\n }\n\n angular.forEach(requires, function (requireEntry) {\n // If no configuration is provided, try and find one from a previous load.\n // If there isn't one, bail and let the normal flow run\n if (angular.isString(requireEntry)) {\n var config = self.getModuleConfig(requireEntry);\n if (config === null) {\n moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\n return;\n }\n requireEntry = config;\n }\n\n // Check if this dependency has been loaded previously\n if (self.moduleExists(requireEntry.name)) {\n // compare against the already loaded module to see if the new definition adds any new files\n diff = requireEntry.files.filter(function (n) {\n return self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0;\n });\n\n // If the module was redefined, advise via the console\n if (diff.length !== 0) {\n self._$log.warn('Module \"', moduleName, '\" attempted to redefine configuration for dependency. \"', requireEntry.name, '\"\\n Additional Files Loaded:', diff);\n }\n\n // Push everything to the file loader, it will weed out the duplicates.\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error('Error: New dependencies need to be loaded from external files (' + requireEntry.files + '), but no loader has been defined.'));\n }\n return;\n } else if (angular.isArray(requireEntry)) {\n requireEntry = {\n files: requireEntry\n };\n } else if (angular.isObject(requireEntry)) {\n if (requireEntry.hasOwnProperty('name') && requireEntry['name']) {\n // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\n self.setModuleConfig(requireEntry);\n moduleCache.push(requireEntry['name']);\n }\n }\n\n // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\n if (angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error('Error: the module \"' + requireEntry.name + '\" is defined in external files (' + requireEntry.files + '), but no loader has been defined.'));\n }\n }\n });\n\n // Create a wrapper promise to watch the promise list and resolve it once everything is done.\n return $q.all(promisesList);\n },\n\n /**\r\n * Inject new modules into Angular\r\n * @param moduleName\r\n * @param localParams\r\n */\n inject: function inject(moduleName) {\n var localParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n deferred = $q.defer();\n if (angular.isDefined(moduleName) && moduleName !== null) {\n if (angular.isArray(moduleName)) {\n var promisesList = [];\n angular.forEach(moduleName, function (module) {\n promisesList.push(self.inject(module));\n });\n return $q.all(promisesList);\n } else {\n self._addToLoadList(self._getModuleName(moduleName), true);\n }\n }\n if (modulesToLoad.length > 0) {\n var res = modulesToLoad.slice(); // clean copy\n var loadNext = function loadNext(moduleName) {\n moduleCache.push(moduleName);\n self._loadDependencies(moduleName, localParams).then(function success() {\n try {\n justLoaded = [];\n _register(providers, moduleCache, localParams);\n } catch (e) {\n self._$log.error(e.message);\n deferred.reject(e);\n return;\n }\n\n if (modulesToLoad.length > 0) {\n loadNext(modulesToLoad.shift()); // load the next in list\n } else {\n deferred.resolve(res); // everything has been loaded, resolve\n }\n }, function error(err) {\n deferred.reject(err);\n });\n };\n\n // load the first in list\n loadNext(modulesToLoad.shift());\n } else {\n deferred.resolve();\n }\n return deferred.promise;\n },\n\n /**\r\n * Get the list of required modules/services/... for this module\r\n * @param module\r\n * @returns {Array}\r\n */\n getRequires: function getRequires(module) {\n var requires = [];\n angular.forEach(module.requires, function (requireModule) {\n if (regModules.indexOf(requireModule) === -1) {\n requires.push(requireModule);\n }\n });\n return requires;\n },\n\n /**\r\n * Invoke the new modules & component by their providers\r\n * @param providers\r\n * @param queue\r\n * @param moduleName\r\n * @param reconfig\r\n * @private\r\n */\n _invokeQueue: _invokeQueue,\n\n /**\r\n * Check if a module has been invoked and registers it if not\r\n * @param args\r\n * @param moduleName\r\n * @returns {boolean} is new\r\n */\n _registerInvokeList: _registerInvokeList,\n\n /**\r\n * Register a new module and loads it, executing the run/config blocks if needed\r\n * @param providers\r\n * @param registerModules\r\n * @param params\r\n * @private\r\n */\n _register: _register,\n\n /**\r\n * Add a module name to the list of modules that will be loaded in the next inject\r\n * @param name\r\n * @param force\r\n * @private\r\n */\n _addToLoadList: _addToLoadList\n };\n }];\n\n // Let's get the list of loaded modules & components\n this._init(angular.element(window.document));\n }]);\n\n var bootstrapFct = angular.bootstrap;\n angular.bootstrap = function (element, modules, config) {\n // we use slice to make a clean copy\n angular.forEach(modules.slice(), function (module) {\n _addToLoadList(module, true);\n });\n return bootstrapFct(element, modules, config);\n };\n\n var _addToLoadList = function _addToLoadList(name, force) {\n if ((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\n modulesToLoad.push(name);\n }\n };\n\n var ngModuleFct = angular.module;\n angular.module = function (name, requires, configFn) {\n _addToLoadList(name);\n return ngModuleFct(name, requires, configFn);\n };\n\n // CommonJS package manager support:\n if (typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports) {\n module.exports = 'oc.lazyLoad';\n }\n})(angular, window);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').directive('ocLazyLoad', [\"$ocLazyLoad\", \"$compile\", \"$animate\", \"$parse\", function ($ocLazyLoad, $compile, $animate, $parse) {\n return {\n restrict: 'A',\n terminal: true,\n priority: 1000,\n compile: function compile(element, attrs) {\n // we store the content and remove it before compilation\n var content = element[0].innerHTML;\n element.html('');\n\n return function ($scope, $element, $attr) {\n var model = $parse($attr.ocLazyLoad);\n $scope.$watch(function () {\n return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\n }, function (moduleName) {\n if (angular.isDefined(moduleName)) {\n $ocLazyLoad.load(moduleName).then(function () {\n $animate.enter(content, $element);\n var contents = element.contents();\n angular.forEach(contents, function (content) {\n if (content.nodeType !== 3) {\n // 3 is a text node\n $compile(content)($scope);\n }\n });\n });\n }\n }, true);\n };\n }\n };\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", \"$window\", \"$interval\", function ($delegate, $q, $window, $interval) {\n var uaCssChecked = false,\n useCssLoadPatch = false,\n anchor = $window.document.getElementsByTagName('head')[0] || $window.document.getElementsByTagName('body')[0];\n\n /**\n * Load a js/css file\n * @param type\n * @param path\n * @param params\n * @returns promise\n */\n $delegate.buildElement = function buildElement(type, path, params) {\n var deferred = $q.defer(),\n el,\n loaded,\n filesCache = $delegate._getFilesCache(),\n cacheBuster = function cacheBuster(url) {\n var dc = new Date().getTime();\n if (url.indexOf('?') >= 0) {\n if (url.substring(0, url.length - 1) === '&') {\n return '' + url + '_dc=' + dc;\n }\n return '' + url + '&_dc=' + dc;\n } else {\n return '' + url + '?_dc=' + dc;\n }\n };\n\n // Store the promise early so the file load can be detected by other parallel lazy loads\n // (ie: multiple routes on one page) a 'true' value isn't sufficient\n // as it causes false positive load results.\n if (angular.isUndefined(filesCache.get(path))) {\n filesCache.put(path, deferred.promise);\n }\n\n // Switch in case more content types are added later\n switch (type) {\n case 'css':\n el = $window.document.createElement('link');\n el.type = 'text/css';\n el.rel = 'stylesheet';\n el.href = params.cache === false ? cacheBuster(path) : path;\n break;\n case 'js':\n el = $window.document.createElement('script');\n el.src = params.cache === false ? cacheBuster(path) : path;\n break;\n default:\n filesCache.remove(path);\n deferred.reject(new Error('Requested type \"' + type + '\" is not known. Could not inject \"' + path + '\"'));\n break;\n }\n el.onload = el['onreadystatechange'] = function (e) {\n if (el['readyState'] && !/^c|loade/.test(el['readyState']) || loaded) return;\n el.onload = el['onreadystatechange'] = null;\n loaded = 1;\n $delegate._broadcast('ocLazyLoad.fileLoaded', path);\n deferred.resolve();\n };\n el.onerror = function () {\n filesCache.remove(path);\n deferred.reject(new Error('Unable to load ' + path));\n };\n el.async = params.serie ? 0 : 1;\n\n var insertBeforeElem = anchor.lastChild;\n if (params.insertBefore) {\n var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n if (element && element.length > 0) {\n insertBeforeElem = element[0];\n }\n }\n insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n /*\n The event load or readystatechange doesn't fire in:\n - iOS < 6 (default mobile browser)\n - Android < 4.4 (default mobile browser)\n - Safari < 6 (desktop browser)\n */\n if (type == 'css') {\n if (!uaCssChecked) {\n var ua = $window.navigator.userAgent.toLowerCase();\n\n // iOS < 6\n if (/iP(hone|od|ad)/.test($window.navigator.platform)) {\n var v = $window.navigator.appVersion.match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.'));\n useCssLoadPatch = iOSVersion < 6;\n } else if (ua.indexOf('android') > -1) {\n // Android < 4.4\n var androidVersion = parseFloat(ua.slice(ua.indexOf('android') + 8));\n useCssLoadPatch = androidVersion < 4.4;\n } else if (ua.indexOf('safari') > -1) {\n var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n useCssLoadPatch = versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6;\n }\n }\n\n if (useCssLoadPatch) {\n var tries = 1000; // * 20 = 20000 miliseconds\n var interval = $interval(function () {\n try {\n el.sheet.cssRules;\n $interval.cancel(interval);\n el.onload();\n } catch (e) {\n if (--tries <= 0) {\n el.onerror();\n }\n }\n }, 20);\n }\n }\n\n return deferred.promise;\n };\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\n * The function that loads new files\n * @param config\n * @param params\n * @returns {*}\n */\n $delegate.filesLoader = function filesLoader(config) {\n var params = arguments[1] === undefined ? {} : arguments[1];\n\n var cssFiles = [],\n templatesFiles = [],\n jsFiles = [],\n promises = [],\n cachePromise = null,\n filesCache = $delegate._getFilesCache();\n\n $delegate.toggleWatch(true); // start watching angular.module calls\n\n angular.extend(params, config);\n\n var pushFile = function pushFile(path) {\n var file_type = null,\n m;\n if (angular.isObject(path)) {\n file_type = path.type;\n path = path.path;\n }\n cachePromise = filesCache.get(path);\n if (angular.isUndefined(cachePromise) || params.cache === false) {\n\n // always check for requirejs syntax just in case\n if ((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) {\n // Detect file type using preceding type declaration (ala requireJS)\n file_type = m[1];\n path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n }\n\n if (!file_type) {\n if ((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) {\n // Detect file type via file extension\n file_type = m[1];\n } else if (!$delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader') && $delegate.jsLoader.hasOwnProperty('load')) {\n // requirejs\n file_type = 'js';\n } else {\n $delegate._$log.error('File type could not be determined. ' + path);\n return;\n }\n }\n\n if ((file_type === 'css' || file_type === 'less') && cssFiles.indexOf(path) === -1) {\n cssFiles.push(path);\n } else if ((file_type === 'html' || file_type === 'htm') && templatesFiles.indexOf(path) === -1) {\n templatesFiles.push(path);\n } else if (file_type === 'js' || jsFiles.indexOf(path) === -1) {\n jsFiles.push(path);\n } else {\n $delegate._$log.error('File type is not valid. ' + path);\n }\n } else if (cachePromise) {\n promises.push(cachePromise);\n }\n };\n\n if (params.serie) {\n pushFile(params.files.shift());\n } else {\n angular.forEach(params.files, function (path) {\n pushFile(path);\n });\n }\n\n if (cssFiles.length > 0) {\n var cssDeferred = $q.defer();\n $delegate.cssLoader(cssFiles, function (err) {\n if (angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n cssDeferred.reject(err);\n } else {\n cssDeferred.resolve();\n }\n }, params);\n promises.push(cssDeferred.promise);\n }\n\n if (templatesFiles.length > 0) {\n var templatesDeferred = $q.defer();\n $delegate.templatesLoader(templatesFiles, function (err) {\n if (angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n templatesDeferred.reject(err);\n } else {\n templatesDeferred.resolve();\n }\n }, params);\n promises.push(templatesDeferred.promise);\n }\n\n if (jsFiles.length > 0) {\n var jsDeferred = $q.defer();\n $delegate.jsLoader(jsFiles, function (err) {\n if (angular.isDefined(err) && $delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n jsDeferred.reject(err);\n } else {\n jsDeferred.resolve();\n }\n }, params);\n promises.push(jsDeferred.promise);\n }\n\n if (promises.length === 0) {\n var deferred = $q.defer(),\n err = 'Error: no file to load has been found, if you\\'re trying to load an existing module you should use the \\'inject\\' method instead of \\'load\\'.';\n $delegate._$log.error(err);\n deferred.reject(err);\n return deferred.promise;\n } else if (params.serie && params.files.length > 0) {\n return $q.all(promises).then(function () {\n return $delegate.filesLoader(config, params);\n });\n } else {\n return $q.all(promises)['finally'](function (res) {\n $delegate.toggleWatch(false); // stop watching angular.module calls\n return res;\n });\n }\n };\n\n /**\n * Load a module or a list of modules into Angular\n * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n * @param params Object optional parameters\n * @returns promise\n */\n $delegate.load = function (originalModule) {\n var originalParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n config = null,\n deferredList = [],\n deferred = $q.defer(),\n errText;\n\n // clean copy\n var module = angular.copy(originalModule);\n var params = angular.copy(originalParams);\n\n // If module is an array, break it down\n if (angular.isArray(module)) {\n // Resubmit each entry as a single module\n angular.forEach(module, function (m) {\n deferredList.push(self.load(m, params));\n });\n\n // Resolve the promise once everything has loaded\n $q.all(deferredList).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n }\n\n // Get or Set a configuration depending on what was passed in\n if (angular.isString(module)) {\n config = self.getModuleConfig(module);\n if (!config) {\n config = {\n files: [module]\n };\n }\n } else if (angular.isObject(module)) {\n // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n if (angular.isDefined(module.path) && angular.isDefined(module.type)) {\n config = {\n files: [module]\n };\n } else {\n config = self.setModuleConfig(module);\n }\n }\n\n if (config === null) {\n var moduleName = self._getModuleName(module);\n errText = 'Module \"' + (moduleName || 'unknown') + '\" is not configured, cannot load.';\n $delegate._$log.error(errText);\n deferred.reject(new Error(errText));\n return deferred.promise;\n } else {\n // deprecated\n if (angular.isDefined(config.template)) {\n if (angular.isUndefined(config.files)) {\n config.files = [];\n }\n if (angular.isString(config.template)) {\n config.files.push(config.template);\n } else if (angular.isArray(config.template)) {\n config.files.concat(config.template);\n }\n }\n }\n\n var localParams = angular.extend({}, params, config);\n\n // if someone used an external loader and called the load function with just the module name\n if (angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n return $delegate.inject(config.name, localParams);\n }\n\n $delegate.filesLoader(config, localParams).then(function () {\n $delegate.inject(null, localParams).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n };\n\n // return the patched service\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * cssLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite cssLoader and it will probably not use promises :(\r\n */\n $delegate.cssLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement('css', path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.cssLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * jsLoader function\r\n * @type Function\r\n * @param paths array list of js files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite jsLoader and it will probably not use promises :(\r\n */\n $delegate.jsLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement('js', path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.jsLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$templateCache\", \"$q\", \"$http\", function ($delegate, $templateCache, $q, $http) {\n /**\r\n * templatesLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters for $http\r\n * because the user can overwrite templatesLoader and it will probably not use promises :(\r\n */\n $delegate.templatesLoader = function (paths, callback, params) {\n var promises = [],\n filesCache = $delegate._getFilesCache();\n\n angular.forEach(paths, function (url) {\n var deferred = $q.defer();\n promises.push(deferred.promise);\n $http.get(url, params).success(function (data) {\n if (angular.isString(data) && data.length > 0) {\n angular.forEach(angular.element(data), function (node) {\n if (node.nodeName === 'SCRIPT' && node.type === 'text/ng-template') {\n $templateCache.put(node.id, node.innerHTML);\n }\n });\n }\n if (angular.isUndefined(filesCache.get(url))) {\n filesCache.put(url, true);\n }\n deferred.resolve();\n }).error(function (err) {\n deferred.reject(new Error('Unable to load template file \"' + url + '\": ' + err));\n });\n });\n return $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.templatesLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n// Array.indexOf polyfill for IE8\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement, fromIndex) {\n var k;\n\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n//# sourceMappingURL=ocLazyLoad.js.map"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/dist/ocLazyLoad.require.js b/dist/ocLazyLoad.require.js index f711ddd..9f93b3d 100644 --- a/dist/ocLazyLoad.require.js +++ b/dist/ocLazyLoad.require.js @@ -1,6 +1,6 @@ /** * oclazyload - Load modules on demand (lazy load) with angularJS - * @version v1.0.1 + * @version v1.0.2 * @link https://github.com/ocombe/ocLazyLoad * @license MIT * @author Olivier Combe @@ -78,7 +78,7 @@ names[name] = true; append(document.getElementById(name)); name = name.replace(':', '\\:'); - if (element[0].querySelectorAll) { + if (typeof element[0] !== 'undefined' && element[0].querySelectorAll) { angular.forEach(element[0].querySelectorAll('.' + name), append); angular.forEach(element[0].querySelectorAll('.' + name + '\\:'), append); angular.forEach(element[0].querySelectorAll('[' + name + ']'), append); diff --git a/dist/ocLazyLoad.require.js.map b/dist/ocLazyLoad.require.js.map index 2e3af10..560c2d6 100644 --- a/dist/ocLazyLoad.require.js.map +++ b/dist/ocLazyLoad.require.js.map @@ -1 +1 @@ -{"version":3,"sources":["ocLazyLoad.core.js","ocLazyLoad.directive.js","ocLazyLoad.loaders.common.js","ocLazyLoad.loaders.core.js","ocLazyLoad.loaders.cssLoader.js","ocLazyLoad.loaders.requireJSLoader.js","ocLazyLoad.loaders.templatesLoader.js","ocLazyLoad.polyfill.ie8.js"],"names":[],"mappings":"AAAA,CAAC,UAAC,SAAS,QAAW;IAClB;;IAEA,IAAI,aAAa,CAAC,MAAM;QACpB,aAAa;QACb,aAAa;QACb,gBAAgB;QAChB,qBAAqB;QACrB,YAAY,QAAQ;QACpB,YAAY;QACZ,aAAa;;IAEjB,IAAI,aAAa,QAAQ,OAAO,eAAe,CAAC;;IAEhD,WAAW,SAAS,2HAAe,UAAS,qBAAqB,UAAU,kBAAkB,iBAAiB,WAAW,kBAAkB;QACvI,IAAI,UAAU;YACV,YAAY;YACR,qBAAqB;YACrB,kBAAkB;YAClB,iBAAiB;YACjB,UAAU;YACV,WAAW;YACX,kBAAkB;;YAEtB,QAAQ;YACR,SAAS;YACT,cAAc;;QAElB,YAAY,OAAO,UAAS,OAAO;YAC/B,IAAG,KAAK,QAAQ,WAAW,CAAC,GAAG;gBAC3B,MAAM,UAAU,KAAK,MAAM,MAAM;;;;QAIzC,KAAK,SAAS,UAAS,QAAQ;;YAE3B,IAAG,QAAQ,UAAU,OAAO,UAAU;gBAClC,IAAG,QAAQ,QAAQ,OAAO,UAAU;oBAChC,QAAQ,QAAQ,OAAO,SAAS,UAAA,cAAgB;wBAC5C,QAAQ,a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AAa;;gBAEtB,IAAG,KAAK,IAAI,OAAO,UAAU;wBACzB,IAAI;;;;gBAIR,IAAG,KAAK,KAAK;wBACT,OAAO,CAAC;;;;;;gBAMZ,IAAI,KAAK,IAAI,KAAK,IAAI,IAAI,MAAM,KAAK,IAAI,IAAI;;;gBAG7C,OAAM,IAAI,KAAK;;;;;;;;;;;;;wBAaX,IAAG,KAAK,KAAK,EAAE,OAAO,eAAe;gCACjC,OAAO;;wBAEX;;gBAEJ,OAAO,CAAC;;CAEf","file":"ocLazyLoad.require.js","sourcesContent":["((angular, window) => {\r\n 'use strict';\r\n\r\n var regModules = ['ng', 'oc.lazyLoad'],\r\n regInvokes = {},\r\n regConfigs = [],\r\n modulesToLoad = [],\r\n recordDeclarations = [],\r\n broadcast = angular.noop,\r\n runBlocks = {},\r\n justLoaded = [];\r\n\r\n var ocLazyLoad = angular.module('oc.lazyLoad', ['ng']);\r\n\r\n ocLazyLoad.provider('$ocLazyLoad', function($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\r\n var modules = {},\r\n providers = {\r\n $controllerProvider: $controllerProvider,\r\n $compileProvider: $compileProvider,\r\n $filterProvider: $filterProvider,\r\n $provide: $provide, // other things (constant, decorator, provider, factory, service)\r\n $injector: $injector,\r\n $animateProvider: $animateProvider\r\n },\r\n debug = false,\r\n events = false,\r\n moduleCache = [];\r\n\r\n moduleCache.push = function(value) {\r\n if(this.indexOf(value) === -1) {\r\n Array.prototype.push.apply(this, arguments);\r\n }\r\n };\r\n\r\n this.config = function(config) {\r\n // If we want to define modules configs\r\n if(angular.isDefined(config.modules)) {\r\n if(angular.isArray(config.modules)) {\r\n angular.forEach(config.modules, moduleConfig => {\r\n modules[moduleConfig.name] = moduleConfig;\r\n });\r\n } else {\r\n modules[config.modules.name] = config.modules;\r\n }\r\n }\r\n\r\n if(angular.isDefined(config.debug)) {\r\n debug = config.debug;\r\n }\r\n\r\n if(angular.isDefined(config.events)) {\r\n events = config.events;\r\n }\r\n };\r\n\r\n /**\r\n * Get the list of existing registered modules\r\n * @param element\r\n */\r\n this._init = function _init(element) {\r\n // this is probably useless now because we override angular.bootstrap\r\n if(modulesToLoad.length === 0) {\r\n var elements = [element],\r\n names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],\r\n NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\r\n append = function append(elm) {\r\n return (elm && elements.push(elm));\r\n };\r\n\r\n angular.forEach(names, name => {\r\n names[name] = true;\r\n append(document.getElementById(name));\r\n name = name.replace(':', '\\\\:');\r\n if(element[0].querySelectorAll) {\r\n angular.forEach(element[0].querySelectorAll(`.${ name }`), append);\r\n angular.forEach(element[0].querySelectorAll(`.${ name }\\\\:`), append);\r\n angular.forEach(element[0].querySelectorAll(`[${ name }]`), append);\r\n }\r\n });\r\n\r\n angular.forEach(elements, elm => {\r\n if(modulesToLoad.length === 0) {\r\n var className = ` ${ element.className } `;\r\n var match = NG_APP_CLASS_REGEXP.exec(className);\r\n if(match) {\r\n modulesToLoad.push((match[2] || '').replace(/\\s+/g, ','));\r\n } else {\r\n angular.forEach(elm.attributes, attr => {\r\n if(modulesToLoad.length === 0 && names[attr.name]) {\r\n modulesToLoad.push(attr.value);\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n if(modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\r\n console.error('No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.');\r\n }\r\n\r\n var addReg = function addReg(moduleName) {\r\n if(regModules.indexOf(moduleName) === -1) {\r\n // register existing modules\r\n regModules.push(moduleName);\r\n var mainModule = angular.module(moduleName);\r\n\r\n // register existing components (directives, services, ...)\r\n _invokeQueue(null, mainModule._invokeQueue, moduleName);\r\n _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\r\n\r\n angular.forEach(mainModule.requires, addReg);\r\n }\r\n };\r\n\r\n angular.forEach(modulesToLoad, moduleName => {\r\n addReg(moduleName);\r\n });\r\n\r\n modulesToLoad = []; // reset for next bootstrap\r\n recordDeclarations.pop(); // wait for the next lazy load\r\n };\r\n\r\n /**\r\n * Like JSON.stringify but that doesn't throw on circular references\r\n * @param obj\r\n */\r\n var stringify = function stringify(obj) {\r\n var cache = [];\r\n return JSON.stringify(obj, (key, value) => {\r\n if(angular.isObject(value) && value !== null) {\r\n if(cache.indexOf(value) !== -1) {\r\n // Circular reference found, discard key\r\n return;\r\n }\r\n // Store value in our collection\r\n cache.push(value);\r\n }\r\n return value;\r\n });\r\n };\r\n\r\n var hashCode = function hashCode(str) {\r\n var hash = 0, i, chr, len;\r\n if(str.length == 0) {\r\n return hash;\r\n }\r\n for(i = 0, len = str.length; i < len; i++) {\r\n chr = str.charCodeAt(i);\r\n hash = (hash << 5) - hash + chr;\r\n hash |= 0; // Convert to 32bit integer\r\n }\r\n return hash;\r\n };\r\n\r\n function _register(providers, registerModules, params) {\r\n if(registerModules) {\r\n var k, moduleName, moduleFn, tempRunBlocks = [];\r\n for(k = registerModules.length - 1; k >= 0; k--) {\r\n moduleName = registerModules[k];\r\n if(!angular.isString(moduleName)) {\r\n moduleName = getModuleName(moduleName);\r\n }\r\n if(!moduleName || justLoaded.indexOf(moduleName) !== -1) {\r\n continue;\r\n }\r\n var newModule = regModules.indexOf(moduleName) === -1;\r\n moduleFn = ngModuleFct(moduleName);\r\n if(newModule) { // new module\r\n regModules.push(moduleName);\r\n _register(providers, moduleFn.requires, params);\r\n }\r\n if(moduleFn._runBlocks.length > 0) {\r\n // new run blocks detected! Replace the old ones (if existing)\r\n runBlocks[moduleName] = [];\r\n while(moduleFn._runBlocks.length > 0) {\r\n runBlocks[moduleName].push(moduleFn._runBlocks.shift());\r\n }\r\n }\r\n if(angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\r\n tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\r\n }\r\n _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\r\n _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\r\n broadcast(newModule ? 'ocLazyLoad.moduleLoaded' : 'ocLazyLoad.moduleReloaded', moduleName);\r\n registerModules.pop();\r\n justLoaded.push(moduleName);\r\n }\r\n // execute the run blocks at the end\r\n var instanceInjector = providers.getInstanceInjector();\r\n angular.forEach(tempRunBlocks, fn => {\r\n instanceInjector.invoke(fn);\r\n });\r\n }\r\n }\r\n\r\n function _registerInvokeList(args, moduleName) {\r\n var invokeList = args[2][0],\r\n type = args[1],\r\n newInvoke = false;\r\n if(angular.isUndefined(regInvokes[moduleName])) {\r\n regInvokes[moduleName] = {};\r\n }\r\n if(angular.isUndefined(regInvokes[moduleName][type])) {\r\n regInvokes[moduleName][type] = {};\r\n }\r\n var onInvoke = function(invokeName, signature) {\r\n if(!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\r\n regInvokes[moduleName][type][invokeName] = [];\r\n }\r\n if(regInvokes[moduleName][type][invokeName].indexOf(signature) === -1) {\r\n newInvoke = true;\r\n regInvokes[moduleName][type][invokeName].push(signature);\r\n broadcast('ocLazyLoad.componentLoaded', [moduleName, type, invokeName]);\r\n }\r\n };\r\n\r\n function signature(data) {\r\n if(angular.isArray(data)) { // arrays are objects, we need to test for it first\r\n return hashCode(data.toString());\r\n } else if(angular.isObject(data)) { // constants & values for example\r\n return hashCode(stringify(data));\r\n } else {\r\n if(angular.isDefined(data) && data !== null) {\r\n return hashCode(data.toString());\r\n } else { // null & undefined constants\r\n return data;\r\n }\r\n }\r\n }\r\n\r\n if(angular.isString(invokeList)) {\r\n onInvoke(invokeList, signature(args[2][1]));\r\n } else if(angular.isObject(invokeList)) {\r\n angular.forEach(invokeList, function(invoke, key) {\r\n if(angular.isString(invoke)) { // decorators for example\r\n onInvoke(invoke, signature(invokeList[1]));\r\n } else { // components registered as object lists {\"componentName\": function() {}}\r\n onInvoke(key, signature(invoke));\r\n }\r\n });\r\n } else {\r\n return false;\r\n }\r\n return newInvoke;\r\n }\r\n\r\n function _invokeQueue(providers, queue, moduleName, reconfig) {\r\n if(!queue) {\r\n return;\r\n }\r\n\r\n var i, len, args, provider;\r\n for(i = 0, len = queue.length; i < len; i++) {\r\n args = queue[i];\r\n if(angular.isArray(args)) {\r\n if(providers !== null) {\r\n if(providers.hasOwnProperty(args[0])) {\r\n provider = providers[args[0]];\r\n } else {\r\n throw new Error(`unsupported provider ${ args[0] }`);\r\n }\r\n }\r\n var isNew = _registerInvokeList(args, moduleName);\r\n if(args[1] !== 'invoke') {\r\n if(isNew && angular.isDefined(provider)) {\r\n provider[args[1]].apply(provider, args[2]);\r\n }\r\n } else { // config block\r\n var callInvoke = function(fct) {\r\n var invoked = regConfigs.indexOf(`${ moduleName }-${ fct }`);\r\n if(invoked === -1 || reconfig) {\r\n if(invoked === -1) {\r\n regConfigs.push(`${ moduleName }-${ fct }`);\r\n }\r\n if(angular.isDefined(provider)) {\r\n provider[args[1]].apply(provider, args[2]);\r\n }\r\n }\r\n };\r\n if(angular.isFunction(args[2][0])) {\r\n callInvoke(args[2][0]);\r\n } else if(angular.isArray(args[2][0])) {\r\n for(var j = 0, jlen = args[2][0].length; j < jlen; j++) {\r\n if(angular.isFunction(args[2][0][j])) {\r\n callInvoke(args[2][0][j]);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getModuleName(module) {\r\n var moduleName = null;\r\n if(angular.isString(module)) {\r\n moduleName = module;\r\n } else if(angular.isObject(module) && module.hasOwnProperty('name') && angular.isString(module.name)) {\r\n moduleName = module.name;\r\n }\r\n return moduleName;\r\n }\r\n\r\n function moduleExists(moduleName) {\r\n if(!angular.isString(moduleName)) {\r\n return false;\r\n }\r\n try {\r\n return ngModuleFct(moduleName);\r\n } catch(e) {\r\n if(/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n this.$get = function($log, $rootElement, $rootScope, $cacheFactory, $q) {\r\n var instanceInjector,\r\n filesCache = $cacheFactory('ocLazyLoad');\r\n\r\n if(!debug) {\r\n $log = {};\r\n $log['error'] = angular.noop;\r\n $log['warn'] = angular.noop;\r\n $log['info'] = angular.noop;\r\n }\r\n\r\n // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\r\n providers.getInstanceInjector = function() {\r\n return instanceInjector ? instanceInjector : (instanceInjector = ($rootElement.data('$injector') || angular.injector()));\r\n };\r\n\r\n broadcast = function broadcast(eventName, params) {\r\n if(events) {\r\n $rootScope.$broadcast(eventName, params);\r\n }\r\n if(debug) {\r\n $log.info(eventName, params);\r\n }\r\n };\r\n\r\n function reject(e) {\r\n var deferred = $q.defer();\r\n $log.error(e.message);\r\n deferred.reject(e);\r\n return deferred.promise;\r\n }\r\n\r\n return {\r\n _broadcast: broadcast,\r\n\r\n _$log: $log,\r\n\r\n /**\r\n * Returns the files cache used by the loaders to store the files currently loading\r\n * @returns {*}\r\n */\r\n _getFilesCache: function getFilesCache() {\r\n return filesCache;\r\n },\r\n\r\n /**\r\n * Let the service know that it should monitor angular.module because files are loading\r\n * @param watch boolean\r\n */\r\n toggleWatch: function(watch) {\r\n if(watch) {\r\n recordDeclarations.push(true);\r\n } else {\r\n recordDeclarations.pop();\r\n }\r\n },\r\n\r\n /**\r\n * Let you get a module config object\r\n * @param moduleName String the name of the module\r\n * @returns {*}\r\n */\r\n getModuleConfig: function(moduleName) {\r\n if(!angular.isString(moduleName)) {\r\n throw new Error('You need to give the name of the module to get');\r\n }\r\n if(!modules[moduleName]) {\r\n return null;\r\n }\r\n return angular.copy(modules[moduleName]);\r\n },\r\n\r\n /**\r\n * Let you define a module config object\r\n * @param moduleConfig Object the module config object\r\n * @returns {*}\r\n */\r\n setModuleConfig: function(moduleConfig) {\r\n if(!angular.isObject(moduleConfig)) {\r\n throw new Error('You need to give the module config object to set');\r\n }\r\n modules[moduleConfig.name] = moduleConfig;\r\n return moduleConfig;\r\n },\r\n\r\n /**\r\n * Returns the list of loaded modules\r\n * @returns {string[]}\r\n */\r\n getModules: () => regModules,\r\n\r\n /**\r\n * Let you check if a module has been loaded into Angular or not\r\n * @param modulesNames String/Object a module name, or a list of module names\r\n * @returns {boolean}\r\n */\r\n isLoaded: function(modulesNames) {\r\n var moduleLoaded = function(module) {\r\n var isLoaded = regModules.indexOf(module) > -1;\r\n if(!isLoaded) {\r\n isLoaded = !!moduleExists(module);\r\n }\r\n return isLoaded;\r\n };\r\n if(angular.isString(modulesNames)) {\r\n modulesNames = [modulesNames];\r\n }\r\n if(angular.isArray(modulesNames)) {\r\n var i, len;\r\n for(i = 0, len = modulesNames.length; i < len; i++) {\r\n if(!moduleLoaded(modulesNames[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n } else {\r\n throw new Error('You need to define the module(s) name(s)');\r\n }\r\n },\r\n\r\n /**\r\n * Given a module, return its name\r\n * @param module\r\n * @returns {String}\r\n */\r\n _getModuleName: getModuleName,\r\n\r\n /**\r\n * Returns a module if it exists\r\n * @param moduleName\r\n * @returns {module}\r\n */\r\n _getModule: function getModule(moduleName) {\r\n try {\r\n return ngModuleFct(moduleName);\r\n } catch(e) {\r\n // this error message really suxx\r\n if(/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\r\n e.message = `The module \"${ stringify(moduleName) }\" that you are trying to load does not exist. ${ e.message }`;\r\n }\r\n throw e;\r\n }\r\n },\r\n\r\n /**\r\n * Check if a module exists and returns it if it does\r\n * @param moduleName\r\n * @returns {boolean}\r\n */\r\n moduleExists: moduleExists,\r\n\r\n /**\r\n * Load the dependencies, and might try to load new files depending on the config\r\n * @param moduleName (String or Array of Strings)\r\n * @param localParams\r\n * @returns {*}\r\n * @private\r\n */\r\n _loadDependencies: function _loadDependencies(moduleName, localParams) {\r\n var loadedModule,\r\n requires,\r\n diff,\r\n promisesList = [],\r\n self = this;\r\n\r\n moduleName = self._getModuleName(moduleName);\r\n\r\n if(moduleName === null) {\r\n return $q.when();\r\n } else {\r\n try {\r\n loadedModule = self._getModule(moduleName);\r\n } catch(e) {\r\n return reject(e);\r\n }\r\n // get unloaded requires\r\n requires = self.getRequires(loadedModule);\r\n }\r\n\r\n angular.forEach(requires, requireEntry => {\r\n // If no configuration is provided, try and find one from a previous load.\r\n // If there isn't one, bail and let the normal flow run\r\n if(angular.isString(requireEntry)) {\r\n var config = self.getModuleConfig(requireEntry);\r\n if(config === null) {\r\n moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\r\n return;\r\n }\r\n requireEntry = config;\r\n }\r\n\r\n // Check if this dependency has been loaded previously\r\n if(self.moduleExists(requireEntry.name)) {\r\n // compare against the already loaded module to see if the new definition adds any new files\r\n diff = requireEntry.files.filter(n => self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0);\r\n\r\n // If the module was redefined, advise via the console\r\n if(diff.length !== 0) {\r\n self._$log.warn('Module \"', moduleName, '\" attempted to redefine configuration for dependency. \"', requireEntry.name, '\"\\n Additional Files Loaded:', diff);\r\n }\r\n\r\n // Push everything to the file loader, it will weed out the duplicates.\r\n if(angular.isDefined(self.filesLoader)) { // if a files loader is defined\r\n promisesList.push(self.filesLoader(requireEntry, localParams).then(() => self._loadDependencies(requireEntry)));\r\n } else {\r\n return reject(new Error(`Error: New dependencies need to be loaded from external files (${requireEntry.files}), but no loader has been defined.`));\r\n }\r\n return;\r\n } else if(angular.isArray(requireEntry)) {\r\n requireEntry = {\r\n files: requireEntry\r\n };\r\n } else if(angular.isObject(requireEntry)) {\r\n if(requireEntry.hasOwnProperty('name') && requireEntry['name']) {\r\n // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\r\n self.setModuleConfig(requireEntry);\r\n moduleCache.push(requireEntry['name']);\r\n }\r\n }\r\n\r\n // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\r\n if(angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\r\n if(angular.isDefined(self.filesLoader)) { // if a files loader is defined\r\n promisesList.push(self.filesLoader(requireEntry, localParams).then(() => self._loadDependencies(requireEntry)));\r\n } else {\r\n return reject(new Error(`Error: the module \"${requireEntry.name}\" is defined in external files (${requireEntry.files}), but no loader has been defined.`));\r\n }\r\n }\r\n });\r\n\r\n // Create a wrapper promise to watch the promise list and resolve it once everything is done.\r\n return $q.all(promisesList);\r\n },\r\n\r\n /**\r\n * Inject new modules into Angular\r\n * @param moduleName\r\n * @param localParams\r\n */\r\n inject: function(moduleName, localParams = {}) {\r\n var self = this,\r\n deferred = $q.defer();\r\n if(angular.isDefined(moduleName) && moduleName !== null) {\r\n if(angular.isArray(moduleName)) {\r\n var promisesList = [];\r\n angular.forEach(moduleName, module => {\r\n promisesList.push(self.inject(module));\r\n });\r\n return $q.all(promisesList);\r\n } else {\r\n self._addToLoadList(self._getModuleName(moduleName), true);\r\n }\r\n }\r\n if(modulesToLoad.length > 0) {\r\n var res = modulesToLoad.slice(); // clean copy\r\n var loadNext = function loadNext(moduleName) {\r\n moduleCache.push(moduleName);\r\n self._loadDependencies(moduleName, localParams).then(function success() {\r\n try {\r\n justLoaded = [];\r\n _register(providers, moduleCache, localParams);\r\n } catch(e) {\r\n self._$log.error(e.message);\r\n deferred.reject(e);\r\n return;\r\n }\r\n\r\n if(modulesToLoad.length > 0) {\r\n loadNext(modulesToLoad.shift()); // load the next in list\r\n } else {\r\n deferred.resolve(res); // everything has been loaded, resolve\r\n }\r\n }, function error(err) {\r\n deferred.reject(err);\r\n });\r\n };\r\n\r\n // load the first in list\r\n loadNext(modulesToLoad.shift());\r\n } else {\r\n deferred.resolve();\r\n }\r\n return deferred.promise;\r\n },\r\n\r\n /**\r\n * Get the list of required modules/services/... for this module\r\n * @param module\r\n * @returns {Array}\r\n */\r\n getRequires: function getRequires(module) {\r\n var requires = [];\r\n angular.forEach(module.requires, requireModule => {\r\n if(regModules.indexOf(requireModule) === -1) {\r\n requires.push(requireModule);\r\n }\r\n });\r\n return requires;\r\n },\r\n\r\n /**\r\n * Invoke the new modules & component by their providers\r\n * @param providers\r\n * @param queue\r\n * @param moduleName\r\n * @param reconfig\r\n * @private\r\n */\r\n _invokeQueue: _invokeQueue,\r\n\r\n /**\r\n * Check if a module has been invoked and registers it if not\r\n * @param args\r\n * @param moduleName\r\n * @returns {boolean} is new\r\n */\r\n _registerInvokeList: _registerInvokeList,\r\n\r\n /**\r\n * Register a new module and loads it, executing the run/config blocks if needed\r\n * @param providers\r\n * @param registerModules\r\n * @param params\r\n * @private\r\n */\r\n _register: _register,\r\n\r\n /**\r\n * Add a module name to the list of modules that will be loaded in the next inject\r\n * @param name\r\n * @param force\r\n * @private\r\n */\r\n _addToLoadList: _addToLoadList\r\n };\r\n };\r\n\r\n // Let's get the list of loaded modules & components\r\n this._init(angular.element(window.document));\r\n });\r\n\r\n var bootstrapFct = angular.bootstrap;\r\n angular.bootstrap = function(element, modules, config) {\r\n // we use slice to make a clean copy\r\n angular.forEach(modules.slice(), module => {\r\n _addToLoadList(module, true);\r\n });\r\n return bootstrapFct(element, modules, config);\r\n };\r\n\r\n var _addToLoadList = function _addToLoadList(name, force) {\r\n if((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\r\n modulesToLoad.push(name);\r\n }\r\n };\r\n\r\n var ngModuleFct = angular.module;\r\n angular.module = function(name, requires, configFn) {\r\n _addToLoadList(name);\r\n return ngModuleFct(name, requires, configFn);\r\n };\r\n\r\n // CommonJS package manager support:\r\n if(typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports) {\r\n module.exports = 'oc.lazyLoad';\r\n }\r\n\r\n})(angular, window);\r\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').directive('ocLazyLoad', function($ocLazyLoad, $compile, $animate, $parse) {\r\n return {\r\n restrict: 'A',\r\n terminal: true,\r\n priority: 1000,\r\n compile: function(element, attrs) {\r\n // we store the content and remove it before compilation\r\n var content = element[0].innerHTML;\r\n element.html('');\r\n\r\n return function($scope, $element, $attr) {\r\n var model = $parse($attr.ocLazyLoad);\r\n $scope.$watch(() => {\r\n return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\r\n }, moduleName => {\r\n if(angular.isDefined(moduleName)) {\r\n $ocLazyLoad.load(moduleName).then(() => {\r\n $animate.enter(content, $element);\r\n let contents = element.contents();\r\n angular.forEach(contents, content => {\r\n if(content.nodeType !== 3) { // 3 is a text node\r\n $compile(content)($scope);\r\n }\r\n });\r\n });\r\n }\r\n }, true);\r\n };\r\n }\r\n };\r\n });\r\n\r\n})(angular);\r\n","(angular => {\n 'use strict';\n\n angular.module('oc.lazyLoad').config($provide => {\n $provide.decorator('$ocLazyLoad', function($delegate, $q, $window, $interval) {\n var uaCssChecked = false,\n useCssLoadPatch = false,\n anchor = $window.document.getElementsByTagName('head')[0] || $window.document.getElementsByTagName('body')[0];\n\n /**\n * Load a js/css file\n * @param type\n * @param path\n * @param params\n * @returns promise\n */\n $delegate.buildElement = function buildElement(type, path, params) {\n var deferred = $q.defer(),\n el,\n loaded,\n filesCache = $delegate._getFilesCache(),\n cacheBuster = function cacheBuster(url) {\n var dc = new Date().getTime();\n if(url.indexOf('?') >= 0) {\n if(url.substring(0, url.length - 1) === '&') {\n return `${ url }_dc=${ dc }`;\n }\n return `${ url }&_dc=${ dc }`;\n } else {\n return `${ url }?_dc=${ dc }`;\n }\n };\n\n // Store the promise early so the file load can be detected by other parallel lazy loads\n // (ie: multiple routes on one page) a 'true' value isn't sufficient\n // as it causes false positive load results.\n if(angular.isUndefined(filesCache.get(path))) {\n filesCache.put(path, deferred.promise);\n }\n\n // Switch in case more content types are added later\n switch(type) {\n case 'css':\n el = $window.document.createElement('link');\n el.type = 'text/css';\n el.rel = 'stylesheet';\n el.href = params.cache === false ? cacheBuster(path) : path;\n break;\n case 'js':\n el = $window.document.createElement('script');\n el.src = params.cache === false ? cacheBuster(path) : path;\n break;\n default:\n filesCache.remove(path);\n deferred.reject(new Error(`Requested type \"${ type }\" is not known. Could not inject \"${ path }\"`));\n break;\n }\n el.onload = el['onreadystatechange'] = function(e) {\n if((el['readyState'] && !/^c|loade/.test(el['readyState'])) || loaded) return;\n el.onload = el['onreadystatechange'] = null;\n loaded = 1;\n $delegate._broadcast('ocLazyLoad.fileLoaded', path);\n deferred.resolve();\n };\n el.onerror = function() {\n filesCache.remove(path);\n deferred.reject(new Error(`Unable to load ${ path }`));\n };\n el.async = params.serie ? 0 : 1;\n\n var insertBeforeElem = anchor.lastChild;\n if(params.insertBefore) {\n var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n if(element && element.length > 0) {\n insertBeforeElem = element[0];\n }\n }\n insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n /*\n The event load or readystatechange doesn't fire in:\n - iOS < 6 (default mobile browser)\n - Android < 4.4 (default mobile browser)\n - Safari < 6 (desktop browser)\n */\n if(type == 'css') {\n if(!uaCssChecked) {\n var ua = $window.navigator.userAgent.toLowerCase();\n\n // iOS < 6\n if(/iP(hone|od|ad)/.test($window.navigator.platform)) {\n var v = ($window.navigator.appVersion).match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.'));\n useCssLoadPatch = iOSVersion < 6;\n } else if(ua.indexOf(\"android\") > -1) { // Android < 4.4\n var androidVersion = parseFloat(ua.slice(ua.indexOf(\"android\") + 8));\n useCssLoadPatch = androidVersion < 4.4;\n } else if(ua.indexOf('safari') > -1) {\n var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n useCssLoadPatch = (versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6);\n }\n }\n\n if(useCssLoadPatch) {\n var tries = 1000; // * 20 = 20000 miliseconds\n var interval = $interval(() => {\n try {\n el.sheet.cssRules;\n $interval.cancel(interval);\n el.onload();\n } catch(e) {\n if(--tries <= 0) {\n el.onerror();\n }\n }\n }, 20);\n }\n }\n\n return deferred.promise;\n };\n\n return $delegate;\n })\n });\n\n})(angular);\n","(angular => {\n 'use strict';\n\n angular.module('oc.lazyLoad').config(function($provide) {\n $provide.decorator('$ocLazyLoad', function($delegate, $q) {\n /**\n * The function that loads new files\n * @param config\n * @param params\n * @returns {*}\n */\n $delegate.filesLoader = function filesLoader(config, params = {}) {\n var cssFiles = [],\n templatesFiles = [],\n jsFiles = [],\n promises = [],\n cachePromise = null,\n filesCache = $delegate._getFilesCache();\n\n $delegate.toggleWatch(true); // start watching angular.module calls\n\n angular.extend(params, config);\n\n var pushFile = function(path) {\n var file_type = null, m;\n if(angular.isObject(path)) {\n file_type = path.type;\n path = path.path;\n }\n cachePromise = filesCache.get(path);\n if(angular.isUndefined(cachePromise) || params.cache === false) {\n\n // always check for requirejs syntax just in case\n if((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) { // Detect file type using preceding type declaration (ala requireJS)\n file_type = m[1];\n path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n }\n\n if(!file_type) {\n if((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) { // Detect file type via file extension\n file_type = m[1];\n } else if(!$delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader') && $delegate.jsLoader.hasOwnProperty('load')) { // requirejs\n file_type = 'js';\n } else {\n $delegate._$log.error(`File type could not be determined. ${ path }`);\n return;\n }\n }\n\n if((file_type === 'css' || file_type === 'less') && cssFiles.indexOf(path) === -1) {\n cssFiles.push(path);\n } else if((file_type === 'html' || file_type === 'htm') && templatesFiles.indexOf(path) === -1) {\n templatesFiles.push(path);\n } else if(file_type === 'js' || jsFiles.indexOf(path) === -1) {\n jsFiles.push(path);\n } else {\n $delegate._$log.error(`File type is not valid. ${ path }`);\n }\n\n } else if(cachePromise) {\n promises.push(cachePromise);\n }\n };\n\n if(params.serie) {\n pushFile(params.files.shift());\n } else {\n angular.forEach(params.files, path => {\n pushFile(path);\n });\n }\n\n if(cssFiles.length > 0) {\n var cssDeferred = $q.defer();\n $delegate.cssLoader(cssFiles, err => {\n if(angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n cssDeferred.reject(err);\n } else {\n cssDeferred.resolve();\n }\n }, params);\n promises.push(cssDeferred.promise);\n }\n\n if(templatesFiles.length > 0) {\n var templatesDeferred = $q.defer();\n $delegate.templatesLoader(templatesFiles, err => {\n if(angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n templatesDeferred.reject(err);\n } else {\n templatesDeferred.resolve();\n }\n }, params);\n promises.push(templatesDeferred.promise);\n }\n\n if(jsFiles.length > 0) {\n var jsDeferred = $q.defer();\n $delegate.jsLoader(jsFiles, err => {\n if(angular.isDefined(err) && $delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n jsDeferred.reject(err);\n } else {\n jsDeferred.resolve();\n }\n }, params);\n promises.push(jsDeferred.promise);\n }\n\n if(promises.length === 0) {\n let deferred = $q.defer(),\n err = \"Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.\";\n $delegate._$log.error(err);\n deferred.reject(err);\n return deferred.promise;\n } else if(params.serie && params.files.length > 0) {\n return $q.all(promises).then(() => $delegate.filesLoader(config, params));\n } else {\n return $q.all(promises).finally(res => {\n $delegate.toggleWatch(false); // stop watching angular.module calls\n return res;\n });\n }\n };\n\n /**\n * Load a module or a list of modules into Angular\n * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n * @param params Object optional parameters\n * @returns promise\n */\n $delegate.load = function(originalModule, originalParams = {}) {\n var self = this,\n config = null,\n deferredList = [],\n deferred = $q.defer(),\n errText;\n\n // clean copy\n var module = angular.copy(originalModule);\n var params = angular.copy(originalParams);\n\n // If module is an array, break it down\n if(angular.isArray(module)) {\n // Resubmit each entry as a single module\n angular.forEach(module, m => {\n deferredList.push(self.load(m, params));\n });\n\n // Resolve the promise once everything has loaded\n $q.all(deferredList).then(res => {\n deferred.resolve(res);\n }, err => {\n deferred.reject(err);\n });\n\n return deferred.promise;\n }\n\n // Get or Set a configuration depending on what was passed in\n if(angular.isString(module)) {\n config = self.getModuleConfig(module);\n if(!config) {\n config = {\n files: [module]\n };\n }\n } else if(angular.isObject(module)) {\n // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n if(angular.isDefined(module.path) && angular.isDefined(module.type)) {\n config = {\n files: [module]\n };\n } else {\n config = self.setModuleConfig(module);\n }\n }\n\n if(config === null) {\n var moduleName = self._getModuleName(module);\n errText = `Module \"${ moduleName || 'unknown' }\" is not configured, cannot load.`;\n $delegate._$log.error(errText);\n deferred.reject(new Error(errText));\n return deferred.promise;\n } else {\n // deprecated\n if(angular.isDefined(config.template)) {\n if(angular.isUndefined(config.files)) {\n config.files = [];\n }\n if(angular.isString(config.template)) {\n config.files.push(config.template);\n } else if(angular.isArray(config.template)) {\n config.files.concat(config.template);\n }\n }\n }\n\n var localParams = angular.extend({}, params, config);\n\n // if someone used an external loader and called the load function with just the module name\n if(angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n return $delegate.inject(config.name, localParams);\n }\n\n $delegate.filesLoader(config, localParams).then(() => {\n $delegate.inject(null, localParams).then(res => {\n deferred.resolve(res);\n }, err => {\n deferred.reject(err);\n });\n }, err => {\n deferred.reject(err);\n });\n\n return deferred.promise;\n };\n\n // return the patched service\n return $delegate;\n });\n });\n\n})(angular);\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').config(function($provide) {\r\n $provide.decorator('$ocLazyLoad', function ($delegate, $q) {\r\n /**\r\n * cssLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite cssLoader and it will probably not use promises :(\r\n */\r\n $delegate.cssLoader = function(paths, callback, params) {\r\n var promises = [];\r\n angular.forEach(paths, path => {\r\n promises.push($delegate.buildElement('css', path, params));\r\n });\r\n $q.all(promises).then(() => {\r\n callback();\r\n }, err => {\r\n callback(err);\r\n });\r\n };\r\n $delegate.cssLoader.ocLazyLoadLoader = true;\r\n\r\n return $delegate;\r\n })\r\n });\r\n\r\n})(angular);\r\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').config(function($provide) {\r\n $provide.decorator('$ocLazyLoad', function ($delegate, $q) {\r\n /**\r\n * jsLoader function\r\n * @type Function\r\n * @param paths array list of js files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite jsLoader and it will probably not use promises :(\r\n */\r\n $delegate.jsLoader = require;\r\n\r\n return $delegate;\r\n })\r\n });\r\n\r\n})(angular);\r\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').config(function($provide) {\r\n $provide.decorator('$ocLazyLoad', function ($delegate, $templateCache, $q, $http) {\r\n /**\r\n * templatesLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters for $http\r\n * because the user can overwrite templatesLoader and it will probably not use promises :(\r\n */\r\n $delegate.templatesLoader = function(paths, callback, params) {\r\n var promises = [],\r\n filesCache = $delegate._getFilesCache();\r\n\r\n angular.forEach(paths, url => {\r\n var deferred = $q.defer();\r\n promises.push(deferred.promise);\r\n $http.get(url, params).success(data => {\r\n if(angular.isString(data) && data.length > 0) {\r\n angular.forEach(angular.element(data), node => {\r\n if(node.nodeName === 'SCRIPT' && node.type === 'text/ng-template') {\r\n $templateCache.put(node.id, node.innerHTML);\r\n }\r\n });\r\n }\r\n if(angular.isUndefined(filesCache.get(url))) {\r\n filesCache.put(url, true);\r\n }\r\n deferred.resolve();\r\n }).error(function(err) {\r\n deferred.reject(new Error(`Unable to load template file \"${ url }\": ${ err }`));\r\n });\r\n });\r\n return $q.all(promises).then(() => {\r\n callback();\r\n }, err => {\r\n callback(err);\r\n });\r\n };\r\n $delegate.templatesLoader.ocLazyLoadLoader = true;\r\n\r\n return $delegate;\r\n })\r\n });\r\n\r\n})(angular);\r\n","// Array.indexOf polyfill for IE8\r\nif(!Array.prototype.indexOf) {\r\n Array.prototype.indexOf = function(searchElement, fromIndex) {\r\n var k;\r\n\r\n // 1. Let O be the result of calling ToObject passing\r\n // the this value as the argument.\r\n if(this == null) {\r\n throw new TypeError('\"this\" is null or not defined');\r\n }\r\n\r\n var O = Object(this);\r\n\r\n // 2. Let lenValue be the result of calling the Get\r\n // internal method of O with the argument \"length\".\r\n // 3. Let len be ToUint32(lenValue).\r\n var len = O.length >>> 0;\r\n\r\n // 4. If len is 0, return -1.\r\n if(len === 0) {\r\n return -1;\r\n }\r\n\r\n // 5. If argument fromIndex was passed let n be\r\n // ToInteger(fromIndex); else let n be 0.\r\n var n = +fromIndex || 0;\r\n\r\n if(Math.abs(n) === Infinity) {\r\n n = 0;\r\n }\r\n\r\n // 6. If n >= len, return -1.\r\n if(n >= len) {\r\n return -1;\r\n }\r\n\r\n // 7. If n >= 0, then Let k be n.\r\n // 8. Else, n<0, Let k be len - abs(n).\r\n // If k is less than 0, then let k be 0.\r\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\r\n\r\n // 9. Repeat, while k < len\r\n while(k < len) {\r\n // a. Let Pk be ToString(k).\r\n // This is implicit for LHS operands of the in operator\r\n // b. Let kPresent be the result of calling the\r\n // HasProperty internal method of O with argument Pk.\r\n // This step can be combined with c\r\n // c. If kPresent is true, then\r\n // i. Let elementK be the result of calling the Get\r\n // internal method of O with the argument ToString(k).\r\n // ii. Let same be the result of applying the\r\n // Strict Equality Comparison Algorithm to\r\n // searchElement and elementK.\r\n // iii. If same is true, return k.\r\n if(k in O && O[k] === searchElement) {\r\n return k;\r\n }\r\n k++;\r\n }\r\n return -1;\r\n };\r\n}\r\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["ocLazyLoad.core.js","ocLazyLoad.directive.js","ocLazyLoad.loaders.common.js","ocLazyLoad.loaders.core.js","ocLazyLoad.loaders.cssLoader.js","ocLazyLoad.loaders.requireJSLoader.js","ocLazyLoad.loaders.templatesLoader.js","ocLazyLoad.polyfill.ie8.js"],"names":[],"mappings":"AAAA,CAAC,UAAC,SAAS,QAAW;IAClB;;IAEA,IAAI,aAAa,CAAC,MAAM;QACpB,aAAa;QACb,aAAa;QACb,gBAAgB;QAChB,qBAAqB;QACrB,YAAY,QAAQ;QACpB,YAAY;QACZ,aAAa;;IAEjB,IAAI,aAAa,QAAQ,OAAO,eAAe,CAAC;;IAEhD,WAAW,SAAS,2HAAe,UAAS,qBAAqB,UAAU,kBAAkB,iBAAiB,WAAW,kBAAkB;QACvI,IAAI,UAAU;YACV,YAAY;YACR,qBAAqB;YACrB,kBAAkB;YAClB,iBAAiB;YACjB,UAAU;YACV,WAAW;YACX,kBAAkB;;YAEtB,QAAQ;YACR,SAAS;YACT,cAAc;;QAElB,YAAY,OAAO,UAAS,OAAO;YAC/B,IAAG,KAAK,QAAQ,WAAW,CAAC,GAAG;gBAC3B,MAAM,UAAU,KAAK,MAAM,MAAM;;;;QAIzC,KAAK,SAAS,UAAS,QAAQ;;YAE3B,IAAG,QAAQ,UAAU,OAAO,UAAU;gBAClC,IAAG,QAAQ,QAAQ,OAAO,UAAU;oBAChC,QAAQ,QAAQ,OAAO,SAAS,UAAA,cAAgB;wBAC5C,QAAQ,aAAa,QAAQ;;uBAE9B;oBACH,QAAQ,OAAO,QAAQ,QAAQ,OAAO;;;;YAI9C,IAAG,QAAQ,UAAU,OAAO,QAAQ;gBAChC,QAAQ,OAAO;;;YAGnB,IAAG,QAAQ,UAAU,OAAO,SAAS;gBACjC,SAAS,OAAO;;;;;;;;QAQxB,KAAK,QAAQ,SAAS,MAAM,SAAS;;YAEjC,IAAG,cAAc,WAAW,GAAG;gBAC3B,IAAI,WAAW,CAAC;oBACZ,QAAQ,CAA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EX;;gBAEJ,OAAO,CAAC;;CAEf","file":"ocLazyLoad.require.js","sourcesContent":["((angular, window) => {\r\n 'use strict';\r\n\r\n var regModules = ['ng', 'oc.lazyLoad'],\r\n regInvokes = {},\r\n regConfigs = [],\r\n modulesToLoad = [],\r\n recordDeclarations = [],\r\n broadcast = angular.noop,\r\n runBlocks = {},\r\n justLoaded = [];\r\n\r\n var ocLazyLoad = angular.module('oc.lazyLoad', ['ng']);\r\n\r\n ocLazyLoad.provider('$ocLazyLoad', function($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\r\n var modules = {},\r\n providers = {\r\n $controllerProvider: $controllerProvider,\r\n $compileProvider: $compileProvider,\r\n $filterProvider: $filterProvider,\r\n $provide: $provide, // other things (constant, decorator, provider, factory, service)\r\n $injector: $injector,\r\n $animateProvider: $animateProvider\r\n },\r\n debug = false,\r\n events = false,\r\n moduleCache = [];\r\n\r\n moduleCache.push = function(value) {\r\n if(this.indexOf(value) === -1) {\r\n Array.prototype.push.apply(this, arguments);\r\n }\r\n };\r\n\r\n this.config = function(config) {\r\n // If we want to define modules configs\r\n if(angular.isDefined(config.modules)) {\r\n if(angular.isArray(config.modules)) {\r\n angular.forEach(config.modules, moduleConfig => {\r\n modules[moduleConfig.name] = moduleConfig;\r\n });\r\n } else {\r\n modules[config.modules.name] = config.modules;\r\n }\r\n }\r\n\r\n if(angular.isDefined(config.debug)) {\r\n debug = config.debug;\r\n }\r\n\r\n if(angular.isDefined(config.events)) {\r\n events = config.events;\r\n }\r\n };\r\n\r\n /**\r\n * Get the list of existing registered modules\r\n * @param element\r\n */\r\n this._init = function _init(element) {\r\n // this is probably useless now because we override angular.bootstrap\r\n if(modulesToLoad.length === 0) {\r\n var elements = [element],\r\n names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],\r\n NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\r\n append = function append(elm) {\r\n return (elm && elements.push(elm));\r\n };\r\n\r\n angular.forEach(names, name => {\r\n names[name] = true;\r\n append(document.getElementById(name));\r\n name = name.replace(':', '\\\\:');\r\n if(typeof(element[0]) !== 'undefined' && element[0].querySelectorAll) {\r\n angular.forEach(element[0].querySelectorAll(`.${ name }`), append);\r\n angular.forEach(element[0].querySelectorAll(`.${ name }\\\\:`), append);\r\n angular.forEach(element[0].querySelectorAll(`[${ name }]`), append);\r\n }\r\n });\r\n\r\n angular.forEach(elements, elm => {\r\n if(modulesToLoad.length === 0) {\r\n var className = ` ${ element.className } `;\r\n var match = NG_APP_CLASS_REGEXP.exec(className);\r\n if(match) {\r\n modulesToLoad.push((match[2] || '').replace(/\\s+/g, ','));\r\n } else {\r\n angular.forEach(elm.attributes, attr => {\r\n if(modulesToLoad.length === 0 && names[attr.name]) {\r\n modulesToLoad.push(attr.value);\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n if(modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\r\n console.error('No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.');\r\n }\r\n\r\n var addReg = function addReg(moduleName) {\r\n if(regModules.indexOf(moduleName) === -1) {\r\n // register existing modules\r\n regModules.push(moduleName);\r\n var mainModule = angular.module(moduleName);\r\n\r\n // register existing components (directives, services, ...)\r\n _invokeQueue(null, mainModule._invokeQueue, moduleName);\r\n _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\r\n\r\n angular.forEach(mainModule.requires, addReg);\r\n }\r\n };\r\n\r\n angular.forEach(modulesToLoad, moduleName => {\r\n addReg(moduleName);\r\n });\r\n\r\n modulesToLoad = []; // reset for next bootstrap\r\n recordDeclarations.pop(); // wait for the next lazy load\r\n };\r\n\r\n /**\r\n * Like JSON.stringify but that doesn't throw on circular references\r\n * @param obj\r\n */\r\n var stringify = function stringify(obj) {\r\n var cache = [];\r\n return JSON.stringify(obj, (key, value) => {\r\n if(angular.isObject(value) && value !== null) {\r\n if(cache.indexOf(value) !== -1) {\r\n // Circular reference found, discard key\r\n return;\r\n }\r\n // Store value in our collection\r\n cache.push(value);\r\n }\r\n return value;\r\n });\r\n };\r\n\r\n var hashCode = function hashCode(str) {\r\n var hash = 0, i, chr, len;\r\n if(str.length == 0) {\r\n return hash;\r\n }\r\n for(i = 0, len = str.length; i < len; i++) {\r\n chr = str.charCodeAt(i);\r\n hash = (hash << 5) - hash + chr;\r\n hash |= 0; // Convert to 32bit integer\r\n }\r\n return hash;\r\n };\r\n\r\n function _register(providers, registerModules, params) {\r\n if(registerModules) {\r\n var k, moduleName, moduleFn, tempRunBlocks = [];\r\n for(k = registerModules.length - 1; k >= 0; k--) {\r\n moduleName = registerModules[k];\r\n if(!angular.isString(moduleName)) {\r\n moduleName = getModuleName(moduleName);\r\n }\r\n if(!moduleName || justLoaded.indexOf(moduleName) !== -1) {\r\n continue;\r\n }\r\n var newModule = regModules.indexOf(moduleName) === -1;\r\n moduleFn = ngModuleFct(moduleName);\r\n if(newModule) { // new module\r\n regModules.push(moduleName);\r\n _register(providers, moduleFn.requires, params);\r\n }\r\n if(moduleFn._runBlocks.length > 0) {\r\n // new run blocks detected! Replace the old ones (if existing)\r\n runBlocks[moduleName] = [];\r\n while(moduleFn._runBlocks.length > 0) {\r\n runBlocks[moduleName].push(moduleFn._runBlocks.shift());\r\n }\r\n }\r\n if(angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\r\n tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\r\n }\r\n _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\r\n _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\r\n broadcast(newModule ? 'ocLazyLoad.moduleLoaded' : 'ocLazyLoad.moduleReloaded', moduleName);\r\n registerModules.pop();\r\n justLoaded.push(moduleName);\r\n }\r\n // execute the run blocks at the end\r\n var instanceInjector = providers.getInstanceInjector();\r\n angular.forEach(tempRunBlocks, fn => {\r\n instanceInjector.invoke(fn);\r\n });\r\n }\r\n }\r\n\r\n function _registerInvokeList(args, moduleName) {\r\n var invokeList = args[2][0],\r\n type = args[1],\r\n newInvoke = false;\r\n if(angular.isUndefined(regInvokes[moduleName])) {\r\n regInvokes[moduleName] = {};\r\n }\r\n if(angular.isUndefined(regInvokes[moduleName][type])) {\r\n regInvokes[moduleName][type] = {};\r\n }\r\n var onInvoke = function(invokeName, signature) {\r\n if(!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\r\n regInvokes[moduleName][type][invokeName] = [];\r\n }\r\n if(regInvokes[moduleName][type][invokeName].indexOf(signature) === -1) {\r\n newInvoke = true;\r\n regInvokes[moduleName][type][invokeName].push(signature);\r\n broadcast('ocLazyLoad.componentLoaded', [moduleName, type, invokeName]);\r\n }\r\n };\r\n\r\n function signature(data) {\r\n if(angular.isArray(data)) { // arrays are objects, we need to test for it first\r\n return hashCode(data.toString());\r\n } else if(angular.isObject(data)) { // constants & values for example\r\n return hashCode(stringify(data));\r\n } else {\r\n if(angular.isDefined(data) && data !== null) {\r\n return hashCode(data.toString());\r\n } else { // null & undefined constants\r\n return data;\r\n }\r\n }\r\n }\r\n\r\n if(angular.isString(invokeList)) {\r\n onInvoke(invokeList, signature(args[2][1]));\r\n } else if(angular.isObject(invokeList)) {\r\n angular.forEach(invokeList, function(invoke, key) {\r\n if(angular.isString(invoke)) { // decorators for example\r\n onInvoke(invoke, signature(invokeList[1]));\r\n } else { // components registered as object lists {\"componentName\": function() {}}\r\n onInvoke(key, signature(invoke));\r\n }\r\n });\r\n } else {\r\n return false;\r\n }\r\n return newInvoke;\r\n }\r\n\r\n function _invokeQueue(providers, queue, moduleName, reconfig) {\r\n if(!queue) {\r\n return;\r\n }\r\n\r\n var i, len, args, provider;\r\n for(i = 0, len = queue.length; i < len; i++) {\r\n args = queue[i];\r\n if(angular.isArray(args)) {\r\n if(providers !== null) {\r\n if(providers.hasOwnProperty(args[0])) {\r\n provider = providers[args[0]];\r\n } else {\r\n throw new Error(`unsupported provider ${ args[0] }`);\r\n }\r\n }\r\n var isNew = _registerInvokeList(args, moduleName);\r\n if(args[1] !== 'invoke') {\r\n if(isNew && angular.isDefined(provider)) {\r\n provider[args[1]].apply(provider, args[2]);\r\n }\r\n } else { // config block\r\n var callInvoke = function(fct) {\r\n var invoked = regConfigs.indexOf(`${ moduleName }-${ fct }`);\r\n if(invoked === -1 || reconfig) {\r\n if(invoked === -1) {\r\n regConfigs.push(`${ moduleName }-${ fct }`);\r\n }\r\n if(angular.isDefined(provider)) {\r\n provider[args[1]].apply(provider, args[2]);\r\n }\r\n }\r\n };\r\n if(angular.isFunction(args[2][0])) {\r\n callInvoke(args[2][0]);\r\n } else if(angular.isArray(args[2][0])) {\r\n for(var j = 0, jlen = args[2][0].length; j < jlen; j++) {\r\n if(angular.isFunction(args[2][0][j])) {\r\n callInvoke(args[2][0][j]);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getModuleName(module) {\r\n var moduleName = null;\r\n if(angular.isString(module)) {\r\n moduleName = module;\r\n } else if(angular.isObject(module) && module.hasOwnProperty('name') && angular.isString(module.name)) {\r\n moduleName = module.name;\r\n }\r\n return moduleName;\r\n }\r\n\r\n function moduleExists(moduleName) {\r\n if(!angular.isString(moduleName)) {\r\n return false;\r\n }\r\n try {\r\n return ngModuleFct(moduleName);\r\n } catch(e) {\r\n if(/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n this.$get = function($log, $rootElement, $rootScope, $cacheFactory, $q) {\r\n var instanceInjector,\r\n filesCache = $cacheFactory('ocLazyLoad');\r\n\r\n if(!debug) {\r\n $log = {};\r\n $log['error'] = angular.noop;\r\n $log['warn'] = angular.noop;\r\n $log['info'] = angular.noop;\r\n }\r\n\r\n // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\r\n providers.getInstanceInjector = function() {\r\n return instanceInjector ? instanceInjector : (instanceInjector = ($rootElement.data('$injector') || angular.injector()));\r\n };\r\n\r\n broadcast = function broadcast(eventName, params) {\r\n if(events) {\r\n $rootScope.$broadcast(eventName, params);\r\n }\r\n if(debug) {\r\n $log.info(eventName, params);\r\n }\r\n };\r\n\r\n function reject(e) {\r\n var deferred = $q.defer();\r\n $log.error(e.message);\r\n deferred.reject(e);\r\n return deferred.promise;\r\n }\r\n\r\n return {\r\n _broadcast: broadcast,\r\n\r\n _$log: $log,\r\n\r\n /**\r\n * Returns the files cache used by the loaders to store the files currently loading\r\n * @returns {*}\r\n */\r\n _getFilesCache: function getFilesCache() {\r\n return filesCache;\r\n },\r\n\r\n /**\r\n * Let the service know that it should monitor angular.module because files are loading\r\n * @param watch boolean\r\n */\r\n toggleWatch: function(watch) {\r\n if(watch) {\r\n recordDeclarations.push(true);\r\n } else {\r\n recordDeclarations.pop();\r\n }\r\n },\r\n\r\n /**\r\n * Let you get a module config object\r\n * @param moduleName String the name of the module\r\n * @returns {*}\r\n */\r\n getModuleConfig: function(moduleName) {\r\n if(!angular.isString(moduleName)) {\r\n throw new Error('You need to give the name of the module to get');\r\n }\r\n if(!modules[moduleName]) {\r\n return null;\r\n }\r\n return angular.copy(modules[moduleName]);\r\n },\r\n\r\n /**\r\n * Let you define a module config object\r\n * @param moduleConfig Object the module config object\r\n * @returns {*}\r\n */\r\n setModuleConfig: function(moduleConfig) {\r\n if(!angular.isObject(moduleConfig)) {\r\n throw new Error('You need to give the module config object to set');\r\n }\r\n modules[moduleConfig.name] = moduleConfig;\r\n return moduleConfig;\r\n },\r\n\r\n /**\r\n * Returns the list of loaded modules\r\n * @returns {string[]}\r\n */\r\n getModules: () => regModules,\r\n\r\n /**\r\n * Let you check if a module has been loaded into Angular or not\r\n * @param modulesNames String/Object a module name, or a list of module names\r\n * @returns {boolean}\r\n */\r\n isLoaded: function(modulesNames) {\r\n var moduleLoaded = function(module) {\r\n var isLoaded = regModules.indexOf(module) > -1;\r\n if(!isLoaded) {\r\n isLoaded = !!moduleExists(module);\r\n }\r\n return isLoaded;\r\n };\r\n if(angular.isString(modulesNames)) {\r\n modulesNames = [modulesNames];\r\n }\r\n if(angular.isArray(modulesNames)) {\r\n var i, len;\r\n for(i = 0, len = modulesNames.length; i < len; i++) {\r\n if(!moduleLoaded(modulesNames[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n } else {\r\n throw new Error('You need to define the module(s) name(s)');\r\n }\r\n },\r\n\r\n /**\r\n * Given a module, return its name\r\n * @param module\r\n * @returns {String}\r\n */\r\n _getModuleName: getModuleName,\r\n\r\n /**\r\n * Returns a module if it exists\r\n * @param moduleName\r\n * @returns {module}\r\n */\r\n _getModule: function getModule(moduleName) {\r\n try {\r\n return ngModuleFct(moduleName);\r\n } catch(e) {\r\n // this error message really suxx\r\n if(/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\r\n e.message = `The module \"${ stringify(moduleName) }\" that you are trying to load does not exist. ${ e.message }`;\r\n }\r\n throw e;\r\n }\r\n },\r\n\r\n /**\r\n * Check if a module exists and returns it if it does\r\n * @param moduleName\r\n * @returns {boolean}\r\n */\r\n moduleExists: moduleExists,\r\n\r\n /**\r\n * Load the dependencies, and might try to load new files depending on the config\r\n * @param moduleName (String or Array of Strings)\r\n * @param localParams\r\n * @returns {*}\r\n * @private\r\n */\r\n _loadDependencies: function _loadDependencies(moduleName, localParams) {\r\n var loadedModule,\r\n requires,\r\n diff,\r\n promisesList = [],\r\n self = this;\r\n\r\n moduleName = self._getModuleName(moduleName);\r\n\r\n if(moduleName === null) {\r\n return $q.when();\r\n } else {\r\n try {\r\n loadedModule = self._getModule(moduleName);\r\n } catch(e) {\r\n return reject(e);\r\n }\r\n // get unloaded requires\r\n requires = self.getRequires(loadedModule);\r\n }\r\n\r\n angular.forEach(requires, requireEntry => {\r\n // If no configuration is provided, try and find one from a previous load.\r\n // If there isn't one, bail and let the normal flow run\r\n if(angular.isString(requireEntry)) {\r\n var config = self.getModuleConfig(requireEntry);\r\n if(config === null) {\r\n moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\r\n return;\r\n }\r\n requireEntry = config;\r\n }\r\n\r\n // Check if this dependency has been loaded previously\r\n if(self.moduleExists(requireEntry.name)) {\r\n // compare against the already loaded module to see if the new definition adds any new files\r\n diff = requireEntry.files.filter(n => self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0);\r\n\r\n // If the module was redefined, advise via the console\r\n if(diff.length !== 0) {\r\n self._$log.warn('Module \"', moduleName, '\" attempted to redefine configuration for dependency. \"', requireEntry.name, '\"\\n Additional Files Loaded:', diff);\r\n }\r\n\r\n // Push everything to the file loader, it will weed out the duplicates.\r\n if(angular.isDefined(self.filesLoader)) { // if a files loader is defined\r\n promisesList.push(self.filesLoader(requireEntry, localParams).then(() => self._loadDependencies(requireEntry)));\r\n } else {\r\n return reject(new Error(`Error: New dependencies need to be loaded from external files (${requireEntry.files}), but no loader has been defined.`));\r\n }\r\n return;\r\n } else if(angular.isArray(requireEntry)) {\r\n requireEntry = {\r\n files: requireEntry\r\n };\r\n } else if(angular.isObject(requireEntry)) {\r\n if(requireEntry.hasOwnProperty('name') && requireEntry['name']) {\r\n // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\r\n self.setModuleConfig(requireEntry);\r\n moduleCache.push(requireEntry['name']);\r\n }\r\n }\r\n\r\n // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\r\n if(angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\r\n if(angular.isDefined(self.filesLoader)) { // if a files loader is defined\r\n promisesList.push(self.filesLoader(requireEntry, localParams).then(() => self._loadDependencies(requireEntry)));\r\n } else {\r\n return reject(new Error(`Error: the module \"${requireEntry.name}\" is defined in external files (${requireEntry.files}), but no loader has been defined.`));\r\n }\r\n }\r\n });\r\n\r\n // Create a wrapper promise to watch the promise list and resolve it once everything is done.\r\n return $q.all(promisesList);\r\n },\r\n\r\n /**\r\n * Inject new modules into Angular\r\n * @param moduleName\r\n * @param localParams\r\n */\r\n inject: function(moduleName, localParams = {}) {\r\n var self = this,\r\n deferred = $q.defer();\r\n if(angular.isDefined(moduleName) && moduleName !== null) {\r\n if(angular.isArray(moduleName)) {\r\n var promisesList = [];\r\n angular.forEach(moduleName, module => {\r\n promisesList.push(self.inject(module));\r\n });\r\n return $q.all(promisesList);\r\n } else {\r\n self._addToLoadList(self._getModuleName(moduleName), true);\r\n }\r\n }\r\n if(modulesToLoad.length > 0) {\r\n var res = modulesToLoad.slice(); // clean copy\r\n var loadNext = function loadNext(moduleName) {\r\n moduleCache.push(moduleName);\r\n self._loadDependencies(moduleName, localParams).then(function success() {\r\n try {\r\n justLoaded = [];\r\n _register(providers, moduleCache, localParams);\r\n } catch(e) {\r\n self._$log.error(e.message);\r\n deferred.reject(e);\r\n return;\r\n }\r\n\r\n if(modulesToLoad.length > 0) {\r\n loadNext(modulesToLoad.shift()); // load the next in list\r\n } else {\r\n deferred.resolve(res); // everything has been loaded, resolve\r\n }\r\n }, function error(err) {\r\n deferred.reject(err);\r\n });\r\n };\r\n\r\n // load the first in list\r\n loadNext(modulesToLoad.shift());\r\n } else {\r\n deferred.resolve();\r\n }\r\n return deferred.promise;\r\n },\r\n\r\n /**\r\n * Get the list of required modules/services/... for this module\r\n * @param module\r\n * @returns {Array}\r\n */\r\n getRequires: function getRequires(module) {\r\n var requires = [];\r\n angular.forEach(module.requires, requireModule => {\r\n if(regModules.indexOf(requireModule) === -1) {\r\n requires.push(requireModule);\r\n }\r\n });\r\n return requires;\r\n },\r\n\r\n /**\r\n * Invoke the new modules & component by their providers\r\n * @param providers\r\n * @param queue\r\n * @param moduleName\r\n * @param reconfig\r\n * @private\r\n */\r\n _invokeQueue: _invokeQueue,\r\n\r\n /**\r\n * Check if a module has been invoked and registers it if not\r\n * @param args\r\n * @param moduleName\r\n * @returns {boolean} is new\r\n */\r\n _registerInvokeList: _registerInvokeList,\r\n\r\n /**\r\n * Register a new module and loads it, executing the run/config blocks if needed\r\n * @param providers\r\n * @param registerModules\r\n * @param params\r\n * @private\r\n */\r\n _register: _register,\r\n\r\n /**\r\n * Add a module name to the list of modules that will be loaded in the next inject\r\n * @param name\r\n * @param force\r\n * @private\r\n */\r\n _addToLoadList: _addToLoadList\r\n };\r\n };\r\n\r\n // Let's get the list of loaded modules & components\r\n this._init(angular.element(window.document));\r\n });\r\n\r\n var bootstrapFct = angular.bootstrap;\r\n angular.bootstrap = function(element, modules, config) {\r\n // we use slice to make a clean copy\r\n angular.forEach(modules.slice(), module => {\r\n _addToLoadList(module, true);\r\n });\r\n return bootstrapFct(element, modules, config);\r\n };\r\n\r\n var _addToLoadList = function _addToLoadList(name, force) {\r\n if((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\r\n modulesToLoad.push(name);\r\n }\r\n };\r\n\r\n var ngModuleFct = angular.module;\r\n angular.module = function(name, requires, configFn) {\r\n _addToLoadList(name);\r\n return ngModuleFct(name, requires, configFn);\r\n };\r\n\r\n // CommonJS package manager support:\r\n if(typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports) {\r\n module.exports = 'oc.lazyLoad';\r\n }\r\n\r\n})(angular, window);\r\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').directive('ocLazyLoad', function($ocLazyLoad, $compile, $animate, $parse) {\r\n return {\r\n restrict: 'A',\r\n terminal: true,\r\n priority: 1000,\r\n compile: function(element, attrs) {\r\n // we store the content and remove it before compilation\r\n var content = element[0].innerHTML;\r\n element.html('');\r\n\r\n return function($scope, $element, $attr) {\r\n var model = $parse($attr.ocLazyLoad);\r\n $scope.$watch(() => {\r\n return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\r\n }, moduleName => {\r\n if(angular.isDefined(moduleName)) {\r\n $ocLazyLoad.load(moduleName).then(() => {\r\n $animate.enter(content, $element);\r\n let contents = element.contents();\r\n angular.forEach(contents, content => {\r\n if(content.nodeType !== 3) { // 3 is a text node\r\n $compile(content)($scope);\r\n }\r\n });\r\n });\r\n }\r\n }, true);\r\n };\r\n }\r\n };\r\n });\r\n\r\n})(angular);\r\n","(angular => {\n 'use strict';\n\n angular.module('oc.lazyLoad').config($provide => {\n $provide.decorator('$ocLazyLoad', function($delegate, $q, $window, $interval) {\n var uaCssChecked = false,\n useCssLoadPatch = false,\n anchor = $window.document.getElementsByTagName('head')[0] || $window.document.getElementsByTagName('body')[0];\n\n /**\n * Load a js/css file\n * @param type\n * @param path\n * @param params\n * @returns promise\n */\n $delegate.buildElement = function buildElement(type, path, params) {\n var deferred = $q.defer(),\n el,\n loaded,\n filesCache = $delegate._getFilesCache(),\n cacheBuster = function cacheBuster(url) {\n var dc = new Date().getTime();\n if(url.indexOf('?') >= 0) {\n if(url.substring(0, url.length - 1) === '&') {\n return `${ url }_dc=${ dc }`;\n }\n return `${ url }&_dc=${ dc }`;\n } else {\n return `${ url }?_dc=${ dc }`;\n }\n };\n\n // Store the promise early so the file load can be detected by other parallel lazy loads\n // (ie: multiple routes on one page) a 'true' value isn't sufficient\n // as it causes false positive load results.\n if(angular.isUndefined(filesCache.get(path))) {\n filesCache.put(path, deferred.promise);\n }\n\n // Switch in case more content types are added later\n switch(type) {\n case 'css':\n el = $window.document.createElement('link');\n el.type = 'text/css';\n el.rel = 'stylesheet';\n el.href = params.cache === false ? cacheBuster(path) : path;\n break;\n case 'js':\n el = $window.document.createElement('script');\n el.src = params.cache === false ? cacheBuster(path) : path;\n break;\n default:\n filesCache.remove(path);\n deferred.reject(new Error(`Requested type \"${ type }\" is not known. Could not inject \"${ path }\"`));\n break;\n }\n el.onload = el['onreadystatechange'] = function(e) {\n if((el['readyState'] && !/^c|loade/.test(el['readyState'])) || loaded) return;\n el.onload = el['onreadystatechange'] = null;\n loaded = 1;\n $delegate._broadcast('ocLazyLoad.fileLoaded', path);\n deferred.resolve();\n };\n el.onerror = function() {\n filesCache.remove(path);\n deferred.reject(new Error(`Unable to load ${ path }`));\n };\n el.async = params.serie ? 0 : 1;\n\n var insertBeforeElem = anchor.lastChild;\n if(params.insertBefore) {\n var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n if(element && element.length > 0) {\n insertBeforeElem = element[0];\n }\n }\n insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n /*\n The event load or readystatechange doesn't fire in:\n - iOS < 6 (default mobile browser)\n - Android < 4.4 (default mobile browser)\n - Safari < 6 (desktop browser)\n */\n if(type == 'css') {\n if(!uaCssChecked) {\n var ua = $window.navigator.userAgent.toLowerCase();\n\n // iOS < 6\n if(/iP(hone|od|ad)/.test($window.navigator.platform)) {\n var v = ($window.navigator.appVersion).match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.'));\n useCssLoadPatch = iOSVersion < 6;\n } else if(ua.indexOf(\"android\") > -1) { // Android < 4.4\n var androidVersion = parseFloat(ua.slice(ua.indexOf(\"android\") + 8));\n useCssLoadPatch = androidVersion < 4.4;\n } else if(ua.indexOf('safari') > -1) {\n var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n useCssLoadPatch = (versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6);\n }\n }\n\n if(useCssLoadPatch) {\n var tries = 1000; // * 20 = 20000 miliseconds\n var interval = $interval(() => {\n try {\n el.sheet.cssRules;\n $interval.cancel(interval);\n el.onload();\n } catch(e) {\n if(--tries <= 0) {\n el.onerror();\n }\n }\n }, 20);\n }\n }\n\n return deferred.promise;\n };\n\n return $delegate;\n })\n });\n\n})(angular);\n","(angular => {\n 'use strict';\n\n angular.module('oc.lazyLoad').config(function($provide) {\n $provide.decorator('$ocLazyLoad', function($delegate, $q) {\n /**\n * The function that loads new files\n * @param config\n * @param params\n * @returns {*}\n */\n $delegate.filesLoader = function filesLoader(config, params = {}) {\n var cssFiles = [],\n templatesFiles = [],\n jsFiles = [],\n promises = [],\n cachePromise = null,\n filesCache = $delegate._getFilesCache();\n\n $delegate.toggleWatch(true); // start watching angular.module calls\n\n angular.extend(params, config);\n\n var pushFile = function(path) {\n var file_type = null, m;\n if(angular.isObject(path)) {\n file_type = path.type;\n path = path.path;\n }\n cachePromise = filesCache.get(path);\n if(angular.isUndefined(cachePromise) || params.cache === false) {\n\n // always check for requirejs syntax just in case\n if((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) { // Detect file type using preceding type declaration (ala requireJS)\n file_type = m[1];\n path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n }\n\n if(!file_type) {\n if((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) { // Detect file type via file extension\n file_type = m[1];\n } else if(!$delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader') && $delegate.jsLoader.hasOwnProperty('load')) { // requirejs\n file_type = 'js';\n } else {\n $delegate._$log.error(`File type could not be determined. ${ path }`);\n return;\n }\n }\n\n if((file_type === 'css' || file_type === 'less') && cssFiles.indexOf(path) === -1) {\n cssFiles.push(path);\n } else if((file_type === 'html' || file_type === 'htm') && templatesFiles.indexOf(path) === -1) {\n templatesFiles.push(path);\n } else if(file_type === 'js' || jsFiles.indexOf(path) === -1) {\n jsFiles.push(path);\n } else {\n $delegate._$log.error(`File type is not valid. ${ path }`);\n }\n\n } else if(cachePromise) {\n promises.push(cachePromise);\n }\n };\n\n if(params.serie) {\n pushFile(params.files.shift());\n } else {\n angular.forEach(params.files, path => {\n pushFile(path);\n });\n }\n\n if(cssFiles.length > 0) {\n var cssDeferred = $q.defer();\n $delegate.cssLoader(cssFiles, err => {\n if(angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n cssDeferred.reject(err);\n } else {\n cssDeferred.resolve();\n }\n }, params);\n promises.push(cssDeferred.promise);\n }\n\n if(templatesFiles.length > 0) {\n var templatesDeferred = $q.defer();\n $delegate.templatesLoader(templatesFiles, err => {\n if(angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n templatesDeferred.reject(err);\n } else {\n templatesDeferred.resolve();\n }\n }, params);\n promises.push(templatesDeferred.promise);\n }\n\n if(jsFiles.length > 0) {\n var jsDeferred = $q.defer();\n $delegate.jsLoader(jsFiles, err => {\n if(angular.isDefined(err) && $delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n jsDeferred.reject(err);\n } else {\n jsDeferred.resolve();\n }\n }, params);\n promises.push(jsDeferred.promise);\n }\n\n if(promises.length === 0) {\n let deferred = $q.defer(),\n err = \"Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.\";\n $delegate._$log.error(err);\n deferred.reject(err);\n return deferred.promise;\n } else if(params.serie && params.files.length > 0) {\n return $q.all(promises).then(() => $delegate.filesLoader(config, params));\n } else {\n return $q.all(promises).finally(res => {\n $delegate.toggleWatch(false); // stop watching angular.module calls\n return res;\n });\n }\n };\n\n /**\n * Load a module or a list of modules into Angular\n * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n * @param params Object optional parameters\n * @returns promise\n */\n $delegate.load = function(originalModule, originalParams = {}) {\n var self = this,\n config = null,\n deferredList = [],\n deferred = $q.defer(),\n errText;\n\n // clean copy\n var module = angular.copy(originalModule);\n var params = angular.copy(originalParams);\n\n // If module is an array, break it down\n if(angular.isArray(module)) {\n // Resubmit each entry as a single module\n angular.forEach(module, m => {\n deferredList.push(self.load(m, params));\n });\n\n // Resolve the promise once everything has loaded\n $q.all(deferredList).then(res => {\n deferred.resolve(res);\n }, err => {\n deferred.reject(err);\n });\n\n return deferred.promise;\n }\n\n // Get or Set a configuration depending on what was passed in\n if(angular.isString(module)) {\n config = self.getModuleConfig(module);\n if(!config) {\n config = {\n files: [module]\n };\n }\n } else if(angular.isObject(module)) {\n // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n if(angular.isDefined(module.path) && angular.isDefined(module.type)) {\n config = {\n files: [module]\n };\n } else {\n config = self.setModuleConfig(module);\n }\n }\n\n if(config === null) {\n var moduleName = self._getModuleName(module);\n errText = `Module \"${ moduleName || 'unknown' }\" is not configured, cannot load.`;\n $delegate._$log.error(errText);\n deferred.reject(new Error(errText));\n return deferred.promise;\n } else {\n // deprecated\n if(angular.isDefined(config.template)) {\n if(angular.isUndefined(config.files)) {\n config.files = [];\n }\n if(angular.isString(config.template)) {\n config.files.push(config.template);\n } else if(angular.isArray(config.template)) {\n config.files.concat(config.template);\n }\n }\n }\n\n var localParams = angular.extend({}, params, config);\n\n // if someone used an external loader and called the load function with just the module name\n if(angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n return $delegate.inject(config.name, localParams);\n }\n\n $delegate.filesLoader(config, localParams).then(() => {\n $delegate.inject(null, localParams).then(res => {\n deferred.resolve(res);\n }, err => {\n deferred.reject(err);\n });\n }, err => {\n deferred.reject(err);\n });\n\n return deferred.promise;\n };\n\n // return the patched service\n return $delegate;\n });\n });\n\n})(angular);\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').config(function($provide) {\r\n $provide.decorator('$ocLazyLoad', function ($delegate, $q) {\r\n /**\r\n * cssLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite cssLoader and it will probably not use promises :(\r\n */\r\n $delegate.cssLoader = function(paths, callback, params) {\r\n var promises = [];\r\n angular.forEach(paths, path => {\r\n promises.push($delegate.buildElement('css', path, params));\r\n });\r\n $q.all(promises).then(() => {\r\n callback();\r\n }, err => {\r\n callback(err);\r\n });\r\n };\r\n $delegate.cssLoader.ocLazyLoadLoader = true;\r\n\r\n return $delegate;\r\n })\r\n });\r\n\r\n})(angular);\r\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').config(function($provide) {\r\n $provide.decorator('$ocLazyLoad', function ($delegate, $q) {\r\n /**\r\n * jsLoader function\r\n * @type Function\r\n * @param paths array list of js files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite jsLoader and it will probably not use promises :(\r\n */\r\n $delegate.jsLoader = require;\r\n\r\n return $delegate;\r\n })\r\n });\r\n\r\n})(angular);\r\n","(angular => {\r\n 'use strict';\r\n\r\n angular.module('oc.lazyLoad').config(function($provide) {\r\n $provide.decorator('$ocLazyLoad', function ($delegate, $templateCache, $q, $http) {\r\n /**\r\n * templatesLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters for $http\r\n * because the user can overwrite templatesLoader and it will probably not use promises :(\r\n */\r\n $delegate.templatesLoader = function(paths, callback, params) {\r\n var promises = [],\r\n filesCache = $delegate._getFilesCache();\r\n\r\n angular.forEach(paths, url => {\r\n var deferred = $q.defer();\r\n promises.push(deferred.promise);\r\n $http.get(url, params).success(data => {\r\n if(angular.isString(data) && data.length > 0) {\r\n angular.forEach(angular.element(data), node => {\r\n if(node.nodeName === 'SCRIPT' && node.type === 'text/ng-template') {\r\n $templateCache.put(node.id, node.innerHTML);\r\n }\r\n });\r\n }\r\n if(angular.isUndefined(filesCache.get(url))) {\r\n filesCache.put(url, true);\r\n }\r\n deferred.resolve();\r\n }).error(function(err) {\r\n deferred.reject(new Error(`Unable to load template file \"${ url }\": ${ err }`));\r\n });\r\n });\r\n return $q.all(promises).then(() => {\r\n callback();\r\n }, err => {\r\n callback(err);\r\n });\r\n };\r\n $delegate.templatesLoader.ocLazyLoadLoader = true;\r\n\r\n return $delegate;\r\n })\r\n });\r\n\r\n})(angular);\r\n","// Array.indexOf polyfill for IE8\r\nif(!Array.prototype.indexOf) {\r\n Array.prototype.indexOf = function(searchElement, fromIndex) {\r\n var k;\r\n\r\n // 1. Let O be the result of calling ToObject passing\r\n // the this value as the argument.\r\n if(this == null) {\r\n throw new TypeError('\"this\" is null or not defined');\r\n }\r\n\r\n var O = Object(this);\r\n\r\n // 2. Let lenValue be the result of calling the Get\r\n // internal method of O with the argument \"length\".\r\n // 3. Let len be ToUint32(lenValue).\r\n var len = O.length >>> 0;\r\n\r\n // 4. If len is 0, return -1.\r\n if(len === 0) {\r\n return -1;\r\n }\r\n\r\n // 5. If argument fromIndex was passed let n be\r\n // ToInteger(fromIndex); else let n be 0.\r\n var n = +fromIndex || 0;\r\n\r\n if(Math.abs(n) === Infinity) {\r\n n = 0;\r\n }\r\n\r\n // 6. If n >= len, return -1.\r\n if(n >= len) {\r\n return -1;\r\n }\r\n\r\n // 7. If n >= 0, then Let k be n.\r\n // 8. Else, n<0, Let k be len - abs(n).\r\n // If k is less than 0, then let k be 0.\r\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\r\n\r\n // 9. Repeat, while k < len\r\n while(k < len) {\r\n // a. Let Pk be ToString(k).\r\n // This is implicit for LHS operands of the in operator\r\n // b. Let kPresent be the result of calling the\r\n // HasProperty internal method of O with argument Pk.\r\n // This step can be combined with c\r\n // c. If kPresent is true, then\r\n // i. Let elementK be the result of calling the Get\r\n // internal method of O with the argument ToString(k).\r\n // ii. Let same be the result of applying the\r\n // Strict Equality Comparison Algorithm to\r\n // searchElement and elementK.\r\n // iii. If same is true, return k.\r\n if(k in O && O[k] === searchElement) {\r\n return k;\r\n }\r\n k++;\r\n }\r\n return -1;\r\n };\r\n}\r\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/dist/ocLazyLoad.require.min.js b/dist/ocLazyLoad.require.min.js index d90c2b9..8347037 100644 --- a/dist/ocLazyLoad.require.min.js +++ b/dist/ocLazyLoad.require.min.js @@ -1,9 +1,9 @@ /** * oclazyload - Load modules on demand (lazy load) with angularJS - * @version v1.0.1 + * @version v1.0.2 * @link https://github.com/ocombe/ocLazyLoad * @license MIT * @author Olivier Combe */ -!function(e,n){"use strict";var r=["ng","oc.lazyLoad"],o={},t=[],i=[],a=[],s=e.noop,u={},c=[],d=e.module("oc.lazyLoad",["ng"]);d.provider("$ocLazyLoad",["$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider",function(d,l,p,g,m,v){function y(n,o,t){if(o){var i,a,d,l=[];for(i=o.length-1;i>=0;i--)if(a=o[i],e.isString(a)||(a=j(a)),a&&-1===c.indexOf(a)){var f=-1===r.indexOf(a);if(d=h(a),f&&(r.push(a),y(n,d.requires,t)),d._runBlocks.length>0)for(u[a]=[];d._runBlocks.length>0;)u[a].push(d._runBlocks.shift());e.isDefined(u[a])&&(f||t.rerun)&&(l=l.concat(u[a])),$(n,d._invokeQueue,a,t.reconfig),$(n,d._configBlocks,a,t.reconfig),s(f?"ocLazyLoad.moduleLoaded":"ocLazyLoad.moduleReloaded",a),o.pop(),c.push(a)}var p=n.getInstanceInjector();e.forEach(l,function(e){p.invoke(e)})}}function L(n,r){function t(n){return e.isArray(n)?D(n.toString()):e.isObject(n)?D(z(n)):e.isDefined(n)&&null!==n?D(n.toString()):n}var i=n[2][0],a=n[1],u=!1;e.isUndefined(o[r])&&(o[r]={}),e.isUndefined(o[r][a])&&(o[r][a]={});var c=function(e,n){o[r][a].hasOwnProperty(e)||(o[r][a][e]=[]),-1===o[r][a][e].indexOf(n)&&(u=!0,o[r][a][e].push(n),s("ocLazyLoad.componentLoaded",[r,a,e]))};if(e.isString(i))c(i,t(n[2][1]));else{if(!e.isObject(i))return!1;e.forEach(i,function(n,r){e.isString(n)?c(n,t(i[1])):c(r,t(n))})}return u}function $(n,r,o,i){if(r){var a,s,u,c;for(a=0,s=r.length;s>a;a++)if(u=r[a],e.isArray(u)){if(null!==n){if(!n.hasOwnProperty(u[0]))throw new Error("unsupported provider "+u[0]);c=n[u[0]]}var d=L(u,o);if("invoke"!==u[1])d&&e.isDefined(c)&&c[u[1]].apply(c,u[2]);else{var l=function(n){var r=t.indexOf(""+o+"-"+n);(-1===r||i)&&(-1===r&&t.push(""+o+"-"+n),e.isDefined(c)&&c[u[1]].apply(c,u[2]))};if(e.isFunction(u[2][0]))l(u[2][0]);else if(e.isArray(u[2][0]))for(var f=0,h=u[2][0].length;h>f;f++)e.isFunction(u[2][0][f])&&l(u[2][0][f])}}}}function j(n){var r=null;return e.isString(n)?r=n:e.isObject(n)&&n.hasOwnProperty("name")&&e.isString(n.name)&&(r=n.name),r}function E(n){if(!e.isString(n))return!1;try{return h(n)}catch(r){if(/No module/.test(r)||r.message.indexOf("$injector:nomod")>-1)return!1}}var _={},w={$controllerProvider:d,$compileProvider:p,$filterProvider:g,$provide:l,$injector:m,$animateProvider:v},x=!1,O=!1,b=[];b.push=function(e){-1===this.indexOf(e)&&Array.prototype.push.apply(this,arguments)},this.config=function(n){e.isDefined(n.modules)&&(e.isArray(n.modules)?e.forEach(n.modules,function(e){_[e.name]=e}):_[n.modules.name]=n.modules),e.isDefined(n.debug)&&(x=n.debug),e.isDefined(n.events)&&(O=n.events)},this._init=function(o){if(0===i.length){var t=[o],s=["ng:app","ng-app","x-ng-app","data-ng-app"],u=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/,c=function(e){return e&&t.push(e)};e.forEach(s,function(n){s[n]=!0,c(document.getElementById(n)),n=n.replace(":","\\:"),o[0].querySelectorAll&&(e.forEach(o[0].querySelectorAll("."+n),c),e.forEach(o[0].querySelectorAll("."+n+"\\:"),c),e.forEach(o[0].querySelectorAll("["+n+"]"),c))}),e.forEach(t,function(n){if(0===i.length){var r=" "+o.className+" ",t=u.exec(r);t?i.push((t[2]||"").replace(/\s+/g,",")):e.forEach(n.attributes,function(e){0===i.length&&s[e.name]&&i.push(e.value)})}})}0!==i.length||(n.jasmine||n.mocha)&&e.isDefined(e.mock)||console.error("No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.");var d=function l(n){if(-1===r.indexOf(n)){r.push(n);var o=e.module(n);$(null,o._invokeQueue,n),$(null,o._configBlocks,n),e.forEach(o.requires,l)}};e.forEach(i,function(e){d(e)}),i=[],a.pop()};var z=function(n){var r=[];return JSON.stringify(n,function(n,o){if(e.isObject(o)&&null!==o){if(-1!==r.indexOf(o))return;r.push(o)}return o})},D=function(e){var n,r,o,t=0;if(0==e.length)return t;for(n=0,o=e.length;o>n;n++)r=e.charCodeAt(n),t=(t<<5)-t+r,t|=0;return t};this.$get=["$log","$rootElement","$rootScope","$cacheFactory","$q",function(n,o,t,u,d){function l(e){var r=d.defer();return n.error(e.message),r.reject(e),r.promise}var p,g=u("ocLazyLoad");return x||(n={},n.error=e.noop,n.warn=e.noop,n.info=e.noop),w.getInstanceInjector=function(){return p?p:p=o.data("$injector")||e.injector()},s=function(e,r){O&&t.$broadcast(e,r),x&&n.info(e,r)},{_broadcast:s,_$log:n,_getFilesCache:function(){return g},toggleWatch:function(e){e?a.push(!0):a.pop()},getModuleConfig:function(n){if(!e.isString(n))throw new Error("You need to give the name of the module to get");return _[n]?e.copy(_[n]):null},setModuleConfig:function(n){if(!e.isObject(n))throw new Error("You need to give the module config object to set");return _[n.name]=n,n},getModules:function(){return r},isLoaded:function(n){var o=function(e){var n=r.indexOf(e)>-1;return n||(n=!!E(e)),n};if(e.isString(n)&&(n=[n]),e.isArray(n)){var t,i;for(t=0,i=n.length;i>t;t++)if(!o(n[t]))return!1;return!0}throw new Error("You need to define the module(s) name(s)")},_getModuleName:j,_getModule:function(e){try{return h(e)}catch(n){throw(/No module/.test(n)||n.message.indexOf("$injector:nomod")>-1)&&(n.message='The module "'+z(e)+'" that you are trying to load does not exist. '+n.message),n}},moduleExists:E,_loadDependencies:function(n,r){var o,t,i,a=[],s=this;if(n=s._getModuleName(n),null===n)return d.when();try{o=s._getModule(n)}catch(u){return l(u)}return t=s.getRequires(o),e.forEach(t,function(o){if(e.isString(o)){var t=s.getModuleConfig(o);if(null===t)return void b.push(o);o=t}if(s.moduleExists(o.name))return i=o.files.filter(function(e){return s.getModuleConfig(o.name).files.indexOf(e)<0}),0!==i.length&&s._$log.warn('Module "',n,'" attempted to redefine configuration for dependency. "',o.name,'"\n Additional Files Loaded:',i),e.isDefined(s.filesLoader)?void a.push(s.filesLoader(o,r).then(function(){return s._loadDependencies(o)})):l(new Error("Error: New dependencies need to be loaded from external files ("+o.files+"), but no loader has been defined."));if(e.isArray(o)?o={files:o}:e.isObject(o)&&o.hasOwnProperty("name")&&o.name&&(s.setModuleConfig(o),b.push(o.name)),e.isDefined(o.files)&&0!==o.files.length){if(!e.isDefined(s.filesLoader))return l(new Error('Error: the module "'+o.name+'" is defined in external files ('+o.files+"), but no loader has been defined."));a.push(s.filesLoader(o,r).then(function(){return s._loadDependencies(o)}))}}),d.all(a)},inject:function(n){var r=void 0===arguments[1]?{}:arguments[1],o=this,t=d.defer();if(e.isDefined(n)&&null!==n){if(e.isArray(n)){var a=[];return e.forEach(n,function(e){a.push(o.inject(e))}),d.all(a)}o._addToLoadList(o._getModuleName(n),!0)}if(i.length>0){var s=i.slice(),u=function l(e){b.push(e),o._loadDependencies(e,r).then(function(){try{c=[],y(w,b,r)}catch(e){return o._$log.error(e.message),void t.reject(e)}i.length>0?l(i.shift()):t.resolve(s)},function(e){t.reject(e)})};u(i.shift())}else t.resolve();return t.promise},getRequires:function(n){var o=[];return e.forEach(n.requires,function(e){-1===r.indexOf(e)&&o.push(e)}),o},_invokeQueue:$,_registerInvokeList:L,_register:y,_addToLoadList:f}}],this._init(e.element(n.document))}]);var l=e.bootstrap;e.bootstrap=function(n,r,o){return e.forEach(r.slice(),function(e){f(e,!0)}),l(n,r,o)};var f=function(n,r){(a.length>0||r)&&e.isString(n)&&-1===i.indexOf(n)&&i.push(n)},h=e.module;e.module=function(e,n,r){return f(e),h(e,n,r)},"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="oc.lazyLoad")}(angular,window),function(e){"use strict";e.module("oc.lazyLoad").directive("ocLazyLoad",["$ocLazyLoad","$compile","$animate","$parse",function(n,r,o,t){return{restrict:"A",terminal:!0,priority:1e3,compile:function(i,a){var s=i[0].innerHTML;return i.html(""),function(a,u,c){var d=t(c.ocLazyLoad);a.$watch(function(){return d(a)||c.ocLazyLoad},function(t){e.isDefined(t)&&n.load(t).then(function(){o.enter(s,u);var n=i.contents();e.forEach(n,function(e){3!==e.nodeType&&r(e)(a)})})},!0)}}}}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q","$window","$interval",function(n,r,o,t){var i=!1,a=!1,s=o.document.getElementsByTagName("head")[0]||o.document.getElementsByTagName("body")[0];return n.buildElement=function(u,c,d){var l,f,h=r.defer(),p=n._getFilesCache(),g=function(e){var n=(new Date).getTime();return e.indexOf("?")>=0?"&"===e.substring(0,e.length-1)?""+e+"_dc="+n:""+e+"&_dc="+n:""+e+"?_dc="+n};switch(e.isUndefined(p.get(c))&&p.put(c,h.promise),u){case"css":l=o.document.createElement("link"),l.type="text/css",l.rel="stylesheet",l.href=d.cache===!1?g(c):c;break;case"js":l=o.document.createElement("script"),l.src=d.cache===!1?g(c):c;break;default:p.remove(c),h.reject(new Error('Requested type "'+u+'" is not known. Could not inject "'+c+'"'))}l.onload=l.onreadystatechange=function(e){l.readyState&&!/^c|loade/.test(l.readyState)||f||(l.onload=l.onreadystatechange=null,f=1,n._broadcast("ocLazyLoad.fileLoaded",c),h.resolve())},l.onerror=function(){p.remove(c),h.reject(new Error("Unable to load "+c))},l.async=d.serie?0:1;var m=s.lastChild;if(d.insertBefore){var v=e.element(e.isDefined(window.jQuery)?d.insertBefore:document.querySelector(d.insertBefore));v&&v.length>0&&(m=v[0])}if(m.parentNode.insertBefore(l,m),"css"==u){if(!i){var y=o.navigator.userAgent.toLowerCase();if(/iP(hone|od|ad)/.test(o.navigator.platform)){var L=o.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),$=parseFloat([parseInt(L[1],10),parseInt(L[2],10),parseInt(L[3]||0,10)].join("."));a=6>$}else if(y.indexOf("android")>-1){var j=parseFloat(y.slice(y.indexOf("android")+8));a=4.4>j}else if(y.indexOf("safari")>-1){var E=y.match(/version\/([\.\d]+)/i);a=E&&E[1]&&parseFloat(E[1])<6}}if(a)var _=1e3,w=t(function(){try{l.sheet.cssRules,t.cancel(w),l.onload()}catch(e){--_<=0&&l.onerror()}},20)}return h.promise},n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q",function(n,r){return n.filesLoader=function(o){var t=void 0===arguments[1]?{}:arguments[1],i=[],a=[],s=[],u=[],c=null,d=n._getFilesCache();n.toggleWatch(!0),e.extend(t,o);var l=function(r){var o,l=null;if(e.isObject(r)&&(l=r.type,r=r.path),c=d.get(r),e.isUndefined(c)||t.cache===!1){if(null!==(o=/^(css|less|html|htm|js)?(?=!)/.exec(r))&&(l=o[1],r=r.substr(o[1].length+1,r.length)),!l)if(null!==(o=/[.](css|less|html|htm|js)?((\?|#).*)?$/.exec(r)))l=o[1];else{if(n.jsLoader.hasOwnProperty("ocLazyLoadLoader")||!n.jsLoader.hasOwnProperty("load"))return void n._$log.error("File type could not be determined. "+r);l="js"}"css"!==l&&"less"!==l||-1!==i.indexOf(r)?"html"!==l&&"htm"!==l||-1!==a.indexOf(r)?"js"===l||-1===s.indexOf(r)?s.push(r):n._$log.error("File type is not valid. "+r):a.push(r):i.push(r)}else c&&u.push(c)};if(t.serie?l(t.files.shift()):e.forEach(t.files,function(e){l(e)}),i.length>0){var f=r.defer();n.cssLoader(i,function(r){e.isDefined(r)&&n.cssLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(r),f.reject(r)):f.resolve()},t),u.push(f.promise)}if(a.length>0){var h=r.defer();n.templatesLoader(a,function(r){e.isDefined(r)&&n.templatesLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(r),h.reject(r)):h.resolve()},t),u.push(h.promise)}if(s.length>0){var p=r.defer();n.jsLoader(s,function(r){e.isDefined(r)&&n.jsLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(r),p.reject(r)):p.resolve()},t),u.push(p.promise)}if(0===u.length){var g=r.defer(),m="Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.";return n._$log.error(m),g.reject(m),g.promise}return t.serie&&t.files.length>0?r.all(u).then(function(){return n.filesLoader(o,t)}):r.all(u)["finally"](function(e){return n.toggleWatch(!1),e})},n.load=function(o){var t,i=void 0===arguments[1]?{}:arguments[1],a=this,s=null,u=[],c=r.defer(),d=e.copy(o),l=e.copy(i);if(e.isArray(d))return e.forEach(d,function(e){u.push(a.load(e,l))}),r.all(u).then(function(e){c.resolve(e)},function(e){c.reject(e)}),c.promise;if(e.isString(d)?(s=a.getModuleConfig(d),s||(s={files:[d]})):e.isObject(d)&&(s=e.isDefined(d.path)&&e.isDefined(d.type)?{files:[d]}:a.setModuleConfig(d)),null===s){var f=a._getModuleName(d);return t='Module "'+(f||"unknown")+'" is not configured, cannot load.',n._$log.error(t),c.reject(new Error(t)),c.promise}e.isDefined(s.template)&&(e.isUndefined(s.files)&&(s.files=[]),e.isString(s.template)?s.files.push(s.template):e.isArray(s.template)&&s.files.concat(s.template));var h=e.extend({},l,s);return e.isUndefined(s.files)&&e.isDefined(s.name)&&n.moduleExists(s.name)?n.inject(s.name,h):(n.filesLoader(s,h).then(function(){n.inject(null,h).then(function(e){c.resolve(e)},function(e){c.reject(e)})},function(e){c.reject(e)}),c.promise)},n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q",function(n,r){return n.cssLoader=function(o,t,i){var a=[];e.forEach(o,function(e){a.push(n.buildElement("css",e,i))}),r.all(a).then(function(){t()},function(e){t(e)})},n.cssLoader.ocLazyLoadLoader=!0,n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(e){e.decorator("$ocLazyLoad",["$delegate","$q",function(e,n){return e.jsLoader=require,e}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$templateCache","$q","$http",function(n,r,o,t){return n.templatesLoader=function(i,a,s){var u=[],c=n._getFilesCache();return e.forEach(i,function(n){var i=o.defer();u.push(i.promise),t.get(n,s).success(function(o){e.isString(o)&&o.length>0&&e.forEach(e.element(o),function(e){"SCRIPT"===e.nodeName&&"text/ng-template"===e.type&&r.put(e.id,e.innerHTML)}),e.isUndefined(c.get(n))&&c.put(n,!0),i.resolve()}).error(function(e){i.reject(new Error('Unable to load template file "'+n+'": '+e))})}),o.all(u).then(function(){a()},function(e){a(e)})},n.templatesLoader.ocLazyLoadLoader=!0,n}])}])}(angular),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,n){var r;if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),t=o.length>>>0;if(0===t)return-1;var i=+n||0;if(Math.abs(i)===1/0&&(i=0),i>=t)return-1;for(r=Math.max(i>=0?i:t-Math.abs(i),0);t>r;){if(r in o&&o[r]===e)return r;r++}return-1}); +!function(e,n){"use strict";var r=["ng","oc.lazyLoad"],o={},t=[],i=[],a=[],s=e.noop,u={},c=[],d=e.module("oc.lazyLoad",["ng"]);d.provider("$ocLazyLoad",["$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider",function(d,l,p,g,m,v){function y(n,o,t){if(o){var i,a,d,l=[];for(i=o.length-1;i>=0;i--)if(a=o[i],e.isString(a)||(a=j(a)),a&&-1===c.indexOf(a)){var f=-1===r.indexOf(a);if(d=h(a),f&&(r.push(a),y(n,d.requires,t)),d._runBlocks.length>0)for(u[a]=[];d._runBlocks.length>0;)u[a].push(d._runBlocks.shift());e.isDefined(u[a])&&(f||t.rerun)&&(l=l.concat(u[a])),$(n,d._invokeQueue,a,t.reconfig),$(n,d._configBlocks,a,t.reconfig),s(f?"ocLazyLoad.moduleLoaded":"ocLazyLoad.moduleReloaded",a),o.pop(),c.push(a)}var p=n.getInstanceInjector();e.forEach(l,function(e){p.invoke(e)})}}function L(n,r){function t(n){return e.isArray(n)?D(n.toString()):e.isObject(n)?D(z(n)):e.isDefined(n)&&null!==n?D(n.toString()):n}var i=n[2][0],a=n[1],u=!1;e.isUndefined(o[r])&&(o[r]={}),e.isUndefined(o[r][a])&&(o[r][a]={});var c=function(e,n){o[r][a].hasOwnProperty(e)||(o[r][a][e]=[]),-1===o[r][a][e].indexOf(n)&&(u=!0,o[r][a][e].push(n),s("ocLazyLoad.componentLoaded",[r,a,e]))};if(e.isString(i))c(i,t(n[2][1]));else{if(!e.isObject(i))return!1;e.forEach(i,function(n,r){e.isString(n)?c(n,t(i[1])):c(r,t(n))})}return u}function $(n,r,o,i){if(r){var a,s,u,c;for(a=0,s=r.length;s>a;a++)if(u=r[a],e.isArray(u)){if(null!==n){if(!n.hasOwnProperty(u[0]))throw new Error("unsupported provider "+u[0]);c=n[u[0]]}var d=L(u,o);if("invoke"!==u[1])d&&e.isDefined(c)&&c[u[1]].apply(c,u[2]);else{var l=function(n){var r=t.indexOf(""+o+"-"+n);(-1===r||i)&&(-1===r&&t.push(""+o+"-"+n),e.isDefined(c)&&c[u[1]].apply(c,u[2]))};if(e.isFunction(u[2][0]))l(u[2][0]);else if(e.isArray(u[2][0]))for(var f=0,h=u[2][0].length;h>f;f++)e.isFunction(u[2][0][f])&&l(u[2][0][f])}}}}function j(n){var r=null;return e.isString(n)?r=n:e.isObject(n)&&n.hasOwnProperty("name")&&e.isString(n.name)&&(r=n.name),r}function E(n){if(!e.isString(n))return!1;try{return h(n)}catch(r){if(/No module/.test(r)||r.message.indexOf("$injector:nomod")>-1)return!1}}var _={},w={$controllerProvider:d,$compileProvider:p,$filterProvider:g,$provide:l,$injector:m,$animateProvider:v},x=!1,O=!1,b=[];b.push=function(e){-1===this.indexOf(e)&&Array.prototype.push.apply(this,arguments)},this.config=function(n){e.isDefined(n.modules)&&(e.isArray(n.modules)?e.forEach(n.modules,function(e){_[e.name]=e}):_[n.modules.name]=n.modules),e.isDefined(n.debug)&&(x=n.debug),e.isDefined(n.events)&&(O=n.events)},this._init=function(o){if(0===i.length){var t=[o],s=["ng:app","ng-app","x-ng-app","data-ng-app"],u=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/,c=function(e){return e&&t.push(e)};e.forEach(s,function(n){s[n]=!0,c(document.getElementById(n)),n=n.replace(":","\\:"),"undefined"!=typeof o[0]&&o[0].querySelectorAll&&(e.forEach(o[0].querySelectorAll("."+n),c),e.forEach(o[0].querySelectorAll("."+n+"\\:"),c),e.forEach(o[0].querySelectorAll("["+n+"]"),c))}),e.forEach(t,function(n){if(0===i.length){var r=" "+o.className+" ",t=u.exec(r);t?i.push((t[2]||"").replace(/\s+/g,",")):e.forEach(n.attributes,function(e){0===i.length&&s[e.name]&&i.push(e.value)})}})}0!==i.length||(n.jasmine||n.mocha)&&e.isDefined(e.mock)||console.error("No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.");var d=function l(n){if(-1===r.indexOf(n)){r.push(n);var o=e.module(n);$(null,o._invokeQueue,n),$(null,o._configBlocks,n),e.forEach(o.requires,l)}};e.forEach(i,function(e){d(e)}),i=[],a.pop()};var z=function(n){var r=[];return JSON.stringify(n,function(n,o){if(e.isObject(o)&&null!==o){if(-1!==r.indexOf(o))return;r.push(o)}return o})},D=function(e){var n,r,o,t=0;if(0==e.length)return t;for(n=0,o=e.length;o>n;n++)r=e.charCodeAt(n),t=(t<<5)-t+r,t|=0;return t};this.$get=["$log","$rootElement","$rootScope","$cacheFactory","$q",function(n,o,t,u,d){function l(e){var r=d.defer();return n.error(e.message),r.reject(e),r.promise}var p,g=u("ocLazyLoad");return x||(n={},n.error=e.noop,n.warn=e.noop,n.info=e.noop),w.getInstanceInjector=function(){return p?p:p=o.data("$injector")||e.injector()},s=function(e,r){O&&t.$broadcast(e,r),x&&n.info(e,r)},{_broadcast:s,_$log:n,_getFilesCache:function(){return g},toggleWatch:function(e){e?a.push(!0):a.pop()},getModuleConfig:function(n){if(!e.isString(n))throw new Error("You need to give the name of the module to get");return _[n]?e.copy(_[n]):null},setModuleConfig:function(n){if(!e.isObject(n))throw new Error("You need to give the module config object to set");return _[n.name]=n,n},getModules:function(){return r},isLoaded:function(n){var o=function(e){var n=r.indexOf(e)>-1;return n||(n=!!E(e)),n};if(e.isString(n)&&(n=[n]),e.isArray(n)){var t,i;for(t=0,i=n.length;i>t;t++)if(!o(n[t]))return!1;return!0}throw new Error("You need to define the module(s) name(s)")},_getModuleName:j,_getModule:function(e){try{return h(e)}catch(n){throw(/No module/.test(n)||n.message.indexOf("$injector:nomod")>-1)&&(n.message='The module "'+z(e)+'" that you are trying to load does not exist. '+n.message),n}},moduleExists:E,_loadDependencies:function(n,r){var o,t,i,a=[],s=this;if(n=s._getModuleName(n),null===n)return d.when();try{o=s._getModule(n)}catch(u){return l(u)}return t=s.getRequires(o),e.forEach(t,function(o){if(e.isString(o)){var t=s.getModuleConfig(o);if(null===t)return void b.push(o);o=t}if(s.moduleExists(o.name))return i=o.files.filter(function(e){return s.getModuleConfig(o.name).files.indexOf(e)<0}),0!==i.length&&s._$log.warn('Module "',n,'" attempted to redefine configuration for dependency. "',o.name,'"\n Additional Files Loaded:',i),e.isDefined(s.filesLoader)?void a.push(s.filesLoader(o,r).then(function(){return s._loadDependencies(o)})):l(new Error("Error: New dependencies need to be loaded from external files ("+o.files+"), but no loader has been defined."));if(e.isArray(o)?o={files:o}:e.isObject(o)&&o.hasOwnProperty("name")&&o.name&&(s.setModuleConfig(o),b.push(o.name)),e.isDefined(o.files)&&0!==o.files.length){if(!e.isDefined(s.filesLoader))return l(new Error('Error: the module "'+o.name+'" is defined in external files ('+o.files+"), but no loader has been defined."));a.push(s.filesLoader(o,r).then(function(){return s._loadDependencies(o)}))}}),d.all(a)},inject:function(n){var r=void 0===arguments[1]?{}:arguments[1],o=this,t=d.defer();if(e.isDefined(n)&&null!==n){if(e.isArray(n)){var a=[];return e.forEach(n,function(e){a.push(o.inject(e))}),d.all(a)}o._addToLoadList(o._getModuleName(n),!0)}if(i.length>0){var s=i.slice(),u=function l(e){b.push(e),o._loadDependencies(e,r).then(function(){try{c=[],y(w,b,r)}catch(e){return o._$log.error(e.message),void t.reject(e)}i.length>0?l(i.shift()):t.resolve(s)},function(e){t.reject(e)})};u(i.shift())}else t.resolve();return t.promise},getRequires:function(n){var o=[];return e.forEach(n.requires,function(e){-1===r.indexOf(e)&&o.push(e)}),o},_invokeQueue:$,_registerInvokeList:L,_register:y,_addToLoadList:f}}],this._init(e.element(n.document))}]);var l=e.bootstrap;e.bootstrap=function(n,r,o){return e.forEach(r.slice(),function(e){f(e,!0)}),l(n,r,o)};var f=function(n,r){(a.length>0||r)&&e.isString(n)&&-1===i.indexOf(n)&&i.push(n)},h=e.module;e.module=function(e,n,r){return f(e),h(e,n,r)},"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="oc.lazyLoad")}(angular,window),function(e){"use strict";e.module("oc.lazyLoad").directive("ocLazyLoad",["$ocLazyLoad","$compile","$animate","$parse",function(n,r,o,t){return{restrict:"A",terminal:!0,priority:1e3,compile:function(i,a){var s=i[0].innerHTML;return i.html(""),function(a,u,c){var d=t(c.ocLazyLoad);a.$watch(function(){return d(a)||c.ocLazyLoad},function(t){e.isDefined(t)&&n.load(t).then(function(){o.enter(s,u);var n=i.contents();e.forEach(n,function(e){3!==e.nodeType&&r(e)(a)})})},!0)}}}}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q","$window","$interval",function(n,r,o,t){var i=!1,a=!1,s=o.document.getElementsByTagName("head")[0]||o.document.getElementsByTagName("body")[0];return n.buildElement=function(u,c,d){var l,f,h=r.defer(),p=n._getFilesCache(),g=function(e){var n=(new Date).getTime();return e.indexOf("?")>=0?"&"===e.substring(0,e.length-1)?""+e+"_dc="+n:""+e+"&_dc="+n:""+e+"?_dc="+n};switch(e.isUndefined(p.get(c))&&p.put(c,h.promise),u){case"css":l=o.document.createElement("link"),l.type="text/css",l.rel="stylesheet",l.href=d.cache===!1?g(c):c;break;case"js":l=o.document.createElement("script"),l.src=d.cache===!1?g(c):c;break;default:p.remove(c),h.reject(new Error('Requested type "'+u+'" is not known. Could not inject "'+c+'"'))}l.onload=l.onreadystatechange=function(e){l.readyState&&!/^c|loade/.test(l.readyState)||f||(l.onload=l.onreadystatechange=null,f=1,n._broadcast("ocLazyLoad.fileLoaded",c),h.resolve())},l.onerror=function(){p.remove(c),h.reject(new Error("Unable to load "+c))},l.async=d.serie?0:1;var m=s.lastChild;if(d.insertBefore){var v=e.element(e.isDefined(window.jQuery)?d.insertBefore:document.querySelector(d.insertBefore));v&&v.length>0&&(m=v[0])}if(m.parentNode.insertBefore(l,m),"css"==u){if(!i){var y=o.navigator.userAgent.toLowerCase();if(/iP(hone|od|ad)/.test(o.navigator.platform)){var L=o.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),$=parseFloat([parseInt(L[1],10),parseInt(L[2],10),parseInt(L[3]||0,10)].join("."));a=6>$}else if(y.indexOf("android")>-1){var j=parseFloat(y.slice(y.indexOf("android")+8));a=4.4>j}else if(y.indexOf("safari")>-1){var E=y.match(/version\/([\.\d]+)/i);a=E&&E[1]&&parseFloat(E[1])<6}}if(a)var _=1e3,w=t(function(){try{l.sheet.cssRules,t.cancel(w),l.onload()}catch(e){--_<=0&&l.onerror()}},20)}return h.promise},n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q",function(n,r){return n.filesLoader=function(o){var t=void 0===arguments[1]?{}:arguments[1],i=[],a=[],s=[],u=[],c=null,d=n._getFilesCache();n.toggleWatch(!0),e.extend(t,o);var l=function(r){var o,l=null;if(e.isObject(r)&&(l=r.type,r=r.path),c=d.get(r),e.isUndefined(c)||t.cache===!1){if(null!==(o=/^(css|less|html|htm|js)?(?=!)/.exec(r))&&(l=o[1],r=r.substr(o[1].length+1,r.length)),!l)if(null!==(o=/[.](css|less|html|htm|js)?((\?|#).*)?$/.exec(r)))l=o[1];else{if(n.jsLoader.hasOwnProperty("ocLazyLoadLoader")||!n.jsLoader.hasOwnProperty("load"))return void n._$log.error("File type could not be determined. "+r);l="js"}"css"!==l&&"less"!==l||-1!==i.indexOf(r)?"html"!==l&&"htm"!==l||-1!==a.indexOf(r)?"js"===l||-1===s.indexOf(r)?s.push(r):n._$log.error("File type is not valid. "+r):a.push(r):i.push(r)}else c&&u.push(c)};if(t.serie?l(t.files.shift()):e.forEach(t.files,function(e){l(e)}),i.length>0){var f=r.defer();n.cssLoader(i,function(r){e.isDefined(r)&&n.cssLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(r),f.reject(r)):f.resolve()},t),u.push(f.promise)}if(a.length>0){var h=r.defer();n.templatesLoader(a,function(r){e.isDefined(r)&&n.templatesLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(r),h.reject(r)):h.resolve()},t),u.push(h.promise)}if(s.length>0){var p=r.defer();n.jsLoader(s,function(r){e.isDefined(r)&&n.jsLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(r),p.reject(r)):p.resolve()},t),u.push(p.promise)}if(0===u.length){var g=r.defer(),m="Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.";return n._$log.error(m),g.reject(m),g.promise}return t.serie&&t.files.length>0?r.all(u).then(function(){return n.filesLoader(o,t)}):r.all(u)["finally"](function(e){return n.toggleWatch(!1),e})},n.load=function(o){var t,i=void 0===arguments[1]?{}:arguments[1],a=this,s=null,u=[],c=r.defer(),d=e.copy(o),l=e.copy(i);if(e.isArray(d))return e.forEach(d,function(e){u.push(a.load(e,l))}),r.all(u).then(function(e){c.resolve(e)},function(e){c.reject(e)}),c.promise;if(e.isString(d)?(s=a.getModuleConfig(d),s||(s={files:[d]})):e.isObject(d)&&(s=e.isDefined(d.path)&&e.isDefined(d.type)?{files:[d]}:a.setModuleConfig(d)),null===s){var f=a._getModuleName(d);return t='Module "'+(f||"unknown")+'" is not configured, cannot load.',n._$log.error(t),c.reject(new Error(t)),c.promise}e.isDefined(s.template)&&(e.isUndefined(s.files)&&(s.files=[]),e.isString(s.template)?s.files.push(s.template):e.isArray(s.template)&&s.files.concat(s.template));var h=e.extend({},l,s);return e.isUndefined(s.files)&&e.isDefined(s.name)&&n.moduleExists(s.name)?n.inject(s.name,h):(n.filesLoader(s,h).then(function(){n.inject(null,h).then(function(e){c.resolve(e)},function(e){c.reject(e)})},function(e){c.reject(e)}),c.promise)},n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q",function(n,r){return n.cssLoader=function(o,t,i){var a=[];e.forEach(o,function(e){a.push(n.buildElement("css",e,i))}),r.all(a).then(function(){t()},function(e){t(e)})},n.cssLoader.ocLazyLoadLoader=!0,n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(e){e.decorator("$ocLazyLoad",["$delegate","$q",function(e,n){return e.jsLoader=require,e}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$templateCache","$q","$http",function(n,r,o,t){return n.templatesLoader=function(i,a,s){var u=[],c=n._getFilesCache();return e.forEach(i,function(n){var i=o.defer();u.push(i.promise),t.get(n,s).success(function(o){e.isString(o)&&o.length>0&&e.forEach(e.element(o),function(e){"SCRIPT"===e.nodeName&&"text/ng-template"===e.type&&r.put(e.id,e.innerHTML)}),e.isUndefined(c.get(n))&&c.put(n,!0),i.resolve()}).error(function(e){i.reject(new Error('Unable to load template file "'+n+'": '+e))})}),o.all(u).then(function(){a()},function(e){a(e)})},n.templatesLoader.ocLazyLoadLoader=!0,n}])}])}(angular),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,n){var r;if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),t=o.length>>>0;if(0===t)return-1;var i=+n||0;if(Math.abs(i)===1/0&&(i=0),i>=t)return-1;for(r=Math.max(i>=0?i:t-Math.abs(i),0);t>r;){if(r in o&&o[r]===e)return r;r++}return-1}); //# sourceMappingURL=ocLazyLoad.require.min.js.map \ No newline at end of file diff --git a/dist/ocLazyLoad.require.min.js.map b/dist/ocLazyLoad.require.min.js.map index 2b0b914..7232316 100644 --- a/dist/ocLazyLoad.require.min.js.map +++ b/dist/ocLazyLoad.require.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["ocLazyLoad.require.js"],"names":["angular","window","regModules","regInvokes","regConfigs","modulesToLoad","recordDeclarations","broadcast","noop","runBlocks","justLoaded","ocLazyLoad","module","provider","$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider","_register","providers","registerModules","params","k","moduleName","moduleFn","tempRunBlocks","length","isString","getModuleName","indexOf","newModule","ngModuleFct","push","requires","_runBlocks","shift","isDefined","rerun","concat","_invokeQueue","reconfig","_configBlocks","pop","instanceInjector","getInstanceInjector","forEach","fn","invoke","_registerInvokeList","args","signature","data","isArray","hashCode","toString","isObject","stringify","invokeList","type","newInvoke","isUndefined","onInvoke","invokeName","hasOwnProperty","key","queue","i","len","Error","isNew","apply","callInvoke","fct","invoked","isFunction","j","jlen","name","moduleExists","e","test","message","modules","debug","events","moduleCache","value","this","Array","prototype","arguments","config","moduleConfig","_init","element","elements","names","NG_APP_CLASS_REGEXP","append","elm","document","getElementById","replace","querySelectorAll","className","match","exec","attributes","attr","jasmine","mocha","mock","console","error","addReg","mainModule","obj","cache","JSON","str","chr","hash","charCodeAt","$get","$log","$rootElement","$rootScope","$cacheFactory","$q","reject","deferred","defer","promise","filesCache","injector","eventName","$broadcast","info","_broadcast","_$log","_getFilesCache","toggleWatch","watch","getModuleConfig","copy","setModuleConfig","getModules","isLoaded","modulesNames","moduleLoaded","_getModuleName","_getModule","_loadDependencies","localParams","loadedModule","diff","promisesList","self","when","getRequires","requireEntry","files","filter","n","warn","filesLoader","then","all","inject","undefined","_addToLoadList","res","slice","loadNext","resolve","err","requireModule","bootstrapFct","bootstrap","force","configFn","exports","directive","$ocLazyLoad","$compile","$animate","$parse","restrict","terminal","priority","compile","attrs","content","innerHTML","html","$scope","$element","$attr","model","$watch","load","enter","contents","nodeType","decorator","$delegate","$window","$interval","uaCssChecked","useCssLoadPatch","anchor","getElementsByTagName","buildElement","path","el","loaded","cacheBuster","url","dc","Date","getTime","substring","get","put","createElement","rel","href","src","remove","onload","onerror","async","serie","insertBeforeElem","lastChild","insertBefore","jQuery","querySelector","parentNode","ua","navigator","userAgent","toLowerCase","platform","v","appVersion","iOSVersion","parseFloat","parseInt","join","androidVersion","versionMatch","tries","interval","sheet","cssRules","cancel","cssFiles","templatesFiles","jsFiles","promises","cachePromise","extend","pushFile","m","file_type","substr","jsLoader","cssDeferred","cssLoader","templatesDeferred","templatesLoader","jsDeferred","originalModule","errText","originalParams","deferredList","template","paths","callback","ocLazyLoadLoader","require","$templateCache","$http","success","node","nodeName","id","searchElement","fromIndex","TypeError","O","Object","Math","abs","Infinity","max"],"mappings":"CAOA,SAAWA,EAASC,GAChB,YAEA,IAAIC,IAAc,KAAM,eACpBC,KACAC,KACAC,KACAC,KACAC,EAAYP,EAAQQ,KACpBC,KACAC,KAEAC,EAAaX,EAAQY,OAAO,eAAgB,MAEhDD,GAAWE,SAAS,eAAgB,sBAAuB,WAAY,mBAAoB,kBAAmB,YAAa,mBAAoB,SAAUC,EAAqBC,EAAUC,EAAkBC,EAAiBC,EAAWC,GAgJlO,QAASC,GAAUC,EAAWC,EAAiBC,GAC3C,GAAID,EAAiB,CACjB,GAAIE,GACAC,EACAC,EACAC,IACJ,KAAKH,EAAIF,EAAgBM,OAAS,EAAGJ,GAAK,EAAGA,IAKzC,GAJAC,EAAaH,EAAgBE,GACxBxB,EAAQ6B,SAASJ,KAClBA,EAAaK,EAAcL,IAE1BA,GAAiD,KAAnCf,EAAWqB,QAAQN,GAAtC,CAGA,GAAIO,GAA+C,KAAnC9B,EAAW6B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EAAKpM,GAAQuQ,QAAQ,SAAUzO,GACjCrD,EAAQ6B,SAASwB,IAASA,EAAKzB,OAAS,GACxC5B,EAAQ+C,QAAQ/C,EAAQgG,QAAQ3C,GAAO,SAAU0O,GACvB,WAAlBA,EAAKC,UAAuC,qBAAdD,EAAKnO,MACnCgO,EAAe3D,IAAI8D,EAAKE,GAAIF,EAAK5F,aAIzCnM,EAAQ8D,YAAYyE,EAAWyF,IAAIL,KACnCpF,EAAW0F,IAAIN,GAAK,GAExBvF,EAAS4C,YACV7D,MAAM,SAAU8D,GACf7C,EAASD,OAAO,GAAI7D,OAAM,iCAAmCqJ,EAAM,MAAQ1C,QAG5E/C,EAAGuC,IAAI6F,GAAU9F,KAAK,WACzBiH,KACD,SAAUxG,GACTwG,EAASxG,MAGjB8B,EAAUkE,gBAAgBS,kBAAmB,EAEtC3E,SAGhB/M,SAEE0F,MAAMC,UAAU5D,UACb2D,MAAMC,UAAU5D,QAAU,SAAUmQ,EAAeC,GAC3C,GAAI3Q,EAIJ,IAAY,MAARiE,KACI,KAAM,IAAI2M,WAAU,gCAG5B,IAAIC,GAAIC,OAAO7M,MAKXpB,EAAMgO,EAAEzQ,SAAW,CAGvB,IAAY,IAARyC,EACI,MAAO,EAKf,IAAIgG,IAAK8H,GAAa,CAOtB,IALII,KAAKC,IAAInI,KAAOoI,EAAAA,IACZpI,EAAI,GAIRA,GAAKhG,EACD,MAAO,EASf,KAHA7C,EAAI+Q,KAAKG,IAAIrI,GAAK,EAAIA,EAAIhG,EAAMkO,KAAKC,IAAInI,GAAI,GAGlChG,EAAJ7C,GAAS,CAaR,GAAIA,IAAK6Q,IAAKA,EAAE7Q,KAAO0Q,EACf,MAAO1Q,EAEfA,KAER,MAAO","file":"ocLazyLoad.require.min.js","sourcesContent":["/**\n * oclazyload - Load modules on demand (lazy load) with angularJS\n * @version v1.0.1\n * @link https://github.com/ocombe/ocLazyLoad\n * @license MIT\n * @author Olivier Combe \n */\n(function (angular, window) {\n 'use strict';\n\n var regModules = ['ng', 'oc.lazyLoad'],\n regInvokes = {},\n regConfigs = [],\n modulesToLoad = [],\n recordDeclarations = [],\n broadcast = angular.noop,\n runBlocks = {},\n justLoaded = [];\n\n var ocLazyLoad = angular.module('oc.lazyLoad', ['ng']);\n\n ocLazyLoad.provider('$ocLazyLoad', [\"$controllerProvider\", \"$provide\", \"$compileProvider\", \"$filterProvider\", \"$injector\", \"$animateProvider\", function ($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\n var modules = {},\n providers = {\n $controllerProvider: $controllerProvider,\n $compileProvider: $compileProvider,\n $filterProvider: $filterProvider,\n $provide: $provide, // other things (constant, decorator, provider, factory, service)\n $injector: $injector,\n $animateProvider: $animateProvider\n },\n debug = false,\n events = false,\n moduleCache = [];\n\n moduleCache.push = function (value) {\n if (this.indexOf(value) === -1) {\n Array.prototype.push.apply(this, arguments);\n }\n };\n\n this.config = function (config) {\n // If we want to define modules configs\n if (angular.isDefined(config.modules)) {\n if (angular.isArray(config.modules)) {\n angular.forEach(config.modules, function (moduleConfig) {\n modules[moduleConfig.name] = moduleConfig;\n });\n } else {\n modules[config.modules.name] = config.modules;\n }\n }\n\n if (angular.isDefined(config.debug)) {\n debug = config.debug;\n }\n\n if (angular.isDefined(config.events)) {\n events = config.events;\n }\n };\n\n /**\r\n * Get the list of existing registered modules\r\n * @param element\r\n */\n this._init = function _init(element) {\n // this is probably useless now because we override angular.bootstrap\n if (modulesToLoad.length === 0) {\n var elements = [element],\n names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],\n NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\n append = function append(elm) {\n return elm && elements.push(elm);\n };\n\n angular.forEach(names, function (name) {\n names[name] = true;\n append(document.getElementById(name));\n name = name.replace(':', '\\\\:');\n if (element[0].querySelectorAll) {\n angular.forEach(element[0].querySelectorAll('.' + name), append);\n angular.forEach(element[0].querySelectorAll('.' + name + '\\\\:'), append);\n angular.forEach(element[0].querySelectorAll('[' + name + ']'), append);\n }\n });\n\n angular.forEach(elements, function (elm) {\n if (modulesToLoad.length === 0) {\n var className = ' ' + element.className + ' ';\n var match = NG_APP_CLASS_REGEXP.exec(className);\n if (match) {\n modulesToLoad.push((match[2] || '').replace(/\\s+/g, ','));\n } else {\n angular.forEach(elm.attributes, function (attr) {\n if (modulesToLoad.length === 0 && names[attr.name]) {\n modulesToLoad.push(attr.value);\n }\n });\n }\n }\n });\n }\n\n if (modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\n console.error('No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.');\n }\n\n var addReg = function addReg(moduleName) {\n if (regModules.indexOf(moduleName) === -1) {\n // register existing modules\n regModules.push(moduleName);\n var mainModule = angular.module(moduleName);\n\n // register existing components (directives, services, ...)\n _invokeQueue(null, mainModule._invokeQueue, moduleName);\n _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\n\n angular.forEach(mainModule.requires, addReg);\n }\n };\n\n angular.forEach(modulesToLoad, function (moduleName) {\n addReg(moduleName);\n });\n\n modulesToLoad = []; // reset for next bootstrap\n recordDeclarations.pop(); // wait for the next lazy load\n };\n\n /**\r\n * Like JSON.stringify but that doesn't throw on circular references\r\n * @param obj\r\n */\n var stringify = function stringify(obj) {\n var cache = [];\n return JSON.stringify(obj, function (key, value) {\n if (angular.isObject(value) && value !== null) {\n if (cache.indexOf(value) !== -1) {\n // Circular reference found, discard key\n return;\n }\n // Store value in our collection\n cache.push(value);\n }\n return value;\n });\n };\n\n var hashCode = function hashCode(str) {\n var hash = 0,\n i,\n chr,\n len;\n if (str.length == 0) {\n return hash;\n }\n for (i = 0, len = str.length; i < len; i++) {\n chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n };\n\n function _register(providers, registerModules, params) {\n if (registerModules) {\n var k,\n moduleName,\n moduleFn,\n tempRunBlocks = [];\n for (k = registerModules.length - 1; k >= 0; k--) {\n moduleName = registerModules[k];\n if (!angular.isString(moduleName)) {\n moduleName = getModuleName(moduleName);\n }\n if (!moduleName || justLoaded.indexOf(moduleName) !== -1) {\n continue;\n }\n var newModule = regModules.indexOf(moduleName) === -1;\n moduleFn = ngModuleFct(moduleName);\n if (newModule) {\n // new module\n regModules.push(moduleName);\n _register(providers, moduleFn.requires, params);\n }\n if (moduleFn._runBlocks.length > 0) {\n // new run blocks detected! Replace the old ones (if existing)\n runBlocks[moduleName] = [];\n while (moduleFn._runBlocks.length > 0) {\n runBlocks[moduleName].push(moduleFn._runBlocks.shift());\n }\n }\n if (angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\n tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\n }\n _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\n _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\n broadcast(newModule ? 'ocLazyLoad.moduleLoaded' : 'ocLazyLoad.moduleReloaded', moduleName);\n registerModules.pop();\n justLoaded.push(moduleName);\n }\n // execute the run blocks at the end\n var instanceInjector = providers.getInstanceInjector();\n angular.forEach(tempRunBlocks, function (fn) {\n instanceInjector.invoke(fn);\n });\n }\n }\n\n function _registerInvokeList(args, moduleName) {\n var invokeList = args[2][0],\n type = args[1],\n newInvoke = false;\n if (angular.isUndefined(regInvokes[moduleName])) {\n regInvokes[moduleName] = {};\n }\n if (angular.isUndefined(regInvokes[moduleName][type])) {\n regInvokes[moduleName][type] = {};\n }\n var onInvoke = function onInvoke(invokeName, signature) {\n if (!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\n regInvokes[moduleName][type][invokeName] = [];\n }\n if (regInvokes[moduleName][type][invokeName].indexOf(signature) === -1) {\n newInvoke = true;\n regInvokes[moduleName][type][invokeName].push(signature);\n broadcast('ocLazyLoad.componentLoaded', [moduleName, type, invokeName]);\n }\n };\n\n function signature(data) {\n if (angular.isArray(data)) {\n // arrays are objects, we need to test for it first\n return hashCode(data.toString());\n } else if (angular.isObject(data)) {\n // constants & values for example\n return hashCode(stringify(data));\n } else {\n if (angular.isDefined(data) && data !== null) {\n return hashCode(data.toString());\n } else {\n // null & undefined constants\n return data;\n }\n }\n }\n\n if (angular.isString(invokeList)) {\n onInvoke(invokeList, signature(args[2][1]));\n } else if (angular.isObject(invokeList)) {\n angular.forEach(invokeList, function (invoke, key) {\n if (angular.isString(invoke)) {\n // decorators for example\n onInvoke(invoke, signature(invokeList[1]));\n } else {\n // components registered as object lists {\"componentName\": function() {}}\n onInvoke(key, signature(invoke));\n }\n });\n } else {\n return false;\n }\n return newInvoke;\n }\n\n function _invokeQueue(providers, queue, moduleName, reconfig) {\n if (!queue) {\n return;\n }\n\n var i, len, args, provider;\n for (i = 0, len = queue.length; i < len; i++) {\n args = queue[i];\n if (angular.isArray(args)) {\n if (providers !== null) {\n if (providers.hasOwnProperty(args[0])) {\n provider = providers[args[0]];\n } else {\n throw new Error('unsupported provider ' + args[0]);\n }\n }\n var isNew = _registerInvokeList(args, moduleName);\n if (args[1] !== 'invoke') {\n if (isNew && angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n } else {\n // config block\n var callInvoke = function callInvoke(fct) {\n var invoked = regConfigs.indexOf('' + moduleName + '-' + fct);\n if (invoked === -1 || reconfig) {\n if (invoked === -1) {\n regConfigs.push('' + moduleName + '-' + fct);\n }\n if (angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n }\n };\n if (angular.isFunction(args[2][0])) {\n callInvoke(args[2][0]);\n } else if (angular.isArray(args[2][0])) {\n for (var j = 0, jlen = args[2][0].length; j < jlen; j++) {\n if (angular.isFunction(args[2][0][j])) {\n callInvoke(args[2][0][j]);\n }\n }\n }\n }\n }\n }\n }\n\n function getModuleName(module) {\n var moduleName = null;\n if (angular.isString(module)) {\n moduleName = module;\n } else if (angular.isObject(module) && module.hasOwnProperty('name') && angular.isString(module.name)) {\n moduleName = module.name;\n }\n return moduleName;\n }\n\n function moduleExists(moduleName) {\n if (!angular.isString(moduleName)) {\n return false;\n }\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\n return false;\n }\n }\n }\n\n this.$get = [\"$log\", \"$rootElement\", \"$rootScope\", \"$cacheFactory\", \"$q\", function ($log, $rootElement, $rootScope, $cacheFactory, $q) {\n var instanceInjector,\n filesCache = $cacheFactory('ocLazyLoad');\n\n if (!debug) {\n $log = {};\n $log['error'] = angular.noop;\n $log['warn'] = angular.noop;\n $log['info'] = angular.noop;\n }\n\n // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\n providers.getInstanceInjector = function () {\n return instanceInjector ? instanceInjector : instanceInjector = $rootElement.data('$injector') || angular.injector();\n };\n\n broadcast = function broadcast(eventName, params) {\n if (events) {\n $rootScope.$broadcast(eventName, params);\n }\n if (debug) {\n $log.info(eventName, params);\n }\n };\n\n function reject(e) {\n var deferred = $q.defer();\n $log.error(e.message);\n deferred.reject(e);\n return deferred.promise;\n }\n\n return {\n _broadcast: broadcast,\n\n _$log: $log,\n\n /**\r\n * Returns the files cache used by the loaders to store the files currently loading\r\n * @returns {*}\r\n */\n _getFilesCache: function getFilesCache() {\n return filesCache;\n },\n\n /**\r\n * Let the service know that it should monitor angular.module because files are loading\r\n * @param watch boolean\r\n */\n toggleWatch: function toggleWatch(watch) {\n if (watch) {\n recordDeclarations.push(true);\n } else {\n recordDeclarations.pop();\n }\n },\n\n /**\r\n * Let you get a module config object\r\n * @param moduleName String the name of the module\r\n * @returns {*}\r\n */\n getModuleConfig: function getModuleConfig(moduleName) {\n if (!angular.isString(moduleName)) {\n throw new Error('You need to give the name of the module to get');\n }\n if (!modules[moduleName]) {\n return null;\n }\n return angular.copy(modules[moduleName]);\n },\n\n /**\r\n * Let you define a module config object\r\n * @param moduleConfig Object the module config object\r\n * @returns {*}\r\n */\n setModuleConfig: function setModuleConfig(moduleConfig) {\n if (!angular.isObject(moduleConfig)) {\n throw new Error('You need to give the module config object to set');\n }\n modules[moduleConfig.name] = moduleConfig;\n return moduleConfig;\n },\n\n /**\r\n * Returns the list of loaded modules\r\n * @returns {string[]}\r\n */\n getModules: function getModules() {\n return regModules;\n },\n\n /**\r\n * Let you check if a module has been loaded into Angular or not\r\n * @param modulesNames String/Object a module name, or a list of module names\r\n * @returns {boolean}\r\n */\n isLoaded: function isLoaded(modulesNames) {\n var moduleLoaded = function moduleLoaded(module) {\n var isLoaded = regModules.indexOf(module) > -1;\n if (!isLoaded) {\n isLoaded = !!moduleExists(module);\n }\n return isLoaded;\n };\n if (angular.isString(modulesNames)) {\n modulesNames = [modulesNames];\n }\n if (angular.isArray(modulesNames)) {\n var i, len;\n for (i = 0, len = modulesNames.length; i < len; i++) {\n if (!moduleLoaded(modulesNames[i])) {\n return false;\n }\n }\n return true;\n } else {\n throw new Error('You need to define the module(s) name(s)');\n }\n },\n\n /**\r\n * Given a module, return its name\r\n * @param module\r\n * @returns {String}\r\n */\n _getModuleName: getModuleName,\n\n /**\r\n * Returns a module if it exists\r\n * @param moduleName\r\n * @returns {module}\r\n */\n _getModule: function getModule(moduleName) {\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n // this error message really suxx\n if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\n e.message = 'The module \"' + stringify(moduleName) + '\" that you are trying to load does not exist. ' + e.message;\n }\n throw e;\n }\n },\n\n /**\r\n * Check if a module exists and returns it if it does\r\n * @param moduleName\r\n * @returns {boolean}\r\n */\n moduleExists: moduleExists,\n\n /**\r\n * Load the dependencies, and might try to load new files depending on the config\r\n * @param moduleName (String or Array of Strings)\r\n * @param localParams\r\n * @returns {*}\r\n * @private\r\n */\n _loadDependencies: function _loadDependencies(moduleName, localParams) {\n var loadedModule,\n requires,\n diff,\n promisesList = [],\n self = this;\n\n moduleName = self._getModuleName(moduleName);\n\n if (moduleName === null) {\n return $q.when();\n } else {\n try {\n loadedModule = self._getModule(moduleName);\n } catch (e) {\n return reject(e);\n }\n // get unloaded requires\n requires = self.getRequires(loadedModule);\n }\n\n angular.forEach(requires, function (requireEntry) {\n // If no configuration is provided, try and find one from a previous load.\n // If there isn't one, bail and let the normal flow run\n if (angular.isString(requireEntry)) {\n var config = self.getModuleConfig(requireEntry);\n if (config === null) {\n moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\n return;\n }\n requireEntry = config;\n }\n\n // Check if this dependency has been loaded previously\n if (self.moduleExists(requireEntry.name)) {\n // compare against the already loaded module to see if the new definition adds any new files\n diff = requireEntry.files.filter(function (n) {\n return self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0;\n });\n\n // If the module was redefined, advise via the console\n if (diff.length !== 0) {\n self._$log.warn('Module \"', moduleName, '\" attempted to redefine configuration for dependency. \"', requireEntry.name, '\"\\n Additional Files Loaded:', diff);\n }\n\n // Push everything to the file loader, it will weed out the duplicates.\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error('Error: New dependencies need to be loaded from external files (' + requireEntry.files + '), but no loader has been defined.'));\n }\n return;\n } else if (angular.isArray(requireEntry)) {\n requireEntry = {\n files: requireEntry\n };\n } else if (angular.isObject(requireEntry)) {\n if (requireEntry.hasOwnProperty('name') && requireEntry['name']) {\n // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\n self.setModuleConfig(requireEntry);\n moduleCache.push(requireEntry['name']);\n }\n }\n\n // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\n if (angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error('Error: the module \"' + requireEntry.name + '\" is defined in external files (' + requireEntry.files + '), but no loader has been defined.'));\n }\n }\n });\n\n // Create a wrapper promise to watch the promise list and resolve it once everything is done.\n return $q.all(promisesList);\n },\n\n /**\r\n * Inject new modules into Angular\r\n * @param moduleName\r\n * @param localParams\r\n */\n inject: function inject(moduleName) {\n var localParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n deferred = $q.defer();\n if (angular.isDefined(moduleName) && moduleName !== null) {\n if (angular.isArray(moduleName)) {\n var promisesList = [];\n angular.forEach(moduleName, function (module) {\n promisesList.push(self.inject(module));\n });\n return $q.all(promisesList);\n } else {\n self._addToLoadList(self._getModuleName(moduleName), true);\n }\n }\n if (modulesToLoad.length > 0) {\n var res = modulesToLoad.slice(); // clean copy\n var loadNext = function loadNext(moduleName) {\n moduleCache.push(moduleName);\n self._loadDependencies(moduleName, localParams).then(function success() {\n try {\n justLoaded = [];\n _register(providers, moduleCache, localParams);\n } catch (e) {\n self._$log.error(e.message);\n deferred.reject(e);\n return;\n }\n\n if (modulesToLoad.length > 0) {\n loadNext(modulesToLoad.shift()); // load the next in list\n } else {\n deferred.resolve(res); // everything has been loaded, resolve\n }\n }, function error(err) {\n deferred.reject(err);\n });\n };\n\n // load the first in list\n loadNext(modulesToLoad.shift());\n } else {\n deferred.resolve();\n }\n return deferred.promise;\n },\n\n /**\r\n * Get the list of required modules/services/... for this module\r\n * @param module\r\n * @returns {Array}\r\n */\n getRequires: function getRequires(module) {\n var requires = [];\n angular.forEach(module.requires, function (requireModule) {\n if (regModules.indexOf(requireModule) === -1) {\n requires.push(requireModule);\n }\n });\n return requires;\n },\n\n /**\r\n * Invoke the new modules & component by their providers\r\n * @param providers\r\n * @param queue\r\n * @param moduleName\r\n * @param reconfig\r\n * @private\r\n */\n _invokeQueue: _invokeQueue,\n\n /**\r\n * Check if a module has been invoked and registers it if not\r\n * @param args\r\n * @param moduleName\r\n * @returns {boolean} is new\r\n */\n _registerInvokeList: _registerInvokeList,\n\n /**\r\n * Register a new module and loads it, executing the run/config blocks if needed\r\n * @param providers\r\n * @param registerModules\r\n * @param params\r\n * @private\r\n */\n _register: _register,\n\n /**\r\n * Add a module name to the list of modules that will be loaded in the next inject\r\n * @param name\r\n * @param force\r\n * @private\r\n */\n _addToLoadList: _addToLoadList\n };\n }];\n\n // Let's get the list of loaded modules & components\n this._init(angular.element(window.document));\n }]);\n\n var bootstrapFct = angular.bootstrap;\n angular.bootstrap = function (element, modules, config) {\n // we use slice to make a clean copy\n angular.forEach(modules.slice(), function (module) {\n _addToLoadList(module, true);\n });\n return bootstrapFct(element, modules, config);\n };\n\n var _addToLoadList = function _addToLoadList(name, force) {\n if ((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\n modulesToLoad.push(name);\n }\n };\n\n var ngModuleFct = angular.module;\n angular.module = function (name, requires, configFn) {\n _addToLoadList(name);\n return ngModuleFct(name, requires, configFn);\n };\n\n // CommonJS package manager support:\n if (typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports) {\n module.exports = 'oc.lazyLoad';\n }\n})(angular, window);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').directive('ocLazyLoad', [\"$ocLazyLoad\", \"$compile\", \"$animate\", \"$parse\", function ($ocLazyLoad, $compile, $animate, $parse) {\n return {\n restrict: 'A',\n terminal: true,\n priority: 1000,\n compile: function compile(element, attrs) {\n // we store the content and remove it before compilation\n var content = element[0].innerHTML;\n element.html('');\n\n return function ($scope, $element, $attr) {\n var model = $parse($attr.ocLazyLoad);\n $scope.$watch(function () {\n return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\n }, function (moduleName) {\n if (angular.isDefined(moduleName)) {\n $ocLazyLoad.load(moduleName).then(function () {\n $animate.enter(content, $element);\n var contents = element.contents();\n angular.forEach(contents, function (content) {\n if (content.nodeType !== 3) {\n // 3 is a text node\n $compile(content)($scope);\n }\n });\n });\n }\n }, true);\n };\n }\n };\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", \"$window\", \"$interval\", function ($delegate, $q, $window, $interval) {\n var uaCssChecked = false,\n useCssLoadPatch = false,\n anchor = $window.document.getElementsByTagName('head')[0] || $window.document.getElementsByTagName('body')[0];\n\n /**\n * Load a js/css file\n * @param type\n * @param path\n * @param params\n * @returns promise\n */\n $delegate.buildElement = function buildElement(type, path, params) {\n var deferred = $q.defer(),\n el,\n loaded,\n filesCache = $delegate._getFilesCache(),\n cacheBuster = function cacheBuster(url) {\n var dc = new Date().getTime();\n if (url.indexOf('?') >= 0) {\n if (url.substring(0, url.length - 1) === '&') {\n return '' + url + '_dc=' + dc;\n }\n return '' + url + '&_dc=' + dc;\n } else {\n return '' + url + '?_dc=' + dc;\n }\n };\n\n // Store the promise early so the file load can be detected by other parallel lazy loads\n // (ie: multiple routes on one page) a 'true' value isn't sufficient\n // as it causes false positive load results.\n if (angular.isUndefined(filesCache.get(path))) {\n filesCache.put(path, deferred.promise);\n }\n\n // Switch in case more content types are added later\n switch (type) {\n case 'css':\n el = $window.document.createElement('link');\n el.type = 'text/css';\n el.rel = 'stylesheet';\n el.href = params.cache === false ? cacheBuster(path) : path;\n break;\n case 'js':\n el = $window.document.createElement('script');\n el.src = params.cache === false ? cacheBuster(path) : path;\n break;\n default:\n filesCache.remove(path);\n deferred.reject(new Error('Requested type \"' + type + '\" is not known. Could not inject \"' + path + '\"'));\n break;\n }\n el.onload = el['onreadystatechange'] = function (e) {\n if (el['readyState'] && !/^c|loade/.test(el['readyState']) || loaded) return;\n el.onload = el['onreadystatechange'] = null;\n loaded = 1;\n $delegate._broadcast('ocLazyLoad.fileLoaded', path);\n deferred.resolve();\n };\n el.onerror = function () {\n filesCache.remove(path);\n deferred.reject(new Error('Unable to load ' + path));\n };\n el.async = params.serie ? 0 : 1;\n\n var insertBeforeElem = anchor.lastChild;\n if (params.insertBefore) {\n var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n if (element && element.length > 0) {\n insertBeforeElem = element[0];\n }\n }\n insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n /*\n The event load or readystatechange doesn't fire in:\n - iOS < 6 (default mobile browser)\n - Android < 4.4 (default mobile browser)\n - Safari < 6 (desktop browser)\n */\n if (type == 'css') {\n if (!uaCssChecked) {\n var ua = $window.navigator.userAgent.toLowerCase();\n\n // iOS < 6\n if (/iP(hone|od|ad)/.test($window.navigator.platform)) {\n var v = $window.navigator.appVersion.match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.'));\n useCssLoadPatch = iOSVersion < 6;\n } else if (ua.indexOf('android') > -1) {\n // Android < 4.4\n var androidVersion = parseFloat(ua.slice(ua.indexOf('android') + 8));\n useCssLoadPatch = androidVersion < 4.4;\n } else if (ua.indexOf('safari') > -1) {\n var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n useCssLoadPatch = versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6;\n }\n }\n\n if (useCssLoadPatch) {\n var tries = 1000; // * 20 = 20000 miliseconds\n var interval = $interval(function () {\n try {\n el.sheet.cssRules;\n $interval.cancel(interval);\n el.onload();\n } catch (e) {\n if (--tries <= 0) {\n el.onerror();\n }\n }\n }, 20);\n }\n }\n\n return deferred.promise;\n };\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\n * The function that loads new files\n * @param config\n * @param params\n * @returns {*}\n */\n $delegate.filesLoader = function filesLoader(config) {\n var params = arguments[1] === undefined ? {} : arguments[1];\n\n var cssFiles = [],\n templatesFiles = [],\n jsFiles = [],\n promises = [],\n cachePromise = null,\n filesCache = $delegate._getFilesCache();\n\n $delegate.toggleWatch(true); // start watching angular.module calls\n\n angular.extend(params, config);\n\n var pushFile = function pushFile(path) {\n var file_type = null,\n m;\n if (angular.isObject(path)) {\n file_type = path.type;\n path = path.path;\n }\n cachePromise = filesCache.get(path);\n if (angular.isUndefined(cachePromise) || params.cache === false) {\n\n // always check for requirejs syntax just in case\n if ((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) {\n // Detect file type using preceding type declaration (ala requireJS)\n file_type = m[1];\n path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n }\n\n if (!file_type) {\n if ((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) {\n // Detect file type via file extension\n file_type = m[1];\n } else if (!$delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader') && $delegate.jsLoader.hasOwnProperty('load')) {\n // requirejs\n file_type = 'js';\n } else {\n $delegate._$log.error('File type could not be determined. ' + path);\n return;\n }\n }\n\n if ((file_type === 'css' || file_type === 'less') && cssFiles.indexOf(path) === -1) {\n cssFiles.push(path);\n } else if ((file_type === 'html' || file_type === 'htm') && templatesFiles.indexOf(path) === -1) {\n templatesFiles.push(path);\n } else if (file_type === 'js' || jsFiles.indexOf(path) === -1) {\n jsFiles.push(path);\n } else {\n $delegate._$log.error('File type is not valid. ' + path);\n }\n } else if (cachePromise) {\n promises.push(cachePromise);\n }\n };\n\n if (params.serie) {\n pushFile(params.files.shift());\n } else {\n angular.forEach(params.files, function (path) {\n pushFile(path);\n });\n }\n\n if (cssFiles.length > 0) {\n var cssDeferred = $q.defer();\n $delegate.cssLoader(cssFiles, function (err) {\n if (angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n cssDeferred.reject(err);\n } else {\n cssDeferred.resolve();\n }\n }, params);\n promises.push(cssDeferred.promise);\n }\n\n if (templatesFiles.length > 0) {\n var templatesDeferred = $q.defer();\n $delegate.templatesLoader(templatesFiles, function (err) {\n if (angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n templatesDeferred.reject(err);\n } else {\n templatesDeferred.resolve();\n }\n }, params);\n promises.push(templatesDeferred.promise);\n }\n\n if (jsFiles.length > 0) {\n var jsDeferred = $q.defer();\n $delegate.jsLoader(jsFiles, function (err) {\n if (angular.isDefined(err) && $delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n jsDeferred.reject(err);\n } else {\n jsDeferred.resolve();\n }\n }, params);\n promises.push(jsDeferred.promise);\n }\n\n if (promises.length === 0) {\n var deferred = $q.defer(),\n err = 'Error: no file to load has been found, if you\\'re trying to load an existing module you should use the \\'inject\\' method instead of \\'load\\'.';\n $delegate._$log.error(err);\n deferred.reject(err);\n return deferred.promise;\n } else if (params.serie && params.files.length > 0) {\n return $q.all(promises).then(function () {\n return $delegate.filesLoader(config, params);\n });\n } else {\n return $q.all(promises)['finally'](function (res) {\n $delegate.toggleWatch(false); // stop watching angular.module calls\n return res;\n });\n }\n };\n\n /**\n * Load a module or a list of modules into Angular\n * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n * @param params Object optional parameters\n * @returns promise\n */\n $delegate.load = function (originalModule) {\n var originalParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n config = null,\n deferredList = [],\n deferred = $q.defer(),\n errText;\n\n // clean copy\n var module = angular.copy(originalModule);\n var params = angular.copy(originalParams);\n\n // If module is an array, break it down\n if (angular.isArray(module)) {\n // Resubmit each entry as a single module\n angular.forEach(module, function (m) {\n deferredList.push(self.load(m, params));\n });\n\n // Resolve the promise once everything has loaded\n $q.all(deferredList).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n }\n\n // Get or Set a configuration depending on what was passed in\n if (angular.isString(module)) {\n config = self.getModuleConfig(module);\n if (!config) {\n config = {\n files: [module]\n };\n }\n } else if (angular.isObject(module)) {\n // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n if (angular.isDefined(module.path) && angular.isDefined(module.type)) {\n config = {\n files: [module]\n };\n } else {\n config = self.setModuleConfig(module);\n }\n }\n\n if (config === null) {\n var moduleName = self._getModuleName(module);\n errText = 'Module \"' + (moduleName || 'unknown') + '\" is not configured, cannot load.';\n $delegate._$log.error(errText);\n deferred.reject(new Error(errText));\n return deferred.promise;\n } else {\n // deprecated\n if (angular.isDefined(config.template)) {\n if (angular.isUndefined(config.files)) {\n config.files = [];\n }\n if (angular.isString(config.template)) {\n config.files.push(config.template);\n } else if (angular.isArray(config.template)) {\n config.files.concat(config.template);\n }\n }\n }\n\n var localParams = angular.extend({}, params, config);\n\n // if someone used an external loader and called the load function with just the module name\n if (angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n return $delegate.inject(config.name, localParams);\n }\n\n $delegate.filesLoader(config, localParams).then(function () {\n $delegate.inject(null, localParams).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n };\n\n // return the patched service\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * cssLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite cssLoader and it will probably not use promises :(\r\n */\n $delegate.cssLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement('css', path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.cssLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * jsLoader function\r\n * @type Function\r\n * @param paths array list of js files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite jsLoader and it will probably not use promises :(\r\n */\n $delegate.jsLoader = require;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$templateCache\", \"$q\", \"$http\", function ($delegate, $templateCache, $q, $http) {\n /**\r\n * templatesLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters for $http\r\n * because the user can overwrite templatesLoader and it will probably not use promises :(\r\n */\n $delegate.templatesLoader = function (paths, callback, params) {\n var promises = [],\n filesCache = $delegate._getFilesCache();\n\n angular.forEach(paths, function (url) {\n var deferred = $q.defer();\n promises.push(deferred.promise);\n $http.get(url, params).success(function (data) {\n if (angular.isString(data) && data.length > 0) {\n angular.forEach(angular.element(data), function (node) {\n if (node.nodeName === 'SCRIPT' && node.type === 'text/ng-template') {\n $templateCache.put(node.id, node.innerHTML);\n }\n });\n }\n if (angular.isUndefined(filesCache.get(url))) {\n filesCache.put(url, true);\n }\n deferred.resolve();\n }).error(function (err) {\n deferred.reject(new Error('Unable to load template file \"' + url + '\": ' + err));\n });\n });\n return $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.templatesLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n// Array.indexOf polyfill for IE8\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement, fromIndex) {\n var k;\n\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n//# sourceMappingURL=ocLazyLoad.require.js.map"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["ocLazyLoad.require.js"],"names":["angular","window","regModules","regInvokes","regConfigs","modulesToLoad","recordDeclarations","broadcast","noop","runBlocks","justLoaded","ocLazyLoad","module","provider","$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider","_register","providers","registerModules","params","k","moduleName","moduleFn","tempRunBlocks","length","isString","getModuleName","indexOf","newModule","ngModuleFct","push","requires","_runBlocks","shift","isDefined","rerun","concat","_invokeQueue","reconfig","_configBlocks","pop","instanceInjector","getInstanceInjector","forEach","fn","invoke","_registerInvokeList","args","signature","data","isArray","hashCode","toString","isObject","stringify","invokeList","type","newInvoke","isUndefined","onInvoke","invokeName","hasOwnProperty","key","queue","i","len","Error","isNew","apply","callInvoke","fct","invoked","isFunction","j","jlen","name","moduleExists","e","test","message","modules","debug","events","moduleCache","value","this","Array","prototype","arguments","config","moduleConfig","_init","element","elements","names","NG_APP_CLASS_REGEXP","append","elm","document","getElementById","replace","querySelectorAll","className","match","exec","attributes","attr","jasmine","mocha","mock","console","error","addReg","mainModule","obj","cache","JSON","str","chr","hash","charCodeAt","$get","$log","$rootElement","$rootScope","$cacheFactory","$q","reject","deferred","defer","promise","filesCache","injector","eventName","$broadcast","info","_broadcast","_$log","_getFilesCache","toggleWatch","watch","getModuleConfig","copy","setModuleConfig","getModules","isLoaded","modulesNames","moduleLoaded","_getModuleName","_getModule","_loadDependencies","localParams","loadedModule","diff","promisesList","self","when","getRequires","requireEntry","files","filter","n","warn","filesLoader","then","all","inject","undefined","_addToLoadList","res","slice","loadNext","resolve","err","requireModule","bootstrapFct","bootstrap","force","configFn","exports","directive","$ocLazyLoad","$compile","$animate","$parse","restrict","terminal","priority","compile","attrs","content","innerHTML","html","$scope","$element","$attr","model","$watch","load","enter","contents","nodeType","decorator","$delegate","$window","$interval","uaCssChecked","useCssLoadPatch","anchor","getElementsByTagName","buildElement","path","el","loaded","cacheBuster","url","dc","Date","getTime","substring","get","put","createElement","rel","href","src","remove","onload","onerror","async","serie","insertBeforeElem","lastChild","insertBefore","jQuery","querySelector","parentNode","ua","navigator","userAgent","toLowerCase","platform","v","appVersion","iOSVersion","parseFloat","parseInt","join","androidVersion","versionMatch","tries","interval","sheet","cssRules","cancel","cssFiles","templatesFiles","jsFiles","promises","cachePromise","extend","pushFile","m","file_type","substr","jsLoader","cssDeferred","cssLoader","templatesDeferred","templatesLoader","jsDeferred","originalModule","errText","originalParams","deferredList","template","paths","callback","ocLazyLoadLoader","require","$templateCache","$http","success","node","nodeName","id","searchElement","fromIndex","TypeError","O","Object","Math","abs","Infinity","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,EAIJ,IAAY,MAARiE,KACI,KAAM,IAAI2M,WAAU,gCAG5B,IAAIC,GAAIC,OAAO7M,MAKXpB,EAAMgO,EAAEzQ,SAAW,CAGvB,IAAY,IAARyC,EACI,MAAO,EAKf,IAAIgG,IAAK8H,GAAa,CAOtB,IALII,KAAKC,IAAInI,KAAOoI,EAAAA,IACZpI,EAAI,GAIRA,GAAKhG,EACD,MAAO,EASf,KAHA7C,EAAI+Q,KAAKG,IAAIrI,GAAK,EAAIA,EAAIhG,EAAMkO,KAAKC,IAAInI,GAAI,GAGlChG,EAAJ7C,GAAS,CAaR,GAAIA,IAAK6Q,IAAKA,EAAE7Q,KAAO0Q,EACf,MAAO1Q,EAEfA,KAER,MAAO","file":"ocLazyLoad.require.min.js","sourcesContent":["/**\n * oclazyload - Load modules on demand (lazy load) with angularJS\n * @version v1.0.2\n * @link https://github.com/ocombe/ocLazyLoad\n * @license MIT\n * @author Olivier Combe \n */\n(function (angular, window) {\n 'use strict';\n\n var regModules = ['ng', 'oc.lazyLoad'],\n regInvokes = {},\n regConfigs = [],\n modulesToLoad = [],\n recordDeclarations = [],\n broadcast = angular.noop,\n runBlocks = {},\n justLoaded = [];\n\n var ocLazyLoad = angular.module('oc.lazyLoad', ['ng']);\n\n ocLazyLoad.provider('$ocLazyLoad', [\"$controllerProvider\", \"$provide\", \"$compileProvider\", \"$filterProvider\", \"$injector\", \"$animateProvider\", function ($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\n var modules = {},\n providers = {\n $controllerProvider: $controllerProvider,\n $compileProvider: $compileProvider,\n $filterProvider: $filterProvider,\n $provide: $provide, // other things (constant, decorator, provider, factory, service)\n $injector: $injector,\n $animateProvider: $animateProvider\n },\n debug = false,\n events = false,\n moduleCache = [];\n\n moduleCache.push = function (value) {\n if (this.indexOf(value) === -1) {\n Array.prototype.push.apply(this, arguments);\n }\n };\n\n this.config = function (config) {\n // If we want to define modules configs\n if (angular.isDefined(config.modules)) {\n if (angular.isArray(config.modules)) {\n angular.forEach(config.modules, function (moduleConfig) {\n modules[moduleConfig.name] = moduleConfig;\n });\n } else {\n modules[config.modules.name] = config.modules;\n }\n }\n\n if (angular.isDefined(config.debug)) {\n debug = config.debug;\n }\n\n if (angular.isDefined(config.events)) {\n events = config.events;\n }\n };\n\n /**\r\n * Get the list of existing registered modules\r\n * @param element\r\n */\n this._init = function _init(element) {\n // this is probably useless now because we override angular.bootstrap\n if (modulesToLoad.length === 0) {\n var elements = [element],\n names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],\n NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\n append = function append(elm) {\n return elm && elements.push(elm);\n };\n\n angular.forEach(names, function (name) {\n names[name] = true;\n append(document.getElementById(name));\n name = name.replace(':', '\\\\:');\n if (typeof element[0] !== 'undefined' && element[0].querySelectorAll) {\n angular.forEach(element[0].querySelectorAll('.' + name), append);\n angular.forEach(element[0].querySelectorAll('.' + name + '\\\\:'), append);\n angular.forEach(element[0].querySelectorAll('[' + name + ']'), append);\n }\n });\n\n angular.forEach(elements, function (elm) {\n if (modulesToLoad.length === 0) {\n var className = ' ' + element.className + ' ';\n var match = NG_APP_CLASS_REGEXP.exec(className);\n if (match) {\n modulesToLoad.push((match[2] || '').replace(/\\s+/g, ','));\n } else {\n angular.forEach(elm.attributes, function (attr) {\n if (modulesToLoad.length === 0 && names[attr.name]) {\n modulesToLoad.push(attr.value);\n }\n });\n }\n }\n });\n }\n\n if (modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\n console.error('No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.');\n }\n\n var addReg = function addReg(moduleName) {\n if (regModules.indexOf(moduleName) === -1) {\n // register existing modules\n regModules.push(moduleName);\n var mainModule = angular.module(moduleName);\n\n // register existing components (directives, services, ...)\n _invokeQueue(null, mainModule._invokeQueue, moduleName);\n _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\n\n angular.forEach(mainModule.requires, addReg);\n }\n };\n\n angular.forEach(modulesToLoad, function (moduleName) {\n addReg(moduleName);\n });\n\n modulesToLoad = []; // reset for next bootstrap\n recordDeclarations.pop(); // wait for the next lazy load\n };\n\n /**\r\n * Like JSON.stringify but that doesn't throw on circular references\r\n * @param obj\r\n */\n var stringify = function stringify(obj) {\n var cache = [];\n return JSON.stringify(obj, function (key, value) {\n if (angular.isObject(value) && value !== null) {\n if (cache.indexOf(value) !== -1) {\n // Circular reference found, discard key\n return;\n }\n // Store value in our collection\n cache.push(value);\n }\n return value;\n });\n };\n\n var hashCode = function hashCode(str) {\n var hash = 0,\n i,\n chr,\n len;\n if (str.length == 0) {\n return hash;\n }\n for (i = 0, len = str.length; i < len; i++) {\n chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n };\n\n function _register(providers, registerModules, params) {\n if (registerModules) {\n var k,\n moduleName,\n moduleFn,\n tempRunBlocks = [];\n for (k = registerModules.length - 1; k >= 0; k--) {\n moduleName = registerModules[k];\n if (!angular.isString(moduleName)) {\n moduleName = getModuleName(moduleName);\n }\n if (!moduleName || justLoaded.indexOf(moduleName) !== -1) {\n continue;\n }\n var newModule = regModules.indexOf(moduleName) === -1;\n moduleFn = ngModuleFct(moduleName);\n if (newModule) {\n // new module\n regModules.push(moduleName);\n _register(providers, moduleFn.requires, params);\n }\n if (moduleFn._runBlocks.length > 0) {\n // new run blocks detected! Replace the old ones (if existing)\n runBlocks[moduleName] = [];\n while (moduleFn._runBlocks.length > 0) {\n runBlocks[moduleName].push(moduleFn._runBlocks.shift());\n }\n }\n if (angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\n tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\n }\n _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\n _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\n broadcast(newModule ? 'ocLazyLoad.moduleLoaded' : 'ocLazyLoad.moduleReloaded', moduleName);\n registerModules.pop();\n justLoaded.push(moduleName);\n }\n // execute the run blocks at the end\n var instanceInjector = providers.getInstanceInjector();\n angular.forEach(tempRunBlocks, function (fn) {\n instanceInjector.invoke(fn);\n });\n }\n }\n\n function _registerInvokeList(args, moduleName) {\n var invokeList = args[2][0],\n type = args[1],\n newInvoke = false;\n if (angular.isUndefined(regInvokes[moduleName])) {\n regInvokes[moduleName] = {};\n }\n if (angular.isUndefined(regInvokes[moduleName][type])) {\n regInvokes[moduleName][type] = {};\n }\n var onInvoke = function onInvoke(invokeName, signature) {\n if (!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\n regInvokes[moduleName][type][invokeName] = [];\n }\n if (regInvokes[moduleName][type][invokeName].indexOf(signature) === -1) {\n newInvoke = true;\n regInvokes[moduleName][type][invokeName].push(signature);\n broadcast('ocLazyLoad.componentLoaded', [moduleName, type, invokeName]);\n }\n };\n\n function signature(data) {\n if (angular.isArray(data)) {\n // arrays are objects, we need to test for it first\n return hashCode(data.toString());\n } else if (angular.isObject(data)) {\n // constants & values for example\n return hashCode(stringify(data));\n } else {\n if (angular.isDefined(data) && data !== null) {\n return hashCode(data.toString());\n } else {\n // null & undefined constants\n return data;\n }\n }\n }\n\n if (angular.isString(invokeList)) {\n onInvoke(invokeList, signature(args[2][1]));\n } else if (angular.isObject(invokeList)) {\n angular.forEach(invokeList, function (invoke, key) {\n if (angular.isString(invoke)) {\n // decorators for example\n onInvoke(invoke, signature(invokeList[1]));\n } else {\n // components registered as object lists {\"componentName\": function() {}}\n onInvoke(key, signature(invoke));\n }\n });\n } else {\n return false;\n }\n return newInvoke;\n }\n\n function _invokeQueue(providers, queue, moduleName, reconfig) {\n if (!queue) {\n return;\n }\n\n var i, len, args, provider;\n for (i = 0, len = queue.length; i < len; i++) {\n args = queue[i];\n if (angular.isArray(args)) {\n if (providers !== null) {\n if (providers.hasOwnProperty(args[0])) {\n provider = providers[args[0]];\n } else {\n throw new Error('unsupported provider ' + args[0]);\n }\n }\n var isNew = _registerInvokeList(args, moduleName);\n if (args[1] !== 'invoke') {\n if (isNew && angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n } else {\n // config block\n var callInvoke = function callInvoke(fct) {\n var invoked = regConfigs.indexOf('' + moduleName + '-' + fct);\n if (invoked === -1 || reconfig) {\n if (invoked === -1) {\n regConfigs.push('' + moduleName + '-' + fct);\n }\n if (angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n }\n };\n if (angular.isFunction(args[2][0])) {\n callInvoke(args[2][0]);\n } else if (angular.isArray(args[2][0])) {\n for (var j = 0, jlen = args[2][0].length; j < jlen; j++) {\n if (angular.isFunction(args[2][0][j])) {\n callInvoke(args[2][0][j]);\n }\n }\n }\n }\n }\n }\n }\n\n function getModuleName(module) {\n var moduleName = null;\n if (angular.isString(module)) {\n moduleName = module;\n } else if (angular.isObject(module) && module.hasOwnProperty('name') && angular.isString(module.name)) {\n moduleName = module.name;\n }\n return moduleName;\n }\n\n function moduleExists(moduleName) {\n if (!angular.isString(moduleName)) {\n return false;\n }\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\n return false;\n }\n }\n }\n\n this.$get = [\"$log\", \"$rootElement\", \"$rootScope\", \"$cacheFactory\", \"$q\", function ($log, $rootElement, $rootScope, $cacheFactory, $q) {\n var instanceInjector,\n filesCache = $cacheFactory('ocLazyLoad');\n\n if (!debug) {\n $log = {};\n $log['error'] = angular.noop;\n $log['warn'] = angular.noop;\n $log['info'] = angular.noop;\n }\n\n // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\n providers.getInstanceInjector = function () {\n return instanceInjector ? instanceInjector : instanceInjector = $rootElement.data('$injector') || angular.injector();\n };\n\n broadcast = function broadcast(eventName, params) {\n if (events) {\n $rootScope.$broadcast(eventName, params);\n }\n if (debug) {\n $log.info(eventName, params);\n }\n };\n\n function reject(e) {\n var deferred = $q.defer();\n $log.error(e.message);\n deferred.reject(e);\n return deferred.promise;\n }\n\n return {\n _broadcast: broadcast,\n\n _$log: $log,\n\n /**\r\n * Returns the files cache used by the loaders to store the files currently loading\r\n * @returns {*}\r\n */\n _getFilesCache: function getFilesCache() {\n return filesCache;\n },\n\n /**\r\n * Let the service know that it should monitor angular.module because files are loading\r\n * @param watch boolean\r\n */\n toggleWatch: function toggleWatch(watch) {\n if (watch) {\n recordDeclarations.push(true);\n } else {\n recordDeclarations.pop();\n }\n },\n\n /**\r\n * Let you get a module config object\r\n * @param moduleName String the name of the module\r\n * @returns {*}\r\n */\n getModuleConfig: function getModuleConfig(moduleName) {\n if (!angular.isString(moduleName)) {\n throw new Error('You need to give the name of the module to get');\n }\n if (!modules[moduleName]) {\n return null;\n }\n return angular.copy(modules[moduleName]);\n },\n\n /**\r\n * Let you define a module config object\r\n * @param moduleConfig Object the module config object\r\n * @returns {*}\r\n */\n setModuleConfig: function setModuleConfig(moduleConfig) {\n if (!angular.isObject(moduleConfig)) {\n throw new Error('You need to give the module config object to set');\n }\n modules[moduleConfig.name] = moduleConfig;\n return moduleConfig;\n },\n\n /**\r\n * Returns the list of loaded modules\r\n * @returns {string[]}\r\n */\n getModules: function getModules() {\n return regModules;\n },\n\n /**\r\n * Let you check if a module has been loaded into Angular or not\r\n * @param modulesNames String/Object a module name, or a list of module names\r\n * @returns {boolean}\r\n */\n isLoaded: function isLoaded(modulesNames) {\n var moduleLoaded = function moduleLoaded(module) {\n var isLoaded = regModules.indexOf(module) > -1;\n if (!isLoaded) {\n isLoaded = !!moduleExists(module);\n }\n return isLoaded;\n };\n if (angular.isString(modulesNames)) {\n modulesNames = [modulesNames];\n }\n if (angular.isArray(modulesNames)) {\n var i, len;\n for (i = 0, len = modulesNames.length; i < len; i++) {\n if (!moduleLoaded(modulesNames[i])) {\n return false;\n }\n }\n return true;\n } else {\n throw new Error('You need to define the module(s) name(s)');\n }\n },\n\n /**\r\n * Given a module, return its name\r\n * @param module\r\n * @returns {String}\r\n */\n _getModuleName: getModuleName,\n\n /**\r\n * Returns a module if it exists\r\n * @param moduleName\r\n * @returns {module}\r\n */\n _getModule: function getModule(moduleName) {\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n // this error message really suxx\n if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\n e.message = 'The module \"' + stringify(moduleName) + '\" that you are trying to load does not exist. ' + e.message;\n }\n throw e;\n }\n },\n\n /**\r\n * Check if a module exists and returns it if it does\r\n * @param moduleName\r\n * @returns {boolean}\r\n */\n moduleExists: moduleExists,\n\n /**\r\n * Load the dependencies, and might try to load new files depending on the config\r\n * @param moduleName (String or Array of Strings)\r\n * @param localParams\r\n * @returns {*}\r\n * @private\r\n */\n _loadDependencies: function _loadDependencies(moduleName, localParams) {\n var loadedModule,\n requires,\n diff,\n promisesList = [],\n self = this;\n\n moduleName = self._getModuleName(moduleName);\n\n if (moduleName === null) {\n return $q.when();\n } else {\n try {\n loadedModule = self._getModule(moduleName);\n } catch (e) {\n return reject(e);\n }\n // get unloaded requires\n requires = self.getRequires(loadedModule);\n }\n\n angular.forEach(requires, function (requireEntry) {\n // If no configuration is provided, try and find one from a previous load.\n // If there isn't one, bail and let the normal flow run\n if (angular.isString(requireEntry)) {\n var config = self.getModuleConfig(requireEntry);\n if (config === null) {\n moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\n return;\n }\n requireEntry = config;\n }\n\n // Check if this dependency has been loaded previously\n if (self.moduleExists(requireEntry.name)) {\n // compare against the already loaded module to see if the new definition adds any new files\n diff = requireEntry.files.filter(function (n) {\n return self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0;\n });\n\n // If the module was redefined, advise via the console\n if (diff.length !== 0) {\n self._$log.warn('Module \"', moduleName, '\" attempted to redefine configuration for dependency. \"', requireEntry.name, '\"\\n Additional Files Loaded:', diff);\n }\n\n // Push everything to the file loader, it will weed out the duplicates.\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error('Error: New dependencies need to be loaded from external files (' + requireEntry.files + '), but no loader has been defined.'));\n }\n return;\n } else if (angular.isArray(requireEntry)) {\n requireEntry = {\n files: requireEntry\n };\n } else if (angular.isObject(requireEntry)) {\n if (requireEntry.hasOwnProperty('name') && requireEntry['name']) {\n // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\n self.setModuleConfig(requireEntry);\n moduleCache.push(requireEntry['name']);\n }\n }\n\n // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\n if (angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error('Error: the module \"' + requireEntry.name + '\" is defined in external files (' + requireEntry.files + '), but no loader has been defined.'));\n }\n }\n });\n\n // Create a wrapper promise to watch the promise list and resolve it once everything is done.\n return $q.all(promisesList);\n },\n\n /**\r\n * Inject new modules into Angular\r\n * @param moduleName\r\n * @param localParams\r\n */\n inject: function inject(moduleName) {\n var localParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n deferred = $q.defer();\n if (angular.isDefined(moduleName) && moduleName !== null) {\n if (angular.isArray(moduleName)) {\n var promisesList = [];\n angular.forEach(moduleName, function (module) {\n promisesList.push(self.inject(module));\n });\n return $q.all(promisesList);\n } else {\n self._addToLoadList(self._getModuleName(moduleName), true);\n }\n }\n if (modulesToLoad.length > 0) {\n var res = modulesToLoad.slice(); // clean copy\n var loadNext = function loadNext(moduleName) {\n moduleCache.push(moduleName);\n self._loadDependencies(moduleName, localParams).then(function success() {\n try {\n justLoaded = [];\n _register(providers, moduleCache, localParams);\n } catch (e) {\n self._$log.error(e.message);\n deferred.reject(e);\n return;\n }\n\n if (modulesToLoad.length > 0) {\n loadNext(modulesToLoad.shift()); // load the next in list\n } else {\n deferred.resolve(res); // everything has been loaded, resolve\n }\n }, function error(err) {\n deferred.reject(err);\n });\n };\n\n // load the first in list\n loadNext(modulesToLoad.shift());\n } else {\n deferred.resolve();\n }\n return deferred.promise;\n },\n\n /**\r\n * Get the list of required modules/services/... for this module\r\n * @param module\r\n * @returns {Array}\r\n */\n getRequires: function getRequires(module) {\n var requires = [];\n angular.forEach(module.requires, function (requireModule) {\n if (regModules.indexOf(requireModule) === -1) {\n requires.push(requireModule);\n }\n });\n return requires;\n },\n\n /**\r\n * Invoke the new modules & component by their providers\r\n * @param providers\r\n * @param queue\r\n * @param moduleName\r\n * @param reconfig\r\n * @private\r\n */\n _invokeQueue: _invokeQueue,\n\n /**\r\n * Check if a module has been invoked and registers it if not\r\n * @param args\r\n * @param moduleName\r\n * @returns {boolean} is new\r\n */\n _registerInvokeList: _registerInvokeList,\n\n /**\r\n * Register a new module and loads it, executing the run/config blocks if needed\r\n * @param providers\r\n * @param registerModules\r\n * @param params\r\n * @private\r\n */\n _register: _register,\n\n /**\r\n * Add a module name to the list of modules that will be loaded in the next inject\r\n * @param name\r\n * @param force\r\n * @private\r\n */\n _addToLoadList: _addToLoadList\n };\n }];\n\n // Let's get the list of loaded modules & components\n this._init(angular.element(window.document));\n }]);\n\n var bootstrapFct = angular.bootstrap;\n angular.bootstrap = function (element, modules, config) {\n // we use slice to make a clean copy\n angular.forEach(modules.slice(), function (module) {\n _addToLoadList(module, true);\n });\n return bootstrapFct(element, modules, config);\n };\n\n var _addToLoadList = function _addToLoadList(name, force) {\n if ((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\n modulesToLoad.push(name);\n }\n };\n\n var ngModuleFct = angular.module;\n angular.module = function (name, requires, configFn) {\n _addToLoadList(name);\n return ngModuleFct(name, requires, configFn);\n };\n\n // CommonJS package manager support:\n if (typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports) {\n module.exports = 'oc.lazyLoad';\n }\n})(angular, window);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').directive('ocLazyLoad', [\"$ocLazyLoad\", \"$compile\", \"$animate\", \"$parse\", function ($ocLazyLoad, $compile, $animate, $parse) {\n return {\n restrict: 'A',\n terminal: true,\n priority: 1000,\n compile: function compile(element, attrs) {\n // we store the content and remove it before compilation\n var content = element[0].innerHTML;\n element.html('');\n\n return function ($scope, $element, $attr) {\n var model = $parse($attr.ocLazyLoad);\n $scope.$watch(function () {\n return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\n }, function (moduleName) {\n if (angular.isDefined(moduleName)) {\n $ocLazyLoad.load(moduleName).then(function () {\n $animate.enter(content, $element);\n var contents = element.contents();\n angular.forEach(contents, function (content) {\n if (content.nodeType !== 3) {\n // 3 is a text node\n $compile(content)($scope);\n }\n });\n });\n }\n }, true);\n };\n }\n };\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", \"$window\", \"$interval\", function ($delegate, $q, $window, $interval) {\n var uaCssChecked = false,\n useCssLoadPatch = false,\n anchor = $window.document.getElementsByTagName('head')[0] || $window.document.getElementsByTagName('body')[0];\n\n /**\n * Load a js/css file\n * @param type\n * @param path\n * @param params\n * @returns promise\n */\n $delegate.buildElement = function buildElement(type, path, params) {\n var deferred = $q.defer(),\n el,\n loaded,\n filesCache = $delegate._getFilesCache(),\n cacheBuster = function cacheBuster(url) {\n var dc = new Date().getTime();\n if (url.indexOf('?') >= 0) {\n if (url.substring(0, url.length - 1) === '&') {\n return '' + url + '_dc=' + dc;\n }\n return '' + url + '&_dc=' + dc;\n } else {\n return '' + url + '?_dc=' + dc;\n }\n };\n\n // Store the promise early so the file load can be detected by other parallel lazy loads\n // (ie: multiple routes on one page) a 'true' value isn't sufficient\n // as it causes false positive load results.\n if (angular.isUndefined(filesCache.get(path))) {\n filesCache.put(path, deferred.promise);\n }\n\n // Switch in case more content types are added later\n switch (type) {\n case 'css':\n el = $window.document.createElement('link');\n el.type = 'text/css';\n el.rel = 'stylesheet';\n el.href = params.cache === false ? cacheBuster(path) : path;\n break;\n case 'js':\n el = $window.document.createElement('script');\n el.src = params.cache === false ? cacheBuster(path) : path;\n break;\n default:\n filesCache.remove(path);\n deferred.reject(new Error('Requested type \"' + type + '\" is not known. Could not inject \"' + path + '\"'));\n break;\n }\n el.onload = el['onreadystatechange'] = function (e) {\n if (el['readyState'] && !/^c|loade/.test(el['readyState']) || loaded) return;\n el.onload = el['onreadystatechange'] = null;\n loaded = 1;\n $delegate._broadcast('ocLazyLoad.fileLoaded', path);\n deferred.resolve();\n };\n el.onerror = function () {\n filesCache.remove(path);\n deferred.reject(new Error('Unable to load ' + path));\n };\n el.async = params.serie ? 0 : 1;\n\n var insertBeforeElem = anchor.lastChild;\n if (params.insertBefore) {\n var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n if (element && element.length > 0) {\n insertBeforeElem = element[0];\n }\n }\n insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n /*\n The event load or readystatechange doesn't fire in:\n - iOS < 6 (default mobile browser)\n - Android < 4.4 (default mobile browser)\n - Safari < 6 (desktop browser)\n */\n if (type == 'css') {\n if (!uaCssChecked) {\n var ua = $window.navigator.userAgent.toLowerCase();\n\n // iOS < 6\n if (/iP(hone|od|ad)/.test($window.navigator.platform)) {\n var v = $window.navigator.appVersion.match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.'));\n useCssLoadPatch = iOSVersion < 6;\n } else if (ua.indexOf('android') > -1) {\n // Android < 4.4\n var androidVersion = parseFloat(ua.slice(ua.indexOf('android') + 8));\n useCssLoadPatch = androidVersion < 4.4;\n } else if (ua.indexOf('safari') > -1) {\n var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n useCssLoadPatch = versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6;\n }\n }\n\n if (useCssLoadPatch) {\n var tries = 1000; // * 20 = 20000 miliseconds\n var interval = $interval(function () {\n try {\n el.sheet.cssRules;\n $interval.cancel(interval);\n el.onload();\n } catch (e) {\n if (--tries <= 0) {\n el.onerror();\n }\n }\n }, 20);\n }\n }\n\n return deferred.promise;\n };\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\n * The function that loads new files\n * @param config\n * @param params\n * @returns {*}\n */\n $delegate.filesLoader = function filesLoader(config) {\n var params = arguments[1] === undefined ? {} : arguments[1];\n\n var cssFiles = [],\n templatesFiles = [],\n jsFiles = [],\n promises = [],\n cachePromise = null,\n filesCache = $delegate._getFilesCache();\n\n $delegate.toggleWatch(true); // start watching angular.module calls\n\n angular.extend(params, config);\n\n var pushFile = function pushFile(path) {\n var file_type = null,\n m;\n if (angular.isObject(path)) {\n file_type = path.type;\n path = path.path;\n }\n cachePromise = filesCache.get(path);\n if (angular.isUndefined(cachePromise) || params.cache === false) {\n\n // always check for requirejs syntax just in case\n if ((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) {\n // Detect file type using preceding type declaration (ala requireJS)\n file_type = m[1];\n path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n }\n\n if (!file_type) {\n if ((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) {\n // Detect file type via file extension\n file_type = m[1];\n } else if (!$delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader') && $delegate.jsLoader.hasOwnProperty('load')) {\n // requirejs\n file_type = 'js';\n } else {\n $delegate._$log.error('File type could not be determined. ' + path);\n return;\n }\n }\n\n if ((file_type === 'css' || file_type === 'less') && cssFiles.indexOf(path) === -1) {\n cssFiles.push(path);\n } else if ((file_type === 'html' || file_type === 'htm') && templatesFiles.indexOf(path) === -1) {\n templatesFiles.push(path);\n } else if (file_type === 'js' || jsFiles.indexOf(path) === -1) {\n jsFiles.push(path);\n } else {\n $delegate._$log.error('File type is not valid. ' + path);\n }\n } else if (cachePromise) {\n promises.push(cachePromise);\n }\n };\n\n if (params.serie) {\n pushFile(params.files.shift());\n } else {\n angular.forEach(params.files, function (path) {\n pushFile(path);\n });\n }\n\n if (cssFiles.length > 0) {\n var cssDeferred = $q.defer();\n $delegate.cssLoader(cssFiles, function (err) {\n if (angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n cssDeferred.reject(err);\n } else {\n cssDeferred.resolve();\n }\n }, params);\n promises.push(cssDeferred.promise);\n }\n\n if (templatesFiles.length > 0) {\n var templatesDeferred = $q.defer();\n $delegate.templatesLoader(templatesFiles, function (err) {\n if (angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n templatesDeferred.reject(err);\n } else {\n templatesDeferred.resolve();\n }\n }, params);\n promises.push(templatesDeferred.promise);\n }\n\n if (jsFiles.length > 0) {\n var jsDeferred = $q.defer();\n $delegate.jsLoader(jsFiles, function (err) {\n if (angular.isDefined(err) && $delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n jsDeferred.reject(err);\n } else {\n jsDeferred.resolve();\n }\n }, params);\n promises.push(jsDeferred.promise);\n }\n\n if (promises.length === 0) {\n var deferred = $q.defer(),\n err = 'Error: no file to load has been found, if you\\'re trying to load an existing module you should use the \\'inject\\' method instead of \\'load\\'.';\n $delegate._$log.error(err);\n deferred.reject(err);\n return deferred.promise;\n } else if (params.serie && params.files.length > 0) {\n return $q.all(promises).then(function () {\n return $delegate.filesLoader(config, params);\n });\n } else {\n return $q.all(promises)['finally'](function (res) {\n $delegate.toggleWatch(false); // stop watching angular.module calls\n return res;\n });\n }\n };\n\n /**\n * Load a module or a list of modules into Angular\n * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n * @param params Object optional parameters\n * @returns promise\n */\n $delegate.load = function (originalModule) {\n var originalParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n config = null,\n deferredList = [],\n deferred = $q.defer(),\n errText;\n\n // clean copy\n var module = angular.copy(originalModule);\n var params = angular.copy(originalParams);\n\n // If module is an array, break it down\n if (angular.isArray(module)) {\n // Resubmit each entry as a single module\n angular.forEach(module, function (m) {\n deferredList.push(self.load(m, params));\n });\n\n // Resolve the promise once everything has loaded\n $q.all(deferredList).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n }\n\n // Get or Set a configuration depending on what was passed in\n if (angular.isString(module)) {\n config = self.getModuleConfig(module);\n if (!config) {\n config = {\n files: [module]\n };\n }\n } else if (angular.isObject(module)) {\n // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n if (angular.isDefined(module.path) && angular.isDefined(module.type)) {\n config = {\n files: [module]\n };\n } else {\n config = self.setModuleConfig(module);\n }\n }\n\n if (config === null) {\n var moduleName = self._getModuleName(module);\n errText = 'Module \"' + (moduleName || 'unknown') + '\" is not configured, cannot load.';\n $delegate._$log.error(errText);\n deferred.reject(new Error(errText));\n return deferred.promise;\n } else {\n // deprecated\n if (angular.isDefined(config.template)) {\n if (angular.isUndefined(config.files)) {\n config.files = [];\n }\n if (angular.isString(config.template)) {\n config.files.push(config.template);\n } else if (angular.isArray(config.template)) {\n config.files.concat(config.template);\n }\n }\n }\n\n var localParams = angular.extend({}, params, config);\n\n // if someone used an external loader and called the load function with just the module name\n if (angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n return $delegate.inject(config.name, localParams);\n }\n\n $delegate.filesLoader(config, localParams).then(function () {\n $delegate.inject(null, localParams).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n };\n\n // return the patched service\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * cssLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite cssLoader and it will probably not use promises :(\r\n */\n $delegate.cssLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement('css', path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.cssLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * jsLoader function\r\n * @type Function\r\n * @param paths array list of js files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite jsLoader and it will probably not use promises :(\r\n */\n $delegate.jsLoader = require;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$templateCache\", \"$q\", \"$http\", function ($delegate, $templateCache, $q, $http) {\n /**\r\n * templatesLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters for $http\r\n * because the user can overwrite templatesLoader and it will probably not use promises :(\r\n */\n $delegate.templatesLoader = function (paths, callback, params) {\n var promises = [],\n filesCache = $delegate._getFilesCache();\n\n angular.forEach(paths, function (url) {\n var deferred = $q.defer();\n promises.push(deferred.promise);\n $http.get(url, params).success(function (data) {\n if (angular.isString(data) && data.length > 0) {\n angular.forEach(angular.element(data), function (node) {\n if (node.nodeName === 'SCRIPT' && node.type === 'text/ng-template') {\n $templateCache.put(node.id, node.innerHTML);\n }\n });\n }\n if (angular.isUndefined(filesCache.get(url))) {\n filesCache.put(url, true);\n }\n deferred.resolve();\n }).error(function (err) {\n deferred.reject(new Error('Unable to load template file \"' + url + '\": ' + err));\n });\n });\n return $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.templatesLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n// Array.indexOf polyfill for IE8\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement, fromIndex) {\n var k;\n\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n//# sourceMappingURL=ocLazyLoad.require.js.map"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/package.json b/package.json index c8c8ce4..51d1926 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oclazyload", - "version": "1.0.1", + "version": "1.0.2", "description": "Load modules on demand (lazy load) with angularJS", "main": "dist/ocLazyLoad.js", "author": "Olivier Combe ", @@ -58,4 +58,4 @@ "semver": "~4.3.6", "streamqueue": "~0.1.3" } -} +} \ No newline at end of file