var string = require( 'string-kit' ) ;
320794
function ScatteredFilesTransport( logger , config = {} ) {
	CommonTransport.call( this , logger , config ) ;

	if ( typeof config.path !== 'string' ) { config.path = __dirname ; }

	// Use color?
	// Actually, color may be useful when using 'tail -f'
	this.color = !! config.color ;
	this.indent = config.indent === undefined ? true : !! config.indent ;
	this.includeIdMeta = !! config.includeIdMeta ;
	this.includeCommonMeta = config.includeCommonMeta === undefined ? true : !! config.includeCommonMeta ;
	this.includeUserMeta = config.includeUserMeta === undefined ? true : !! config.includeUserMeta ;
	this.path = config.path ;
	this.streams = {} ;
}
1308060
function providePromise(obj, providePromiseName) {
    if(!isString(providePromiseName)) {
      throw new Error('Must provide string as name of promised module');
    }
    di.annotate(obj, new di.ProvidePromise(providePromiseName));
  }
519977
function (str) {
    var lit = this.ast_stringify(t.stringLiteral(str));
    var ast = this.ast_buffer(lit);
    return ast;
  }
1108204
function require(path) {
  var module = require.modules[path];
  if(!module) {
    throw("couldn't find module for: " + path);
  }
  if(!module.exports) {
    module.exports = {};
    module.call(module.exports, module, module.exports, require.bind(path));
  }
  return module.exports;
}
714842
function(input, source) {
  var output = input.toString();

  if (source.path.match(/\.js$/)) {
    output = output.replace(/(["'](do not )?use strict[\"\'];)/,
        'define(function(require, exports, module) {\n\n$1');
    output += '\n\n});\n';
  }

  return output;
}
334204
function(str) {
            var output;
            try {
                output = opts.template(str);
            } catch (e) {
                e.message = error.badTemplate + ': ' + e.message;
                return this.emit('error', new PluginError('gulp-concat-filenames', e));
            }

            if (typeof output !== 'string') {
                return this.emit('error', new PluginError('gulp-concat-filenames', error.badTemplate));
            }
            return output;
        }
902866
function createStrings(input) {
  return new Promise((resolve, reject) => {
    try {
      if (!input) {
        return resolve(null);
      }

      const importsString = input.imports.length ? `${input.imports.join('\n')}\n\n` : '';
      const exportsString = input.exports.length ? `${input.exports.join('\n')}\n` : '';
      const indexString = `${importsString}${exportsString}`.replace('\n\n\n', '\n\n');

      return resolve(indexString.length ? indexString : null);
    } catch (e) {
      return reject(new Error(t('STRINGS_COULD_NOT_BE_CREATED')));
    }
  });
}
876286
function STRING(length) {
    length = length || 255;
    if (!(this instanceof STRING)) {
        return new STRING(length);
    }
    this.length = length;
    this.sql = 'VARCHAR(' + length + ')';
}
393777
function requirePath(fromPath, require) {
  // console.log('requirePath:fromPath: ' + fromPath);
  // console.log('requirePath:require: ' + require);
  if (fromPath === null || fromPath === undefined
    || require === null || require === undefined) {
    return null;
  }
  var filePath = path.resolve(path.dirname(fromPath), require);
  return realRequirPath(filePath);
}
213817
function intArrayFromString(stringy, dontAddNull, length /* optional */) {
  var ret = (new Runtime.UTF8Processor()).processJSString(stringy);
  if (length) {
    ret.length = length;
  }
  if (!dontAddNull) {
    ret.push(0);
  }
  return ret;
}
615763
function string(str) {
  assertString(str);
  var expected = "'" + str + "'";
  return Parsimmon(function(input, i) {
    var j = i + str.length;
    var head = input.slice(i, j);
    if (head === str) {
      return makeSuccess(j, head);
    } else {
      return makeFailure(i, expected);
    }
  });
}
1055263
function Semver(string) {
    Semver.assert(string);
    var parts = string.split('.');
    this.major = parseInt(parts[0], 10);
    this.minor = parseInt(parts[1], 10);
    this.patch = parseInt(parts[2], 10);
}
601515
function require_override(p){
  var path = require.resolve(p)
    , mod = require.modules[path];
  if (!mod) {
    var exports;
    $.ajax({ 
      type: "GET",
      url: path + '.js',   
      async: false,
      success : function(text) {
        exports = {};
        eval(text);
        require.modules[path + '.js'] = { exports: exports };
      }
    });
    if (exports != null) {
      return exports;
    }
    throw new Error('failed to require "' + p + '"');
  }
  if (!mod.exports) {
    mod.exports = {};
    mod.call(mod.exports, mod, mod.exports, require.relative(path));
  }
  return mod.exports;
}
786587
function provideName(obj, token){
    if(!isString(token)) {
      throw new Error('Must provide string as name of module');
    }
    di.annotate(obj, new di.Provide(token));
  }
1250926
function(str) {
            var root, error = null;

            i = j = current = 0;
            chunks = [];
            input = str.replace(/\r\n/g, '\n');
            if (env.filename) {
                that.env.inputs[env.filename] = input;
            }

            // Split the input into chunks.
            chunks = (function (chunks) {
                var j = 0,
                    skip = /(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,
                    comment = /\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,
                    string = /"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,
                    level = 0,
                    match,
                    chunk = chunks[0],
                    inParam;

                for (var i = 0, c, cc; i < input.length;) {
                    skip.lastIndex = i;
                    match = skip.exec(input);
                    if (match) {
                        if (match.index === i) {
                            i += match[0].length;
                            chunk.push(match[0]);
                        }
                    }
                    c = input.charAt(i);
                    comment.lastIndex = string.lastIndex = i;

                    match = string.exec(input)
                    if (match) {
                        if (match.index === i) {
                            i += match[0].length;
                            chunk.push(match[0]);
                            continue;
                        }
                    }

                    if (!inParam && c === '/') {
                        cc = input.charAt(i + 1);
                        if (cc === '/' || cc === '*') {
                            match = comment.exec(input);
                            if (match) {
                                if (match.index === i) {
                                    i += match[0].length;
                                    chunk.push(match[0]);
                                    continue;
                                }
                            }
                        }
                    }

                    switch (c) {
                        case '{':
                            if (!inParam) {
                                level ++;
                            }
                            else {
                                inParam = false;
                            }
                            chunk.push(c);
                            break;
                        case '}':
                            if (!inParam) {
                                level --;
                                chunk.push(c);
                                chunks[++j] = chunk = [];
                            }
                            else {
                                inParam = false;
                                chunk.push(c);
                            }
                            break;
                        case '(':
                            if (!inParam) {
                                inParam = true;
                            }
                            else {
                                inParam = false;
                            }
                            chunk.push(c);
                            break;
                        case ')':
                            if (inParam) {
                                inParam = false;
                            }
                            chunk.push(c);
                            break;
                        default:
                            chunk.push(c);
                    }

                    i++;
                }
                if (level !== 0) {
                    error = {
                        index: i - 1,
                        message: (level > 0) ? "missing closing `}`" : "missing opening `{`",
                        filename: env.filename
                    };
                }

                return chunks.map(function (c) { return c.join(''); });
            })([[]]);

            if (error) {
                util.error(env, error);
                throw new Error('N/A');
            }

            // Start with the primary rule.
            // The whole syntax tree is held under a Ruleset node,
            // with the `root` property set to true, so no `{}` are
            // output.
            root = new tree.Ruleset([], $(this.parsers.primary));
            root.root = true;

            // Get an array of Ruleset objects, flattened
            // and sorted according to specificitySort
            root.toList = (function() {
                return function(env) {
                    env.frames = env.frames || [];


                    // call populates Invalid-caused errors
                    var definitions = this.flatten([], [], env);
                    definitions.sort(specificitySort);
                    return definitions;
                };
            })();

            // Sort rules by specificity: this function expects selectors to be
            // split already.
            //
            // Written to be used as a .sort(Function);
            // argument.
            //
            // [1, 0, 0, 467] > [0, 0, 1, 520]
            var specificitySort = function(a, b) {
                var as = a.specificity;
                var bs = b.specificity;

                if (as[0] != bs[0]) return bs[0] - as[0];
                if (as[1] != bs[1]) return bs[1] - as[1];
                if (as[2] != bs[2]) return bs[2] - as[2];
                return bs[3] - as[3];
            };

            return root;
        }
44179
function _require(dependency) {
        let result;
        try {
            result = require(path.join('ng-apimock', 'node_modules', dependency));
        } catch (ex) {
            result = require(dependency)
        }
        return result;
    }
509855
function $require(dir, file, dependencies) {
  var requiredFile = join(dir,file)
  try {
    var req = require(requiredFile)
    $logIt('app.require', `require`, `${dependencies?'wDeps'.yellow.dim:''}`.reset + requiredFile.gray)
    return dependencies ? req.apply(this,dependencies) : req
  } catch (e) {
    if (e.stack.match('SyntaxError')) {
      var src = fs.readFileSync(requiredFile+'.js')
      var err = syntax(src, requiredFile)
      console.log('\n\n$require.SyntaxError'.red, e.message.gray,
        err ? `\n\t${err} | col ${err.column}\n\n\n\n`.red : requiredFile.white)
      process.exit(1)
    }
    else
      console.log('\n\n\n$require.err'.red, requiredFile.white, e.message, '\n\n\n')

    throw e
  }

}