Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-pinch-zoom

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-pinch-zoom - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

14

bundles/ngx-pinch-zoom.umd.js

@@ -273,6 +273,16 @@ (function (global, factory) {

if (listener === 'mouseup' || listener === "mousemove") {
document[action](listener, this[handler], false);
if (action === 'addEventListener') {
document.addEventListener(listener, this[handler], false);
}
if (action === 'removeEventListener') {
document.removeEventListener(listener, this[handler], false);
}
}
else {
this.element[action](listener, this[handler], false);
if (action === 'addEventListener') {
this.element.addEventListener(listener, this[handler], false);
}
if (action === 'removeEventListener') {
this.element.removeEventListener(listener, this[handler], false);
}
}

@@ -279,0 +289,0 @@ }

2

bundles/ngx-pinch-zoom.umd.min.js

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-pinch-zoom",["exports","@angular/core","@angular/common"],e):e((t=t||self)["ngx-pinch-zoom"]={},t.ng.core,t.ng.common)}(this,(function(t,e,i){"use strict";var o={transitionDuration:200,doubleTap:!0,doubleTapScale:2,zoomButton:!0,zoomButtonScale:2,autoZoomOut:!1,limitZoom:3,disabled:!1},n={"transition-duration":"transitionDuration","double-tap":"doubleTap","double-tap-scale":"doubleTapScale","zoom-button":"zoomButton","auto-zoom-out":"autoZoomOut","limit-zoom":"limitZoom"};var s=function(){function t(t){var e=this;this.eventType=void 0,this.handlers={},this.startX=0,this.startY=0,this.lastTap=0,this.doubleTapMinTimeout=300,this.tapMinTimeout=200,this.touchstartTime=0,this.i=0,this.isMousedown=!1,this.touchListeners={touchstart:"handleTouchstart",touchmove:"handleTouchmove",touchend:"handleTouchend"},this.mouseListeners={mousedown:"handleMousedown",mousemove:"handleMousemove",mouseup:"handleMouseup"},this.handleTouchstart=function(t){e.elementPosition=e.getElementPosition(),e.touchstartTime=(new Date).getTime(),void 0===e.eventType&&e.getTouchstartPosition(t),e.runHandler("touchstart",t)},this.handleTouchmove=function(t){var i=t.touches;e.detectPan(i)&&e.runHandler("pan",t),e.detectPinch(t)&&e.runHandler("pinch",t)},this.handleTouchend=function(t){var i=t.touches;e.detectDoubleTap()&&e.runHandler("double-tap",t),e.detectTap(),e.runHandler("touchend",t),e.eventType="touchend",i&&0===i.length&&(e.eventType=void 0,e.i=0)},this.handleMousedown=function(t){e.isMousedown=!0,e.elementPosition=e.getElementPosition(),e.touchstartTime=(new Date).getTime(),void 0===e.eventType&&e.getMousedownPosition(t),e.runHandler("mousedown",t)},this.handleMousemove=function(t){if(t.preventDefault(),e.isMousedown){switch(e.runHandler("pan",t),e.detectLinearSwipe(t)){case"horizontal-swipe":t.swipeType="horizontal-swipe",e.runHandler("horizontal-swipe",t);break;case"vertical-swipe":t.swipeType="vertical-swipe",e.runHandler("vertical-swipe",t)}(e.detectLinearSwipe(t)||"horizontal-swipe"===e.eventType||"vertical-swipe"===e.eventType)&&e.handleLinearSwipe(t)}},this.handleMouseup=function(t){e.detectDoubleTap()&&e.runHandler("double-tap",t),e.detectTap(),e.isMousedown=!1,e.runHandler("mouseup",t),e.eventType=void 0,e.i=0},this.properties=t,this.element=this.properties.element,this.elementPosition=this.getElementPosition(),this.toggleEventListeners("addEventListener")}return t.prototype.destroy=function(){this.toggleEventListeners("removeEventListener")},t.prototype.toggleEventListeners=function(t){var e;for(var i in e="mouse and touch"===this.properties.listeners?Object.assign(this.touchListeners,this.mouseListeners):this.detectTouchScreen()?this.touchListeners:this.mouseListeners){var o=e[i];"mouseup"===i||"mousemove"===i?document[t](i,this[o],!1):this.element[t](i,this[o],!1)}},t.prototype.handleLinearSwipe=function(t){this.i++,this.i>3&&(this.eventType=this.getLinearSwipeType(t)),"horizontal-swipe"===this.eventType&&this.runHandler("horizontal-swipe",t),"vertical-swipe"===this.eventType&&this.runHandler("vertical-swipe",t)},t.prototype.runHandler=function(t,e){this.handlers[t]&&this.handlers[t](e)},t.prototype.detectPan=function(t){return 1===t.length&&!this.eventType||"pan"===this.eventType},t.prototype.detectDoubleTap=function(){var t=this;if(null==this.eventType){var e=(new Date).getTime(),i=e-this.lastTap;if(clearTimeout(this.doubleTapTimeout),i<this.doubleTapMinTimeout&&i>0)return!0;this.doubleTapTimeout=setTimeout((function(){clearTimeout(t.doubleTapTimeout)}),this.doubleTapMinTimeout),this.lastTap=e}},t.prototype.detectTap=function(){if(null==this.eventType){var t=(new Date).getTime()-this.touchstartTime;t>0&&(t<this.tapMinTimeout?this.runHandler("tap",event):this.runHandler("longtap",event))}},t.prototype.detectPinch=function(t){return 2===t.touches.length&&void 0===this.eventType||"pinch"===this.eventType},t.prototype.detectLinearSwipe=function(t){var e=t.touches;if(e){if(1===e.length&&!this.eventType||"horizontal-swipe"===this.eventType||"vertical-swipe"===this.eventType)return this.getLinearSwipeType(t)}else if(!this.eventType||"horizontal-swipe"===this.eventType||"vertical-swipe"===this.eventType)return this.getLinearSwipeType(t)},t.prototype.getLinearSwipeType=function(t){if("horizontal-swipe"!==this.eventType&&"vertical-swipe"!==this.eventType){var e=Math.abs(this.moveLeft(0,t)-this.startX);return 3*Math.abs(this.moveTop(0,t)-this.startY)>e?"vertical-swipe":"horizontal-swipe"}return this.eventType},t.prototype.getElementPosition=function(){return this.element.getBoundingClientRect()},t.prototype.getTouchstartPosition=function(t){this.startX=t.touches[0].clientX-this.elementPosition.left,this.startY=t.touches[0].clientY-this.elementPosition.top},t.prototype.getMousedownPosition=function(t){this.startX=t.clientX-this.elementPosition.left,this.startY=t.clientY-this.elementPosition.top},t.prototype.moveLeft=function(t,e){var i=e.touches;return i?i[t].clientX-this.elementPosition.left:e.clientX-this.elementPosition.left},t.prototype.moveTop=function(t,e){var i=e.touches;return i?i[t].clientY-this.elementPosition.top:e.clientY-this.elementPosition.top},t.prototype.detectTouchScreen=function(){var t=" -webkit- -moz- -o- -ms- ".split(" ");return"ontouchstart"in window||function(t){return window.matchMedia(t).matches}(["(",t.join("touch-enabled),("),"heartz",")"].join(""))},t.prototype.on=function(t,e){t&&(this.handlers[t]=e)},t}();var a={doubleTap:!0,doubleTapScale:2,transitionDuration:200,limitZoom:3},r=function(){function t(t){var e=this;this.i=0,this.scale=1,this.initialScale=1,this.startX=0,this.startY=0,this.moveX=0,this.moveY=0,this.initialMoveX=0,this.initialMoveY=0,this.moveXC=0,this.moveYC=0,this.lastTap=0,this.draggingMode=!1,this.distance=0,this.doubleTapTimeout=0,this.initialDistance=0,this.events={},this.handleTouchstart=function(t){e.getElementPosition(),void 0===e.eventType&&e.getTouchstartPosition(t)},this.handleTouchend=function(t){if("touchend"===t.type){e.i=0,e.draggingMode=!1;var i=t.touches;e.scale<1&&(e.scale=1),e.properties.autoZoomOut&&"pinch"===e.eventType&&(e.scale=1),"pinch"!==e.eventType&&"pan"!==e.eventType||e.alignImage(),"pinch"!==e.eventType&&"pan"!==e.eventType&&"horizontal-swipe"!==e.eventType&&"vertical-swipe"!==e.eventType||e.updateInitialValues(),e.eventType="touchend",i&&0===i.length&&(e.eventType=void 0)}"mouseup"===t.type&&(e.draggingMode=!1,e.updateInitialValues(),e.eventType=void 0)},this.handlePan=function(t){if(!(e.scale<=1)){t.preventDefault();var i=e.getClientPosition(t),o=i.clientX,n=i.clientY;e.eventType||(e.startX=o-e.elementPosition.left,e.startY=n-e.elementPosition.top),e.eventType="pan",e.moveX=e.initialMoveX+(e.moveLeft(t,0)-e.startX),e.moveY=e.initialMoveY+(e.moveTop(t,0)-e.startY),"mousemove"===t.type&&e.centeringImage(),e.emitEvent({name:"pan",detail:{moveX:e.moveX,moveY:e.moveY}}),e.transformElement(0)}},this.handleDoubleTap=function(t){e.emitEvent({name:"double-tap"}),e.toggleZoom(t)},this.handlePinch=function(t){if(t.preventDefault(),void 0===e.eventType||"pinch"===e.eventType){var i=t.touches;if(!e.eventType){e.initialDistance=e.getDistance(i);var o=e.moveLeft(t,0),n=e.moveLeft(t,1),s=e.moveTop(t,0),a=e.moveTop(t,1);e.moveXC=(o+n)/2-e.initialMoveX,e.moveYC=(s+a)/2-e.initialMoveY}e.eventType="pinch",e.distance=e.getDistance(i),e.scale=e.initialScale*(e.distance/e.initialDistance),e.moveX=e.initialMoveX-(e.distance/e.initialDistance*e.moveXC-e.moveXC),e.moveY=e.initialMoveY-(e.distance/e.initialDistance*e.moveYC-e.moveYC),e.handleLimitZoom(),e.emitEvent({name:"pinch",detail:{scale:e.scale}}),e.transformElement(0)}},this.element=t.element,this.elementTarget=this.element.querySelector("*").tagName,this.parentElement=this.element.parentElement,this.properties=Object.assign({},a,t),this.touches=new s({element:t.element}),this.setBasicStyles(),this.touches.on("touchstart",this.handleTouchstart),this.touches.on("touchend",this.handleTouchend),this.touches.on("mousedown",this.handleTouchstart),this.touches.on("mouseup",this.handleTouchend),this.touches.on("pan",this.handlePan),this.touches.on("mousemove",this.handlePan),this.touches.on("pinch",this.handlePinch),this.properties.doubleTap&&this.touches.on("double-tap",this.handleDoubleTap)}return t.prototype.emitEvent=function(t){this.events[t.name]=new CustomEvent(t.name,{detail:t.detail}),this.element.dispatchEvent(this.events[t.name])},t.prototype.handleLimitZoom=function(){if(void 0!==this.properties.limitZoom&&this.scale>this.properties.limitZoom){var t=this.getImageWidth(),e=this.getImageHeight(),i=t*this.scale,o=e*this.scale,n=this.moveX/(i-t),s=this.moveY/(o-e);this.scale=this.properties.limitZoom;var a=t*this.scale,r=e*this.scale;this.moveX=-Math.abs(n*(a-t)),this.moveY=-Math.abs(-s*(r-e)),this.transformElement(this.properties.transitionDuration)}},t.prototype.moveLeft=function(t,e){return void 0===e&&(e=0),this.getClientPosition(t,e).clientX-this.elementPosition.left},t.prototype.moveTop=function(t,e){return void 0===e&&(e=0),this.getClientPosition(t,e).clientY-this.elementPosition.top},t.prototype.centeringImage=function(){var t=this.element.getElementsByTagName(this.elementTarget)[0],e=this.moveX,i=this.moveY;return this.moveY>0&&(this.moveY=0),this.moveX>0&&(this.moveX=0),t&&(this.transitionYRestriction(),this.transitionXRestriction()),t&&this.scale<1&&this.moveX<this.element.offsetWidth*(1-this.scale)&&(this.moveX=this.element.offsetWidth*(1-this.scale)),e!==this.moveX||i!==this.moveY},t.prototype.transitionYRestriction=function(){var t=this.getImageHeight();if(t*this.scale<this.parentElement.offsetHeight)this.moveY=(this.parentElement.offsetHeight-this.element.offsetHeight*this.scale)/2;else{var e=(t-this.element.offsetHeight)*this.scale/2;this.moveY>e?this.moveY=e:t*this.scale+Math.abs(e)-this.parentElement.offsetHeight+this.moveY<0&&(this.moveY=-(t*this.scale+Math.abs(e)-this.parentElement.offsetHeight))}},t.prototype.transitionXRestriction=function(){var t=this.getImageWidth();if(t*this.scale<this.parentElement.offsetWidth)this.moveX=(this.parentElement.offsetWidth-this.element.offsetWidth*this.scale)/2;else{var e=(t-this.element.offsetWidth)*this.scale/2;this.moveX>e?this.moveX=e:t*this.scale+Math.abs(e)-this.parentElement.offsetWidth+this.moveX<0&&(this.moveX=-(t*this.scale+Math.abs(e)-this.parentElement.offsetWidth))}},t.prototype.setBasicStyles=function(){this.element.style.display="flex",this.element.style.alignItems="center",this.element.style.justifyContent="center",this.element.style.transformOrigin="0 0",this.setImageWidth()},t.prototype.setImageWidth=function(){var t=this.element.getElementsByTagName(this.elementTarget);t.length&&(t[0].style.maxWidth="100%",t[0].style.maxHeight="100%")},t.prototype.getElementPosition=function(){this.elementPosition=this.element.parentElement.getBoundingClientRect()},t.prototype.getTouchstartPosition=function(t){var e=this.getClientPosition(t),i=e.clientX,o=e.clientY;this.startX=i-this.elementPosition.left,this.startY=o-this.elementPosition.top},t.prototype.getClientPosition=function(t,e){var i,o;return void 0===e&&(e=0),"touchstart"!==t.type&&"touchmove"!==t.type||(i=t.touches[e].clientX,o=t.touches[e].clientY),"mousedown"!==t.type&&"mousemove"!==t.type||(i=t.clientX,o=t.clientY),{clientX:i,clientY:o}},t.prototype.resetScale=function(){this.scale=1,this.moveX=0,this.moveY=0,this.updateInitialValues(),this.transformElement(this.properties.transitionDuration)},t.prototype.updateInitialValues=function(){this.initialScale=this.scale,this.initialMoveX=this.moveX,this.initialMoveY=this.moveY},t.prototype.getDistance=function(t){return Math.sqrt(Math.pow(t[0].pageX-t[1].pageX,2)+Math.pow(t[0].pageY-t[1].pageY,2))},t.prototype.getImageHeight=function(){return this.element.offsetHeight},t.prototype.getImageWidth=function(){return this.element.offsetWidth},t.prototype.transformElement=function(t){this.element.style.transition="all "+t+"ms",this.element.style.transform="matrix("+Number(this.scale)+", 0, 0, "+Number(this.scale)+", "+Number(this.moveX)+", "+Number(this.moveY)+")"},t.prototype.isTouchScreen=function(){var t=" -webkit- -moz- -o- -ms- ".split(" ");if("ontouchstart"in window)return!0;var e=["(",t.join("touch-enabled),("),"heartz",")"].join("");return this.getMatchMedia(e)},t.prototype.getMatchMedia=function(t){return window.matchMedia(t).matches},t.prototype.isDragging=function(){var t=this.getImageHeight(),e=this.getImageWidth();return this.scale>1?t*this.scale>this.parentElement.offsetHeight||e*this.scale>this.parentElement.offsetWidth:1===this.scale?t>this.parentElement.offsetHeight||e>this.parentElement.offsetWidth:void 0},t.prototype.toggleZoom=function(t){if(void 0===t&&(t=!1),1===this.initialScale){if(t&&t.changedTouches){if(void 0===this.properties.doubleTapScale)return;var e=t.changedTouches;this.scale=this.initialScale*this.properties.doubleTapScale,this.moveX=this.initialMoveX-(e[0].clientX-this.elementPosition.left)*(this.properties.doubleTapScale-1),this.moveY=this.initialMoveY-(e[0].clientY-this.elementPosition.top)*(this.properties.doubleTapScale-1)}else this.scale=this.initialScale*this.properties.zoomButtonScale,this.moveX=this.initialMoveX-this.element.offsetWidth*(this.scale-1)/2,this.moveY=this.initialMoveY-this.element.offsetHeight*(this.scale-1)/2;this.centeringImage(),this.updateInitialValues(),this.emitEvent({name:"zoom-in"}),this.transformElement(this.properties.transitionDuration)}else this.emitEvent({name:"zoom-out"}),this.resetScale()},t.prototype.alignImage=function(){this.centeringImage()&&(this.updateInitialValues(),this.transformElement(this.properties.transitionDuration))},t}();var h=function(){function t(t){this.elementRef=t,this.transitionDuration=200,this.doubleTap=!0,this.doubleTapScale=2,this.zoomButton=!0,this.zoomButtonScale=2,this.autoZoomOut=!1,this.disabled=!1,this.allowScroll=!1,this.events=new e.EventEmitter,this.hostDisplay="block",this.hostOverflow="hidden",this.applyOptionsDefault(o,{})}return Object.defineProperty(t.prototype,"isZoomButton",{get:function(){return this.properties.zoomButton},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},set:function(t){t&&(this._properties=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTouchScreen",{get:function(){var t=" -webkit- -moz- -o- -ms- ".split(" ");return"ontouchstart"in window||function(t){return window.matchMedia(t).matches}(["(",t.join("touch-enabled),("),"heartz",")"].join(""))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDragging",{get:function(){if(this.pinchZoom)return this.pinchZoom.isDragging()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisabled",{get:function(){if(this.properties)return this.properties.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){if(this.pinchZoom)return this.pinchZoom.scale},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.initPinchZoom()},t.prototype.ngOnChanges=function(t){var e=this.getProperties(t);e=this.renameProperties(e),this.applyOptionsDefault(o,e)},t.prototype.ngOnDestroy=function(){},t.prototype.initPinchZoom=function(){this.properties.disabled||(this.properties.element=this.elementRef.nativeElement.querySelector(".pinch-zoom-content"),this.pinchZoom=new r(this.properties))},t.prototype.getProperties=function(t){var e={};for(var i in t)"properties"!==i&&(e[i]=t[i].currentValue),"properties"===i&&(e=t[i].currentValue);return e},t.prototype.renameProperties=function(t){for(var e in t)n[e]&&(t[n[e]]=t[e],delete t[e]);return t},t.prototype.applyOptionsDefault=function(t,e){this.properties=Object.assign({},t,e)},t.prototype.toggleZoom=function(){this.pinchZoom.toggleZoom()},t.decorators=[{type:e.Component,args:[{selector:"pinch-zoom",template:'<div class="pinch-zoom-content" \n\t[class.pz-dragging]="isDragging">\n\t<ng-content></ng-content>\n</div>\n\n<div class="pz-zoom-button"\n\t*ngIf="isZoomButton && !isTouchScreen && !isDisabled"\n\t(click)="toggleZoom()"\n\t[class.pz-zoom-out]="scale > 1">\n</div>',styles:[":host{position:relative;overflow:hidden;display:block}.pz-dragging{cursor:all-scroll}.pz-zoom-button{position:absolute;left:50%;bottom:16px;margin-left:-22px;z-index:1000;color:#fff;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAQAAABLCVATAAABVUlEQVR4Ae3PAwxQXRgA0Pvbto1sW2NDts0x27atIdeQrakpY8i23cnGe5nn8epDeO1h+VgeVdRVRJLwsCQ101nX2aWJd8OD8a7Ozrkda6UJ8XnPUsBZy43S2Wz7rs8UDnEZCZjn5+tzb6jqCDgucYhDakAnb4Rb+MdmMCPEYSqYfH2cXfPr/ymcBalDFF84izN+uD7TnHCdXqB7iCI/WByuuy1QbrAiRFEL9L3WlObmc/l7uUHfgn0hivqg47VaXMfluQ/A6RBFeTDmnq39D7aEKNKBXfcMVBVMCtFsB0XvFshbVoBSIZqGYL8/wh10B/u8F6L52E6wU7ZwEx/oC6gV4pHVOXDeIPn95WOZ1bYRsD7EJ79D7m4nmO7dEI+fTHC7o7p6h+uh4pJJB0vscMwKQ+X13uXZ6RGh4vKeeQ8c6nWoJiFadCjRFUXzntbeDc/GaxcAotf7cicflKkAAAAASUVORK5CYII=),url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAQAAABLCVATAAABS0lEQVR4Ae3UA8xWfQCG8afPNrNt240N2TbHbNu2hlxDtqamjCHbdr/s5905b9Z1fN/bdfyPfOZl8ZMSGmipggwvL8loqZsAOKaDb2Ir+UZ/t7zITjlio/nWRsBNm03T33KnHiflw4umAlaJ/ziL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04TTZAf3Eea5JYT9YEk60EMyP2mVxE2QP1vzuJm74P4Z+GBgcLCoN1sfYFwdbgkXNwMj7+4V1fnq6n/0DTgWLWoO+9/c7AwD3s+/B9WBRbTAjxj41OBAsygWOxdg3BPMiwTgMKkbtvrQFVAsjagtOSxKlGwxO+Tbc0HEUHFXomfx7IwHNIuFQ0C1w2zilJfOT/JrbC9gdCY/SzonOUbA49Mgknjme56KBvuaxKizy6WODIy7ZYqKSDx6xxUGq8MPeqlirPqs6RKljqwq6ovCq7r6JvBs+cwdLiOaEU9ek1AAAAABJRU5ErkJggg==);background-color:rgba(0,0,0,.8);background-position:center,-1000px;background-repeat:no-repeat,no-repeat;width:56px;height:56px;border-radius:4px;opacity:.5;cursor:pointer;transition:opacity .1s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pz-zoom-button.pz-zoom-out{background-position:-1000px,center}.pz-zoom-button:hover{opacity:.7}"]}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={properties:[{type:e.Input,args:["properties"]}],transitionDuration:[{type:e.Input,args:["transition-duration"]}],doubleTap:[{type:e.Input,args:["double-tap"]}],doubleTapScale:[{type:e.Input,args:["double-tap-scale"]}],zoomButton:[{type:e.Input,args:["zoom-button"]}],zoomButtonScale:[{type:e.Input,args:["zoom-button-scale"]}],autoZoomOut:[{type:e.Input,args:["auto-zoom-out"]}],limitZoom:[{type:e.Input,args:["limit-zoom"]}],disabled:[{type:e.Input,args:["disabled"]}],allowScroll:[{type:e.Input,args:["allow-scroll"]}],events:[{type:e.Output}],hostDisplay:[{type:e.HostBinding,args:["style.display"]}],hostOverflow:[{type:e.HostBinding,args:["style.overflow"]}]},t}();var l=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[h],imports:[i.CommonModule],exports:[h],providers:[],bootstrap:[],entryComponents:[h]}]}],t}();t.PinchZoomModule=l,t.ɵa=h,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-pinch-zoom",["exports","@angular/core","@angular/common"],e):e((t=t||self)["ngx-pinch-zoom"]={},t.ng.core,t.ng.common)}(this,(function(t,e,i){"use strict";var o={transitionDuration:200,doubleTap:!0,doubleTapScale:2,zoomButton:!0,zoomButtonScale:2,autoZoomOut:!1,limitZoom:3,disabled:!1},n={"transition-duration":"transitionDuration","double-tap":"doubleTap","double-tap-scale":"doubleTapScale","zoom-button":"zoomButton","auto-zoom-out":"autoZoomOut","limit-zoom":"limitZoom"};var s=function(){function t(t){var e=this;this.eventType=void 0,this.handlers={},this.startX=0,this.startY=0,this.lastTap=0,this.doubleTapMinTimeout=300,this.tapMinTimeout=200,this.touchstartTime=0,this.i=0,this.isMousedown=!1,this.touchListeners={touchstart:"handleTouchstart",touchmove:"handleTouchmove",touchend:"handleTouchend"},this.mouseListeners={mousedown:"handleMousedown",mousemove:"handleMousemove",mouseup:"handleMouseup"},this.handleTouchstart=function(t){e.elementPosition=e.getElementPosition(),e.touchstartTime=(new Date).getTime(),void 0===e.eventType&&e.getTouchstartPosition(t),e.runHandler("touchstart",t)},this.handleTouchmove=function(t){var i=t.touches;e.detectPan(i)&&e.runHandler("pan",t),e.detectPinch(t)&&e.runHandler("pinch",t)},this.handleTouchend=function(t){var i=t.touches;e.detectDoubleTap()&&e.runHandler("double-tap",t),e.detectTap(),e.runHandler("touchend",t),e.eventType="touchend",i&&0===i.length&&(e.eventType=void 0,e.i=0)},this.handleMousedown=function(t){e.isMousedown=!0,e.elementPosition=e.getElementPosition(),e.touchstartTime=(new Date).getTime(),void 0===e.eventType&&e.getMousedownPosition(t),e.runHandler("mousedown",t)},this.handleMousemove=function(t){if(t.preventDefault(),e.isMousedown){switch(e.runHandler("pan",t),e.detectLinearSwipe(t)){case"horizontal-swipe":t.swipeType="horizontal-swipe",e.runHandler("horizontal-swipe",t);break;case"vertical-swipe":t.swipeType="vertical-swipe",e.runHandler("vertical-swipe",t)}(e.detectLinearSwipe(t)||"horizontal-swipe"===e.eventType||"vertical-swipe"===e.eventType)&&e.handleLinearSwipe(t)}},this.handleMouseup=function(t){e.detectDoubleTap()&&e.runHandler("double-tap",t),e.detectTap(),e.isMousedown=!1,e.runHandler("mouseup",t),e.eventType=void 0,e.i=0},this.properties=t,this.element=this.properties.element,this.elementPosition=this.getElementPosition(),this.toggleEventListeners("addEventListener")}return t.prototype.destroy=function(){this.toggleEventListeners("removeEventListener")},t.prototype.toggleEventListeners=function(t){var e;for(var i in e="mouse and touch"===this.properties.listeners?Object.assign(this.touchListeners,this.mouseListeners):this.detectTouchScreen()?this.touchListeners:this.mouseListeners){var o=e[i];"mouseup"===i||"mousemove"===i?("addEventListener"===t&&document.addEventListener(i,this[o],!1),"removeEventListener"===t&&document.removeEventListener(i,this[o],!1)):("addEventListener"===t&&this.element.addEventListener(i,this[o],!1),"removeEventListener"===t&&this.element.removeEventListener(i,this[o],!1))}},t.prototype.handleLinearSwipe=function(t){this.i++,this.i>3&&(this.eventType=this.getLinearSwipeType(t)),"horizontal-swipe"===this.eventType&&this.runHandler("horizontal-swipe",t),"vertical-swipe"===this.eventType&&this.runHandler("vertical-swipe",t)},t.prototype.runHandler=function(t,e){this.handlers[t]&&this.handlers[t](e)},t.prototype.detectPan=function(t){return 1===t.length&&!this.eventType||"pan"===this.eventType},t.prototype.detectDoubleTap=function(){var t=this;if(null==this.eventType){var e=(new Date).getTime(),i=e-this.lastTap;if(clearTimeout(this.doubleTapTimeout),i<this.doubleTapMinTimeout&&i>0)return!0;this.doubleTapTimeout=setTimeout((function(){clearTimeout(t.doubleTapTimeout)}),this.doubleTapMinTimeout),this.lastTap=e}},t.prototype.detectTap=function(){if(null==this.eventType){var t=(new Date).getTime()-this.touchstartTime;t>0&&(t<this.tapMinTimeout?this.runHandler("tap",event):this.runHandler("longtap",event))}},t.prototype.detectPinch=function(t){return 2===t.touches.length&&void 0===this.eventType||"pinch"===this.eventType},t.prototype.detectLinearSwipe=function(t){var e=t.touches;if(e){if(1===e.length&&!this.eventType||"horizontal-swipe"===this.eventType||"vertical-swipe"===this.eventType)return this.getLinearSwipeType(t)}else if(!this.eventType||"horizontal-swipe"===this.eventType||"vertical-swipe"===this.eventType)return this.getLinearSwipeType(t)},t.prototype.getLinearSwipeType=function(t){if("horizontal-swipe"!==this.eventType&&"vertical-swipe"!==this.eventType){var e=Math.abs(this.moveLeft(0,t)-this.startX);return 3*Math.abs(this.moveTop(0,t)-this.startY)>e?"vertical-swipe":"horizontal-swipe"}return this.eventType},t.prototype.getElementPosition=function(){return this.element.getBoundingClientRect()},t.prototype.getTouchstartPosition=function(t){this.startX=t.touches[0].clientX-this.elementPosition.left,this.startY=t.touches[0].clientY-this.elementPosition.top},t.prototype.getMousedownPosition=function(t){this.startX=t.clientX-this.elementPosition.left,this.startY=t.clientY-this.elementPosition.top},t.prototype.moveLeft=function(t,e){var i=e.touches;return i?i[t].clientX-this.elementPosition.left:e.clientX-this.elementPosition.left},t.prototype.moveTop=function(t,e){var i=e.touches;return i?i[t].clientY-this.elementPosition.top:e.clientY-this.elementPosition.top},t.prototype.detectTouchScreen=function(){var t=" -webkit- -moz- -o- -ms- ".split(" ");return"ontouchstart"in window||function(t){return window.matchMedia(t).matches}(["(",t.join("touch-enabled),("),"heartz",")"].join(""))},t.prototype.on=function(t,e){t&&(this.handlers[t]=e)},t}();var a={doubleTap:!0,doubleTapScale:2,transitionDuration:200,limitZoom:3},r=function(){function t(t){var e=this;this.i=0,this.scale=1,this.initialScale=1,this.startX=0,this.startY=0,this.moveX=0,this.moveY=0,this.initialMoveX=0,this.initialMoveY=0,this.moveXC=0,this.moveYC=0,this.lastTap=0,this.draggingMode=!1,this.distance=0,this.doubleTapTimeout=0,this.initialDistance=0,this.events={},this.handleTouchstart=function(t){e.getElementPosition(),void 0===e.eventType&&e.getTouchstartPosition(t)},this.handleTouchend=function(t){if("touchend"===t.type){e.i=0,e.draggingMode=!1;var i=t.touches;e.scale<1&&(e.scale=1),e.properties.autoZoomOut&&"pinch"===e.eventType&&(e.scale=1),"pinch"!==e.eventType&&"pan"!==e.eventType||e.alignImage(),"pinch"!==e.eventType&&"pan"!==e.eventType&&"horizontal-swipe"!==e.eventType&&"vertical-swipe"!==e.eventType||e.updateInitialValues(),e.eventType="touchend",i&&0===i.length&&(e.eventType=void 0)}"mouseup"===t.type&&(e.draggingMode=!1,e.updateInitialValues(),e.eventType=void 0)},this.handlePan=function(t){if(!(e.scale<=1)){t.preventDefault();var i=e.getClientPosition(t),o=i.clientX,n=i.clientY;e.eventType||(e.startX=o-e.elementPosition.left,e.startY=n-e.elementPosition.top),e.eventType="pan",e.moveX=e.initialMoveX+(e.moveLeft(t,0)-e.startX),e.moveY=e.initialMoveY+(e.moveTop(t,0)-e.startY),"mousemove"===t.type&&e.centeringImage(),e.emitEvent({name:"pan",detail:{moveX:e.moveX,moveY:e.moveY}}),e.transformElement(0)}},this.handleDoubleTap=function(t){e.emitEvent({name:"double-tap"}),e.toggleZoom(t)},this.handlePinch=function(t){if(t.preventDefault(),void 0===e.eventType||"pinch"===e.eventType){var i=t.touches;if(!e.eventType){e.initialDistance=e.getDistance(i);var o=e.moveLeft(t,0),n=e.moveLeft(t,1),s=e.moveTop(t,0),a=e.moveTop(t,1);e.moveXC=(o+n)/2-e.initialMoveX,e.moveYC=(s+a)/2-e.initialMoveY}e.eventType="pinch",e.distance=e.getDistance(i),e.scale=e.initialScale*(e.distance/e.initialDistance),e.moveX=e.initialMoveX-(e.distance/e.initialDistance*e.moveXC-e.moveXC),e.moveY=e.initialMoveY-(e.distance/e.initialDistance*e.moveYC-e.moveYC),e.handleLimitZoom(),e.emitEvent({name:"pinch",detail:{scale:e.scale}}),e.transformElement(0)}},this.element=t.element,this.elementTarget=this.element.querySelector("*").tagName,this.parentElement=this.element.parentElement,this.properties=Object.assign({},a,t),this.touches=new s({element:t.element}),this.setBasicStyles(),this.touches.on("touchstart",this.handleTouchstart),this.touches.on("touchend",this.handleTouchend),this.touches.on("mousedown",this.handleTouchstart),this.touches.on("mouseup",this.handleTouchend),this.touches.on("pan",this.handlePan),this.touches.on("mousemove",this.handlePan),this.touches.on("pinch",this.handlePinch),this.properties.doubleTap&&this.touches.on("double-tap",this.handleDoubleTap)}return t.prototype.emitEvent=function(t){this.events[t.name]=new CustomEvent(t.name,{detail:t.detail}),this.element.dispatchEvent(this.events[t.name])},t.prototype.handleLimitZoom=function(){if(void 0!==this.properties.limitZoom&&this.scale>this.properties.limitZoom){var t=this.getImageWidth(),e=this.getImageHeight(),i=t*this.scale,o=e*this.scale,n=this.moveX/(i-t),s=this.moveY/(o-e);this.scale=this.properties.limitZoom;var a=t*this.scale,r=e*this.scale;this.moveX=-Math.abs(n*(a-t)),this.moveY=-Math.abs(-s*(r-e)),this.transformElement(this.properties.transitionDuration)}},t.prototype.moveLeft=function(t,e){return void 0===e&&(e=0),this.getClientPosition(t,e).clientX-this.elementPosition.left},t.prototype.moveTop=function(t,e){return void 0===e&&(e=0),this.getClientPosition(t,e).clientY-this.elementPosition.top},t.prototype.centeringImage=function(){var t=this.element.getElementsByTagName(this.elementTarget)[0],e=this.moveX,i=this.moveY;return this.moveY>0&&(this.moveY=0),this.moveX>0&&(this.moveX=0),t&&(this.transitionYRestriction(),this.transitionXRestriction()),t&&this.scale<1&&this.moveX<this.element.offsetWidth*(1-this.scale)&&(this.moveX=this.element.offsetWidth*(1-this.scale)),e!==this.moveX||i!==this.moveY},t.prototype.transitionYRestriction=function(){var t=this.getImageHeight();if(t*this.scale<this.parentElement.offsetHeight)this.moveY=(this.parentElement.offsetHeight-this.element.offsetHeight*this.scale)/2;else{var e=(t-this.element.offsetHeight)*this.scale/2;this.moveY>e?this.moveY=e:t*this.scale+Math.abs(e)-this.parentElement.offsetHeight+this.moveY<0&&(this.moveY=-(t*this.scale+Math.abs(e)-this.parentElement.offsetHeight))}},t.prototype.transitionXRestriction=function(){var t=this.getImageWidth();if(t*this.scale<this.parentElement.offsetWidth)this.moveX=(this.parentElement.offsetWidth-this.element.offsetWidth*this.scale)/2;else{var e=(t-this.element.offsetWidth)*this.scale/2;this.moveX>e?this.moveX=e:t*this.scale+Math.abs(e)-this.parentElement.offsetWidth+this.moveX<0&&(this.moveX=-(t*this.scale+Math.abs(e)-this.parentElement.offsetWidth))}},t.prototype.setBasicStyles=function(){this.element.style.display="flex",this.element.style.alignItems="center",this.element.style.justifyContent="center",this.element.style.transformOrigin="0 0",this.setImageWidth()},t.prototype.setImageWidth=function(){var t=this.element.getElementsByTagName(this.elementTarget);t.length&&(t[0].style.maxWidth="100%",t[0].style.maxHeight="100%")},t.prototype.getElementPosition=function(){this.elementPosition=this.element.parentElement.getBoundingClientRect()},t.prototype.getTouchstartPosition=function(t){var e=this.getClientPosition(t),i=e.clientX,o=e.clientY;this.startX=i-this.elementPosition.left,this.startY=o-this.elementPosition.top},t.prototype.getClientPosition=function(t,e){var i,o;return void 0===e&&(e=0),"touchstart"!==t.type&&"touchmove"!==t.type||(i=t.touches[e].clientX,o=t.touches[e].clientY),"mousedown"!==t.type&&"mousemove"!==t.type||(i=t.clientX,o=t.clientY),{clientX:i,clientY:o}},t.prototype.resetScale=function(){this.scale=1,this.moveX=0,this.moveY=0,this.updateInitialValues(),this.transformElement(this.properties.transitionDuration)},t.prototype.updateInitialValues=function(){this.initialScale=this.scale,this.initialMoveX=this.moveX,this.initialMoveY=this.moveY},t.prototype.getDistance=function(t){return Math.sqrt(Math.pow(t[0].pageX-t[1].pageX,2)+Math.pow(t[0].pageY-t[1].pageY,2))},t.prototype.getImageHeight=function(){return this.element.offsetHeight},t.prototype.getImageWidth=function(){return this.element.offsetWidth},t.prototype.transformElement=function(t){this.element.style.transition="all "+t+"ms",this.element.style.transform="matrix("+Number(this.scale)+", 0, 0, "+Number(this.scale)+", "+Number(this.moveX)+", "+Number(this.moveY)+")"},t.prototype.isTouchScreen=function(){var t=" -webkit- -moz- -o- -ms- ".split(" ");if("ontouchstart"in window)return!0;var e=["(",t.join("touch-enabled),("),"heartz",")"].join("");return this.getMatchMedia(e)},t.prototype.getMatchMedia=function(t){return window.matchMedia(t).matches},t.prototype.isDragging=function(){var t=this.getImageHeight(),e=this.getImageWidth();return this.scale>1?t*this.scale>this.parentElement.offsetHeight||e*this.scale>this.parentElement.offsetWidth:1===this.scale?t>this.parentElement.offsetHeight||e>this.parentElement.offsetWidth:void 0},t.prototype.toggleZoom=function(t){if(void 0===t&&(t=!1),1===this.initialScale){if(t&&t.changedTouches){if(void 0===this.properties.doubleTapScale)return;var e=t.changedTouches;this.scale=this.initialScale*this.properties.doubleTapScale,this.moveX=this.initialMoveX-(e[0].clientX-this.elementPosition.left)*(this.properties.doubleTapScale-1),this.moveY=this.initialMoveY-(e[0].clientY-this.elementPosition.top)*(this.properties.doubleTapScale-1)}else this.scale=this.initialScale*this.properties.zoomButtonScale,this.moveX=this.initialMoveX-this.element.offsetWidth*(this.scale-1)/2,this.moveY=this.initialMoveY-this.element.offsetHeight*(this.scale-1)/2;this.centeringImage(),this.updateInitialValues(),this.emitEvent({name:"zoom-in"}),this.transformElement(this.properties.transitionDuration)}else this.emitEvent({name:"zoom-out"}),this.resetScale()},t.prototype.alignImage=function(){this.centeringImage()&&(this.updateInitialValues(),this.transformElement(this.properties.transitionDuration))},t}();var h=function(){function t(t){this.elementRef=t,this.transitionDuration=200,this.doubleTap=!0,this.doubleTapScale=2,this.zoomButton=!0,this.zoomButtonScale=2,this.autoZoomOut=!1,this.disabled=!1,this.allowScroll=!1,this.events=new e.EventEmitter,this.hostDisplay="block",this.hostOverflow="hidden",this.applyOptionsDefault(o,{})}return Object.defineProperty(t.prototype,"isZoomButton",{get:function(){return this.properties.zoomButton},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},set:function(t){t&&(this._properties=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTouchScreen",{get:function(){var t=" -webkit- -moz- -o- -ms- ".split(" ");return"ontouchstart"in window||function(t){return window.matchMedia(t).matches}(["(",t.join("touch-enabled),("),"heartz",")"].join(""))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDragging",{get:function(){if(this.pinchZoom)return this.pinchZoom.isDragging()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisabled",{get:function(){if(this.properties)return this.properties.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){if(this.pinchZoom)return this.pinchZoom.scale},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.initPinchZoom()},t.prototype.ngOnChanges=function(t){var e=this.getProperties(t);e=this.renameProperties(e),this.applyOptionsDefault(o,e)},t.prototype.ngOnDestroy=function(){},t.prototype.initPinchZoom=function(){this.properties.disabled||(this.properties.element=this.elementRef.nativeElement.querySelector(".pinch-zoom-content"),this.pinchZoom=new r(this.properties))},t.prototype.getProperties=function(t){var e={};for(var i in t)"properties"!==i&&(e[i]=t[i].currentValue),"properties"===i&&(e=t[i].currentValue);return e},t.prototype.renameProperties=function(t){for(var e in t)n[e]&&(t[n[e]]=t[e],delete t[e]);return t},t.prototype.applyOptionsDefault=function(t,e){this.properties=Object.assign({},t,e)},t.prototype.toggleZoom=function(){this.pinchZoom.toggleZoom()},t.decorators=[{type:e.Component,args:[{selector:"pinch-zoom",template:'<div class="pinch-zoom-content" \n\t[class.pz-dragging]="isDragging">\n\t<ng-content></ng-content>\n</div>\n\n<div class="pz-zoom-button"\n\t*ngIf="isZoomButton && !isTouchScreen && !isDisabled"\n\t(click)="toggleZoom()"\n\t[class.pz-zoom-out]="scale > 1">\n</div>',styles:[":host{position:relative;overflow:hidden;display:block}.pz-dragging{cursor:all-scroll}.pz-zoom-button{position:absolute;left:50%;bottom:16px;margin-left:-22px;z-index:1000;color:#fff;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAQAAABLCVATAAABVUlEQVR4Ae3PAwxQXRgA0Pvbto1sW2NDts0x27atIdeQrakpY8i23cnGe5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1h+VgeVdRVRJLwsCQ101nX2aWJd8OD8a7Ozrkda6UJ8XnPUsBZy43S2Wz7rs8UDnEZCZjn5+tzb6jqCDgucYhDakAnb4Rb+MdmMCPEYSqYfH2cXfPr/ymcBalDFF84izN+uD7TnHCdXqB7iCI/WByuuy1QbrAiRFEL9L3WlObmc/l7uUHfgn0hivqg47VaXMfluQ/A6RBFeTDmnq39D7aEKNKBXfcMVBVMCtFsB0XvFshbVoBSIZqGYL8/wh10B/u8F6L52E6wU7ZwEx/oC6gV4pHVOXDeIPn95WOZ1bYRsD7EJ79D7m4nmO7dEI+fTHC7o7p6h+uh4pJJB0vscMwKQ+X13uXZ6RGh4vKeeQ8c6nWoJiFadCjRFUXzntbeDc/GaxcAotf7cicflKkAAAAASUVORK5CYII=),url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAQAAABLCVATAAABS0lEQVR4Ae3UA8xWfQCG8afPNrNt240N2TbHbNu2hlxDtqamjCHbdr/s5905b9Z1fN/bdfyPfOZl8ZMSGmipggwvL8loqZsAOKaDb2Ir+UZ/t7zITjlio/nWRsBNm03T33KnHiflw4umAlaJ/ziLo6EL4LL04TTZAf3Eea5JYT9YEk60EMyP2mVxE2QP1vzuJm74P4Z+GBgcLCoN1sfYFwdbgkXNwMj7+4V1fnq6n/0DTgWLWoO+9/c7AwD3s+/B9WBRbTAjxj41OBAsygWOxdg3BPMiwTgMKkbtvrQFVAsjagtOSxKlGwxO+Tbc0HEUHFXomfx7IwHNIuFQ0C1w2zilJfOT/JrbC9gdCY/SzonOUbA49Mgknjme56KBvuaxKizy6WODIy7ZYqKSDx6xxUGq8MPeqlirPqs6RKljqwq6ovCq7r6JvBs+cwdLiOaEU9ek1AAAAABJRU5ErkJggg==);background-color:rgba(0,0,0,.8);background-position:center,-1000px;background-repeat:no-repeat,no-repeat;width:56px;height:56px;border-radius:4px;opacity:.5;cursor:pointer;transition:opacity .1s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pz-zoom-button.pz-zoom-out{background-position:-1000px,center}.pz-zoom-button:hover{opacity:.7}"]}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={properties:[{type:e.Input,args:["properties"]}],transitionDuration:[{type:e.Input,args:["transition-duration"]}],doubleTap:[{type:e.Input,args:["double-tap"]}],doubleTapScale:[{type:e.Input,args:["double-tap-scale"]}],zoomButton:[{type:e.Input,args:["zoom-button"]}],zoomButtonScale:[{type:e.Input,args:["zoom-button-scale"]}],autoZoomOut:[{type:e.Input,args:["auto-zoom-out"]}],limitZoom:[{type:e.Input,args:["limit-zoom"]}],disabled:[{type:e.Input,args:["disabled"]}],allowScroll:[{type:e.Input,args:["allow-scroll"]}],events:[{type:e.Output}],hostDisplay:[{type:e.HostBinding,args:["style.display"]}],hostOverflow:[{type:e.HostBinding,args:["style.overflow"]}]},t}();var l=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[h],imports:[i.CommonModule],exports:[h],providers:[],bootstrap:[],entryComponents:[h]}]}],t}();t.PinchZoomModule=l,t.ɵa=h,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=ngx-pinch-zoom.umd.min.js.map

@@ -206,6 +206,16 @@ /**

if (listener === 'mouseup' || listener === "mousemove") {
document[action](listener, this[handler], false);
if (action === 'addEventListener') {
document.addEventListener(listener, this[handler], false);
}
if (action === 'removeEventListener') {
document.removeEventListener(listener, this[handler], false);
}
}
else {
this.element[action](listener, this[handler], false);
if (action === 'addEventListener') {
this.element.addEventListener(listener, this[handler], false);
}
if (action === 'removeEventListener') {
this.element.removeEventListener(listener, this[handler], false);
}
}

@@ -478,2 +488,2 @@ }

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG91Y2hlcy5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1waW5jaC16b29tLyIsInNvdXJjZXMiOlsibGliL3RvdWNoZXMudHMiXSwibmFtZXMiOltdLCJtYXB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lID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgdGhpcy5nZXRUb3VjaHN0YXJ0UG9zaXRpb24oZXZlbnQpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwidG91Y2hzdGFydFwiLCBldmVudCk7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8qIFRvdWNobW92ZSAqL1xyXG5cclxuICAgIGhhbmRsZVRvdWNobW92ZSA9IChldmVudDogYW55KSA9PiB7XHJcbiAgICAgICAgY29uc3QgdG91Y2hlcyA9IGV2ZW50LnRvdWNoZXM7XHJcblxyXG4gICAgICAgIC8vIFBhblxyXG4gICAgICAgIGlmICh0aGlzLmRldGVjdFBhbih0b3VjaGVzKSkge1xyXG4gICAgICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJwYW5cIiwgZXZlbnQpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gTGluZWFyIHN3aXBlXHJcbiAgICAgICAgLypcclxuICAgICAgICBzd2l0Y2ggKHRoaXMuZGV0ZWN0TGluZWFyU3dpcGUoZXZlbnQpKSB7XHJcbiAgICAgICAgICAgIGNhc2UgXCJob3Jpem9udGFsLXN3aXBlXCI6XHJcbiAgICAgICAgICAgICAgICBldmVudC5zd2lwZVR5cGUgPSBcImhvcml6b250YWwtc3dpcGVcIjtcclxuICAgICAgICAgICAgICAgIHRoaXMucnVuSGFuZGxlcihcImhvcml6b250YWwtc3dpcGVcIiwgZXZlbnQpO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgXCJ2ZXJ0aWNhbC1zd2lwZVwiOlxyXG4gICAgICAgICAgICAgICAgZXZlbnQuc3dpcGVUeXBlID0gXCJ2ZXJ0aWNhbC1zd2lwZVwiO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwidmVydGljYWwtc3dpcGVcIiwgZXZlbnQpO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgfVxyXG4gICAgICAgICovXHJcblxyXG4gICAgICAgIC8vIExpbmVhciBzd2lwZVxyXG4gICAgICAgIC8qXHJcbiAgICAgICAgaWYgKHRoaXMuZGV0ZWN0TGluZWFyU3dpcGUoZXZlbnQpIHx8XHJcbiAgICAgICAgICAgIHRoaXMuZXZlbnRUeXBlID09PSAnaG9yaXpvbnRhbC1zd2lwZScgfHxcclxuICAgICAgICAgICAgdGhpcy5ldmVudFR5cGUgPT09ICd2ZXJ0aWNhbC1zd2lwZScpIHtcclxuXHJcbiAgICAgICAgICAgIHRoaXMuaGFuZGxlTGluZWFyU3dpcGUoZXZlbnQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICAqL1xyXG5cclxuICAgICAgICAvLyBQaW5jaFxyXG4gICAgICAgIGlmICh0aGlzLmRldGVjdFBpbmNoKGV2ZW50KSkge1xyXG4gICAgICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJwaW5jaFwiLCBldmVudCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGhhbmRsZUxpbmVhclN3aXBlKGV2ZW50OiBhbnkpIHtcclxuICAgICAgICAvL2V2ZW50LnByZXZlbnREZWZhdWx0KCk7XHJcblxyXG4gICAgICAgIHRoaXMuaSsrO1xyXG5cclxuICAgICAgICBpZiAodGhpcy5pID4gMykge1xyXG4gICAgICAgICAgICB0aGlzLmV2ZW50VHlwZSA9IHRoaXMuZ2V0TGluZWFyU3dpcGVUeXBlKGV2ZW50KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmICh0aGlzLmV2ZW50VHlwZSA9PT0gJ2hvcml6b250YWwtc3dpcGUnKSB7XHJcbiAgICAgICAgICAgIHRoaXMucnVuSGFuZGxlcignaG9yaXpvbnRhbC1zd2lwZScsIGV2ZW50KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmICh0aGlzLmV2ZW50VHlwZSA9PT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VjaHN0YXJ0VGltZSA9IG5ldyBEYXRlKCkuZ2V0VGltZSgpO1xyXG5cclxuICAgICAgICBpZiAodGhpcy5ldmVudFR5cGUgPT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICB0aGlzLmdldE1vdXNlZG93blBvc2l0aW9uKGV2ZW50KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHRoaXMucnVuSGFuZGxlcihcIm1vdXNlZG93blwiLCBldmVudCk7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8qIE1vdXNlbW92ZSAqL1xyXG5cclxuICAgIGhhbmRsZU1vdXNlbW92ZSA9IChldmVudDogYW55KSA9PiB7XHJcbiAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICBcclxuICAgICAgICBpZiAoIXRoaXMuaXNNb3VzZWRvd24pIHtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gUGFuXHJcbiAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwicGFuXCIsIGV2ZW50KTtcclxuXHJcbiAgICAgICAgLy8gTGluZWFyIHN3aXBlXHJcbiAgICAgICAgc3dpdGNoICh0aGlzLmRldGVjdExpbmVhclN3aXBlKGV2ZW50KSkge1xyXG4gICAgICAgICAgICBjYXNlIFwiaG9yaXpvbnRhbC1zd2lwZVwiOlxyXG4gICAgICAgICAgICAgICAgZXZlbnQuc3dpcGVUeXBlID0gXCJob3Jpem9udGFsLXN3aXBlXCI7XHJcbiAgICAgICAgICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJob3Jpem9udGFsLXN3aXBlXCIsIGV2ZW50KTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIFwidmVydGljYWwtc3dpcGVcIjpcclxuICAgICAgICAgICAgICAgIGV2ZW50LnN3aXBlVHlwZSA9IFwidmVydGljYWwtc3dpcGVcIjtcclxuICAgICAgICAgICAgICAgIHRoaXMucnVuSGFuZGxlcihcInZlcnRpY2FsLXN3aXBlXCIsIGV2ZW50KTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gTGluZWFyIHN3aXBlXHJcbiAgICAgICAgaWYgKHRoaXMuZGV0ZWN0TGluZWFyU3dpcGUoZXZlbnQpIHx8XHJcbiAgICAgICAgICAgIHRoaXMuZXZlbnRUeXBlID09PSAnaG9yaXpvbnRhbC1zd2lwZScgfHxcclxuICAgICAgICAgICAgdGhpcy5ldmVudFR5cGUgPT09ICd2ZXJ0aWNhbC1zd2lwZScpIHtcclxuXHJcbiAgICAgICAgICAgIHRoaXMuaGFuZGxlTGluZWFyU3dpcGUoZXZlbnQpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcblxyXG4gICAgLyogTW91c2V1cCAqL1xyXG5cclxuICAgIGhhbmRsZU1vdXNldXAgPSAoZXZlbnQ6IGFueSkgPT4ge1xyXG5cclxuICAgICAgICAvLyBEb3VibGUgVGFwXHJcbiAgICAgICAgaWYgKHRoaXMuZGV0ZWN0RG91YmxlVGFwKCkpIHtcclxuICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwiZG91YmxlLXRhcFwiLCBldmVudCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBUYXBcclxuICAgICAgICB0aGlzLmRldGVjdFRhcCgpO1xyXG5cclxuICAgICAgICB0aGlzLmlzTW91c2Vkb3duID0gZmFsc2U7XHJcbiAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwibW91c2V1cFwiLCBldmVudCk7XHJcbiAgICAgICAgdGhpcy5ldmVudFR5cGUgPSB1bmRlZmluZWQ7XHJcbiAgICAgICAgdGhpcy5pID0gMDtcclxuICAgIH1cclxuXHJcblxyXG4gICAgcnVuSGFuZGxlcihldmVudE5hbWU6IGFueSwgcmVzcG9uc2U6IGFueSkge1xyXG4gICAgICAgIGlmICh0aGlzLmhhbmRsZXJzW2V2ZW50TmFtZV0pIHtcclxuICAgICAgICAgICAgdGhpcy5oYW5kbGVyc1tldmVudE5hbWVdKHJlc3BvbnNlKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8qXHJcbiAgICAgKiBEZXRlY3Rpb25cclxuICAgICAqL1xyXG5cclxuICAgIGRldGVjdFBhbih0b3VjaGVzOiBhbnkpIHtcclxuICAgICAgICByZXR1cm4gdG91Y2hlcy5sZW5ndGggPT09IDEgJiYgIXRoaXMuZXZlbnRUeXBlIHx8IHRoaXMuZXZlbnRUeXBlID09PSAncGFuJztcclxuICAgIH1cclxuXHJcbiAgICBkZXRlY3REb3VibGVUYXAoKSB7XHJcbiAgICAgICAgaWYgKHRoaXMuZXZlbnRUeXBlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBjb25zdCBjdXJyZW50VGltZSA9IG5ldyBEYXRlKCkuZ2V0VGltZSgpO1xyXG4gICAgICAgIGNvbnN0IHRhcExlbmd0aCA9IGN1cnJlbnRUaW1lIC0gdGhpcy5sYXN0VGFwO1xyXG5cclxuICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5kb3VibGVUYXBUaW1lb3V0KTtcclxuXHJcbiAgICAgICAgaWYgKHRhcExlbmd0aCA8IHRoaXMuZG91YmxlVGFwTWluVGltZW91dCAmJiB0YXBMZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHRoaXMuZG91YmxlVGFwVGltZW91dCA9IHNldFRpbWVvdXQoKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHRoaXMuZG91YmxlVGFwVGltZW91dCk7XHJcbiAgICAgICAgICAgIH0sIHRoaXMuZG91YmxlVGFwTWluVGltZW91dCk7XHJcb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ICBpZiAodG91Y2hlcykge1xyXG4gICAgICAgICAgICBpZiAodG91Y2hlcy5sZW5ndGggPT09IDEgJiYgIXRoaXMuZXZlbnRUeXBlIHx8IHRoaXMuZXZlbnRUeXBlID09PSAnaG9yaXpvbnRhbC1zd2lwZScgfHwgdGhpcy5ldmVudFR5cGUgPT09ICd2ZXJ0aWNhbC1zd2lwZScpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmdldExpbmVhclN3aXBlVHlwZShldmVudCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBpZiAoIXRoaXMuZXZlbnRUeXBlIHx8IHRoaXMuZXZlbnRUeXBlID09PSAnaG9yaXpvbnRhbC1zd2lwZScgfHwgdGhpcy5ldmVudFR5cGUgPT09ICd2ZXJ0aWNhbC1zd2lwZScpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmdldExpbmVhclN3aXBlVHlwZShldmVudCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0TGluZWFyU3dpcGVUeXBlKGV2ZW50OiBhbnkpIHtcclxuICAgICAgICBpZiAodGhpcy5ldmVudFR5cGUgIT09ICdob3Jpem9udGFsLXN3aXBlJyAmJiB0aGlzLmV2ZW50VHlwZSAhPT0gJ3ZlcnRpY2FsLXN3aXBlJykge1xyXG4gICAgICAgICAgICBjb25zdCBtb3ZlbWVudFggPSBNYXRoLmFicyh0aGlzLm1vdmVMZWZ0KDAsIGV2ZW50KSAtIHRoaXMuc3RhcnRYKTtcclxuICAgICAgICAgICAgY29uc3QgbW92ZW1lbnRZID0gTWF0aC5hYnModGhpcy5tb3ZlVG9wKDAsIGV2ZW50KSAtIHRoaXMuc3RhcnRZKTtcclxuXHJcbiAgICAgICAgICAgIGlmICgobW92ZW1lbnRZICogMykgPiBtb3ZlbWVudFgpIHtcclxuICAgICAgICAgICAgICAgIHJldHV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W5kZXhdLmNsaWVudFggLSB0aGlzLmVsZW1lbnRQb3NpdGlvbi5sZWZ0O1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHJldHVybiBldmVudC5jbGllbnRYIC0gdGhpcy5lbGVtZW50UG9zaXRpb24ubGVmdDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgbW92ZVRvcChpbmRleDogYW55LCBldmVudDogYW55KSB7XHJcbiAgICAgICAgY29uc3QgdG91Y2hlcyA9IGV2ZW50LnRvdWNoZXM7XHJcblxyXG4gICAgICAgIGlmICh0b3VjaGVzKSB7XHJcbiAgICAgICAgICAgIHJldHVybiB0b3VjaGVzW2luZGV4XS5jbGllbnRZIC0gdGhpcy5lbGVtZW50UG9zaXRpb24udG9wO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHJldHVybiBldmVudC5jbGllbnRZIC0gdGhpcy5lbGVtZW50UG9zaXRpb24udG9wO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBkZXRlY3RUb3VjaFNjcmVlbigpIHtcclxuICAgICAgICB2YXIgcHJlZml4ZXMgPSAnIC13ZWJraXQtIC1tb3otIC1vLSAtbXMtICcuc3BsaXQoJyAnKTtcclxuICAgICAgICB2YXIgbXEgPSBmdW5jdGlvbihxdWVyeTogYW55KSB7XHJcbiAgICAgICAgICAgIHJldHVybiB3aW5kb3cubWF0Y2hNZWRpYShxdWVyeSkubWF0Y2hlcztcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmICgoJ29udG91Y2hzdGFydCcgaW4gd2luZG93KSkge1xyXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIGluY2x1ZGUgdGhlICdoZWFydHonIGFzIGEgd2F5IHRvIGhhdmUgYSBub24gbWF0Y2hpbmcgTVEgdG8gaGVscCB0ZXJtaW5hdGUgdGhlIGpvaW5cclxuICAg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nMgPT09ICdtb3VzZSBhbmQgdG91Y2gnKSB7XHJcbiAgICAgICAgICAgIGxpc3RlbmVycyA9IE9iamVjdC5hc3NpZ24odGhpcy50b3VjaExpc3RlbmVycywgdGhpcy5tb3VzZUxpc3RlbmVycyk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgbGlzdGVuZXJzID0gdGhpcy5kZXRlY3RUb3VjaFNjcmVlbigpID8gdGhpcy50b3VjaExpc3RlbmVycyA6IHRoaXMubW91c2VMaXN0ZW5lcnM7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmb3IgKHZhciBsaXN0ZW5lciBpbiBsaXN0ZW5lcnMpIHtcclxuICAgICAgICAgICAgY29uc3QgaGFuZGxlcjogTW91c2VIYW5kbGVyID0gbGlzdGVuZXJzW2xpc3RlbmVyXTtcclxuICAgICAgICAgICAgaWYgKGxpc3RlbmVyID09PSAnbW91c2V1cCcgfHwgbGlzdGVuZXIgPT09IFwibW91c2Vtb3ZlXCIpIHtcclxuICAgICAgICAgICAgICAgIGlmIChhY3Rpb24gPT09ICdhZGRFdmVudExpc3RlbmVyJykge1xyXG4gICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIobGlzdGVuZXIsIHRoaXNbaGFuZGxlcl0sIGZhbHNlKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmIChhY3Rpb24gPT09ICdyZW1vdmVFdmVudExpc3RlbmVyJykge1xyXG4gICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIobGlzdGVuZXIsIHRoaXNbaGFuZGxlcl0sIGZhbHNlKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGlmIChhY3Rpb24gPT09ICdhZGRFdmVudExpc3RlbmVyJykge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaX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Ly8gUGFuXHJcbiAgICAgICAgaWYgKHRoaXMuZGV0ZWN0UGFuKHRvdWNoZXMpKSB7XHJcbiAgICAgICAgICAgIHRoaXMucnVuSGFuZGxlcihcInBhblwiLCBldmVudCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBMaW5lYXIgc3dpcGVcclxuICAgICAgICAvKlxyXG4gICAgICAgIHN3aXRjaCAodGhpcy5kZXRlY3RMaW5lYXJTd2lwZShldmVudCkpIHtcclxuICAgICAgICAgICAgY2FzZSBcImhvcml6b250YWwtc3dpcGVcIjpcclxuICAgICAgICAgICAgICAgIGV2ZW50LnN3aXBlVHlwZSA9IFwiaG9yaXpvbnRhbC1zd2lwZVwiO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwiaG9yaXpvbnRhbC1zd2lwZVwiLCBldmVudCk7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSBcInZlcnRpY2FsLXN3aXBlXCI6XHJcbiAgICAgICAgICAgICAgICBldmVudC5zd2lwZVR5cGUgPSBcInZlcnRpY2FsLXN3aXBlXCI7XHJcbiAgICAgICAgICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJ2ZXJ0aWNhbC1zd2lwZVwiLCBldmVudCk7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICAgICAgKi9cclxuXHJcbiAgICAgICAgLy8gTGluZWFyIHN3aXBlXHJcbiAgICAgICAgLypcclxuICAgICAgICBpZiAodGhpcy5kZXRlY3RMaW5lYXJTd2lwZShldmVudCkgfHxcclxuICAgICAgICAgICAgdGhpcy5ldmVudFR5cGUgPT09ICdob3Jpem9udGFsLXN3aXBlJyB8fFxyXG4gICAgICAgICAgICB0aGlzLmV2ZW50VHlwZSA9PT0gJ3ZlcnRpY2FsLXN3aXBlJykge1xyXG5cclxuICAgICAgICAgICAgdGhpcy5oYW5kbGVMaW5lYXJTd2lwZShldmVudCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgICovXHJcblxyXG4gICAgICAgIC8vIFBpbmNoXHJcbiAgICAgICAgaWYgKHRoaXMuZGV0ZWN0UGluY2goZXZlbnQpKSB7XHJcbiAgICAgICAgICAgIHRoaXMucnVuSGFuZGxlcihcInBpbmNoXCIsIGV2ZW50KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgaGFuZGxlTGluZWFyU3dpcGUoZXZlbnQ6IGFueSkge1xyXG4gICAgICAgIC8vZXZlbnQucHJldmVudERlZmF1bHQoKTtcclxuXHJcbiAgICAgICAgdGhpcy5pKys7XHJcblxyXG4gICAgICAgIGlmICh0aGlzLmkgPiAzKSB7XHJcbiAgICAgICAgICAgIHRoaXMuZXZlbnRUeXBlID0gdGhpcy5nZXRMaW5lYXJTd2lwZVR5cGUoZXZlbnQpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKHRoaXMuZXZlbnRUeXBlID09PSAnaG9yaXpvbnRhbC1zd2lwZScpIHtcclxuICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKCdob3Jpem9udGFsLXN3aXBlJywgZXZlbnQpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKHRoaXMuZXZlbnRUeXBlID09PSAndmVydGljYWwtc3dpcGUnKSB7XHJcbiAgICAgICAgICAgIHRoaXMucnVuSGFuZGxlcigndmVydGljYWwtc3dpcGUnLCBldmVudCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiBUb3VjaGVuZCAqL1xyXG5cclxuICAgIGhhbmRsZVRvdWNoZW5kID0gKGV2ZW50OiBhbnkpID0+IHtcclxuICAgICAgICBjb25zdCB0b3VjaGVzID0gZXZlbnQudG91Y2hlcztcclxuXHJcbiAgICAgICAgLy8gRG91YmxlIFRhcFxyXG4gICAgICAgIGlmICh0aGlzLmRldGVjdERvdWJsZVRhcCgpKSB7XHJcbiAg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ID0+IHtcclxuICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgIFxyXG4gICAgICAgIGlmICghdGhpcy5pc01vdXNlZG93bikge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBQYW5cclxuICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJwYW5cIiwgZXZlbnQpO1xyXG5cclxuICAgICAgICAvLyBMaW5lYXIgc3dpcGVcclxuICAgICAgICBzd2l0Y2ggKHRoaXMuZGV0ZWN0TGluZWFyU3dpcGUoZXZlbnQpKSB7XHJcbiAgICAgICAgICAgIGNhc2UgXCJob3Jpem9udGFsLXN3aXBlXCI6XHJcbiAgICAgICAgICAgICAgICBldmVudC5zd2lwZVR5cGUgPSBcImhvcml6b250YWwtc3dpcGVcIjtcclxuICAgICAgICAgICAgICAgIHRoaXMucnVuSGFuZGxlcihcImhvcml6b250YWwtc3dpcGVcIiwgZXZlbnQpO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgXCJ2ZXJ0aWNhbC1zd2lwZVwiOlxyXG4gICAgICAgICAgICAgICAgZXZlbnQuc3dpcGVUeXBlID0gXCJ2ZXJ0aWNhbC1zd2lwZVwiO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwidmVydGljYWwtc3dpcGVcIiwgZXZlbnQpO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBMaW5lYXIgc3dpcGVcclxuICAgICAgICBpZiAodGhpcy5kZXRlY3RMaW5lYXJTd2lwZShldmVudCkgfHxcclxuICAgICAgICAgICAgdGhpcy5ldmVudFR5cGUgPT09ICdob3Jpem9udGFsLXN3aXBlJyB8fFxyXG4gICAgICAgICAgICB0aGlzLmV2ZW50VHlwZSA9PT0gJ3ZlcnRpY2FsLXN3aXBlJykge1xyXG5cclxuICAgICAgICAgICAgdGhpcy5oYW5kbGVMaW5lYXJTd2lwZShldmVudCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiBNb3VzZXVwICovXHJcblxyXG4gICAgaGFuZGxlTW91c2V1cCA9IChldmVudDogYW55KSA9PiB7XHJcblxyXG4gICAgICAgIC8vIERvdWJsZSBUYXBcclxuICAgICAgICBpZiAodGhpcy5kZXRlY3REb3VibGVUYXAoKSkge1xyXG4gICAgICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJkb3VibGUtdGFwXCIsIGV2ZW50KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIFRhcFxyXG4gICAgICAgIHRoaXMuZGV0ZWN0VGFwKCk7XHJcblxyXG4gICAgICAgIHRoaXMuaXNNb3VzZWRvd24gPSBmYWxzZTtcclxuICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJtb3VzZXVwXCIsIGV2ZW50KTtcclxuICAgICAgICB0aGlzLmV2ZW50VHlwZSA9IHVuZGVmaW5lZDtcclxuICAgICAgICB0aGlzLmkgPSAwO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICBydW5IYW5kbGVyKGV2ZW50TmFtZTogYW55LCByZXNwb25zZTogYW55KSB7XHJcbiAgICAgICAgaWYgKHRoaXMuaGFuZGxlcnNbZXZlbnROYW1lXSkge1xyXG4gICAgICAgICAgICB0aGlzLmhhbmRsZXJzW2V2ZW50TmFtZV0ocmVzcG9uc2UpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcblxyXG4gICAgLypcclxuICAgICAqIERldGVjdGlvblxyXG4gICAgICovXHJcblxyXG4gICAgZGV0ZWN0UGFuKHRvdWNoZXM6IGFueSkge1xyXG4gICAgICAgIHJldHVybiB0b3VjaGVzLmxlbmd0aCA9PT0gMSAmJiAhdGhpcy5ldmVudFR5cGUgfHwgdGhpcy5ldmVudFR5cGUgPT09ICdwYW4nO1xyXG4gICAgfVxyXG5cclxuICAgIGRldGVjdERvdWJsZVRhcCgpIHtcclxuICAgICAgICBpZiAodGhpcy5ldmVudFR5cGUgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGNvbnN0IGN1cnJlbnRUaW1lID0gbmV3IERhdGUoKS5nZXRUaW1lKCk7XHJcbiAgICAgICAgY29uc3QgdGFwTGVuZ3RoID0gY3VycmVudFRpbWUgLSB0aGlzLmxhc3RUYXA7XHJcblxyXG4gICAgICAgIGNsZWFyVGltZW91dCh0aGlzLmRvdWJsZVRhcFRpbWVvdXQpO1xyXG5cclxuICAgICAgICBpZiAodGFwTGVuZ3RoIDwgdGhpcy5kb3VibGVUYXBNaW5UaW1lb3V0ICYmIHRhcExlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgdGhpcy5kb3VibGVUYXBUaW1lb3V0ID0gc2V0VGltZW91dCgoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5kb3VibGVUYXBUaW1lb3V0KTtcclxuICAgICAgICAgICAgfSwgdGhpcy5kb3VibGVUYXBNaW5UaW1lb3V0KTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5sYXN0VGFwID0gY3VycmVudFRpbWU7XHJcbiAgICB9XHJcblxyXG4gICAgZGV0ZWN0VGFwKCk6IHZvaWQge1xyXG4gICAgICAgIGlmICh0aGlzLmV2ZW50VHlwZSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgY29uc3QgY3VycmVudFRpbWUgPSBuZXcgRGF0ZSgpLmdldFRpbWUoKTtcclxuICAgICAgICBjb25zdCB0YXBMZW5ndGggPSBjdXJyZW50VGltZSAtIHRoaXMudG91Y2hz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sNC10Lwg0YHQv9C40YHQvtC6INGB0L7QsdGL0YLQuNC5INC4INGE0YPQvdC60YbQuNGOLdC+0LHRgNCw0LHQvtGC0YfQuNC6XHJcbiAgICBvbihldmVudDogRXZlbnRUeXBlLCBoYW5kbGVyOiBGdW5jdGlvbikge1xyXG4gICAgICAgIGlmIChldmVudCkge1xyXG4gICAgICAgICAgICB0aGlzLmhhbmRsZXJzW2V2ZW50XSA9IGhhbmRsZXI7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59Il19

@@ -211,6 +211,16 @@ /**

if (listener === 'mouseup' || listener === "mousemove") {
document[action](listener, this[handler], false);
if (action === 'addEventListener') {
document.addEventListener(listener, this[handler], false);
}
if (action === 'removeEventListener') {
document.removeEventListener(listener, this[handler], false);
}
}
else {
this.element[action](listener, this[handler], false);
if (action === 'addEventListener') {
this.element.addEventListener(listener, this[handler], false);
}
if (action === 'removeEventListener') {
this.element.removeEventListener(listener, this[handler], false);
}
}

@@ -556,2 +566,2 @@ }

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG91Y2hlcy5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1waW5jaC16b29tLyIsInNvdXJjZXMiOlsibGliL3RvdWNoZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFDQSxnQ0FHQzs7O0lBRkcsNkJBQXFCOztJQUNyQiwrQkFBdUM7O0FBTzNDO0lBMkJJLGlCQUFZLFVBQXNCO1FBQWxDLGlCQU1DO1FBN0JELGNBQVMsR0FBYyxTQUFTLENBQUM7UUFDakMsYUFBUSxHQUFRLEVBQUUsQ0FBQztRQUNuQixXQUFNLEdBQUcsQ0FBQyxDQUFDO1FBQ1gsV0FBTSxHQUFHLENBQUMsQ0FBQztRQUNYLFlBQU8sR0FBRyxDQUFDLENBQUM7UUFFWix3QkFBbUIsR0FBRyxHQUFHLENBQUM7UUFDMUIsa0JBQWEsR0FB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N0YXJ0XCIsIGV2ZW50KTtcclxuICAgIH1cclxuXHJcblxyXG4gICAgLyogVG91Y2htb3ZlICovXHJcblxyXG4gICAgaGFuZGxlVG91Y2htb3ZlID0gKGV2ZW50OiBhbnkpID0+IHtcclxuICAgICAgICBjb25zdCB0b3VjaGVzID0gZXZlbnQudG91Y2hlcztcclxuXHJcbiAgICAgICAgLy8gUGFuXHJcbiAgICAgICAgaWYgKHRoaXMuZGV0ZWN0UGFuKHRvdWNoZXMpKSB7XHJcbiAgICAgICAgICAgIHRoaXMucnVuSGFuZGxlcihcInBhblwiLCBldmVudCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBMaW5lYXIgc3dpcGVcclxuICAgICAgICAvKlxyXG4gICAgICAgIHN3aXRjaCAodGhpcy5kZXRlY3RMaW5lYXJTd2lwZShldmVudCkpIHtcclxuICAgICAgICAgICAgY2FzZSBcImhvcml6b250YWwtc3dpcGVcIjpcclxuICAgICAgICAgICAgICAgIGV2ZW50LnN3aXBlVHlwZSA9IFwiaG9yaXpvbnRhbC1zd2lwZVwiO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwiaG9yaXpvbnRhbC1zd2lwZVwiLCBldmVudCk7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSBcInZlcnRpY2FsLXN3aXBlXCI6XHJcbiAgICAgICAgICAgICAgICBldmVudC5zd2lwZVR5cGUgPSBcInZlcnRpY2FsLXN3aXBlXCI7XHJcbiAgICAgICAgICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJ2ZXJ0aWNhbC1zd2lwZVwiLCBldmVudCk7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICAgICAgKi9cclxuXHJcbiAgICAgICAgLy8gTGluZWFyIHN3aXBlXHJcbiAgICAgICAgLypcclxuICAgICAgICBpZiAodGhpcy5kZXRlY3RMaW5lYXJTd2lwZShldmVudCkgfHxcclxuICAgICAgICAgICAgdGhpcy5ldmVudFR5cGUgPT09ICdob3Jpem9udGFsLXN3aXBlJyB8fFxyXG4gICAgICAgICAgICB0aGlzLmV2ZW50VHlwZSA9PT0gJ3ZlcnRpY2FsLXN3aXBlJykge1xyXG5cclxuICAgICAgICAgICAgdGhpcy5oYW5kbGVMaW5lYXJTd2lwZShldmVudCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgICovXHJcblxyXG4gICAgICAgIC8vIFBpbmNoXHJcbiAgICAgICAgaWYgKHRoaXMuZGV0ZWN0UGluY2goZXZlbnQpKSB7XHJcbiAgICAgICAgICAgIHRoaXMucnVuSGFuZGxlcihcInBpbmNoXCIsIGV2ZW50KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgaGFuZGxlTGluZWFyU3dpcGUoZXZlbnQ6IGFueSkge1xyXG4gICAgICAgIC8vZXZlbnQucHJldmVudERlZmF1bHQoKTtcclxuXHJcbiAgICAgICAgdGhpcy5pKys7XHJcblxyXG4gICAgICAgIGlmICh0aGlzLmkgPiAzKSB7XHJcbiAgICAgICAgICAgIHRoaXMuZXZlbnRUeXBlID0gdGhpcy5nZXRMaW5lYXJTd2lwZVR5cGUoZXZlbnQpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKHRoaXMuZXZlbnRUeXBlID09PSAnaG9yaXpvbnRhbC1zd2lwZScpIHtcclxuICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKCdob3Jpem9udGFsLXN3aXBlJywgZXZlbnQpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKHRoaXMuZXZlbnRUeXBlID09PSAndmVydGljYWwtc3dpcGUnKSB7XHJcbiAgICAgICAgICAgIHRoaXMucnVuSGFuZGxlcigndmVydGljYWwtc3dpcGUnLCBldmVudCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiBUb3VjaGVuZCAqL1xyXG5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ZXZlbnQpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwibW91c2Vkb3duXCIsIGV2ZW50KTtcclxuICAgIH1cclxuXHJcblxyXG4gICAgLyogTW91c2Vtb3ZlICovXHJcblxyXG4gICAgaGFuZGxlTW91c2Vtb3ZlID0gKGV2ZW50OiBhbnkpID0+IHtcclxuICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgIFxyXG4gICAgICAgIGlmICghdGhpcy5pc01vdXNlZG93bikge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBQYW5cclxuICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJwYW5cIiwgZXZlbnQpO1xyXG5cclxuICAgICAgICAvLyBMaW5lYXIgc3dpcGVcclxuICAgICAgICBzd2l0Y2ggKHRoaXMuZGV0ZWN0TGluZWFyU3dpcGUoZXZlbnQpKSB7XHJcbiAgICAgICAgICAgIGNhc2UgXCJob3Jpem9udGFsLXN3aXBlXCI6XHJcbiAgICAgICAgICAgICAgICBldmVudC5zd2lwZVR5cGUgPSBcImhvcml6b250YWwtc3dpcGVcIjtcclxuICAgICAgICAgICAgICAgIHRoaXMucnVuSGFuZGxlcihcImhvcml6b250YWwtc3dpcGVcIiwgZXZlbnQpO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgXCJ2ZXJ0aWNhbC1zd2lwZVwiOlxyXG4gICAgICAgICAgICAgICAgZXZlbnQuc3dpcGVUeXBlID0gXCJ2ZXJ0aWNhbC1zd2lwZVwiO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwidmVydGljYWwtc3dpcGVcIiwgZXZlbnQpO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBMaW5lYXIgc3dpcGVcclxuICAgICAgICBpZiAodGhpcy5kZXRlY3RMaW5lYXJTd2lwZShldmVudCkgfHxcclxuICAgICAgICAgICAgdGhpcy5ldmVudFR5cGUgPT09ICdob3Jpem9udGFsLXN3aXBlJyB8fFxyXG4gICAgICAgICAgICB0aGlzLmV2ZW50VHlwZSA9PT0gJ3ZlcnRpY2FsLXN3aXBlJykge1xyXG5cclxuICAgICAgICAgICAgdGhpcy5oYW5kbGVMaW5lYXJTd2lwZShldmVudCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiBNb3VzZXVwICovXHJcblxyXG4gICAgaGFuZGxlTW91c2V1cCA9IChldmVudDogYW55KSA9PiB7XHJcblxyXG4gICAgICAgIC8vIERvdWJsZSBUYXBcclxuICAgICAgICBpZiAodGhpcy5kZXRlY3REb3VibGVUYXAoKSkge1xyXG4gICAgICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJkb3VibGUtdGFwXCIsIGV2ZW50KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIFRhcFxyXG4gICAgICAgIHRoaXMuZGV0ZWN0VGFwKCk7XHJcblxyXG4gICAgICAgIHRoaXMuaXNNb3VzZWRvd24gPSBmYWxzZTtcclxuICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJtb3VzZXVwXCIsIGV2ZW50KTtcclxuICAgICAgICB0aGlzLmV2ZW50VHlwZSA9IHVuZGVmaW5lZDtcclxuICAgICAgICB0aGlzLmkgPSAwO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICBydW5IYW5kbGVyKGV2ZW50TmFtZTogYW55LCByZXNwb25zZTogYW55KSB7XHJcbiAgICAgICAgaWYgKHRoaXMuaGFuZGxlcnNbZXZlbnROYW1lXSkge1xyXG4gICAgICAgICAgICB0aGlzLmhhbmRsZXJzW2V2ZW50TmFtZV0ocmVzcG9uc2UpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcblxyXG4gICAgLypcclxuICAgICAqIERldGVjdGlvblxyXG4gICAgICovXHJcblxyXG4gICAgZGV0ZWN0UGFuKHRvdWNoZXM6IGFueSkge1xyXG4gICAgICAgIHJldHVybiB0b3VjaGVzLmxlbmd0aCA9PT0gMSAmJiAhdGhpcy5ldmVudFR5cGUgfHwgdGhpcy5ldmVudFR5cGUgPT09ICdwYW4nO1xyXG4gICAgfVxyXG5cclxuICAgIGRldGVjdERvdWJsZVRhcCgpIHtcclxuICAgICAgICBpZiAodGhpcy5ldmVudFR5cGUgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGNvbnN0IGN1cnJlbnRUaW1lID0gbmV3IERhdGUoKS5nZXRUaW1lKCk7XHJcbiAgICAgICAgY29uc3QgdGFwTGVuZ3RoID0gY3VycmVudFRpbWUgLSB0aGlzLmxhc3RUYXA7XHJcblxyXG4gICAgICAgIGNsZWFyVGltZW91dCh0aGlzLmRvdWJsZVRhcFRpbWVvdXQpO1xyXG5cclxuICAgICAgICBpZiAodGFwTGVuZ3RoIDwgdGhpcy5kb3VibGVUYXBNaW5UaW1lb3V0ICYmIHRhcExlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgdGhpcy5kb3VibGVUYXBUaW1lb3V0ID0gc2V0VGltZW91dCgoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5kb3VibGVUYXBUaW1lb3V0KTtcclxuICAgICAgICAgICAgfSwgdGhpcy5kb3VibGVUYXBNaW5UaW1lb3V0KTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5sYXN0VGFwID0gY3VycmVudFRpbWU7XHJcbiAgICB9XHJcblxyXG4gICAgZGV0ZWN0VGFwKCk6IHZvaWQge1xyXG4gICAgICAgIGlmICh0aGlzLmV2ZW50VHlwZSAhP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yXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgaWYgKGFjdGlvbiA9PT0gJ2FkZEV2ZW50TGlzdGVuZXInKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIobGlzdGVuZXIsIHRoaXNbaGFuZGxlcl0sIGZhbHNlKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmIChhY3Rpb24gPT09ICdyZW1vdmVFdmVudExpc3RlbmVyJykge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudC5yZW1vdmVFdmVudExpc3RlbmVyKGxpc3RlbmVyLCB0aGlzW2hhbmRsZXJdLCBmYWxzZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgLypcclxuICAgICAqIExpc3RlbmVyc1xyXG4gICAgICovXHJcblxyXG4gICAgLyogVG91Y2hzdGFydCAqL1xyXG5cclxuICAgIGhhbmRsZVRvdWNoc3RhcnQgPSAoZXZlbnQ6IGFueSkgPT4ge1xyXG4gICAgICAgIHRoaXMuZWxlbWVudFBvc2l0aW9uID0gdGhpcy5nZXRFbGVtZW50UG9zaXRpb24oKTtcclxuICAgICAgICB0aGlzLnRvdWNoc3RhcnRUaW1lID0gbmV3IERhdGUoKS5nZXRUaW1lKCk7XHJcblxyXG4gICAgICAgIGlmICh0aGlzLmV2ZW50VHlwZSA9PT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIHRoaXMuZ2V0VG91Y2hzdGFydFBvc2l0aW9uKGV2ZW50KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHRoaXMucnVuSGFuZGxlcihcInRvdWNoc3RhcnRcIiwgZXZlbnQpO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiBUb3VjaG1vdmUgKi9cclxuXHJcbiAgICBoYW5kbGVUb3VjaG1vdmUgPSAoZXZlbnQ6IGFueSkgPT4ge1xyXG4gICAgICAgIGNvbnN0IHRvdWNoZXMgPSBldmVudC50b3VjaGVzO1xyXG5cclxuICAgICAgICAvLyBQYW5cclxuICAgICAgICBpZiAodGhpcy5kZXRlY3RQYW4odG91Y2hlcykpIHtcclxuICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwicGFuXCIsIGV2ZW50KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIExpbmVhciBzd2lwZVxyXG4gICAgICAgIC8qXHJcbiAgICAgICAgc3dpdGNoICh0aGlzLmRldGVjdExpbmVhclN3aXBlKGV2ZW50KSkge1xyXG4gICAgICAgICAgICBjYXNlIFwiaG9yaXpvbnRhbC1zd2lwZVwiOlxyXG4gICAgICAgICAgICAgICAgZXZlbnQuc3dpcGVUeXBlID0gXCJob3Jpem9udGFsLXN3aXBlXCI7XHJcbiAgICAgICAgICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJob3Jpem9udGFsLXN3aXBlXCIsIGV2ZW50KTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIFwidmVydGljYWwtc3dpcGVcIjpcclxuICAgICAgICAgICAgICAgIGV2ZW50LnN3aXBlVHlwZSA9IFwidmVydGljYWwtc3dpcGVcIjtcclxuICAgICAgICAgICAgICAgIHRoaXMucnVuSGFuZGxlcihcInZlcnRpY2FsLXN3aXBlXCIsIGV2ZW50KTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgIH1cclxuICAgICAgICAqL1xyXG5cclxuICAgICAgICAvLyBMaW5lYXIgc3dpcGVcclxuICAgICAgICAvKlxyXG4gICAgICAgIGlmICh0aGlzLmRldGVjdExpbmVhclN3aXBlKGV2ZW50KSB8fFxyXG4gICAgICAgICAgICB0aGlzLmV2ZW50VHlwZSA9PT0gJ2hvcml6b250YWwtc3dpcGUnIHx8XHJcbiAgICAgICAgICAgIHRoaXMuZXZlbnRUeXBlID09PSAndmVydGljYWwtc3dpcGUnKSB7XHJcblxyXG4gICAgICAgICAgICB0aGlzLmhhbmRsZUxpbmVhclN3aXBlKGV2ZW50KTtcclxuICAgICAgICB9XHJcbiAgICAgICAgKi9cclxuXHJcbiAgICAgICAgLy8gUGluY2hcclxuICAgICAgICBpZiAodGhpcy5kZXRlY3RQaW5jaChldmVudCkpIHtcclxuICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwicGluY2hcIiwgZXZlbnQpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBoYW5kbGVMaW5lYXJTd2lwZShldmVudDogYW55KSB7XHJcbiAgICAgICAgLy9ldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG5cclxuICAgICAgICB0aGlzLmkrKztcclxuXHJcbiAgICAgICAgaWYgKHRoaXMuaSA+IDMpIHtcclxuICAgICAgICAgICAgdGhpcy5ldmVudFR5cGUgPSB0aGlzLmdldExpbmVhclN3aXBlVHlwZShldmVudCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAodGhpcy5ldmVudFR5cGUgPT09ICdob3Jpem9udGFsLXN3aXBlJykge1xyXG4gICAgICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoJ2hvcml6b250YWwtc3dpcGUnLCBldmVudCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAodGhpcy5ldmVudFR5cGUgPT09ICd2ZXJ0aWNhbC1zd2lwZScpIHtcclxuICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKCd2ZXJ0aWNhbC1zd2lwZScsIGV2ZW50KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8qIFRvdWNoZW5kICovXHJcblxyXG4gICAgaGFuZGxlVG91Y2hlbmQgPSAoZXZlbnQ6IGFueSkgPT4ge1xyXG4gICAgICAgIGNvbnN0IHRvdWNoZXMgPSBldmVudC50b3VjaGVzO1xyXG5cclxuICAgICAgICAvLyBEb3VibGUgVGFwXHJcbiAgICAgICAgaWYgKHRoaXMuZGV0ZWN0RG91YmxlVGFwKCkpIHtcclxuICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwiZG91YmxlLXRhcFwiLCBldmVudCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBUYXBcclxuICAgICAgICB0aGlzLmRldGVjdFRhcCgpO1xyXG5cclxuICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJ0b3VjaGVuZFwiLCBldmVudCk7XHJcbiAgICAgICAgdGhpcy5ldmVudFR5cGUgPSAndG91Y2hlbmQnO1xyXG5cclxuICAgICAgICBpZiAodG91Y2hlcyAmJiB0b3VjaGVzLmxlbmd0aCA9PT0gMCkge1xyXG4gICAgICAgICAgICB0aGlzLmV2ZW50VHlwZSA9IHVuZGVmaW5lZDtcclxuICAgICAgICAgICAgdGhpcy5pID0gMDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8qIE1vdXNlZG93biAqL1xyXG5cclxuICAgIGhhbmRsZU1vdXNlZG93biA9IChldmVudDogYW55KSA9PiB7XHJcbiAgICAgICAgdGhpcy5pc01vdXNlZG93biA9IHRydWU7XHJcbiAgICAgICAgdGhpcy5lbGVtZW50UG9zaXRpb24gPSB0aGlzLmdldEVsZW1lbnRQb3NpdGlvbigpO1xyXG4gICAgICAgIHRoaXMudG91Y2hzdGFydFRpbWUgPSBuZXcgRGF0ZSgpLmdldFRpbWUoKTtcclxuXHJcbiAgICAgICAgaWYgKHRoaXMuZXZlbnRUeXBlID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgdGhpcy5nZXRNb3VzZWRvd25Qb3NpdGlvbihldmVudCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJtb3VzZWRvd25cIiwgZXZlbnQpO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiBNb3VzZW1vdmUgKi9cclxuXHJcbiAgICBoYW5kbGVNb3VzZW1vdmUgPSAoZXZlbnQ6IGFueSkgPT4ge1xyXG4gICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgXHJcbiAgICAgICAgaWYgKCF0aGlzLmlzTW91c2Vkb3duKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIFBhblxyXG4gICAgICAgIHRoaXMucnVuSGFuZGxlcihcInBhblwiLCBldmVudCk7XHJcblxyXG4gICAgICAgIC8vIExpbmVhciBzd2lwZVxyXG4gICAgICAgIHN3aXRjaCAodGhpcy5kZXRlY3RMaW5lYXJTd2lwZShldmVudCkpIHtcclxuICAgICAgICAgICAgY2FzZSBcImhvcml6b250YWwtc3dpcGVcIjpcclxuICAgICAgICAgICAgICAgIGV2ZW50LnN3aXBlVHlwZSA9IFwiaG9yaXpvbnRhbC1zd2lwZVwiO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwiaG9yaXpvbnRhbC1zd2lwZVwiLCBldmVudCk7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSBcInZlcnRpY2FsLXN3aXBlXCI6XHJcbiAgICAgICAgICAgICAgICBldmVudC5zd2lwZVR5cGUgPSBcInZlcnRpY2FsLXN3aXBlXCI7XHJcbiAgICAgICAgICAgICAgICB0aGlzLnJ1bkhhbmRsZXIoXCJ2ZXJ0aWNhbC1zd2lwZVwiLCBldmVudCk7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIExpbmVhciBzd2lwZVxyXG4gICAgICAgIGlmICh0aGlzLmRldGVjdExpbmVhclN3aXBlKGV2ZW50KSB8fFxyXG4gICAgICAgICAgICB0aGlzLmV2ZW50V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jb25zdCBjdXJyZW50VGltZSA9IG5ldyBEYXRlKCkuZ2V0VGltZSgpO1xyXG4gICAgICAgIGNvbnN0IHRhcExlbmd0aCA9IGN1cnJlbnRUaW1lIC0gdGhpcy50b3VjaHN0YXJ0VGltZTtcclxuXHJcbiAgICAgICAgaWYgKHRhcExlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgaWYgKHRhcExlbmd0aCA8IHRoaXMudGFwTWluVGltZW91dCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5ydW5IYW5kbGVyKFwidGFwXCIsIGV2ZW50KTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMucnVuSGFuZGxlcihcImxvbmd0YXBcIiwgZXZlbnQpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGRldGVjdFBpbmNoKGV2ZW50OiBhbnkpIHtcclxuICAgICAgICBjb25zdCB0b3VjaGVzID0gZXZlbnQudG91Y2hlcztcclxuICAgICAgICByZXR1cm4gKHRvdWNoZXMubGVuZ3RoID09PSAyICYmIHRoaXMuZXZlbnRUeXBlID09PSB1bmRlZmluZWQpIHx8IHRoaXMuZXZlbnRUeXBlID09PSAncGluY2gnO1xyXG4gICAgfVxyXG5cclxuICAgIGRldGVjdExpbmVhclN3aXBlKGV2ZW50OiBhbnkpIHtcclxuICAgICAgICBjb25zdCB0b3VjaGVzID0gZXZlbnQudG91Y2hlcztcclxuXHJcbiAgICAgICAgaWYgKHRvdWNoZXMpIHtcclxuICAgICAgICAgICAgaWYgKHRvdWNoZXMubGVuZ3RoID09PSAxICYmICF0aGlzLmV2ZW50VHlwZSB8fCB0aGlzLmV2ZW50VHlwZSA9PT0gJ2hvcml6b250YWwtc3dpcGUnIHx8IHRoaXMuZXZlbnRUeXBlID09PSAndmVydGljYWwtc3dpcGUnKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5nZXRMaW5lYXJTd2lwZVR5cGUoZXZlbnQpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKCF0aGlzLmV2ZW50VHlwZSB8fCB0aGlzLmV2ZW50VHlwZSA9PT0gJ2hvcml6b250YWwtc3dpcGUnIHx8IHRoaXMuZXZlbnRUeXBlID09PSAndmVydGljYWwtc3dpcGUnKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5nZXRMaW5lYXJTd2lwZVR5cGUoZXZlbnQpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGdldExpbmVhclN3aXBlVHlwZShldmVudDogYW55KSB7XHJcbiAgICAgICAgaWYgKHRoaXMuZXZlbnRUeXBlICE9PSAnaG9yaXpvbnRhbC1zd2lwZScgJiYgdGhpcy5ldmVudFR5cGUgIT09ICd2ZXJ0aWNhbC1zd2lwZScpIHtcclxuICAgICAgICAgICAgY29uc3QgbW92ZW1lbnRYID0gTWF0aC5hYnModGhpcy5tb3ZlTGVmdCgwLCBldmVudCkgLSB0aGlzLnN0YXJ0WCk7XHJcbiAgICAgICAgICAgIGNvbnN0IG1vdmVtZW50WSA9IE1hdGguYWJzKHRoaXMubW92ZVRvcCgwLCBldmVudCkgLSB0aGlzLnN0YXJ0WSk7XHJcblxyXG4gICAgICAgICAgICBpZiAoKG1vdmVtZW50WSAqIDMpID4gbW92ZW1lbnRYKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3ZlcnRpY2FsLXN3aXBlJztcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiAnaG9yaXpvbnRhbC1zd2lwZSc7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5ldmVudFR5cGU7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICA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G4gICAgICAgIGNvbnN0IHRvdWNoZXMgPSBldmVudC50b3VjaGVzO1xyXG5cclxuICAgICAgICBpZiAodG91Y2hlcykge1xyXG4gICAgICAgICAgICByZXR1cm4gdG91Y2hlc1tpbmRleF0uY2xpZW50WSAtIHRoaXMuZWxlbWVudFBvc2l0aW9uLnRvcDtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gZXZlbnQuY2xpZW50WSAtIHRoaXMuZWxlbWVudFBvc2l0aW9uLnRvcDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZGV0ZWN0VG91Y2hTY3JlZW4oKSB7XHJcbiAgICAgICAgdmFyIHByZWZpeGVzID0gJyAtd2Via2l0LSAtbW96LSAtby0gLW1zLSAnLnNwbGl0KCcgJyk7XHJcbiAgICAgICAgdmFyIG1xID0gZnVuY3Rpb24ocXVlcnk6IGFueSkge1xyXG4gICAgICAgICAgICByZXR1cm4gd2luZG93Lm1hdGNoTWVkaWEocXVlcnkpLm1hdGNoZXM7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAoKCdvbnRvdWNoc3RhcnQnIGluIHdpbmRvdykpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBpbmNsdWRlIHRoZSAnaGVhcnR6JyBhcyBhIHdheSB0byBoYXZlIGEgbm9uIG1hdGNoaW5nIE1RIHRvIGhlbHAgdGVybWluYXRlIHRoZSBqb2luXHJcbiAgICAgICAgLy8gaHR0cHM6Ly9naXQuaW8vdnpuRkhcclxuICAgICAgICB2YXIgcXVlcnkgPSBbJygnLCBwcmVmaXhlcy5qb2luKCd0b3VjaC1lbmFibGVkKSwoJyksICdoZWFydHonLCAnKSddLmpvaW4oJycpO1xyXG4gICAgICAgIHJldHVybiBtcShxdWVyeSk7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8qIFB1YmxpYyBwcm9wZXJ0aWVzIGFuZCBtZXRob2RzICovXHJcblxyXG4gICAgLy8g0J/QvtC70YPRh9Cw0LXQvCDRgdC/0LjRgdC+0Log0YHQvtCx0YvRgtC40Lkg0Lgg0YTRg9C90LrRhtC40Y4t0L7QsdGA0LDQsdC+0YLRh9C40LpcclxuICAgIG9uKGV2ZW50OiBFdmVudFR5cGUsIGhhbmRsZXI6IEZ1bmN0aW9uKSB7XHJcbiAgICAgICAgaWYgKGV2ZW50KSB7XHJcbiAgICAgICAgICAgIHRoaXMuaGFuZGxlcnNbZXZlbnRdID0gaGFuZGxlcjtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn0iXX0=

@@ -265,6 +265,16 @@ import { EventEmitter, Component, ElementRef, Input, Output, HostBinding, NgModule } from '@angular/core';

if (listener === 'mouseup' || listener === "mousemove") {
document[action](listener, this[handler], false);
if (action === 'addEventListener') {
document.addEventListener(listener, this[handler], false);
}
if (action === 'removeEventListener') {
document.removeEventListener(listener, this[handler], false);
}
}
else {
this.element[action](listener, this[handler], false);
if (action === 'addEventListener') {
this.element.addEventListener(listener, this[handler], false);
}
if (action === 'removeEventListener') {
this.element.removeEventListener(listener, this[handler], false);
}
}

@@ -271,0 +281,0 @@ }

@@ -270,6 +270,16 @@ import { EventEmitter, Component, ElementRef, Input, Output, HostBinding, NgModule } from '@angular/core';

if (listener === 'mouseup' || listener === "mousemove") {
document[action](listener, this[handler], false);
if (action === 'addEventListener') {
document.addEventListener(listener, this[handler], false);
}
if (action === 'removeEventListener') {
document.removeEventListener(listener, this[handler], false);
}
}
else {
this.element[action](listener, this[handler], false);
if (action === 'addEventListener') {
this.element.addEventListener(listener, this[handler], false);
}
if (action === 'removeEventListener') {
this.element.removeEventListener(listener, this[handler], false);
}
}

@@ -276,0 +286,0 @@ }

{
"name": "ngx-pinch-zoom",
"version": "2.0.1",
"version": "2.0.2",
"description": "Pinch zoom component for Angular.",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc