text: /**
   * @license
   * Copyright (c) 2014, 2020, Oracle and/or its affiliates.
   * Licensed under The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
  define(["ojs/ojcore","jquery"],function(t,o){"use strict";t._TouchProxy=function(t){this._init(t)},t._TouchProxy.prototype._init=function(t){this._elem=t,this._touchHandled=!1,this._touchMoved=!1,this._touchStartHandler=o.proxy(this._touchStart,this),this._touchEndHandler=o.proxy(this._touchEnd,this),this._touchMoveHandler=o.proxy(this._touchMove,this),this._elem.on({touchend:this._touchEndHandler,touchcancel:this._touchEndHandler}),this._elem[0].addEventListener("touchstart",this._touchStartHandler,{passive:!0}),this._elem[0].addEventListener("touchmove",this._touchMoveHandler,{passive:!1})},t._TouchProxy.prototype._destroy=function(){this._elem&&this._touchStartHandler&&(this._elem.off({touchend:this._touchEndHandler,touchcancel:this._touchEndHandler}),this._elem[0].removeEventListener("touchstart",this._touchStartHandler,{passive:!0}),this._elem[0].removeEventListener("touchmove",this._touchMoveHandler,{passive:!1}),this._touchStartHandler=void 0,this._touchEndHandler=void 0,this._touchMoveHandler=void 0)},t._TouchProxy.prototype._touchHandler=function(t,o){if(!(t.originalEvent.touches.length>1)){"touchstart"!==t.type&&"touchend"!==t.type&&t.preventDefault();var e=t.originalEvent.changedTouches[0],h=document.createEvent("MouseEvent");h.initMouseEvent(o,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(h)}},t._TouchProxy.prototype._touchStart=function(t){this._touchHandled||(this._touchHandled=!0,this._touchMoved=!1,t=o.Event(t),this._touchHandler(t,"mouseover"),this._touchHandler(t,"mousemove"),this._touchHandler(t,"mousedown"))},t._TouchProxy.prototype._touchMove=function(t){this._touchHandled&&(this._touchMoved=!0,t=o.Event(t),this._touchHandler(t,"mousemove"))},t._TouchProxy.prototype._touchEnd=function(t){this._touchHandled&&(this._touchHandler(t,"mouseup"),this._touchHandler(t,"mouseout"),this._touchMoved||"touchend"!==t.type||this._touchHandler(t,"click"),this._touchHandled=!1)},t._TouchProxy._TOUCH_PROXY_KEY="_ojTouchProxy",t._TouchProxy.prototype.touchMoved=function(){return this._touchMoved},t._TouchProxy.addTouchListeners=function(e){var h=o(e),n=h.data(t._TouchProxy._TOUCH_PROXY_KEY);return n||(n=new t._TouchProxy(h),h.data(t._TouchProxy._TOUCH_PROXY_KEY,n)),n},t._TouchProxy.removeTouchListeners=function(e){var h=o(e),n=h.data(t._TouchProxy._TOUCH_PROXY_KEY);n&&(n._destroy(),h.removeData(t._TouchProxy._TOUCH_PROXY_KEY))}});