UNPKG

igniteui-react-core

Version:
1,004 lines (1,003 loc) 31.5 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends } from "tslib"; import { EventProxy } from "./EventProxy"; import { Point_$type, runOn, markType, PointUtil, String_$type, Delegate_$type } from "./type"; import { Rect } from "./Rect"; import { MouseEventArgs } from "./MouseEventArgs"; import { Dictionary$2 } from "./Dictionary$2"; import { List$1 } from "./List$1"; /** * @hidden */ var BaseDOMEventProxy = /** @class */ /*@__PURE__*/ (function (_super) { __extends(BaseDOMEventProxy, _super); function BaseDOMEventProxy() { var _this = _super.call(this) || this; _this.b7 = null; _this.by = false; _this.b0 = false; _this.b6 = null; _this.br = false; _this.b4 = 0; _this.b5 = 0; _this.b2 = 0; _this.b3 = 0; _this.b8 = 0; _this.c7 = null; _this.c6 = null; _this.bq = false; _this.b9 = -1; _this.bv = false; _this.bs = false; _this.bp = false; _this.ap = 1; return _this; } BaseDOMEventProxy.prototype.d = function () { var a = new DOMEventProxy(this.b7, this.b6, this.b0); a.ac = this.ac; a.ar = this.ar; return a; }; Object.defineProperty(BaseDOMEventProxy, "b1", { get: function () { return (BaseDOMEventProxy.bw || BaseDOMEventProxy.bx); }, enumerable: false, configurable: true }); BaseDOMEventProxy.prototype.bn = function (a) { return DOMEventProxy.c8(a); }; BaseDOMEventProxy.prototype.bu = function (e_) { var pointerEvent_ = e_.originalEvent; var a = false; if (BaseDOMEventProxy.bx) { a = (pointerEvent_.pointerType == 'touch'); } else { a = (pointerEvent_.pointerType == pointerEvent_.MSPOINTER_TYPE_TOUCH); } return a; }; BaseDOMEventProxy.prototype.cy = function (a) { if (!this.af) { if (this.bt(a)) { if (this.at == null || this.at(a)) { a.preventDefault(); } } } }; BaseDOMEventProxy.prototype.bt = function (e_) { return (e_.originalEvent.cancelable || e_.originalEvent.cancelable == undefined); }; BaseDOMEventProxy.prototype.cu = function () { var source_ = this.b7.getNativeElement(); BaseDOMEventProxy.cx(source_); }; BaseDOMEventProxy.cx = function (source_) { if (BaseDOMEventProxy.bx) { source_.style.touchAction = 'none'; } else { source_.style.msTouchAction = 'none'; } source_.style.msUserSelect = 'none'; source_.style.webkitTouchCallout = 'none'; source_.style.webkitUserSelect = 'none'; source_.style.khtmlUserSelect = 'none'; source_.style.mozUserSelect = 'none'; source_.style.userSelect = 'none'; }; BaseDOMEventProxy.cr = function (source_) { if (BaseDOMEventProxy.bx) { source_.style.touchAction = 'auto'; } else { source_.style.msTouchAction = 'auto'; } source_.style.msUserSelect = 'auto'; source_.style.webkitTouchCallout = 'none'; source_.style.webkitUserSelect = 'auto'; source_.style.khtmlUserSelect = 'auto'; source_.style.mozUserSelect = 'auto'; source_.style.userSelect = 'auto'; }; BaseDOMEventProxy.prototype.cs = function () { var source_ = this.b7.getNativeElement(); BaseDOMEventProxy.cr(source_); }; BaseDOMEventProxy.prototype.ay = function () { _super.prototype.ay.call(this); if (!this.af) { this.cu(); } else { this.cs(); } }; BaseDOMEventProxy.prototype.ce = function () { var ver_ = -1; var matchIE_ = /Trident\/([\d.]+)/; if ((matchIE_.exec(navigator.userAgent) != null)) { ver_ = (parseFloat(RegExp.$1)); } return ver_; }; BaseDOMEventProxy.prototype.cd = function () { var ver_ = -1; var matchIE_ = /Edge\/([\d.]+)/; if ((matchIE_.exec(navigator.userAgent) != null)) { ver_ = (parseFloat(RegExp.$1)); } return ver_; }; BaseDOMEventProxy.cw = function (e_) { var a = BaseDOMEventProxy.cf >= 6; var oe_ = e_.originalEvent; if ((((typeof e_.pageX == 'undefined')) || a) && oe_.clientX != null) { var od_ = void 0; if ((e_.target !== undefined)) { od_ = e_.target.ownerDocument; } else { od_ = e_.originalEvent.target.ownerDocument; } var ed_ = od_ ? od_ : document; var doc_ = ed_.documentElement; var body_ = ed_.body; var clientX_ = oe_.clientX; var clientY_ = oe_.clientY; var scrollLeft_ = doc_ && doc_.scrollLeft || body_ && body_.scrollLeft || 0; var scrollTop_ = doc_ && doc_.scrollTop || body_ && body_.scrollTop || 0; var clientLeft_ = doc_ && doc_.clientLeft || body_ && body_.clientLeft || 0; var clientTop_ = doc_ && doc_.clientTop || body_ && body_.clientTop || 0; e_.pageX = clientX_ + (scrollLeft_ - clientLeft_); e_.pageY = clientY_ + (scrollTop_ - clientTop_); } if ((!e_.pageX)) { e_.pageX = e_.originalEvent.pageX; } if ((!e_.pageY)) { e_.pageY = e_.originalEvent.pageY; } if (((typeof e_.button == 'undefined')) && ((typeof oe_.button != 'undefined'))) { e_.button = oe_.button; } }; BaseDOMEventProxy.c8 = function (a) { var b = BaseDOMEventProxy.cf >= 6; var source_ = a.getNativeElement(); var d_ = source_.ownerDocument; var doc_ = d_ ? d_.documentElement : null; var z_ = doc_ ? doc_.msContentZoomFactor : null; var body_ = doc_.body; if ((z_ && z_ > 1) || b) { var rect_ = source_.getBoundingClientRect(); var x_ = (rect_.left); var y_ = (rect_.top); var scrollLeft_ = (doc_ && doc_.scrollLeft || body_ && body_.scrollLeft || 0); var scrollTop_ = (doc_ && doc_.scrollTop || body_ && body_.scrollTop || 0); var clientLeft_ = (doc_ && doc_.clientLeft || body_ && body_.clientLeft || 0); var clientTop_ = (doc_ && doc_.clientTop || body_ && body_.clientTop || 0); var c = x_ + scrollLeft_ - clientLeft_; var d = y_ + scrollTop_ - clientTop_; return new Rect(0, c, d, 0, 0); } else { var e = a.getOffset(); return new Rect(0, e.left, e.top, 0, 0); } }; Object.defineProperty(BaseDOMEventProxy.prototype, "cb", { get: function () { return this.b8; }, set: function (a) { this.b8 = a; }, enumerable: false, configurable: true }); BaseDOMEventProxy.prototype.c1 = function (a) { this.au = a; BaseDOMEventProxy.cw(a); var b = BaseDOMEventProxy.c8(this.b7); var c = 0; var d = 0; if (Rect.l_op_Inequality(this.bo, null)) { c = this.bo.left; d = this.bo.top; } this.b4 = (a.pageX - b.left) * this.ap; this.b5 = (a.pageY - b.top) * this.ap; this.b2 = this.b4 - c; this.b3 = this.b5 - d; this.c7 = { $type: Point_$type, x: this.b4, y: this.b5 }; this.c6 = { $type: Point_$type, x: this.b2, y: this.b3 }; }; BaseDOMEventProxy.prototype.c2 = function (e_) { this.au = e_; BaseDOMEventProxy.cw(e_); if (BaseDOMEventProxy.b1) { var a = e_.pageX; var b = e_.pageY; var c = BaseDOMEventProxy.c8(this.b7); this.b4 = a - c.left; this.b5 = b - c.top; } else { this.b8 = 0; if (!e_.originalEvent.targetTouches || e_.originalEvent.targetTouches.length < 1) { return; } ; this.b8 = (e_.originalEvent.targetTouches.length); var d = (e_.originalEvent.targetTouches[0].pageX); var e = (e_.originalEvent.targetTouches[0].pageY); var f = BaseDOMEventProxy.c8(this.b7); this.b4 = d - f.left; this.b5 = e - f.top; } var g = 0; var h = 0; if (Rect.l_op_Inequality(this.bo, null)) { g = this.bo.left; h = this.bo.top; } this.b2 = this.b4 - g; this.b3 = this.b5 - h; this.c7 = { $type: Point_$type, x: this.b4, y: this.b5 }; this.c6 = { $type: Point_$type, x: this.b2, y: this.b3 }; }; BaseDOMEventProxy.prototype.cq = function (e_) { this.c0(e_); if (this.ae(this.c7, false, true)) { var deltaY_ = 0; var ev_ = e_; deltaY_ = (ev_.originalEvent ? ev_.originalEvent.deltaY : ev_.deltaY); var deltaX_ = 0; deltaX_ = (ev_.originalEvent ? ev_.originalEvent.deltaX : ev_.deltaX); var a = (ev_.originalEvent ? (ev_.originalEvent.deltaMode == 1) : (ev_.deltaMode == 1)); if (a) { deltaY_ = deltaY_ * 40; deltaX_ = deltaX_ * 40; } var b = this.ak(this.c6, deltaY_); var c = this.al(this.c6, deltaX_); if (b || c) { this.cy(e_); } } }; BaseDOMEventProxy.prototype.co = function (e_) { this.c0(e_); this.c1(e_); if (this.ae(this.c7, false, true)) { var ev_ = e_; var delta_ = 0; if (ev_.wheelDelta) { delta_ = ev_.wheelDelta / 120; } ; if (ev_.originalEvent && ev_.originalEvent.wheelDelta) { delta_ = ev_.originalEvent.wheelDelta / 120; } ; if (ev_.detail) { delta_ = -ev_.detail / 3; } ; if (ev_.originalEvent && ev_.originalEvent.detail) { delta_ = -ev_.originalEvent.detail / 3; } ; delta_ = delta_ / 10; var a = this.ak(this.c6, delta_); if (a) { this.cy(e_); } } }; BaseDOMEventProxy.prototype.cv = function () { if (this.bq) { if (this.b9 == -1) { this.b9 = this.b6.setTimeout(runOn(this, this.ct), 500); } else { window.clearTimeout(this.b9); this.b9 = -1; this.b9 = this.b6.setTimeout(runOn(this, this.ct), 500); } } }; BaseDOMEventProxy.prototype.cg = function () { this.bq = true; if (this.b9 != -1) { window.clearTimeout(this.b9); this.b9 = -1; } }; BaseDOMEventProxy.prototype.ct = function () { this.bq = false; }; Object.defineProperty(BaseDOMEventProxy.prototype, "bz", { get: function () { return this.bs; }, set: function (a) { this.bs = a; }, enumerable: false, configurable: true }); BaseDOMEventProxy.prototype.cm = function (a) { if (this.bs || this.bq) { return; } this.c1(a); if (this.bv) { this.bv = false; this.bc(this.c6); } }; BaseDOMEventProxy.prototype.cn = function (a) { if (this.bs || this.bq) { return; } this.c1(a); this.c0(a); var b = new MouseEventArgs(); b.position = this.c7; if (this.ae(this.c7, false, false)) { if (!this.bv) { this.bv = true; this.bb(this.c7); } this.bd(this.c7, true, false); this.a0(this.c6, false); } else if (this.bv) { this.cm(a); } }; BaseDOMEventProxy.prototype.cz = function (a) { var eventSource_ = this.b7.getNativeElement(); var targetFocusable_ = ((function (ev, boundary) { var t = (ev && (ev.originalEvent ? ev.originalEvent.target : ev.target)); while (t && t.nodeType === 1 && t !== boundary) { if (!t.disabled) { var tag = t.tagName; if (tag === 'BUTTON' || tag === 'INPUT' || tag === 'SELECT' || tag === 'TEXTAREA' || tag === 'A') return true; var ti = t.getAttribute && t.getAttribute('tabindex'); if (ti != null && parseInt(ti, 10) >= 0) return true; } t = t.parentNode; } return false; })(a, eventSource_)); if (targetFocusable_) { return; } this.b7.focus(this.by); }; BaseDOMEventProxy.prototype.cl = function (a) { if (this.bs || this.bq) { return; } this.cz(a); this.c1(a); this.c0(a); if (this.ae(this.c7, false, false)) { this.bp = true; this.ba(this.c7); this.a1(this.c6, false); this.cy(a); } }; BaseDOMEventProxy.prototype.c3 = function (a) { if (this.bs || this.bq) { return; } if (this.bp) { this.cp(a); } }; BaseDOMEventProxy.prototype.cp = function (a) { if (this.bs || this.bq) { return; } this.c0(a); if (PointUtil.equals(this.c7, null) || PointUtil.equals(this.c6, null)) { this.c1(a); } var b = this.ae(this.c7, false, false) || this.bp || this.bv; this.bp = false; this.be(this.c7); this.az(this.c6, false, false); if (b) { this.cy(a); } }; BaseDOMEventProxy.prototype.ci = function (a) { this.cj(a, true); }; BaseDOMEventProxy.prototype.ck = function (a) { this.cj(a, false); }; BaseDOMEventProxy.prototype.ch = function (a) { this.a7(a); }; BaseDOMEventProxy.prototype.c5 = function (a) { return BaseDOMEventProxy.c4(a); }; BaseDOMEventProxy.c4 = function (a) { var b; switch (a.which) { case 33: b = 10; break; case 34: b = 11; break; case 36: b = 13; break; case 37: b = 14; break; case 38: b = 15; break; case 39: b = 16; break; case 40: b = 17; break; case 9: b = 2; break; case 32: b = 9; break; case 13: b = 3; break; case 27: b = 8; break; case 16: b = 4; break; case 17: b = 5; break; case 18: b = 6; break; case 8: b = 1; break; case 35: b = 12; break; case 45: b = 18; break; case 46: b = 19; break; case 106: b = 78; break; case 107: b = 79; break; case 109: b = 80; break; case 110: b = 81; break; case 111: b = 82; break; case 220: b = 85; break; case 192: b = 86; break; case 191: b = 84; break; case 186: b = 83; break; case 189: b = 88; break; case 187: b = 87; break; default: if (112 <= a.which && a.which <= 123) { b = (56 + a.which - 112); } else if (65 <= a.which && a.which <= 90) { b = (30 + a.which - 65); } else if (48 <= a.which && a.which <= 57) { b = (20 + a.which - 48); } else if (96 <= a.which && a.which <= 105) { b = (68 + a.which - 96); } else { b = 0; } break; } return b; }; BaseDOMEventProxy.prototype.cj = function (a, b) { var c = this.c5(a); var d = c != 0; this.c0(a); if (d) { var e = false; if (b) { e = this.ai(c); } else { e = this.aj(c); } if (e) { this.cy(a); } } }; BaseDOMEventProxy.prototype.c0 = function (a) { this.au = a; this.bl = 0; if (a.shiftKey) { this.bl = this.bl | 4; } if (a.altKey) { this.bl = this.bl | 1; } if (a.ctrlKey) { this.bl = this.bl | 2; } this.am = a.button == 2; }; BaseDOMEventProxy.prototype.bm = function () { var a = BaseDOMEventProxy.c8(this.b7); var b = a.left; var c = a.top; return { $type: Point_$type, x: b, y: c }; }; BaseDOMEventProxy.$t = markType(BaseDOMEventProxy, 'BaseDOMEventProxy', EventProxy.$); BaseDOMEventProxy.bw = false; BaseDOMEventProxy.bx = false; BaseDOMEventProxy.cf = 0; BaseDOMEventProxy.cc = 0; return BaseDOMEventProxy; }(EventProxy)); export { BaseDOMEventProxy }; /** * @hidden */ var DOMEventProxy = /** @class */ /*@__PURE__*/ (function (_super) { __extends(DOMEventProxy, _super); function DOMEventProxy(a, b, c) { var _this = _super.call(this) || this; _this.di = 0; _this.dk = ""; _this.da = false; _this.dj = null; _this.dc = new Dictionary$2(String_$type, List$1.$.specialize(Delegate_$type), 0); _this.d7 = null; _this.dg = -1; _this.d8 = null; _this.de = 0; _this.df = 0; _this.dd = 5; _this.c9 = false; _this.d6 = null; _this.b0 = c; _this.b6 = b; _this.ar = function (d) { return true; }; _this.ac = false; DOMEventProxy.dh++; _this.di = DOMEventProxy.dh; _this.dk = ".DOMProxy" + _this.di.toString(); _this.bl = 0; _this.b7 = a; BaseDOMEventProxy.bw = false; try { BaseDOMEventProxy.bw = (window.navigator.msPointerEnabled && window.MSGesture !== undefined); } catch (d) { } BaseDOMEventProxy.bx = false; try { BaseDOMEventProxy.bx = (window.PointerEvent !== undefined); } catch (e) { } BaseDOMEventProxy.cf = _this.ce(); BaseDOMEventProxy.cc = _this.cd(); _this.av(_this.b7, ""); _this.aq = function (f) { return true; }; return _this; } DOMEventProxy.prototype.dl = function (a, b, c) { }; DOMEventProxy.prototype.av = function (a, b) { var c = a; var d = this.dk + b; if (!this.b6.supportsDOMEvents()) { return; } var e = new List$1(Delegate_$type, 0); this.dc.addItem(d, e); this.dl(a, b, e); if (!BaseDOMEventProxy.b1) { e.add(c.listen("mousemove", runOn(this, this.cn))); e.add(c.listen("mouseleave", runOn(this, this.cm))); e.add(c.listen("mousedown", runOn(this, this.cl))); e.add(c.listen("mouseup", runOn(this, this.cp))); e.add(this.b6.globalListen("window", "mouseup", runOn(this, this.c3))); } e.add(c.listen("keydown", runOn(this, this.ci))); e.add(c.listen("keyup", runOn(this, this.ck))); var source_ = this.b7.getNativeElement(); if (!this.af) { BaseDOMEventProxy.cx(source_); } if (BaseDOMEventProxy.b1) { var f = this.b7.getNativeElement(); if ((window.MSGesture !== undefined)) { var gesture_ = new window.MSGesture(); var container_ = f; gesture_.target = container_; this.dj = gesture_; e.add(c.listen("MSGestureStart", runOn(this, this.dp))); e.add(c.listen("MSGestureChange", runOn(this, this.dm))); e.add(c.listen("MSGestureEnd", runOn(this, this.dn))); } if (BaseDOMEventProxy.bx) { e.add(c.listen("pointerdown", runOn(this, this.ds))); e.add(c.listen("pointerup", runOn(this, this.dv))); e.add(c.listen("pointercancel", runOn(this, this.dr))); e.add(c.listen("pointermove", runOn(this, this.dt))); e.add(c.listen("pointerout", runOn(this, this.du))); e.add(c.listen("lostpointercapture", runOn(this, this.dq))); } else { e.add(c.listen("MSPointerDown", runOn(this, this.ds))); e.add(c.listen("MSPointerUp", runOn(this, this.dv))); e.add(c.listen("MSPointerCancel", runOn(this, this.dr))); e.add(c.listen("MSPointerMove", runOn(this, this.dt))); e.add(c.listen("MSPointerOut", runOn(this, this.du))); e.add(c.listen("MSLostPointerCapture", runOn(this, this.dq))); } } else { e.add(c.listen("gesturestart", runOn(this, this.dp))); e.add(c.listen("gesturechange", runOn(this, this.dm))); e.add(c.listen("gestureend", runOn(this, this.dn))); e.add(c.listen("touchstart", runOn(this, this.dy))); e.add(c.listen("touchmove", runOn(this, this.dx))); e.add(c.listen("touchend", runOn(this, this.dw))); } if (this.b0) { e.add(c.listen("wheel", runOn(this, this.cq))); } else { e.add(c.listen("DOMMouseScroll", runOn(this, this.co))); e.add(c.listen("mousewheel", runOn(this, this.co))); } }; DOMEventProxy.prototype.dv = function (e_) { var a = this.bu(e_); if (a) { this.cb = this.cb - 1; if (this.cb < 0) { this.cb = 0; } } if (this.cb < 2 && this.da && a) { this.da = false; var b = (e_.originalEvent.scale); this.a6(this.c6, b); } else { if (a) { this.dw(e_); } else { this.cp(e_); } } }; DOMEventProxy.prototype.dq = function (e_) { var a = this.bu(e_); if (a) { this.cb--; if (this.cb < 0) { this.cb = 0; } } if (this.cb < 2 && this.da && a) { this.da = false; var b = (e_.originalEvent.scale); this.a6(this.c6, b); } }; DOMEventProxy.prototype.dr = function (e_) { var a = this.bu(e_); if (a) { this.cb--; if (this.cb < 0) { this.cb = 0; } } if (this.cb < 2 && this.da && a) { this.da = false; var b = (e_.originalEvent.scale); this.a6(this.c6, b); } }; DOMEventProxy.prototype.ds = function (e_) { var a = this.bu(e_); if (this.dj != null && a) { this.cb++; var mGesture_ = this.dj; mGesture_.addPointer(e_.originalEvent.pointerId); } var eventSource_ = this.b7.getNativeElement(); if (BaseDOMEventProxy.bx) { eventSource_.setPointerCapture(e_.originalEvent.pointerId); } else { eventSource_.msSetPointerCapture(e_.originalEvent.pointerId); } if (this.cb > 1 && !this.da && a) { this.da = true; this.c2(e_); var b = (e_.originalEvent.scale); this.bg(this.c6, b); } else { if (a) { this.dy(e_); } else { this.cl(e_); } } }; DOMEventProxy.prototype.dt = function (e_) { var a = this.bu(e_); if (this.da) { return; } if (a) { this.dx(e_); } else { this.cn(e_); } }; DOMEventProxy.prototype.du = function (e_) { var a = this.bu(e_); if (this.da) { return; } if (a) { } else { this.cm(e_); } }; DOMEventProxy.prototype.dp = function (e_) { this.bv = true; this.c0(e_); this.c2(e_); this.d0(); if (this.ae(this.c7, true, false)) { this.cy(e_); if (BaseDOMEventProxy.b1 && this.cb < 2) { return; } var a = (e_.originalEvent.scale); this.bg(this.c6, a); } }; DOMEventProxy.prototype.dm = function (e_) { this.bv = true; this.c0(e_); this.c2(e_); if (this.ae(this.c7, true, false)) { this.cy(e_); if (BaseDOMEventProxy.b1 && this.cb < 2) { return; } var a = (e_.originalEvent.scale); this.bf(this.c6, a); } }; DOMEventProxy.prototype.dn = function (e_) { this.cy(e_); var a = (e_.originalEvent.scale); this.bv = false; this.c0(e_); this.c2(e_); if (!BaseDOMEventProxy.b1 || this.da) { this.a6(this.c6, a); } }; DOMEventProxy.prototype.dy = function (e_) { this.bv = true; this.c0(e_); this.c2(e_); this.d7 = this.c6; if (this.ae(this.c7, true, false)) { if (!this.ac) { this.cy(e_); } else { this.bz = true; } this.bd(this.c7, false, true); this.ba(this.c7); this.a1(this.c6, true); this.d3(); } }; DOMEventProxy.prototype.d3 = function () { if (this.dg == -1) { this.de = this.c7.x; this.df = this.c7.y; this.dg = this.b6.setTimeout(runOn(this, this.d1), 1500); } }; DOMEventProxy.prototype.d0 = function () { if (Math.abs(this.de - this.c7.x) > this.dd || Math.abs(this.df - this.c7.y) > this.dd) { this.d4(); } }; DOMEventProxy.prototype.d4 = function () { if (this.dg != -1) { window.clearTimeout(this.dg); this.dg = -1; } }; DOMEventProxy.prototype.d1 = function () { this.dg = -1; if (this.bz) { this.bz = false; this.cg(); } this.a8(this.c6); }; DOMEventProxy.prototype.dx = function (a) { this.bv = true; this.c0(a); this.c2(a); if (this.bz) { if (this.ae(this.c7, true, false) && this.db()) { this.bz = false; this.cg(); } } this.d0(); this.d5(); if (this.ae(this.c7, true, false) && this.cb == 1 && !this.bz) { this.cy(a); if (!this.c9) { this.c9 = true; this.d6 = this.c6; this.a5(this.d6); } else { this.bd(this.c7, true, true); this.a0(this.c6, true); this.a4(this.c6); } } }; DOMEventProxy.prototype.db = function () { var a = { $type: Point_$type, x: this.d7.x - this.c6.x, y: this.d7.y - this.c6.y }; if (Math.abs(a.x) < 2 && Math.abs(a.y) < 2) { return false; } if (Math.abs(a.x) > Math.abs(a.y)) { a.y = 0; } if (Math.abs(a.y) > Math.abs(a.x)) { a.x = 0; } return this.ar(a); }; DOMEventProxy.prototype.dw = function (a) { this.bv = false; this.c0(a); this.c2(a); this.d4(); if (this.bz) { this.bz = false; this.cg(); } this.cy(a); this.bd(this.c7, false, true); this.be(this.c7); if (this.cb == 0) { this.d2(this.c7); this.cv(); } if (this.c9 && this.cb == 0) { this.c9 = false; this.d6 = null; this.a3(this.c6); this.cv(); } this.az(this.c6, true, this.cb > 0); }; DOMEventProxy.prototype.d2 = function (a) { if (Rect.l_op_Equality(this.d8, null)) { this.d8 = new Rect(0, a.x - 50, a.y - 50, 100, 100); this.b6.setTimeout(runOn(this, this.d5), 500); } else { if (a.x >= this.d8.x && a.x <= this.d8.right && a.y >= this.d8.y && a.y <= this.d8.bottom) { this.d5(); this.a2(a); } } }; DOMEventProxy.prototype.d5 = function () { this.d8 = null; }; DOMEventProxy.prototype.dz = function (a) { if (this.dc.containsKey(a)) { var b = this.dc.item(a); this.dc.removeItem(a); for (var c = 0; c < b.count; c++) { b._inner[c](); } b.clear(); } }; DOMEventProxy.prototype.bk = function (a, b) { if (a == null) { return; } var c = a; var d = this.dk + b; this.dz(d); }; DOMEventProxy.prototype.ax = function () { if (this.b7 == null) { return; } this.dz(this.dk); this.b7 = null; }; DOMEventProxy.$t = markType(DOMEventProxy, 'DOMEventProxy', BaseDOMEventProxy.$); DOMEventProxy.dh = 0; return DOMEventProxy; }(BaseDOMEventProxy)); export { DOMEventProxy };