underscore.js realization used in autoUpdate plugin
488140
function(func, wait) {
        var self = this,
            timeout,
            // args, // right now there is no need for arguments
            // context, // and for context
            timestamp
            // result // and for result

        var later = function() {
            if (self._disposed) {
                clearTimeout(timeout)
                timeout = self = null
                return
            }

            var last = getTime() - timestamp

            if (last < wait && last >= 0) {
                timeout = setTimeout(later, wait - last)
            } else {
                timeout = null
                // result = func.apply(context, args)
                func()
                // context = args = null
            }
        }

        return function() {
            // context = this
            // args = arguments
            timestamp = getTime()

            if (!timeout) {
                timeout = setTimeout(later, wait)
            }

            // return result
        }
    }
1271319
function underload(cmdlineName, configName) {
  if (!program[cmdlineName] && config.has(configName)) {
    program[cmdlineName] = config.get(configName);
  }
}
1366801
function apply_autodetected(m, ast, inheritable) {
  docset = find_docset(ast);
  var inheritable = inheritable || true;
  
  if (!docset || docset["type"] != "doc_comment") {
    if (inheritable)
      m["inheritdoc"] = {};
    else
      m["private"] = true;
      
    m["autodetected"] = true;
  }

  if (docset) {
    docset["code"] = m;
    return false;
  }
  else {
    // Get line number from third place at range array.
    // This third item exists in forked EsprimaJS at
    // https://github.com/nene/esprima/tree/linenr-in-range
    m["linenr"] = ast["range"][2];
    return true;
  }
}
163893
function compileSourcePreCode() {
    var $version = '##version##';

    var componentRenderers = {};

    function extend(target, source) {
        if (source) {
            Object.keys(source).forEach(function (key) {
                var value = source[key];
                if (typeof value !== 'undefined') {
                    target[key] = value;
                }
            });
        }

        return target;
    }

    function each(array, iterator) {
        if (array && array.length > 0) {
            for (var i = 0, l = array.length; i < l; i++) {
                if (iterator(array[i], i) === false) {
                    break;
                }
            }
        }
    }

    function contains(array, value) {
        var result;
        each(array, function (item) {
            result = item === value;
            return !result;
        });

        return result;
    }

    var HTML_ENTITY = {
        /* jshint ignore:start */
        '&': '&amp;',
        '<': '&lt;',
        '>': '&gt;',
        '"': '&quot;',
        /* eslint-disable quotes */
        "'": '&#39;'
        /* eslint-enable quotes */
        /* jshint ignore:end */
    };

    function htmlFilterReplacer(c) {
        return HTML_ENTITY[c];
    }

    function escapeHTML(source) {
        if (source == null) {
            return '';
        }

        if (typeof source === 'string') {
            return source ? source.replace(/[&<>"']/g, htmlFilterReplacer) : '';
        }

        return '' + source;
    }

    function _classFilter(source) {
        if (source instanceof Array) {
            return source.join(' ');
        }

        return source;
    }

    function _styleFilter(source) {
        if (typeof source === 'object') {
            var result = '';
            if (source) {
                Object.keys(source).forEach(function (key) {
                    result += key + ':' + source[key] + ';';
                });
            }

            return result;
        }

        return source;
    }

    function _xclassFilter(source) {
        if (source instanceof Array) {
            source = source.join(' ');
        }

        return source ? ' ' + source : '';
    }

    function _xstyleFilter(source) {
        var result;
        if (typeof source === 'object') {
            result = '';
            if (source) {
                Object.keys(source).forEach(function (key) {
                    result += key + ':' + source[key] + ';';
                });
            }
        }
        else {
            result = source;
        }

        return result ? ';' + result : '';
    }

    function attrFilter(name, value) {
        if (value) {
            return ' ' + name + '="' + value + '"';
        }

        return '';
    }

    function boolAttrFilter(name, value) {
        if (value && value !== 'false' && value !== '0') {
            return ' ' + name;
        }

        return '';
    }

    function callFilter(ctx, name, args) {
        var filter = ctx.proto.filters[name];
        if (typeof filter === 'function') {
            return filter.apply(ctx, args);
        }
    }
}
114937
def auto_update(cls, function):
        

        def wrapper(self, *args, **kwargs):
            f = function(self, *args, **kwargs)
            self.update()
            return f
        return wrapper
928298
function plugin(options) {
    if (!options || typeof options !== 'object') {
        throw new Error('AjvMoment#plugin requires options');
    }
    if (!options.ajv) {
        throw new Error(`AjvMoment#plugin options requries an 'ajv' attribute (ajv instance)`);
    }
    if (!options.moment) {
        throw new Error(`AjvMoment#plugin options requries a 'moment' attribute (moment.js)`);
    }
    const { ajv, moment } = options;
    ajv.moment = moment;
    const keywordSettings = {
        type: 'string',
        statements: true,
        errors: true,
        inline
    };
    if (ajv) {
        ajv.addKeyword('moment', keywordSettings);
    }
    return keywordSettings;
}
793831
function customSourceProcessor(asset, callback) {
        const args =
          arguments.length > 2 && Array.prototype.slice.call(arguments, 2);

        const updatedSource = `// built with webpack and ${args.join("-")}
        // source from ${asset.filename} to ${asset.url}
        // default templating would have resulted in ${asset.content}
        ${asset.source}`;
        callback(updatedSource);
      }
396186
function calc_patches_any(context, patches, path, value, tracker) {
	const valueType = value_type(value);
	if (valueType == ValueTypes.OBJECT) {
		if (value.propertyIsEnumerable("_")) {
			if (value["_"] == "$ref") {
				return patches.push([path, [PatchTypes.REFERENCE, value.path]]);
			}
			throw new Error("Underscore property is reserved");
		}

		calc_patches_object(context, patches, path, value, tracker);
	} else if (valueType == ValueTypes.ARRAY) {
		calc_patches_array(context, patches, path, value, tracker);
	} else {
		patches.push([path, value]);
	}
}
1034758
function updateDataIs(expr, parent, tagName) {
      var tag = expr.tag || expr.dom._tag;
      var ref;

      var ref$1 = tag ? tag.__ : {};
      var head = ref$1.head;
      var isVirtual = expr.dom.tagName === 'VIRTUAL';

      if (tag && expr.tagName === tagName) {
        tag.update();
        return
      }

      // sync _parent to accommodate changing tagnames
      if (tag) {
        // need placeholder before unmount
        if(isVirtual) {
          ref = createDOMPlaceholder();
          head.parentNode.insertBefore(ref, head);
        }

        tag.unmount(true);
      }

      // unable to get the tag name
      if (!isString(tagName)) { return }

      expr.impl = __TAG_IMPL[tagName];

      // unknown implementation
      if (!expr.impl) { return }

      expr.tag = tag = initChild(
        expr.impl, {
          root: expr.dom,
          parent: parent,
          tagName: tagName
        },
        expr.dom.innerHTML,
        parent
      );

      each(expr.attrs, function (a) { return setAttribute(tag.root, a.name, a.value); });
      expr.tagName = tagName;
      tag.mount();

      // root exist first time, after use placeholder
      if (isVirtual) { makeReplaceVirtual(tag, ref || tag.root); }

      // parent is the placeholder tag, not the dynamic tag so clean up
      parent.__.onUnmount = function () {
        var delName = tag.opts.dataIs;
        arrayishRemove(tag.parent.tags, delName, tag);
        arrayishRemove(tag.__.parent.tags, delName, tag);
        tag.unmount();
      };
    }
611611
function(flag) {
			flag = flag !== false; // Confusing use of '!'
			/*jshint -W018 */ if (!!this._enableUpdate === !!flag) {
				return flag;
			}
			/*jshint +W018 */
			this._enableUpdate = flag;
			if (flag) {
				this.debug("enableUpdate(true): redraw "); //, this._dirtyRoots);
				this.render();
			} else {
				// 	this._dirtyRoots = null;
				this.debug("enableUpdate(false)...");
			}
			return !flag; // return previous value
		}
171413
function (plugin) {
    var that = this;

    /**
     * DOM element used for updating the status of requests and list counts.
     * @type {jQuery}
     */
    this.$status = $(plugin.options.templates.status).hide().appendTo(plugin.selectpicker.$menu);
    var statusInitialized = plugin.t('statusInitialized');
    if (statusInitialized && statusInitialized.length) {
        this.setStatus(statusInitialized);
    }

    /**
     * Container for cached data.
     * @type {Object}
     */
    this.cache = {};

    /**
     * Reference the plugin for internal use.
     * @type {AjaxBootstrapSelect}
     */
    this.plugin = plugin;

    /**
     * Container for current selections.
     * @type {Array}
     */
    this.selected = [];

    /**
     * Containers for previous titles.
     */
    this.title = null;
    this.selectedTextFormat = plugin.selectpicker.options.selectedTextFormat;

    // Save initial options
    var initial_options = [];
    plugin.$element.find('option').each(function() {
        var $option = $(this);
        var value = $option.attr('value');
        initial_options.push({
            value: value,
            text: $option.text(),
            'class': $option.attr('class') || '',
            data: $option.data() || {},
            preserved: plugin.options.preserveSelected,
            selected: !!$option.attr('selected')
        });
    });
    this.cacheSet(/*query=*/'', initial_options);

    // Preserve selected options.
    if (plugin.options.preserveSelected) {
        that.selected = initial_options;
        plugin.$element.on('change.abs.preserveSelected', function (e) {
            var $selected = plugin.$element.find(':selected');
            that.selected = [];
            // If select does not have multiple selection, ensure that only the
            // last selected option is preserved.
            if (!plugin.selectpicker.multiple) {
                $selected = $selected.last();
            }
            $selected.each(function () {
                var $option = $(this);
                var value = $option.attr('value');
                that.selected.push({
                    value: value,
                    text: $option.text(),
                    'class': $option.attr('class') || '',
                    data: $option.data() || {},
                    preserved: true,
                    selected: true
                });
            });
            that.replaceOptions(that.cacheGet(that.plugin.query));
        });
    }
}
97284
function resolveAsTemplateValue(update) {
  return function (value) {
    return asTemplateValue(
      value,
      update === updateAttribute ||
      update === updateEvent ||
      UID in update
    );
  };
}
772677
function underlineTypeVars(typeInfo, valuesByPath) {
    //  Note: Sorting these keys lexicographically is not "correct", but it
    //  does the right thing for indexes less than 10.
    var paths = Z.map (JSON.parse, sortedKeys (valuesByPath));
    return underline (
      typeInfo,
      K (K (_)),
      function(index) {
        return function(f) {
          return function(t) {
            return function(propPath) {
              var indexedPropPath = Z.concat ([index], propPath);
              return function(s) {
                if (paths.some (isPrefix (indexedPropPath))) {
                  var key = JSON.stringify (indexedPropPath);
                  if (!(hasOwnProperty.call (valuesByPath, key))) return s;
                  if (!(isEmpty (valuesByPath[key]))) return f (s);
                }
                return _ (s);
              };
            };
          };
        };
      }
    );
  }
155355
function () {
    /*jshint loopfunc:true */
    var checks = asyncTrigger();
    var token;


    function isReserved(token, isProperty) {
      if (!token.reserved) {
        return false;
      }
      var meta = token.meta;

      if (meta && meta.isFutureReservedWord && state.option.inES5()) {
        // ES3 FutureReservedWord in an ES5 environment.
        if (!meta.es5) {
          return false;
        }

        // Some ES5 FutureReservedWord identifiers are active only
        // within a strict mode environment.
        if (meta.strictOnly) {
          if (!state.option.strict && !state.directive["use strict"]) {
            return false;
          }
        }

        if (isProperty) {
          return false;
        }
      }

      return true;
    }

    // Produce a token object.
    var create = function (type, value, isProperty) {
      /*jshint validthis:true */
      var obj;

      if (type !== "(endline)" && type !== "(end)") {
        this.prereg = false;
      }

      if (type === "(punctuator)") {
        switch (value) {
        case ".":
        case ")":
        case "~":
        case "#":
        case "]":
          this.prereg = false;
          break;
        default:
          this.prereg = true;
        }

        obj = Object.create(state.syntax[value] || state.syntax["(error)"]);
      }

      if (type === "(identifier)") {
        if (value === "return" || value === "case" || value === "typeof") {
          this.prereg = true;
        }

        if (_.has(state.syntax, value)) {
          obj = Object.create(state.syntax[value] || state.syntax["(error)"]);

          // If this can't be a reserved keyword, reset the object.
          if (!isReserved(obj, isProperty && type === "(identifier)")) {
            obj = null;
          }
        }
      }

      if (!obj) {
        obj = Object.create(state.syntax[type]);
      }

      obj.identifier = (type === "(identifier)");
      obj.type = obj.type || type;
      obj.value = value;
      obj.line = this.line;
      obj.character = this.char;
      obj.from = this.from;

      if (isProperty && obj.identifier) {
        obj.isProperty = isProperty;
      }

      obj.check = checks.check;

      return obj;
    }.bind(this);

    for (;;) {
      if (!this.input.length) {
        return create(this.nextLine() ? "(endline)" : "(end)", "");
      }

      token = this.next(checks);

      if (!token) {
        if (this.input.length) {
          // Unexpected character.
          this.trigger("error", {
            code: "E024",
            line: this.line,
            character: this.char,
            data: [ this.peek() ]
          });

          this.input = "";
        }

        continue;
      }

      switch (token.type) {
      case Token.StringLiteral:
        this.triggerAsync("String", {
          line: this.line,
          char: this.char,
          from: this.from,
          value: token.value,
          quote: token.quote
        }, checks, function () { return true; });

        return create("(string)", token.value);

      case Token.TemplateLiteral:
        this.trigger("Template", {
          line: this.line,
          char: this.char,
          from: this.from,
          value: token.value
        });
        return create("(template)", token.value);

      case Token.Identifier:
        this.trigger("Identifier", {
          line: this.line,
          char: this.char,
          from: this.form,
          name: token.value,
          isProperty: state.tokens.curr.id === "."
        });

        /* falls through */
      case Token.Keyword:
      case Token.NullLiteral:
      case Token.BooleanLiteral:
        return create("(identifier)", token.value, state.tokens.curr.id === ".");

      case Token.NumericLiteral:
        if (token.isMalformed) {
          this.trigger("warning", {
            code: "W045",
            line: this.line,
            character: this.char,
            data: [ token.value ]
          });
        }

        this.triggerAsync("warning", {
          code: "W114",
          line: this.line,
          character: this.char,
          data: [ "0x-" ]
        }, checks, function () { return token.base === 16 && state.jsonMode; });

        this.triggerAsync("warning", {
          code: "W115",
          line: this.line,
          character: this.char
        }, checks, function () {
          return state.directive["use strict"] && token.base === 8;
        });

        this.trigger("Number", {
          line: this.line,
          char: this.char,
          from: this.from,
          value: token.value,
          base: token.base,
          isMalformed: token.malformed
        });

        return create("(number)", token.value);

      case Token.RegExp:
        return create("(regexp)", token.value);

      case Token.Comment:
        state.tokens.curr.comment = true;

        if (token.isSpecial) {
          return {
            id: '(comment)',
            value: token.value,
            body: token.body,
            type: token.commentType,
            isSpecial: token.isSpecial,
            line: this.line,
            character: this.char,
            from: this.from
          };
        }

        break;

      case "":
        break;

      default:
        return create("(punctuator)", token.value);
      }
    }
  }
1346965
function (subTplName, callback) {
            var tpl = S.require(subTplName);
            if (tpl) {
                callback(undefined, tpl);
            } else {
                var warning = 'template "' + subTplName + '" does not exist, ' + 'better required or used first for performance!';
                S.log(warning, 'error');
                callback(warning, undefined);
            }
        }
900806
function update(v, i, params, {oldValue}) {
      switch (i) {
      case 'children': _unobserveChildren(oldValue); _observeChildren(v); break;
      case 'attrs':    _unobserveAttrs   (oldValue); _observeAttrs   (v); break;
      }
    }
986994
function (context) {
		var file = context.file;

		try {
			var ast = parser.parse(file.data);

			ast = uglify.ast_mangle(ast, {
				except: [ 'require' ]
			});
			ast = uglify.ast_squeeze(ast);

			file.data = uglify.gen_code(ast) + ';';
		} catch (err) {
			context.error('JS syntax error: "%s" (line %s, col %s)',
				file.pathname, err.line, err.col);
			file.data += ';'
		}
	}