UNPKG

@cocalc/static

Version:

CoCalc's static frontend Webpack-based build system and framework

2 lines 432 kB
/*! For license information please see 046e2ba87ced2571aaf1.js.LICENSE.txt */ (self.webpackChunk_cocalc_static=self.webpackChunk_cocalc_static||[]).push([[6575],{92989:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(86994),o=n(63505);const a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"};var i=n(17583),c=function(e,t){return o.createElement(i.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:a}))};c.displayName="InboxOutlined";const l=o.forwardRef(c)},56027:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(86994),o=n(63505);const a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 224H768v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H548v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H328v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H96c-17.7 0-32 14.3-32 32v576c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V256c0-17.7-14.3-32-32-32zm-40 568H136V296h120v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h120v496zM416 496H232c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm0 136H232c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm308.2-177.4L620.6 598.3l-52.8-73.1c-3-4.2-7.8-6.6-12.9-6.6H500c-6.5 0-10.3 7.4-6.5 12.7l114.1 158.2a15.9 15.9 0 0025.8 0l165-228.7c3.8-5.3 0-12.7-6.5-12.7H737c-5-.1-9.8 2.4-12.8 6.5z"}}]},name:"schedule",theme:"outlined"};var i=n(17583),c=function(e,t){return o.createElement(i.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:a}))};c.displayName="ScheduleOutlined";const l=o.forwardRef(c)},31529:(e,t,n)=>{"use strict";n.d(t,{Z:()=>q});var r=n(31321),o=n(30575),a=n(63505),i=n(41472);const c=n(83706).Z;var l=n(9067),s=n(30586);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},f=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,p=function(e){if("string"!=typeof e)throw new TypeError("Invalid argument expected string");var t=e.match(f);if(!t)throw new Error("Invalid argument not valid semver ('".concat(e,"' received)"));return t.shift(),t},h=function(e){return"*"===e||"x"===e||"X"===e},m=function(e){var t=parseInt(e,10);return isNaN(t)?e:t},v=function(e,t){if(h(e)||h(t))return 0;var n,r,o=(n=function(e,t){return(void 0===e?"undefined":d(e))!==(void 0===t?"undefined":d(t))?[String(e),String(t)]:[e,t]}(m(e),m(t)),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(n,r)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],i=o[1];return a>i?1:a<i?-1:0},g=function(e,t){for(var n=0;n<Math.max(e.length,t.length);n++){var r=v(e[n]||"0",t[n]||"0");if(0!==r)return r}return 0},b=(Object.keys({">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]}),n(46376)),y=n.n(b);function S(e,t,n,r,o,a){void 0===a&&(a=0);var i=j(e,t,a),c=i.width,l=i.height,s=Math.min(c,n),u=Math.min(l,r);return s>u*o?{width:u*o,height:u}:{width:s,height:s/o}}function w(e,t,n,r,o){void 0===o&&(o=0);var a=j(t.width,t.height,o),i=a.width,c=a.height;return{x:C(e.x,i,n.width,r),y:C(e.y,c,n.height,r)}}function C(e,t,n,r){var o=t*r/2-n/2;return P(e,-o,o)}function x(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function E(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function k(e,t,n,o,a,i,c){void 0===i&&(i=0),void 0===c&&(c=!0);var l=c?O:I,s=j(t.width,t.height,i),u=j(t.naturalWidth,t.naturalHeight,i),d={x:l(100,((s.width-n.width/a)/2-e.x/a)/s.width*100),y:l(100,((s.height-n.height/a)/2-e.y/a)/s.height*100),width:l(100,n.width/s.width*100/a),height:l(100,n.height/s.height*100/a)},f=Math.round(l(u.width,d.width*u.width/100)),p=Math.round(l(u.height,d.height*u.height/100)),h=u.width>=u.height*o?{width:Math.round(p*o),height:p}:{width:f,height:Math.round(f/o)};return{croppedAreaPercentages:d,croppedAreaPixels:(0,r.__assign)((0,r.__assign)({},h),{x:Math.round(l(u.width-h.width,d.x*u.width/100)),y:Math.round(l(u.height-h.height,d.y*u.height/100))})}}function O(e,t){return Math.min(e,Math.max(0,t))}function I(e,t){return t}function M(e,t,n,r,o,a){var i=j(t.width,t.height,n),c=P(r.width/i.width*(100/e.width),o,a);return{crop:{x:c*i.width/2-r.width/2-i.width*c*(e.x/100),y:c*i.height/2-r.height/2-i.height*c*(e.y/100)},zoom:c}}function Z(e,t,n,r,o,a){void 0===n&&(n=0);var i=j(t.naturalWidth,t.naturalHeight,n),c=P(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),o,a),l=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((i.width-e.width)/2-e.x)*l,y:((i.height-e.height)/2-e.y)*l},zoom:c}}function N(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function j(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function P(e,t,n){return Math.min(Math.max(e,t),n)}function A(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}const T=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=a.createRef(),n.videoRef=a.createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=document,n.currentWindow=window,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=M(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,o=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var a=Z(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=a.crop,o=a.zoom,n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var e,t,o,a,i,c,l=n.imageRef.current||n.videoRef.current;if(l&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var s=n.containerRect.width/n.containerRect.height,u=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,d=(null===(o=n.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(a=n.videoRef.current)||void 0===a?void 0:a.videoHeight)||0,f=u/d,p=void 0;if(l.offsetWidth<u||l.offsetHeight<d)switch(n.props.objectFit){default:case"contain":p=s>f?{width:n.containerRect.height*f,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/f};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/f};break;case"vertical-cover":p={width:n.containerRect.height*f,height:n.containerRect.height};break;case"auto-cover":p=u>d?{width:n.containerRect.width,height:n.containerRect.width/f}:{width:n.containerRect.height*f,height:n.containerRect.height}}else p={width:l.offsetWidth,height:l.offsetHeight};n.mediaSize=(0,r.__assign)((0,r.__assign)({},p),{naturalWidth:u,naturalHeight:d}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var h=n.props.cropSize?n.props.cropSize:S(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(i=n.state.cropSize)||void 0===i?void 0:i.height)===h.height&&(null===(c=n.state.cropSize)||void 0===c?void 0:c.width)===h.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(h),n.setState({cropSize:h},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(h),h}},n.onMouseDown=function(e){e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0])))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var a=n.gestureRotationStart+e.rotation;n.props.onRotationChange(a)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,a=e.x,i=e.y;n.dragStartPosition={x:a,y:i},n.dragStartCrop=(0,r.__assign)({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,a={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},i=n.props.restrictPosition?w(a,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):a;n.props.onCropChange(i)}}))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(!n.props.onWheelRequest||n.props.onWheelRequest(e)){e.preventDefault();var r=t.getMousePoint(e),o=y()(e).pixelY,a=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(a,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(r-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,a=o.crop,i=o.zoom;return{x:(t+a.x)/i,y:(r+a.y)/i}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition,a=void 0===o||o;if(n.state.cropSize&&n.props.onZoomChange){var i=P(e,n.props.minZoom,n.props.maxZoom);if(a){var c=n.getPointOnContainer(t),l=n.getPointOnMedia(c),s={x:l.x*i-c.x,y:l.y*i-c.y},u=n.props.restrictPosition?w(s,n.mediaSize,n.state.cropSize,i,n.props.rotation):s;n.props.onCropChange(u)}n.props.onZoomChange(i)}},n.getCropData=function(){return n.state.cropSize?k(n.props.restrictPosition?w(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?w(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return(0,r.__extends)(t,e),t.prototype.componentDidMount=function(){this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".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",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef)},t.prototype.componentWillUnmount=function(){var e;this.currentWindow.removeEventListener("resize",this.computeSizes),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(e=this.styleRef.parentNode)||void 0===e||e.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){var t,n,r,o,a,i,c,l,s;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(a=e.crop)||void 0===a?void 0:a.x)===(null===(i=this.props.crop)||void 0===i?void 0:i.x)&&(null===(c=e.crop)||void 0===c?void 0:c.y)===(null===(l=this.props.crop)||void 0===l?void 0:l.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(s=this.videoRef.current)||void 0===s||s.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=x(n,r),this.lastPinchRotation=E(n,r),this.onDragStart(N(n,r))},t.prototype.onPinchMove=function(e){var n=this,r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),a=N(r,o);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=x(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,a,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var i=E(r,o),c=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(c),n.lastPinchRotation=i}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,i=t.mediaProps,c=t.transform,l=t.crop,s=l.x,u=l.y,d=t.rotation,f=t.zoom,p=t.cropShape,h=t.showGrid,m=t.style,v=m.containerStyle,g=m.cropAreaStyle,b=m.mediaStyle,y=t.classes,S=y.containerClassName,w=y.cropAreaClassName,C=y.mediaClassName,x=t.objectFit;return a.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:v,className:A("reactEasyCrop_Container",S)},n?a.createElement("img",(0,r.__assign)({alt:"",className:A("reactEasyCrop_Image","contain"===x&&"reactEasyCrop_Contain","horizontal-cover"===x&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===x&&"reactEasyCrop_Cover_Vertical","auto-cover"===x&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),C)},i,{src:n,ref:this.imageRef,style:(0,r.__assign)((0,r.__assign)({},b),{transform:c||"translate("+s+"px, "+u+"px) rotate("+d+"deg) scale("+f+")"}),onLoad:this.onMediaLoad})):o&&a.createElement("video",(0,r.__assign)({autoPlay:!0,loop:!0,muted:!0,className:A("reactEasyCrop_Video","contain"===x&&"reactEasyCrop_Contain","horizontal-cover"===x&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===x&&"reactEasyCrop_Cover_Vertical","auto-cover"===x&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),C)},i,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:(0,r.__assign)((0,r.__assign)({},b),{transform:c||"translate("+s+"px, "+u+"px) rotate("+d+"deg) scale("+f+")"}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return a.createElement("source",(0,r.__assign)({key:e.src},e))}))),this.state.cropSize&&a.createElement("div",{style:(0,r.__assign)((0,r.__assign)({},g),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:A("reactEasyCrop_CropArea","round"===p&&"reactEasyCrop_CropAreaRound",h&&"reactEasyCrop_CropAreaGrid",w)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(a.Component);var L=n(74904);function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var D=function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},F="img-crop",H=.1,B=(0,a.forwardRef)((function(e,t){var n=e.cropperRef,r=e.image,i=e.aspect,c=e.shape,l=e.grid,s=e.zoom,u=e.rotate,d=e.minZoom,f=e.maxZoom,p=e.cropperProps,h=z((0,a.useState)({x:0,y:0}),2),m=h[0],v=h[1],g=z((0,a.useState)({width:0,height:0}),2),b=g[0],y=g[1],S=z((0,a.useState)(1),2),w=S[0],C=S[1],x=z((0,a.useState)(0),2),E=x[0],k=x[1],O=(0,a.useRef)({width:0,height:0,x:0,y:0}),I=(0,a.useCallback)((function(e){var t=e.width,n=e.height,r=n*i;y(t>r?{width:r,height:n}:{width:t,height:t/i})}),[i]),M=(0,a.useCallback)((function(e,t){O.current=t}),[]);return(0,a.useImperativeHandle)(t,(function(){return{rotateVal:E,setZoomVal:C,setRotateVal:k,cropPixelsRef:O}})),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(T,Object.assign({},p,{ref:n,image:r,crop:m,cropSize:b,onCropChange:v,aspect:i,cropShape:c,showGrid:l,zoomWithScroll:s,zoom:w,rotation:E,onZoomChange:C,onRotationChange:k,minZoom:d,maxZoom:f,onMediaLoaded:I,onCropComplete:M,classes:{containerClassName:"".concat(F,"-container"),mediaClassName:"".concat(F,"-media")}})),s&&(0,o.jsxs)("section",Object.assign({className:"".concat(F,"-control ").concat(F,"-control-zoom")},{children:[(0,o.jsx)("button",Object.assign({onClick:function(){return C(w-H)},disabled:w-H<d},{children:"-"})),(0,o.jsx)(L.Z,{min:d,max:f,step:H,value:w,onChange:C}),(0,o.jsx)("button",Object.assign({onClick:function(){return C(w+H)},disabled:w+H>f},{children:"+"}))]})),u&&(0,o.jsxs)("section",Object.assign({className:"".concat(F,"-control ").concat(F,"-control-rotate")},{children:[(0,o.jsx)("button",Object.assign({onClick:function(){return k(E-1)},disabled:-180===E},{children:"↺"})),(0,o.jsx)(L.Z,{min:-180,max:180,step:1,value:E,onChange:k}),(0,o.jsx)("button",Object.assign({onClick:function(){return k(E+1)},disabled:180===E},{children:"↻"}))]}))]})})),W=(0,a.memo)(B);!function(e){if("undefined"!=typeof window){var t=document.createElement("style");t.setAttribute("media","screen"),t.innerHTML=e,document.head.appendChild(t)}}(".img-crop-modal .img-crop-container {\n position: relative;\n width: 100%;\n height: 40vh;\n}\n.img-crop-modal .img-crop-control {\n display: flex;\n align-items: center;\n width: 60%;\n margin-left: auto;\n margin-right: auto;\n}\n.img-crop-modal .img-crop-control:first-of-type {\n margin-top: 16px;\n}\n.img-crop-modal .img-crop-control:last-of-type {\n margin-bottom: -8px;\n}\n.img-crop-modal .img-crop-control button {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 34px;\n height: 34px;\n padding: 0;\n font-style: normal;\n background: transparent;\n border: 0;\n outline: 0;\n cursor: pointer;\n}\n.img-crop-modal .img-crop-control button[disabled] {\n cursor: default;\n}\n.img-crop-modal .img-crop-control button + div:only-of-type {\n flex: 1;\n margin: 0 8px;\n}\n.img-crop-modal .img-crop-control-zoom button {\n font-size: 18px;\n}\n.img-crop-modal .img-crop-control-rotate button {\n font-size: 16px;\n}\n.img-crop-modal .img-crop-control-rotate button:first-of-type {\n transform: rotate(-20deg);\n}\n.img-crop-modal .img-crop-control-rotate button:last-of-type {\n transform: rotate(20deg);\n}\n");var _,X,V,U,K,G,Y,$=-1===(_=i.Z,X="4.23.0",V=p(_),U=p(X),K=V.pop(),G=U.pop(),0!==(Y=g(V,U))?Y:K&&G?g(K.split("."),G.split(".")):K||G?K?-1:1:0)?{visible:!0}:{open:!0},q=(0,a.forwardRef)((function(e,t){var n=e.aspect,i=void 0===n?1:n,u=e.shape,d=void 0===u?"rect":u,f=e.grid,p=void 0!==f&&f,h=e.quality,m=void 0===h?.4:h,v=e.fillColor,g=void 0===v?"white":v,b=e.zoom,y=void 0===b||b,S=e.rotate,w=void 0!==S&&S,C=e.minZoom,x=void 0===C?1:C,E=e.maxZoom,k=void 0===E?3:E,O=e.modalTitle,I=e.modalWidth,M=e.modalOk,Z=e.modalCancel,N=e.modalMaskTransitionName,j=e.modalTransitionName,P=e.modalClassName,A=e.onModalOk,T=e.onModalCancel,L=e.beforeCrop,R=e.onUploadFail,H=e.cropperProps,B=e.children,_=(0,a.useRef)({});_.current.onModalOk=A,_.current.onModalCancel=T,_.current.beforeCrop=L,_.current.onUploadFail=R;var X=z((0,a.useState)(""),2),V=X[0],U=X[1],K=(0,a.useRef)({}),G=(0,a.useRef)(),Y=(0,a.useRef)((function(){})),q=(0,a.useRef)((function(){})),Q=(0,a.useMemo)((function(){var e=Array.isArray(B)?B[0]:B,t=e.props,n=t.beforeUpload,o=t.accept,a=(0,r.__rest)(t,["beforeUpload","accept"]);return G.current=n,Object.assign(Object.assign({},e),{props:Object.assign(Object.assign({},a),{accept:o||"image/*",beforeUpload:function(e,t){return new Promise((function(n,o){return(0,r.__awaiter)(void 0,void 0,void 0,(function(){var r;return D(this,(function(a){switch(a.label){case 0:return _.current.beforeCrop?[4,_.current.beforeCrop(e,t)]:[3,2];case 1:if(!a.sent())return[2,o()];a.label=2;case 2:return K.current=e,Y.current=function(e){var t,r;null===(r=(t=_.current).onModalOk)||void 0===r||r.call(t,e),n(e)},q.current=function(e){var t,n;null===(n=(t=_.current).onUploadFail)||void 0===n||n.call(t,e),o()},(r=new FileReader).addEventListener("load",(function(){"string"==typeof r.result&&U(r.result)})),r.readAsDataURL(e),[2]}}))}))}))}})})}),[B]),J=(0,a.useRef)({}),ee=(0,a.useMemo)((function(){var e={width:I,okText:M,cancelText:Z,maskTransitionName:N,transitionName:j};return Object.keys(e).forEach((function(t){var n=t;void 0===e[n]&&delete e[n]})),e}),[Z,N,M,j,I]),te=function(){U(""),J.current.setZoomVal(1),J.current.setRotateVal(0)},ne=(0,a.useCallback)((function(){var e,t;null===(t=(e=_.current).onModalCancel)||void 0===t||t.call(e),te()}),[]),re=(0,a.useCallback)((function(e){return(0,r.__awaiter)(void 0,void 0,void 0,(function(){var t,n,o,a,i,c,l,u,d,f,p,h,v,b,y,S,C,x,E,k,O,I,M,Z,N,j,P;return D(this,(function(A){return te(),n=document.createElement("canvas"),o=n.getContext("2d"),a=e.target,i=(null===(t=null==a?void 0:a.getRootNode)||void 0===t?void 0:t.call(a))||document,c=i.querySelector(".".concat(F,"-media")),l=J.current.cropPixelsRef.current,u=l.width,d=l.height,f=l.x,p=l.y,w&&0!==J.current.rotateVal?(h=c.naturalWidth,v=c.naturalHeight,b=J.current.rotateVal*(Math.PI/180),y=Math.abs(Math.sin(b)),S=Math.abs(Math.cos(b)),C=h*S+v*y,x=v*S+h*y,n.width=C,n.height=x,o.fillStyle=g,o.fillRect(0,0,C,x),E=C/2,k=x/2,o.translate(E,k),o.rotate(b),o.translate(-E,-k),O=(C-h)/2,I=(x-v)/2,o.drawImage(c,0,0,h,v,O,I,h,v),M=o.getImageData(0,0,C,x),n.width=u,n.height=d,o.putImageData(M,-f,-p)):(n.width=u,n.height=d,o.fillStyle=g,o.fillRect(0,0,u,d),o.drawImage(c,f,p,u,d,0,0,u,d)),Z=K.current,N=Z.type,j=Z.name,P=Z.uid,n.toBlob((function(e){return(0,r.__awaiter)(void 0,void 0,void 0,(function(){var t,n,r;return D(this,(function(o){switch(o.label){case 0:return t=Object.assign(new File([e],j,{type:N}),{uid:P}),G.current?(n=t,[4,G.current(n,[n])]):[2,Y.current(t)];case 1:return!0===(r=o.sent())?[2,Y.current(t)]:!1===r?[2,q.current(new Error("beforeUpload return false"))]:(delete t[s.Z.LIST_IGNORE],r===s.Z.LIST_IGNORE?(Object.defineProperty(t,s.Z.LIST_IGNORE,{value:!0,configurable:!0}),[2,q.current(new Error("beforeUpload return LIST_IGNORE"))]):"object"==typeof r&&null!==r?[2,Y.current(r)]:[2])}}))}))}),N,m),[2]}))}))}),[g,m,w]),oe=function(e){return(0,o.jsxs)(o.Fragment,{children:[Q,V&&(0,o.jsx)(l.Z,Object.assign({},$,{wrapClassName:"".concat(F,"-modal ").concat(P||""),title:e,onOk:re,onCancel:ne,maskClosable:!1,destroyOnClose:!0},ee,{children:(0,o.jsx)(W,{ref:J,cropperRef:t,image:V,aspect:i,shape:d,grid:p,zoom:y,rotate:w,minZoom:x,maxZoom:k,cropperProps:H})}))]})};return O?oe(O):(0,o.jsx)(c,{children:function(e,t){return oe("zh-cn"===t?"编辑图片":"Edit image")}})}))},60191:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(63505);const o=function(e,t,n,o){var a=r.useRef(n),i=r.useRef(o);r.useEffect((function(){a.current=n,i.current=o})),r.useEffect((function(){var n=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o||a.current.apply(this,t)},r=e&&"current"in e?e.current:e;if(r){var o=0;r.addEventListener(t,n);var c=i.current;return function(){o=1,r.removeEventListener(t,n),c&&c()}}}),[e,t])};function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var c=function(){return"undefined"!=typeof window&&!window.matchMedia("(hover: none)").matches};const l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){window.clearTimeout(s.current)},a=t.enterDelay,l=t.leaveDelay,s=r.useRef(),u=i(r.useState(!1),2),d=u[0],f=u[1],p=function(e){if(c()){var t=e?a:l;window.clearTimeout(s.current),t?s.current=window.setTimeout((function(){return f(e)}),t):f(e)}};return o(e,"mouseenter",(function(){return p(!0)})),o(e,"mouseleave",(function(){return p(!1)})),r.useEffect((function(){return n}),[]),d}},7187:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var r=n(24177),o=n.n(r),a=n(31484),i=n(63505),c=n(68804),l=n(6022),s=n(18519),u=n(25461),d=n(72061),f=n(29813),p=n(2418);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=new s.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),v=new s.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),g=new s.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),b=new s.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),y=new s.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),S=new s.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),w=function(e){var t,n,r,o,a,i,c,l=e.componentCls,s=e.iconCls,d=e.antCls,f=e.badgeFontHeight,w=e.badgeShadowSize,C=e.badgeHeightSm,x=e.motionDurationSlow,E=e.badgeStatusSize,k=e.marginXS,O=e.badgeRibbonOffset,I="".concat(d,"-scroll-number"),M="".concat(d,"-ribbon"),Z="".concat(d,"-ribbon-wrapper"),N=u.i.reduce((function(t,n){var r=e["".concat(n,"-6")];return Object.assign(Object.assign({},t),h({},"".concat(l,"-status-").concat(n),{background:r}))}),{}),j=u.i.reduce((function(t,n){var r=e["".concat(n,"-6")];return Object.assign(Object.assign({},t),h({},"&".concat(M,"-color-").concat(n),{background:r,color:r}))}),{});return h(c={},l,Object.assign(Object.assign({},(0,p.Wf)(e)),(h(o={position:"relative",display:"inline-block",width:"fit-content",lineHeight:1},"".concat(l,"-count"),{zIndex:e.badgeZIndex,minWidth:e.badgeHeight,height:e.badgeHeight,color:e.badgeTextColor,fontWeight:e.badgeFontWeight,fontSize:e.badgeFontSize,lineHeight:"".concat(e.badgeHeight,"px"),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:e.badgeHeight/2,boxShadow:"0 0 0 ".concat(w,"px ").concat(e.badgeShadowColor),transition:"background ".concat(e.motionDurationMid),a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}}),h(o,"".concat(l,"-count-sm"),{minWidth:C,height:C,fontSize:e.badgeFontSizeSm,lineHeight:"".concat(C,"px"),borderRadius:C/2}),h(o,"".concat(l,"-multiple-words"),{padding:"0 ".concat(e.paddingXS,"px")}),h(o,"".concat(l,"-dot"),{zIndex:e.badgeZIndex,width:e.badgeDotSize,minWidth:e.badgeDotSize,height:e.badgeDotSize,background:e.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat(w,"px ").concat(e.badgeShadowColor)}),h(o,"".concat(l,"-dot").concat(I),{transition:"background ".concat(x)}),h(o,"".concat(l,"-count, ").concat(l,"-dot, ").concat(I,"-custom-component"),h({position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%"},"".concat(s,"-spin"),{animationName:S,animationDuration:e.motionDurationMid,animationIterationCount:"infinite",animationTimingFunction:"linear"})),h(o,"&".concat(l,"-status"),Object.assign(Object.assign((h(t={lineHeight:"inherit",verticalAlign:"baseline"},"".concat(l,"-status-dot"),{position:"relative",top:-1,display:"inline-block",width:E,height:E,verticalAlign:"middle",borderRadius:"50%"}),h(t,"".concat(l,"-status-success"),{backgroundColor:e.colorSuccess}),h(t,"".concat(l,"-status-processing"),{position:"relative",color:e.colorPrimary,backgroundColor:e.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:w,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:m,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}}),h(t,"".concat(l,"-status-default"),{backgroundColor:e.colorTextPlaceholder}),h(t,"".concat(l,"-status-error"),{backgroundColor:e.colorError}),h(t,"".concat(l,"-status-warning"),{backgroundColor:e.colorWarning}),t),N),h({},"".concat(l,"-status-text"),{marginInlineStart:k,color:e.colorText,fontSize:e.fontSize}))),h(o,"".concat(l,"-zoom-appear, ").concat(l,"-zoom-enter"),{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"}),h(o,"".concat(l,"-zoom-leave"),{animationName:g,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"}),h(o,"&".concat(l,"-not-a-wrapper"),(h(n={},"".concat(l,"-zoom-appear, ").concat(l,"-zoom-enter"),{animationName:b,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack}),h(n,"".concat(l,"-zoom-leave"),{animationName:y,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack}),h(n,"&:not(".concat(l,"-status)"),{verticalAlign:"middle"}),h(n,"".concat(I,"-custom-component, ").concat(l,"-count"),{transform:"none"}),h(n,"".concat(I,"-custom-component, ").concat(I),{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}),n)),h(o,"".concat(I),(h(r={overflow:"hidden",direction:"ltr"},"".concat(I,"-only"),h({position:"relative",display:"inline-block",height:e.badgeHeight,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"},"> p".concat(I,"-only-unit"),{height:e.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"})),h(r,"".concat(I,"-symbol"),{verticalAlign:"top"}),r)),h(o,"&-rtl",h({direction:"rtl"},"".concat(l,"-count, ").concat(l,"-dot, ").concat(I,"-custom-component"),{insetInlineEnd:"auto"})),o))),h(c,"".concat(Z),{position:"relative"}),h(c,"".concat(M),Object.assign(Object.assign(Object.assign(Object.assign({},(0,p.Wf)(e)),(h(a={position:"absolute",top:k,height:f,padding:"0 ".concat(e.paddingXS,"px"),color:e.colorPrimary,lineHeight:"".concat(f,"px"),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM},"".concat(M,"-text"),{color:e.colorTextLightSolid}),h(a,"".concat(M,"-corner"),{position:"absolute",top:"100%",width:O,height:O,color:"currentcolor",border:"".concat(O/2,"px solid"),transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}),a)),j),(h(i={},"&".concat(M,"-placement-end"),h({insetInlineEnd:-O,borderEndEndRadius:0},"".concat(M,"-corner"),{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"})),h(i,"&".concat(M,"-placement-start"),h({insetInlineStart:-O,borderEndStartRadius:0},"".concat(M,"-corner"),{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"})),h(i,"&-rtl",{direction:"rtl"}),i))),c};const C=(0,d.Z)("Badge",(function(e){var t=e.fontSize,n=e.lineHeight,r=e.fontSizeSM,o=e.lineWidth,a=e.marginXS,i=e.colorBorderBg,c=Math.round(t*n),l=o,s=c-2*l,u=e.colorBgContainer,d=r,p=e.colorError,h=e.colorErrorHover,m=t,v=r/2,g=r,b=r/2,y=(0,f.TS)(e,{badgeFontHeight:c,badgeShadowSize:l,badgeZIndex:"auto",badgeHeight:s,badgeTextColor:u,badgeFontWeight:"normal",badgeFontSize:d,badgeColor:p,badgeColorHover:h,badgeShadowColor:i,badgeHeightSm:m,badgeDotSize:v,badgeFontSizeSm:g,badgeStatusSize:b,badgeProcessingDuration:"1.2s",badgeRibbonOffset:a,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[w(y)]}));var x=n(41788);function E(e){return x.Y.includes(e)}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e){var t,n=e.prefixCls,r=e.value,a=e.current,c=e.offset,l=void 0===c?0:c;return l&&(t={position:"absolute",top:"".concat(l,"00%"),left:0}),i.createElement("span",{style:t,className:o()("".concat(n,"-only-unit"),{current:a})},r)}function N(e,t,n){for(var r=e,o=0;(r+10)%10!==t;)r+=n,o+=n;return o}function j(e){var t,n,r=e.prefixCls,o=e.count,a=e.value,c=Number(a),l=Math.abs(o),s=M(i.useState(c),2),u=s[0],d=s[1],f=M(i.useState(l),2),p=f[0],h=f[1],m=function(){d(c),h(l)};if(i.useEffect((function(){var e=setTimeout((function(){m()}),1e3);return function(){clearTimeout(e)}}),[c]),u===c||Number.isNaN(c)||Number.isNaN(u))t=[i.createElement(Z,Object.assign({},e,{key:c,current:!0}))],n={transition:"none"};else{t=[];for(var v=c+10,g=[],b=c;b<=v;b+=1)g.push(b);var y=g.findIndex((function(e){return e%10===u}));t=g.map((function(t,n){var r=t%10;return i.createElement(Z,Object.assign({},e,{key:t,value:r,offset:n-y,current:n===y}))})),n={transform:"translateY(".concat(-N(u,c,p<l?1:-1),"00%)")}}return i.createElement("span",{className:"".concat(r,"-only"),style:n,onTransitionEnd:m},t)}const P=function(e){var t=e.prefixCls,n=e.count,r=e.className,a=e.motionClassName,s=e.style,u=e.title,d=e.show,f=e.component,p=void 0===f?"sup":f,h=e.children,m=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),v=(0,i.useContext(c.E_).getPrefixCls)("scroll-number",t),g=Object.assign(Object.assign({},m),{"data-show":d,style:s,className:o()(v,r,a),title:u}),b=n;if(n&&Number(n)%1==0){var y=String(n).split("");b=y.map((function(e,t){return i.createElement(j,{prefixCls:v,count:Number(n),value:e,key:y.length-t})}))}return s&&s.borderColor&&(g.style=Object.assign(Object.assign({},s),{boxShadow:"0 0 0 1px ".concat(s.borderColor," inset")})),h?(0,l.Tm)(h,(function(e){return{className:o()("".concat(v,"-custom-component"),null==e?void 0:e.className,a)}})):i.createElement(p,g,b)};function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var L=function(e){var t,n,r=e.prefixCls,s=e.scrollNumberPrefixCls,u=e.children,d=e.status,f=e.text,p=e.color,h=e.count,m=void 0===h?null:h,v=e.overflowCount,g=void 0===v?99:v,b=e.dot,y=void 0!==b&&b,S=e.size,w=void 0===S?"default":S,x=e.title,k=e.offset,O=e.style,I=e.className,M=e.showZero,Z=void 0!==M&&M,N=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","showZero"]),j=i.useContext(c.E_),L=j.getPrefixCls,R=j.direction,z=L("badge",r),D=(t=C(z),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),F=D[0],H=D[1],B=m>g?"".concat(g,"+"):m,W="0"===B||0===B,_=(null!=d||null!=p)&&(null===m||W&&!Z),X=y&&!W,V=X?"":B,U=(0,i.useMemo)((function(){return(null==V||""===V||W&&!Z)&&!X}),[V,W,Z,X]),K=(0,i.useRef)(m);U||(K.current=m);var G=K.current,Y=(0,i.useRef)(V);U||(Y.current=V);var $=Y.current,q=(0,i.useRef)(X);U||(q.current=X);var Q,J,ee=(0,i.useMemo)((function(){if(!k)return Object.assign({},O);var e={marginTop:k[1]};return"rtl"===R?e.left=parseInt(k[0],10):e.right=-parseInt(k[0],10),Object.assign(Object.assign({},e),O)}),[R,k,O]),te=null!=x?x:"string"==typeof G||"number"==typeof G?G:void 0,ne=U||!f?null:i.createElement("span",{className:"".concat(z,"-status-text")},f),re=G&&"object"==typeof G?(0,l.Tm)(G,(function(e){return{style:Object.assign(Object.assign({},ee),e.style)}})):void 0,oe=o()((T(Q={},"".concat(z,"-status-dot"),_),T(Q,"".concat(z,"-status-").concat(d),!!d),T(Q,"".concat(z,"-status-").concat(p),E(p)),Q)),ae={};p&&!E(p)&&(ae.color=p,ae.background=p);var ie=o()(z,(T(J={},"".concat(z,"-status"),_),T(J,"".concat(z,"-not-a-wrapper"),!u),T(J,"".concat(z,"-rtl"),"rtl"===R),J),I);if(!u&&_){var ce=ee.color;return F(i.createElement("span",Object.assign({},N,{className:o()(ie,H),style:ee}),i.createElement("span",{className:oe,style:ae}),f&&i.createElement("span",{style:{color:ce},className:"".concat(z,"-status-text")},f)))}return F(i.createElement("span",Object.assign({},N,{className:o()(ie,H)}),u,i.createElement(a.Z,{visible:!U,motionName:"".concat(z,"-zoom"),motionAppear:!1,motionDeadline:1e3},(function(e){var t,n=e.className,r=L("scroll-number",s),a=q.current,c=o()((T(t={},"".concat(z,"-dot"),a),T(t,"".concat(z,"-count"),!a),T(t,"".concat(z,"-count-sm"),"small"===w),T(t,"".concat(z,"-multiple-words"),!a&&$&&$.toString().length>1),T(t,"".concat(z,"-status-").concat(d),!!d),T(t,"".concat(z,"-status-").concat(p),E(p)),t)),l=Object.assign({},ee);return p&&!E(p)&&((l=l||{}).background=p),i.createElement(P,{prefixCls:r,show:!U,motionClassName:n,className:c,count:$,title:te,style:l,key:"scrollNumber"},re)})),ne))};L.Ribbon=function(e){var t,n,r,a=e.className,l=e.prefixCls,s=e.style,u=e.color,d=e.children,f=e.text,p=e.placement,h=void 0===p?"end":p,m=i.useContext(c.E_),v=m.getPrefixCls,g=m.direction,b=v("ribbon",l),y=E(u),S=o()(b,"".concat(b,"-placement-").concat(h),(O(t={},"".concat(b,"-rtl"),"rtl"===g),O(t,"".concat(b,"-color-").concat(u),y),t),a),w=(n=C(b),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(n,r)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),x=w[0],I=w[1],M={},Z={};return u&&!y&&(M.background=u,Z.color=u),x(i.createElement("div",{className:o()("".concat(b,"-wrapper"),I)},d,i.createElement("div",{className:o()(S,I),style:Object.assign(Object.assign({},M),s)},i.createElement("span",{className:"".concat(b,"-text")},f),i.createElement("div",{className:"".concat(b,"-corner"),style:Z}))))};const R=L},11789:(e,t,n)=>{"use strict";n.d(t,{Z:()=>M});var r=n(63395),o=n(24177),a=n.n(o),i=n(98235),c=n(63505),l=n(68804),s=n(88570),u=n(6022),d=n(84286),f=n(64766),p=function(e){var t,n,r=e.prefixCls,o=e.separator,a=void 0===o?"/":o,i=e.children,s=e.menu,u=e.overlay,p=e.dropdownProps,h=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.ge