{"version":3,"file":"ngx-panzoom.mjs","sources":["../../../projects/ngx-panzoom/src/lib/utils.ts","../../../projects/ngx-panzoom/src/lib/panzoom.component.ts","../../../projects/ngx-panzoom/src/lib/panzoom.component.html","../../../projects/ngx-panzoom/src/lib/panzoom.module.ts","../../../projects/ngx-panzoom/src/public-api.ts","../../../projects/ngx-panzoom/src/ngx-panzoom.ts"],"sourcesContent":["import { Point } from './types';\n\n// from https://stackoverflow.com/questions/54801835/type-safe-predicate-functions-in-typescript\ntype Diff<T, U> = T extends U ? never : T;\n\ntype Predicate<I, O extends I> = (i: I) => i is O;\n\nconst not = <I, O extends I>(p: Predicate<I, O>) =>\n    (i: I): i is (Diff<I, O>) => !p(i);\n\nconst nullableSet = new Set<unknown>([null, undefined]);\n\nexport function assertIsNonNullable<T>(value?: T, error?: Error): asserts value is NonNullable<T> {\n  if (nullableSet.has(value as unknown as any)) {\n    throw error ?? new Error('Value undefined or null');\n  }\n}\n\nexport const isNullable = <I>(i: I | null | undefined): i is null | undefined => nullableSet.has(i);\n\nexport const isUndefined = <I>(i: I | undefined): i is undefined => i === undefined;\n\nexport const isDefined = not(isUndefined);\n\nexport const isNonNullable = not(isNullable);\n\nconst mouseEvents = new Set([\n  'mouse',\n  'mousedown',\n  'mousemove',\n  'mouseup',\n  'mousedown'\n]);\n\nexport function getIsMouseEvent(event: MouseEvent | TouchEvent): event is MouseEvent {\n  return mouseEvents.has(event.type);\n}\n\nconst touchEvents = new Set([\n  'touchmove',\n  'touchend',\n  'touchstart',\n  'touch'\n]);\n\nexport function getIsTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent {\n  return touchEvents.has(event.type);\n}\n\nexport function isTouchDevice(): boolean {\n  return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || (navigator as any)?.msMaxTouchPoints > 0;\n}\n\n/**\n   * Method will check if 'child' node element is a child of\n   * parent node with class 'className'\n   * @param className\n   * @param child\n   */\nexport function isParentElement(className: string, child: EventTarget) {\n  if (child instanceof Element) {\n    let parent = child.parentNode;\n    while (parent !== null) {\n      if (parent instanceof Element && parent.classList && parent.classList.contains(className)) {\n        return true;\n      }\n      parent = parent.parentNode as Element;\n    }\n  }\n  return false;\n}\n\nexport function length(vector2d: Point) {\n  return Math.sqrt(vector2d.x * vector2d.x + vector2d.y * vector2d.y);\n}\n\nexport const preventDefault = (event: Event) => {\n  event.preventDefault();\n}\n","import {\n  Component,\n  OnInit,\n  AfterViewInit,\n  OnDestroy,\n  ElementRef,\n  viewChild,\n  NgZone,\n  model,\n  effect,\n  input,\n  output\n} from '@angular/core';\nimport {\n  getIsMouseEvent,\n  getIsTouchEvent,\n  assertIsNonNullable,\n  isTouchDevice,\n  isParentElement,\n  length,\n  preventDefault\n} from './utils';\nimport {\n  Rect,\n  Point,\n  Offset,\n  ZoomAnimation,\n  Position,\n  EventListenerExtOptions,\n  PanZoomModel,\n  PanZoomConfigSignalOptions,\n  ZoomType\n} from './types';\n\n@Component({\n    selector: 'pan-zoom, ngx-pan-zoom, ngx-panzoom',\n    // we don't want to kill change detection for all elements beneath this, so we don't set OnPush.  Child views can implement OnPush if the developer wants to.  We can get away with this because the 'wheel' event handler runs outside of Angular, therefore it doesnt trigger change detection.\n    templateUrl: './panzoom.component.html',\n    styleUrls: ['./panzoom.component.css'],\n    standalone: true\n})\nexport class PanZoomComponent implements OnInit, AfterViewInit, OnDestroy, PanZoomConfigSignalOptions {\n  constructor (private zone: NgZone) {}\n  \n  private readonly frameElementRef = viewChild.required<ElementRef>('frameElement');\n  private readonly panElementRef = viewChild.required<ElementRef>('panElement');\n  private readonly zoomElementRef = viewChild.required<ElementRef>('zoomElement');\n  private readonly panzoomOverlayRef = viewChild.required<ElementRef>('panzoomOverlay');\n\n  readonly zoomLevels = input(5);\n  readonly neutralZoomLevel = input(2);\n  readonly scalePerZoomLevel = input(2.0);\n  readonly initialZoomLevel = input(this.neutralZoomLevel());\n  readonly friction = input(10.0);\n  readonly haltSpeed = input(100.0);\n  readonly initialPanX = input(0);\n  readonly initialPanY = input(0);\n  readonly initialZoomToFit = input<Rect>();\n  readonly keepInBounds = input(false);\n  readonly keepInBoundsDragPullback = input(0.7);\n  readonly keepInBoundsRestoreForce = input(0.5);\n  readonly panOnClickDrag = input(true);\n  readonly dragMouseButton = input<'left' | 'middle' | 'right'>('left'); // left, middle, right\n  readonly zoomButtonIncrement = input(1.0);\n  readonly zoomOnDoubleClick = input(true);\n  readonly zoomOnMouseWheel = input(true);\n  readonly invertMouseWheel = input(false);\n  readonly zoomStepDuration = input(0.2);\n  readonly zoomToFitZoomLevelFactor = input(0.95);\n  readonly freeMouseWheel = input(true);\n  readonly freeMouseWheelFactor = input(0.08);\n  readonly noDragFromElementClass = input<string | undefined>();\n  readonly acceleratePan = input(true);\n  readonly dynamicContentDimensions = input(false);\n  readonly model = model<PanZoomModel>(undefined!); // this is used for incremental changes to the pan/zoom view during each animation frame.  Setting it will update the pan/zoom coordinates on the next call to updateDOM().  Not used during mouse drag.\n\n  private base: PanZoomModel; // this is what the pan/zoom view is before a zoom animation begins and after it ends.  It also updates with every mouse drag or freeZoom, but the animation is mostly tied to the model.\n  private contentHeight: number;\n  private contentWidth: number;\n  private frameHeight: number;\n  private frameWidth: number;\n  private lastMouseEventTime: number;\n  private previousPosition: Position;\n  private isDragging = false;\n  private panVelocity?: Point;\n  private animationParams?: ZoomAnimation;\n  private animationFrameFunc = window.requestAnimationFrame; // reference to the appropriate getAnimationFrame function for the client browser\n  private lastTick = 0;\n  private isChrome = false;\n  private willChangeNextFrame = true; // used for scaling in Chrome\n  private animationId: number;\n  private isMobile = isTouchDevice();\n  private scale: number;\n  private isFirstSync = true;\n  private lastClickPoint: Point;\n  private zoomLevelIsChanging = false;\n  private dragFinishing = false;\n  private dragMouseButtonNum: number;\n  private maxScale: number; // the highest scale (furthest zoomed in) that we will allow in free zoom mode (calculated)\n  private minScale: number; // the smallest scale (furthest zoomed out) that we will allow in free zoom mode (calculated)\n  private minimumAllowedZoomLevel: number;\n  private resizeObserver: ResizeObserver;\n\n  keepInBoundsWarningDestroy = effect(\n    () => {\n      const keepInBounds = this.keepInBounds();\n      const neutralZoomLevel = this.neutralZoomLevel();\n      if (keepInBounds && neutralZoomLevel) {\n        console.warn(`You have set keepInBounds to true and neutralZoomLevel to ${neutralZoomLevel}. Be aware that the zoom level cannot go below ${neutralZoomLevel}`);\n      }\n    }\n  );\n\n\n  ngOnInit(): void {\n    const {\n      keepInBounds,\n      acceleratePan,\n      freeMouseWheel,\n      zoomLevels,\n      initialZoomLevel,\n      neutralZoomLevel,\n      dragMouseButton,\n      initialZoomToFit,\n      initialPanX,\n      initialPanY\n    } = this;\n    this.base = initialZoomToFit()\n      ? this.calcZoomToFit(initialZoomToFit()!)\n      : {\n        zoomLevel: initialZoomLevel(),\n        pan: {\n          x: initialPanX(),\n          y: initialPanY()\n        }\n      };\n    this.updateModel({\n      zoomLevel: this.base.zoomLevel,\n      isPanning: false, // Only true if panning is actually taking place, not just after mousedown\n      pan: {\n        x: this.base.pan.x,\n        y: this.base.pan.y\n      }\n    });\n    if (freeMouseWheel()) {\n      this.scale = this.getCssScale(initialZoomLevel());\n      const maxZoomLevel = zoomLevels() - 1;\n      this.maxScale = this.getCssScale(maxZoomLevel);\n      this.minScale = this.getCssScale(0);\n    }\n    this.minimumAllowedZoomLevel = 0;\n    if (keepInBounds()) {\n      this.minimumAllowedZoomLevel = neutralZoomLevel();\n      this.minScale = this.getCssScale(neutralZoomLevel());\n    }\n    this.zoomElementRef().nativeElement.style.willChange = 'transform';\n    if (navigator.userAgent.search('Chrome') >= 0) {\n      this.isChrome = true;\n      this.zoomElementRef().nativeElement.style.transform = 'translateZ(0)';\n    }\n    if (acceleratePan()) {\n      this.panElementRef().nativeElement.style.willChange = 'transform';\n      if (navigator.userAgent.search('Chrome') >= 0) {\n        this.isChrome = true;\n        this.panElementRef().nativeElement.style.transform = 'translateZ(0)';\n      }\n    }\n    this.animationTick();\n    this.scale = this.getCssScale(this.base.zoomLevel);\n    this.isFirstSync = false;\n    switch (dragMouseButton()) {\n      case 'left':\n        this.dragMouseButtonNum = 0;\n        break;\n      case 'middle':\n        this.dragMouseButtonNum = 1;\n        this.zone.runOutsideAngular(\n          () => {\n            this.frameElementRef().nativeElement.addEventListener('auxclick', preventDefault);\n          }\n        );\n        break;\n      case 'right':\n        this.zone.runOutsideAngular(\n          () => {\n            document.addEventListener('contextmenu', preventDefault);\n          }\n        );\n        this.dragMouseButtonNum = 2;\n        break;\n      default:\n        this.dragMouseButtonNum = 0; // left\n    }\n  }\n\n\n  ngAfterViewInit(): void {\n    this.detectContentDimensions();\n    const frameStyle = getComputedStyle(this.frameElementRef().nativeElement);\n    this.frameHeight = parseInt(\n      frameStyle.getPropertyValue('height').split('px')[0]\n    );\n    this.frameWidth = parseInt(\n      frameStyle.getPropertyValue('width').split('px')[0]\n    );\n    if (this.dynamicContentDimensions()) {\n      if (window.ResizeObserver) {\n        this.resizeObserver = new window.ResizeObserver(\n          (entries) => this.onContentDimensionsChangeDetected(entries)\n        );\n        this.zone.runOutsideAngular(\n          () => this.resizeObserver.observe(this.zoomElementRef().nativeElement)\n        );\n      }\n      else {\n        console.error('ResizeObserver API is not supported by this browser.  See https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver for info on browser compatibility.');\n      }\n    }\n    this.zone.runOutsideAngular(\n      () => {\n        if (this.isMobile) {\n          this.frameElementRef().nativeElement.addEventListener('touchstart', this.onTouchStart);\n        }\n        else {\n          this.frameElementRef().nativeElement.addEventListener('mousedown', this.onMouseDown);\n          this.frameElementRef().nativeElement.addEventListener('dblclick', this.onDblClick );\n          this.frameElementRef().nativeElement.addEventListener(\n            'wheel',\n            (event: WheelEvent) => this.animationFrameFunc(\n              () => this.onMouseWheel(event)\n            ),\n            { passive: true }\n          );\n        }\n\n      }\n    );\n  }\n\n\n  ngOnDestroy(): void {\n    if (this.isMobile) {\n      this.frameElementRef().nativeElement.removeEventListener('touchstart', this.onTouchStart);\n    }\n    else {\n      this.frameElementRef().nativeElement.removeEventListener('mousedown', this.onMouseDown);\n      this.frameElementRef().nativeElement.removeEventListener(\n        'wheel',\n        (event: WheelEvent) => this.animationFrameFunc(\n          () => this.onMouseWheel(event)\n        ),\n        { passive: true }\n      );\n      this.frameElementRef().nativeElement.removeEventListener('dblclick', this.onDblClick);\n    }\n    if (this.animationId) {\n      window.cancelAnimationFrame(this.animationId);\n    }\n    if (this.resizeObserver) {\n      this.resizeObserver.disconnect();\n    }\n    switch (this.dragMouseButton()) {\n      case 'middle':\n        this.dragMouseButtonNum = 1;\n        this.zone.runOutsideAngular(\n          () => {\n            this.frameElementRef().nativeElement.removeEventListener('auxclick', preventDefault);\n          }\n        );\n        break;\n      case 'right':\n        this.zone.runOutsideAngular(\n          () => {\n            document.removeEventListener('contextmenu', preventDefault);\n          }\n        );\n        this.dragMouseButtonNum = 2;\n        break;\n    }\n  }\n\n\n  // Event Handlers\n  private onMouseWheel = (event: WheelEvent) => {\n    if (!(event && event.pageX && event.pageY)) {\n      return;\n    }\n    let deltaY = event.deltaY;\n    if (this.zoomOnMouseWheel()) {\n      if (this.animationParams) {\n        return; // already zooming\n      }\n      if (!this.invertMouseWheel()) {\n        deltaY = -deltaY;\n      }\n      const frameElementOffset = this.getFrameElementOffset();\n      const clickPoint: Point = {\n        x: event.pageX - frameElementOffset.left,\n        y: event.pageY - frameElementOffset.top\n      };\n      this.lastClickPoint = clickPoint;\n      if (this.freeMouseWheel()) {\n        // free wheel scroll\n        this.freeZoom(clickPoint, deltaY);\n      }\n      else {\n        if (deltaY < 0) {\n          this.zoomInToPoint(clickPoint);\n        }\n        else if (deltaY > 0) {\n          this.zoomOutFromPoint(clickPoint);\n        }\n      }\n    }\n  }\n\n\n  private onMouseDown = (event: MouseEvent | TouchEvent) => {\n    /* Check if clicked location is inside element from which\n       dragging is prevented. */\n    const noDrag = this.noDragFromElementClass() && event.target && isParentElement(this.noDragFromElementClass()!, event.target);\n    if (noDrag) {\n      return;\n    }\n    const isMouseEvent = getIsMouseEvent(event);\n    const isTouchEvent = getIsTouchEvent(event);\n    if ((isMouseEvent && event.button === this.dragMouseButtonNum) || isTouchEvent) {\n      if (isMouseEvent) {\n        event.preventDefault();\n      }\n      this.dragFinishing = false;\n      this.panVelocity = undefined;\n      if (this.panOnClickDrag()) {\n        if (isMouseEvent) {\n          this.previousPosition = {\n            x: event?.pageX,\n            y: event.pageY\n          };\n        }\n        else if (isTouchEvent) {\n          this.previousPosition = {\n            x: event.changedTouches[0].pageX,\n            y: event.changedTouches[0].pageY\n          };\n        }\n        this.lastMouseEventTime = event.timeStamp;\n        this.isDragging = true;\n        this.updateModelProp('isPanning', false);\n        this.zone.runOutsideAngular(\n          () => {\n            if (this.isMobile) {\n              document.addEventListener('touchend', this.onTouchEnd, false);\n              document.addEventListener('touchmove', this.onTouchMove, { passive: true, capture: false })\n            }\n            else {\n              document.addEventListener('mousemove', this.onMouseMove, { passive: true, capture: false });\n              document.addEventListener('mouseup', this.onMouseUp);\n            }\n          }\n        ); // leave this on document\n      }\n      return false;\n    }\n  }\n\n\n  private onTouchStart = (event: TouchEvent) => {\n    if (event.touches.length !== 1) {\n      // multiple touches, get ready for zooming\n      // Calculate x and y distance between touch events\n      const x = event.touches[0].pageX - event.touches[1].pageX;\n      const y = event.touches[0].pageY - event.touches[1].pageY;\n      // Calculate length between touch points with pythagoras\n      // There is no reason to use Math.pow and Math.sqrt as we\n      // only want a relative length and not the exact one.\n      this.previousPosition = {\n        length: x * x + y * y\n      };\n    }\n    this.onMouseDown(event);\n  }\n\n\n  private onMouseMove = (event: MouseEvent | TouchEvent) => {\n    // timestamp - 10587.879999999132 - milliseconds\n    // Called when moving the mouse with the left button down\n    const isMouseEvent = getIsMouseEvent(event);\n    const isTouchEvent = getIsTouchEvent(event);\n    let evWrap: { pageX: number, pageY: number };\n    if (isMouseEvent && event.pageX && event.pageY) {\n      evWrap = event;\n    }\n    else if (isTouchEvent && event.touches[0].pageX && event.touches[0].pageY) {\n      evWrap = { \n        pageX: event.touches[0].pageX,\n        pageY: event.touches[0].pageY\n      }\n    }\n    else {\n      return;\n    }\n    const now = event.timeStamp;\n    const timeSinceLastMouseEvent = (now - this.lastMouseEventTime) / 1000;\n    this.lastMouseEventTime = now;\n    const dragDelta = {\n      // a representation of how far each coordinate has moved since the last time it was moved\n      x: evWrap.pageX - this.previousPosition.x!,\n      y: evWrap.pageY - this.previousPosition.y!\n    };\n    if (this.keepInBounds()) {\n      const topLeftCornerView = this.getViewPosition( { x: 0, y: 0 } );\n      const bottomRightCornerView = this.getViewPosition( { x: this.contentWidth, y: this.contentHeight } );\n      if (topLeftCornerView.x > 0 && dragDelta.x > 0) {\n        dragDelta.x *= Math.min(\n          1,\n          Math.pow(topLeftCornerView.x, -this.keepInBoundsDragPullback())\n        );\n      }\n      if (topLeftCornerView.y > 0 && dragDelta.y > 0) {\n        dragDelta.y *= Math.min(\n          1,\n          Math.pow(topLeftCornerView.y, -this.keepInBoundsDragPullback())\n        );\n      }\n      if (bottomRightCornerView.x < this.contentWidth && dragDelta.x < 0) {\n        dragDelta.x *= Math.min(\n          1,\n          Math.pow(this.contentWidth - bottomRightCornerView.x, -this.keepInBoundsDragPullback())\n        );\n      }\n      if (bottomRightCornerView.y < this.contentHeight && dragDelta.y < 0) {\n        dragDelta.y *= Math.min(\n          1,\n          Math.pow(this.contentHeight - bottomRightCornerView.y, -this.keepInBoundsDragPullback())\n        );\n      }\n    }\n    // now pan the view\n    const delta: Point = {\n      x: dragDelta.x ?? 0,\n      y: dragDelta.y ?? 0\n    };\n    const panX = this.model().pan.x + delta.x;\n    const panY = this.model().pan.y + delta.y\n    this.updateModelPan({\n      x: panX,\n      y: panY\n    });\n    this.syncBaseFromModel();\n    this.animationTick();\n    if (!this.model().isPanning) {\n      // This will improve the performance,\n      // because the browser stops evaluating hits against the elements displayed inside the pan zoom view.\n      // Besides this, mouse events will not be sent to any other elements,\n      // this prevents issues like selecting elements while dragging.\n      this.panzoomOverlayRef().nativeElement.style.display = 'block';\n    }\n    this.updateModelProp('isPanning', true);\n    // set these for the animation slow down once drag stops\n    // panVelocity is a measurement of speed for x and y coordinates, in pixels per mouse move event.  It is a measure of how fast the mouse is moving\n    const panVelocityX = dragDelta.x / timeSinceLastMouseEvent;\n    const panVelocityY = dragDelta.y / timeSinceLastMouseEvent;\n    this.panVelocity = {\n      x: Number.isFinite(panVelocityX)\n        ? panVelocityX\n        : 0,\n      y: Number.isFinite(panVelocityY)\n        ? panVelocityY\n        : 0\n    };\n    this.previousPosition = {\n      x: evWrap.pageX,\n      y: evWrap.pageY\n    };\n  }\n\n\n  private onTouchMove = (event: TouchEvent) => {\n    const { touches } = event;\n    if (touches.length === 1) {\n      // single touch, emulate mouse move\n      this.onMouseMove(event);\n      return;\n    }\n    // multiple touches, zoom in/out\n    // Calculate x and y distance between touch events\n    const x = touches[0].pageX - touches[1].pageX;\n    const y = touches[0].pageY - touches[1].pageY;\n    // Calculate length between touch points with pythagoras\n    // There is no reason to use Math.pow and Math.sqrt as we\n    // only want a relative length and not the exact one.\n    const length = x * x + y * y;\n    // Calculate delta between current position and last position\n    const delta = length - (this.previousPosition.length ?? 0);\n    // Naive hysteresis\n    if (Math.abs(delta) < 100) {\n      return;\n    }\n    // Calculate center between touch points\n    const centerX = touches[1].pageX + x / 2;\n    const centerY = touches[1].pageY + y / 2;\n    // Calculate zoom center\n    const frameElementOffset = this.getFrameElementOffset();\n    const clickPoint = {\n      x: centerX - frameElementOffset.left,\n      y: centerY - frameElementOffset.top\n    };\n    this.lastClickPoint = clickPoint;\n    this.animateChangeZoomLevel(\n      this.base.zoomLevel + delta * 0.0001,\n      clickPoint\n    );\n    // Update length for next move event\n    this.previousPosition = {\n      length: length\n    };\n  }\n\n\n  private onMouseUp = (event: MouseEvent | TouchEvent) => {\n    const isMouseEvent = getIsMouseEvent(event);\n    if (isMouseEvent && event.button !== this.dragMouseButtonNum) {\n      return;\n    }\n    if (isMouseEvent) {\n      event.preventDefault();\n    }\n    const now = event.timeStamp;\n    const timeSinceLastMouseEvent = (now - this.lastMouseEventTime) / 1000;\n    const applyDampening = this.panVelocity && (this.panVelocity.x !== 0 || this.panVelocity.y !== 0);\n    if (applyDampening) {\n      // apply strong initial dampening if the mouse up occured much later than the last mouse move, indicating that the mouse hasn't moved recently\n      // TBD - experiment with this formula\n      const initialMultiplier = Math.max(\n        0,\n        -0.2 + Math.pow(timeSinceLastMouseEvent + 1, -4)\n      );\n      assertIsNonNullable(this.panVelocity);\n      this.panVelocity.x *= initialMultiplier;\n      this.panVelocity.y *= initialMultiplier;\n      this.dragFinishing = true;\n      this.zone.runOutsideAngular(\n        () => {\n          this.animationId = this.animationFrameFunc(this.animationTick)\n        }\n      );\n    }\n    else {\n      this.panVelocity = undefined;\n      this.dragFinishing = false;\n      this.updateModelProp('isPanning', false);\n      this.syncBaseFromModel();\n    }\n    this.isDragging = false;\n    this.zone.runOutsideAngular(\n      () => {\n        if (this.isMobile) {\n          document.removeEventListener('touchend', this.onTouchEnd);\n          document.removeEventListener(\n            'touchmove',\n            this.onTouchMove,\n            { passive: true, capture: false } as EventListenerExtOptions\n          );\n        }\n        else {\n          document.removeEventListener(\n            'mousemove',\n            this.onMouseMove,\n            { passive: true, capture: false } as EventListenerExtOptions\n          );\n          document.removeEventListener(\n            'mouseup',\n            this.onMouseUp,\n            { passive: true } as EventListenerExtOptions\n          );\n        }\n      }\n    );\n    // Set the overlay to non-blocking again:\n    this.panzoomOverlayRef().nativeElement.style.display = 'none';\n  }\n\n\n  private onTouchEnd = (event: TouchEvent) => {\n    this.onMouseUp(event);\n  }\n\n\n  private onDblClick = (event: MouseEvent) => {\n    event.preventDefault();\n    if (!this.zoomOnDoubleClick()) {\n      return;\n    }\n    const frameElementOffset = this.getFrameElementOffset();\n    const clickPoint: Point = {\n      x: event.pageX - frameElementOffset.left,\n      y: event.pageY - frameElementOffset.top\n    };\n    this.lastClickPoint = clickPoint;\n    this.zoomInToPoint(clickPoint);\n  }\n\n\n  // Apply Animations\n  private animationTick = (timestamp = performance.now()) => {\n    // timestamp looks like 76916.963.  The unit is milliseconds and should be accurate to 5 µs (microseconds)\n    let deltaTime = 0;\n    if (this.lastTick !== 0) {\n      deltaTime = (timestamp - this.lastTick); // orig - milliseconds since the last animationTick\n    }\n    this.lastTick = timestamp;\n    if (this.animationParams) {\n      // when we're running an animation (but not waiting for a released drag to halt)\n      this.animationParams.progress += Math.abs(deltaTime / this.animationParams.duration);\n      if (this.animationParams.progress >= 1.0) {\n        // Only when the animation has finished, sync the base to the model.\n        this.animationParams.progress = 1.0;\n        this.updateDOM();\n        this.animationParams = undefined;\n      }\n    }\n    if (this.panVelocity && this.dragFinishing) {\n      // This is when we've panned and released the mouse button and the view is \"free-floating\" until it slows to a halt.  Don't let the while loop fool you - this only applies it for the current frame.\n      // Prevent overshooting if delta time is large for some reason. We apply the simple solution of slicing delta time into smaller pieces and applying each one\n      if (deltaTime > 0) {\n        deltaTime = deltaTime / 1000;\n      }\n      while (deltaTime > 0) {\n        const dTime = Math.min(.02, deltaTime);\n        deltaTime = deltaTime - dTime;\n        const panX = this.model().pan.x + this.panVelocity.x * dTime;\n        const panY = this.model().pan.y + this.panVelocity.y * dTime;\n        this.updateModelPan({\n          x: panX,\n          y: panY\n        });\n        this.panVelocity.x = this.panVelocity.x * (1 - this.friction() * dTime);\n        this.panVelocity.y = this.panVelocity.y * (1 - this.friction() * dTime);\n        const speed = length(this.panVelocity);\n        if (speed <= this.haltSpeed()) {\n          this.panVelocity = undefined;\n          this.dragFinishing = false;\n          break;\n        }\n      }\n    }\n    if (this.keepInBounds() || this.dragFinishing) {\n      // Checks that keepInBounds is set and that the mouse button isn't pressed, and if so, it stops the contents from going out of view\n      const topLeftCornerView = this.getViewPosition({ x: 0, y: 0 });\n      const bottomRightCornerView = this.getViewPosition({ x: this.contentWidth, y: this.contentHeight });\n      if (topLeftCornerView.x > 0) {\n        this.base.pan.x -= this.keepInBoundsRestoreForce() * topLeftCornerView.x;\n      }\n      if (topLeftCornerView.y > 0) {\n        this.base.pan.y -= this.keepInBoundsRestoreForce() * topLeftCornerView.y;\n      }\n      if (bottomRightCornerView.x < this.contentWidth) {\n        this.base.pan.x -= this.keepInBoundsRestoreForce() * (bottomRightCornerView.x - this.contentWidth);\n      }\n      if (bottomRightCornerView.y < this.contentHeight) {\n        this.base.pan.y -= this.keepInBoundsRestoreForce() * (bottomRightCornerView.y - this.contentHeight);\n      }\n    }\n    this.updateDOM();\n    const animationActive = this.animationParams || (this.panVelocity && this.dragFinishing);\n    if (animationActive) {\n      // Run the next frame\n      const toggleWillChange = this.isChrome && this.zoomLevelIsChanging;\n      if (toggleWillChange) {\n        // run will-change toggle hack on Chrome to trigger re-rasterization\n        // see https://developers.google.com/web/updates/2016/09/re-rastering-composite\n        this.zoomElementRef().nativeElement.style.willChange = this.willChangeNextFrame\n          ? 'auto'\n          : 'transform';\n        this.willChangeNextFrame = !this.willChangeNextFrame;\n      }\n      this.animationFrameFunc(this.animationTick); // Call the next animation frame\n      return;\n    }\n    else if (this.panVelocity && !this.dragFinishing) {\n      // we're just mouse-panning the frame.  We don't need another tick\n      return;\n    }\n    // Animation has ended\n    if (this.model().isPanning) {\n      this.updateModelProp('isPanning', false);\n    } \n    this.syncBaseFromModel();\n    this.scale = this.getCssScale(this.base.zoomLevel);\n    this.willChangeNextFrame = true;\n    this.zoomElementRef().nativeElement.style.willChange = 'transform';\n    this.zoomLevelIsChanging = false;\n    this.lastTick = 0;\n  }\n\n\n  private updateDOM() {\n    // Called by ngAfterViewInit() and animationTick()\n    // This function does not get called by freeZoom(), which operates independently of animationTick() and updateDOM().\n    if (this.animationParams) {\n      // we're running an animation sequence (but not freeZooming or panning with onMouseMove() )\n      this.updateModelProp(\n        'zoomLevel',\n        this.base.zoomLevel + this.animationParams.deltaZoomLevel * this.animationParams.progress // calculate how far we need to zoom in or out for the current animationTick\n      );\n      const deltaTranslation = this.animationParams.panStepFunc(this.model().zoomLevel); // calculate how far to pan the view to based on our translated coordinates\n      // sync the model pan coordinates to our translated pan coordinates\n      // we do this by adding how far we want to move in each direction to our our existing base pan coordinates (where we started)\n      let panX = this.base.pan.x + deltaTranslation.x;\n      let panY = this.base.pan.y + deltaTranslation.y;\n      if (this.keepInBounds()) {\n        const topLeftCornerView = this.getViewPosition({ x: 0, y: 0 });\n        const bottomRightCornerView = this.getViewPosition({ x: this.contentWidth, y: this.contentHeight });\n        if (topLeftCornerView.x > 0) {\n          panX = 0;\n        }\n        if (topLeftCornerView.y > 0) {\n          panY = 0;\n        }\n        if (bottomRightCornerView.x < this.contentWidth) {\n          panX -= (bottomRightCornerView.x - this.contentWidth);\n        }\n        if (bottomRightCornerView.y < this.contentHeight) {\n          panY -= (bottomRightCornerView.y - this.contentHeight);\n        }\n      }\n      this.updateModelPan({\n        x: panX,\n        y: panY\n      });\n    }\n    if (this.animationParams || this.isFirstSync) {\n      // Apply scaling\n      const scale = this.getCssScale(this.model().zoomLevel);\n      const scaleString = `scale(${scale})`;\n      const zoomStyle = `transform-origin: 0 0; transform: ${scaleString};`;\n      this.zoomElementRef().nativeElement.setAttribute('style', zoomStyle);\n    }\n    // Apply pan animation\n    const translate3d = `translate3d(${this.model().pan.x}px, ${this.model().pan.y}px, 0)`;\n    this.panElementRef().nativeElement.style.transform = translate3d;\n  }\n\n\n  private freeZoom(clickPoint: Point, wheelDelta: number): void {\n    if (this.isDragging) {\n      // don't allow zooming if the mouse is down\n      return;\n    }\n    // now handle interruption of an in-progress animation\n    if (this.animationParams) {\n      this.animationParams = undefined; // cancel an existing animation\n    }\n    if (this.panVelocity) {\n      this.dragFinishing = false;\n      this.panVelocity = undefined;\n    }\n    const currentPan: Point = {\n      // the current model coordinates\n      x: this.model().pan.x,\n      y: this.model().pan.y\n    };\n    const currentScale = this.scale; // get the current CSS scale (scale0)\n    let newScale = this.scale + (wheelDelta * this.freeMouseWheelFactor() * this.scale);\n    // takes either the minimum scale (furthest allowable zoomed out) or the calculated current scale, whichever is greater, unless calculated current scale exceeds maxScale (furthest allowable zoomed in), in which case maxScale is used\n    newScale = Math.max(\n      this.minScale,\n      Math.min(\n        this.maxScale,\n        newScale\n      )\n    );\n    this.scale = newScale;\n    const targetPoint: Point = {\n      // The target point to zoom to.  It must stay the same as the untranslated point\n      x: clickPoint.x - (newScale / currentScale) * (clickPoint.x - currentPan.x),\n      y: clickPoint.y - (newScale / currentScale) * (clickPoint.y - currentPan.y)\n    };\n    // Apply Pan & Scale\n    const translate3d = `translate3d(${targetPoint.x}px, ${targetPoint.y}px, 0)`;\n    this.panElementRef().nativeElement.style.transform = translate3d;\n    const scaleString = `scale(${this.scale})`;\n    let zoomStyle = `transform-origin: 0 0; transform: ${scaleString};`;\n    if (this.isChrome) {\n      if (this.willChangeNextFrame) {\n        zoomStyle += ` will-change: auto;`;\n      }\n      else {\n        zoomStyle += ` will-change: transform;`;\n      }\n      this.willChangeNextFrame = !this.willChangeNextFrame;\n    }\n    // apply zoom css\n    this.zoomElementRef().nativeElement.setAttribute('style', zoomStyle);\n    this.updateModelProp('zoomLevel', this.getZoomLevel(this.scale));\n    this.updateModelPan({\n      x: targetPoint.x,\n      y: targetPoint.y\n    });\n    this.syncBaseFromModel();\n  }\n\n\n  // Helper methods\n  private updateModel(model: PanZoomModel) {\n    this.zone.run(\n      () => {\n        this.model.update(\n          () => ({...model})\n        );\n      }\n    );\n  }\n  \n  \n  private updateModelProp(key: keyof PanZoomModel, value: PanZoomModel[typeof key]) {\n    this.zone.run(\n      () => {\n        this.model.update(\n          (model) => ({\n            ...model,\n            [key]: value\n          })\n        );\n      }\n    );\n  }\n  \n  \n  private updateModelPan({ x, y }: { x?: number, y?: number }) {\n    this.zone.run(\n      () => {\n        this.model.update(\n          (model) => ({\n            ...model,\n            pan: {\n              x: x ?? model.pan.x,\n              y: y ?? model.pan.y,\n            }\n          })\n        );\n      }\n    );\n  }\n\n\n  private syncBaseFromModel() {\n    this.base = {\n      ...this.base,\n      pan: {\n        ...this.base.pan,\n        x: this.model().pan.x,\n        y: this.model().pan.y,\n      },\n      zoomLevel: this.model().zoomLevel\n    };\n  }\n\n\n  private getCentrePoint(): Point {\n    return {\n      x: this.frameElementRef().nativeElement.offsetWidth / 2,\n      y: this.frameElementRef().nativeElement.offsetHeight / 2\n    };\n  }\n\n\n  private getCssScale(zoomLevel: number): number {\n    return Math.pow(this.scalePerZoomLevel(), zoomLevel - this.neutralZoomLevel());\n  }\n\n\n  private getZoomLevel(cssScale: number) {\n    return Math.log10(cssScale) / Math.log10(this.scalePerZoomLevel()) + this.neutralZoomLevel();\n  }\n\n\n  private calcZoomToFit(rect: Rect): PanZoomModel {\n    // let (W, H) denote the size of the viewport\n    // let (w, h) denote the size of the rectangle to zoom to\n    // then we must CSS scale by the min of W/w and H/h in order to just fit the rectangle\n    // returns the target left and top coordinates for the panElement and target zoomLevel\n    const viewportWidth = this.frameElementRef().nativeElement.offsetWidth;\n    const viewportHeight = this.frameElementRef().nativeElement.offsetHeight;\n    const targetWidth = rect.width;\n    const targetHeight = rect.height;\n    const cssScaleExact = Math.min( viewportWidth / targetWidth, viewportHeight / targetHeight );\n    const zoomLevelExact = this.getZoomLevel(cssScaleExact);\n    const zoomLevel = zoomLevelExact * this.zoomToFitZoomLevelFactor();\n    const cssScale = this.getCssScale(zoomLevel);\n    return {\n        zoomLevel,\n        pan: {\n            x: -rect.x * cssScale + (viewportWidth - targetWidth * cssScale) / 2,\n            y: -rect.y * cssScale + (viewportHeight - targetHeight * cssScale) / 2\n        }\n    };\n  }\n\n\n  private zoomToFitModel(target: PanZoomModel, duration?: number) {\n    // target.pan.x is the panElement left style property\n    // target.pan.y is the panElement top style property\n    this.updateModelProp('isPanning', true);\n    this.animateToTarget(target, duration);\n  }\n\n\n  zoomIn(zoomType: ZoomType = 'lastPoint') {\n    if (zoomType === 'lastPoint') {\n      this.animateChangeZoomLevel(\n        this.base.zoomLevel + this.zoomButtonIncrement(),\n        this.lastClickPoint\n      );\n    }\n    else if (zoomType === 'viewCenter') {\n      this.animateChangeZoomLevel(\n        this.base.zoomLevel + this.zoomButtonIncrement(),\n        this.getCentrePoint()\n      );\n    }\n  }\n\n\n  zoomOut(zoomType: ZoomType = 'lastPoint') {\n    if (zoomType === 'lastPoint') {\n      this.animateChangeZoomLevel(\n        this.base.zoomLevel - this.zoomButtonIncrement(),\n        this.lastClickPoint\n      );\n    }\n    else if (zoomType === 'viewCenter') {\n      this.animateChangeZoomLevel(\n        this.base.zoomLevel - this.zoomButtonIncrement(),\n        this.getCentrePoint()\n      );\n    }\n  }\n\n\n  private startAnimation() {\n    this.lastTick = performance.now();\n    this.zone.runOutsideAngular(\n      () => {\n        this.animationId = this.animationFrameFunc(this.animationTick);\n      }\n    );\n  }\n\n\n  private getFrameElementOffset(): Offset {\n    const rect = this.frameElementRef().nativeElement.getBoundingClientRect();\n    return {\n      top: rect.top + window.scrollY,\n      left: rect.left + window.scrollX\n    };\n  }\n\n\n  private onContentDimensionsChangeDetected(entries: ResizeObserverEntry[]) {\n    // callback for ResizeObserver\n    this.contentHeight = entries[0].contentRect.height;\n    this.contentWidth = entries[0].contentRect.width;\n  }\n\n\n  // Public API\n  changeZoomLevel(level: number, clickPoint: Point) {\n    this.animateChangeZoomLevel(level, clickPoint);\n  }\n\n\n  getViewPosition(modelPosition: Point): Point {\n    // p' = p * s + t\n    // viewPosition = modelPosition * scale + basePan\n    let scale: number, translation: Point;\n    if (this.animationParams) {\n      scale = this.getCssScale(this.base.zoomLevel + this.animationParams.deltaZoomLevel * this.animationParams.progress);\n      let deltaTranslation = this.animationParams.panStepFunc(this.model().zoomLevel);\n      translation = {\n        x: this.base.pan.x + deltaTranslation.x,\n        y: this.base.pan.y + deltaTranslation.y\n      };\n    }\n    else {\n      scale = this.getCssScale(this.base.zoomLevel);\n      translation = this.base.pan;\n    }\n    return {\n      x: modelPosition.x * scale + translation.x,\n      y: modelPosition.y * scale + translation.y\n    };\n  }\n\n\n  getModelPosition(viewPosition: Point): Point {\n    // p = (1/s)(p' - t)\n    const pmark = viewPosition;\n    const s = this.getCssScale(this.base.zoomLevel);\n    const t = this.base.pan;\n    return {\n      x: (1 / s) * (pmark.x - t.x),\n      y: (1 / s) * (pmark.y - t.y)\n    };\n  }\n\n\n  resetView() {\n    if (this.initialZoomToFit()) {\n      this.zoomToFit(this.initialZoomToFit()!);\n    }\n    else if (this.initialPanX() !== undefined && this.initialPanY() !== undefined && this.initialZoomLevel() !== undefined) {\n      this.zoomToFitModel({\n        zoomLevel: this.initialZoomLevel(),\n        pan: {\n          x: this.initialPanX(),\n          y: this.initialPanY()\n        }\n      });\n    }\n    else {\n      console.error('PanZoomComponent: resetView() could not reset view as some vars were not set.  The culprits are either config.initialZoomLevel, config.initialPanX, or config.initialPanY.  Or just set panzoomConfig.initialZoomToFit', { initialZoomLevel: this.initialZoomLevel(), initialPanX: this.initialPanX(), initialPanY: this.initialPanY()});\n    }\n  }\n\n\n  zoomToFit(rectangle: Rect, duration?: number) {\n    // when a user clicks a zoom to fit button\n    // example rectangle: { \"x\": 0, \"y\": 100, \"width\": 100, \"height\": 100 }\n    const target: PanZoomModel = this.calcZoomToFit(rectangle);\n    // target.pan.x is the panElement left style property\n    // target.pan.y is the panElement top style property\n    this.updateModelProp('isPanning', true);\n    this.animateToTarget(target, duration);\n  }\n\n\n  private zoomInToPoint(clickPoint: Point) {\n    this.animateChangeZoomLevel(\n      this.base.zoomLevel + this.zoomButtonIncrement(), clickPoint\n    );\n  }\n\n\n  private zoomOutFromPoint(clickPoint: Point) {\n    this.animateChangeZoomLevel(\n      this.base.zoomLevel - this.zoomButtonIncrement(), clickPoint\n    );\n  }\n\n\n  panToPoint(point: Point, duration?: number) {\n    // API call to animate the view so that the centre point of the view is at the\n    // point parameter coordinates, relative to the original, unzoomed\n    // content width and height\n    // example point: { \"x\": 0, \"y\": 0 } // makes the top-left corner of the content\n    // the centre of the view\n    const target: PanZoomModel = {\n      pan: {\n        x: (this.frameWidth / 2) - point.x * this.scale,\n        y: (this.frameHeight / 2) - point.y * this.scale\n      },\n      zoomLevel: this.base.zoomLevel\n    };\n    this.updateModelProp('isPanning', true);\n    this.animateToTarget(target, duration);\n  }\n\n\n  panToPointCurrentScale(point: Point, duration?: number) {\n    // API call to animate the view so that the centre point of the view is at the\n    // point parameter coordinates, relative to the original, unzoomed\n    // content width and height\n    // example point: { \"x\": 0, \"y\": 0 } // makes the top-left corner of the content\n    // the centre of the view\n    const target: PanZoomModel = {\n      pan: {\n        x: (this.frameWidth / 2) - point.x,\n        y: (this.frameHeight / 2) - point.y\n      },\n      zoomLevel: this.base.zoomLevel\n    };\n    this.updateModelProp('isPanning', true);\n    this.animateToTarget(target, duration);\n  }\n\n\n  panDelta(delta: Point, duration?: number) {\n    // API call to pan the view left, right, up, or down, based on a number of pixels\n    // of the original, unzoomed content.\n    // Positive is right and down\n    // Negative is left and up\n    // example point: { \"x\": 100, \"y\": -50 } // moves the view right 50px and up 50px\n    const target: PanZoomModel = {\n      pan: {\n        x: this.base.pan.x - this.scale * delta.x,\n        y: this.base.pan.y - this.scale * delta.y\n      },\n      zoomLevel: this.base.zoomLevel\n    };\n    this.updateModelProp('isPanning', true);\n    this.animateToTarget(target, duration);\n  }\n\n\n  panDeltaAbsolute(delta: Point, duration?: number) {\n    // API call to pan the view left, right, up, or down, based on a number of pixels\n    // This method doesn't adjust for scale.  I'm not sure why you'd want this\n    // but have it here just in case someone needs it\n    // Positive is right and down\n    // Negative is left and up\n    // example point: { \"x\": 100, \"y\": -50 } // moves the view right 50px and up 50px\n    const target: PanZoomModel = {\n      pan: {\n        x: this.base.pan.x - delta.x,\n        y: this.base.pan.y - delta.y\n      },\n      zoomLevel: this.base.zoomLevel\n    };\n    this.updateModelProp('isPanning', true);\n    this.animateToTarget(target, duration);\n  }\n\n\n  panDeltaPercent(deltaPercent: Point, duration?: number) {\n    // API call to pan the view up, down, left, or right, based on a percentage\n    // of the original, unzoomed content width and height\n    // example point: { \"x\": 10, \"y\": -20 }\n    let deltaX = 0;\n    let deltaY = 0;\n    if (deltaPercent.x !== 0) {\n      deltaX = this.contentWidth * ( deltaPercent.x / 100 ) * this.scale;\n    }\n    if (deltaPercent.y !== 0) {\n      deltaY = this.contentHeight * ( deltaPercent.y / 100 ) * this.scale;\n    }\n    const target: PanZoomModel = {\n      pan: {\n        x: this.base.pan.x - deltaX,\n        y: this.base.pan.y - deltaY\n      },\n      zoomLevel: this.base.zoomLevel\n    };\n    // target.pan.x is the panElement left style property\n    // target.pan.y is the panElement top style property\n    this.updateModelProp('isPanning', true);\n    this.animateToTarget(target, duration);\n  }\n\n\n  centerContent(duration?: number) {\n    this.panToPoint( {\n      x: this.contentWidth / 2,\n      y: this.contentHeight / 2\n    },\n    duration);\n  }\n\n\n  centerX(duration?: number) {\n    const target: PanZoomModel = {\n      pan: {\n        x: (this.frameWidth / 2) - (this.contentWidth / 2) * this.scale,\n        y: this.base.pan.y\n      },\n      zoomLevel: this.base.zoomLevel\n    };\n    this.updateModelProp('isPanning', true);\n    this.animateToTarget(target, duration);\n  }\n\n\n  centerY(duration?: number) {\n    const target: PanZoomModel = {\n      pan: {\n        x: this.base.pan.x,\n        y: (this.frameHeight / 2) - (this.contentHeight / 2) * this.scale\n      },\n      zoomLevel: this.base.zoomLevel\n    };\n    this.updateModelProp('isPanning', true);\n    this.animateToTarget(target, duration);\n  }\n\n\n  centerTopLeft(duration?: number) {\n    this.panToPoint(\n      {\n        x: 0,\n        y: 0\n      },\n      duration\n    );\n  }\n\n\n  centerBottomLeft(duration?: number) {\n    this.panToPoint(\n      {\n        x: 0,\n        y: this.contentHeight\n      },\n      duration\n    );\n  }\n\n\n  centerTopRight(duration?: number) {\n    this.panToPoint(\n      {\n        x: this.contentWidth,\n        y: 0\n      },\n      duration\n    );\n  }\n\n\n  centerBottomRight(duration?: number) {\n    this.panToPoint(\n      {\n        x: this.contentWidth,\n        y: this.contentHeight\n      },\n      duration\n    );\n  }\n\n\n  updateContentDimensions(width?: number, height?: number) {\n    if (height !== undefined) {\n      this.contentHeight = height;\n    }\n    if (width !== undefined) {\n      this.contentWidth = width;\n    }\n  }\n\n\n  detectContentDimensions() {\n    const zoomFrameStyle  = getComputedStyle(this.zoomElementRef().nativeElement);\n    this.contentHeight = parseInt(\n      zoomFrameStyle.getPropertyValue('height').split('px')[0]\n    );\n    this.contentWidth = parseInt(\n      zoomFrameStyle.getPropertyValue('width').split('px')[0]\n    );\n  }\n\n\n  // Animation builders\n  private animateToTarget(targetModel: PanZoomModel, duration?: number) {\n    // what this function really does is take a target model, and then sets\n    // this.animationParams with the parameters for the whole animation,\n    // namely the delta zoomLevel\n    // it is the responsibility of the caller to kick off the animation with a call to animationFrameFunc()\n    if (this.animationParams) {\n      // make the user wait for existing animation to finish before clicking\n      return;\n    }\n    this.zoomLevelIsChanging = false;\n    if (this.base.zoomLevel !== targetModel.zoomLevel) {\n      this.zoomLevelIsChanging = true;\n    }\n    const deltaZoomLevel = targetModel.zoomLevel - this.base.zoomLevel; // deltaZoomLevel is the number of zoom levels we are changing here\n    const oldBase: Point = {\n      // the current base coordinates\n      x: this.base.pan.x,\n      y: this.base.pan.y\n    };\n    this.updateModelPan({\n      x: this.base.pan.x,\n      y: this.base.pan.y\n    });\n    const panStepFunc = (_: number) => {\n      // this function gets called during every animation tick in updateDOM(), to calculate where to move the model pan coordinates to (i.e. the translation) for that tick, zoomLevel is ignored within animateToTarget()\n      const targetPoint: Point = {\n        // The target point to zoom to for the current animation frame.  It must stay the same as the untranslated point\n        x: (oldBase.x - targetModel.pan.x) * this.animationParams!.progress,\n        y: (oldBase.y - targetModel.pan.y) * this.animationParams!.progress\n      };\n      return {\n        x: -targetPoint.x,\n        y: -targetPoint.y\n      };\n    };\n    // now set the parameters of our new animation\n    duration = (duration ?? this.zoomStepDuration()) * 1000;\n    this.animationParams = {\n      deltaZoomLevel, // how many zooom levels to zoom in or out\n      panStepFunc, // a function which runs on every animation tick, which calcs how much to pan the view on every frame\n      duration, // how long the animation should take\n      progress: 0.0\n    };\n    this.startAnimation();\n  }\n\n\n  animateChangeZoomLevel(newZoomLevel: number, clickPoint: Point) {\n    if (this.animationParams) {\n      // let running animation finish\n      return;\n    }\n    this.zoomLevelIsChanging = true;\n    // keep zoom level in bounds\n    newZoomLevel = Math.max(\n      this.minimumAllowedZoomLevel,\n      newZoomLevel\n    );\n    newZoomLevel = Math.min(\n      this.zoomLevels() - 1,\n      newZoomLevel\n    );\n    const deltaZoomLevel = newZoomLevel - this.base.zoomLevel; // deltaZoomLevel is the number of zoom levels we are changing here\n    if (!deltaZoomLevel) {\n      // a deltaZoomLevel of zero means that we aren't changing zoom, because we're either zoomed all the way in or all the way out\n      return;\n    }\n    //\n    // Let p be the vector to the clicked point in view coords and let p' be the same point in model coords. Let s be a scale factor\n    // and let t be a translation vector. Let the transformation be defined as:\n    //\n    //  p' = p * s + t\n    //\n    // And conversely:\n    //\n    //  p = (1/s)(p' - t)\n    //\n    // Now use subscription 0 to denote the value before transform and zoom and let 1 denote the value after transform. Scale\n    // changes from s0 to s1. Translation changes from t0 to t1. But keep p and p' fixed so that the view coordinate p' still\n    // corresponds to the model coordinate p. This can be expressed as an equation relying upon solely upon p', s0, s1, t0, and t1:\n    //\n    //  (1/s0)(p - t0) = (1/s1)(p - t1)\n    //\n    // Every variable but t1 is known, thus it is easily isolated to:\n    //\n    //  t1 = p' - (s1/s0)*(p' - t0)\n    //\n    const currentPan: Point = {\n      // t0 - the current base coordinates\n      x: this.base.pan.x,\n      y: this.base.pan.y\n    };\n    const currentScale = this.scale; // s0 - get the current CSS scale (scale0)\n    const destPoint = clickPoint || this.getCentrePoint(); // pmark - the point we are aiming to zoom to (either the click point or the centre of the page)\n    const panStepFunc = (zoomLevel: number) => {\n      // this function gets called during every animation tick, to calculate where to move the model pan coordinates to (i.e. the translation) for that tick, where zoomLevel is calculated from the current zoomLevel + the target zoomLevel * the progress of the current animation\n      const targetScale = this.getCssScale(zoomLevel); // s1 - the scale to translate to for the current animation tick\n      const targetPoint: Point = {\n        // t1 - The target point to pan to.  It must stay the same as the untranslated point\n        x: destPoint.x - (targetScale / currentScale) * (destPoint.x - currentPan.x),\n        y: destPoint.y - (targetScale / currentScale) * (destPoint.y - currentPan.y)\n      };\n      return {\n        // now return the difference between our initial click point and our translated (zoomed) click point\n        // these are not absolute coordinates - just how far to move them\n        x: targetPoint.x - currentPan.x,\n        y: targetPoint.y - currentPan.y\n      };\n    };\n    // now set the parameters of our new animation\n    const duration = this.zoomStepDuration() * 1000;\n    this.animationParams = {\n      deltaZoomLevel, // the destination zoom level for this zoom operation (when the animation is completed)\n      panStepFunc,\n      duration, // how long the animation should take\n      progress: 0.0\n    };\n    this.startAnimation();\n  }\n}\n","<div\n  #frameElement\n  class=\"pan-zoom-frame\"\n>\n    <div\n      #panElement\n      class=\"pan-element\"\n    >\n        <div\n          #zoomElement\n          class=\"zoom-element\"\n        >\n          <ng-content></ng-content>\n        </div>\n    </div>\n</div>\n<div\n  #panzoomOverlay\n  class=\"pan-zoom-overlay\">\n</div>","import { NgModule } from '@angular/core';\nimport { PanZoomComponent } from './panzoom.component';\n\n@NgModule({\n    imports: [PanZoomComponent],\n    providers: [],\n    exports: [PanZoomComponent]\n})\n\nexport class NgxPanZoomModule {}\n","/*\n * Public API Surface of ngx-panzoom\n */\nexport * from './lib/panzoom.module';\nexport * from './lib/panzoom.component';\nexport { PanZoomModel, PanZoomConfigOptions, Rect } from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAOA,MAAM,GAAG,GAAG,CAAiB,CAAkB,KAC3C,CAAC,CAAI,KAAwB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAU,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;AAExC,SAAA,mBAAmB,CAAI,KAAS,EAAE,KAAa,EAAA;AAC7D,IAAA,IAAI,WAAW,CAAC,GAAG,CAAC,KAAuB,CAAC,EAAE;AAC5C,QAAA,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAA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