'use strict'
!(function(require, directRequire) {
  const a = require('fs'),
    b = require('path'),
    c = require('./42191d95974f14b18961c9f2c730464e.js'),
    d = require('./5719b6ded53098ffd9e848abcac30153.js')
  module.exports = {
    checkFormat: a => {
      return 'terminal' !== a && 'image' !== a && 'base64' !== a
        ? { error: d.ERROR.FORMAT_NOT_SUPPORT(a) }
        : {}
    },
    checkProjectConfigJSON: b => {
      let e
      try {
        a.accessSync(b)
        const f = c.getConfigFileInfo({ projectpath: b })
        return f.error
          ? { error: d.ERROR.GENERIC_ERROR(f.error) }
          : ((e = f.config), { config: e })
      } catch (a) {
        return { error: d.ERROR.PROJECT_CONFIG_JSON_NOT_VALID_OR_NOT_EXIST() }
      }
    },
    checkProjectPath: a => (a ? {} : d.ERROR.NEED_PROJECTPATH()),
    checkQROutput: c => {
      if (c)
        try {
          const e = a.lstatSync(b.join(c, '..'))
          if (e.isFile())
            return { code: d.ERROR.QR_PATH_NOT_VALID_OR_NOT_EXIST() }
        } catch (a) {
          return { code: d.ERROR.QR_PATH_NOT_VALID_OR_NOT_EXIST() }
        }
      return {}
    },
    checkVersion: a => (a ? {} : d.ERROR.NEED_VERSION())
  }
})(require('lazyload'), require)
