text: var __assign = (this && this.__assign) || function () {
      __assign = Object.assign || function(t) {
          for (var s, i = 1, n = arguments.length; i < n; i++) {
              s = arguments[i];
              for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                  t[p] = s[p];
          }
          return t;
      };
      return __assign.apply(this, arguments);
  };
  import { Manager, PointerEventInput, TouchMouseInput, TouchInput, MouseInput } from "@egjs/hammerjs";
  import { window } from "../browser";
  export var SUPPORT_POINTER_EVENTS = "PointerEvent" in window || "MSPointerEvent" in window;
  export var SUPPORT_TOUCH = "ontouchstart" in window;
  export var UNIQUEKEY = "_EGJS_AXES_INPUTTYPE_";
  export function toAxis(source, offset) {
      return offset.reduce(function (acc, v, i) {
          if (source[i]) {
              acc[source[i]] = v;
          }
          return acc;
      }, {});
  }
  export function createHammer(element, options) {
      try {
          // create Hammer
          return new Manager(element, __assign({}, options));
      }
      catch (e) {
          return null;
      }
  }
  export function convertInputType(inputType) {
      if (inputType === void 0) { inputType = []; }
      var hasTouch = false;
      var hasMouse = false;
      var hasPointer = false;
      inputType.forEach(function (v) {
          switch (v) {
              case "mouse":
                  hasMouse = true;
                  break;
              case "touch":
                  hasTouch = SUPPORT_TOUCH;
                  break;
              case "pointer": hasPointer = SUPPORT_POINTER_EVENTS;
              // no default
          }
      });
      if (hasPointer) {
          return PointerEventInput;
      }
      else if (hasTouch && hasMouse) {
          return TouchMouseInput;
      }
      else if (hasTouch) {
          return TouchInput;
      }
      else if (hasMouse) {
          return MouseInput;
      }
      return null;
  }
  //# sourceMappingURL=InputType.js.map