1(this["webpackJsonpvectr-next"]=this["webpackJsonpvectr-next"]||[]).push([[25],{454:function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n,a=i(0);const s=["title","titleId"];function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(null,arguments)}function o(e,t){let{title:i,titleId:o}=e,l=function(e,t){if(null==e)return{};var i,n,a=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)i=s[n],-1===t.indexOf(i)&&{}.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}(e,s);return a.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:t,"aria-labelledby":o},l),i?a.createElement("title",{id:o},i):null,n||(n=a.createElement("path",{fill:"currentColor",d:"M4,4H11V2H4A2,2 0 0,0 2,4V11H4V4M10,13L6,18H18L15,14L12.97,16.71L10,13M17,8.5A1.5,1.5 0 0,0 15.5,7A1.5,1.5 0 0,0 14,8.5A1.5,1.5 0 0,0 15.5,10A1.5,1.5 0 0,0 17,8.5M20,2H13V4H20V11H22V4A2,2 0 0,0 20,2M20,20H13V22H20A2,2 0 0,0 22,20V13H20V20M4,13H2V20A2,2 0 0,0 4,22H11V20H4V13Z"})))}const l=a.forwardRef(o);i.p},456:function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n,a=i(0);const s=["title","titleId"];function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(null,arguments)}function o(e,t){let{title:i,titleId:o}=e,l=function(e,t){if(null==e)return{};var i,n,a=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)i=s[n],-1===t.indexOf(i)&&{}.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}(e,s);return a.createElement("svg",r({id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"25px",height:"25px",viewBox:"0 0 25 25",enableBackground:"new 0 0 25 25",xmlSpace:"preserve",ref:t,"aria-labelledby":o},l),i?a.createElement("title",{id:o},i):null,n||(n=a.createElement("path",{fill:"currentColor",d:"M25,16.071c0,2.959-2.398,5.357-5.357,5.357H14.87v-4.874h3.836l-5.992-5.992 c-0.118-0.118-0.309-0.118-0.427,0l-5.992,5.992h3.786v4.874H5.357C2.398,21.429,0,19.03,0,16.071s2.398-5.357,5.357-5.357 c0-3.945,3.198-7.143,7.143-7.143s7.143,3.198,7.143,7.143C22.602,10.714,25,13.113,25,16.071z"})))}const l=a.forwardRef(o);i.p},463:function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n,a=i(0);const s=["title","titleId"];function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(null,arguments)}function o(e,t){let{title:i,titleId:o}=e,l=function(e,t){if(null==e)return{};var i,n,a=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)i=s[n],-1===t.indexOf(i)&&{}.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}(e,s);return a.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:t,"aria-labelledby":o},l),i?a.createElement("title",{id:o},i):null,n||(n=a.createElement("path",{fill:"currentColor",d:"M9,2A7,7 0 0,1 16,9C16,10.57 15.5,12 14.61,13.19L15.41,14H16L22,20L20,22L14,16V15.41L13.19,14.61C12,15.5 10.57,16 9,16A7,7 0 0,1 2,9A7,7 0 0,1 9,2M8,5V8H5V10H8V13H10V10H13V8H10V5H8Z"})))}const l=a.forwardRef(o);i.p},464:function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n,a=i(0);const s=["title","titleId"];function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(null,arguments)}function o(e,t){let{title:i,titleId:o}=e,l=function(e,t){if(null==e)return{};var i,n,a=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)i=s[n],-1===t.indexOf(i)&&{}.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}(e,s);return a.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:t,"aria-labelledby":o},l),i?a.createElement("title",{id:o},i):null,n||(n=a.createElement("path",{fill:"currentColor",d:"M9,2A7,7 0 0,1 16,9C16,10.57 15.5,12 14.61,13.19L15.41,14H16L22,20L20,22L14,16V15.41L13.19,14.61C12,15.5 10.57,16 9,16A7,7 0 0,1 2,9A7,7 0 0,1 9,2M5,8V10H13V8H5Z"})))}const l=a.forwardRef(o);i.p},494:function(e,t,i){"use strict";var n=i(0),a=i(3);const s=1.1;
1class r{constructor(e){this.slider=e,this.start={x:0,y:0}}onMouseDown(e,t){this.start.x=e,this.start.y=t}onMouseMove(e){this.slider.x=e}}class o{constructor(){this.x=0,this.height=0,this.lineWidth=3}drawIcon(e,t,i,n){e.beginPath(),e.arc(t,i,n,0,2*Math.PI,!1),e.lineWidth=this.lineWidth,e.strokeStyle="#FFFFFF",e.stroke(),e.save(),e.translate(5,0),e.beginPath(),e.moveTo(t-16,i),e.lineTo(t-8,i-8),e.lineTo(t-8,i+8),e.closePath(),e.fillStyle="#FFFFFF",e.fill(),e.restore(),e.save(),e.translate(-5,0),e.beginPath(),e.moveTo(t+16,i),e.lineTo(t+8,i-8),e.lineTo(t+8,i+8),e.closePath(),e.fillStyle="#FFFFFF",e.fill(),e.restore()}drawLine(e,t,i){e.lineWidth=this.lineWidth,e.strokeStyle="#ffffff",e.beginPath(),e.moveTo(this.x,0),e.lineTo(this.x,t-i),e.moveTo(this.x,t+i),e.lineTo(this.x,this.height),e.stroke()}draw(e){const t=this.height/2;this.drawLine(e,t,20),this.drawIcon(e,this.x,t,20)}hitTest(e,t){const i=this.height/2;return e>=this.x-this.lineWidth/2-6&&e<=this.x+this.lineWidth/2+6||e>=this.x-20&&e<=this.x+20&&t>=i-20&&t<=i+20}}class l{constructor(e,t){this.canvas=e,this.ctx=void 0,this.imageBefore=void 0,this.imageAfter=void 0,this.matrix=[1,0,0,1,0,0],this.isDragging=!1,this.start={x:0,y:0},this.slider=void 0,this.action=void 0,this.handleKeyboardEvent=e=>{"keydown"===e.type&&(222===e.keyCode?this.zoom(s):186===e.keyCode&&this.zoom(1/s))},this.handleMouseDown=e=>{document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp);const t=this.canvas.getBoundingClientRect(),i=this.canvas.offsetWidth/t.width,n=t.x,a=t.y,s=(e.clientX-n)*i,o=(e.clientY-a)*i;if(this.slider.hitTest(s,o))return this.action=new r(this.slider),void this.action.onMouseDown(s,o);this.isDragging=!0,this.start={x:s-this.matrix[4],y:o-this.matrix[5]},this.canvas.style.cursor="grabbing"},this.handleMouseMove=e=>{const t=this.canvas.getBoundingClientRect(),i=this.canvas.offsetWidth/t.width,n=t.x,a=t.y;let s=(e.clientX-n)*i;const r=(e.clientY-a)*i;if(this.action)return s=Math.max(s,0),s=Math.min(s,t.width*i),this.action.onMouseMove(s),void this.drawImage();if(this.isDragging){const e=s-this.start.x,t=r-this.start.y;this.matrix[4]=e,this.matrix[5]=t,this.drawImage()}},this.handleMouseUp=()=>{this.isDragging=!1,this.canvas.style.cursor="grab",this.action=null,document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)};const i=e.getContext("2d");if(!i)throw new Error("Failed to get canvas context");this.ctx=i,this.imageBefore=new Image,this.imageBefore.src=t,this.imageBefore.onload=()=>this.initializeImage(),this.setupEventListeners(),this.slider=new o,this.slider.height=this.canvas.height,this.slider.x=this.canvas.width/2}setImageAfter(e){this.imageAfter=new Image,this.imageAfter.onload=()=>this.drawImage(),this.imageAfter.src=e}initializeImage(){const e=this.canvas.width/this.canvas.height;let t=1;t=this.imageBefore.width/this.imageBefore.height>e?this.canvas.width/this.imageBefore.width:this.canvas.height/this.imageBefore.height,this.matrix=[t,0,0,t,(this.canvas.width-this.imageBefore.width*t)/2,(this.canvas.height-this.imageBefore.height*t)/2],this.drawImage()}drawImage(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.ctx.save();const[e,t,i,n,a,s]=this.matrix;this.ctx.setTransform(e,t,i,n,a,s);const r=this.imageBefore.width,o=this.imageBefore.height;this.imageAfter&&this.ctx.drawImage(this.imageAfter,0,0,r,o);const l=this.slider.x,c=((e,t,i,n,a,s)=>{const r={a:e,b:t,c:i,d:n,tx:a,ty:s};if(0===t&&0===i)return r.b=r.c=0,0===e||0===n?r.a=r.d=r.tx=r.ty=0:(e=r.a=1/e,n=r.d=1/n,r.tx=-e*a,r.ty=-n*s),r;var o=e*n-t*i;if(0===o)return r.a=r.d=1,r.b=r.c=r.tx=r.ty=0,r;o=1/o;var l=r.a=n*o;return t=r.b=-t*o,i=r.c=-i*o,n=r.d=e*o,r.tx=-(l*a+i*s),r.ty=-(t*a+n*s),r})(e,t,i,n,a,s);let h=c.a*l+0*c.c+c.tx;c.b,c.d,c.ty;this.imageBefore&&this.ctx.drawImage(this.imageBefore,0,0,h,o,0,0,h,o),this.ctx.restore(),this.drawSlider()}setupEventListeners(){this.canvas.addEventListener("mousedown",this.handleMouseDown),document.addEventListener("keydown",this.handleKeyboardEvent),document.addEventListener("keyup",this.handleKeyboardEvent)}destroy(){this.canvas.removeEventListener("mousedown",this.handleMouseDown),this.canvas.removeEventListener("mousemove",this.handleMouseMove),this.canvas.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyboardEvent),document.removeEventListener("keyup",this.handleKeyboardEvent)}drawSlider(){this.slider.draw(this.ctx)}zoom(e){const t=this.canvas.width/2,i=this.canvas.height/2;this.matrix[4]-=t,this.matrix[5]-=i,this.matrix[0]*=e,this.matrix[3]*=e,this.matrix[4]=t+this.matrix[4]*e,this.matrix[5]=i+this.matrix[5]*e,this.drawImage()}}const c=Object(n.forwardRef)(((e,t)=>{let{imageUrlBefore:i,imageUrlAfter:r,canvasWidth:o,canvasHeight:c}=e;const h=Object(n.useRef)(null),d=Object(n.useRef)(null);return Object(n.useEffect)((()=>
1{h.current&&(d.current=new l(h.current,i))}),[i,r]),Object(n.useEffect)((()=>{var e;null===(e=d.current)||void 0===e||e.setImageAfter(r)}),[r]),Object(n.useImperativeHandle)(t,(()=>({zoomIn:()=>{var e;return null===(e=d.current)||void 0===e?void 0:e.zoom(s)},zoomOut:()=>{var e;return null===(e=d.current)||void 0===e?void 0:e.zoom(1/s)}}))),Object(n.useEffect)((()=>()=>{var e;null===(e=d.current)||void 0===e||e.destroy()}),[]),Object(a.jsx)("canvas",{ref:h,width:o,height:c,style:{width:"100%",height:"100%"}})}));t.a=c},618:function(e,t,i){"use strict";var n=i(0),a=i(41),s=i(178),r=i(69),o=i(386),l=i(856),c=i(401),h=i(389),d=i(399),u=i(712),g=i(449),m=i(438),b=i(180),f=i(19),v=i(23),j=i(451),x=i(30),p=i(48),O=i(102),y=i(183),w=i(131),E=i.n(w),I=i(453),S=i(456),_=i(494),C=i(463),L=i(464),R=(i(619),i(35)),M=i(461),P=i(70),H=i(259),k=i(103),A=i(454),B=i(455),D=i(452),z=i(3);t.a=()=>{Object(f.d)(v.a);const e=Object(a.a)(),t=(Object(f.d)(x.a),Object(f.d)(O.a)),{enqueueSnackbar:i}=Object(y.b)(),w=Object(D.f)(),F=Object(s.a)({root:{borderRadius:"6px"},sliderRail:{background:"#45B017",opacity:.7}}),[N,T]=Object(n.useState)(!1),V=F(),[U,W]=Object(n.useState)(void 0),[K,q]=Object(n.useState)(void 0),[X,Z]=Object(n.useState)(""),[G,J]=Object(n.useState)(!0),[Y,Q]=Object(n.useState)(""),[$,ee]=Object(n.useState)("DDIM"),[te,ie]=Object(n.useState)(8),[ne,ae]=Object(n.useState)(.2),[se,re]=Object(n.useState)(0),[oe,le]=Object(n.useState)(1),[ce,he]=Object(n.useState)(.8),[de,ue]=Object(n.useState)(!1),{t:ge}=Object(P.b)(),me=Object(n.useRef)(null),[be,fe]=Object(n.useState)(!1),[ve,je]=Object(n.useState)(!1),[xe,pe]=Object(n.useState)(void 0),[Oe,ye]=Object(n.useState)({width:0,height:0}),we=Object(n.useRef)(null);Object(n.useEffect)((()=>{let e;return we.current&&(e=new ResizeObserver((t=>{const i=t[0].target.getBoundingClientRect();ye({width:Math.floor(i.width),height:Math.floor(i.height)}),e.disconnect()})),e.observe(we.current)),()=>{e.disconnect()}}),[]);const Ee=async()=>{const e=await Object(I.a)({mimeTypes:["image/jpg","image/png"],extensions:[".jpg",".jpeg",".png"]}),t=await Object(j.v)(e);W(t),q(t),pe(void 0),fe(!1)},Ie=Object(D.g)((async()=>{var e;if(!Object(k.a)("AUTO_ENHANCE"))return;if(be)return;let n=U;if(xe){const e=await Object(j.b)(xe),t=await Object(j.v)(e);W(xe),q(t),pe(void 0),n=xe}if(!n)return void i(ge("components.notify.upload_image_error"),{variant:"error"});if(!G&&""===X)return void i(ge("components.notify.check_auto_prompt_error"),{variant:"error"});const a=await Object(j.H)([n]);if(0===a.length)return;fe(!0);const s={version:p.b,config:{image:a[0],scheduler:$,creativity:ne,boolAutoPrompt:G,hdr:se,lora_sharpness_strength:oe,lora_details_strength:ce,steps:te,prompt:X,negative_prompt:Y}},r=null===(e=t.value)||void 0===e?void 0:e.id;r&&await Object(j.e)(s).then((async e=>{let{data:n}=e;const a=n.urls.get,s=a.lastIndexOf("/"),o=a.substring(s+1,a.length);await Object(j.f)(o,r).then((async e=>{let{image:n}=e;if(n){var a;null===(a=t.ornull)||void 0===a||a.merge((e=>({credits:e.credits-p.d.AUTO_ENHANCE})));const e=await Object(j.b)(n),i=await Object(j.I)(e);pe(i)}else i(ge("auto_enhance.get_errors"),{variant:"error"});fe(!1)})).catch((e=>{i(ge("auto_enhance.get_errors"),{variant:"error"}),fe(!1)})).finally((()=>{var e;null===(e=t.ornull)||void 0===e||e.merge((()=>({isFirstTimeProdia:!1})))}))}))}),24e4);Object(n.useEffect)((()=>{setTimeout((()=>{R.a.once("showAIHiResolutionDialog",(async e=>{let{HiResolutionImagUrl:t,HiResolutionImageBase64:i,HiResolutionImageType:n,HiResolutionOpenFrom:a}=e;W(t),q(i),pe(void 0),"canvas"===a&&T(!0)}))}),1)}));return Object(z.jsxs)(z.Fragment,{children:[Object(z.jsxs)(r.a,{className:"hi-resolution-main",container:!0,style:{height:"100%",flexWrap:"nowrap"},children:[Object(z.jsxs)(r.a,{container:!0,item:!0,direction:"column",style:{flexWrap:"nowrap",width:"450px",flexShrink:0},children:[Object(z.jsxs)(r.a,{item:!0,style:{height:"100%",display:"flex",flexDirection:"column"},children:[Object(z.jsx)(o.a,{label:ge("editor.description_prompt_english"),multiline:!0,minRows:1,maxRows:8,variant:"filled",placeholder:ge("editor.describe_uploaded_image")+" "+("en"!==H.a.language?ge("editor.english_input_only",{defaultValue:"English input only."}):""),fullWidth:!0,autoFocus:!0,style:{borderRadius:"6px",border:"1px solid #ffffff",color:"#fff",margin:"0",height:"100%",background:"#323f4e"},value:X,InputLabelProps:{shrink:!0,style:{color:"#fff"}},InputProps:{classes:V,disableUnderline:!0,style:{height:"100%",background:"#323f4e",display:"flex",alignItems:"flex-start"}},onChange:e=>Z(e.target.value)}),Object(z.jsx)(l.a,{control:Object(z.jsx)(c.a,{size:"small",checked:G,onChange:e=>J(e.target.checked)}),label:ge("editor.auto_prompt")})]}),Object(z.jsx)(r.a,{item:!0,children:Object(z.jsx)(o.a,{label:ge("editor.negative_prompt_english"),multiline:!0,minRows:2,maxRows:4,variant:"filled",placeholder:ge("editor.avoid_specific_details")+" "+ge("editor.english_input_only",{defaultValue:"English input only."}),fullWidth:!0,style:{border:"1px solid #ffffff",borderRadius:"6px",color:"#fff",margin:"0",marginBottom:"15px",width:"100%"},value:Y,InputLabelProps:{shrink:!0,style:{color:"#fff"}},InputProps:{classes:V,disableUnderline:!0,style:{background:"#323f4e"}},onChange:e=>{Q(e.target.value)}})}),Object(z.jsx)(r.a,{item:!0,children:Object(z.jsxs)(r.a,{container:!0,spacing:0,alignItems:"center",style:{border:"1px solid #ffffff",padding:"12px",borderRadius:"6px",fontSize:"14px",rowGap:"7.5px"},children:[Object(z.jsx)(r.a,{item:!0,xs:3,children:Object(z.jsx)(h.a,{style:{fontSize:"14px"},children:ge("editor.scheduler_english")})}),Object(z.jsx)(r.a,{item:!0,xs:9,children:Object(z.jsx)(d.a,{style:{width:"100%",color:"#fff"},className:"scheduler-select",value:$,onChange:e=>ee(e.target.value),children:["DDIM","DPMSolverMultistep","K_EULER_ANCESTRAL","K_EULER"].map((e=>Object(z.jsx)(u.a,{value:e,children:e},e)))})}),Object(z.jsx)(r.a,{item:!0,xs:3,children:Object(z.jsx)(h.a,{style:{fontSize:"14px"},children:ge("editor.steps_english")})}),Object(z.jsx)(r.a,{item:!0,xs:9,children:Object(z.jsxs)(r.a,{container:!0,spacing:2,alignItems:"center",children:[Object(z.jsx)(r.a,{item:!0,xs:3,children:Object(z.jsx)(o.a,{size:"small",variant:"outlined",value:te,style:{width:"100%"},type:"number",onChange:e=>ie(Number(e.target.value)),inputProps:{min:8,max:30,step:1,style:{padding:"5px 10px"}}})}),Object(z.jsx)(r.a,{item:!0,xs:5,children:Object(z.jsx)(g.a,{value:te,onChange:(e,t)=>
1ie(t),min:8,max:30,valueLabelDisplay:"auto",classes:{rail:V.sliderRail}})}),Object(z.jsx)(r.a,{item:!0,xs:4,style:{letterSpacing:"1.5px"},children:"[8 ~ 30]"})]})}),Object(z.jsx)(r.a,{item:!0,xs:3,children:Object(z.jsx)(h.a,{style:{fontSize:"14px"},children:ge("editor.hdr")})}),Object(z.jsx)(r.a,{item:!0,xs:9,children:Object(z.jsxs)(r.a,{container:!0,spacing:2,alignItems:"center",children:[Object(z.jsx)(r.a,{item:!0,xs:3,children:Object(z.jsx)(o.a,{size:"small",variant:"outlined",value:se,style:{width:"100%"},type:"number",onChange:e=>re(Number(e.target.value)),inputProps:{min:0,max:1,step:.01,style:{padding:"5px 10px"}}})}),Object(z.jsx)(r.a,{item:!0,xs:5,children:Object(z.jsx)(g.a,{min:0,max:1,step:.01,valueLabelDisplay:"auto",value:se,onChange:(e,t)=>re(t),classes:{rail:V.sliderRail}})}),Object(z.jsx)(r.a,{item:!0,xs:4,style:{letterSpacing:"1.5px"},children:"[0 ~ 1]"})]})}),Object(z.jsx)(r.a,{item:!0,xs:3,children:Object(z.jsx)(h.a,{style:{fontSize:"14px"},children:ge("editor.sharpness")})}),Object(z.jsx)(r.a,{item:!0,xs:9,children:Object(z.jsxs)(r.a,{container:!0,spacing:2,alignItems:"center",children:[Object(z.jsx)(r.a,{item:!0,xs:3,children:Object(z.jsx)(o.a,{size:"small",variant:"outlined",type:"number",style:{width:"100%"},value:oe,onChange:e=>le(Number(e.target.value)),inputProps:{min:-3,max:10,step:.01,style:{padding:"5px 10px"}}})}),Object(z.jsx)(r.a,{item:!0,xs:5,children:Object(z.jsx)(g.a,{min:-3,max:10,step:.01,valueLabelDisplay:"auto",value:oe,onChange:(e,t)=>
1le(t),classes:{rail:V.sliderRail}})}),Object(z.jsx)(r.a,{item:!0,xs:4,style:{letterSpacing:"1.5px"},children:"[-3 ~ 10]"})]})}),Object(z.jsx)(r.a,{item:!0,xs:3,children:Object(z.jsx)(h.a,{style:{fontSize:"14px"},children:ge("editor.details")})}),Object(z.jsx)(r.a,{item:!0,xs:9,children:Object(z.jsxs)(r.a,{container:!0,spacing:2,alignItems:"center",children:[Object(z.jsx)(r.a,{item:!0,xs:3,children:Object(z.jsx)(o.a,{size:"small",variant:"outlined",type:"number",value:ce,style:{width:"100%"},onChange:e=>he(Number(e.target.value)),inputProps:{min:-3,max:3,step:.01,style:{padding:"5px 10px"}}})}),Object(z.jsx)(r.a,{item:!0,xs:5,children:Object(z.jsx)(g.a,{min:-3,max:3,step:.01,valueLabelDisplay:"auto",value:ce,onChange:(e,t)=>he(t),classes:{rail:V.sliderRail}})}),Object(z.jsx)(r.a,{item:!0,xs:4,style:{letterSpacing:"1.5px"},children:"[-3 ~ 3]"})]})})]})})]}),Object(z.jsxs)(r.a,{container:!0,item:!0,style:{backgroundColor:"#4B5564",alignContent:"center",marginTop:0,marginLeft:15,paddingLeft:0,paddingRight:0,paddingBottom:0,borderRadius:6,marginBottom:0,overflow:"hidden",position:"relative"},onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),ue(!0)},onDragOver:e=>{e.preventDefault(),e.stopPropagation(),ue(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),ue(!1)},onDrop:e=>{ue(!1),(async e=>{var t;e.preventDefault(),e.stopPropagation();const i=null===e||void 0===e||null===(t=e.dataTransfer)||void 0===t?void 0:t.files[0];if(i){const e=await Object(j.v)(i);W(e),q(e),pe(void 0)}})(e)},children:[!K&&Object(z.jsxs)("div",{className:"empty-image ".concat(de?"dragover":""),children:[Object(z.jsx)(A.a,{style:{width:"32px",height:"32px"},onClick:()=>{Ee()}}),Object(z.jsx)("div",{style:{color:"rgba(255, 255, 255, 0.7)"},children:ge("editor.upload_or_drag_image_english")})]}),K&&!xe&&Object(z.jsx)("img",{src:K,style:{width:"100%",height:"100%",maxHeight:"550px",objectFit:"contain"}}),Object(z.jsx)("div",{ref:we,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%"},children:K&&xe&&Object(z.jsxs)(z.Fragment,{children:[Object(z.jsx)(_.a,{ref:me,imageUrlBefore:K,imageUrlAfter:xe,canvasWidth:Oe.width,canvasHeight:Oe.height}),Object(z.jsx)("div",{className:"before-label",children:ge("editor.before")}),Object(z.jsx)("div",{className:"after-label",children:ge("editor.after")}),Object(z.jsxs)("div",{className:"footer-buttons",children:[Object(z.jsx)("div",{className:"button",children:Object(z.jsx)(m.a,{title:ge("editor.zoom_in"),children:Object(z.jsx)(C.a,{className:"icon",onClick:()=>{var e;return null===(e=me.current)||void 0===e?void 0:e.zoomIn()},style:{color:"#45B017",width:"20px",height:"20px"}})})}),Object(z.jsx)("div",{className:"button",children:Object(z.jsx)(m.a,{title:ge("editor.zoom_out"),children:Object(z.jsx)(L.a,{className:"icon",onClick:()=>{var e;return null===(e=me.current)||void 0===e?void 0:e.zoomOut()},style:{color:"#45B017",width:"20px",height:"20px"}})})})]})]})})]})]}),Object(z.jsxs)("div",{className:"action-footer",children:[Object(z.jsx)("div",{className:"left",children:!N&&Object(z.jsxs)(b.a,{variant:"outlined",color:"default",disabled:ve,onClick:Ee,children:[Object(z.jsx)(S.a,{style:{width:e.spacing(2.5),height:e.spacing(2.5),marginRight:"16px"}}),ge("editor.upload_english")]})}),Object(z.jsxs)("div",{className:"right",style:{justifyContent:"flex-end"},children:[xe&&Object(z.jsxs)(z.Fragment,{children:[N&&Object(z.jsx)(m.a,{title:ge("auto_enhance.replace_tooltip"),children:Object(z.jsx)(b.a,{variant:"outlined",color:"primary",onClick:async()=>{if(!xe)return;const{file:e,activeObj:t}=Object(M.b)()||{};if(!e||!t)return;const i=await new Promise((e=>{const i=new Image;i.src=xe,i.crossOrigin="Anonymous",i.onload=async()=>{const n=document.createElement("canvas");n.width=t.width,n.height=t.height;n.getContext("2d").drawImage(i,0,0,t.width,t.height);const a=n.toDataURL("image/jpeg"),s=await Object(j.G)(a);e(s)}}));x.a.requesting.set((e=>e+1));const n=setInterval((()=>{x.a.progress.set((e=>{return t=e,i=90,Math.floor(Math.random()*(i-t+1))+t;var t,i}))}),1e3);Object(M.d)(t,i),await new Promise((e=>setTimeout((()=>e()),3e3))),clearInterval(n),x.a.requesting.set((e=>e>0?e-1:0)),x.a.progress.set(0),v.a.showRemoveObject.set(!1)},disabled:be||!xe,style:{marginRight:12},children:ge("editor.replace")})}),Object(z.jsx)(b.a,{style:{marginRight:"15px"},variant:"outlined",onClick:()=>(async e=>{try{const t=await Object(j.b)(e);E.a.saveAs(t,"image.png"),"dialog"===w&&await Object(D.a)(t)}catch(t){i(ge("components.notify.save_failed"),{variant:"error"})}})(xe),children:ge("editor.download")}),"page"===w&&Object(z.jsx)(b.a,{style:{marginRight:"12px"},variant:"outlined",onClick:async()=>{Object(D.d)(xe,"HI Resolution")},children:ge("editor.edit-image")})]}),Object(z.jsxs)(b.a,{variant:"outlined",color:"primary",onClick:Ie,disabled:be||!U,children:[ge("components.button.generate_english"),Object(z.jsx)(B.a,{style:{width:e.spacing(2.5),height:e.spacing(2.5),margin:"0 8px"}}),p.d.AUTO_ENHANCE]})]})]})]})}},619:function(e,t,i){},892:function(e,t,i){"use strict";i.r(t);var n=i(36),a=i(452),s=i(618),r=i(3);t.default=()=>{const e=Object(n.g)();return Object(r.jsx)(a.c,{mode:"page",onClose:()=>{localStorage.removeItem("open-high-resolution"),e.push("/design")},children:Object(r.jsx)(s.a,{})})}}}]);
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.