"use strict";

exports.__esModule = true;
exports["default"] = void 0;

var _Device = _interopRequireDefault(require("./../Device"));

var _base = _interopRequireDefault(require("./base"));

var _browser = _interopRequireDefault(require("./browser"));

var _wx = _interopRequireDefault(require("./wx"));

var _dinghuo = _interopRequireDefault(require("./dinghuo"));

var _wq = _interopRequireDefault(require("./wq"));

var _cordova = _interopRequireDefault(require("./cordova"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

var Bridge = {};

if (_Device["default"].platform === 'wechat' || _Device["default"].platform === 'wework' || _Device["default"].platform === 'wechatMiniprogram' || _Device["default"].platform === 'weworkMiniprogram' || _Device["default"].platform === 'weworkBrowser') {
  Bridge = _extends({}, _base["default"], _wx["default"]);
} else if (_Device["default"].platform === 'dinghuo') {
  Bridge = _extends({}, _base["default"], _dinghuo["default"]);
} else if (_Device["default"].platform === 'waiqin') {
  Bridge = _extends({}, _base["default"], _cordova["default"]);
} else if (_Device["default"].platform === 'wq') {
  Bridge = _extends({}, _base["default"], _wq["default"]);
} else {
  Bridge = _extends({}, _base["default"], _browser["default"]);
} // 防止绑定事件时this指向window, 所以全局加一个变量用于存储this


window._bridge_self = Bridge;
var _default = Bridge;
exports["default"] = _default;
module.exports = exports.default;