/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../chunks/_rollupPluginBabelHelpers","../../../../core/has","../../../input/InputHandler"],(function(e,t,a,i){"use strict";let n=function(e){function a(t,a,i){var n;return(n=e.call(this,!0)||this).view=t,n.pointerType=a,n.registerIncoming("double-tap-drag",i,(e=>n._handleDoubleTapDrag(e))),n}return t._inheritsLoose(a,e),a.prototype._handleDoubleTapDrag=function(e){const{data:t}=e,{pointerType:a}=t;if(a!==this.pointerType)return;e.stopPropagation();const{action:i,delta:n}=t,{view:r}=this,{mapViewNavigation:s}=r;switch(i){case"begin":{const{scale:e}=r;this._startScale=e,this._currentScale=e,this._previousDelta=n,s.begin();break}case"update":{if(this._previousDelta.y===n.y)return;this._previousDelta=n;const e=1.015**n.y,t=this._startScale*e,a=t/this._currentScale;s.setViewpointImmediate(a),this._currentScale=t;break}case"end":{const{constraints:e}=r,{effectiveLODs:t,snapToZoom:a}=e;if(!a||!t)return void s.end();const i=e.snapScale(this._currentScale),o=(n.y>0?Math.max(i,e.snapToPreviousScale(this._startScale)):Math.min(i,e.snapToNextScale(this._startScale)))/this._currentScale;s.zoom(o);break}}},a}(i.InputHandler);e.DoubleTapDragZoom=n,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
