'use strict'
var _extends =
  Object.assign ||
  function(a) {
    for (var b, c = 1; c < arguments.length; c++)
      for (var d in ((b = arguments[c]), b))
        Object.prototype.hasOwnProperty.call(b, d) && (a[d] = b[d])
    return a
  }
!(function(require, directRequire) {
  const a = require('./1bd2563d13db26950ae47494b2c34454.js'),
    b = require('./6242f55dbdfe53c2f07b7a51568311f2.js'),
    c = require('./bc78839ccca8df9e5ceeb7fae11b7be2.js'),
    d = require('./3bfffbe88b3d923921f851c0697974fe.js'),
    { USER_DATA_PATH: e } = require('./37be435102276ea9cf47609ff6535cd4.js')
  module.exports = async function(d) {
    let f = await a(d),
      g = (d.attr && d.attr.setting) || {}
    g = _extends({}, b.setting, g)
    let h = c.getState(),
      i = h.toolbar.deviceInfo,
      { screenHeight: j, screenWidth: k, dpr: l } = i
    'landscape' === f.deviceOrientation
      ? ((f.screenHeight = k), (f.screenWidth = j))
      : ((f.screenHeight = j), (f.screenWidth = k)),
      (f.devicePixelRatio = l),
      (f.env = { USER_DATA_PATH: e }),
      (f.platform = 'devtools')
    let m,
      n = { scene: b.SCENE_DEFAULT, query: {} }
    try {
      let a = d.compileType,
        c = d.condiction[a]
      if (((m = c.list[c.current]), m)) {
        let a = (m.query && m.query.split('&')) || []
        a.forEach(a => {
          if (a) {
            let b = a.split('=')
            n.query[b[0]] = b[1]
          }
        }),
          m.pathName && (n.path = m.pathName)
        let c = m.scene
        c &&
          ((n.scene = c),
          c == b.SCENE_SHARE_TICKET && (n.shareInfo = m.shareInfo))
      }
    } catch (a) {}
    return (
      (f.appLaunchInfo = n),
      (f.wxAppInfo = _extends({}, f.wxAppInfo, {
        subContextImgDomain: [
          'http://usr',
          'http://tmp',
          'http://store'
        ].concat(g.SubContextImgDomain)
      })),
      f
    )
  }
})(require('lazyload'), require)
