{"version":3,"sources":["webpack:///./node_modules/ngx-pinch-zoom/fesm2015/ngx-pinch-zoom.js","webpack:///./src/app/views/sustainability/containers/sustainability.page.html","webpack:///./src/app/views/sustainability/containers/sustainability.page.scss","webpack:///./src/app/views/sustainability/containers/sustainability.page.ts","webpack:///./src/app/views/sustainability/store/sustainability.actions.ts","webpack:///./src/app/views/sustainability/store/sustainability.effects.ts","webpack:///./src/app/views/sustainability/store/sustainability.reducer.ts","webpack:///./src/app/views/sustainability/store/sustainability.selectors.ts","webpack:///./src/app/views/sustainability/store/sustainability.state.ts","webpack:///./src/app/views/sustainability/sustainability-routing.module.ts","webpack:///./src/app/views/sustainability/sustainability.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoF;AACrC;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,KAAK,OAAO,uDAAS;AACrB;AACA;AACA;AACA,gCAAgC,cAAc,gBAAgB,kBAAkB,oBAAoB,eAAe,aAAa,kBAAkB,gBAAgB,yBAAyB,gCAAgC,wCAAwC,g2BAAg2B,6sBAA6sB,gCAAgC,sCAAsC,qBAAqB,kBAAkB,WAAW,eAAe,YAAY,WAAW,kBAAkB,uBAAuB,iBAAiB,WAAW,aAAa,oBAAoB,gCAAgC,sBAAsB,WAAW,+CAA+C,iBAAi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AACH;AACoC;AACjC;AAEyB;AACZ;AACW;AACvB;AACyB;AACtB;AAgBjD;IAAA;IAAuC,CAAC;IAA3B,wBAAwB;QAdpC,8DAAQ,CAAC;YACR,OAAO,EAAE;gBACP,4DAAY;gBACZ,0DAAW;gBACX,0FAA2B;gBAC3B,0DAAW;gBACX,kEAAY;gBACZ,+DAAe;gBACf,uDAAW,CAAC,UAAU,CAAC,gBAAgB,EAAE,mFAAwC,CAAC;gBAClF,4DAAa,CAAC,UAAU,CAAC,CAAC,oFAAqB,CAAC,CAAC;aAClD;YACD,YAAY,EAAE,CAAC,kFAAkB,CAAC;YAClC,OAAO,EAAE,CAAC,kFAAkB,CAAC;SAC9B,CAAC;OACW,wBAAwB,CAAG;IAAD,+BAAC;CAAA;AAAH","file":"views-sustainability-sustainability-module.js","sourcesContent":["import { Component, ElementRef, Input, HostBinding, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nconst defaultProperties = {\r\n transitionDuration: 200,\r\n doubleTap: true,\r\n doubleTapScale: 2,\r\n limitZoom: \"original image size\",\r\n autoZoomOut: false,\r\n zoomControlScale: 1,\r\n minPanScale: 1.0001,\r\n minScale: 0,\r\n listeners: \"mouse and touch\",\r\n wheel: true,\r\n wheelZoomFactor: 0.2,\r\n draggableImage: false\r\n};\r\nconst backwardCompatibilityProperties = {\r\n \"transition-duration\": \"transitionDuration\",\r\n \"transitionDurationBackwardCompatibility\": \"transitionDuration\",\r\n \"double-tap\": \"doubleTap\",\r\n \"doubleTapBackwardCompatibility\": \"doubleTap\",\r\n \"double-tap-scale\": \"doubleTapScale\",\r\n \"doubleTapScaleBackwardCompatibility\": \"doubleTapScale\",\r\n \"auto-zoom-out\": \"autoZoomOut\",\r\n \"autoZoomOutBackwardCompatibility\": \"autoZoomOut\",\r\n \"limit-zoom\": \"limitZoom\",\r\n \"limitZoomBackwardCompatibility\": \"limitZoom\"\r\n};\n\nclass Touches {\r\n constructor(properties) {\r\n this.eventType = undefined;\r\n this.handlers = {};\r\n this.startX = 0;\r\n this.startY = 0;\r\n this.lastTap = 0;\r\n this.doubleTapMinTimeout = 300;\r\n this.tapMinTimeout = 200;\r\n this.touchstartTime = 0;\r\n this.i = 0;\r\n this.isMousedown = false;\r\n this._touchListeners = {\r\n \"touchstart\": \"handleTouchstart\",\r\n \"touchmove\": \"handleTouchmove\",\r\n \"touchend\": \"handleTouchend\"\r\n };\r\n this._mouseListeners = {\r\n \"mousedown\": \"handleMousedown\",\r\n \"mousemove\": \"handleMousemove\",\r\n \"mouseup\": \"handleMouseup\",\r\n \"wheel\": \"handleWheel\"\r\n };\r\n this._otherListeners = {\r\n \"resize\": \"handleResize\"\r\n };\r\n /*\r\n * Listeners\r\n */\r\n /* Touchstart */\r\n this.handleTouchstart = (event) => {\r\n this.elementPosition = this.getElementPosition();\r\n this.touchstartTime = new Date().getTime();\r\n if (this.eventType === undefined) {\r\n this.getTouchstartPosition(event);\r\n }\r\n this.runHandler(\"touchstart\", event);\r\n };\r\n /* Touchmove */\r\n this.handleTouchmove = (event) => {\r\n const touches = event.touches;\r\n // Pan\r\n if (this.detectPan(touches)) {\r\n this.runHandler(\"pan\", event);\r\n }\r\n // Pinch\r\n if (this.detectPinch(event)) {\r\n this.runHandler(\"pinch\", event);\r\n }\r\n };\r\n /* Touchend */\r\n this.handleTouchend = (event) => {\r\n const touches = event.touches;\r\n // Double Tap\r\n if (this.detectDoubleTap()) {\r\n this.runHandler(\"double-tap\", event);\r\n }\r\n // Tap\r\n this.detectTap();\r\n this.runHandler(\"touchend\", event);\r\n this.eventType = 'touchend';\r\n if (touches && touches.length === 0) {\r\n this.eventType = undefined;\r\n this.i = 0;\r\n }\r\n };\r\n /* Mousedown */\r\n this.handleMousedown = (event) => {\r\n this.isMousedown = true;\r\n this.elementPosition = this.getElementPosition();\r\n this.touchstartTime = new Date().getTime();\r\n if (this.eventType === undefined) {\r\n this.getMousedownPosition(event);\r\n }\r\n this.runHandler(\"mousedown\", event);\r\n };\r\n /* Mousemove */\r\n this.handleMousemove = (event) => {\r\n //event.preventDefault();\r\n if (!this.isMousedown) {\r\n return;\r\n }\r\n // Pan\r\n this.runHandler(\"pan\", event);\r\n // Linear swipe\r\n switch (this.detectLinearSwipe(event)) {\r\n case \"horizontal-swipe\":\r\n event.swipeType = \"horizontal-swipe\";\r\n this.runHandler(\"horizontal-swipe\", event);\r\n break;\r\n case \"vertical-swipe\":\r\n event.swipeType = \"vertical-swipe\";\r\n this.runHandler(\"vertical-swipe\", event);\r\n break;\r\n }\r\n // Linear swipe\r\n if (this.detectLinearSwipe(event) ||\r\n this.eventType === 'horizontal-swipe' ||\r\n this.eventType === 'vertical-swipe') {\r\n this.handleLinearSwipe(event);\r\n }\r\n };\r\n /* Mouseup */\r\n this.handleMouseup = (event) => {\r\n // Tap\r\n this.detectTap();\r\n this.isMousedown = false;\r\n this.runHandler(\"mouseup\", event);\r\n this.eventType = undefined;\r\n this.i = 0;\r\n };\r\n /* Wheel */\r\n this.handleWheel = (event) => {\r\n this.runHandler(\"wheel\", event);\r\n };\r\n /* Resize */\r\n this.handleResize = (event) => {\r\n this.runHandler(\"resize\", event);\r\n };\r\n this.properties = properties;\r\n this.element = this.properties.element;\r\n this.elementPosition = this.getElementPosition();\r\n this.toggleEventListeners('addEventListener');\r\n }\r\n get touchListeners() {\r\n return this.properties.touchListeners ? this.properties.touchListeners : this._touchListeners;\r\n }\r\n get mouseListeners() {\r\n return this.properties.mouseListeners ? this.properties.mouseListeners : this._mouseListeners;\r\n }\r\n get otherListeners() {\r\n return this.properties.otherListeners ? this.properties.otherListeners : this._otherListeners;\r\n }\r\n destroy() {\r\n this.toggleEventListeners('removeEventListener');\r\n }\r\n toggleEventListeners(action) {\r\n let listeners;\r\n if (this.properties.listeners === 'mouse and touch') {\r\n listeners = Object.assign(this.touchListeners, this.mouseListeners);\r\n }\r\n else {\r\n listeners = this.detectTouchScreen() ? this.touchListeners : this.mouseListeners;\r\n }\r\n if (this.properties.resize) {\r\n listeners = Object.assign(listeners, this.otherListeners);\r\n }\r\n for (var listener in listeners) {\r\n const handler = listeners[listener];\r\n // Window\r\n if (listener === \"resize\") {\r\n if (action === 'addEventListener') {\r\n window.addEventListener(listener, this[handler], false);\r\n }\r\n if (action === 'removeEventListener') {\r\n window.removeEventListener(listener, this[handler], false);\r\n }\r\n // Document\r\n }\r\n else if (listener === 'mouseup' || listener === \"mousemove\") {\r\n if (action === 'addEventListener') {\r\n document.addEventListener(listener, this[handler], false);\r\n }\r\n if (action === 'removeEventListener') {\r\n document.removeEventListener(listener, this[handler], false);\r\n }\r\n // Element\r\n }\r\n else {\r\n if (action === 'addEventListener') {\r\n this.element.addEventListener(listener, this[handler], false);\r\n }\r\n if (action === 'removeEventListener') {\r\n this.element.removeEventListener(listener, this[handler], false);\r\n }\r\n }\r\n }\r\n }\r\n addEventListeners(listener) {\r\n const handler = this._mouseListeners[listener];\r\n window.addEventListener(listener, this[handler], false);\r\n }\r\n removeEventListeners(listener) {\r\n const handler = this._mouseListeners[listener];\r\n window.removeEventListener(listener, this[handler], false);\r\n }\r\n handleLinearSwipe(event) {\r\n //event.preventDefault();\r\n this.i++;\r\n if (this.i > 3) {\r\n this.eventType = this.getLinearSwipeType(event);\r\n }\r\n if (this.eventType === 'horizontal-swipe') {\r\n this.runHandler('horizontal-swipe', event);\r\n }\r\n if (this.eventType === 'vertical-swipe') {\r\n this.runHandler('vertical-swipe', event);\r\n }\r\n }\r\n runHandler(eventName, response) {\r\n if (this.handlers[eventName]) {\r\n this.handlers[eventName](response);\r\n }\r\n }\r\n /*\r\n * Detection\r\n */\r\n detectPan(touches) {\r\n return touches.length === 1 && !this.eventType || this.eventType === 'pan';\r\n }\r\n detectDoubleTap() {\r\n if (this.eventType != undefined) {\r\n return;\r\n }\r\n const currentTime = new Date().getTime();\r\n const tapLength = currentTime - this.lastTap;\r\n clearTimeout(this.doubleTapTimeout);\r\n if (tapLength < this.doubleTapMinTimeout && tapLength > 0) {\r\n return true;\r\n }\r\n else {\r\n this.doubleTapTimeout = setTimeout(() => {\r\n clearTimeout(this.doubleTapTimeout);\r\n }, this.doubleTapMinTimeout);\r\n }\r\n this.lastTap = currentTime;\r\n return undefined;\r\n }\r\n detectTap() {\r\n if (this.eventType != undefined) {\r\n return;\r\n }\r\n const currentTime = new Date().getTime();\r\n const tapLength = currentTime - this.touchstartTime;\r\n if (tapLength > 0) {\r\n if (tapLength < this.tapMinTimeout) {\r\n this.runHandler(\"tap\", {});\r\n }\r\n else {\r\n this.runHandler(\"longtap\", {});\r\n }\r\n }\r\n }\r\n detectPinch(event) {\r\n const touches = event.touches;\r\n return (touches.length === 2 && this.eventType === undefined) || this.eventType === 'pinch';\r\n }\r\n detectLinearSwipe(event) {\r\n const touches = event.touches;\r\n if (touches) {\r\n if (touches.length === 1 && !this.eventType || this.eventType === 'horizontal-swipe' || this.eventType === 'vertical-swipe') {\r\n return this.getLinearSwipeType(event);\r\n }\r\n }\r\n else {\r\n if (!this.eventType || this.eventType === 'horizontal-swipe' || this.eventType === 'vertical-swipe') {\r\n return this.getLinearSwipeType(event);\r\n }\r\n }\r\n return undefined;\r\n }\r\n getLinearSwipeType(event) {\r\n if (this.eventType !== 'horizontal-swipe' && this.eventType !== 'vertical-swipe') {\r\n const movementX = Math.abs(this.moveLeft(0, event) - this.startX);\r\n const movementY = Math.abs(this.moveTop(0, event) - this.startY);\r\n if ((movementY * 3) > movementX) {\r\n return 'vertical-swipe';\r\n }\r\n else {\r\n return 'horizontal-swipe';\r\n }\r\n }\r\n else {\r\n return this.eventType;\r\n }\r\n }\r\n getElementPosition() {\r\n return this.element.getBoundingClientRect();\r\n }\r\n getTouchstartPosition(event) {\r\n this.startX = event.touches[0].clientX - this.elementPosition.left;\r\n this.startY = event.touches[0].clientY - this.elementPosition.top;\r\n }\r\n getMousedownPosition(event) {\r\n this.startX = event.clientX - this.elementPosition.left;\r\n this.startY = event.clientY - this.elementPosition.top;\r\n }\r\n moveLeft(index, event) {\r\n const touches = event.touches;\r\n if (touches) {\r\n return touches[index].clientX - this.elementPosition.left;\r\n }\r\n else {\r\n return event.clientX - this.elementPosition.left;\r\n }\r\n }\r\n moveTop(index, event) {\r\n const touches = event.touches;\r\n if (touches) {\r\n return touches[index].clientY - this.elementPosition.top;\r\n }\r\n else {\r\n return event.clientY - this.elementPosition.top;\r\n }\r\n }\r\n detectTouchScreen() {\r\n var prefixes = ' -webkit- -moz- -o- -ms- '.split(' ');\r\n var mq = function (query) {\r\n return window.matchMedia(query).matches;\r\n };\r\n if (('ontouchstart' in window)) {\r\n return true;\r\n }\r\n // include the 'heartz' as a way to have a non matching MQ to help terminate the join\r\n // https://git.io/vznFH\r\n var query = ['(', prefixes.join('touch-enabled),('), 'heartz', ')'].join('');\r\n return mq(query);\r\n }\r\n /* Public properties and methods */\r\n on(event, handler) {\r\n if (event) {\r\n this.handlers[event] = handler;\r\n }\r\n }\r\n}\n\nclass IvyPinch {\r\n constructor(properties) {\r\n this.properties = defaultProperties;\r\n this.i = 0;\r\n this.scale = 1;\r\n this.initialScale = 1;\r\n this.startX = 0;\r\n this.startY = 0;\r\n this.moveX = 0;\r\n this.moveY = 0;\r\n this.initialMoveX = 0;\r\n this.initialMoveY = 0;\r\n this.moveXC = 0;\r\n this.moveYC = 0;\r\n this.lastTap = 0;\r\n this.draggingMode = false;\r\n this.distance = 0;\r\n this.doubleTapTimeout = 0;\r\n this.initialDistance = 0;\r\n this.events = {};\r\n this.defaultMaxScale = 3;\r\n /* Touchstart */\r\n this.handleTouchstart = (event) => {\r\n this.touches.addEventListeners(\"mousemove\", \"handleMousemove\");\r\n this.getElementPosition();\r\n if (this.eventType === undefined) {\r\n this.getTouchstartPosition(event);\r\n }\r\n };\r\n /* Touchend */\r\n this.handleTouchend = (event) => {\r\n /* touchend */\r\n if (event.type === \"touchend\") {\r\n this.i = 0;\r\n this.draggingMode = false;\r\n const touches = event.touches;\r\n // Min scale\r\n if (this.scale < 1) {\r\n this.scale = 1;\r\n }\r\n // Auto Zoom Out\r\n if (this.properties.autoZoomOut && this.eventType === 'pinch') {\r\n this.scale = 1;\r\n }\r\n // Align image\r\n if (this.eventType === 'pinch' ||\r\n this.eventType === 'pan' && this.scale > this.minPanScale) {\r\n this.alignImage();\r\n }\r\n // Update initial values\r\n if (this.eventType === 'pinch' ||\r\n this.eventType === 'pan' ||\r\n this.eventType === 'horizontal-swipe' ||\r\n this.eventType === 'vertical-swipe') {\r\n this.updateInitialValues();\r\n }\r\n this.eventType = 'touchend';\r\n if (touches && touches.length === 0) {\r\n this.eventType = undefined;\r\n }\r\n }\r\n /* mouseup */\r\n if (event.type === \"mouseup\") {\r\n this.draggingMode = false;\r\n this.updateInitialValues();\r\n this.eventType = undefined;\r\n }\r\n this.touches.removeEventListeners(\"mousemove\", \"handleMousemove\");\r\n };\r\n /*\r\n * Handlers\r\n */\r\n this.handlePan = (event) => {\r\n if (this.scale < this.minPanScale || this.properties.disablePan) {\r\n return;\r\n }\r\n event.preventDefault();\r\n const { clientX, clientY } = this.getClientPosition(event);\r\n if (!this.eventType) {\r\n this.startX = clientX - this.elementPosition.left;\r\n this.startY = clientY - this.elementPosition.top;\r\n }\r\n this.eventType = 'pan';\r\n this.moveX = this.initialMoveX + (this.moveLeft(event, 0) - this.startX);\r\n this.moveY = this.initialMoveY + (this.moveTop(event, 0) - this.startY);\r\n if (this.properties.limitPan) {\r\n this.limitPanY();\r\n this.limitPanX();\r\n }\r\n /* mousemove */\r\n if (event.type === \"mousemove\" && this.scale > this.minPanScale) {\r\n this.centeringImage();\r\n }\r\n this.transformElement(0);\r\n };\r\n this.handleDoubleTap = (event) => {\r\n this.toggleZoom(event);\r\n return;\r\n };\r\n this.handlePinch = (event) => {\r\n event.preventDefault();\r\n if (this.eventType === undefined || this.eventType === 'pinch') {\r\n const touches = event.touches;\r\n if (!this.eventType) {\r\n this.initialDistance = this.getDistance(touches);\r\n const moveLeft0 = this.moveLeft(event, 0);\r\n const moveLeft1 = this.moveLeft(event, 1);\r\n const moveTop0 = this.moveTop(event, 0);\r\n const moveTop1 = this.moveTop(event, 1);\r\n this.moveXC = ((moveLeft0 + moveLeft1) / 2) - this.initialMoveX;\r\n this.moveYC = ((moveTop0 + moveTop1) / 2) - this.initialMoveY;\r\n }\r\n this.eventType = 'pinch';\r\n this.distance = this.getDistance(touches);\r\n this.scale = this.initialScale * (this.distance / this.initialDistance);\r\n this.moveX = this.initialMoveX - (((this.distance / this.initialDistance) * this.moveXC) - this.moveXC);\r\n this.moveY = this.initialMoveY - (((this.distance / this.initialDistance) * this.moveYC) - this.moveYC);\r\n this.handleLimitZoom();\r\n if (this.properties.limitPan) {\r\n this.limitPanY();\r\n this.limitPanX();\r\n }\r\n this.transformElement(0);\r\n }\r\n };\r\n this.handleWheel = (event) => {\r\n event.preventDefault();\r\n let wheelZoomFactor = this.properties.wheelZoomFactor || 0;\r\n let zoomFactor = event.deltaY < 0 ? (wheelZoomFactor) : (-wheelZoomFactor);\r\n let newScale = this.initialScale + zoomFactor;\r\n /* Round value */\r\n if (newScale < (1 + wheelZoomFactor)) {\r\n newScale = 1;\r\n }\r\n else if (newScale < this.maxScale && newScale > this.maxScale - wheelZoomFactor) {\r\n newScale = this.maxScale;\r\n }\r\n if (newScale < 1 || newScale > this.maxScale) {\r\n return;\r\n }\r\n if (newScale === this.scale) {\r\n return;\r\n }\r\n this.getElementPosition();\r\n this.scale = newScale;\r\n /* Get cursor position over image */\r\n let xCenter = (event.clientX - this.elementPosition.left) - this.initialMoveX;\r\n let yCenter = (event.clientY - this.elementPosition.top) - this.initialMoveY;\r\n this.setZoom({\r\n scale: newScale,\r\n center: [xCenter, yCenter]\r\n });\r\n };\r\n this.handleResize = (_event) => {\r\n this.setAutoHeight();\r\n };\r\n this.element = properties.element;\r\n if (!this.element) {\r\n return;\r\n }\r\n this.elementTarget = this.element.querySelector('*').tagName;\r\n this.parentElement = this.element.parentElement;\r\n this.properties = Object.assign({}, defaultProperties, properties);\r\n this.detectLimitZoom();\r\n this.touches = new Touches({\r\n element: properties.element,\r\n listeners: properties.listeners,\r\n resize: properties.autoHeight,\r\n mouseListeners: {\r\n \"mousedown\": \"handleMousedown\",\r\n \"mouseup\": \"handleMouseup\",\r\n \"wheel\": \"handleWheel\"\r\n }\r\n });\r\n /* Init */\r\n this.setBasicStyles();\r\n /*\r\n * Listeners\r\n */\r\n this.touches.on('touchstart', this.handleTouchstart);\r\n this.touches.on('touchend', this.handleTouchend);\r\n this.touches.on('mousedown', this.handleTouchstart);\r\n this.touches.on('mouseup', this.handleTouchend);\r\n this.touches.on('pan', this.handlePan);\r\n this.touches.on('mousemove', this.handlePan);\r\n this.touches.on('pinch', this.handlePinch);\r\n if (this.properties.wheel) {\r\n this.touches.on('wheel', this.handleWheel);\r\n }\r\n if (this.properties.doubleTap) {\r\n this.touches.on('double-tap', this.handleDoubleTap);\r\n }\r\n if (this.properties.autoHeight) {\r\n this.touches.on('resize', this.handleResize);\r\n }\r\n }\r\n // Minimum scale at which panning works\r\n get minPanScale() {\r\n return this.getPropertiesValue(\"minPanScale\");\r\n }\r\n get fullImage() {\r\n return this.properties.fullImage;\r\n }\r\n handleLimitZoom() {\r\n const limitZoom = this.maxScale;\r\n const minScale = this.properties.minScale || 0;\r\n if (this.scale > limitZoom || this.scale <= minScale) {\r\n const imageWidth = this.getImageWidth();\r\n const imageHeight = this.getImageHeight();\r\n const enlargedImageWidth = imageWidth * this.scale;\r\n const enlargedImageHeight = imageHeight * this.scale;\r\n const moveXRatio = this.moveX / (enlargedImageWidth - imageWidth);\r\n const moveYRatio = this.moveY / (enlargedImageHeight - imageHeight);\r\n if (this.scale > limitZoom) {\r\n this.scale = limitZoom;\r\n }\r\n if (this.scale <= minScale) {\r\n this.scale = minScale;\r\n }\r\n const newImageWidth = imageWidth * this.scale;\r\n const newImageHeight = imageHeight * this.scale;\r\n this.moveX = -Math.abs((moveXRatio * (newImageWidth - imageWidth)));\r\n this.moveY = -Math.abs((-moveYRatio * (newImageHeight - imageHeight)));\r\n }\r\n }\r\n moveLeft(event, index = 0) {\r\n const clientX = this.getClientPosition(event, index).clientX;\r\n return clientX - this.elementPosition.left;\r\n }\r\n moveTop(event, index = 0) {\r\n const clientY = this.getClientPosition(event, index).clientY;\r\n return clientY - this.elementPosition.top;\r\n }\r\n /*\r\n * Detection\r\n */\r\n centeringImage() {\r\n const img = this.element.getElementsByTagName(this.elementTarget)[0];\r\n const initialMoveX = this.moveX;\r\n const initialMoveY = this.moveY;\r\n if (this.moveY > 0) {\r\n this.moveY = 0;\r\n }\r\n if (this.moveX > 0) {\r\n this.moveX = 0;\r\n }\r\n if (img) {\r\n this.limitPanY();\r\n this.limitPanX();\r\n }\r\n if (img && this.scale < 1) {\r\n if (this.moveX < this.element.offsetWidth * (1 - this.scale)) {\r\n this.moveX = this.element.offsetWidth * (1 - this.scale);\r\n }\r\n }\r\n return initialMoveX !== this.moveX || initialMoveY !== this.moveY;\r\n }\r\n limitPanY() {\r\n const imgHeight = this.getImageHeight();\r\n const scaledImgHeight = imgHeight * this.scale;\r\n const parentHeight = this.parentElement.offsetHeight;\r\n const elementHeight = this.element.offsetHeight;\r\n if (scaledImgHeight < parentHeight) {\r\n this.moveY = (parentHeight - elementHeight * this.scale) / 2;\r\n }\r\n else {\r\n const imgOffsetTop = ((imgHeight - elementHeight) * this.scale) / 2;\r\n if (this.moveY > imgOffsetTop) {\r\n this.moveY = imgOffsetTop;\r\n }\r\n else if ((scaledImgHeight + Math.abs(imgOffsetTop) - parentHeight) + this.moveY < 0) {\r\n this.moveY = -(scaledImgHeight + Math.abs(imgOffsetTop) - parentHeight);\r\n }\r\n }\r\n }\r\n limitPanX() {\r\n const imgWidth = this.getImageWidth();\r\n const scaledImgWidth = imgWidth * this.scale;\r\n const parentWidth = this.parentElement.offsetWidth;\r\n const elementWidth = this.element.offsetWidth;\r\n if (scaledImgWidth < parentWidth) {\r\n this.moveX = (parentWidth - elementWidth * this.scale) / 2;\r\n }\r\n else {\r\n const imgOffsetLeft = ((imgWidth - elementWidth) * this.scale) / 2;\r\n if (this.moveX > imgOffsetLeft) {\r\n this.moveX = imgOffsetLeft;\r\n }\r\n else if ((scaledImgWidth + Math.abs(imgOffsetLeft) - parentWidth) + this.moveX < 0) {\r\n this.moveX = -(imgWidth * this.scale + Math.abs(imgOffsetLeft) - parentWidth);\r\n }\r\n }\r\n }\r\n setBasicStyles() {\r\n this.element.style.display = 'flex';\r\n this.element.style.alignItems = 'center';\r\n this.element.style.justifyContent = 'center';\r\n this.element.style.transformOrigin = '0 0';\r\n this.setImageSize();\r\n this.setDraggableImage();\r\n }\r\n removeBasicStyles() {\r\n this.element.style.display = '';\r\n this.element.style.alignItems = '';\r\n this.element.style.justifyContent = '';\r\n this.element.style.transformOrigin = '';\r\n this.removeImageSize();\r\n this.removeDraggableImage();\r\n }\r\n setDraggableImage() {\r\n const imgElement = this.getImageElement();\r\n if (imgElement) {\r\n imgElement.draggable = this.properties.draggableImage;\r\n }\r\n }\r\n removeDraggableImage() {\r\n const imgElement = this.getImageElement();\r\n if (imgElement) {\r\n imgElement.draggable = true;\r\n }\r\n }\r\n setImageSize() {\r\n const imgElement = this.element.getElementsByTagName(this.elementTarget);\r\n if (imgElement.length) {\r\n imgElement[0].style.maxWidth = '100%';\r\n imgElement[0].style.maxHeight = '100%';\r\n this.setAutoHeight();\r\n }\r\n }\r\n setAutoHeight() {\r\n const imgElement = this.element.getElementsByTagName(this.elementTarget);\r\n if (!this.properties.autoHeight || !imgElement.length) {\r\n return;\r\n }\r\n const imgNaturalWidth = imgElement[0].getAttribute(\"width\");\r\n const imgNaturalHeight = imgElement[0].getAttribute(\"height\");\r\n const sizeRatio = imgNaturalWidth / imgNaturalHeight;\r\n const parentWidth = this.parentElement.offsetWidth;\r\n imgElement[0].style.maxHeight = parentWidth / sizeRatio + \"px\";\r\n }\r\n removeImageSize() {\r\n const imgElement = this.element.getElementsByTagName(this.elementTarget);\r\n if (imgElement.length) {\r\n imgElement[0].style.maxWidth = '';\r\n imgElement[0].style.maxHeight = '';\r\n }\r\n }\r\n getElementPosition() {\r\n this.elementPosition = this.element.parentElement.getBoundingClientRect();\r\n }\r\n getTouchstartPosition(event) {\r\n const { clientX, clientY } = this.getClientPosition(event);\r\n this.startX = clientX - this.elementPosition.left;\r\n this.startY = clientY - this.elementPosition.top;\r\n }\r\n getClientPosition(event, index = 0) {\r\n let clientX;\r\n let clientY;\r\n if (event.type === \"touchstart\" || event.type === \"touchmove\") {\r\n clientX = event.touches[index].clientX;\r\n clientY = event.touches[index].clientY;\r\n }\r\n if (event.type === \"mousedown\" || event.type === \"mousemove\") {\r\n clientX = event.clientX;\r\n clientY = event.clientY;\r\n }\r\n return {\r\n clientX,\r\n clientY\r\n };\r\n }\r\n resetScale() {\r\n this.scale = 1;\r\n this.moveX = 0;\r\n this.moveY = 0;\r\n this.updateInitialValues();\r\n this.transformElement(this.properties.transitionDuration);\r\n }\r\n updateInitialValues() {\r\n this.initialScale = this.scale;\r\n this.initialMoveX = this.moveX;\r\n this.initialMoveY = this.moveY;\r\n }\r\n getDistance(touches) {\r\n return Math.sqrt(Math.pow(touches[0].pageX - touches[1].pageX, 2) + Math.pow(touches[0].pageY - touches[1].pageY, 2));\r\n }\r\n getImageHeight() {\r\n const img = this.element.getElementsByTagName(this.elementTarget)[0];\r\n return img.offsetHeight;\r\n }\r\n getImageWidth() {\r\n const img = this.element.getElementsByTagName(this.elementTarget)[0];\r\n return img.offsetWidth;\r\n }\r\n transformElement(duration) {\r\n this.element.style.transition = \"all \" + duration + \"ms\";\r\n this.element.style.transform = \"matrix(\" + Number(this.scale) + \", 0, 0, \" + Number(this.scale) + \", \" + Number(this.moveX) + \", \" + Number(this.moveY) + \")\";\r\n }\r\n isTouchScreen() {\r\n const prefixes = ' -webkit- -moz- -o- -ms- '.split(' ');\r\n if (('ontouchstart' in window)) {\r\n return true;\r\n }\r\n // include the 'heartz' as a way to have a non matching MQ to help terminate the join\r\n // https://git.io/vznFH\r\n const query = ['(', prefixes.join('touch-enabled),('), 'heartz', ')'].join('');\r\n return this.getMatchMedia(query);\r\n }\r\n getMatchMedia(query) {\r\n return window.matchMedia(query).matches;\r\n }\r\n isDragging() {\r\n if (this.properties.disablePan) {\r\n return false;\r\n }\r\n const imgHeight = this.getImageHeight();\r\n const imgWidth = this.getImageWidth();\r\n if (this.scale > 1) {\r\n return imgHeight * this.scale > this.parentElement.offsetHeight ||\r\n imgWidth * this.scale > this.parentElement.offsetWidth;\r\n }\r\n if (this.scale === 1) {\r\n return imgHeight > this.parentElement.offsetHeight ||\r\n imgWidth > this.parentElement.offsetWidth;\r\n }\r\n return undefined;\r\n }\r\n detectLimitZoom() {\r\n this.maxScale = this.defaultMaxScale;\r\n if (this.properties.limitZoom === \"original image size\" &&\r\n this.elementTarget === \"IMG\") {\r\n // We are waiting for the element with the image to be available\r\n this.pollLimitZoomForOriginalImage();\r\n }\r\n }\r\n pollLimitZoomForOriginalImage() {\r\n let poll = setInterval(() => {\r\n let maxScaleForOriginalImage = this.getMaxScaleForOriginalImage();\r\n if (typeof maxScaleForOriginalImage === 'number') {\r\n this.maxScale = maxScaleForOriginalImage;\r\n clearInterval(poll);\r\n }\r\n }, 10);\r\n }\r\n getMaxScaleForOriginalImage() {\r\n let maxScale;\r\n let img = this.element.getElementsByTagName(\"img\")[0];\r\n if (img.naturalWidth && img.offsetWidth) {\r\n maxScale = img.naturalWidth / img.offsetWidth;\r\n }\r\n return maxScale;\r\n }\r\n getImageElement() {\r\n const imgElement = this.element.getElementsByTagName(this.elementTarget);\r\n if (imgElement.length) {\r\n return imgElement[0];\r\n }\r\n }\r\n toggleZoom(event = false) {\r\n if (this.initialScale === 1) {\r\n if (event && event.changedTouches) {\r\n if (this.properties.doubleTapScale === undefined) {\r\n return;\r\n }\r\n const changedTouches = event.changedTouches;\r\n this.scale = this.initialScale * this.properties.doubleTapScale;\r\n this.moveX = this.initialMoveX - (changedTouches[0].clientX - this.elementPosition.left) * (this.properties.doubleTapScale - 1);\r\n this.moveY = this.initialMoveY - (changedTouches[0].clientY - this.elementPosition.top) * (this.properties.doubleTapScale - 1);\r\n }\r\n else {\r\n let zoomControlScale = this.properties.zoomControlScale || 0;\r\n this.scale = this.initialScale * (zoomControlScale + 1);\r\n this.moveX = this.initialMoveX - this.element.offsetWidth * (this.scale - 1) / 2;\r\n this.moveY = this.initialMoveY - this.element.offsetHeight * (this.scale - 1) / 2;\r\n }\r\n this.centeringImage();\r\n this.updateInitialValues();\r\n this.transformElement(this.properties.transitionDuration);\r\n }\r\n else {\r\n this.resetScale();\r\n }\r\n }\r\n setZoom(properties) {\r\n this.scale = properties.scale;\r\n let xCenter;\r\n let yCenter;\r\n let visibleAreaWidth = this.element.offsetWidth;\r\n let visibleAreaHeight = this.element.offsetHeight;\r\n let scalingPercent = (visibleAreaWidth * this.scale) / (visibleAreaWidth * this.initialScale);\r\n if (properties.center) {\r\n xCenter = properties.center[0];\r\n yCenter = properties.center[1];\r\n }\r\n else {\r\n xCenter = visibleAreaWidth / 2 - this.initialMoveX;\r\n yCenter = visibleAreaHeight / 2 - this.initialMoveY;\r\n }\r\n this.moveX = this.initialMoveX - ((scalingPercent * xCenter) - xCenter);\r\n this.moveY = this.initialMoveY - ((scalingPercent * yCenter) - yCenter);\r\n this.centeringImage();\r\n this.updateInitialValues();\r\n this.transformElement(this.properties.transitionDuration);\r\n }\r\n alignImage() {\r\n const isMoveChanged = this.centeringImage();\r\n if (isMoveChanged) {\r\n this.updateInitialValues();\r\n this.transformElement(this.properties.transitionDuration);\r\n }\r\n }\r\n destroy() {\r\n this.removeBasicStyles();\r\n this.touches.destroy();\r\n }\r\n getPropertiesValue(propertyName) {\r\n if (this.properties && this.properties[propertyName]) {\r\n return this.properties[propertyName];\r\n }\r\n else {\r\n return defaultProperties[propertyName];\r\n }\r\n }\r\n}\n\nconst _defaultComponentProperties = {\r\n overflow: \"hidden\",\r\n disableZoomControl: \"auto\",\r\n backgroundColor: \"rgba(0,0,0,0.85)\"\r\n};\r\nclass PinchZoomComponent {\r\n constructor(elementRef) {\r\n this.elementRef = elementRef;\r\n this.defaultComponentProperties = this.getDefaultComponentProperties();\r\n this.applyPropertiesDefault(this.defaultComponentProperties, {});\r\n }\r\n set properties(value) {\r\n if (value) {\r\n this._properties = value;\r\n }\r\n }\r\n get properties() {\r\n return this._properties;\r\n }\r\n // transitionDuration\r\n set transitionDurationBackwardCompatibility(value) {\r\n if (value) {\r\n this._transitionDuration = value;\r\n }\r\n }\r\n set transitionDuration(value) {\r\n if (value) {\r\n this._transitionDuration = value;\r\n }\r\n }\r\n get transitionDuration() {\r\n return this._transitionDuration;\r\n }\r\n // doubleTap\r\n set doubleTapBackwardCompatibility(value) {\r\n if (value) {\r\n this._doubleTap = value;\r\n }\r\n }\r\n set doubleTap(value) {\r\n if (value) {\r\n this._doubleTap = value;\r\n }\r\n }\r\n get doubleTap() {\r\n return this._doubleTap;\r\n }\r\n // doubleTapScale\r\n set doubleTapScaleBackwardCompatibility(value) {\r\n if (value) {\r\n this._doubleTapScale = value;\r\n }\r\n }\r\n set doubleTapScale(value) {\r\n if (value) {\r\n this._doubleTapScale = value;\r\n }\r\n }\r\n get doubleTapScale() {\r\n return this._doubleTapScale;\r\n }\r\n // autoZoomOut\r\n set autoZoomOutBackwardCompatibility(value) {\r\n if (value) {\r\n this._autoZoomOut = value;\r\n }\r\n }\r\n set autoZoomOut(value) {\r\n if (value) {\r\n this._autoZoomOut = value;\r\n }\r\n }\r\n get autoZoomOut() {\r\n return this._autoZoomOut;\r\n }\r\n // limitZoom\r\n set limitZoomBackwardCompatibility(value) {\r\n if (value) {\r\n this._limitZoom = value;\r\n }\r\n }\r\n set limitZoom(value) {\r\n if (value) {\r\n this._limitZoom = value;\r\n }\r\n }\r\n get limitZoom() {\r\n return this._limitZoom;\r\n }\r\n get hostOverflow() {\r\n return this.properties['overflow'];\r\n }\r\n get hostBackgroundColor() {\r\n return this.properties['backgroundColor'];\r\n }\r\n get isTouchScreen() {\r\n var prefixes = ' -webkit- -moz- -o- -ms- '.split(' ');\r\n var mq = function (query) {\r\n return window.matchMedia(query).matches;\r\n };\r\n if (('ontouchstart' in window)) {\r\n return true;\r\n }\r\n // include the 'heartz' as a way to have a non matching MQ to help terminate the join\r\n // https://git.io/vznFH\r\n var query = ['(', prefixes.join('touch-enabled),('), 'heartz', ')'].join('');\r\n return mq(query);\r\n }\r\n get isDragging() {\r\n return this.pinchZoom ? this.pinchZoom.isDragging() : undefined;\r\n }\r\n get isDisabled() {\r\n return this.properties['disabled'];\r\n }\r\n get scale() {\r\n return this.pinchZoom.scale;\r\n }\r\n get isZoomedIn() {\r\n return this.scale > 1;\r\n }\r\n get scaleLevel() {\r\n return Math.round(this.scale / this._zoomControlScale);\r\n }\r\n get maxScale() {\r\n return this.pinchZoom.maxScale;\r\n }\r\n get isZoomLimitReached() {\r\n return this.scale >= this.maxScale;\r\n }\r\n get _zoomControlScale() {\r\n return this.getPropertiesValue('zoomControlScale');\r\n }\r\n ngOnInit() {\r\n this.initPinchZoom();\r\n /* Calls the method until the image size is available */\r\n this.detectLimitZoom();\r\n }\r\n ngOnChanges(changes) {\r\n let changedProperties = this.getProperties(changes);\r\n changedProperties = this.renameProperties(changedProperties);\r\n this.applyPropertiesDefault(this.defaultComponentProperties, changedProperties);\r\n }\r\n ngOnDestroy() {\r\n this.destroy();\r\n }\r\n initPinchZoom() {\r\n if (this.properties['disabled']) {\r\n return;\r\n }\r\n this.properties['element'] = this.elementRef.nativeElement.querySelector('.pinch-zoom-content');\r\n this.pinchZoom = new IvyPinch(this.properties);\r\n }\r\n getProperties(changes) {\r\n let properties = {};\r\n for (var prop in changes) {\r\n if (prop !== 'properties') {\r\n properties[prop] = changes[prop].currentValue;\r\n }\r\n if (prop === 'properties') {\r\n properties = changes[prop].currentValue;\r\n }\r\n }\r\n return properties;\r\n }\r\n renameProperties(properties) {\r\n for (var prop in properties) {\r\n if (backwardCompatibilityProperties[prop]) {\r\n properties[backwardCompatibilityProperties[prop]] = properties[prop];\r\n delete properties[prop];\r\n }\r\n }\r\n return properties;\r\n }\r\n applyPropertiesDefault(defaultProperties, properties) {\r\n this.properties = Object.assign({}, defaultProperties, properties);\r\n }\r\n toggleZoom() {\r\n this.pinchZoom.toggleZoom();\r\n }\r\n isControl() {\r\n if (this.isDisabled) {\r\n return false;\r\n }\r\n if (this.properties['disableZoomControl'] === \"disable\") {\r\n return false;\r\n }\r\n if (this.isTouchScreen && this.properties['disableZoomControl'] === \"auto\") {\r\n return false;\r\n }\r\n return true;\r\n }\r\n detectLimitZoom() {\r\n if (this.pinchZoom) {\r\n this.pinchZoom.detectLimitZoom();\r\n }\r\n }\r\n destroy() {\r\n this.pinchZoom.destroy();\r\n }\r\n getPropertiesValue(propertyName) {\r\n if (this.properties && this.properties[propertyName]) {\r\n return this.properties[propertyName];\r\n }\r\n else {\r\n return this.defaultComponentProperties[propertyName];\r\n }\r\n }\r\n getDefaultComponentProperties() {\r\n return Object.assign(Object.assign({}, defaultProperties), _defaultComponentProperties);\r\n }\r\n}\r\nPinchZoomComponent.decorators = [\r\n { type: Component, args: [{\r\n selector: 'pinch-zoom, [pinch-zoom]',\r\n exportAs: 'pinchZoom',\r\n template: \"
\\n Green is no longer an option but an imperative. No longer just a token of corporate social responsibility, going green drives revenue and increases overall productivity, for the betterment of humanity and the planet we live on.
\\n Talents of tomorrow value wellness and sustainability. Purpose lies at the heart of what they do, and the ethos behind Keppel South Central is one that champions environmental consciousness, where individuals thrive in a space that endorses the very same values they have.\\n
Pinch to zoom
\\n\\n Energy savings equivalent to the amount needed to power about
\\n 1,300 homes in Singapore annually\\n
\\n Water savings that can fill
\\n 10 Olympic-sized swimming pools\\n
Other notable features:
\\nCopyright © 2023 Keppel Land Limited (Co. Reg No 189000001G). All rights reserved.
\\n