----------------------------------------------------------------------------- Helpers -----------------------------------------------------------------------------
495510
function fullPath(file, base) {
  if (!path.extname(file)) file += '.js'
  base = base ? path.dirname(base) : process.cwd()
  return path.resolve(base, file)
}
1018116
def handlebars_helpers
      helpers = []
      unless Handlebarer.configuration.helpers_path.nil?
        Dir["#{Handlebarer.configuration.helpers_path}/*.js"].each do |f|
          helpers << IO.read(f)
        end
      end
      helpers
    end
1203756
function (dt) {
            _.each(
                systems,
                function (system) {
                    if (_.has(system, 'update')) {
                        _.each(
                            entities,
                            function (entity) {
                                if (!_.isUndefined(entity)) {
                                    _.each(system.update, function (func, id) {
                                        if (entity.has(id)){
                                            func(entity, dt);
                                        }
                                    });
                                }
                            }
                        );
                    }
                }
            );
        }
354086
function helperWrapper (fn, args) {
    var _this = this
    var options = args[args.length - 1]
    var hash = options.hash

    // "fn" and "inverse" return strings. They must be able to handle promises
    // just as the compiled template and partials
    options.fn = options.fn && wrap(options.fn, prepareAndResolveMarkers)
    options.inverse = options.inverse && wrap(options.inverse, prepareAndResolveMarkers)

    // If there are any promises in the helper args or in the hash,
    // the evaluation of the helper cannot start before these promises are resolved.
    var promisesInArgs = anyApplies(args, isPromiseAlike)
    var promisesInHash = anyApplies(values(hash), isPromiseAlike)

    if (!promisesInArgs && !promisesInHash) {
      // No promises in hash or args. Act a normal as possible.
      var result = fn.apply(_this, args)
      return isPromiseAlike(result) ? markers.asMarker(result) : result
    }

    var promise = deep(args).then(function (resolvedArgs) {
      // We need "markers", because we are in a new event-loop-cycle now.
      return prepareAndResolveMarkers(function () {
        return fn.apply(_this, resolvedArgs)
      })
    })
    return markers.asMarker(promise)
  }
487177
function registerHelper(name, helper) {
    var s = this;
    s.helpers = s.helpers || {};
    s.helpers[name] = helper;
    return s;
  }
1031532
function __Collection(iterableOrGenerator) {
                    _classCallCheck(this, __Collection);

                    //#endregion
                    //#region Iterable
                    this.__iterable = null;
                    __assert(__isIterable(iterableOrGenerator) || __isGenerator(iterableOrGenerator), 'iterable or generator', iterableOrGenerator);
                    this.__iterable = iterableOrGenerator;
                }
1063212
function() {
                this.aliases.blockHelperMissing = 'helpers.blockHelperMissing';

                // We're being a bit cheeky and reusing the options value from the prior exec
                var params = [this.contextName(0)];
                this.setupParams('', 0, params, true);

                this.flushInline();

                var current = this.topStack();
                params.splice(1, 0, current);

                this.pushSource("if (!" + this.lastHelper + ") { " + current + " = blockHelperMissing.call(" + params.join(", ") + "); }");
            }
57808
function(model) {
    const maxLen = model.get("seq").length;
    const selection = [];
    const sels = this.g.selcol.getSelForRow(model.get("id"));
    const rows = find(sels, function(el) { return el.get("type") === "row"; });
    if ((typeof rows !== "undefined" && rows !== null)) {
      // full match
      const end = maxLen - 1;
      for (let n = 0; n <= end; n++) {
        selection.push(n);
      }
    } else if (sels.length > 0) {
      for (let i = 0, sel; i < sels.length; i++) {
        sel = sels[i];
        const start = sel.get("xStart");
        const end = sel.get("xEnd");
        for (let n = start; n <= end; n++) {
          selection.push(n);
        }
      }
    }

    return selection;
  }
736301
function(cb) {
  var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
  var text = cb.toString();
  var rawArgs = text.match(FN_ARGS)[1];
  if (rawArgs === '') {
    return [];
  } else {
    var trim = function(v) { return v.trim(); };
    var args = rawArgs.split(',').map(trim);
    return args;
  }
}
549702
function (editor, matchers) {
      for (var i = 0; i < matchers.length; i++) {
        var f = matchers[i];
        var result = f(editor);

        if (result) {
          return result;
        }
      }

      return null;
    }
512418
function Comment() {
    this.type = 'func'; //func or attr

    this.descs = [];
    this.attr = {
        name: null
    };
    this.func = {
        name: null,
        params: null
    };

    this.clazz = null; //class
    this.zuper = null; //super
    this.tags = {
        /*
        name:[val1,val2]
    */
    };
}
331004
function (format, view, data, helpers, callback, nodelist) {
		// if callback has expression prop its actually the nodelist
		if (callback !== undefined && typeof callback.expression === 'string') {
			nodelist = callback;
			callback = undefined;
		}
		
		// If helpers is a `function`, it is actually a callback.
		if (isFunction(helpers)) {
			callback = helpers;
			helpers = undefined;
		}

		// give templates the can namespace:
		helpers = Object.assign({ can: can }, helpers);

		// See if we got passed any deferreds.
		var deferreds = getDeferreds(data);
		var deferred, dataCopy, async, response;
		if (deferreds.length) {
			// Does data contain any deferreds?
			// The deferred that resolves into the rendered content...
			deferred = new Deferred();
			dataCopy = Object.assign({}, data);

			// Add the view request to the list of deferreds.
			deferreds.push(getRenderer(view, true));
			// Wait for the view and all deferreds to finish...
			Deferred.when.apply(can, deferreds)
				.then(function (resolved) {
					// Get all the resolved deferreds.
					var objs = makeArray(arguments),
						// Renderer is the last index of the data.
						renderer = objs.pop(),
						// The result of the template rendering with data.
						result;

					// Make data look like the resolved deferreds.
					if (isDeferred(data)) {
						dataCopy = usefulPart(resolved);
					} else {
						// Go through each prop in data again and
						// replace the defferreds with what they resolved to.
						for (var prop in data) {
							if (isDeferred(data[prop])) {
								dataCopy[prop] = usefulPart(objs.shift());
							}
						}
					}

					// Get the rendered result.
					result = can.view.renderTo(format, renderer, dataCopy, helpers, nodelist);

					// Resolve with the rendered view.
					deferred.resolve(result, dataCopy);

					// If there's a `callback`, call it back with the result.
					if (callback) {
						callback(result, dataCopy);
					}
				}, function () {
					deferred.reject.apply(deferred, arguments);
				});
			// Return the deferred...
			return deferred;
		} else {

			// If there's a `callback` function
			async = isFunction(callback);
			
			// get is called async but in
			// ff will be async so we need to temporarily reset
			deferred = Observation.ignore(getRenderer)(view, async);

			// If we are `async`...
			if (async) {
				// Return the deferred
				response = deferred;
				// And fire callback with the rendered result.
				deferred.then(function (renderer) {
					callback(data ? $view.renderTo(format, renderer, data, helpers, nodelist) : renderer);
				});
			} else {
				// if the deferred is resolved, call the cached renderer instead
				// this is because it's possible, with recursive deferreds to
				// need to render a view while its deferred is _resolving_.  A _resolving_ deferred
				// is a deferred that was just resolved and is calling back it's success callbacks.
				// If a new success handler is called while resoliving, it does not get fired by
				// jQuery's deferred system.  So instead of adding a new callback
				// we use the cached renderer.
				// We also add __view_id on the deferred so we can look up it's cached renderer.
				// In the future, we might simply store either a deferred or the cached result.
				if (deferred.state() === 'resolved' && deferred.__view_id) {
					var currentRenderer = $view.cachedRenderers[deferred.__view_id];
					var result =  data ? $view.renderTo(format, currentRenderer, data, helpers, nodelist) : currentRenderer;
					return result;
				} else {
					// Otherwise, the deferred is complete, so
					// set response to the result of the rendering.
					deferred.then(function (renderer) {
						response = data ? $view.renderTo(format, renderer, data, helpers, nodelist) : renderer;
					});
				}
			}

			return response;
		}
	}
173762
function(helperName, paramSize, params, useRegister) {
                var options = this.objectLiteral(this.setupOptions(helperName, paramSize, params));

                if (useRegister) {
                    this.useRegister('options');
                    params.push('options');
                    return 'options=' + options;
                } else {
                    params.push(options);
                    return '';
                }
            }
384682
function (node) {
        var parent = node._parent;
        while(parent) {
            if (parent === this) {
                return true;
            }
            parent = parent._parent;
        }
        return false;
    }
1037900
function help() {
    var padBtm = [0, 0, 1, 0];
    var msg = ' See additional required/optional arguments for each command below. \n';
    pargv
        .logo('Mustr', 'cyan')
        .ui(95)
        .join(chalk.magenta('Usage:'), 'mu', chalk.cyan('<cmd>'), '\n')
        .div({ text: chalk.bgBlue.white(msg) })
        .div({ text: chalk.cyan('help, h'), width: 35, padding: padBtm }, { text: chalk.gray('displays help and usage information.'), width: 40, padding: padBtm })
        .div({ text: chalk.cyan('init, i'), width: 35, padding: padBtm }, { text: chalk.gray('initialize the application for use with Mustr.'), width: 40, padding: padBtm })
        .div({ text: chalk.cyan('generate, g') + " " + chalk.white('<template>') + " " + chalk.magenta('[output]'), width: 35, padding: padBtm }, { text: chalk.gray('generates and renders a template.'), width: 40, padding: padBtm })
        .div({ text: chalk.white('<template>'), width: 35, padding: [0, 2, 0, 2] }, { text: chalk.gray('template to generate and compile.'), width: 40 }, { text: chalk.red('[required]'), align: 'right' })
        .div({ text: chalk.white('[output]'), width: 35, padding: [0, 2, 0, 2] }, { text: chalk.gray('output name/path for template'), width: 40, padding: padBtm })
        .div({ text: chalk.cyan('rollback, r') + " " + chalk.white('<name/id>') + " " + chalk.magenta('[output]'), width: 35, padding: padBtm }, { text: chalk.gray('Rolls back a template or component.'), width: 40, padding: padBtm })
        .div({ text: chalk.white('<name/id>'), width: 35, padding: [0, 2, 0, 2] }, { text: chalk.gray('the rollback id, index or template name.'), width: 40 })
        .div({ text: chalk.white('[output]'), width: 35, padding: [0, 2, 0, 2] }, { text: chalk.gray('output name/path for template'), width: 40, padding: padBtm })
        .div({ text: chalk.cyan('show, s') + " " + chalk.white('<type>'), width: 35, padding: padBtm }, { text: chalk.gray('shows details/stats for the given type.'), width: 40, padding: padBtm })
        .div({ text: chalk.white('<type>'), width: 35, padding: [0, 2, 0, 2] }, { text: chalk.gray('currently there is only one type "rollbacks"'), width: 40 })
        .show();
}
149907
function() {
    this._super();

    if (!this._options.implicit) {
      this.removeOverride('<plural>');
      this.removeOverride('<singular>Objects');
      this.removeOverride('add<Singular>');
      this.removeOverride('add<Plural>');
      this.removeOverride('remove<Singular>');
      this.removeOverride('remove<Plural>');
      this.removeOverride('clear<Plural>');

      this.overrideProperty('<singular>', 'item', 'set');
      this.addHelper('get<Singular>', 'item');
      this.addHelper('set<Singular>', 'set');
      this.addHelper('fetch<Singular>', 'fetch');
    }
  }
55204
function (element, predicateIds) {
      return function (editor) {
        for (var i = 0; i < predicateIds.length; i++) {
          if (predicateIds[i].predicate(element)) {
            return Matcher.result(predicateIds[i].id, Measure.getElementRect(editor, element));
          }
        }

        return null;
      };
    }