function createContextualRequire(sContextName, bAMDCompliance) {
		var fnRequire = function(vDependencies, fnCallback, fnErrCallback) {
			var sModuleName;

			assert(typeof vDependencies === 'string' || Array.isArray(vDependencies), "dependency param either must be a single string or an array of strings");
			assert(fnCallback == null || typeof fnCallback === 'function', "callback must be a function or null/undefined");
			assert(fnErrCallback == null || typeof fnErrCallback === 'function', "error callback must be a function or null/undefined");

			// Probing for existing module
			if ( typeof vDependencies === 'string' ) {
				sModuleName = getMappedName(vDependencies + '.js', sContextName);
				var oModule = Module.get(sModuleName);

				// check the modules internal state
				// everything from PRELOADED to LOADED (incl. FAILED) is considered erroneous
				if (bAMDCompliance && oModule.state !== EXECUTING && oModule.state !== READY) {
					throw new Error(
						"Module '" + sModuleName + "' has not been loaded yet. " +
						"Use require(['" + sModuleName + "']) to load it."
					);
				}

				// Module is in state READY or EXECUTING; or require() was called from sap.ui.require().
				// A modules value might be undefined (no return statement) even though the state is READY.
				return oModule.value();
			}

			requireAll(sContextName, vDependencies, function(aModules) {
				aModules = aModules.map(unwrapExport);
				if ( typeof fnCallback === 'function' ) {
					if ( bGlobalAsyncMode ) {
						fnCallback.apply(__global, aModules);
					} else {
						// enforce asynchronous execution of callback even in sync mode
						simulateAsyncCallback(function() {
							fnCallback.apply(__global, aModules);
						});
					}
				}
			}, function(oErr) {
				if ( typeof fnErrCallback === 'function' ) {
					if ( bGlobalAsyncMode ) {
						fnErrCallback.call(__global, oErr);
					} else {
						simulateAsyncCallback(function() {
							fnErrCallback.call(__global, oErr);
						});
					}
				} else {
					throw oErr;
				}
			}, /* bAsync = */ bGlobalAsyncMode);

			// return undefined;
		};
		fnRequire.toUrl = function(sName) {
			var sMappedName = ensureTrailingSlash(getMappedName(sName, sContextName), sName);
			return toUrl(sMappedName);
		};
		return fnRequire;
	}
/**
	 * Create a require() function which acts in the context of the given resource.
	 *
	 * @param {string|null} sContextName Name of the context resource (module) in URN syntax, incl. extension
	 * @param {boolean} bAMDCompliance If set to true, the behavior of the require() function is closer to the AMD specification.
	 * @returns {function} Require function.
	 */
Create a require() function which acts in the context of the given resource.
@param {string|null} sContextName Name of the context resource (module) in URN syntax, incl. extension
@param {boolean} bAMDCompliance If set to true, the behavior of the require() function is closer to the AMD specification.
@returns {function} Require function.
Create a require () function which acts in the context of the given resource . @param { string|null } sContextName Name of the context resource ( module ) in URN syntax incl . extension @param { boolean } bAMDCompliance If set to true the behavior of the require () function is closer to the AMD specification . @returns { function } Require function .
function createContextualRequire(sContextName, bAMDCompliance) {
		var fnRequire = function(vDependencies, fnCallback, fnErrCallback) {
			var sModuleName;
			assert(typeof vDependencies === 'string' || Array.isArray(vDependencies), "dependency param either must be a single string or an array of strings");
			assert(fnCallback == null || typeof fnCallback === 'function', "callback must be a function or null/undefined");
			assert(fnErrCallback == null || typeof fnErrCallback === 'function', "error callback must be a function or null/undefined");
			if ( typeof vDependencies === 'string' ) {
				sModuleName = getMappedName(vDependencies + '.js', sContextName);
				var oModule = Module.get(sModuleName);
				if (bAMDCompliance && oModule.state !== EXECUTING && oModule.state !== READY) {
					throw new Error(
						"Module '" + sModuleName + "' has not been loaded yet. " +
						"Use require(['" + sModuleName + "']) to load it."
					);
				}
				return oModule.value();
			}
			requireAll(sContextName, vDependencies, function(aModules) {
				aModules = aModules.map(unwrapExport);
				if ( typeof fnCallback === 'function' ) {
					if ( bGlobalAsyncMode ) {
						fnCallback.apply(__global, aModules);
					} else {
						simulateAsyncCallback(function() {
							fnCallback.apply(__global, aModules);
						});
					}
				}
			}, function(oErr) {
				if ( typeof fnErrCallback === 'function' ) {
					if ( bGlobalAsyncMode ) {
						fnErrCallback.call(__global, oErr);
					} else {
						simulateAsyncCallback(function() {
							fnErrCallback.call(__global, oErr);
						});
					}
				} else {
					throw oErr;
				}
			},  bGlobalAsyncMode);
		};
		fnRequire.toUrl = function(sName) {
			var sMappedName = ensureTrailingSlash(getMappedName(sName, sContextName), sName);
			return toUrl(sMappedName);
		};
		return fnRequire;
	}
function createContextualRequire ( sContextName , bAMDCompliance ) { var fnRequire = function ( vDependencies , fnCallback , fnErrCallback ) { var sModuleName ; assert ( typeof vDependencies === 'string' || Array . isArray ( vDependencies ) , "dependency param either must be a single string or an array of strings" ) ; assert ( fnCallback == null || typeof fnCallback === 'function' , "callback must be a function or null/undefined" ) ; assert ( fnErrCallback == null || typeof fnErrCallback === 'function' , "error callback must be a function or null/undefined" ) ; if ( typeof vDependencies === 'string' ) { sModuleName = getMappedName ( vDependencies + '.js' , sContextName ) ; var oModule = Module . get ( sModuleName ) ; if ( bAMDCompliance && oModule . state !== EXECUTING && oModule . state !== READY ) { throw new Error ( "Module '" + sModuleName + "' has not been loaded yet. " + "Use require(['" + sModuleName + "']) to load it." ) ; } return oModule . value ( ) ; } requireAll ( sContextName , vDependencies , function ( aModules ) { aModules = aModules . map ( unwrapExport ) ; if ( typeof fnCallback === 'function' ) { if ( bGlobalAsyncMode ) { fnCallback . apply ( __global , aModules ) ; } else { simulateAsyncCallback ( function ( ) { fnCallback . apply ( __global , aModules ) ; } ) ; } } } , function ( oErr ) { if ( typeof fnErrCallback === 'function' ) { if ( bGlobalAsyncMode ) { fnErrCallback . call ( __global , oErr ) ; } else { simulateAsyncCallback ( function ( ) { fnErrCallback . call ( __global , oErr ) ; } ) ; } } else { throw oErr ; } } , bGlobalAsyncMode ) ; } ; fnRequire . toUrl = function ( sName ) { var sMappedName = ensureTrailingSlash ( getMappedName ( sName , sContextName ) , sName ) ; return toUrl ( sMappedName ) ; } ; return fnRequire ; }
Create a require() function which acts in the context of the given resource.
Create a require () function which acts in the context of the given resource .
// Probing for existing module // check the modules internal state // everything from PRELOADED to LOADED (incl. FAILED) is considered erroneous // Module is in state READY or EXECUTING; or require() was called from sap.ui.require(). // A modules value might be undefined (no return statement) even though the state is READY. // enforce asynchronous execution of callback even in sync mode /* bAsync = */ // return undefined;