'use strict'
!(function(require, directRequire) {
  const a = 'darwin' === process.platform
  let b,
    c = !1
  module.exports = async function(d, e) {
    if (!(!a && e && c)) {
      let a = (+new Date()).toString()
      return (
        (d = Object.assign(
          {
            type: 'basic',
            iconUrl:
              'https://mmbiz.qpic.cn/mmbiz_png/icTdbqWNOwNQ1qSjicRG2Sd0tCZsjqmkmpUsZWPQ4YyuRwKibg8FeLE2x9k7OkHgu5uFc5VtcuuODGAQZZxiaR5iaiaQ/0?wx_fmt=png',
            priority: 2
          },
          d
        )),
        b ||
          ((b = {}),
          chrome.notifications.onButtonClicked.addListener((a, c) => {
            b[a] &&
              ('function' == typeof b[a] && b[a](c),
              chrome.notifications.clear(a))
          }),
          chrome.notifications.onClosed.addListener(() => {
            c = !1
          })),
        (b[a] = d.callback),
        delete d.callback,
        chrome.notifications.create(a, d),
        (c = !0),
        a
      )
    }
  }
})(require('lazyload'), require)
