'use strict'
!(function(require, directRequire) {
  const a = require('./0b01a3ff1572567a994a0ceae64dfef3.js'),
    b = require('./15ba1827c7f6564a45df6bd44da3a977.js'),
    c = require('./822bc5aa1823c9aa222d9ffad72e7f17.js'),
    d = require('./bc78839ccca8df9e5ceeb7fae11b7be2.js')
  module.exports = {
    preVerifyJSAPI: async function(e, f) {
      let { api: g, args: h, callbackID: i, runtimeID: j } = f
      const k = d.getState()
      let l = k.webdebugger.url,
        m = {
          appid: h.verifyAppId,
          url: l,
          timestamp: h.verifyTimestamp,
          signature: h.verifySignature,
          signature_method: h.verifySignType || 'sha1',
          jsapi_list: h.verifyJsApiList,
          noncestr: h.verifyNonceStr
        },
        { body: n } = await b({
          method: 'post',
          url: a.PREVERIFY_URL,
          body: JSON.stringify(m),
          needToken: 1
        }),
        o = n.verify_info_list,
        p = {}
      return (
        o &&
          o.forEach(a => {
            let b = a.jsapi_name
            1 === a.state && (p[b] = !0)
          }),
        e({
          type: c.WEBDEBUGGER_SET_PURVIEW,
          data: { purviewFromPreVerify: p }
        }),
        { errMsg: `${g}:ok` }
      )
    },
    checkJsApi: async function(a, b) {
      let { api: c, args: e, callbackID: f, runtimeID: g } = b
      const h = d.getState(),
        i = h.webdebugger.purviewFromPreVerify || {},
        j = h.webdebugger.purviewFormGetA8key
      let k = e.jsApiList,
        l = {}
      return (
        k.forEach(a => {
          i[a] && (l[a] = !0)
        }),
        { errMsg: `${c}:ok`, checkResult: JSON.stringify(l) }
      )
    }
  }
})(require('lazyload'), require)
