Socket
Socket
Sign inDemoInstall

react-cropper

Package Overview
Dependencies
4
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.1 to 2.3.2

src/utils.ts

2

dist/index.d.ts

@@ -19,4 +19,4 @@ import React from 'react';

}
declare const ReactCropper: React.ForwardRefExoticComponent<ReactCropperProps & React.RefAttributes<ReactCropperElement | HTMLImageElement>>;
declare const ReactCropper: React.ForwardRefExoticComponent<ReactCropperProps & React.RefAttributes<HTMLImageElement | ReactCropperElement>>;
export { ReactCropper as Cropper, ReactCropperElement, ReactCropperProps, ReactCropper as default };

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

import e,{useRef as r,useEffect as t}from"react";import n from"cropperjs";var o=function(){return o=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},o.apply(this,arguments)};function a(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t}var i,c={},s={};var l,u,f={};
import e,{useRef as r,useEffect as t}from"react";import n from"cropperjs";var o=function(){return o=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},o.apply(this,arguments)};function a(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t}var i,c={},l={};var s,u,f={};
/**

@@ -10,2 +10,2 @@ * @license React

* LICENSE file in the root directory of this source tree.
*/function p(){return l||(l=1,"production"!==process.env.NODE_ENV&&function(){var r=e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];!function(e,r,t){var n=b.ReactDebugCurrentFrame,o=n.getStackAddendum();""!==o&&(r+="%s",t=t.concat([o]));var a=t.map((function(e){return String(e)}));a.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,a)}("error",e,t)}var _,O=!1,w=!1,j=!1,k=!1,S=!1;function R(e){return e.displayName||"Context"}function T(e){if(null==e)return null;if("number"==typeof e.tag&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case n:return"Portal";case i:return"Profiler";case a:return"StrictMode";case u:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case s:return R(e)+".Consumer";case c:return R(e._context)+".Provider";case l:return function(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return""!==o?t+"("+o+")":t}(e,e.render,"ForwardRef");case y:var r=e.displayName||null;return null!==r?r:T(e.type)||"Memo";case d:var t=e,f=t._payload,v=t._init;try{return T(v(f))}catch(e){return null}}return null}_=Symbol.for("react.module.reference");var E,P,x,N,$,C,D,F=Object.assign,I=0;function z(){}z.__reactDisabledLog=!0;var L,W=b.ReactCurrentDispatcher;function Y(e,r,t){if(void 0===L)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);L=n&&n[1]||""}return"\n"+L+e}var M,U=!1,A="function"==typeof WeakMap?WeakMap:Map;function X(e,r){if(!e||U)return"";var t,n=M.get(e);if(void 0!==n)return n;U=!0;var o,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=W.current,W.current=null,function(){if(0===I){E=console.log,P=console.info,x=console.warn,N=console.error,$=console.group,C=console.groupCollapsed,D=console.groupEnd;var e={configurable:!0,enumerable:!0,value:z,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}I++}();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(i,[])}catch(e){t=e}Reflect.construct(e,[],i)}else{try{i.call()}catch(e){t=e}e.call(i.prototype)}}else{try{throw Error()}catch(e){t=e}e()}}catch(r){if(r&&t&&"string"==typeof r.stack){for(var c=r.stack.split("\n"),s=t.stack.split("\n"),l=c.length-1,u=s.length-1;l>=1&&u>=0&&c[l]!==s[u];)u--;for(;l>=1&&u>=0;l--,u--)if(c[l]!==s[u]){if(1!==l||1!==u)do{if(l--,--u<0||c[l]!==s[u]){var f="\n"+c[l].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&M.set(e,f),f}}while(l>=1&&u>=0);break}}}finally{U=!1,W.current=o,function(){if(0==--I){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:E}),info:F({},e,{value:P}),warn:F({},e,{value:x}),error:F({},e,{value:N}),group:F({},e,{value:$}),groupCollapsed:F({},e,{value:C}),groupEnd:F({},e,{value:D})})}I<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var p=e?e.displayName||e.name:"",y=p?Y(p):"";return"function"==typeof e&&M.set(e,y),y}function B(e,r,t){if(null==e)return"";if("function"==typeof e)return X(e,!(!(n=e.prototype)||!n.isReactComponent));var n;if("string"==typeof e)return Y(e);switch(e){case u:return Y("Suspense");case p:return Y("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case l:return X(e.render,!1);case y:return B(e.type,r,t);case d:var o=e,a=o._payload,i=o._init;try{return B(i(a),r,t)}catch(e){}}return""}M=new A;var V=Object.prototype.hasOwnProperty,q={},H=b.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=B(e.type,e._source,r?r.type:null);H.setExtraStackFrame(t)}else H.setExtraStackFrame(null)}var G=Array.isArray;function K(e){return G(e)}function Q(e){return""+e}function Z(e){if(function(e){try{return Q(e),!1}catch(e){return!0}}(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),Q(e)}var ee,re,te,ne=b.ReactCurrentOwner,oe={key:!0,ref:!0,__self:!0,__source:!0};te={};var ae=function(e,r,n,o,a,i,c){var s={$$typeof:t,type:e,key:r,ref:n,props:c,_owner:i,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function ie(e,r,t,n,o){var a,i={},c=null,s=null;for(a in void 0!==t&&(Z(t),c=""+t),function(e){if(V.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return void 0!==e.key}(r)&&(Z(r.key),c=""+r.key),function(e){if(V.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return void 0!==e.ref}(r)&&(s=r.ref,function(e,r){if("string"==typeof e.ref&&ne.current&&r&&ne.current.stateNode!==r){var t=T(ne.current.type);te[t]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(ne.current.type),e.ref),te[t]=!0)}}(r,o)),r)V.call(r,a)&&!oe.hasOwnProperty(a)&&(i[a]=r[a]);if(e&&e.defaultProps){var l=e.defaultProps;for(a in l)void 0===i[a]&&(i[a]=l[a])}if(c||s){var u="function"==typeof e?e.displayName||e.name||"Unknown":e;c&&function(e,r){var t=function(){ee||(ee=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}(i,u),s&&function(e,r){var t=function(){re||(re=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}(i,u)}return ae(e,c,s,o,n,ne.current,i)}var ce,se=b.ReactCurrentOwner,le=b.ReactDebugCurrentFrame;function ue(e){if(e){var r=e._owner,t=B(e.type,e._source,r?r.type:null);le.setExtraStackFrame(t)}else le.setExtraStackFrame(null)}function fe(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function pe(){if(se.current){var e=T(se.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ce=!1;var ye={};function de(e,r){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var t=function(e){var r=pe();if(!r){var t="string"==typeof e?e:e.displayName||e.name;t&&(r="\n\nCheck the top-level render call using <"+t+">.")}return r}(r);if(!ye[t]){ye[t]=!0;var n="";e&&e._owner&&e._owner!==se.current&&(n=" It was passed a child from "+T(e._owner.type)+"."),ue(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),ue(null)}}}function ve(e,r){if("object"==typeof e)if(K(e))for(var t=0;t<e.length;t++){var n=e[t];fe(n)&&de(n,r)}else if(fe(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var r=m&&e[m]||e[g];return"function"==typeof r?r:null}(e);if("function"==typeof o&&o!==e.entries)for(var a,i=o.call(e);!(a=i.next()).done;)fe(a.value)&&de(a.value,r)}}function me(e){var r,t=e.type;if(null!=t&&"string"!=typeof t){if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==l&&t.$$typeof!==y)return;r=t.propTypes}if(r){var n=T(t);!function(e,r,t,n,o){var a=Function.call.bind(V);for(var i in e)if(a(e,i)){var c=void 0;try{if("function"!=typeof e[i]){var s=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}c=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){c=e}!c||c instanceof Error||(J(o),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof c),J(null)),c instanceof Error&&!(c.message in q)&&(q[c.message]=!0,J(o),h("Failed %s type: %s",t,c.message),J(null))}}(r,e.props,"prop",n,e)}else if(void 0!==t.PropTypes&&!ce){ce=!0,h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(t)||"Unknown")}"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ge(e,r,n,f,m,g){var b=function(e){return"string"==typeof e||"function"==typeof e||!!(e===o||e===i||S||e===a||e===u||e===p||k||e===v||O||w||j)||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===y||e.$$typeof===c||e.$$typeof===s||e.$$typeof===l||e.$$typeof===_||void 0!==e.getModuleId)}(e);if(!b){var R="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(R+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var E,P=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(m);R+=P||pe(),null===e?E="null":K(e)?E="array":void 0!==e&&e.$$typeof===t?(E="<"+(T(e.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):E=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,R)}var x=ie(e,r,n,m,g);if(null==x)return x;if(b){var N=r.children;if(void 0!==N)if(f)if(K(N)){for(var $=0;$<N.length;$++)ve(N[$],e);Object.freeze&&Object.freeze(N)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ve(N,e)}return e===o?function(e){for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if("children"!==n&&"key"!==n){ue(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),ue(null);break}}null!==e.ref&&(ue(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),ue(null))}(x):me(x),x}var be=function(e,r,t){return ge(e,r,t,!1)},he=function(e,r,t){return ge(e,r,t,!0)};f.Fragment=o,f.jsx=be,f.jsxs=he}()),f}u={get exports(){return c},set exports(e){c=e}},"production"===process.env.NODE_ENV?u.exports=function(){if(i)return s;i=1;var r=e,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,r,n){var i,s={},l=null,u=null;for(i in void 0!==n&&(l=""+n),void 0!==r.key&&(l=""+r.key),void 0!==r.ref&&(u=r.ref),r)o.call(r,i)&&!c.hasOwnProperty(i)&&(s[i]=r[i]);if(e&&e.defaultProps)for(i in r=e.defaultProps)void 0===s[i]&&(s[i]=r[i]);return{$$typeof:t,type:e,key:l,ref:u,props:s,_owner:a.current}}return s.Fragment=n,s.jsx=l,s.jsxs=l,s}():u.exports=p();var y={opacity:0,maxWidth:"100%"},d=e.forwardRef((function(i,s){var l=a(i,[]),u=l.dragMode,f=void 0===u?"crop":u,p=l.src,d=l.style,v=l.className,m=l.crossOrigin,g=l.scaleX,b=l.scaleY,h=l.enable,_=l.zoomTo,O=l.rotateTo,w=l.alt,j=void 0===w?"picture":w,k=l.ready,S=l.onInitialized,R=a(l,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),T={scaleY:b,scaleX:g,enable:h,zoomTo:_,rotateTo:O},E=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=r(null);return e.useEffect((function(){t.forEach((function(e){e&&("function"==typeof e?e(o.current):e.current=o.current)}))}),[t]),o}(s,r(null));t((function(){var e;(null===(e=E.current)||void 0===e?void 0:e.cropper)&&"number"==typeof _&&E.current.cropper.zoomTo(_)}),[l.zoomTo]),t((function(){var e;(null===(e=E.current)||void 0===e?void 0:e.cropper)&&void 0!==p&&E.current.cropper.reset().clear().replace(p)}),[p]),t((function(){if(null!==E.current){var e=new n(E.current,o(o({dragMode:f},R),{ready:function(e){null!==e.currentTarget&&function(e,r){void 0===r&&(r={});var t=r.enable,n=void 0===t||t,o=r.scaleX,a=void 0===o?1:o,i=r.scaleY,c=void 0===i?1:i,s=r.zoomTo,l=void 0===s?0:s,u=r.rotateTo;n?e.enable():e.disable(),e.scaleX(a),e.scaleY(c),void 0!==u&&e.rotateTo(u),l>0&&e.zoomTo(l)}(e.currentTarget.cropper,T),k&&k(e)}}));S&&S(e)}return function(){var e,r;null===(r=null===(e=E.current)||void 0===e?void 0:e.cropper)||void 0===r||r.destroy()}}),[E]);var P=e.useMemo((function(){return o(o({},R),{crossOrigin:m,src:p,alt:j})}),[R,m,p,j]);return c.jsx("div",o({style:d,className:v},{children:c.jsx("img",o({},P,{style:y,ref:E}))}))}));export{d as Cropper,d as default};
*/function p(){return s||(s=1,"production"!==process.env.NODE_ENV&&function(){var r=e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];!function(e,r,t){var n=b.ReactDebugCurrentFrame,o=n.getStackAddendum();""!==o&&(r+="%s",t=t.concat([o]));var a=t.map((function(e){return String(e)}));a.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,a)}("error",e,t)}var O,_=!1,w=!1,k=!1,j=!1,S=!1;function R(e){return e.displayName||"Context"}function T(e){if(null==e)return null;if("number"==typeof e.tag&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case n:return"Portal";case i:return"Profiler";case a:return"StrictMode";case u:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case l:return R(e)+".Consumer";case c:return R(e._context)+".Provider";case s:return function(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return""!==o?t+"("+o+")":t}(e,e.render,"ForwardRef");case y:var r=e.displayName||null;return null!==r?r:T(e.type)||"Memo";case d:var t=e,f=t._payload,v=t._init;try{return T(v(f))}catch(e){return null}}return null}O=Symbol.for("react.module.reference");var E,x,P,C,N,$,D,z=Object.assign,F=0;function I(){}I.__reactDisabledLog=!0;var W,M=b.ReactCurrentDispatcher;function L(e,r,t){if(void 0===W)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);W=n&&n[1]||""}return"\n"+W+e}var Y,A=!1,U="function"==typeof WeakMap?WeakMap:Map;function B(e,r){if(!e||A)return"";var t,n=Y.get(e);if(void 0!==n)return n;A=!0;var o,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=M.current,M.current=null,function(){if(0===F){E=console.log,x=console.info,P=console.warn,C=console.error,N=console.group,$=console.groupCollapsed,D=console.groupEnd;var e={configurable:!0,enumerable:!0,value:I,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}F++}();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(i,[])}catch(e){t=e}Reflect.construct(e,[],i)}else{try{i.call()}catch(e){t=e}e.call(i.prototype)}}else{try{throw Error()}catch(e){t=e}e()}}catch(r){if(r&&t&&"string"==typeof r.stack){for(var c=r.stack.split("\n"),l=t.stack.split("\n"),s=c.length-1,u=l.length-1;s>=1&&u>=0&&c[s]!==l[u];)u--;for(;s>=1&&u>=0;s--,u--)if(c[s]!==l[u]){if(1!==s||1!==u)do{if(s--,--u<0||c[s]!==l[u]){var f="\n"+c[s].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&Y.set(e,f),f}}while(s>=1&&u>=0);break}}}finally{A=!1,M.current=o,function(){if(0==--F){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:z({},e,{value:E}),info:z({},e,{value:x}),warn:z({},e,{value:P}),error:z({},e,{value:C}),group:z({},e,{value:N}),groupCollapsed:z({},e,{value:$}),groupEnd:z({},e,{value:D})})}F<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var p=e?e.displayName||e.name:"",y=p?L(p):"";return"function"==typeof e&&Y.set(e,y),y}function X(e,r,t){if(null==e)return"";if("function"==typeof e)return B(e,!(!(n=e.prototype)||!n.isReactComponent));var n;if("string"==typeof e)return L(e);switch(e){case u:return L("Suspense");case p:return L("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case s:return B(e.render,!1);case y:return X(e.type,r,t);case d:var o=e,a=o._payload,i=o._init;try{return X(i(a),r,t)}catch(e){}}return""}Y=new U;var H=Object.prototype.hasOwnProperty,V={},q=b.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=X(e.type,e._source,r?r.type:null);q.setExtraStackFrame(t)}else q.setExtraStackFrame(null)}var Z=Array.isArray;function G(e){return Z(e)}function K(e){return""+e}function Q(e){if(function(e){try{return K(e),!1}catch(e){return!0}}(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),K(e)}var ee,re,te,ne=b.ReactCurrentOwner,oe={key:!0,ref:!0,__self:!0,__source:!0};te={};var ae=function(e,r,n,o,a,i,c){var l={$$typeof:t,type:e,key:r,ref:n,props:c,_owner:i,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function ie(e,r,t,n,o){var a,i={},c=null,l=null;for(a in void 0!==t&&(Q(t),c=""+t),function(e){if(H.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return void 0!==e.key}(r)&&(Q(r.key),c=""+r.key),function(e){if(H.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return void 0!==e.ref}(r)&&(l=r.ref,function(e,r){if("string"==typeof e.ref&&ne.current&&r&&ne.current.stateNode!==r){var t=T(ne.current.type);te[t]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(ne.current.type),e.ref),te[t]=!0)}}(r,o)),r)H.call(r,a)&&!oe.hasOwnProperty(a)&&(i[a]=r[a]);if(e&&e.defaultProps){var s=e.defaultProps;for(a in s)void 0===i[a]&&(i[a]=s[a])}if(c||l){var u="function"==typeof e?e.displayName||e.name||"Unknown":e;c&&function(e,r){var t=function(){ee||(ee=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}(i,u),l&&function(e,r){var t=function(){re||(re=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}(i,u)}return ae(e,c,l,o,n,ne.current,i)}var ce,le=b.ReactCurrentOwner,se=b.ReactDebugCurrentFrame;function ue(e){if(e){var r=e._owner,t=X(e.type,e._source,r?r.type:null);se.setExtraStackFrame(t)}else se.setExtraStackFrame(null)}function fe(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function pe(){if(le.current){var e=T(le.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ce=!1;var ye={};function de(e,r){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var t=function(e){var r=pe();if(!r){var t="string"==typeof e?e:e.displayName||e.name;t&&(r="\n\nCheck the top-level render call using <"+t+">.")}return r}(r);if(!ye[t]){ye[t]=!0;var n="";e&&e._owner&&e._owner!==le.current&&(n=" It was passed a child from "+T(e._owner.type)+"."),ue(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),ue(null)}}}function ve(e,r){if("object"==typeof e)if(G(e))for(var t=0;t<e.length;t++){var n=e[t];fe(n)&&de(n,r)}else if(fe(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var r=m&&e[m]||e[g];return"function"==typeof r?r:null}(e);if("function"==typeof o&&o!==e.entries)for(var a,i=o.call(e);!(a=i.next()).done;)fe(a.value)&&de(a.value,r)}}function me(e){var r,t=e.type;if(null!=t&&"string"!=typeof t){if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==s&&t.$$typeof!==y)return;r=t.propTypes}if(r){var n=T(t);!function(e,r,t,n,o){var a=Function.call.bind(H);for(var i in e)if(a(e,i)){var c=void 0;try{if("function"!=typeof e[i]){var l=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}c=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){c=e}!c||c instanceof Error||(J(o),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof c),J(null)),c instanceof Error&&!(c.message in V)&&(V[c.message]=!0,J(o),h("Failed %s type: %s",t,c.message),J(null))}}(r,e.props,"prop",n,e)}else if(void 0!==t.PropTypes&&!ce){ce=!0,h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(t)||"Unknown")}"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ge(e,r,n,f,m,g){var b=function(e){return"string"==typeof e||"function"==typeof e||!!(e===o||e===i||S||e===a||e===u||e===p||j||e===v||_||w||k)||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===y||e.$$typeof===c||e.$$typeof===l||e.$$typeof===s||e.$$typeof===O||void 0!==e.getModuleId)}(e);if(!b){var R="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(R+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var E,x=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(m);R+=x||pe(),null===e?E="null":G(e)?E="array":void 0!==e&&e.$$typeof===t?(E="<"+(T(e.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):E=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,R)}var P=ie(e,r,n,m,g);if(null==P)return P;if(b){var C=r.children;if(void 0!==C)if(f)if(G(C)){for(var N=0;N<C.length;N++)ve(C[N],e);Object.freeze&&Object.freeze(C)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ve(C,e)}return e===o?function(e){for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if("children"!==n&&"key"!==n){ue(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),ue(null);break}}null!==e.ref&&(ue(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),ue(null))}(P):me(P),P}var be=function(e,r,t){return ge(e,r,t,!1)},he=function(e,r,t){return ge(e,r,t,!0)};f.Fragment=o,f.jsx=be,f.jsxs=he}()),f}u={get exports(){return c},set exports(e){c=e}},"production"===process.env.NODE_ENV?u.exports=function(){if(i)return l;i=1;var r=e,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,r,n){var i,l={},s=null,u=null;for(i in void 0!==n&&(s=""+n),void 0!==r.key&&(s=""+r.key),void 0!==r.ref&&(u=r.ref),r)o.call(r,i)&&!c.hasOwnProperty(i)&&(l[i]=r[i]);if(e&&e.defaultProps)for(i in r=e.defaultProps)void 0===l[i]&&(l[i]=r[i]);return{$$typeof:t,type:e,key:s,ref:u,props:l,_owner:a.current}}return l.Fragment=n,l.jsx=s,l.jsxs=s,l}():u.exports=p();var y=["aspectRatio","autoCrop","autoCropArea","background","center","checkCrossOrigin","checkOrientation","cropBoxMovable","cropBoxResizable","data","dragMode","guides","highlight","initialAspectRatio","minCanvasHeight","minCanvasWidth","minContainerHeight","minContainerWidth","minCropBoxHeight","minCropBoxWidth","modal","movable","preview","responsive","restore","rotatable","scalable","toggleDragModeOnDblclick","viewMode","wheelZoomRatio","zoomOnTouch","zoomOnWheel","zoomable","cropstart","cropmove","cropend","crop","zoom","ready"],d={opacity:0,maxWidth:"100%"},v=e.forwardRef((function(i,l){var s=a(i,[]),u=s.dragMode,f=void 0===u?"crop":u,p=s.src,v=s.style,m=s.className,g=s.crossOrigin,b=s.scaleX,h=s.scaleY,O=s.enable,_=s.zoomTo,w=s.rotateTo,k=s.alt,j=void 0===k?"picture":k,S=s.ready,R=s.onInitialized,T=a(s,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),E={scaleY:h,scaleX:b,enable:O,zoomTo:_,rotateTo:w},x=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=r(null);return e.useEffect((function(){t.forEach((function(e){e&&("function"==typeof e?e(o.current):e.current=o.current)}))}),[t]),o}(l,r(null));t((function(){var e;(null===(e=x.current)||void 0===e?void 0:e.cropper)&&"number"==typeof _&&x.current.cropper.zoomTo(_)}),[s.zoomTo]),t((function(){var e;(null===(e=x.current)||void 0===e?void 0:e.cropper)&&void 0!==p&&x.current.cropper.reset().clear().replace(p)}),[p]),t((function(){if(null!==x.current){var e=new n(x.current,o(o({dragMode:f},T),{ready:function(e){null!==e.currentTarget&&function(e,r){void 0===r&&(r={});var t=r.enable,n=void 0===t||t,o=r.scaleX,a=void 0===o?1:o,i=r.scaleY,c=void 0===i?1:i,l=r.zoomTo,s=void 0===l?0:l,u=r.rotateTo;n?e.enable():e.disable(),e.scaleX(a),e.scaleY(c),void 0!==u&&e.rotateTo(u),s>0&&e.zoomTo(s)}(e.currentTarget.cropper,E),S&&S(e)}}));R&&R(e)}return function(){var e,r;null===(r=null===(e=x.current)||void 0===e?void 0:e.cropper)||void 0===r||r.destroy()}}),[x]);var P=function(e){return y.reduce((function(e,r){var t=e,n=r;return t[n],a(t,["symbol"==typeof n?n:n+""])}),e)}(o(o({},T),{crossOrigin:g,src:p,alt:j}));return c.jsx("div",o({style:v,className:m},{children:c.jsx("img",o({},P,{style:d,ref:x}))}))}));export{v as Cropper,v as default};

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("cropperjs"),t=function(){return t=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},t.apply(this,arguments)};function n(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t}var o,a={},i={};var c,s,u={};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("cropperjs"),t=function(){return t=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},t.apply(this,arguments)};function n(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t}var o,a={},i={};var c,s,l={};
/**

@@ -10,2 +10,2 @@ * @license React

* LICENSE file in the root directory of this source tree.
*/function l(){return c||(c=1,"production"!==process.env.NODE_ENV&&function(){var r=e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];!function(e,r,t){var n=b.ReactDebugCurrentFrame,o=n.getStackAddendum();""!==o&&(r+="%s",t=t.concat([o]));var a=t.map((function(e){return String(e)}));a.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,a)}("error",e,t)}var _,O=!1,w=!1,j=!1,k=!1,S=!1;function R(e){return e.displayName||"Context"}function E(e){if(null==e)return null;if("number"==typeof e.tag&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case n:return"Portal";case i:return"Profiler";case a:return"StrictMode";case f:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case s:return R(e)+".Consumer";case c:return R(e._context)+".Provider";case l:return function(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return""!==o?t+"("+o+")":t}(e,e.render,"ForwardRef");case y:var r=e.displayName||null;return null!==r?r:E(e.type)||"Memo";case d:var t=e,u=t._payload,v=t._init;try{return E(v(u))}catch(e){return null}}return null}_=Symbol.for("react.module.reference");var T,P,x,N,$,C,D,F=Object.assign,I=0;function z(){}z.__reactDisabledLog=!0;var L,W=b.ReactCurrentDispatcher;function M(e,r,t){if(void 0===L)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);L=n&&n[1]||""}return"\n"+L+e}var Y,U=!1,A="function"==typeof WeakMap?WeakMap:Map;function X(e,r){if(!e||U)return"";var t,n=Y.get(e);if(void 0!==n)return n;U=!0;var o,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=W.current,W.current=null,function(){if(0===I){T=console.log,P=console.info,x=console.warn,N=console.error,$=console.group,C=console.groupCollapsed,D=console.groupEnd;var e={configurable:!0,enumerable:!0,value:z,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}I++}();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(i,[])}catch(e){t=e}Reflect.construct(e,[],i)}else{try{i.call()}catch(e){t=e}e.call(i.prototype)}}else{try{throw Error()}catch(e){t=e}e()}}catch(r){if(r&&t&&"string"==typeof r.stack){for(var c=r.stack.split("\n"),s=t.stack.split("\n"),u=c.length-1,l=s.length-1;u>=1&&l>=0&&c[u]!==s[l];)l--;for(;u>=1&&l>=0;u--,l--)if(c[u]!==s[l]){if(1!==u||1!==l)do{if(u--,--l<0||c[u]!==s[l]){var f="\n"+c[u].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&Y.set(e,f),f}}while(u>=1&&l>=0);break}}}finally{U=!1,W.current=o,function(){if(0==--I){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:T}),info:F({},e,{value:P}),warn:F({},e,{value:x}),error:F({},e,{value:N}),group:F({},e,{value:$}),groupCollapsed:F({},e,{value:C}),groupEnd:F({},e,{value:D})})}I<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var p=e?e.displayName||e.name:"",y=p?M(p):"";return"function"==typeof e&&Y.set(e,y),y}function q(e,r,t){if(null==e)return"";if("function"==typeof e)return X(e,!(!(n=e.prototype)||!n.isReactComponent));var n;if("string"==typeof e)return M(e);switch(e){case f:return M("Suspense");case p:return M("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case l:return X(e.render,!1);case y:return q(e.type,r,t);case d:var o=e,a=o._payload,i=o._init;try{return q(i(a),r,t)}catch(e){}}return""}Y=new A;var B=Object.prototype.hasOwnProperty,V={},H=b.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=q(e.type,e._source,r?r.type:null);H.setExtraStackFrame(t)}else H.setExtraStackFrame(null)}var G=Array.isArray;function K(e){return G(e)}function Q(e){return""+e}function Z(e){if(function(e){try{return Q(e),!1}catch(e){return!0}}(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),Q(e)}var ee,re,te,ne=b.ReactCurrentOwner,oe={key:!0,ref:!0,__self:!0,__source:!0};te={};var ae=function(e,r,n,o,a,i,c){var s={$$typeof:t,type:e,key:r,ref:n,props:c,_owner:i,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function ie(e,r,t,n,o){var a,i={},c=null,s=null;for(a in void 0!==t&&(Z(t),c=""+t),function(e){if(B.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return void 0!==e.key}(r)&&(Z(r.key),c=""+r.key),function(e){if(B.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return void 0!==e.ref}(r)&&(s=r.ref,function(e,r){if("string"==typeof e.ref&&ne.current&&r&&ne.current.stateNode!==r){var t=E(ne.current.type);te[t]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',E(ne.current.type),e.ref),te[t]=!0)}}(r,o)),r)B.call(r,a)&&!oe.hasOwnProperty(a)&&(i[a]=r[a]);if(e&&e.defaultProps){var u=e.defaultProps;for(a in u)void 0===i[a]&&(i[a]=u[a])}if(c||s){var l="function"==typeof e?e.displayName||e.name||"Unknown":e;c&&function(e,r){var t=function(){ee||(ee=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}(i,l),s&&function(e,r){var t=function(){re||(re=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}(i,l)}return ae(e,c,s,o,n,ne.current,i)}var ce,se=b.ReactCurrentOwner,ue=b.ReactDebugCurrentFrame;function le(e){if(e){var r=e._owner,t=q(e.type,e._source,r?r.type:null);ue.setExtraStackFrame(t)}else ue.setExtraStackFrame(null)}function fe(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function pe(){if(se.current){var e=E(se.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ce=!1;var ye={};function de(e,r){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var t=function(e){var r=pe();if(!r){var t="string"==typeof e?e:e.displayName||e.name;t&&(r="\n\nCheck the top-level render call using <"+t+">.")}return r}(r);if(!ye[t]){ye[t]=!0;var n="";e&&e._owner&&e._owner!==se.current&&(n=" It was passed a child from "+E(e._owner.type)+"."),le(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),le(null)}}}function ve(e,r){if("object"==typeof e)if(K(e))for(var t=0;t<e.length;t++){var n=e[t];fe(n)&&de(n,r)}else if(fe(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var r=m&&e[m]||e[g];return"function"==typeof r?r:null}(e);if("function"==typeof o&&o!==e.entries)for(var a,i=o.call(e);!(a=i.next()).done;)fe(a.value)&&de(a.value,r)}}function me(e){var r,t=e.type;if(null!=t&&"string"!=typeof t){if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==l&&t.$$typeof!==y)return;r=t.propTypes}if(r){var n=E(t);!function(e,r,t,n,o){var a=Function.call.bind(B);for(var i in e)if(a(e,i)){var c=void 0;try{if("function"!=typeof e[i]){var s=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}c=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){c=e}!c||c instanceof Error||(J(o),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof c),J(null)),c instanceof Error&&!(c.message in V)&&(V[c.message]=!0,J(o),h("Failed %s type: %s",t,c.message),J(null))}}(r,e.props,"prop",n,e)}else if(void 0!==t.PropTypes&&!ce){ce=!0,h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",E(t)||"Unknown")}"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ge(e,r,n,u,m,g){var b=function(e){return"string"==typeof e||"function"==typeof e||!!(e===o||e===i||S||e===a||e===f||e===p||k||e===v||O||w||j)||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===y||e.$$typeof===c||e.$$typeof===s||e.$$typeof===l||e.$$typeof===_||void 0!==e.getModuleId)}(e);if(!b){var R="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(R+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var T,P=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(m);R+=P||pe(),null===e?T="null":K(e)?T="array":void 0!==e&&e.$$typeof===t?(T="<"+(E(e.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):T=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",T,R)}var x=ie(e,r,n,m,g);if(null==x)return x;if(b){var N=r.children;if(void 0!==N)if(u)if(K(N)){for(var $=0;$<N.length;$++)ve(N[$],e);Object.freeze&&Object.freeze(N)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ve(N,e)}return e===o?function(e){for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if("children"!==n&&"key"!==n){le(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),le(null);break}}null!==e.ref&&(le(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),le(null))}(x):me(x),x}var be=function(e,r,t){return ge(e,r,t,!1)},he=function(e,r,t){return ge(e,r,t,!0)};u.Fragment=o,u.jsx=be,u.jsxs=he}()),u}s={get exports(){return a},set exports(e){a=e}},"production"===process.env.NODE_ENV?s.exports=function(){if(o)return i;o=1;var r=e,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(e,r,n){var o,i={},u=null,l=null;for(o in void 0!==n&&(u=""+n),void 0!==r.key&&(u=""+r.key),void 0!==r.ref&&(l=r.ref),r)a.call(r,o)&&!s.hasOwnProperty(o)&&(i[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===i[o]&&(i[o]=r[o]);return{$$typeof:t,type:e,key:u,ref:l,props:i,_owner:c.current}}return i.Fragment=n,i.jsx=u,i.jsxs=u,i}():s.exports=l();var f={opacity:0,maxWidth:"100%"},p=e.forwardRef((function(o,i){var c=n(o,[]),s=c.dragMode,u=void 0===s?"crop":s,l=c.src,p=c.style,y=c.className,d=c.crossOrigin,v=c.scaleX,m=c.scaleY,g=c.enable,b=c.zoomTo,h=c.rotateTo,_=c.alt,O=void 0===_?"picture":_,w=c.ready,j=c.onInitialized,k=n(c,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),S={scaleY:m,scaleX:v,enable:g,zoomTo:b,rotateTo:h},R=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=e.useRef(null);return e.useEffect((function(){r.forEach((function(e){e&&("function"==typeof e?e(n.current):e.current=n.current)}))}),[r]),n}(i,e.useRef(null));e.useEffect((function(){var e;(null===(e=R.current)||void 0===e?void 0:e.cropper)&&"number"==typeof b&&R.current.cropper.zoomTo(b)}),[c.zoomTo]),e.useEffect((function(){var e;(null===(e=R.current)||void 0===e?void 0:e.cropper)&&void 0!==l&&R.current.cropper.reset().clear().replace(l)}),[l]),e.useEffect((function(){if(null!==R.current){var e=new r(R.current,t(t({dragMode:u},k),{ready:function(e){null!==e.currentTarget&&function(e,r){void 0===r&&(r={});var t=r.enable,n=void 0===t||t,o=r.scaleX,a=void 0===o?1:o,i=r.scaleY,c=void 0===i?1:i,s=r.zoomTo,u=void 0===s?0:s,l=r.rotateTo;n?e.enable():e.disable(),e.scaleX(a),e.scaleY(c),void 0!==l&&e.rotateTo(l),u>0&&e.zoomTo(u)}(e.currentTarget.cropper,S),w&&w(e)}}));j&&j(e)}return function(){var e,r;null===(r=null===(e=R.current)||void 0===e?void 0:e.cropper)||void 0===r||r.destroy()}}),[R]);var E=e.useMemo((function(){return t(t({},k),{crossOrigin:d,src:l,alt:O})}),[k,d,l,O]);return a.jsx("div",t({style:p,className:y},{children:a.jsx("img",t({},E,{style:f,ref:R}))}))}));exports.Cropper=p,exports.default=p;
*/function u(){return c||(c=1,"production"!==process.env.NODE_ENV&&function(){var r=e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];!function(e,r,t){var n=b.ReactDebugCurrentFrame,o=n.getStackAddendum();""!==o&&(r+="%s",t=t.concat([o]));var a=t.map((function(e){return String(e)}));a.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,a)}("error",e,t)}var _,O=!1,w=!1,k=!1,j=!1,S=!1;function R(e){return e.displayName||"Context"}function E(e){if(null==e)return null;if("number"==typeof e.tag&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case n:return"Portal";case i:return"Profiler";case a:return"StrictMode";case f:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case s:return R(e)+".Consumer";case c:return R(e._context)+".Provider";case u:return function(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return""!==o?t+"("+o+")":t}(e,e.render,"ForwardRef");case y:var r=e.displayName||null;return null!==r?r:E(e.type)||"Memo";case d:var t=e,l=t._payload,v=t._init;try{return E(v(l))}catch(e){return null}}return null}_=Symbol.for("react.module.reference");var T,x,P,C,N,$,D,z=Object.assign,F=0;function I(){}I.__reactDisabledLog=!0;var W,M=b.ReactCurrentDispatcher;function L(e,r,t){if(void 0===W)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);W=n&&n[1]||""}return"\n"+W+e}var Y,A=!1,U="function"==typeof WeakMap?WeakMap:Map;function B(e,r){if(!e||A)return"";var t,n=Y.get(e);if(void 0!==n)return n;A=!0;var o,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=M.current,M.current=null,function(){if(0===F){T=console.log,x=console.info,P=console.warn,C=console.error,N=console.group,$=console.groupCollapsed,D=console.groupEnd;var e={configurable:!0,enumerable:!0,value:I,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}F++}();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(i,[])}catch(e){t=e}Reflect.construct(e,[],i)}else{try{i.call()}catch(e){t=e}e.call(i.prototype)}}else{try{throw Error()}catch(e){t=e}e()}}catch(r){if(r&&t&&"string"==typeof r.stack){for(var c=r.stack.split("\n"),s=t.stack.split("\n"),l=c.length-1,u=s.length-1;l>=1&&u>=0&&c[l]!==s[u];)u--;for(;l>=1&&u>=0;l--,u--)if(c[l]!==s[u]){if(1!==l||1!==u)do{if(l--,--u<0||c[l]!==s[u]){var f="\n"+c[l].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&Y.set(e,f),f}}while(l>=1&&u>=0);break}}}finally{A=!1,M.current=o,function(){if(0==--F){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:z({},e,{value:T}),info:z({},e,{value:x}),warn:z({},e,{value:P}),error:z({},e,{value:C}),group:z({},e,{value:N}),groupCollapsed:z({},e,{value:$}),groupEnd:z({},e,{value:D})})}F<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var p=e?e.displayName||e.name:"",y=p?L(p):"";return"function"==typeof e&&Y.set(e,y),y}function X(e,r,t){if(null==e)return"";if("function"==typeof e)return B(e,!(!(n=e.prototype)||!n.isReactComponent));var n;if("string"==typeof e)return L(e);switch(e){case f:return L("Suspense");case p:return L("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case u:return B(e.render,!1);case y:return X(e.type,r,t);case d:var o=e,a=o._payload,i=o._init;try{return X(i(a),r,t)}catch(e){}}return""}Y=new U;var q=Object.prototype.hasOwnProperty,H={},V=b.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=X(e.type,e._source,r?r.type:null);V.setExtraStackFrame(t)}else V.setExtraStackFrame(null)}var Z=Array.isArray;function G(e){return Z(e)}function K(e){return""+e}function Q(e){if(function(e){try{return K(e),!1}catch(e){return!0}}(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),K(e)}var ee,re,te,ne=b.ReactCurrentOwner,oe={key:!0,ref:!0,__self:!0,__source:!0};te={};var ae=function(e,r,n,o,a,i,c){var s={$$typeof:t,type:e,key:r,ref:n,props:c,_owner:i,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function ie(e,r,t,n,o){var a,i={},c=null,s=null;for(a in void 0!==t&&(Q(t),c=""+t),function(e){if(q.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return void 0!==e.key}(r)&&(Q(r.key),c=""+r.key),function(e){if(q.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return void 0!==e.ref}(r)&&(s=r.ref,function(e,r){if("string"==typeof e.ref&&ne.current&&r&&ne.current.stateNode!==r){var t=E(ne.current.type);te[t]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',E(ne.current.type),e.ref),te[t]=!0)}}(r,o)),r)q.call(r,a)&&!oe.hasOwnProperty(a)&&(i[a]=r[a]);if(e&&e.defaultProps){var l=e.defaultProps;for(a in l)void 0===i[a]&&(i[a]=l[a])}if(c||s){var u="function"==typeof e?e.displayName||e.name||"Unknown":e;c&&function(e,r){var t=function(){ee||(ee=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}(i,u),s&&function(e,r){var t=function(){re||(re=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}(i,u)}return ae(e,c,s,o,n,ne.current,i)}var ce,se=b.ReactCurrentOwner,le=b.ReactDebugCurrentFrame;function ue(e){if(e){var r=e._owner,t=X(e.type,e._source,r?r.type:null);le.setExtraStackFrame(t)}else le.setExtraStackFrame(null)}function fe(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function pe(){if(se.current){var e=E(se.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ce=!1;var ye={};function de(e,r){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var t=function(e){var r=pe();if(!r){var t="string"==typeof e?e:e.displayName||e.name;t&&(r="\n\nCheck the top-level render call using <"+t+">.")}return r}(r);if(!ye[t]){ye[t]=!0;var n="";e&&e._owner&&e._owner!==se.current&&(n=" It was passed a child from "+E(e._owner.type)+"."),ue(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),ue(null)}}}function ve(e,r){if("object"==typeof e)if(G(e))for(var t=0;t<e.length;t++){var n=e[t];fe(n)&&de(n,r)}else if(fe(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var r=m&&e[m]||e[g];return"function"==typeof r?r:null}(e);if("function"==typeof o&&o!==e.entries)for(var a,i=o.call(e);!(a=i.next()).done;)fe(a.value)&&de(a.value,r)}}function me(e){var r,t=e.type;if(null!=t&&"string"!=typeof t){if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==u&&t.$$typeof!==y)return;r=t.propTypes}if(r){var n=E(t);!function(e,r,t,n,o){var a=Function.call.bind(q);for(var i in e)if(a(e,i)){var c=void 0;try{if("function"!=typeof e[i]){var s=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}c=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){c=e}!c||c instanceof Error||(J(o),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof c),J(null)),c instanceof Error&&!(c.message in H)&&(H[c.message]=!0,J(o),h("Failed %s type: %s",t,c.message),J(null))}}(r,e.props,"prop",n,e)}else if(void 0!==t.PropTypes&&!ce){ce=!0,h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",E(t)||"Unknown")}"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ge(e,r,n,l,m,g){var b=function(e){return"string"==typeof e||"function"==typeof e||!!(e===o||e===i||S||e===a||e===f||e===p||j||e===v||O||w||k)||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===y||e.$$typeof===c||e.$$typeof===s||e.$$typeof===u||e.$$typeof===_||void 0!==e.getModuleId)}(e);if(!b){var R="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(R+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var T,x=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(m);R+=x||pe(),null===e?T="null":G(e)?T="array":void 0!==e&&e.$$typeof===t?(T="<"+(E(e.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):T=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",T,R)}var P=ie(e,r,n,m,g);if(null==P)return P;if(b){var C=r.children;if(void 0!==C)if(l)if(G(C)){for(var N=0;N<C.length;N++)ve(C[N],e);Object.freeze&&Object.freeze(C)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ve(C,e)}return e===o?function(e){for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if("children"!==n&&"key"!==n){ue(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),ue(null);break}}null!==e.ref&&(ue(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),ue(null))}(P):me(P),P}var be=function(e,r,t){return ge(e,r,t,!1)},he=function(e,r,t){return ge(e,r,t,!0)};l.Fragment=o,l.jsx=be,l.jsxs=he}()),l}s={get exports(){return a},set exports(e){a=e}},"production"===process.env.NODE_ENV?s.exports=function(){if(o)return i;o=1;var r=e,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(e,r,n){var o,i={},l=null,u=null;for(o in void 0!==n&&(l=""+n),void 0!==r.key&&(l=""+r.key),void 0!==r.ref&&(u=r.ref),r)a.call(r,o)&&!s.hasOwnProperty(o)&&(i[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===i[o]&&(i[o]=r[o]);return{$$typeof:t,type:e,key:l,ref:u,props:i,_owner:c.current}}return i.Fragment=n,i.jsx=l,i.jsxs=l,i}():s.exports=u();var f=["aspectRatio","autoCrop","autoCropArea","background","center","checkCrossOrigin","checkOrientation","cropBoxMovable","cropBoxResizable","data","dragMode","guides","highlight","initialAspectRatio","minCanvasHeight","minCanvasWidth","minContainerHeight","minContainerWidth","minCropBoxHeight","minCropBoxWidth","modal","movable","preview","responsive","restore","rotatable","scalable","toggleDragModeOnDblclick","viewMode","wheelZoomRatio","zoomOnTouch","zoomOnWheel","zoomable","cropstart","cropmove","cropend","crop","zoom","ready"],p={opacity:0,maxWidth:"100%"},y=e.forwardRef((function(o,i){var c=n(o,[]),s=c.dragMode,l=void 0===s?"crop":s,u=c.src,y=c.style,d=c.className,v=c.crossOrigin,m=c.scaleX,g=c.scaleY,b=c.enable,h=c.zoomTo,_=c.rotateTo,O=c.alt,w=void 0===O?"picture":O,k=c.ready,j=c.onInitialized,S=n(c,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),R={scaleY:g,scaleX:m,enable:b,zoomTo:h,rotateTo:_},E=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=e.useRef(null);return e.useEffect((function(){r.forEach((function(e){e&&("function"==typeof e?e(n.current):e.current=n.current)}))}),[r]),n}(i,e.useRef(null));e.useEffect((function(){var e;(null===(e=E.current)||void 0===e?void 0:e.cropper)&&"number"==typeof h&&E.current.cropper.zoomTo(h)}),[c.zoomTo]),e.useEffect((function(){var e;(null===(e=E.current)||void 0===e?void 0:e.cropper)&&void 0!==u&&E.current.cropper.reset().clear().replace(u)}),[u]),e.useEffect((function(){if(null!==E.current){var e=new r(E.current,t(t({dragMode:l},S),{ready:function(e){null!==e.currentTarget&&function(e,r){void 0===r&&(r={});var t=r.enable,n=void 0===t||t,o=r.scaleX,a=void 0===o?1:o,i=r.scaleY,c=void 0===i?1:i,s=r.zoomTo,l=void 0===s?0:s,u=r.rotateTo;n?e.enable():e.disable(),e.scaleX(a),e.scaleY(c),void 0!==u&&e.rotateTo(u),l>0&&e.zoomTo(l)}(e.currentTarget.cropper,R),k&&k(e)}}));j&&j(e)}return function(){var e,r;null===(r=null===(e=E.current)||void 0===e?void 0:e.cropper)||void 0===r||r.destroy()}}),[E]);var T=function(e){return f.reduce((function(e,r){var t=e,o=r;return t[o],n(t,["symbol"==typeof o?o:o+""])}),e)}(t(t({},S),{crossOrigin:v,src:u,alt:w}));return a.jsx("div",t({style:y,className:d},{children:a.jsx("img",t({},T,{style:p,ref:E}))}))}));exports.Cropper=y,exports.default=y;
{
"name": "react-cropper",
"version": "2.3.1",
"version": "2.3.2",
"description": "Cropper as React Component",

@@ -5,0 +5,0 @@ "main": "dist/react-cropper.umd.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc