function isPc() {
  for (var i = navigator.userAgent, n = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'], e = !0, r = 0; r < n.length; r++)
    if (i.indexOf(n[r]) > 0) {
      e = !1
      break
    }
  return e
}
function GraphBar() {
  var i = this
  ;(this.init = function () {
    window.addEventListener('scroll', function () {
      var n = window.scrollY
      n >= (isPc() ? 1900 : 560) && i.changeGraphBar('graph_bar_tools'), n >= (isPc() ? 4100 : 2700) && i.changeGraphBar('graph_bar_system')
    })
  }),
    (this.changeGraphBar = function (i) {
      var n = document.querySelector('.' + i)
      ;(n.className = i + ' graph_bar active'), $('.' + i + ' .bar span').show()
    })
}
function Circle() {
  ;(this.defineCircle = function () {
    $('.circle').radialIndicator({ barColor: '#219d8c', barWidth: 12, initValue: 0, roundCorner: !0, percentage: !0, displayNumber: !1, radius: 110 })
  }),
    (this.createCircle = function (i, n, e) {
      setTimeout(function () {
        var e = $(i).data('radialIndicator')
        e.animate(n),
          setTimeout(function () {
            $(i + ' .animated')
              .show()
              .addClass('bounceIn')
          }, 300)
      }, e)
    }),
    (this.initCircle = function () {
      var i = this
      this.defineCircle(),
        window.addEventListener('scroll', function () {
          const n = window.scrollY
          n >= (isPc() ? 1300 : 30) &&
            (i.createCircle('#indicatorContainer', 80, 0), i.createCircle('#indicatorContainer2', 70, 0), i.createCircle('#indicatorContainer3', 40, 0)),
            n >= (isPc() ? 3400 : 2270) &&
              (i.createCircle('#indicatorContainer4', 80, 0), i.createCircle('#indicatorContainer5', 70, 0), i.createCircle('#indicatorContainer6', 40, 0))
        })
    })
}
function JoinUs() {
  this.init = function () {
    window.addEventListener('scroll', function () {
      const i = window.scrollY
      i >= 5500 && (document.querySelector('.join_us').className = 'join_us animated heartBeat')
    })
  }
}
var mySwiper = new Swiper('.swiper-container', {
  loop: !0,
  // autoplay: !0,
  pagination: { el: '.swiper-pagination', clickable: !0 },
  navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev' },
})
const myScroll = new GraphBar()
myScroll.init()
const myCircle = new Circle()
myCircle.initCircle()
