'use strict'
!(function(require, directRequire) {
  function a(a) {
    const d = b.open(a)
    if (d) {
      const b = d.getWorkingDirectory(),
        e = c.relative(b.toLowerCase(), a.toLowerCase())
      if (e && '.' !== e) return d.release(), null
    }
    return d
  }
  const b = require('./287206cae8c0247bbc8d935ccd9e0ff3.js'),
    c = require('path'),
    d = {}
  ;(d.getGitHead = function(b, c) {
    const { dir: d } = c
    console.log('process task getgithead', d)
    let e = null
    try {
      const b = a(d)
      let c = null
      b
        ? ((c = b.getShortHead()),
          (e = { enabled: !0, head: (c || '') + '' }),
          b.release())
        : (e = { enabled: !1, head: null })
    } catch (a) {
      e = { error: a.toString() }
    }
    return e
  }),
    (d.getGitEnabled = function(b, c) {
      const { dir: d } = c
      let e = null
      try {
        const b = a(d)
        b ? ((e = { enabled: !0 }), b.release()) : (e = { enabled: !1 })
      } catch (a) {
        e = { error: a.toString() }
      }
      return e
    }),
    (d.getGitStatus = function(b, c) {
      const { dir: d } = c
      let e
      try {
        const b = a(d)
        if (b) {
          const a = b.getStatus() || {}
          ;(e = { status: a }), b.release()
        } else e = { status: {} }
      } catch (a) {
        e = { error: a.toString() }
      }
      return e
    }),
    (d.getGitLineDiffs = function(b, c) {
      const { dir: d, path: e } = c
      let f
      try {
        const c = a(d)
        if (c) {
          const a = c.getLineDiffs(e, b, { ignoreEolWhitespace: !1 }) || []
          ;(f = { gitLineDiffs: a }), c.release()
        } else f = { gitLineDiffs: [] }
      } catch (a) {
        f = { error: a.toString() }
      }
      return f
    }),
    (d.getGitCommitFile = function(b, c) {
      const { dir: d, path: e } = c
      let f
      try {
        const b = a(d)
        if (b) {
          const a = b.getHeadBlob(e) || '',
            c = b.getDiffStats(e) || null
          ;(f = { content: a, stats: c }), b.release()
        } else f = { content: null, stats: null }
      } catch (a) {
        f = { error: a.toString() }
      }
      return f
    }),
    (module.exports = d)
})(require('lazyload'), require)
