/* compatibility: LZMA-JS (https://github.com/nmrugg/LZMA-JS)
497684
function singleStringCoding(stream, string, on_finish, on_progress) {
  on_progress = on_progress || function() {};
  on_finish = on_finish || function() {};

  // possibly our input is an array of byte integers
  // or a typed array
  if (!Buffer.isBuffer(string))
    string = Buffer.from(string);

  var deferred = {}, failed = false;

  stream.once('error', function(err) {
    failed = true;
    on_finish(null, err);
  });

  // emulate Promise.defer()
  deferred.promise = new Promise(function(resolve, reject) {
    deferred.resolve = resolve;
    deferred.reject = reject;
  });

  // Since using the Promise API is optional, generating unhandled
  // rejections is not okay.
  deferred.promise.catch(noop);

  stream.once('error', function(e) {
    deferred.reject(e);
  });

  var buffers = [];

  stream.on('data', function(b) {
    buffers.push(b);
  });

  stream.once('end', function() {
    var result = Buffer.concat(buffers);

    if (!failed) {
      on_progress(1.0);
      on_finish(result);
    }

    if (deferred)
      deferred.resolve(result);
  });

  on_progress(0.0);

  stream.end(string);

  if (deferred)
    return deferred.promise;
}
774118
function createECMA5Shims() {
  // from: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js

  // ES-5 15.3.4.5
  // http://www.ecma-international.org/publications/files/drafts/tc39-2009-025.pdf
  if (!Function.prototype.bind) {
    var slice = Array.prototype.slice;
    Function.prototype.bind = function bind(that) { // .length is 1
      var target = this;
      if (typeof target.apply !== "function"
      || typeof target.call !== "function")
      return new TypeError();
      var args = slice.call(arguments);

      function bound() {

        if (this instanceof bound) {

          var self = Object.create(target.prototype);
          target.apply(self, args.concat(slice.call(arguments)));
          return self;
        } else {
          return target.call.apply(target, args.concat(slice
            .call(arguments)));
        }

      }
      bound.length = (typeof target === "function" ? Math.max(
      target.length - args.length, 0) : 0);
      return bound;
    };
  }

  // ES5 15.4.3.2
  if (!Array.isArray) {
    Array.isArray = function isArray(obj) {
      return Object.prototype.toString.call(obj) === "[object Array]";
    };
  }

  // ES5 15.4.4.18
  if (!Array.prototype.forEach) {
    Array.prototype.forEach = function forEach(block, thisObject) {
      var len = +this.length;
      for ( var i = 0; i < len; i++) {
        if (i in this) {
          block.call(thisObject, this[i], i, this);
        }
      }
    };
  }

  // ES5 15.4.4.19
  // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
  if (!Array.prototype.map) {
    Array.prototype.map = function map(fun /* , thisp */) {
      var len = +this.length;
      if (typeof fun !== "function")
        throw new TypeError();

      var res = new Array(len);
      var thisp = arguments[1];
      for ( var i = 0; i < len; i++) {
        if (i in this)
          res[i] = fun.call(thisp, this[i], i, this);
      }

      return res;
    };
  }

  // ES5 15.4.4.20
  if (!Array.prototype.filter) {
    Array.prototype.filter = function filter(block /* , thisp */) {
      var values = [];
      var thisp = arguments[1];
      for ( var i = 0; i < this.length; i++)
        if (block.call(thisp, this[i]))
          values.push(this[i]);
        return values;
    };
  }

  // ES5 15.4.4.16
  if (!Array.prototype.every) {
    Array.prototype.every = function every(block /* , thisp */) {
      var thisp = arguments[1];
      for ( var i = 0; i < this.length; i++)
        if (!block.call(thisp, this[i]))
          return false;
        return true;
    };
  }

  // ES5 15.4.4.17
  if (!Array.prototype.some) {
    Array.prototype.some = function some(block /* , thisp */) {
      var thisp = arguments[1];
      for ( var i = 0; i < this.length; i++)
        if (block.call(thisp, this[i]))
          return true;
        return false;
    };
  }

  // ES5 15.4.4.21
  // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
  if (!Array.prototype.reduce) {
    Array.prototype.reduce = function reduce(fun /* , initial */) {
      var len = +this.length;
      if (typeof fun !== "function")
        throw new TypeError();

      // no value to return if no initial value and an empty array
      if (len === 0 && arguments.length === 1)
        throw new TypeError();

      var i = 0;
      if (arguments.length >= 2) {
        var rv = arguments[1];
      } else {
        do {
          if (i in this) {
            rv = this[i++];
            break;
          }

          // if array contains no values, no initial value to return
          if (++i >= len)
            throw new TypeError();
        } while (true);
      }

      for (; i < len; i++) {
        if (i in this)
          rv = fun.call(null, rv, this[i], i, this);
      }

      return rv;
    };
  }

  // ES5 15.4.4.22
  // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
  if (!Array.prototype.reduceRight) {
    Array.prototype.reduceRight = function reduceRight(fun /* , initial */) {
      var len = +this.length;
      if (typeof fun !== "function")
        throw new TypeError();

      // no value to return if no initial value, empty array
      if (len === 0 && arguments.length === 1)
        throw new TypeError();

      var rv, i = len - 1;
      if (arguments.length >= 2) {
        rv = arguments[1];
      } else {
        do {
          if (i in this) {
            rv = this[i--];
            break;
          }

          // if array contains no values, no initial value to return
          if (--i < 0)
            throw new TypeError();
        } while (true);
      }

      for (; i >= 0; i--) {
        if (i in this)
          rv = fun.call(null, rv, this[i], i, this);
      }

      return rv;
    };
  }

  // ES5 15.4.4.14
  if (!Array.prototype.indexOf) {
    Array.prototype.indexOf = function indexOf(value /* , fromIndex */) {
      var length = this.length;
      if (!length)
        return -1;
      var i = arguments[1] || 0;
      if (i >= length)
        return -1;
      if (i < 0)
        i += length;
      for (; i < length; i++) {
        if (!(i in this))
          continue;
        if (value === this[i])
          return i;
      }
      return -1;
    };
  }

  // ES5 15.4.4.15
  if (!Array.prototype.lastIndexOf) {
    Array.prototype.lastIndexOf = function lastIndexOf(value) {
      var length = this.length;
      if (!length)
        return -1;
      var i = arguments[1] || length;
      if (i < 0)
        i += length;
      i = Math.min(i, length - 1);
      for (; i >= 0; i--) {
        if (!(i in this))
          continue;
        if (value === this[i])
          return i;
      }
      return -1;
    };
  }

  // ES5 15.9.4.4
  if (!Date.now) {
    Date.now = function now() {
      return new Date().getTime();
    };
  }
}
148694
function compile(
  source,
  filename = '',
  includeModule = false,
  debugMode = false,
) {
  let res
  let resName
  let errors

  try {
    const [moduleName, bsCode, diagnosticErrors] = Retyped.compile(filename, source, debugMode)
    const fmtCode = format(bsCode)
    res = fmtCode
    resName = moduleName
    errors = diagnosticErrors
  } catch (e) {
    console.error(e)
    throw new Error(`${e[0][0]}`)
  }

  if (res.includes('SYNTAX ERROR>')) {
    throw new Error(res)
  }

  if (!includeModule) {
    return res
  } else {
    return {
      moduleName: resName,
      bsCode: res,
      diagnosticErrors: errors
    }
  }
}
1181148
function(fn) {
            asyncjs.each(modelNames, function(name, _fn) {
                // get model definition
                var modelDefinition = modelDefinitions[name];
                modelDefinition.__name = name;

                // get connection info
                var connectionInfo = lib.findConnection(mycro, name);
                if (!connectionInfo) {
                    mycro.log('silly', '[models] Unable to find explicit adapter for model (' + name + ')');
                    if (!defaultConnection ) {
                        return _fn('Unable to find adapter for model (' + name + ')');
                    } else {
                        connectionInfo = defaultConnection;
                    }
                }

                // validate handler exists
                var adapter = connectionInfo.adapter;
                if (!adapter.registerModel || !_.isFunction(adapter.registerModel) || adapter.registerModel.length < 3) {
                    return _fn('Invalid adapter api: adapters should define a `registerModel` method that accepts a connection object, model definition object, and a callback');
                }

                // hand off to adapter
                var registerModelCallback = function(err, model) {
                    if (err) {
                        return _fn(err);
                    }
                    if (!model) {
                        return _fn('No model (' + name + ') returned from `adapter.registerModel`');
                    }
                    mycro.models[name] = model;
                    _fn();
                };
                if (adapter.registerModel.length === 3) {
                    return adapter.registerModel(connectionInfo.connection, modelDefinition, registerModelCallback);
                } else if (adapter.registerModel.length === 4) {
                    return adapter.registerModel(connectionInfo.connection, modelDefinition, name, registerModelCallback);
                } else {
                    return adapter.registerModel(connectionInfo.connection, modelDefinition, name, mycro, registerModelCallback);
                }
            }, fn);
        }
484129
function(hljs) {
  return {
    aliases: ['rs'],
    keywords:
      'alignof as be box break const continue crate do else enum extern ' +
      'false fn for if impl in let loop match mod mut offsetof once priv ' +
      'proc pub pure ref return self sizeof static struct super trait true ' +
      'type typeof unsafe unsized use virtual while yield ' +
      'int i8 i16 i32 i64 ' +
      'uint u8 u32 u64 ' +
      'float f32 f64 ' +
      'str char bool',
    illegal: '</',
    contains: [
      hljs.C_LINE_COMMENT_MODE,
      hljs.C_BLOCK_COMMENT_MODE,
      hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
      {
        className: 'string',
        begin: /r(#*)".*?"\1(?!#)/
      },
      {
        className: 'string',
        begin: /'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/
      },
      {
        begin: /'[a-zA-Z_][a-zA-Z0-9_]*/
      },
      {
        className: 'number',
        begin: '\\b(0[xb][A-Za-z0-9_]+|[0-9_]+(\\.[0-9_]+)?([uif](8|16|32|64)?)?)',
        relevance: 0
      },
      {
        className: 'function',
        beginKeywords: 'fn', end: '(\\(|<)', excludeEnd: true,
        contains: [hljs.UNDERSCORE_TITLE_MODE]
      },
      {
        className: 'preprocessor',
        begin: '#\\[', end: '\\]'
      },
      {
        beginKeywords: 'type', end: '(=|<)',
        contains: [hljs.UNDERSCORE_TITLE_MODE],
        illegal: '\\S'
      },
      {
        beginKeywords: 'trait enum', end: '({|<)',
        contains: [hljs.UNDERSCORE_TITLE_MODE],
        illegal: '\\S'
      },
      {
        begin: hljs.IDENT_RE + '::'
      },
      {
        begin: '->'
      }
    ]
  };
}
1111528
function(mLib, mJS, mXML) {

	var grammars = [];
	grammars.push.apply(grammars, mLib.grammars);
	grammars.push.apply(grammars, mJS.grammars);
	grammars.push.apply(grammars, mXML.grammars);
	grammars.push({
		id: "orion.jsx",
		contentTypes: ["text/jsx"],
		patterns: [
			{
				begin: "</?[A-Za-z0-9]+",
				end: "/?>",
				captures: {
					0: {name: "meta.tag.jsx"}
				},
				patterns: [
					{include: "#jsExpression"},
					{include: "orion.lib#string_doubleQuote"},
					{include: "orion.lib#string_singleQuote"},
					{include: "orion.c-like#comment_singleLine"},
					{include: "orion.c-like#comment_block"}
				]
			}, {
				include: "orion.xml#ampersandEscape"
			}, {
				include: "orion.js"
			}
		],
		repository: {
			jsExpression: {
				begin: "\\{",
				end: "\\}",
				contentName: "source.js.embedded.jsx",
				patterns: [
					{include: "orion.js"}
				]
			}
		}
	});
	return {
		id: grammars[grammars.length - 1].id,
		grammars: grammars,
		keywords: []
	};
}
104526
function (match) {
/*Line 29 - 'AtomEvaluator.js' */                var nv = "v" + (path.length + 1);
/*Line 30 - 'AtomEvaluator.js' */                if (match.indexOf("$owner.") == 0) {
/*Line 31 - 'AtomEvaluator.js' */                    match = match.substr(7);
/*Line 32 - 'AtomEvaluator.js' */                } else
/*Line 33 - 'AtomEvaluator.js' */                {
/*Line 34 - 'AtomEvaluator.js' */                    if (match.indexOf("owner.") == 0) {
/*Line 35 - 'AtomEvaluator.js' */                        match = match.substr(6);
/*Line 36 - 'AtomEvaluator.js' */                    } else {
/*Line 37 - 'AtomEvaluator.js' */                        match = match.substr(1);
/*Line 38 - 'AtomEvaluator.js' */                    }
/*Line 39 - 'AtomEvaluator.js' */                }
/*Line 40 - 'AtomEvaluator.js' */                path.push(match.split('.'));
/*Line 41 - 'AtomEvaluator.js' */                vars.push(nv);
/*Line 42 - 'AtomEvaluator.js' */                return nv;
/*Line 43 - 'AtomEvaluator.js' */            }
80466
function isJSValueCompatibleWithColumnType(value, columnType) {
    
    // Allow NULL values to be stored in columns of any type
    if (_.isNull(value)) {
        return true;
    }
    
    switch (columnType) {
        case ColumnType.Object:
            return _.isObject(value);
        case ColumnType.Array:
            return _.isArray(value);
        case ColumnType.String:
        case ColumnType.Text:
            return true; // Allow any value to be stored in a string column
        case ColumnType.Boolean:
        case ColumnType.Bool:
        case ColumnType.Integer:
        case ColumnType.Int:
            return _.isBool(value) || _.isInteger(value);
        case ColumnType.Date:
            return _.isDate(value);
        case ColumnType.Real:
        case ColumnType.Float:
            return _.isNumber(value);
        default:
            return false;
    }
}
378346
function(val, ctx, partials, inverted, start, end, tags) {
      var pass;

      if (isArray(val) && val.length === 0) {
        return false;
      }

      if (typeof val == 'function') {
        val = this.ls(val, ctx, partials, inverted, start, end, tags);
      }

      pass = (val === '') || !!val;

      if (!inverted && pass && ctx) {
        ctx.push((typeof val == 'object') ? val : ctx[ctx.length - 1]);
      }

      return pass;
    }
718098
function canCompile(filename, altExts) {
  var exts = altExts || canCompile.EXTENSIONS;
  var ext = _path2["default"].extname(filename);
  return _lodashCollectionContains2["default"](exts, ext);
}
826513
def extract_lzma(archive, compression, cmd, verbosity, interactive, outdir):
    """"""
    return _extract(archive, compression, cmd, 'alone', verbosity, outdir)
685846
function transformJSX(ast, pragma) {
	(0, _assert2.default)(t.isFile(ast) || t.isProgram(ast), '<ast> must be a babel ast for transformJSX(ast: AST, pragma: String): AST');
	(0, _assert2.default)(typeof pragma === 'string' && pragma, '<pragma> must be a non-empty string for transformJSX(ast: AST, pragma: String): AST');

	const call = buildCall(pragma);

	(0, _babelTraverse2.default)(ast, {
		JSXElement: {
			exit: function exit(path) {
				const openingElement = path.get('openingElement');
				const expression = buildElementCall(call, openingElement);
				expression.arguments = [].concat(_toConsumableArray(expression.arguments), _toConsumableArray(path.node.children));
				path.replaceWith(t.inherits(expression, path.node));
			}
		}
	});
	return ast;
}
93499
function(html) {

            /*
                Must support the variation in templating syntax found here:
                https://lodash.com/docs#template
            */
            var regex = /<%= ([^ ]+) %>|\$\{ ?([^{} ]+) ?\}|\{\{([^{} ]+)\}\}/g;

            return function(data) {

                data = data || {};

                return html.replace(regex, function(match) {

                    var args = Array.from(arguments);
                    var attr = args.slice(1, 4).find(function(_attr) {
                        return !!_attr;
                    });

                    var attrArray = attr.split('.');
                    var value = data[attrArray.shift()];

                    while (value !== undefined && attrArray.length) {
                        value = value[attrArray.shift()];
                    }

                    return value !== undefined ? value : '';
                });
            };
        }
762351
function () {
/*Line 112 - 'AtomFormField.js' */                this._validate = true;
/*Line 113 - 'AtomFormField.js' */                if (!(this._required || this._regex || this._dataType))
/*Line 114 - 'AtomFormField.js' */                    return this._isValid === undefined ? true : this._isValid;



/*Line 118 - 'AtomFormField.js' */                if (this._isValid) {
/*Line 119 - 'AtomFormField.js' */                    AtomBinder.setValue(this, "error", "");
/*Line 120 - 'AtomFormField.js' */                    if (this._isValidSet) {
/*Line 121 - 'AtomFormField.js' */                        return true;
/*Line 122 - 'AtomFormField.js' */                    }
/*Line 123 - 'AtomFormField.js' */                }

/*Line 125 - 'AtomFormField.js' */                this._isValid = true;

/*Line 127 - 'AtomFormField.js' */                if (this._fieldValue !== undefined) {
/*Line 128 - 'AtomFormField.js' */                    this.validateValue(this._fieldValue);
/*Line 129 - 'AtomFormField.js' */                } else {
/*Line 130 - 'AtomFormField.js' */                    // check validity..
/*Line 131 - 'AtomFormField.js' */                    this.validateChildren(this._element);
/*Line 132 - 'AtomFormField.js' */                }
/*Line 133 - 'AtomFormField.js' */                if (this._isValid) {
/*Line 134 - 'AtomFormField.js' */                    AtomBinder.setValue(this, "error", "");
/*Line 135 - 'AtomFormField.js' */                }
/*Line 136 - 'AtomFormField.js' */                return this._isValid;
/*Line 137 - 'AtomFormField.js' */            }
731176
function () {

/*Line 47 - 'AtomForm.js' */                //if (!this.isValid()) {
/*Line 48 - 'AtomForm.js' */                //    return;
/*Line 49 - 'AtomForm.js' */                //}

/*Line 51 - 'AtomForm.js' */                this.validate();

/*Line 53 - 'AtomForm.js' */                var errors = this.get_errors();
/*Line 54 - 'AtomForm.js' */                if (errors.length) {
/*Line 55 - 'AtomForm.js' */                    var labels = document.getElementsByTagName("label");
/*Line 56 - 'AtomForm.js' */                    this.invokeAction({
/*Line 57 - 'AtomForm.js' */                        localWindow: {
/*Line 58 - 'AtomForm.js' */                            path: this.getTemplate("errorTemplate"),
/*Line 59 - 'AtomForm.js' */                            prop: {
/*Line 60 - 'AtomForm.js' */                                data: errors.map(function (i) {
/*Line 61 - 'AtomForm.js' */                                    var l = Atom.query(labels).firstOrDefault({ control: i.value });
/*Line 62 - 'AtomForm.js' */                                    if (l) {
/*Line 63 - 'AtomForm.js' */                                        i.label = $(l).text() + " (" + i.label + ")";
/*Line 64 - 'AtomForm.js' */                                    }
/*Line 65 - 'AtomForm.js' */                                    return i;
/*Line 66 - 'AtomForm.js' */                                }),
/*Line 67 - 'AtomForm.js' */                                title: "Form Errors"
/*Line 68 - 'AtomForm.js' */                            }
/*Line 69 - 'AtomForm.js' */                        }
/*Line 70 - 'AtomForm.js' */                    });
/*Line 71 - 'AtomForm.js' */                    return;
/*Line 72 - 'AtomForm.js' */                }

/*Line 74 - 'AtomForm.js' */                var data = this.preparePostData();
/*Line 75 - 'AtomForm.js' */                var url = AtomPromise.getUrl(this._postUrl);
/*Line 76 - 'AtomForm.js' */                var p = AtomPromise.json(url, { _tv: Atom.time() }, { type: this.get_method(), data: data });
/*Line 77 - 'AtomForm.js' */                p.then(this._success);
/*Line 78 - 'AtomForm.js' */                var errorNext = this._errorNext;
/*Line 79 - 'AtomForm.js' */                if (errorNext) {
/*Line 80 - 'AtomForm.js' */                    var self = this;
/*Line 81 - 'AtomForm.js' */                    p.failed(function (pr) {
/*Line 82 - 'AtomForm.js' */                        self.invokeAction(errorNext);
/*Line 83 - 'AtomForm.js' */                    });
/*Line 84 - 'AtomForm.js' */                }
/*Line 85 - 'AtomForm.js' */                p.invoke();
/*Line 86 - 'AtomForm.js' */            }
528744
function divmodInt64(src) {
  const hi32 = Math.floor(src / V2E32);
  const lo32 = src - (hi32 * V2E32);
  // assert.equal(roundedInt64(hi32, lo32), src);
  // assert(0 <= lo32);
  return {hi32, lo32};
}
130172
function isInputMIMETypeSupported( $mimeData )
    {
        $mimeTypes = $this->supportedInputMIMETypes();
        $mimeName = $mimeData;
        if ( is_array( $mimeData ) )
            $mimeName = $mimeData['name'];
        foreach ( $mimeTypes as $mimeType )
        {
            if ( strpos( $mimeType, '*' ) !== false )
            {
                $matchString = eZImageHandler::wildcardToRegexp( $mimeType );
                if ( preg_match( "#^" . $matchString . "$#", $mimeName ) )
                {
                    return true;
                }
            }
            else if ( $mimeType == $mimeName )
            {
                return true;
            }
        }
        return false;
    }