1/*! For license information please see 9266.fd2fec6e.chunk.js.LICENSE.txt */ 2(self.webpackChunkranking=self.webpackChunkranking||[]).push([[9266],{1766(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/react-webcam.tsx")}({
vendor: 6,117 bytes, line 2
2"./src/react-webcam.tsx":function(e,t,n){"use strict";n.r(t);var r=n("react"),i=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function s(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)}"undefined"!==typeof window&&(void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise(function(n,r){t.call(navigator,e,n,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}));var h=function(e){function t(t){var n=e.call(this,t)||this;return n.canvas=null,n.ctx=null,n.requestUserMediaId=0,n.unmounted=!1,n.state={hasUserMedia:!1},n}return i(t,e),t.prototype.componentDidMount=function(){var e=this.state,t=this.props;this.unmounted=!1,s()?(e.hasUserMedia||this.requestUserMedia(),t.children&&"function"!=typeof t.children&&console.warn("children must be a function")):t.onUserMediaError("getUserMedia not supported")},t.prototype.componentDidUpdate=function(e){var t=this.props;if(s()){var n=JSON.stringify(e.audioConstraints)!==JSON.stringify(t.audioConstraints),r=JSON.stringify(e.videoConstraints)!==JSON.stringify(t.videoConstraints),i=e.minScreenshotWidth!==t.minScreenshotWidth,o=e.minScreenshotHeight!==t.minScreenshotHeight;(r||i||o)&&(this.canvas=null,this.ctx=null),(n||r)&&(this.stopAndCleanup(),this.requestUserMedia())}else t.onUserMediaError("getUserMedia not supported")},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},t.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(t){e.removeTrack(t),t.stop()}),e.getAudioTracks().map(function(t){e.removeTrack(t),t.stop()})):e.stop())},t.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(t.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},t.prototype.getScreenshot=function(e){var t=this.state,n=this.props;if(!t.hasUserMedia)return null;var r=this.getCanvas(e);return r&&r.toDataURL(n.screenshotFormat,n.screenshotQuality)},t.prototype.getCanvas=function(e){var t=this.state,n=this.props;if(!this.video)return null;if(!t.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var r=this.video.videoWidth,i=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var o=r/i;i=(r=n.minScreenshotWidth||this.video.clientWidth)/o,n.minScreenshotHeight&&i<n.minScreenshotHeight&&(r=(i=n.minScreenshotHeight)*o)}this.canvas=document.createElement("canvas"),this.canvas.width=(null===e||void 0===e?void 0:e.width)||r,this.canvas.height=(null===e||void 0===e?void 0:e.height)||i,this.ctx=this.canvas.getContext("2d")}var a=this.ctx,s=this.canvas;return a&&s&&(s.width=(null===e||void 0===e?void 0:e.width)||s.width,s.height=(null===e||void 0===e?void 0:e.height)||s.height,n.mirrored&&(a.translate(s.width,0),a.scale(-1,1)),a.imageSmoothingEnabled=n.imageSmoothing,a.drawImage(this.video,0,0,(null===e||void 0===e?void 0:e.width)||s.width,(null===e||void 0===e?void 0:e.height)||s.height),n.mirrored&&(a.scale(-1,1),a.translate(-s.width,0))),s},t.prototype.requestUserMedia=function(){var e=this,n=this.props,r=function(r,i){var o={video:"undefined"===typeof i||i};n.audio&&(o.audio="undefined"===typeof r||r),e.requestUserMediaId++;var a=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(o).then(function(n){e.unmounted||a!==e.requestUserMediaId?t.stopMediaStream(n):e.handleUserMedia(null,n)}).catch(function(t){e.handleUserMedia(t)})};if("mediaDevices"in navigator)r(n.audioConstraints,n.videoConstraints);else{var i=function(e){return{optional:[{sourceId:e}]}},o=function(e){var t=e.deviceId;return"string"===typeof t?t:Array.isArray(t)&&t.length>0?t[0]:"object"===typeof t&&t.ideal?t.ideal:null};MediaStreamTrack.getSources(function(e){var t=null,a=null;e.forEach(function(e){"audio"===e.kind?t=e.id:"video"===e.kind&&(a=e.id)});var s=o(n.audioConstraints);s&&(t=s);var h=o(n.videoConstraints);h&&(a=h),r(i(t),i(a))})}},t.prototype.handleUserMedia=function(e,t){var n=this.props;if(e||!t)return this.setState({hasUserMedia:!1}),void n.onUserMediaError(e);this.stream=t;try{this.video&&(this.video.srcObject=t),this.setState({hasUserMedia:!0})}catch(r){this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(t)})}n.onUserMedia(t)},t.prototype.render=function(){var e=this,t=this.state,n=this.props,i=n.audio,s=(n.forceScreenshotSourceSize,n.disablePictureInPicture),h=(n.onUserMedia,n.onUserMediaError,n.screenshotFormat,n.screenshotQuality,n.minScreenshotWidth,n.minScreenshotHeight,n.audioConstraints,n.videoConstraints,n.imageSmoothing,n.mirrored),c=n.style,d=void 0===c?{}:c,l=n.children,u=a(n,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),p=h?o(o({},d),{transform:(d.transform||"")+" scaleX(-1)"}):d,g={getScreenshot:this.getScreenshot.bind(this)};return r.createElement(r.Fragment,null,r.createElement("video",o({autoPlay:!0,disablePictureInPicture:s,src:t.src,muted:!i,playsInl
2ine:!0,ref:function(t){e.video=t},style:p},u)),l&&l(g))},t.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},t}(r.Component);t.default=h}
2,react:function(t,n){t.exports=e}}).default},e.exports=r(n(9950))},4402(e,t,n){"use strict";n.d(t,{A:()=>s});var r,i=n(9950);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}!function(e){e.Undo="UNDO",e.Redo="REDO",e.Set="SET",e.Reset="RESET"}(r||(r={}));var a={past:[],present:null,future:[]};const s=function(e,t){void 0===t&&(t={});var n=o({useCheckpoints:!1},t).useCheckpoints,s=(0,i.useReducer)(function(e,t){var i=e.past,o=e.present,a=e.future;switch(t.type){case r.Undo:if(0===i.length)return e;var s=i[i.length-1];return{past:i.slice(0,i.length-1),present:s,future:[o].concat(a)};case r.Redo:if(0===a.length)return e;var h=a[0],c=a.slice(1);return{past:[].concat(i,[o]),present:h,future:c};case r.Set:var d=!n||!!t.historyCheckpoint,l=t.newPresent;return l===o?e:{past:!1===d?i:[].concat(i,[o]),present:l,future:[]};case r.Reset:return{past:[],present:t.newPresent,future:[]}}},o({},a,{present:e})),h=s[0],c=s[1],d=0!==h.past.length,l=0!==h.future.length,u=(0,i.useCallback)(function(){d&&c({type:r.Undo})},[d]),p=(0,i.useCallback)(function(){l&&c({type:r.Redo})},[l]);return[h,{set:(0,i.useCallback)(function(e,t){void 0===t&&(t=!1),c({type:r.Set,newPresent:e,historyCheckpoint:t})},[]),reset:(0,i.useCallback)(function(e){return c({type:r.Reset,newPresent:e})},[]),undo:u,redo:p,canUndo:d,canRedo:l}]}},6070(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(9950),i=n(6267),o=n(6299),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)},s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},h=(0,o.J)("ClipLoader","0% {transform: rotate(0deg) scale(1)} 50% {transform: rotate(180deg) scale(0.8)} 100% {transform: rotate(360deg) scale(1)}","clip");const c=function(e){var t=e.loading,n=void 0===t||t,o=e.color,c=void 0===o?"#000000":o,d=e.speedMultiplier,l=void 0===d?1:d,u=e.cssOverride,p=void 0===u?{}:u,g=e.size,w=void 0===g?35:g,m=s(e,["loading","color","speedMultiplier","cssOverride","size"]),v=a({background:"transparent !important",width:(0,i.p)(w),height:(0,i.p)(w),borderRadius:"100%",border:"2px solid",borderTopColor:c,borderBottomColor:"transparent",borderLeftColor:c,borderRightColor:c,display:"inline-block",animation:"".concat(h," ").concat(.75/l,"s 0s infinite linear"),animationFillMode:"both"},p);return n?r.createElement("span",a({style:v},m)):null}},6389(e,t,n){"use strict";n.d(t,{Ay:()=>m});var r=n(9379),i=n(9950),o=Object.defineProperty,a=(e,t,n)=>((e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);const s={x:0,y:0,width:0,height:0,unit:"px"},h=(e,t,n)=>Math.min(Math.max(e,t),n),c=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function d(e,t,n){return"%"===e.unit?(0,r.A)((0,r.A)((0,r.A)({},s),e),{},{unit:"%"}):{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function l(e,t,n){return e.unit?"px"===e.unit?(0,r.A)((0,r.A)((0,r.A)({},s),e),{},{unit:"px"}):{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:(0,r.A)((0,r.A)((0,r.A)({},s),e),{},{unit:"px"})}function u(e,t,n,i,o){let a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,h=arguments.length>7&&void 0!==arguments[7]?arguments[7]:i,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:o;const d=(0,r.A)({},e);let l=Math.min(a,i),u=Math.min(s,o),p=Math.min(h,i),g=Math.min(c,o);t&&(t>1?(l=s?s*t:l,u=l/t,p=h*t):(u=a?a/t:u,l=u*t,g=c/t)),d.y<0&&(d.height=Math.max(d.height+d.y,u),d.y=0),d.x<0&&(d.width=Math.max(d.width+d.x,l),d.x=0);const w=i-(d.x+d.width);
2w<0&&(d.x=Math.min(d.x,i-l),d.width+=w);const m=o-(d.y+d.height);if(m<0&&(d.y=Math.min(d.y,o-u),d.height+=m),d.width<l&&(("sw"===n||"nw"==n)&&(d.x-=l-d.width),d.width=l),d.height<u&&(("nw"===n||"ne"==n)&&(d.y-=u-d.height),d.height=u),d.width>p&&(("sw"===n||"nw"==n)&&(d.x-=p-d.width),d.width=p),d.height>g&&(("nw"===n||"ne"==n)&&(d.y-=g-d.height),d.height=g),t){const e=d.width/d.height;if(e<t){const e=Math.max(d.width/t,u);("nw"===n||"ne"==n)&&(d.y-=e-d.height),d.height=e}else if(e>t){const e=Math.max(d.height*t,l);("sw"===n||"nw"==n)&&(d.x-=e-d.width),d.width=e}}return d}const p={capture:!0,passive:!1};let g=0;const w=class e extends i.PureComponent{constructor(){super(...arguments),a(this,"docMoveBound",!1),a(this,"mouseDownOnCrop",!1),a(this,"dragStarted",!1),a(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),a(this,"componentRef",(0,i.createRef)()),a(this,"mediaRef",(0,i.createRef)()),a(this,"resizeObserver"),a(this,"initChangeCalled",!1),a(this,"instanceId","rc-".concat(g++)),a(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),a(this,"onCropPointerDown",e=>{const{crop:t,disabled:n}=this.props,r=this.getBox();if(!t)return;const i=l(t,r.width,r.height);if(n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const o=e.target.dataset.ord,a=!!o;let s=e.clientX,h=e.clientY,c=i.x,d=i.y;if(o){const t=e.clientX-r.x,n=e.clientY-r.y;let a=0,l=0;"ne"===o||"e"==o?(a=t-(i.x+i.width),l=n-i.y,c=i.x,d=i.y+i.height):"se"===o||"s"===o?(a=t-(i.x+i.width),l=n-(i.y+i.height),c=i.x,d=i.y):"sw"===o||"w"==o?(a=t-i.x,l=n-(i.y+i.height),c=i.x+i.width,d=i.y):("nw"===o||"n"==o)&&(a=t-i.x,l=n-i.y,c=i.x+i.width,d=i.y+i.height),s=c+r.x+a,h=d+r.y+l}this.evData={startClientX:s,startClientY:h,startCropX:c,startCropY:d,clientX:e.clientX,clientY:e.clientY,isResize:a,ord:o},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),a(this,"onComponentPointerDown",e=>{const{crop:t,disabled:n,locked:r,keepSelection:i,onChange:o}=this.props,a=this.getBox();if(n||r||i&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const s=e.clientX-a.x,h=e.clientY-a.y,c={unit:"px",x:s,y:h,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:s,startCropY:h,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,o(l(c,a.width,a.height),d(c,a.width,a.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),a(this,"onDocPointerMove",e=>{const{crop:t,disabled:n,onChange:r,onDragStart:i}=this.props,o=this.getBox();if(n||!t||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,i&&i(e));const{evData:a}=this;let s;a.clientX=e.clientX,a.clientY=e.clientY,s=a.isResize?this.resizeCrop():this.dragCrop(),c(t,s)||r(l(s,o.width,o.height),d(s,o.width,o.height))}),a(this,"onComponentKeyDown",t=>{const{crop:n,disabled:r,onChange:i,onComplete:o}=this.props;if(r)return;const a=t.key;let s=!1;if(!n)return;const c=this.getBox(),u=this.makePixelCrop(c),p=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===a?(u.x-=p,s=!0):"ArrowRight"===a?(u.x+=p,s=!0):"ArrowUp"===a?(u.y-=p,s=!0):"ArrowDown"===a&&(u.y+=p,s=!0),s){t.cancelable&&t.preventDefault(),u.x=h(u.x,0,c.width-u.width),u.y=h(u.y,0,c.height-u.height);const e=l(u,c.width,c.height),n=d(u,c.width,c.height);i(e,n),o&&o(e,n)}}),a(this,"onHandlerKeyDown",(t,n)=>{const{aspect:i=0,crop:o,disabled:a,minWidth:s=0,minHeight:h=0,maxWidth:p,maxHeight:g,onChange:w,onComplete:m}=this.props,v=this.getBox();if(a||!o)return;if("ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();const f=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,y=function(e,t,n,i){const o=(0,r.A)({},e);return"ArrowLeft"===t?"nw"===i?(o.x-=n,o.y-=n,o.width+=n,o.height+=n):"w"===i?(o.x-=n,o.width+=n):"sw"===i?(o.x-=n,o.width+=n,o.height+=n):"ne"===i?(o.y+=n,o.width-=n,o.height-=n):"e"===i?o.width-=n:"se"===i&&(o.width-=n,o.height-=n):"ArrowRight"===t&&("nw"===i?(o.x+=n,o.y+=n,o.width-=n,o.height-=n):"w"===i?(o.x+=n,o.width-=n):"sw"===i?(o.x+=n,o.width-=n,o.height-=n):"ne"===i?(o.y-=n,o.width+=n,o.height+=n):"e"===i?o.width+=n:"se"===i&&(o.width+=n,o.height+=n)),"ArrowUp"===t?"nw"===i?(o.x-=n,o.y-=n,o.width+=n,o.height+=n):"n"===i?(o.y-=n,o.height+=n):"ne"===i?(o.y-=n,o.width+=n,o.height+=n):"sw"===i?(o.x+=n,o.width-=n,o.height-=n):"s"===i?o.height-=n:"se"===i&&(o.width-=n,o.height-=n):"ArrowDown"===t&&("nw"===i?(o.x+=n,o.y+=n,o.width-=n,o.height-=n):"n"===i?(o.y+=n,o.height-=n):"ne"===i?(o.y+=n,o.width-=n,o.height-=n):"sw"===i?(o.x-=n,o.width+=n,o.height+=n):"s"===i?o.height+=n:"se"===i&&(o.width+=n,o.height+=n)),o}(l(o,v.width,v.height),t.key,f,n),b=u(y,i,n,v.width,v.height,s,h,p,g);
2if(!c(o,b)){const e=d(b,v.width,v.height);w(b,e),m&&m(b,e)}}),a(this,"onDocPointerDone",e=>{const{crop:t,disabled:n,onComplete:r,onDragEnd:i}=this.props,o=this.getBox();this.unbindDocMove(),!n&&t&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),r&&r(l(t,o.width,o.height),d(t,o.width,o.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),a(this,"onDragFocus",()=>{var e;null==(e=this.componentRef.current)||e.scrollTo(0,0)})}get document(){return document}getBox(){const e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};const{x:t,y:n,width:r,height:i}=e.getBoundingClientRect();return{x:t,y:n,width:r,height:i}}componentDidUpdate(e){const{crop:t,onComplete:n}=this.props;if(n&&!e.crop&&t){const{width:e,height:r}=this.getBox();e&&r&&n(l(t,e,r),d(t,e,r))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,p),this.document.addEventListener("pointerup",this.onDocPointerDone,p),this.document.addEventListener("pointercancel",this.onDocPointerDone,p),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,p),this.document.removeEventListener("pointerup",this.onDocPointerDone,p),this.document.removeEventListener("pointercancel",this.onDocPointerDone,p),this.docMoveBound=!1)}getCropStyle(){const{crop:e}=this.props;if(e)return{top:"".concat(e.y).concat(e.unit),left:"".concat(e.x).concat(e.unit),width:"".concat(e.width).concat(e.unit),height:"".concat(e.height).concat(e.unit)}}dragCrop(){const{evData:e}=this,t=this.getBox(),n=this.makePixelCrop(t),r=e.clientX-e.startClientX,i=e.clientY-e.startClientY;return n.x=h(e.startCropX+r,0,t.width-n.width),n.y=h(e.startCropY+i,0,t.height-n.height),n}getPointRegion(e,t,n,r){const{evData:i}=this,o=i.clientX-e.x,a=i.clientY-e.y;let s,h;return s=r&&t?"nw"===t||"n"===t||"ne"===t:a<i.startCropY,h=n&&t?"nw"===t||"w"===t||"sw"===t:o<i.startCropX,h?s?"nw":"sw":s?"ne":"se"}resolveMinDimensions(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const i=Math.min(n,e.width),o=Math.min(r,e.height);return t&&(i||o)?t>1?i?[i,i/t]:[o*t,o]:o?[o*t,o]:[i,i/t]:[i,o]}resizeCrop(){const{evData:t}=this,{aspect:n=0,maxWidth:r,maxHeight:i}=this.props,o=this.getBox(),[a,s]=this.resolveMinDimensions(o,n,this.props.minWidth,this.props.minHeight);let c=this.makePixelCrop(o);const d=this.getPointRegion(o,t.ord,a,s),l=t.ord||d;let p=t.clientX-t.startClientX,g=t.clientY-t.startClientY;(a&&"nw"===l||"w"===l||"sw"===l)&&(p=Math.min(p,-a)),(s&&"nw"===l||"n"===l||"ne"===l)&&(g=Math.min(g,-s));const w={unit:"px",x:0,y:0,width:0,height:0};"ne"===d?(w.x=t.startCropX,w.width=p,n?(w.height=w.width/n,w.y=t.startCropY-w.height):(w.height=Math.abs(g),w.y=t.startCropY-w.height)):"se"===d?(w.x=t.startCropX,w.y=t.startCropY,w.width=p,w.height=n?w.width/n:g):"sw"===d?(w.x=t.startCropX+p,w.y=t.startCropY,w.width=Math.abs(p),w.height=n?w.width/n:g):"nw"===d&&(w.x=t.startCropX+p,w.width=Math.abs(p),n?(w.height=w.width/n,w.y=t.startCropY-w.height):(w.height=Math.abs(g),w.y=t.startCropY+g));const m=u(w,n,d,o.width,o.height,a,s,r,i);return n||e.xyOrds.indexOf(l)>-1?c=m:e.xOrds.indexOf(l)>-1?(c.x=m.x,c.width=m.width):e.yOrds.indexOf(l)>-1&&(c.y=m.y,c.height=m.height),c.x=h(c.x,0,o.width-c.width),c.y=h(c.y,0,o.height-c.height),c}renderCropSelection(){const{ariaLabels:t=e.defaultProps.ariaLabels,disabled:n,locked:r,renderSelectionAddon:o,ruleOfThirds:a,crop:s}=this.props,h=this.getCropStyle();if(s)return i.createElement("div",{style:h,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":t.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!r&&i.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},i.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),i.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),i.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),i.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),i.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":t.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),i.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":t.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),i.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":t.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),i.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":t.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),i.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":t.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),i.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":t.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),i.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":t.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),i.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":t.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),o&&i.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},o(this.state)),a&&i.createElement(i.Fragment,null,i.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),i.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return l((0,r.A)((0,r.A)({},s),this.props.crop||{}),e.width,e.height)}render(){const{aspect:e,children:t,circularCrop:n,className:r,crop:o,disabled:a,locked:s,style:h,ruleOfThirds:c}=this.props,{cropIsActive:d,newCropIsBeingDrawn:l}=this.state,u=o?this.renderCropSelection():null,p=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(e=>e&&"string"==typeof e).join(" ")}("ReactCrop",r,d&&"ReactCrop--active",a&&"ReactCrop--disabled",s&&"ReactCrop--locked",l&&"ReactCrop--new-crop",o&&e&&"ReactCrop--fixed-aspect",o&&n&&"ReactCrop--circular-crop",o&&c&&"ReactCrop--rule-of-thirds",!this.dragStarted&&o&&!o.width&&!o.height&&"ReactCrop--invisible-crop",n&&"ReactCrop--no-animate");return i.createElement("div",{ref:this.componentRef,className:p,style:h},i.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},t),o?i.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},i.createElement("defs",null,i.createElement("mask",{id:"hole-".concat(this.instanceId)},i.createElement("rect",{width:"100%",height:"100%",fill:"white"}),n?i.createElement("ellipse",{cx:"".concat(o.x+o.width/2).concat(o.unit),cy:"".concat(o.y+o.height/2).concat(o.unit),rx:"".concat(o.width/2).concat(o.unit),ry:"".concat(o.height/2).concat(o.unit),fill:"black"}):i.createElement("rect",{x:"".concat(o.x).concat(o.unit),y:"".concat(o.y).concat(o.unit),width:"".concat(o.width).concat(o.unit),height:"".concat(o.height).concat(o.unit),fill:"black"}))),i.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:"url(#hole-".concat(this.instanceId,")")})):void 0,u)}};a(w,"xOrds",["e","w"]),a(w,"yOrds",["n","s"]),a(w,"xyOrds",["nw","ne","se","sw"]),a(w,"nudgeStep",1),a(w,"nudgeStepMedium",10),a(w,"nudgeStepLarge",100),a(w,"defaultProps",{ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}});let m=w},7569(){}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.