'use strict'
!(function(require, directRequire) {
  const a = require('./56c390e04c10e91a4aa2a2c19d9a885d.js'),
    b = require('./b543ae2da406cea63b3ad8951f17b6c0.js')
  module.exports = class c {
    static openWindow(b, c = {}) {
      const d = (function(b, c) {
        const d = {}
        for (let a of b) c.hasOwnProperty(a) && (d[a] = c[a])
        return (
          c.width || (d.width = a.SIZE.DEFAULT.WIDTH),
          c.height || (d.height = a.SIZE.DEFAULT.HEIGHT),
          c.title || (d.title = nw.App.manifest.window.title),
          c.hasOwnProperty('focus') || (d.focus = !0),
          (d.new_instance = !0),
          d
        )
      })(
        [
          'id',
          'title',
          'icon',
          'position',
          'always_on_top',
          'width',
          'height',
          'min_width',
          'min_height',
          'max_width',
          'max_height',
          'resizable',
          'kiosk',
          'fullscreen',
          'show_in_taskbar',
          'frame',
          'transparent',
          'new_instance'
        ],
        c
      )
      nw.Window.open(b, d)
    }
    static openMiniProgram({
      appid: a,
      projectname: d,
      projectpath: e,
      options: f = {}
    } = {}) {
      if (!a || !d || !e) return !1
      let g = `./html/index.html?devtype=miniprogram&devid=${+new Date()}&appid=${a}&projectname=${d}&projectpath=${e}`
      f.isTemp && (g += '&isTemp=1'), f.isOnline && (g += '&isOnline=1')
      const h = `mini_program_dev_window_${a}_${d}`
      return (
        c.openWindow(g, {
          id: h,
          title: `${decodeURIComponent(d)} - ${nw.App.manifest.window.title}`
        }),
        b.pendingOpenWindows.add(`${a}_${d}`),
        !0
      )
    }
    static openTempOnlineMiniProgram({
      appid: a,
      projectname: b,
      projectpath: d
    } = {}) {
      return c.openMiniProgram({
        appid: a,
        projectname: b,
        projectpath: d,
        options: { isTemp: !0, isOnline: !0 }
      })
    }
    static openWebDebugger() {
      const a = `webdebugger_dev_window`
      return (
        c.openWindow(
          `./html/index.html?devtype=webdebugger&devid=${+new Date()}`,
          { id: a }
        ),
        b.pendingOpenWindows.add(a),
        !0
      )
    }
  }
})(require('lazyload'), require)
