'use strict'
!(function(require, directRequire) {
  const a = require('path'),
    b = require('react'),
    c = require('./0db6515f85d6f6210c2d50722041eb1f.js'),
    d = require('./5cf2b4cc636be30c4226c57d0a2400f7.js'),
    e = require('./e98c60a262d8d98e69e574a9d12a21df.js'),
    f = require('redux'),
    g = require('./d3976cc01aeebc5b09e11c4135b6bd8d.js'),
    { connect: h } = require('react-redux')
  class i extends b.Component {
    constructor(a) {
      super(a), (this.init = !1)
    }
    componentDidMount() {
      ;(this._onMessage = this.onMessage.bind(this)),
        d.register(this._onMessage)
    }
    componentWillUnmount() {
      d.unRegister(this._onMessage)
    }
    componentWillReceiveProps(a) {
      a.accelerometer != this.props.accelerometer &&
        d.send({
          command: 'SET_SENSOR_STATUS',
          data: { accelerometer: a.accelerometer }
        })
    }
    onMessage(a) {
      try {
        a = JSON.parse(a)
      } catch (a) {}
      let { command: b, data: c } = a
      'GET_SENSOR_STATUS' === b
        ? ((this.init = !0),
          d.send({
            command: 'SET_SENSOR_STATUS',
            data: {
              accelerometer: this.props.accelerometer,
              geo: this.props.geo
            }
          }))
        : 'SET_GEO_SETTING' === b && this.props.setGeoSetting(c)
    }
    render() {
      return null
    }
  }
  module.exports = h(
    a => {
      return {
        geo: a.settings.geo || {},
        accelerometer: a.simulator.accelerometer
      }
    },
    a => {
      return { setGeoSetting: g.bindActionCreators(e.setGeoSetting, a) }
    }
  )(i)
})(require('lazyload'), require)
