'use strict'
!(function(require, directRequire) {
  function a() {
    n = {}
  }
  function b(b, c) {
    let e = d.extname(c)
    ;('.json' === e || '.wxss' === e) && a()
  }
  async function c(c) {
    if (m) {
      let b = m.setting && m.setting.newFeature,
        d = c.setting && c.setting.newFeature
      b != d && a()
    }
    m = c
    let d = await e(c)
    ;(l && l.srcPath == d.srcPath) ||
      (a(), l && l.unWatch(b), (l = d), l.watch(b))
  }
  const d = require('path'),
    e = require('./162bf2ee28b76d3b3d95b685cede4146.js'),
    f = require('./1dea83a77e99a7c94f6b6f01f5c175b0.js'),
    g = require('./d260ebf687a29f24aed49f66b233ab7d.js'),
    h = require('./709f7f8328edb932b1169de8b7e694dd.js'),
    i = require('./6b5520e429c60abf5d2f924c0fa05fd0.js'),
    j = require('./d3976cc01aeebc5b09e11c4135b6bd8d.js'),
    k = require('./e2bb00408a93b45ef5e6ad32f05e850c.js')
  var l,
    m,
    n = {}
  module.exports = async function(a, b = {}) {
    await c(a)
    const { app: d, page: e } = b
    let g,
      l = await f(a),
      m = 'main',
      o = '$gwx'
    if (!d) {
      if (((g = j.checkIsInSubPackage(l, e)), !g)) return []
      ;(m = `sub_${g.root}`), (o = `$${new Buffer(g.root).toString('hex')}`)
    }
    if (!n[m]) {
      let b = await i.getFileList(a, l, g),
        c = []
      for (let d = 0, e = b.length; d < e; d++) {
        let e = b[d],
          f = e.replace(/\"/g, '\\"'),
          g = await k(a, e)
        c.push(`__wxAppCode__["${f}.json"]=${JSON.stringify(g)}`),
          c.push(`__wxAppCode__["${f}.wxml"]=${o}("./${f}.wxml")`)
        let i = await h(a, { page: e })
        c.push(`__wxAppCode__["${f}.wxss"]=${i.page}`)
      }
      n[m] = c
    }
    return n[m]
  }
})(require('lazyload'), require)
