{"version":3,"file":"index.module.mjs","sources":["../../../node_modules/react-easy-crop/index.module.js"],"sourcesContent":["import { __assign, __extends } from 'tslib';\nimport React from 'react';\nimport normalizeWheel from 'normalize-wheel';\n\n/**\r\n * Compute the dimension of the crop area based on media size,\r\n * aspect ratio and optionally rotation\r\n */\n\nfunction getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) {\n  if (rotation === void 0) {\n    rotation = 0;\n  }\n\n  var _a = rotateSize(mediaWidth, mediaHeight, rotation),\n      width = _a.width,\n      height = _a.height;\n\n  var fittingWidth = Math.min(width, containerWidth);\n  var fittingHeight = Math.min(height, containerHeight);\n\n  if (fittingWidth > fittingHeight * aspect) {\n    return {\n      width: fittingHeight * aspect,\n      height: fittingHeight\n    };\n  }\n\n  return {\n    width: fittingWidth,\n    height: fittingWidth / aspect\n  };\n}\n/**\r\n * Compute media zoom.\r\n * We fit the media into the container with \"max-width: 100%; max-height: 100%;\"\r\n */\n\nfunction getMediaZoom(mediaSize) {\n  // Take the axis with more pixels to improve accuracy\n  return mediaSize.width > mediaSize.height ? mediaSize.width / mediaSize.naturalWidth : mediaSize.height / mediaSize.naturalHeight;\n}\n/**\r\n * Ensure a new media position stays in the crop area.\r\n */\n\nfunction restrictPosition(position, mediaSize, cropSize, zoom, rotation) {\n  if (rotation === void 0) {\n    rotation = 0;\n  }\n\n  var _a = rotateSize(mediaSize.width, mediaSize.height, rotation),\n      width = _a.width,\n      height = _a.height;\n\n  return {\n    x: restrictPositionCoord(position.x, width, cropSize.width, zoom),\n    y: restrictPositionCoord(position.y, height, cropSize.height, zoom)\n  };\n}\n\nfunction restrictPositionCoord(position, mediaSize, cropSize, zoom) {\n  var maxPosition = mediaSize * zoom / 2 - cropSize / 2;\n  return clamp(position, -maxPosition, maxPosition);\n}\n\nfunction getDistanceBetweenPoints(pointA, pointB) {\n  return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2));\n}\nfunction getRotationBetweenPoints(pointA, pointB) {\n  return Math.atan2(pointB.y - pointA.y, pointB.x - pointA.x) * 180 / Math.PI;\n}\n/**\r\n * Compute the output cropped area of the media in percentages and pixels.\r\n * x/y are the top-left coordinates on the src media\r\n */\n\nfunction computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, restrictPosition) {\n  if (rotation === void 0) {\n    rotation = 0;\n  }\n\n  if (restrictPosition === void 0) {\n    restrictPosition = true;\n  } // if the media is rotated by the user, we cannot limit the position anymore\n  // as it might need to be negative.\n\n\n  var limitAreaFn = restrictPosition ? limitArea : noOp;\n  var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation);\n  var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation); // calculate the crop area in percentages\n  // in the rotated space\n\n  var croppedAreaPercentages = {\n    x: limitAreaFn(100, ((mediaBBoxSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaBBoxSize.width * 100),\n    y: limitAreaFn(100, ((mediaBBoxSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) / mediaBBoxSize.height * 100),\n    width: limitAreaFn(100, cropSize.width / mediaBBoxSize.width * 100 / zoom),\n    height: limitAreaFn(100, cropSize.height / mediaBBoxSize.height * 100 / zoom)\n  }; // we compute the pixels size naively\n\n  var widthInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.width, croppedAreaPercentages.width * mediaNaturalBBoxSize.width / 100));\n  var heightInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.height, croppedAreaPercentages.height * mediaNaturalBBoxSize.height / 100));\n  var isImgWiderThanHigh = mediaNaturalBBoxSize.width >= mediaNaturalBBoxSize.height * aspect; // then we ensure the width and height exactly match the aspect (to avoid rounding approximations)\n  // if the media is wider than high, when zoom is 0, the crop height will be equals to image height\n  // thus we want to compute the width from the height and aspect for accuracy.\n  // Otherwise, we compute the height from width and aspect.\n\n  var sizePixels = isImgWiderThanHigh ? {\n    width: Math.round(heightInPixels * aspect),\n    height: heightInPixels\n  } : {\n    width: widthInPixels,\n    height: Math.round(widthInPixels / aspect)\n  };\n\n  var croppedAreaPixels = __assign(__assign({}, sizePixels), {\n    x: Math.round(limitAreaFn(mediaNaturalBBoxSize.width - sizePixels.width, croppedAreaPercentages.x * mediaNaturalBBoxSize.width / 100)),\n    y: Math.round(limitAreaFn(mediaNaturalBBoxSize.height - sizePixels.height, croppedAreaPercentages.y * mediaNaturalBBoxSize.height / 100))\n  });\n\n  return {\n    croppedAreaPercentages: croppedAreaPercentages,\n    croppedAreaPixels: croppedAreaPixels\n  };\n}\n/**\r\n * Ensure the returned value is between 0 and max\r\n */\n\nfunction limitArea(max, value) {\n  return Math.min(max, Math.max(0, value));\n}\n\nfunction noOp(_max, value) {\n  return value;\n}\n/**\r\n * Compute crop and zoom from the croppedAreaPercentages.\r\n */\n\n\nfunction getInitialCropFromCroppedAreaPercentages(croppedAreaPercentages, mediaSize, rotation, cropSize, minZoom, maxZoom) {\n  var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation); // This is the inverse process of computeCroppedArea\n\n  var zoom = clamp(cropSize.width / mediaBBoxSize.width * (100 / croppedAreaPercentages.width), minZoom, maxZoom);\n  var crop = {\n    x: zoom * mediaBBoxSize.width / 2 - cropSize.width / 2 - mediaBBoxSize.width * zoom * (croppedAreaPercentages.x / 100),\n    y: zoom * mediaBBoxSize.height / 2 - cropSize.height / 2 - mediaBBoxSize.height * zoom * (croppedAreaPercentages.y / 100)\n  };\n  return {\n    crop: crop,\n    zoom: zoom\n  };\n}\n/**\r\n * Compute zoom from the croppedAreaPixels\r\n */\n\nfunction getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {\n  var mediaZoom = getMediaZoom(mediaSize);\n  return cropSize.height > cropSize.width ? cropSize.height / (croppedAreaPixels.height * mediaZoom) : cropSize.width / (croppedAreaPixels.width * mediaZoom);\n}\n/**\r\n * Compute crop and zoom from the croppedAreaPixels\r\n */\n\n\nfunction getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, rotation, cropSize, minZoom, maxZoom) {\n  if (rotation === void 0) {\n    rotation = 0;\n  }\n\n  var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation);\n  var zoom = clamp(getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize), minZoom, maxZoom);\n  var cropZoom = cropSize.height > cropSize.width ? cropSize.height / croppedAreaPixels.height : cropSize.width / croppedAreaPixels.width;\n  var crop = {\n    x: ((mediaNaturalBBoxSize.width - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom,\n    y: ((mediaNaturalBBoxSize.height - croppedAreaPixels.height) / 2 - croppedAreaPixels.y) * cropZoom\n  };\n  return {\n    crop: crop,\n    zoom: zoom\n  };\n}\n/**\r\n * Return the point that is the center of point a and b\r\n */\n\nfunction getCenter(a, b) {\n  return {\n    x: (b.x + a.x) / 2,\n    y: (b.y + a.y) / 2\n  };\n}\nfunction getRadianAngle(degreeValue) {\n  return degreeValue * Math.PI / 180;\n}\n/**\r\n * Returns the new bounding area of a rotated rectangle.\r\n */\n\nfunction rotateSize(width, height, rotation) {\n  var rotRad = getRadianAngle(rotation);\n  return {\n    width: Math.abs(Math.cos(rotRad) * width) + Math.abs(Math.sin(rotRad) * height),\n    height: Math.abs(Math.sin(rotRad) * width) + Math.abs(Math.cos(rotRad) * height)\n  };\n}\n/**\r\n * Clamp value between min and max\r\n */\n\nfunction clamp(value, min, max) {\n  return Math.min(Math.max(value, min), max);\n}\n/**\r\n * Combine multiple class names into a single string.\r\n */\n\nfunction classNames() {\n  var args = [];\n\n  for (var _i = 0; _i < arguments.length; _i++) {\n    args[_i] = arguments[_i];\n  }\n\n  return args.filter(function (value) {\n    if (typeof value === 'string' && value.length > 0) {\n      return true;\n    }\n\n    return false;\n  }).join(' ').trim();\n}\n\nvar css_248z = \".reactEasyCrop_Container {\\n  position: absolute;\\n  top: 0;\\n  left: 0;\\n  right: 0;\\n  bottom: 0;\\n  overflow: hidden;\\n  user-select: none;\\n  touch-action: none;\\n  cursor: move;\\n  display: flex;\\n  justify-content: center;\\n  align-items: center;\\n}\\n\\n.reactEasyCrop_Image,\\n.reactEasyCrop_Video {\\n  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\\n}\\n\\n.reactEasyCrop_Contain {\\n  max-width: 100%;\\n  max-height: 100%;\\n  margin: auto;\\n  position: absolute;\\n  top: 0;\\n  bottom: 0;\\n  left: 0;\\n  right: 0;\\n}\\n.reactEasyCrop_Cover_Horizontal {\\n  width: 100%;\\n  height: auto;\\n}\\n.reactEasyCrop_Cover_Vertical {\\n  width: auto;\\n  height: 100%;\\n}\\n\\n.reactEasyCrop_CropArea {\\n  position: absolute;\\n  left: 50%;\\n  top: 50%;\\n  transform: translate(-50%, -50%);\\n  border: 1px solid rgba(255, 255, 255, 0.5);\\n  box-sizing: border-box;\\n  box-shadow: 0 0 0 9999em;\\n  color: rgba(0, 0, 0, 0.5);\\n  overflow: hidden;\\n}\\n\\n.reactEasyCrop_CropAreaRound {\\n  border-radius: 50%;\\n}\\n\\n.reactEasyCrop_CropAreaGrid::before {\\n  content: ' ';\\n  box-sizing: border-box;\\n  position: absolute;\\n  border: 1px solid rgba(255, 255, 255, 0.5);\\n  top: 0;\\n  bottom: 0;\\n  left: 33.33%;\\n  right: 33.33%;\\n  border-top: 0;\\n  border-bottom: 0;\\n}\\n\\n.reactEasyCrop_CropAreaGrid::after {\\n  content: ' ';\\n  box-sizing: border-box;\\n  position: absolute;\\n  border: 1px solid rgba(255, 255, 255, 0.5);\\n  top: 33.33%;\\n  bottom: 33.33%;\\n  left: 0;\\n  right: 0;\\n  border-left: 0;\\n  border-right: 0;\\n}\\n\";\n\nvar MIN_ZOOM = 1;\nvar MAX_ZOOM = 3;\n\nvar Cropper =\n/** @class */\nfunction (_super) {\n  __extends(Cropper, _super);\n\n  function Cropper() {\n    var _this = _super !== null && _super.apply(this, arguments) || this;\n\n    _this.imageRef = /*#__PURE__*/React.createRef();\n    _this.videoRef = /*#__PURE__*/React.createRef();\n    _this.containerRef = null;\n    _this.styleRef = null;\n    _this.containerRect = null;\n    _this.mediaSize = {\n      width: 0,\n      height: 0,\n      naturalWidth: 0,\n      naturalHeight: 0\n    };\n    _this.dragStartPosition = {\n      x: 0,\n      y: 0\n    };\n    _this.dragStartCrop = {\n      x: 0,\n      y: 0\n    };\n    _this.gestureZoomStart = 0;\n    _this.gestureRotationStart = 0;\n    _this.isTouching = false;\n    _this.lastPinchDistance = 0;\n    _this.lastPinchRotation = 0;\n    _this.rafDragTimeout = null;\n    _this.rafPinchTimeout = null;\n    _this.wheelTimer = null;\n    _this.currentDoc = document;\n    _this.currentWindow = window;\n    _this.state = {\n      cropSize: null,\n      hasWheelJustStarted: false\n    }; // this is to prevent Safari on iOS >= 10 to zoom the page\n\n    _this.preventZoomSafari = function (e) {\n      return e.preventDefault();\n    };\n\n    _this.cleanEvents = function () {\n      _this.currentDoc.removeEventListener('mousemove', _this.onMouseMove);\n\n      _this.currentDoc.removeEventListener('mouseup', _this.onDragStopped);\n\n      _this.currentDoc.removeEventListener('touchmove', _this.onTouchMove);\n\n      _this.currentDoc.removeEventListener('touchend', _this.onDragStopped);\n\n      _this.currentDoc.removeEventListener('gesturemove', _this.onGestureMove);\n\n      _this.currentDoc.removeEventListener('gestureend', _this.onGestureEnd);\n    };\n\n    _this.clearScrollEvent = function () {\n      if (_this.containerRef) _this.containerRef.removeEventListener('wheel', _this.onWheel);\n\n      if (_this.wheelTimer) {\n        clearTimeout(_this.wheelTimer);\n      }\n    };\n\n    _this.onMediaLoad = function () {\n      var cropSize = _this.computeSizes();\n\n      if (cropSize) {\n        _this.emitCropData();\n\n        _this.setInitialCrop(cropSize);\n      }\n\n      if (_this.props.onMediaLoaded) {\n        _this.props.onMediaLoaded(_this.mediaSize);\n      }\n    };\n\n    _this.setInitialCrop = function (cropSize) {\n      if (_this.props.initialCroppedAreaPercentages) {\n        var _a = getInitialCropFromCroppedAreaPercentages(_this.props.initialCroppedAreaPercentages, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom),\n            crop = _a.crop,\n            zoom = _a.zoom;\n\n        _this.props.onCropChange(crop);\n\n        _this.props.onZoomChange && _this.props.onZoomChange(zoom);\n      } else if (_this.props.initialCroppedAreaPixels) {\n        var _b = getInitialCropFromCroppedAreaPixels(_this.props.initialCroppedAreaPixels, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom),\n            crop = _b.crop,\n            zoom = _b.zoom;\n\n        _this.props.onCropChange(crop);\n\n        _this.props.onZoomChange && _this.props.onZoomChange(zoom);\n      }\n    };\n\n    _this.computeSizes = function () {\n      var _a, _b, _c, _d, _e, _f;\n\n      var mediaRef = _this.imageRef.current || _this.videoRef.current;\n\n      if (mediaRef && _this.containerRef) {\n        _this.containerRect = _this.containerRef.getBoundingClientRect();\n        var containerAspect = _this.containerRect.width / _this.containerRect.height;\n        var naturalWidth = ((_a = _this.imageRef.current) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = _this.videoRef.current) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0;\n        var naturalHeight = ((_c = _this.imageRef.current) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = _this.videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0;\n        var isMediaScaledDown = mediaRef.offsetWidth < naturalWidth || mediaRef.offsetHeight < naturalHeight;\n        var mediaAspect = naturalWidth / naturalHeight; // We do not rely on the offsetWidth/offsetHeight if the media is scaled down\n        // as the values they report are rounded. That will result in precision losses\n        // when calculating zoom. We use the fact that the media is positionned relative\n        // to the container. That allows us to use the container's dimensions\n        // and natural aspect ratio of the media to calculate accurate media size.\n        // However, for this to work, the container should not be rotated\n\n        var renderedMediaSize = void 0;\n\n        if (isMediaScaledDown) {\n          switch (_this.props.objectFit) {\n            default:\n            case 'contain':\n              renderedMediaSize = containerAspect > mediaAspect ? {\n                width: _this.containerRect.height * mediaAspect,\n                height: _this.containerRect.height\n              } : {\n                width: _this.containerRect.width,\n                height: _this.containerRect.width / mediaAspect\n              };\n              break;\n\n            case 'horizontal-cover':\n              renderedMediaSize = {\n                width: _this.containerRect.width,\n                height: _this.containerRect.width / mediaAspect\n              };\n              break;\n\n            case 'vertical-cover':\n              renderedMediaSize = {\n                width: _this.containerRect.height * mediaAspect,\n                height: _this.containerRect.height\n              };\n              break;\n\n            case 'auto-cover':\n              renderedMediaSize = naturalWidth > naturalHeight ? {\n                width: _this.containerRect.width,\n                height: _this.containerRect.width / mediaAspect\n              } : {\n                width: _this.containerRect.height * mediaAspect,\n                height: _this.containerRect.height\n              };\n              break;\n          }\n        } else {\n          renderedMediaSize = {\n            width: mediaRef.offsetWidth,\n            height: mediaRef.offsetHeight\n          };\n        }\n\n        _this.mediaSize = __assign(__assign({}, renderedMediaSize), {\n          naturalWidth: naturalWidth,\n          naturalHeight: naturalHeight\n        }); // set media size in the parent\n\n        if (_this.props.setMediaSize) {\n          _this.props.setMediaSize(_this.mediaSize);\n        }\n\n        var cropSize = _this.props.cropSize ? _this.props.cropSize : getCropSize(_this.mediaSize.width, _this.mediaSize.height, _this.containerRect.width, _this.containerRect.height, _this.props.aspect, _this.props.rotation);\n\n        if (((_e = _this.state.cropSize) === null || _e === void 0 ? void 0 : _e.height) !== cropSize.height || ((_f = _this.state.cropSize) === null || _f === void 0 ? void 0 : _f.width) !== cropSize.width) {\n          _this.props.onCropSizeChange && _this.props.onCropSizeChange(cropSize);\n        }\n\n        _this.setState({\n          cropSize: cropSize\n        }, _this.recomputeCropPosition); // pass crop size to parent\n\n\n        if (_this.props.setCropSize) {\n          _this.props.setCropSize(cropSize);\n        }\n\n        return cropSize;\n      }\n    };\n\n    _this.onMouseDown = function (e) {\n      e.preventDefault();\n\n      _this.currentDoc.addEventListener('mousemove', _this.onMouseMove);\n\n      _this.currentDoc.addEventListener('mouseup', _this.onDragStopped);\n\n      _this.onDragStart(Cropper.getMousePoint(e));\n    };\n\n    _this.onMouseMove = function (e) {\n      return _this.onDrag(Cropper.getMousePoint(e));\n    };\n\n    _this.onTouchStart = function (e) {\n      _this.isTouching = true;\n\n      if (_this.props.onTouchRequest && !_this.props.onTouchRequest(e)) {\n        return;\n      }\n\n      _this.currentDoc.addEventListener('touchmove', _this.onTouchMove, {\n        passive: false\n      }); // iOS 11 now defaults to passive: true\n\n\n      _this.currentDoc.addEventListener('touchend', _this.onDragStopped);\n\n      if (e.touches.length === 2) {\n        _this.onPinchStart(e);\n      } else if (e.touches.length === 1) {\n        _this.onDragStart(Cropper.getTouchPoint(e.touches[0]));\n      }\n    };\n\n    _this.onTouchMove = function (e) {\n      // Prevent whole page from scrolling on iOS.\n      e.preventDefault();\n\n      if (e.touches.length === 2) {\n        _this.onPinchMove(e);\n      } else if (e.touches.length === 1) {\n        _this.onDrag(Cropper.getTouchPoint(e.touches[0]));\n      }\n    };\n\n    _this.onGestureStart = function (e) {\n      e.preventDefault();\n\n      _this.currentDoc.addEventListener('gesturechange', _this.onGestureMove);\n\n      _this.currentDoc.addEventListener('gestureend', _this.onGestureEnd);\n\n      _this.gestureZoomStart = _this.props.zoom;\n      _this.gestureRotationStart = _this.props.rotation;\n    };\n\n    _this.onGestureMove = function (e) {\n      e.preventDefault();\n\n      if (_this.isTouching) {\n        // this is to avoid conflict between gesture and touch events\n        return;\n      }\n\n      var point = Cropper.getMousePoint(e);\n      var newZoom = _this.gestureZoomStart - 1 + e.scale;\n\n      _this.setNewZoom(newZoom, point, {\n        shouldUpdatePosition: true\n      });\n\n      if (_this.props.onRotationChange) {\n        var newRotation = _this.gestureRotationStart + e.rotation;\n\n        _this.props.onRotationChange(newRotation);\n      }\n    };\n\n    _this.onGestureEnd = function (e) {\n      _this.cleanEvents();\n    };\n\n    _this.onDragStart = function (_a) {\n      var _b, _c;\n\n      var x = _a.x,\n          y = _a.y;\n      _this.dragStartPosition = {\n        x: x,\n        y: y\n      };\n      _this.dragStartCrop = __assign({}, _this.props.crop);\n      (_c = (_b = _this.props).onInteractionStart) === null || _c === void 0 ? void 0 : _c.call(_b);\n    };\n\n    _this.onDrag = function (_a) {\n      var x = _a.x,\n          y = _a.y;\n      if (_this.rafDragTimeout) _this.currentWindow.cancelAnimationFrame(_this.rafDragTimeout);\n      _this.rafDragTimeout = _this.currentWindow.requestAnimationFrame(function () {\n        if (!_this.state.cropSize) return;\n        if (x === undefined || y === undefined) return;\n        var offsetX = x - _this.dragStartPosition.x;\n        var offsetY = y - _this.dragStartPosition.y;\n        var requestedPosition = {\n          x: _this.dragStartCrop.x + offsetX,\n          y: _this.dragStartCrop.y + offsetY\n        };\n        var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : requestedPosition;\n\n        _this.props.onCropChange(newPosition);\n      });\n    };\n\n    _this.onDragStopped = function () {\n      var _a, _b;\n\n      _this.isTouching = false;\n\n      _this.cleanEvents();\n\n      _this.emitCropData();\n\n      (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);\n    };\n\n    _this.onWheel = function (e) {\n      if (_this.props.onWheelRequest && !_this.props.onWheelRequest(e)) {\n        return;\n      }\n\n      e.preventDefault();\n      var point = Cropper.getMousePoint(e);\n      var pixelY = normalizeWheel(e).pixelY;\n      var newZoom = _this.props.zoom - pixelY * _this.props.zoomSpeed / 200;\n\n      _this.setNewZoom(newZoom, point, {\n        shouldUpdatePosition: true\n      });\n\n      if (!_this.state.hasWheelJustStarted) {\n        _this.setState({\n          hasWheelJustStarted: true\n        }, function () {\n          var _a, _b;\n\n          return (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a);\n        });\n      }\n\n      if (_this.wheelTimer) {\n        clearTimeout(_this.wheelTimer);\n      }\n\n      _this.wheelTimer = _this.currentWindow.setTimeout(function () {\n        return _this.setState({\n          hasWheelJustStarted: false\n        }, function () {\n          var _a, _b;\n\n          return (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);\n        });\n      }, 250);\n    };\n\n    _this.getPointOnContainer = function (_a) {\n      var x = _a.x,\n          y = _a.y;\n\n      if (!_this.containerRect) {\n        throw new Error('The Cropper is not mounted');\n      }\n\n      return {\n        x: _this.containerRect.width / 2 - (x - _this.containerRect.left),\n        y: _this.containerRect.height / 2 - (y - _this.containerRect.top)\n      };\n    };\n\n    _this.getPointOnMedia = function (_a) {\n      var x = _a.x,\n          y = _a.y;\n      var _b = _this.props,\n          crop = _b.crop,\n          zoom = _b.zoom;\n      return {\n        x: (x + crop.x) / zoom,\n        y: (y + crop.y) / zoom\n      };\n    };\n\n    _this.setNewZoom = function (zoom, point, _a) {\n      var _b = (_a === void 0 ? {} : _a).shouldUpdatePosition,\n          shouldUpdatePosition = _b === void 0 ? true : _b;\n      if (!_this.state.cropSize || !_this.props.onZoomChange) return;\n      var newZoom = clamp(zoom, _this.props.minZoom, _this.props.maxZoom);\n\n      if (shouldUpdatePosition) {\n        var zoomPoint = _this.getPointOnContainer(point);\n\n        var zoomTarget = _this.getPointOnMedia(zoomPoint);\n\n        var requestedPosition = {\n          x: zoomTarget.x * newZoom - zoomPoint.x,\n          y: zoomTarget.y * newZoom - zoomPoint.y\n        };\n        var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition;\n\n        _this.props.onCropChange(newPosition);\n      }\n\n      _this.props.onZoomChange(newZoom);\n    };\n\n    _this.getCropData = function () {\n      if (!_this.state.cropSize) {\n        return null;\n      } // this is to ensure the crop is correctly restricted after a zoom back (https://github.com/ValentinH/react-easy-crop/issues/6)\n\n\n      var restrictedPosition = _this.props.restrictPosition ? restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;\n      return computeCroppedArea(restrictedPosition, _this.mediaSize, _this.state.cropSize, _this.getAspect(), _this.props.zoom, _this.props.rotation, _this.props.restrictPosition);\n    };\n\n    _this.emitCropData = function () {\n      var cropData = _this.getCropData();\n\n      if (!cropData) return;\n      var croppedAreaPercentages = cropData.croppedAreaPercentages,\n          croppedAreaPixels = cropData.croppedAreaPixels;\n\n      if (_this.props.onCropComplete) {\n        _this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels);\n      }\n\n      if (_this.props.onCropAreaChange) {\n        _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);\n      }\n    };\n\n    _this.emitCropAreaChange = function () {\n      var cropData = _this.getCropData();\n\n      if (!cropData) return;\n      var croppedAreaPercentages = cropData.croppedAreaPercentages,\n          croppedAreaPixels = cropData.croppedAreaPixels;\n\n      if (_this.props.onCropAreaChange) {\n        _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);\n      }\n    };\n\n    _this.recomputeCropPosition = function () {\n      if (!_this.state.cropSize) return;\n      var newPosition = _this.props.restrictPosition ? restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;\n\n      _this.props.onCropChange(newPosition);\n\n      _this.emitCropData();\n    };\n\n    return _this;\n  }\n\n  Cropper.prototype.componentDidMount = function () {\n    if (this.containerRef) {\n      if (this.containerRef.ownerDocument) {\n        this.currentDoc = this.containerRef.ownerDocument;\n      }\n\n      if (this.currentDoc.defaultView) {\n        this.currentWindow = this.currentDoc.defaultView;\n      }\n\n      this.currentWindow.addEventListener('resize', this.computeSizes);\n      this.props.zoomWithScroll && this.containerRef.addEventListener('wheel', this.onWheel, {\n        passive: false\n      });\n      this.containerRef.addEventListener('gesturestart', this.onGestureStart);\n    }\n\n    if (!this.props.disableAutomaticStylesInjection) {\n      this.styleRef = this.currentDoc.createElement('style');\n      this.styleRef.setAttribute('type', 'text/css');\n\n      if (this.props.nonce) {\n        this.styleRef.setAttribute('nonce', this.props.nonce);\n      }\n\n      this.styleRef.innerHTML = css_248z;\n      this.currentDoc.head.appendChild(this.styleRef);\n    } // when rendered via SSR, the image can already be loaded and its onLoad callback will never be called\n\n\n    if (this.imageRef.current && this.imageRef.current.complete) {\n      this.onMediaLoad();\n    } // set image and video refs in the parent if the callbacks exist\n\n\n    if (this.props.setImageRef) {\n      this.props.setImageRef(this.imageRef);\n    }\n\n    if (this.props.setVideoRef) {\n      this.props.setVideoRef(this.videoRef);\n    }\n  };\n\n  Cropper.prototype.componentWillUnmount = function () {\n    var _a;\n\n    this.currentWindow.removeEventListener('resize', this.computeSizes);\n\n    if (this.containerRef) {\n      this.containerRef.removeEventListener('gesturestart', this.preventZoomSafari);\n    }\n\n    if (this.styleRef) {\n      (_a = this.styleRef.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.styleRef);\n    }\n\n    this.cleanEvents();\n    this.props.zoomWithScroll && this.clearScrollEvent();\n  };\n\n  Cropper.prototype.componentDidUpdate = function (prevProps) {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n\n    if (prevProps.rotation !== this.props.rotation) {\n      this.computeSizes();\n      this.recomputeCropPosition();\n    } else if (prevProps.aspect !== this.props.aspect) {\n      this.computeSizes();\n    } else if (prevProps.zoom !== this.props.zoom) {\n      this.recomputeCropPosition();\n    } else if (((_a = prevProps.cropSize) === null || _a === void 0 ? void 0 : _a.height) !== ((_b = this.props.cropSize) === null || _b === void 0 ? void 0 : _b.height) || ((_c = prevProps.cropSize) === null || _c === void 0 ? void 0 : _c.width) !== ((_d = this.props.cropSize) === null || _d === void 0 ? void 0 : _d.width)) {\n      this.computeSizes();\n    } else if (((_e = prevProps.crop) === null || _e === void 0 ? void 0 : _e.x) !== ((_f = this.props.crop) === null || _f === void 0 ? void 0 : _f.x) || ((_g = prevProps.crop) === null || _g === void 0 ? void 0 : _g.y) !== ((_h = this.props.crop) === null || _h === void 0 ? void 0 : _h.y)) {\n      this.emitCropAreaChange();\n    }\n\n    if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {\n      this.props.zoomWithScroll ? this.containerRef.addEventListener('wheel', this.onWheel, {\n        passive: false\n      }) : this.clearScrollEvent();\n    }\n\n    if (prevProps.video !== this.props.video) {\n      (_j = this.videoRef.current) === null || _j === void 0 ? void 0 : _j.load();\n    }\n  };\n\n  Cropper.prototype.getAspect = function () {\n    var _a = this.props,\n        cropSize = _a.cropSize,\n        aspect = _a.aspect;\n\n    if (cropSize) {\n      return cropSize.width / cropSize.height;\n    }\n\n    return aspect;\n  };\n\n  Cropper.prototype.onPinchStart = function (e) {\n    var pointA = Cropper.getTouchPoint(e.touches[0]);\n    var pointB = Cropper.getTouchPoint(e.touches[1]);\n    this.lastPinchDistance = getDistanceBetweenPoints(pointA, pointB);\n    this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB);\n    this.onDragStart(getCenter(pointA, pointB));\n  };\n\n  Cropper.prototype.onPinchMove = function (e) {\n    var _this = this;\n\n    var pointA = Cropper.getTouchPoint(e.touches[0]);\n    var pointB = Cropper.getTouchPoint(e.touches[1]);\n    var center = getCenter(pointA, pointB);\n    this.onDrag(center);\n    if (this.rafPinchTimeout) this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout);\n    this.rafPinchTimeout = this.currentWindow.requestAnimationFrame(function () {\n      var distance = getDistanceBetweenPoints(pointA, pointB);\n      var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance);\n\n      _this.setNewZoom(newZoom, center, {\n        shouldUpdatePosition: false\n      });\n\n      _this.lastPinchDistance = distance;\n      var rotation = getRotationBetweenPoints(pointA, pointB);\n      var newRotation = _this.props.rotation + (rotation - _this.lastPinchRotation);\n      _this.props.onRotationChange && _this.props.onRotationChange(newRotation);\n      _this.lastPinchRotation = rotation;\n    });\n  };\n\n  Cropper.prototype.render = function () {\n    var _this = this;\n\n    var _a = this.props,\n        image = _a.image,\n        video = _a.video,\n        mediaProps = _a.mediaProps,\n        transform = _a.transform,\n        _b = _a.crop,\n        x = _b.x,\n        y = _b.y,\n        rotation = _a.rotation,\n        zoom = _a.zoom,\n        cropShape = _a.cropShape,\n        showGrid = _a.showGrid,\n        _c = _a.style,\n        containerStyle = _c.containerStyle,\n        cropAreaStyle = _c.cropAreaStyle,\n        mediaStyle = _c.mediaStyle,\n        _d = _a.classes,\n        containerClassName = _d.containerClassName,\n        cropAreaClassName = _d.cropAreaClassName,\n        mediaClassName = _d.mediaClassName,\n        objectFit = _a.objectFit;\n    return /*#__PURE__*/React.createElement(\"div\", {\n      onMouseDown: this.onMouseDown,\n      onTouchStart: this.onTouchStart,\n      ref: function ref(el) {\n        return _this.containerRef = el;\n      },\n      \"data-testid\": \"container\",\n      style: containerStyle,\n      className: classNames('reactEasyCrop_Container', containerClassName)\n    }, image ? /*#__PURE__*/React.createElement(\"img\", __assign({\n      alt: \"\",\n      className: classNames('reactEasyCrop_Image', objectFit === 'contain' && 'reactEasyCrop_Contain', objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal', objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical', objectFit === 'auto-cover' && (this.mediaSize.naturalWidth > this.mediaSize.naturalHeight ? 'reactEasyCrop_Cover_Horizontal' : 'reactEasyCrop_Cover_Vertical'), mediaClassName)\n    }, mediaProps, {\n      src: image,\n      ref: this.imageRef,\n      style: __assign(__assign({}, mediaStyle), {\n        transform: transform || \"translate(\" + x + \"px, \" + y + \"px) rotate(\" + rotation + \"deg) scale(\" + zoom + \")\"\n      }),\n      onLoad: this.onMediaLoad\n    })) : video && /*#__PURE__*/React.createElement(\"video\", __assign({\n      autoPlay: true,\n      loop: true,\n      muted: true,\n      className: classNames('reactEasyCrop_Video', objectFit === 'contain' && 'reactEasyCrop_Contain', objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal', objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical', objectFit === 'auto-cover' && (this.mediaSize.naturalWidth > this.mediaSize.naturalHeight ? 'reactEasyCrop_Cover_Horizontal' : 'reactEasyCrop_Cover_Vertical'), mediaClassName)\n    }, mediaProps, {\n      ref: this.videoRef,\n      onLoadedMetadata: this.onMediaLoad,\n      style: __assign(__assign({}, mediaStyle), {\n        transform: transform || \"translate(\" + x + \"px, \" + y + \"px) rotate(\" + rotation + \"deg) scale(\" + zoom + \")\"\n      }),\n      controls: false\n    }), (Array.isArray(video) ? video : [{\n      src: video\n    }]).map(function (item) {\n      return /*#__PURE__*/React.createElement(\"source\", __assign({\n        key: item.src\n      }, item));\n    })), this.state.cropSize && /*#__PURE__*/React.createElement(\"div\", {\n      style: __assign(__assign({}, cropAreaStyle), {\n        width: this.state.cropSize.width,\n        height: this.state.cropSize.height\n      }),\n      \"data-testid\": \"cropper\",\n      className: classNames('reactEasyCrop_CropArea', cropShape === 'round' && 'reactEasyCrop_CropAreaRound', showGrid && 'reactEasyCrop_CropAreaGrid', cropAreaClassName)\n    }));\n  };\n\n  Cropper.defaultProps = {\n    zoom: 1,\n    rotation: 0,\n    aspect: 4 / 3,\n    maxZoom: MAX_ZOOM,\n    minZoom: MIN_ZOOM,\n    cropShape: 'rect',\n    objectFit: 'contain',\n    showGrid: true,\n    style: {},\n    classes: {},\n    mediaProps: {},\n    zoomSpeed: 1,\n    restrictPosition: true,\n    zoomWithScroll: true\n  };\n\n  Cropper.getMousePoint = function (e) {\n    return {\n      x: Number(e.clientX),\n      y: Number(e.clientY)\n    };\n  };\n\n  Cropper.getTouchPoint = function (touch) {\n    return {\n      x: Number(touch.clientX),\n      y: Number(touch.clientY)\n    };\n  };\n\n  return Cropper;\n}(React.Component);\n\nexport default Cropper;\nexport { getInitialCropFromCroppedAreaPercentages, getInitialCropFromCroppedAreaPixels };\n//# sourceMappingURL=index.module.js.map\n"],"names":["restrictPosition","position","mediaSize","cropSize","zoom","rotation","_a","rotateSize","width","height","x","restrictPositionCoord","y","maxPosition","clamp","getDistanceBetweenPoints","pointA","pointB","Math","sqrt","pow","getRotationBetweenPoints","atan2","PI","limitArea","max","value","min","noOp","_max","getInitialCropFromCroppedAreaPercentages","croppedAreaPercentages","minZoom","maxZoom","mediaBBoxSize","crop","getInitialCropFromCroppedAreaPixels","croppedAreaPixels","mediaNaturalBBoxSize","naturalWidth","naturalHeight","getZoomFromCroppedAreaPixels","mediaZoom","getMediaZoom","cropZoom","getCenter","a","b","rotRad","getRadianAngle","degreeValue","abs","cos","sin","classNames","args","_i","arguments","length","filter","join","trim","Cropper","_super","_this","apply","this","imageRef","React","createRef","videoRef","containerRef","styleRef","containerRect","dragStartPosition","dragStartCrop","gestureZoomStart","gestureRotationStart","isTouching","lastPinchDistance","lastPinchRotation","rafDragTimeout","rafPinchTimeout","wheelTimer","currentDoc","document","currentWindow","window","state","hasWheelJustStarted","preventZoomSafari","e","preventDefault","cleanEvents","removeEventListener","onMouseMove","onDragStopped","onTouchMove","onGestureMove","onGestureEnd","clearScrollEvent","onWheel","clearTimeout","onMediaLoad","computeSizes","emitCropData","setInitialCrop","props","onMediaLoaded","initialCroppedAreaPercentages","onCropChange","onZoomChange","initialCroppedAreaPixels","_b","_c","_d","_e","_f","mediaRef","current","getBoundingClientRect","containerAspect","videoWidth","videoHeight","mediaAspect","renderedMediaSize","offsetWidth","offsetHeight","objectFit","__assign","setMediaSize","getCropSize","mediaWidth","mediaHeight","containerWidth","containerHeight","aspect","fittingWidth","fittingHeight","onCropSizeChange","setState","recomputeCropPosition","setCropSize","onMouseDown","addEventListener","onDragStart","getMousePoint","onDrag","onTouchStart","onTouchRequest","passive","touches","onPinchStart","getTouchPoint","onPinchMove","onGestureStart","point","newZoom","scale","setNewZoom","shouldUpdatePosition","onRotationChange","newRotation","onInteractionStart","call","cancelAnimationFrame","requestAnimationFrame","undefined","offsetX","offsetY","requestedPosition","newPosition","onInteractionEnd","onWheelRequest","pixelY","normalizeWheel","zoomSpeed","setTimeout","getPointOnContainer","Error","left","top","getPointOnMedia","zoomPoint","zoomTarget","getCropData","computeCroppedArea","limitAreaFn","widthInPixels","round","heightInPixels","sizePixels","getAspect","cropData","onCropComplete","onCropAreaChange","emitCropAreaChange","__extends","prototype","componentDidMount","ownerDocument","defaultView","zoomWithScroll","disableAutomaticStylesInjection","createElement","setAttribute","nonce","innerHTML","head","appendChild","complete","setImageRef","setVideoRef","componentWillUnmount","parentNode","removeChild","componentDidUpdate","prevProps","_g","_h","_j","video","load","center","distance","render","image","mediaProps","transform","cropShape","showGrid","style","containerStyle","cropAreaStyle","mediaStyle","classes","containerClassName","cropAreaClassName","mediaClassName","ref","el","className","alt","src","onLoad","autoPlay","loop","muted","onLoadedMetadata","controls","Array","isArray","map","item","key","defaultProps","Number","clientX","clientY","touch","Component"],"mappings":"kIA8CA,SAASA,iBAAiBC,EAAUC,EAAWC,EAAUC,EAAMC,QAC5C,IAAbA,IACFA,EAAW,GAGb,IAAIC,EAAKC,WAAWL,EAAUM,MAAON,EAAUO,OAAQJ,GACnDG,EAAQF,EAAGE,MACXC,EAASH,EAAGG,OAEhB,MAAO,CACLC,EAAGC,sBAAsBV,EAASS,EAAGF,EAAOL,EAASK,MAAOJ,GAC5DQ,EAAGD,sBAAsBV,EAASW,EAAGH,EAAQN,EAASM,OAAQL,GAElE,CAEA,SAASO,sBAAsBV,EAAUC,EAAWC,EAAUC,GAC5D,IAAIS,EAAcX,EAAYE,EAAO,EAAID,EAAW,EACpD,OAAOW,MAAMb,GAAWY,EAAaA,EACvC,CAEA,SAASE,yBAAyBC,EAAQC,GACxC,OAAOC,KAAKC,KAAKD,KAAKE,IAAIJ,EAAOJ,EAAIK,EAAOL,EAAG,GAAKM,KAAKE,IAAIJ,EAAON,EAAIO,EAAOP,EAAG,GACpF,CACA,SAASW,yBAAyBL,EAAQC,GACxC,OAA8D,IAAvDC,KAAKI,MAAML,EAAOL,EAAII,EAAOJ,EAAGK,EAAOP,EAAIM,EAAON,GAAWQ,KAAKK,EAC3E,CA0DA,SAASC,UAAUC,EAAKC,GACtB,OAAOR,KAAKS,IAAIF,EAAKP,KAAKO,IAAI,EAAGC,GACnC,CAEA,SAASE,KAAKC,EAAMH,GACl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