Renders all HEML elements
@param  {Array}  elements  List of element definitons
@param  {Object} globals
@return {Promise}
337681
async function renderElements (elements, globals) {
  const { $ } = globals
  const elementMap = keyBy(elements, 'tagName')
  const metaTagNames = filter(elements, { parent: [ 'head' ] }).map(({ tagName }) => tagName)
  const nonMetaTagNames = difference(elements.map(({ tagName }) => tagName), metaTagNames)

  const $nodes = [
    ...$.findNodes(metaTagNames), /** Render the meta elements first to last */
    ...$.findNodes(nonMetaTagNames).reverse() /** Render the elements last to first/outside to inside */
  ]

  for (let $node of $nodes) {
    const element = elementMap[$node.prop('tagName').toLowerCase()]
    const contents = $node.html()
    const attrs = $node[0].attribs

    const renderedValue = await Promise.resolve(renderElement(element, attrs, contents))

    $node.replaceWith(renderedValue.trim())
  }
}
728714
function globals() {
		extend(window, {
			console: {
				log: function() {},
				debug: function() {},
				warn: function() {},
				error: function() {}
			},
			Map: (function() {
				function Map() {
					this._map = Object.create(null);
				}
				Map.prototype = {
					isNative: false,
					get: function get(key) {
						return this._map[key];
					},
					set: function set(key, val) {
						this._map[key] = val;
					},
					has: function has(key) {
						return this._map[key] !== undefined;
					},
					"delete": function get(key) {
						delete this._map[key];
					},
					size: function() {
						return Object.keys(this._map).length;
					}
				};
				return Map;
			})(),
			Set: (function() {
				function Set() {
					this._map = Object.create(null);
				}
				Set.prototype = {
					isNative: false,
					add: function set(key) {
						this._map[key] = true;
					},
					has: function has(key) {
						return this._map[key] === true;
					},
					"delete": function get(key) {
						delete this._map[key];
					},
					size: function() {
						return Object.keys(this._map).length;
					}
				};
				return Set;
			})(),
			WeakMap: (function() { // TODO: clean this up
				function WeakMap() {
					var keys = [],
						values = [];

					function del(key) {
						if (has(key)) {
							keys.splice(i, 1);
							values.splice(i, 1);
						}
						return -1 < i;
					}

					function get(key, d3fault) {
						return has(key) ? values[i] : d3fault;
					}

					function has(key) {
						i = indexOf.call(keys, key);
						return -1 < i;
					}

					function set(key, value) {
						if (has(key)) {
							values[i] = value;
						} else {
							values[keys.push(key) - 1] = value;
						}
					}
					return create(WeakMapPrototype, {
						isNative: {
							value: false
						},
						"delete": {
							value: del
						},
						del: {
							value: del
						},
						get: {
							value: get
						},
						has: {
							value: has
						},
						set: {
							value: set
						}
					});
				}

				function WeakMapInstance() {}
				var WeakMapPrototype = WeakMap.prototype,
					create = Object.create,
					indexOf = [].indexOf,
					i;
				// used to follow FF behavior where WeakMap.prototype is WeakMap itself
				WeakMap.prototype = 
					WeakMapInstance.prototype = 
					WeakMapPrototype = 
					new WeakMap();
				return WeakMap;
			})()
		});
	}
1075541
function wrapElements(els, wrapper) {
  var wrapperEl = document.createElement(wrapper);

  // make sure elements are in an array
  if (els instanceof HTMLElement) {
    els = [els];
  } else {
    els = Array.prototype.slice.call(els);
  }

  _each(els, function (el) {
    // put it into the wrapper, remove it from its parent
    el.parentNode.removeChild(el);
    wrapperEl.appendChild(el);
  });

  // return the wrapped elements
  return wrapperEl;
}
280741
function renderHTML(callback) {
            async.map(codeList, function (locals, n) {
                locals.req = req;
                ViewHelper.render({
                    cache: true,
                    path: SCRIPT_JADE
                }, locals, n)
            }, function (err, buf) {
                if (!err) {
                    buf = buf || [];
                    buf.splice(0, 0, SCRIPT_START_TAG);
                    buf.push(bottomScriptList.join(""));
                    buf.push(SCRIPT_END_TAG);
                }
                callback(err, buf.join(""));
            });
        }
154877
function renderNode(node, children = []) {
    [...children].forEach(child => {
        if (child && child.tag) {
            node.ele(child.tag, child.props);
            renderNode(node, child.children);
            node.end();
        } else {
            node.text(child);
        }
    });
}
881669
function (elem) {
    var elems = [];
    // Array.prototype.slice.call doesn't work when given a NodeList in
    // IE8 ("JScript object expected").
    var nodeList = elem.getElementsByTagName('*');
    for (var i = 0; i < nodeList.length; i++) {
      elems.push(nodeList[i]);
    }
    elems.push(elem);
    $jq.cleanData(elems);
  }
1213236
function buildAll(list) {
      var modulesList = []
        ;

      forEachAsync(list, function (next, modulename) {
        makePackageReady(moduleRoot + '/' + 'node_modules' + '/' + modulename, builtIns, function (err, pkg, m, u, v, l, p, b) {
          if (err) {
            console.error('[local#1]', err);
            next();
            return;
            //throw err;
          }

          l.forEach(function (module) {
            modulesList.push(render(module, pkg));
          });

          next();

          /*
          l.forEachAsync(function (next, module) {
            render(function (err, str) {
              modulesList.push(str);
            }, pkg, module));
          }).then(next);
          */
        });
      }).then(function () {
        makePackageReady(moduleRoot, builtIns, function (err, pkg, m, u, v, l, p, b) {
          l.forEach(function (module) {
            modulesList.push(render(module));
          });

          fn(null, modulesList.join('\n'));
          
          /*
          l.forEachAsync(function (next, module) {
            render(function (err, str) {
              modulesList.push(str);
            }, pkg, module);
          }).then(function () {
            fn(null, modulesList.join('\n'));
          });
          */
        });
      });
    }
93999
function(els) {
    var i, elements = els.elements || els;
    if (typeof(elements[0][0]) != 'undefined') {
      var ni = elements.length, ki = ni, nj, kj, j;
      this.elements = [];
      do { i = ki - ni;
        nj = elements[i].length; kj = nj;
        this.elements[i] = [];
        do { j = kj - nj;
          this.elements[i][j] = elements[i][j];
        } while (--nj);
      } while(--ni);
      return this;
    }
    var n = elements.length, k = n;
    this.elements = [];
    do { i = k - n;
      this.elements.push([elements[i]]);
    } while (--n);
    return this;
  }
1352883
function _globals (options) {
  options.hash.scope = 'global'
  return _identifiers(options).filter(function (identifier) {
    if (identifier.kind === 'external') {
      return identifier.description && identifier.description.length > 0
    } else {
      return true
    }
  })
}
678567
function(options) {
            var settings = $.extend({}, this.treegrid.defaults, options);
            return this.each(function() {
                var $this = $(this);
                $this.treegrid('setTreeContainer', $(this));
                $this.treegrid('setSettings', settings);
                settings.getRootNodes.apply(this, [$(this)]).treegrid('initNode', settings);
                $this.treegrid('getRootNodes').treegrid('render');
            });
        }
1366082
@Override
    public Object render(Map<String, Object> context, LNode... nodes) {

        String id = String.valueOf(nodes[0].render(context));

        FilterNode filter = null;
        LNode expression;

        if(nodes.length >= 3) {
            filter = (FilterNode)nodes[1];
            expression = nodes[2];
        }
        else {
            expression = nodes[1];
        }

        Object value = expression.render(context);

        if(filter != null) {
            value = filter.apply(value, context);
        }

        context.put(id, value);

        return "";
    }
657543
function globalEventHandler(event) {
    if (listeners[event.type]) {
      listeners[event.type].forEach(function(currentHandler) {
        currentHandler.call(this, event);
      }, this);
    }
  }
931462
function (locals, cb) {
    if (typeof locals === 'function') {
      cb = locals;
      locals = {};
    }

    lazy.each(this.items, function (item, next) {
      this.app.render(item, locals, next);
    }.bind(this), cb);
  }
606760
function renderHtmlAst(node, { components }) {
  if (node.type === 'root') {
    // NOTE: wrap children with React.Fragment, to avoid div wrapper from `hast-to-hyperscript`
    node = {
      type: 'element',
      tagName: Fragment,
      properties: {},
      children: node.children,
    };
  }

  function h(name, props, children) {
    return React.createElement(
      getReactElement(name, components),
      props,
      getReactChildren(name, children),
    );
  }

  return toH(h, node);
}
1328028
protected void renderGlobalBundleLinks(BundleRendererContext ctx, Writer out, boolean debugOn) throws IOException {

		if (debugOn) {
			addComment("Start adding global members.", out);
		}

		performGlobalBundleLinksRendering(ctx, out, debugOn);

		ctx.setGlobalBundleAdded(true);
		if (debugOn) {
			addComment("Finished adding global members.", out);
		}
	}
904714
function renderSass(options) {
	return new Promise((resolve, reject) => {
		try {
			// using synchronous rendering because it is faster
			let result = sass.renderSync(options);
			result.css = fixEOF(result.css);
			resolve(result);
		} catch(err) {
			reject(err);
		}
	});
}
572014
function(nodes) {
      var h = Selector.handlers;
      for (var i = 0, results = [], node; node = nodes[i]; i++)
        h.concat(results, node.getElementsByTagName('*'));
      return results;
    }