eslint-disable-next-line max-lines-per-function
968151
function (seq, begin, end) {
	var sliced = seq.reduce(
		function (state, chunk) {
			var index = state.index;

			if (chunk instanceof Token) {
				var code = sgr.extractCode(chunk.token);

				if (index <= begin) {
					if (code in sgr.openers) {
						sgr.openStyle(state.preOpeners, code);
					}
					if (code in sgr.closers) {
						sgr.closeStyle(state.preOpeners, code);
					}
				} else if (index < end) {
					if (code in sgr.openers) {
						sgr.openStyle(state.inOpeners, code);
						state.seq.push(chunk);
					} else if (code in sgr.closers) {
						state.inClosers.push(code);
						state.seq.push(chunk);
					}
				}
			} else {
				var nextChunk = "";

				if (isChunkInSlice(chunk, index, begin, end)) {
					var relBegin = Math.max(begin - index, 0)
					  , relEnd = Math.min(end - index, chunk.length);

					nextChunk = chunk.slice(relBegin, relEnd);
				}

				state.seq.push(nextChunk);
				state.index = index + chunk.length;
			}

			return state;
		},
		{
			index: 0,
			seq: [],

			// preOpeners -> [ mod ]
			// preOpeners must be prepended to the slice if they wasn't closed til the end of it
			// preOpeners must be closed if they wasn't closed til the end of the slice
			preOpeners: [],

			// inOpeners  -> [ mod ]
			// inOpeners already in the slice and must not be prepended to the slice
			// inOpeners must be closed if they wasn't closed til the end of the slice
			inOpeners: [], // opener CSI inside slice

			// inClosers -> [ code ]
			// closer CSIs for determining which pre/in-Openers must be closed
			inClosers: []
		}
	);

	sliced.seq = [].concat(
		sgr.prepend(sliced.preOpeners), sliced.seq,
		sgr.complete([].concat(sliced.preOpeners, sliced.inOpeners), sliced.inClosers)
	);

	return sliced.seq;
}
733655
function processLines(begin, end) {
      var lines = ''
      var s = '';
      end -= 1;
      if (begin < end) {
//        console.log(begin, end);
        var src = sources[scope.name];
        lines = src.slice(begin, end);
        while (lines.length > 0 && lines[0] == '')
          lines = lines.slice(1, lines.length);
        if (lines.length > 0) // && !(lines.length == 1 && lines[0] == ''))
        {
          var s1 = lines.join('\n');
//          s1 = s1.replace(/\</g, "&lt;").replace(/\>/g, "&gt;");
          s += '<pre style="padding-left: 50px; display: none;"><code  class="language-'+scope.extlang+'" data-nodes="show" data-code="hide">'+htmlEscape(s1)+'</code></pre>' //prism
        }
//          s += '<pre style="padding-left: 50px;"><code>'+lines.join('\n')+'</code></pre>'
      }
      // EXECUTOR.HOOK: afterProcessLines [
      s = executor.hook('afterProcessLines', s, [sources, scope, begin, end, lines])
      // EXECUTOR.HOOK: afterProcessLines ]

      return s;
    }
1055588
function (table) {
        var finalLine = '+';
        for (var i = 0; i < table.maxWidth.length; i++) {
            finalLine += Array(table.maxWidth[i] + 3).join('-') + '+';
        }
        return finalLine;
    }
48978
function wrap(set) {
    return function (fn, time /* , ...args */) {
      var boundArgs = arguments.length > 2;
      var args = boundArgs ? slice.call(arguments, 2) : false;
      return set(boundArgs ? function () {
        // eslint-disable-next-line no-new-func
        (typeof fn == 'function' ? fn : Function(fn)).apply(this, args);
      } : fn, time);
    };
  }
297539
function(str){
    var lines = str.match(/\n/g)
      , idx = str.lastIndexOf('\n');

    if (lines) this.lineno += lines.length;
    this.column = ~idx
      ? str.length - idx
      : this.column + str.length;
  }
393490
function concatString(lines) {
  var output = ''
  for (var i = 0; i < lines.length; i ++) {
    output += lines[i] + '\n'
  }
  return output
}
625327
function snipLine(line, colno) {
  var ll = line.length;
  if (ll <= 150) return line;
  if (colno > ll) colno = ll;

  var start = Math.max(colno - 60, 0);
  if (start < 5) start = 0;

  var end = Math.min(start + 140, ll);
  if (end > ll - 5) end = ll;
  if (end === ll) start = Math.max(end - 140, 0);

  line = line.slice(start, end);
  if (start > 0) line = '{snip} ' + line;
  if (end < ll) line += ' {snip}';

  return line;
}
111105
function after(args) {
    const source = args.source;
    const index = args.index;
    const err = args.err;
    const errTarget = args.errTarget;
    const lineCheckStr = args.lineCheckStr;
    const onlyOneChar =
      args.onlyOneChar === undefined ? false : args.onlyOneChar;

    activeArgs = { source, index, err, errTarget, onlyOneChar };

    switch (expectation) {
      case "always":
        expectAfter();
        break;
      case "never":
        rejectAfter();
        break;
      case "always-single-line":
        if (!isSingleLineString(lineCheckStr || source)) {
          return;
        }

        expectAfter(messages.expectedAfterSingleLine);
        break;
      case "never-single-line":
        if (!isSingleLineString(lineCheckStr || source)) {
          return;
        }

        rejectAfter(messages.rejectedAfterSingleLine);
        break;
      case "always-multi-line":
        if (isSingleLineString(lineCheckStr || source)) {
          return;
        }

        expectAfter(messages.expectedAfterMultiLine);
        break;
      case "never-multi-line":
        if (isSingleLineString(lineCheckStr || source)) {
          return;
        }

        rejectAfter(messages.rejectedAfterMultiLine);
        break;
      default:
        throw configurationError(`Unknown expectation "${expectation}"`);
    }
  }
401960
function eslintFn() {
  return gulp
    .src([config.files.docs.srcJS])
    .pipe(eslint())
    .pipe(eslint.formatEach("stylish", process.stderr));
}
187636
function lint () {
  console.log(
    chalk.gray('Running linting…\n')
  )

  // Run all linters
  const results = [
    dockerLinter,
    templateLinter,
    javascriptLinter,
    markdownLinter,
    sassLinter
  ]
    .map((Linter) => {
      const linter = new Linter()
      return linter.lint()
    })

  console.log(
    chalk.gray('\nlinting complete!')
  )

  const erred = results.indexOf(true) !== -1

  // If file was called via CLI and there are errors exit process with failed status
  if (require.main === module && erred) {
    process.exit(1)
  }

  return erred
}
404824
function () {
  var args = Array.prototype.slice.call(arguments);
  console.error();
  console.error.apply(console, [" "].concat(args));
  console.error();
  process.exit(1); // eslint-disable-line no-process-exit
}
395974
function(lines) {
							let firstBracketIndex = 0;
							let foundFirstNonWhite = false;
							for (let i = lines.length - 1; i >= 0; i--) {
								const l = lines[i];
								if (!foundFirstNonWhite && (l === SPACE || l === ' ' || !l)) {
									lines.pop();
								} else {
									foundFirstNonWhite = true;
								}

								if (l === '[') {
									firstBracketIndex = i;
									break;
								}
							}

							for (let i = firstBracketIndex + 1; i < lines.length; i++) {
								const l = lines[i];
								if (l === SPACE || l === ' ' ||!l) {
									lines.splice(i, 1);
								} else {
									break;
								}
							}

							return lines;
						}
1173821
function _getMaxOsxID(text) {
  let max = 0;
  _.each(text.split('\n'), line => {
    line = line.trim();
    if (line === '') return;
    const id = parseInt(line.replace(/.*\s+(-?\d+)\s*$/, '$1'), 10);
    if (_.isFinite(id) && id > max) {
      max = id;
    }
  });
  return max + 1;
}
10757
function breakLine (lineOfText, maxLength) {
  const lines = []
  let currText = lineOfText

  while (currText) {
    if (currText.length <= maxLength) {
      lines.push(currText)
      break
    } else {
      let line = ''
      const words = currText.split(/\b/g)
      while (words.length && line.length + words[0].length < maxLength) {
        line += words.shift()
      }
      if (line) lines.push(line.trim())
      currText = words.join('')
    }
  }

  return lines
}
180027
function splitIniLine(line) {
  var separator = line.indexOf('=');
  if (separator === -1) {
    return [line];
  }
  return [
    line.substr(0, separator),
    line.substr(separator + 1)
  ];
}
276767
function(line, index, lines) {
        var newLine;
        if (insideString('|>', line)) return line;
        // line does not have a one liner pipeline
        if (!line.match(/(\=|return)(.*?)(\|\>)/)) return line;
        // if next line has a pipe operator
        if (lines[index] && lines[index + 1].match(/^\s*\|\>/)) return line;

        // http://rubular.com/r/wiBJtf12Vn
        // (^.+?)     $1 value to pipe
        // \s*        optional spaces
        // (\|\>)     $2 |> pipe operator
        // (.*?)$     $3 tail minus first pipe ($2)
        //
        var parts = line.match(/(^.+?)\s*(\|\>)(.*?)$/);
        var head = parts[1]
        var tail = parts[2].concat(parts[3]);

        // process head depending on if it's immuttable or not
        if (head.match('Immutable')) {
            head = head.replace('Immutable', '_.chain(Immutable');
        }
        else if (head.match(/^\s*return/)) {
            head = head.replace('return ', 'return _.chain(');
        }
        else if (head.match(/\s=\s/)) {
            head = head.replace('= ', '= _.chain(');
        }

        tail = tail.replace(/(\s*\|\>\s*)/g, function($0, $1) {
            return ').pipesCall(';
        })

        return head + tail + ').value();'
    }
16023
function (line) {
		line = line || "";
		line = line.trim();

		if (line.charAt(0) === "#") {
			return true;
		}

		return false;
	}