PageSourceSearch

https://lobe-chat-eight-virid-32.vercel.app/_next/static/chunks/86875-635576949ce3be2b.js

js lobe-chat-eight-virid-32.vercel.app collected 2026-10-03 07:19:15 UTC 33,034 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[86875],{41920:function(e,t,r){e.exports=function(e,t){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(e),o=r(t);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function u(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(e,t)||p(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){return new Promise(function(r,n){var o=new Image;o.onload=function(){return r(o)},o.onerror=n,!1==(null!==e&&!!e.match(/^\s*data:([a-z]+\/[a-z]+(;[a-z-]+=[a-z-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=\-._~:@/?%\s]*\s*$/i))&&t&&(o.crossOrigin=t),o.src=e})}var v,m="undefined"!=typeof window&&"undefined"!=typeof navigator&&!!("ontouchstart"in window||0<navigator.msMaxTouchPoints),b="undefined"!=typeof File,w={touch:{react:{down:"onTouchStart",mouseDown:"onMouseDown",drag:"onTouchMove",move:"onTouchMove",mouseMove:"onMouseMove",up:"onTouchEnd",mouseUp:"onMouseUp"},native:{down:"touchstart",mouseDown:"mousedown",drag:"touchmove",move:"touchmove",mouseMove:"mousemove",up:"touchend",mouseUp:"mouseup"}},desktop:{react:{down:"onMouseDown",drag:"onDragOver",move:"onMouseMove",up:"onMouseUp"},native:{down:"mousedown",drag:"dragStart",move:"mousemove",up:"mouseup"}}},x=m?w.touch:w.desktop,j="undefined"!=typeof window&&window.devicePixelRatio?window.devicePixelRatio:1,O={x:.5,y:.5},k=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(u,o.default.Component);var e,t,r,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var t,r=l(u);return t=e?Reflect.construct(r,arguments,l(this).constructor):r.apply(this,arguments),t&&("object"==typeof t||"function"==typeof t)?t:d(this)});function u(e){var t;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,u),a(d(t=n.call(this,e)),"state",{drag:!1,my:null,mx:null,image:O}),a(d(t),"handleImageReady",function(e){var r=t.getInitialSize(e.width,e.height);r.resource=e,r.x=.5,r.y=.5,r.backgroundColor=t.props.backgroundColor,t.setState({drag:!1,image:r},t.props.onImageReady),t.props.onLoadSuccess(r)}),a(d(t),"clearImage",function(){t.canvas.getContext("2d").clearRect(0,0,t.canvas.width,t.canvas.height),t.setState({image:O})}),a(d(t),"handleMouseDown",function(e){(e=e||window.event).preventDefault(),t.setState({drag:!0,mx:null,my:null})}),a(d(t),"handleMouseUp",function(){t.state.drag&&(t.setState({drag:!1}),t.props.onMouseUp())}),a(d(t),"handleMouseMove",function(e){var r,n,o,i,a,s,u,l,h,d,f,p,g,y,v,m;e=e||window.event,!1!==t.state.drag&&(e.preventDefault(),o={mx:r=e.targetTouches?e.targetTouches[0].pageX:e.clientX,my:n=e.targetTouches?e.targetTouches[0].pageY:e.clientY},m=(m=t.props.rotate%360)<0?m+360:m,t.state.mx&&t.state.my&&(i=t.state.mx-r,a=t.state.my-n,s=t.state.image.width*t.props.scale,u=t.state.image.height*t.props.scale,h=(l=t.getCroppingRect
1()).x,d=l.y,h*=s,d*=u,p=Math.cos((f=function(e){return Math.PI/180*e})(m)),y=d+-i*(g=Math.sin(f(m)))+a*p,v={x:(h+i*p+a*g)/s+1/t.props.scale*t.getXScale()/2,y:y/u+1/t.props.scale*t.getYScale()/2},t.props.onPositionChange(v),o.image=c(c({},t.state.image),v)),t.setState(o),t.props.onMouseMove(e))}),a(d(t),"setCanvas",function(e){t.canvas=e}),t.canvas=null,t}return t=[{key:"componentDidMount",value:function(){this.props.disableHiDPIScaling&&(j=1);var e,t,r=this.canvas.getContext("2d");this.props.image&&this.loadImage(this.props.image),this.paint(r),document&&(e=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){e=!1}return e}()&&{passive:!1},t=x.native,document.addEventListener(t.move,this.handleMouseMove,e),document.addEventListener(t.up,this.handleMouseUp,e),m&&(document.addEventListener(t.mouseMove,this.handleMouseMove,e),document.addEventListener(t.mouseUp,this.handleMouseUp,e)))}},{key:"componentDidUpdate",value:function(e,t){this.props.image&&this.props.image!==e.image||this.props.width!==e.width||this.props.height!==e.height||this.props.backgroundColor!==e.backgroundColor?this.loadImage(this.props.image):this.props.image||t.image===O||this.clearImage();var r=this.canvas.getContext("2d");r.clearRect(0,0,this.canvas.width,this.canvas.height),this.paint(r),this.paintImage(r,this.state.image,this.props.border),e.image===this.props.image&&e.width===this.props.width&&e.height===this.props.height&&e.position===this.props.position&&e.scale===this.props.scale&&e.rotate===this.props.rotate&&t.my===this.state.my&&t.mx===this.state.mx&&t.image.x===this.state.image.x&&t.image.y===this.state.image.y&&t.backgroundColor===this.state.backgroundColor||this.props.onImageChange()}},{key:"componentWillUnmount",value:function(){var e;document&&(e=x.native,document.removeEventListener(e.move,this.handleMouseMove,!1),document.removeEventListener(e.up,this.handleMouseUp,!1),m&&(document.removeEventListener(e.mouseMove,this.handleMouseMove,!1),document.removeEventListener(e.mouseUp,this.handleMouseUp,!1)))}},{key:"isVertical",value:function(){return!this.props.disableCanvasRotation&&this.props.rotate%180!=0}},{key:"getBorders",value:function(e){var t=0<arguments.length&&void 0!==e?e:this.props.border;return Array.isArray(t)?t:[t,t]}},{key:"getDimensions",value:function(){var e=this.props,t=e.width,r=e.height,n=e.rotate,o=e.border,i={},a=f(this.getBorders(o),2),s=a[0],u=a[1];return this.isVertical()?(i.width=r,i.height=t):(i.width=t,i.height=r),i.width+=2*s,i.height+=2*u,{canvas:i,rotate:n,width:t,height:r,border:o}}},{key:"getImage",value:function(){var e=this.getCroppingRect(),t=this.state.image;e.x*=t.resource.width,e.y*=t.resource.height,e.width*=t.resource.width,e.height*=t.resource.height;var r=document.createElement("canvas");this.isVertical()?(r.width=e.height,r.height=e.width):(r.width=e.width,r.height=e.height);var n=r.getContext("2d");return n.translate(r.width/2,r.height/2),n.rotate(this.props.rotate*Math.PI/180),n.translate(-r.width/2,-r.height/2),this.isVertical()&&n.translate((r.width-r.height)/2,(r.height-r.width)/2),t.backgroundColor&&(n.fillStyle=t.backgroundColor,n.fillRect(-e.x,-e.y,t.resource.width,t.resource.height)),n.drawImage(t.resource,-e.x,-e.y),r}},{key:"getImageScaledToCanvas",value:function(){var e=this.getDimensions(),t=e.width,r=e.height,n=document.createElement("canvas");return this.isVertical()?(n.width=r,n.height=t):(n.width=t,n.height=r),this.paintImage(n.getContext("2d"),this.state.image,0,1),n}},{key:"getXScale",value:function(){return Math.min(1,this.props.width/this.props.height/(this.state.image.width/this.state.image.height))}},{key:"getYScale",value:function(){return Math.min(1,this.props.height/this.props.width/(this.state.image.height/this.state.image.width))}},{key:"getCroppingRect",value:function(){var e=this.props.position||{x:this.state.image.x,y:this.state.image.y},t=1/this.props.scale*this.getXScale(),r=1/this.props.scale*this.getYScale(),n={x:e.x-t/2,y:e.y-r/2,width:t,height:r},o=0,i=1-n.width,a=0,s=1-n.height;return(this.props.disableBoundaryChecks||1<t||1<r)&&(o=-n.width,a=-n.height,s=i=1),c(c({},n),{},{x:Math.max(o,Math.min(n.x,i)),y:Math.max(a,Math.min(n.y,s))})}},{key:"loadImage",value:function(e){b&&e instanceof File?this.loadingImage=new Promise(function(t,r){var n=new FileReader;n.onload=function(e){try{var n=y(e.target.result);t(n)}catch(e){r(e)}},n.readAsDataURL(e)}).then(this.handleImageReady).catch(this.props.onLoadFailure):"string"==typeof e&&(this.loadingImage=y(e,this.props.crossOrigin).then(this.handleImageReady).catch(this.props.onLoadFailure))}},{key:"getInitialSize",value:function(e,t){var r,n,o=this.getDimensions();return t/e<o.height/o.width?n=e*((r=this.getDimensions().height)/t):r=t*((n=this.getDimensions().width)/e),{height:r,width:n}}},{key:"paintImage",value:function(e,t,r,n){var o,i=3<arguments.length&&void 0!==n?n:j;t.resource&&(o=this.calculatePosition(t,r),e.save(),e.translate(e.canvas.width/2,e.canvas.height/2),e.rotate(this.props.rotate*Math.PI/180),e.translate(-e.canvas.width/2,-e.canvas.height/2),this.isVertical()&&e.translate((e.canvas.width-e.canvas.height)/2,(e.canvas.height-e.canvas.width)/2),e.scale(i,i),e.globalCompositeOperation="destination-over",e.drawImage(t.resource,o.x,o.y,o.width,o.height),t.backgroundColor&&(e.fillStyle=t.backgroundColor,e.fillRect(o.x,o.y,o.width,o.height)),e.restore(
1))}},{key:"calculatePosition",value:function(e,t){e=e||this.state.image;var r=f(this.getBorders(t),2),n=r[0],o=r[1],i=this.getCroppingRect(),a=e.width*this.props.scale,s=e.height*this.props.scale,u=-i.x*a,c=-i.y*s;return this.isVertical()?(u+=o,c+=n):(u+=n,c+=o),{x:u,y:c,height:s,width:a}}},{key:"paint",value:function(e){e.save(),e.scale(j,j),e.translate(0,0),e.fillStyle="rgba("+this.props.color.slice(0,4).join(",")+")";var t,r,n,o,i,a=this.props.borderRadius,s=this.getDimensions(),u=f(this.getBorders(s.border),2),c=u[0],l=u[1],h=s.canvas.height,d=s.canvas.width,a=Math.max(a,0);a=Math.min(a,d/2-c,h/2-l),e.beginPath(),t=d-2*c,r=h-2*l,0===(n=a)?e.rect(c,l,t,r):(o=t-n,i=r-n,e.translate(c,l),e.arc(n,n,n,Math.PI,1.5*Math.PI),e.lineTo(o,0),e.arc(o,n,n,1.5*Math.PI,2*Math.PI),e.lineTo(t,i),e.arc(o,i,n,2*Math.PI,.5*Math.PI),e.lineTo(n,r),e.arc(n,i,n,.5*Math.PI,Math.PI),e.translate(-c,-l)),e.rect(d,0,-d,h),e.fill("evenodd"),e.restore()}},{key:"render",value:function(){var e=this.props,t=(e.scale,e.rotate,e.image,e.border,e.borderRadius,e.width,e.height,e.position,e.color,e.backgroundColor,e.style),r=(e.crossOrigin,e.onLoadFailure,e.onLoadSuccess,e.onImageReady,e.onImageChange,e.onMouseUp,e.onMouseMove,e.onPositionChange,e.disableBoundaryChecks,e.disableHiDPIScaling,e.disableCanvasRotation,function(e,t){if(null==e)return{};var r,n=function(e,t){if(null==e)return{};for(var r,n={},o=Object.keys(e),i=0;i<o.length;i++)r=o[i],0<=t.indexOf(r)||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),i=0;i<o.length;i++)r=o[i],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}(e,["scale","rotate","image","border","borderRadius","width","height","position","color","backgroundColor","style","crossOrigin","onLoadFailure","onLoadSuccess","onImageReady","onImageChange","onMouseUp","onMouseMove","onPositionChange","disableBoundaryChecks","disableHiDPIScaling","disableCanvasRotation"])),n=this.getDimensions(),i={width:n.canvas.width,height:n.canvas.height,cursor:this.state.drag?"grabbing":"grab",touchAction:"none"},a={width:n.canvas.width*j,height:n.canvas.height*j,style:c(c({},i),t)};return a[x.react.down]=this.handleMouseDown,m&&(a[x.react.mouseDown]=this.handleMouseDown),o.default.createElement("canvas",s({ref:this.setCanvas},a,r))}}],i(u.prototype,t),r&&i(u,r),u}();return a(k,"propTypes",{scale:n.default.number,rotate:n.default.number,image:n.default.oneOfType([n.default.string].concat(function(e){if(Array.isArray(e))return g(e)}(v=b?[n.default.instanceOf(File)]:[])||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(v)||p(v)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),border:n.default.oneOfType([n.default.number,n.default.arrayOf(n.default.number)]),borderRadius:n.default.number,width:n.default.number,height:n.default.number,position:n.default.shape({x:n.default.number,y:n.default.number}),color:n.default.arrayOf(n.default.number),backgroundColor:n.default.string,crossOrigin:n.default.oneOf(["","anonymous","use-credentials"]),onLoadFailure:n.default.func,onLoadSuccess:n.default.func,onImageReady:n.default.func,onImageChange:n.default.func,onMouseUp:n.default.func,onMouseMove:n.default.func,onPositionChange:n.default.func,disableBoundaryChecks:n.default.bool,disableHiDPIScaling:n.default.bool,disableCanvasRotation:n.default.bool}),a(k,"defaultProps",{scale:1,rotate:0,border:25,borderRadius:0,width:200,height:200,color:[0,0,0,.5],onLoadFailure:function(){},onLoadSuccess:function(){},onImageReady:function(){},onImageChange:function(){},onMouseUp:function(){},onMouseMove:function(){},onPositionChange:function(){},disableBoundaryChecks:!1,disableHiDPIScaling:!1,disableCanvasRotation:!0}),k}(r(38637),r(12115))},86875:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>K});var n,o,i,a,s,u=r(21263),c=r(12115),l=r(60445);function h(e){let t=(0,c.useRef)(null),r=(0,c.useRef)(null);return r.current&&r.current.update(e),(0,c.useEffect)(()=>
1(r.current=new l.LC({...e,ref:t}),()=>{r.current=null}),[]),c.createElement("div",{ref:t})}var d=r(56200),f=r(74273);let p=(0,f.A)("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]),g=(0,f.A)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),y=(0,f.A)("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);var v=r(24974),m=r(73751),b=r(19186),w=r(90427),x=r(90134),j=r(50859),O=r(91651),k=r(43825),S=r(86980),M=r(93002),P=r(46360),C=r(94326),E=r(77325);let I=(0,f.A)("ImageUp",[["path",{d:"M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",key:"9csbqa"}],["path",{d:"m14 19.5 3-3 3 3",key:"9vmjn0"}],["path",{d:"M17 22v-5.5",key:"1aa6fl"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);var L=r(64519),D=r(41920),A=r.n(D),R=r(28968),T=r(33961);function U(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var z=(0,R.rU)(function(e){var t=e.css,r=e.token,u=e.prefixCls;return{avatar:t(n||(n=U(["\n    position: relative;\n    border-radius: 50%;\n    transition: box-shadow 100ms ",";\n\n    &:hover {\n      box-shadow: 0 0 0 3px ",";\n    }\n  "])),r.motionEaseOut,r.colorText),editor:t(o||(o=U(["\n    overflow: hidden;\n    border: 1px solid ",";\n    border-radius: ","px;\n  "])),r.colorBorder,r.borderRadiusLG),loading:t(i||(i=U(["\n    position: absolute;\n    z-index: 1;\n    inset: 0;\n\n    background: ",";\n    border-radius: 50%;\n  "])),r.colorBgMask),picker:t(a||(a=U(["\n    position: relative;\n\n    em-emoji-picker {\n      --rgb-accent: ",";\n      --shadow: none;\n      --rgb-background: none;\n      --border-radius: 0;\n    }\n  "])),(0,T.Ay)(r.colorPrimary).rgb().join(",")),popover:t(s||(s=U(["\n    .","-popover-inner {\n      padding: 0;\n    }\n  "])),u)}}),_=r(95155);function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var N=P.A.Dragger,B=(0,c.memo)(function(e){var t,r=e.onChange,n=e.texts,o=e.compressSize,i=void 0===o?256:o,a=e.onUpload,s=(0,c.useRef)(null),u=function(e){if(Array.isArray(e))return e}(t=(0,c.useState)(""))||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{i=(r=r.call(e)).next;for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,2)||function(e,t){if(e){if("string"==typeof e)return F(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=u[0],h=u[1],d=z().styles,f=(0,c.useCallback)(function(e){var t;if("image/jpeg"!==e.type&&"image/png"!==e.type){C.Ay.error((null==n?void 0:n.fileTypeError)||"You can only upload JPG/PNG file!");return}return(t=function(e){h(e)},function(e){var r=new FileReader;
1r.readAsDataURL(e),r.addEventListener("load",function(){t(String(r.result))})})(e)},[]);return(0,_.jsxs)(m.Flexbox,{padding:10,style:{position:"relative"},width:"100%",children:[!l&&(0,_.jsx)(N,{accept:"image",beforeUpload:f,itemRender:function(){},maxCount:1,multiple:!1,children:(0,_.jsxs)(b.default,{gap:16,height:i,width:i,children:[(0,_.jsx)(k.default,{icon:I,size:{fontSize:48,strokeWidth:1.5}}),(0,_.jsx)("div",{children:(null==n?void 0:n.draggerDesc)||"Click or Drag image to this area to upload"})]})}),l&&(0,_.jsxs)(b.default,{gap:8,style:{position:"relative"},width:"100%",children:[(0,_.jsx)(m.Flexbox,{className:d.editor,children:(0,_.jsx)(A(),{border:0,borderRadius:i/2,height:i,image:l,ref:s,width:i})}),(0,_.jsxs)(m.Flexbox,{gap:8,horizontal:!0,style:{position:"relative"},width:"100%",children:[(0,_.jsx)(E.Ay,{icon:(0,_.jsx)(k.default,{icon:L.A}),onClick:function(){return h("")},style:{flex:"none"}}),(0,_.jsx)(E.Ay,{onClick:function(){if(s.current){var e=s.current.getImageScaledToCanvas().toDataURL();if(r(e),a){var t=new File([e],"avatar.webp",{type:"image/webp"});null==a||a(t)}}},style:{flex:1,fontWeight:500},type:"primary",children:(null==n?void 0:n.uploadBtn)||"Crop and Upload"})]})]})]})});function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var V=["value","defaultAvatar","backgroundColor","onChange","locale","allowUpload","allowDelete","texts","onDelete","compressSize","customEmojis","loading","size","onClick","onUpload","className","customTabs","popupClassName","popupStyle"];function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e,t){if("object"!=G(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=G(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==G(t)?t:String(t)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function W(){W=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(t,r,n,i){var a,s,u,c,l=Object.create((r&&r.prototype instanceof y?r:y).prototype);return o(l,"_invoke",{value:(a=t,s=n,u=new P(i||[]),c=d,function(t,r){if(c===f)throw Error("Generator is already running");if(c===p){if("throw"===t)throw r;return{value:e,done:!0}}for(u.method=t,u.arg=r;;){var n=u.delegate;if(n){var o=function t(r,n){var o=n.method,i=r.iterator[o];if(i===e)return n.delegate=null,"throw"===o&&r.iterator.return&&(n.method="return",n.arg=e,t(r,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+o+"' method")),g;var a=h(i,r.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var s=a.arg;return s?s.done?(n[r.resultName]=s.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):s:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,g)}(n,u);if(o){if(o===g)continue;return o}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(c===d)throw c=p,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c=f;var i=h(a,s,u);if("normal"===i.type){if(c=u.done?p:"suspendedYield",i.arg===g)continue;return{value:i.arg,done:u.done}}
vendor: 4,317 bytes, line 1
1"throw"===i.type&&(c=p,u.method="throw",u.arg=i.arg)}})}),l}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",f="executing",p="completed",g={};function y(){}function v(){}function m(){}var b={};c(b,a,function(){return this});var w=Object.getPrototypeOf,x=w&&w(w(C([])));x&&x!==r&&n.call(x,a)&&(b=x);var j=m.prototype=y.prototype=Object.create(b);function O(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e)})})}function k(e,t){var r;o(this,"_invoke",{value:function(o,i){function a(){return new t(function(r,a){!function r(o,i,a,s){var u=h(e[o],e,i);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==G(l)&&n.call(l,"__await")?t.resolve(l.__await).then(function(e){r("next",e,a,s)},function(e){r("throw",e,a,s)}):t.resolve(l).then(function(e){c.value=e,a(c)},function(e){return r("throw",e,a,s)})}s(u.arg)}(o,i,r,a)})}return r=r?r.then(a,a):a()}})}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function C(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw TypeError(G(t)+" is not iterable")}return v.prototype=m,o(j,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:v,configurable:!0}),v.displayName=c(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,c(e,u,"GeneratorFunction")),e.prototype=Object.create(j),e},t.awrap=function(e){return{__await:e}},O(k.prototype),c(k.prototype,s,function(){return this}),t.AsyncIterator=k,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new k(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then(function(e){return e.done?e.value:a.next()})},O(j),c(j,u,"Generator"),c(j,a,function(){return this}),c(j,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=C,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(M),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];
1if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function X(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,o)}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||q(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){if(e){if("string"==typeof e)return J(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J(e,t)}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}let K=(0,c.memo)(function(e){var t,n,o=e.value,i=e.defaultAvatar,a=void 0===i?"\uD83E\uDD16":i,s=e.backgroundColor,l=e.onChange,f=e.locale,P=void 0===f?"en-US":f,C=e.allowUpload,E=e.allowDelete,I=e.texts,L=e.onDelete,D=e.compressSize,A=e.customEmojis,R=e.loading,T=e.size,U=void 0===T?44:T,F=e.onClick,N=e.onUpload,G=e.className,H=e.customTabs,K=void 0===H?[]:H,Q=e.popupClassName,Z=e.popupStyle,ee=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,V),et=(0,c.useRef)(null),er=$((0,c.useState)(!1),2),en=er[0],eo=er[1],ei=$((0,c.useState)("emoji"),2),ea=ei[0],es=ei[1],eu=$((0,c.useState)(!1),2),ec=eu[0],el=eu[1],eh=z(),ed=eh.cx,ef=eh.styles,ep=eh.theme,eg=(0,w.default)(P,(t=W().mark(function e(){return W().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r(29878)("./".concat(P.split("-")[0],".json"));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(e){X(i,n,o,a,s,"next",e)}function s(e){X(i,n,o,a,s,"throw",e)}a(void 0)})}),{revalidateOnFocus:!1}).data,ey=$((0,x.A)(a,{defaultValue:a,onChange:l,value:o}),2),ev=ey[0],em=ey[1],eb=function(e){et.current&&ec&&!en&&e.target!==et.current&&el(!1)},ew=function(e){em(e),el(!1)};(0,c.useEffect)(function(){return document.addEventListener("click",eb),function(){return document.removeEventListener("click",eb)}},[en,ec]);var ex=[{key:"emoji",label:(0,_.jsx)(M.default,{title:(null==I?void 0:I.emoji)||"Emoji",children:(0,_.jsx)(k.default,{icon:p,size:{fontSize:20,strokeWidth:2.5}})})},C&&{key:"upload",label:(0,_.jsx)(M.default,{title:(null==I?void 0:I.upload)||"Upload",children:(0,_.jsx)(k.default,{icon:g,size:{fontSize:20,strokeWidth:2.5}})})}].concat(function(e){if(Array.isArray(e))return J(e)}(n=K.map(function(e){return{key:e.value,label:e.label}}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||q(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter(Boolean),ej=ex&&ex.length>1;return(0,_.jsx)(d.A,{arrow:!1,content:(0,_.jsxs)(m.Flexbox,{className:ed(ef.picker,Q),onMouseEnter:function(){return eo(!0)},onMouseLeave:function(){return eo(!1)},ref:et,style:Y({minWidth:310,paddingTop:4*!!ej},Z),children:[ej&&(0,_.jsxs)(m.Flexbox,{align:"center",horizontal:!0,justify:"space-between",paddingInline:10,children:[(0,_.jsx)(S.default,{activeKey:ea,items:ex,onChange:function(e){return es(e)},variant:"compact"}),E&&(0,_.jsx)(j.default,{icon:y,onClick:function(){ew(a),null==L||L()},size:{fontSize:20,strokeWidth:2.5},title:(null==I?void 0:I.delete)||"Delete"})]}),"emoji"===ea&&(0,_.jsx)(h,{custom:A,data:u,i18n:eg,icons:"outline",locale:P.split("-")[0],navPosition:ej?"bottom":"top",onEmojiSelect:function(e){return ew(e.src||e.native)},previewPosition:"none",skinTonePosition:"none",theme:ep.isDarkMode?"dark":"light"}),"upload"===ea&&(0,_.jsx)(B,{compressSize:void 0===D?256:D,onChange:ew,onUpload:N,texts:I}),K.map(function(e){return ea===e.value&&(0,_.jsx)(m.Flexbox,{padding:10,
1children:e.render(ew)},e.value)})]}),destroyTooltipOnHide:!0,open:ec,placement:"bottomLeft",rootClassName:ef.popover,trigger:["click"],children:(0,_.jsxs)(b.default,Y(Y({className:ed(ef.avatar,G),flex:"none",height:U,onClick:function(e){R||(el(!ec),null==F||F(e))},onMouseEnter:function(){return eo(!0)},onMouseLeave:function(){return eo(!1)},width:U},ee),{},{children:[R&&(0,_.jsx)(b.default,{className:ef.loading,height:"100%",width:"100%",children:(0,_.jsx)(k.default,{icon:v.A,size:{fontSize:U/2},spin:!0})}),(0,_.jsx)(O.default,{avatar:ev,background:void 0===s?"rgba(0,0,0,0)":s,size:U})]}))})})}}]);

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.