define(["require","exports","comments2/components/annotation_rectangle_creation_layer/resize_handles"],(function(t,e,a){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),(r=e.Threshold||(e.Threshold={}))[r.Ignore=0]="Ignore",r[r.NotExceeded=1]="NotExceeded",r[r.Exceeded=2]="Exceeded";e.clientRectToRectangle=function(t){var e=t.top;return{x:t.left,y:e,width:t.width,height:t.height}},e.pertainsToLeftClick=function(t){return 0===t.button},e.isOnText=function(t){var e=t.target.tagName.toUpperCase();return"P"===e||"TEXT"===e},e.isOnLink=function(t){return"A"===t.target.tagName},e.hasExceededThreshold=function(t,e){var a=t.x,r=t.y,h=e.clientX,n=e.clientY;return Math.max(Math.abs(a-h),Math.abs(r-n))>5},e.applyDelta=function(t,e,r){var h=t.x,n=t.y,i=t.width,o=t.height,s=e.deltaX,c=e.deltaY;switch(r){case a.DragInitiator:return{x:h+s,y:n+c,width:i,height:o};case a.Corner.BottomRight:return{x:s<-i?h+(i+s):h,y:c<-o?n+(o+c):n,width:Math.abs(i+s),height:Math.abs(o+c)};case a.Corner.BottomLeft:return{x:s>i?h+i:h+s,y:c<-o?n+(o+c):n,width:Math.abs(i-s),height:Math.abs(o+c)};case a.Corner.TopRight:return{x:s<-i?h+(i+s):h,y:c>o?n+o:n+c,width:Math.abs(i+s),height:Math.abs(o-c)};case a.Corner.TopLeft:return{x:s>i?h+i:h+s,y:c>o?n+o:n+c,width:Math.abs(i-s),height:Math.abs(o-c)};case a.Edge.Left:return{x:s>i?h+i:h+s,y:n,width:Math.abs(i-s),height:o};case a.Edge.Right:return{x:s<-i?h+(i+s):h,y:n,width:Math.abs(i+s),height:o};case a.Edge.Top:return{x:h,y:c>o?n+o:n+c,width:i,height:Math.abs(o-c)};case a.Edge.Bottom:return{x:h,y:c<-o?n+(o+c):n,width:i,height:Math.abs(o+c)}}},e.calculateDelta=function(t,e){var a=e.x,r=e.y;return{deltaX:a-t.x,deltaY:r-t.y}}})); //# sourceMappingURL=utilities.min.js-vfltpz0yA.map