PageSourceSearch

https://www.pictech.ai/picts/js/5345-d33b96a36c87dc196f21.js

js pictech.ai collected 2026-10-05 12:26:47 UTC 32,728 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkfabritor_web=self.webpackChunkfabritor_web||[]).push([[5345],{33106:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(87462),i=n(67294),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-image",theme:"outlined"},a=n(70671),l=i.forwardRef(function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))})},28281:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(87462),i=n(67294),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z"}}]},name:"gift",theme:"outlined"},a=n(70671),l=i.forwardRef(function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))})},16156:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(87462),i=n(67294),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}
1]},name:"left",theme:"outlined"},a=n(70671),l=i.forwardRef(function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))})},3857:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(87462),i=n(67294),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M521.7 82c-152.5-.4-286.7 78.5-363.4 197.7-3.4 5.3.4 12.3 6.7 12.3h70.3c4.8 0 9.3-2.1 12.3-5.8 7-8.5 14.5-16.7 22.4-24.5 32.6-32.5 70.5-58.1 112.7-75.9 43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 32.6 32.5 58.1 70.4 76 112.5C865.7 417.8 875 464.1 875 512c0 47.9-9.4 94.2-27.8 137.8-17.8 42.1-43.4 80-76 112.5s-70.5 58.1-112.7 75.9A352.8 352.8 0 01520.6 866c-47.9 0-94.3-9.4-137.9-27.8A353.84 353.84 0 01270 762.3c-7.9-7.9-15.3-16.1-22.4-24.5-3-3.7-7.6-5.8-12.3-5.8H165c-6.3 0-10.2 7-6.7 12.3C234.9 863.2 368.5 942 520.6 942c236.2 0 428-190.1 430.4-425.6C953.4 277.1 761.3 82.6 521.7 82zM395.02 624v-76h-314c-4.4 0-8-3.6-8-8v-56c0-4.4 3.6-8 8-8h314v-76c0-6.7 7.8-10.5 13-6.3l141.9 112a8 8 0 010 12.6l-141.9 112c-5.2 4.1-13 .4-13-6.3z"}}]},name:"login",theme:"outlined"},a=n(70671),l=i.forwardRef(function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))})},67225:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(87462),i=n(67294),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43
1c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},a=n(70671),l=i.forwardRef(function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))})},3457:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(87462),i=n(67294),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},a=n(70671),l=i.forwardRef(function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))})},48697:function(e,t,n){n.d(t,{Z:function(){return h}});var r=n(30892),i=n(67294),o=n(65860),a=n.n(o),l=n(22677),c=n(34018),s=n(80472),u=n(1156),d=n(34402),m=function(e){var t=e.componentCls,n=e.sizePaddingEdgeHorizontal,r=e.colorSplit,i=e.lineWidth,o=e.textPaddingInline,a=e.orientationMargin,l=e.verticalMarginInline;return{[t]:Object.assign(Object.assign({},(0,s.Wf)(e)),{borderBlockStart:"".concat((0,c.bf)(i)," solid ").concat(r),"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:l,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:"".concat((0,c.bf)(i)," solid ").concat(r)},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:"".concat((0,c.bf)(e.dividerHorizontalGutterMargin)," 0")},["&-horizontal".concat(t,"-with-text")]:{display:"flex",alignItems:"center",margin:"".concat((0,c.bf)(e.dividerHorizontalWithTextGutterMargin)," 0"),color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:"0 ".concat(r),"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:"".concat((0,c.bf)(i)," solid transparent"),borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},["&-horizontal".concat(t,"-with-text-left")]:{"&::before":{width:"calc(".concat(a," * 100%)")},"&::after":{width:"calc(100% - ".concat(a," * 100%)")}},["&-horizontal".concat(t,"-with-text-right")]:{"&::before":{width:"calc(100% - ".concat(a," * 100%)")},"&::after":{width:"calc(".concat(a," * 100%)")}},["".concat(t,"-inner-text")]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:"".concat((0,c.bf)(i)," 0 0")},["&-horizontal".concat(t,"-with-text").concat(t,"-dashed")]:{"&::before, &::after":{borderStyle:"dashed none none"}},["&-vertical".concat(t,"-dashed")]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},["&-plain".concat(t,"-with-text")]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},["&-horizontal".concat(t,"-with-text-left").concat(t,"-no-default-orientation-margin-left")]:{"&::before":{width:0},"&::after":{width:"100%"},["".concat(t,"-inner-text")]:{paddingInlineStart:n}},["&-horizontal".concat(t,"-with-text-right").concat(t,"-no-default-orientation-margin-right")]:{"&::before":{width:"100%"},"&::after":{width:0},["".concat(t,"-inner-text")]:{paddingInlineEnd:n}}})}},g=(0,u.I$)("Divider",function(e){return[m((0,d.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0}))]},function(e){return{textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}},{unitless:{orientationMargin:!0}}),f=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)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},h=function(e){var t=i.useContext(l.E_),n=t.getPrefixCls,o=t.direction,c=t.divider,s=e.prefixCls,u=e.type,d=void 0===u?"horizontal":u,m=e.orientation,h=void 0===m?"center":m,p=e.orientationMargin,b=e.className,v=e.rootClassName,w=e.children,y=e.dashed,Z=e.plain,F=e.style,E=f(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),L=n("divider",s),O=(0,r._)(g(L),3),S=O[0],k=O[1],x=O[2],I=h.length>
10?"-".concat(h):h,z=!!w,_="left"===h&&null!=p,M="right"===h&&null!=p,T=a()(L,null==c?void 0:c.className,k,x,"".concat(L,"-").concat(d),{["".concat(L,"-with-text")]:z,["".concat(L,"-with-text").concat(I)]:z,["".concat(L,"-dashed")]:!!y,["".concat(L,"-plain")]:!!Z,["".concat(L,"-rtl")]:"rtl"===o,["".concat(L,"-no-default-orientation-margin-left")]:_,["".concat(L,"-no-default-orientation-margin-right")]:M},b,v),N=i.useMemo(function(){return"number"==typeof p?p:/^\d+$/.test(p)?Number(p):p},[p]),C=Object.assign(Object.assign({},_&&{marginLeft:N}),M&&{marginRight:N});return S(i.createElement("div",Object.assign({className:T,style:Object.assign(Object.assign({},null==c?void 0:c.style),F)},E,{role:"separator"}),w&&"vertical"!==d&&i.createElement("span",{className:"".concat(L,"-inner-text"),style:C},w)))}},51869:function(e,t,n){n.d(t,{Fm:function(){return m}});var r=n(34018),i=n(55827),o=new r.E4("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),a=new r.E4("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),l=new r.E4("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),c=new r.E4("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),s=new r.E4("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),u=new r.E4("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),d={"move-up":{inKeyframes:new r.E4("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),outKeyframes:new r.E4("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}})},"move-down":{inKeyframes:o,outKeyframes:a},"move-left":{inKeyframes:l,outKeyframes:c},"move-right":{inKeyframes:s,outKeyframes:u}},m=function(e,t){var n=e.antCls,r="".concat(n,"-").concat(t),o=d[t],a=o.inKeyframes,l=o.outKeyframes;return[(0,i.R)(r,a,l,e.motionDurationMid),{["\n        ".concat(r,"-enter,\n        ").concat(r,"-appear\n      ")]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},["".concat(r,"-leave")]:{animationTimingFunction:e.motionEaseInOutCirc}}]}},60691:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(73935);function i(e,t,n,i){var o=r.unstable_batchedUpdates?function(e){r.unstable_batchedUpdates(n,e)}:n;return null!=e&&e.addEventListener&&e.addEventListener(t,o,i),{remove:function(){null!=e&&e.removeEventListener&&e.removeEventListener(t,o,i)}}}},251:function(e,t,n){function r(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function i(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}n.d(t,{g1:function(){return r},os:function(){return i}})},7233:function(e,t,n){n.r(t),n.d(t,{default:function(){return W}});var r,i,o=n(3349),a=n(44820),l=n(74848),c=n(30892),s=n(97582),u=n(80178),d=n(67294),m=n(7806),g=n(23224),f=n(79379),h=n(69835),p=n(31428),b=n(90829),v=n(84268),w=n(22318),y=n(18129),Z=n(33106),F=n(67225),E=n(3857),L=n(26509),O=n(3457),S=n(84945),k=n(85006),x=n(82457),I=n(76433),z=n(96142),_=n(19413),M=n(81423),T=n(18166),N="pictechTranslatePrefs_v1",C=function(e){return!e||"object"!=typeof e||Array.isArray(e)?{}:Object.entries(e).reduce(function(e,t){var n=(0,c._)(t,2),r=n[0],i=n[1];return"string"==typeof i&&(e[r]=i),e},{})},P=function(){try{return JSON.parse(localStorage.getItem(N)||"{}")}catch(e){return{}}},B=function(e){try{localStorage.setItem(N,JSON.stringify((0,a._)({},P(),e)))}catch(e){}},R=function(e){var t=(0,z.$X)();return(0,l._)((0,a._)({},t),{isLogin:e||t.isLogin})},U=function(e,t){return(null==e?void 0:e.message)||t},H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2048;return new Promise(function(r,i){var o=URL.createObjectURL(e),a=new window.Image;a.onload=function(){URL.revokeObjectURL(o);var l=a.width,c=a.height,s=l/c,u=l>=c?n:Math.round(n*s),d=l>=c?Math.round(n/s):n,m=document.createElement("canvas");m.width=u,m.height=d;var g=m.getContext("2d");if(!g){i(Error(t("mobileFlow.errors.browserUnsupported","This browser does not support image processing")));return}
1"image/jpeg"===e.type&&(g.fillStyle="#fff",g.fillRect(0,0,u,d)),g.imageSmoothingEnabled=!0,g.imageSmoothingQuality="high",g.drawImage(a,0,0,u,d),m.toBlob(function(n){if(!n){i(Error(t("mobileFlow.errors.resizeFailed","Image resize failed")));return}r(new File([n],e.name,{type:e.type,lastModified:Date.now()}))},e.type,.92)},a.onerror=function(){URL.revokeObjectURL(o),i(Error(t("mobileFlow.errors.imageLoadFailed","Image loading failed")))},a.src=o})},j=(r=(0,o._)(function(e,t){var n;return(0,s.__generator)(this,function(r){switch(r.label){case 0:if(!["image/jpeg","image/png","image/webp"].includes(e.type))throw Error(t("mobileFlow.errors.unsupportedFormat","Please upload a JPG, PNG, or WEBP image"));if(e.size/1024/1024>=30)throw Error(t("mobileFlow.errors.fileTooLarge","Image size cannot exceed {{max}}MB",{max:30}));return[4,new Promise(function(n,r){var i=URL.createObjectURL(e),o=new window.Image;o.onload=function(){URL.revokeObjectURL(i),n({width:o.naturalWidth||o.width,height:o.naturalHeight||o.height})},o.onerror=function(){URL.revokeObjectURL(i),r(Error(t("mobileFlow.errors.readFileFailed","Failed to read image file")))},o.src=i})];case 1:if((n=r.sent()).width<15||n.height<15)throw Error(t("mobileFlow.errors.resolutionTooLow","Image resolution is too low"));if(Math.max(n.width,n.height)/Math.min(n.width,n.height)>6)throw Error(t("mobileFlow.errors.extremeRatio","Image aspect ratio is too extreme"));return[2,n]}})}),function(e,t){return r.apply(this,arguments)}),X=(i=(0,o._)(function(e){var t;return(0,s.__generator)(this,function(n){switch(n.label){case 0:if("image/png"===e.type)return[2,(0,I.p_)(e)];return t={},[4,(0,I.L0)(e)];case 1:return[2,(t.url=n.sent(),t.name=e.name,t)]}})}),function(e){return i.apply(this,arguments)});function W(){var e,t,n,r=(0,d.useRef)(null),i=(0,d.useRef)(null),l=(0,d.useRef)(null),N=(0,S.s0)(),W=(0,k.$G)(["mobileTranslateTool","imageEditorTool"]),q=W.t,V=W.i18n,Q=(0,d.useCallback)(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return q(e,(0,a._)({ns:"mobileTranslateTool",defaultValue:t},n))}
1,[q]),G=(0,T.Z)(),D=G.imageUrl,K=G.setImageUrl,A=G.setTaskId,$=G.setIsShowUploader,J=G.setIsShowImageForm,Y=G.setIsShowProgress,ee=G.setIsMobileIndexModalVisible,et=G.userIsLogin,en=G.setUserIsLogin,er=(0,d.useMemo)(function(){return C(q("imageForm.languages",{ns:"imageEditorTool",returnObjects:!0}))},[q]),ei=(0,d.useMemo)(function(){return C(q("imageForm.sourceLanguages",{ns:"imageEditorTool",returnObjects:!0}))},[q]),eo=(0,c._)((0,d.useState)(function(){return R(et)}),2),ea=eo[0],el=eo[1],ec=ea.isLogin,es=ea.isPlanUser,eu=ec&&es,ed=(0,M.cF)({isLogin:ec,isPlanUser:eu}),em=(0,d.useMemo)(P,[]),eg=(0,c._)((0,d.useState)("upload"),2),ef=eg[0],eh=eg[1],ep=(0,c._)((0,d.useState)(em.sourceLanguage||"English"),2),eb=ep[0],ev=ep[1],ew=(0,c._)((0,d.useState)(em.destLanguage||void 0),2),ey=ew[0],eZ=ew[1],eF=(0,c._)((0,d.useState)(em.translationEngine||"machine"),2),eE=eF[0],eL=eF[1],eO=(0,c._)((0,d.useState)(!1),2),eS=eO[0],ek=eO[1],ex=(0,c._)((0,d.useState)(!1),2),eI=ex[0],ez=ex[1],e_=(0,c._)((0,d.useState)(!1),2),eM=e_[0],eT=e_[1],eN=(0,c._)((0,d.useState)(0),2),eC=eN[0],eP=eN[1],eB=(0,c._)((0,d.useState)(function(){return Q("mobileFlow.progress.starting","Starting image translation")}),2),eR=eB[0],eU=eB[1],eH=(0,c._)((0,d.useState)(!1),2),ej=eH[0],eX=eH[1];(0,d.useEffect)(function(){eU(Q("mobileFlow.progress.starting","Starting image translation"))},[V.language,Q]),(0,d.useEffect)(function(){var e,t=!1;return(e=(0,o._)(function(){var e,n,r;return(0,s.__generator)(this,function(i){switch(i.label){case 0:if(el(e=R(et)),!e.isLogin||e.isPlanKnown)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,x.FD)()];case 2:return 200===(r=i.sent()).code&&(null===(n=r.data)||void 0===n?void 0:n.userInfo)&&((0,z.oR)(r.data.userInfo),t||el(R(et))),[3,4];case 3:return i.sent(),t||el(R(et)),[3,4];case 4:return[2]}})}),function(){return e.apply(this,arguments)})(),function(){t=!0}},[et]),(0,d.useEffect)(function(){var e=Object.keys(ei),t=Object.keys(er);if(e.length&&t.length){var n=P(),r=q("imageForm.defaultSourceLangLabel",{ns:"imageEditorTool"}),i=ei[r]?r:e[0];ev(n.sourceLanguage&&ei[n.sourceLanguage]?n.sourceLanguage:i),eZ(n.destLanguage&&er[n.destLanguage]?n.destLanguage:void 0),n.translationEngine&&eL(n.translationEngine),ek(!1)}},[er,ei,q]);var eW=(0,d.useCallback)(function(){i.current&&clearInterval(i.current),l.current&&clearTimeout(l.current),i.current=null,l.current=null},[]),eq=(0,d.useCallback)(function(){eW(),ee(!1),$(!0),J(!1),Y(!1);var e=V.resolvedLanguage||V.language||"en-US";N("/picts/imgeditor?lang=".concat(encodeURIComponent(e)))},[eW,V.language,V.resolvedLanguage,N,ee,J,Y,$]);(0,d.useEffect)(function(){return(0,x.nC)({position:"10002"}).catch(function(){return null}),eW},[eW]),(0,d.useEffect)(function(){(null==D?void 0:D.url)&&eh("settings")},[null==D?void 0:D.url]);var eV=(0,d.useMemo)(function(){return Object.entries(ei).map(function(e){var t=(0,c._)(e,2);return{value:t[0],label:t[1]}})},[ei]),eQ=(0,d.useMemo)(function(){return Object.entries(er).map(function(e){var t=(0,c._)(e,2);return{value:t[0],label:t[1]}})},[er]),eG=(0,d.useMemo)(function(){return[{value:"machine",label:q("imageForm.engine.machine.title",{ns:"imageEditorTool"})},{value:"didao",label:q("imageForm.engine.didao.title",{ns:"imageEditorTool"})},{value:"deepseek",label:q("imageForm.engine.deepseek.title",{ns:"imageEditorTool"})},{value:"qwen",label:q("imageForm.engine.qwen.title",{ns:"imageEditorTool"})}]},[q]),eD=function(e,t){return"".concat((null==t?void 0:t.label)||""," ").concat((null==t?void 0:t.value)||"").toLowerCase().includes(e.toLowerCase())},eK=(e=(0,o._)(function(){var e,t;return(0,s.__generator)(this,function(n){switch(n.label){case 0:eX(!1),en(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,x.FD)()];case 2:return 200===(t=n.sent()).code&&(null===(e=t.data)||void 0===e?void 0:e.userInfo)&&(0,z.oR)(t.data.userInfo),[3,4];case 3:return n.sent(),[3,4];case 4:return el(R(!0)),ed.refreshQuota().catch(function(){}),[2]}})}),function(){return e.apply(this,arguments)}),eA=(t=(0,o._)(function(e){var t,n,i;return(0,s.__generator)(this,function(o){switch(o.label){case 0:ez(!0),o.label=1;case 1:return o.trys.push([1,6,7,8]),[4,j(e,Q)];case 2:if(t=o.sent(),n=e,!(Math.max(t.width,t.height)>2048))return[3,4];return m.ZP.loading({content:Q("mobileFlow.messages.optimizingImage","Optimizing image size"),key:"mobile_resize",duration:0}),[4,H(e,Q)];case 3:n=o.sent(),m.ZP.success({content:Q("mobileFlow.messages.imageOptimized","Image optimized"),key:"mobile_resize"}),o.label=4;case 4:return[4,X(n)];case 5:return K(o.sent()),$(!1),J(!0),Y(!1),eh("settings"),[3,8];case 6:return i=o.sent(),m.ZP.error(U(i,Q("mobileFlow.errors.readFailed","Image reading failed"))),[3,8];case 7:return ez(!1),r.current&&(r.current.value=""),[7];case 8:return[2]}})}),function(e){return t.apply(this,arguments)}),e$=function(){K({}),$(!0),J(!1),Y(!1),eh("upload")},eJ=function(e){eP(8),eU(Q("mobileFlow.progress.understanding","Understanding image content")),eh("progress"),J(!1),Y(!0);var t=Date.now();i.current=setInterval((0,o._)(function(){var n,r,i;return(0,s.__generator)(this,function(o){switch(o.label){case 0:eP(function(e){return Math.max(e,Math.min(99,Math.max(1,Math.floor(92*Math.min((Date.now()-t)/6e5,1)+6))))}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,(0,x.nb)({orderId:e})];case 2:if((i=Number((null===(r=o.sent())||void 0===r?void 0:null===(n=r.data)||void 0===n?void 0:n.progress)||0))>=100)return eP(100),eU(Q("mobileFlow.progress.completeOpening","Translation complete. Opening editor")),window.setTimeout(eq,300),[2];return i>0&&eP(function(e){return Math.max(e,Math.min(i,99))}),i>=60?eU(Q("mobileFlow.progress.optimizingLayout","Optimizing layout")):i>=25&&eU(Q("mobileFlow.progress.generating","Generating translation result")),[3,4];case 3:return o.sent(),eU(Q("mobileFlow.progress.backgroundProcessing","Still processing in the background. Keep this page open")),[3,4];case 4:return[2]}})}),2e3),l.current=setTimeout(function(){eU(Q("mobileFlow.progress.backgroundOpening","Continuing in the background. Opening editor")),eq()},6e5)},eY=(n=(0,o._)(function(){var e,t,n,r,i,o,a,l;return(0,s.__generator)(this,function(c){switch(c.label){case 0:if(!(null===(e=D)||void 0===e?void 0:e.url)||eM)return[2];if(!ey)return g.ZP.open({message:q("imageForm.notification.title",{ns:"imageEditorTool"}),description:q("imageForm.validation.targetRequired",{ns:"imageEditorTool"})}),[2];eT(!0),c.label=1;case 1:return c.trys.push([1,5,6,7]),[4,ed.refreshQuota()];case 2:if(n=c.sent(),!eu&&null!==n.dailyRemainingQuota&&n.totalFreeQuota<=0)return g.ZP.warning({message:q("imageForm.quotaNotice.emptyTitle",{ns:"imageEditorTool"}),description:q("imageForm.quotaNotice.emptyDescription",{ns:"imageEditorTool"})}),[2];return[4,(0,I.UD)(D.url)];case 3:return r=c.sent(),[4,(0,x.dk)({imageBase64:r,imageSourceName:D.name,sourceLanguage:eb,destLanguages:ey,engine:eE,mainProductNotranslateType:eS?1:0,layoutVersion:"v3"})];case 4:if((null===(t=i=c.sent())||void 0===t?void 0:t.code)!==200)return g.ZP.open({message:q("imageForm.notification.title",{ns:"imageEditorTool"}),description:(null===(o=i)||void 0===o?void 0:o.errorMessage)||(null===(a=i)||void 0===a?void 0:a.message)||q("imageForm.notification.description",{ns:"imageEditorTool"})}),[2];return B({sourceLanguage:eb,destLanguage:ey,translationEngine:eE,layoutVersion:"v3"}),A(i.data.orderId),ed.refreshQuota().catch(function(){}),eJ(i.data.orderId),[3,7];case 5:return l=c.sent(),g.ZP.open({message:q("imageForm.notification.title",{ns:"imageEditorTool"}),description:U(l,q("imageForm.notification.description",{ns:"imageEditorTool"}))}),[3,7];case 6:return eT(!1),[7];case 7:return[2]}})}),function(){return n.apply(this,arguments)}),e0=[{min:8,label:Q("mobileFlow.progressSteps.upload","Upload image")},{min:28,label:Q("mobileFlow.progressSteps.ocr","Recognize text")},{min:58,label:Q("mobileFlow.progressSteps.translate","Generate translation")},{min:86,label:Q("mobileFlow.progressSteps.layout","Optimize layout")}];return(0,u.BX)("div",{className:"mobile-image-translate",children:[(0,u.tZ)(w.Z,{spinning:eI||eM&&"progress"!==ef,fullscreen:!0}),(0,u.BX)("div",{className:"mobile-translate-topbar",children:[(0,u.BX)("div",{children:[(0,u.tZ)("strong",{children:Q("mobileFlow.topbar.title","Image translation")}),(0,u.tZ)("span",{children:Q("mobileFlow.topbar.singleImage","Single-image translation")})]}),ec?(0,u.tZ)(h.ZP,{size:"small",onClick:function(){return N("/picts/usercenter")},children:q("imageForm.quotaNotice.loggedInTitle",{ns:"imageEditorTool",count:"-"})}):(0,u.BX)("button",{type:"button",className:"mobile-translate-login-btn",onClick:function(){return eX(!0)},children:[(0,u.tZ)(E.Z,{}),Q("mobileFlow.auth.login","Log in")]})]}),(0,u.BX)("div",{className:"mobile-translate-content",children:["upload"===ef&&(0,u.BX)("div",{className:"mobile-translate-stage mobile-translate-upload-stage",children:[(0,u.BX)("button",{type:"button",className:"mobile-translate-upload-card",onClick:function(){var e;return null===(e=r.current)||void 0===e?void 0:e.click()},children:[(0,u.tZ)(Z.Z,{}),(0,u.tZ)("strong",{children:Q("mobileFlow.upload.title","Upload image")}),(0,u.tZ)("span",{children:Q("mobileFlow.upload.hint","JPG / PNG / WEBP, one image up to 30MB")})]}),(0,u.tZ)("input",{ref:r,type:"file",accept:"image/jpeg,image/png,image/webp",hidden:!0,onChange:function(e){var t,n=null===(t=e.target.files)||void 0===t?void 0:t[0];n&&eA(n)}})]}),"settings"===ef&&(0,u.BX)("div",{className:"mobile-translate-stage",children:[(0,u.BX)("div",{className:"mobile-translate-preview",children:[(0,u.tZ)(f.Z,{src:D.url,preview:!1}),(0,u.BX)("div",{children:[(0,u.tZ)("strong",{children:D.name||Q("mobileFlow.preview.pendingImage","Image to translate")}),(0,u.tZ)(h.ZP,{size:"small",icon:(0,u.tZ)(F.Z,{}),onClick:e$,children:Q("mobileFlow.actions.reselect","Reselect")})]})]}),(0,u.BX)("div",{className:"mobile-translate-form",children:[(0,u.BX)("div",{className:"mobile-translate-section",children:[(0,u.tZ)("div",{className:"mobile-translate-section-title",children:Q("mobileFlow.sections.language","Language")}),(0,u.BX)("div",{className:"mobile-translate-grid",children:[(0,u.tZ)(p.Z,{value:eb,options:eV,showSearch:!0,optionFilterProp:"label",filterOption:eD,onChange:ev}),(0,u.tZ)(p.Z,{placeholder:q("imageForm.targetLangPlaceholder",{ns:"imageEditorTool"}),value:ey,options:eQ,showSearch:!0,allowClear:!0,optionFilterProp:"label",filterOption:eD,onChange:eZ})]})]}),(0,u.BX)("div",{className:"mobile-translate-section",children:[(0,u.tZ)("div",{className:"mobile-translate-section-title",children:q("imageForm.engine.title",{ns:"imageEditorTool"})}),(0,u.tZ)(p.Z,{value:eE,options:eG,onChange:eL})]}),(0,u.BX)("div",{className:"mobile-translate-section",children:[(0,u.tZ)("div",{className:"mobile-translate-section-title",children:q("imageForm.layout.title",{ns:"imageEditorTool"})}),(0,u.tZ)(h.ZP,{block:!0,disabled:!0,children:q("imageForm.layout.voknov3",{ns:"imageEditorTool"})})]}),(0,u.tZ)("div",{className:"mobile-translate-section mobile-translate-checks",children:(0,u.tZ)(b.Z,{checked:eS,onChange:function(e){return ek(e.target.checked)},children:q("imageForm.advanced.productProtection.checkbox",{ns:"imageEditorTool"})})}),(0,u.tZ)(M.ZP,{isLogin:ec,isPlanUser:eu,quotaState:ed,onLogin:function(){return eX(!0)},onUpgradePlan:function(){return N("/picts/pricing")}})]})]}),"progress"===ef&&(0,u.BX)("div",{className:"mobile-translate-stage mobile-translate-progress-stage",children:[(0,u.BX)("div",{className:"mobile-translate-progress-card",children:[(0,u.tZ)(v.Z,{type:"circle",percent:eC,size:124,strokeWidth:9,strokeColor:{"0%":"#1677ff","100%":"#52c41a"},trailColor:"#e9eef5"}),(0,u.tZ)("strong",{children:eR}),(0,u.tZ)("span",{children:Q("mobileFlow.progress.subtitle","The mobile editor opens automatically when the task finishes")})]}),(0,u.tZ)("div",{className:"mobile-translate-progress-steps",children:e0.map(function(e){return(0,u.BX)("div",{className:eC>=e.min?"active":"",children:[(0,u.tZ)("i",{}),(0,u.tZ)("span",{children:e.label})]},e.label)})})]})]}),"settings"===ef&&(0,u.BX)("div",{className:"mobile-translate-footer",children:[(0,u.tZ)(h.ZP,{block:!0,onClick:e$,children:Q("mobileFlow.actions.cancel","Cancel")}),(0,u.tZ)(h.ZP,{block:!0,type:"primary",icon:(0,u.tZ)(L.Z,{}),loading:eM,disabled:!ey,onClick:eY,children:q("imageForm.translateButton",{ns:"imageEditorTool"})})]}),"upload"===ef&&(0,u.tZ)("div",{className:"mobile-translate-footer",children:(0,u.tZ)(h.ZP,{block:!0,type:"primary",icon:(0,u.tZ)(O.Z,{}),onClick:function(){var e;return null===(e=r.current)||void 0===e?void 0:e.click()},children:Q("mobileFlow.actions.chooseImage","Choose image")})}),(0,u.tZ)(y.Z,{title:q("modals.login.title",{ns:"imageEditorTool"}),open:ej,onCancel:function(){return eX(!1)},footer:null,destroyOnClose:!0,children:(0,u.tZ)(_.Z,{onLoginSuccess:eK})})]})}},19413:function(e,t,n){var r=n(80178);n(67294);var i=n(78047);t.Z=function(e){var t=e.onLoginSuccess;return(0,r.tZ)(i.Z,{variant:"modal",onLoginSuccess:t})}},81423:function(e,t,n){n.d(t,{cF:function(){return w}});var r,i=n(3349),o=n(44820),a=n(74848),l=n(30892),c=n(97582),s=n(80178),u=n(67294),d=n(69835),m=n(25787),g=n(28281),f=n(85006),h=n(82457),p={dailyRemainingQuota:null,giftFreeQuota:0,totalFreeQuota:0},b=function(e,t){var n;return null!==(r=null==e?void 0:null===(n=e.data)||void 0===n?void 0:n[t])&&void 0!==r?r:null==e?void 0:e[t]},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Number(e);return Number.isFinite(n)?Math.max(0,n):t},w=function(e){var t=e.enabled,n=void 0===t||t,r=e.isLogin,s=e.isPlanUser,d=void 0!==s&&s,m=(0,l._)((0,u.useState)(p),2),g=m[0],f=m[1],w=(0,l._)((0,u.useState)(!1),2),y=w[0],Z=w[1],F=(0,l._)((0,u.useState)(!1),2),E=F[
10],L=F[1],O=(0,u.useCallback)((0,i._)(function(){var e,t,i;return(0,c.__generator)(this,function(o){switch(o.label){case 0:if(!n)return f(p),Z(!1),L(!0),[2,p];Z(!0),o.label=1;case 1:if(o.trys.push([1,,3,4]),!r||d)return f(p),L(!0),[2,p];return[4,(0,h.b4)().catch(function(){return null})];case 2:return f(i={dailyRemainingQuota:t=null==(e=b(o.sent(),"oneDayRentQuota"))?null:v(e),giftFreeQuota:0,totalFreeQuota:null!=t?t:0}),L(!0),[2,i];case 3:return Z(!1),[7];case 4:return[2]}})}),[n,r,d]);return(0,u.useEffect)(function(){O()},[O]),(0,a._)((0,o._)({},g),{loading:y,loaded:E,refreshQuota:O})};t.ZP=function(e){var t=e.enabled,n=void 0===t||t,r=e.isLogin,i=e.isPlanUser,l=void 0!==i&&i,c=e.onLogin,u=e.onUpgradePlan,h=e.quotaState,p=e.style,b=(0,f.$G)("imageEditorTool").t,v=w({enabled:n&&!h,isLogin:r,isPlanUser:l}),y=h||v;if(!n)return null;var Z=y.dailyRemainingQuota,F=null!==Z,E=l?y.giftFreeQuota:Z,L=y.loaded&&(l?y.giftFreeQuota<=0:F&&y.totalFreeQuota<=0),O=y.loaded&&!l&&F&&(null!=Z?Z:0)>0&&(null!=Z?Z:0)<=2,S=(0,o._)({display:"flex",alignItems:"center",gap:8,minHeight:28,padding:"4px 8px",borderRadius:8,border:"1px solid #e5e7eb",background:"#f8fafc",color:"#475569",fontSize:13,lineHeight:1.5},p);if(y.loading&&!y.loaded)return(0,s.BX)("div",{style:S,children:[(0,s.tZ)(m.Z,{style:{color:"#64748b",flex:"0 0 auto"}}),(0,s.tZ)("span",{children:b("imageForm.quotaNotice.syncing")})]});if(!r)return(0,s.BX)("div",{style:S,children:[(0,s.tZ)(g.Z,{style:{color:"#64748b",flex:"0 0 auto"}}),(0,s.BX)("span",{style:{display:"inline-flex",gap:6,alignItems:"center",flexWrap:"wrap",minWidth:0},children:[(0,s.tZ)("span",{style:{color:"#334155",fontWeight:700},children:b("imageForm.quotaNotice.guestTitle",{limit:1})}),(0,s.tZ)("span",{style:{color:"#94a3b8"},children:"/"}),(0,s.tZ)("span",{style:{color:"#64748b"},children:b("imageForm.quotaNotice.guestHint")}),c&&(0,s.tZ)(d.ZP,{type:"link",size:"small",onClick:c,style:{height:20,padding:0,fontSize:12},children:b("imageForm.quotaNotice.loginAction")})]})]});if(l)return(0,s.BX)("div",{style:S,children:[(0,s.tZ)(g.Z,{style:{color:"#64748b",flex:"0 0 auto"}}),(0,s.tZ)("span",{style:{display:"inline-flex",gap:6,alignItems:"center",flexWrap:"wrap",minWidth:0},children:(0,s.tZ)("span",{style:{color:"#334155",fontWeight:700},children:b("imageForm.quotaNotice.planCostTitle",{count:1})})})]});var k=L?b("imageForm.quotaNotice.emptyTitle"):b("imageForm.quotaNotice.loggedInTitle",{count:null!=E?E:"-"}),x=F?b(r?"imageForm.quotaNotice.dailyHintLoggedIn":"imageForm.quotaNotice.dailyHintGuest",{limit:5}):b("imageForm.quotaNotice.unknownHint"),I=(0,a._)((0,o._)({},S),{borderColor:L||O?"#fed7aa":"#e5e7eb",background:L||O?"#fff7ed":"#f8fafc"});return(0,s.BX)("div",{style:I,children:[(0,s.tZ)(g.Z,{style:{color:L||O?"#ea580c":"#64748b",flex:"0 0 auto"}}),(0,s.BX)("span",{style:{display:"inline-flex",gap:6,alignItems:"center",flexWrap:"wrap",minWidth:0},children:[(0,s.tZ)("span",{style:{color:L?"#9a3412":"#334155",fontWeight:700},children:k}),(0,s.tZ)("span",{style:{color:"#94a3b8"},children:"/"}),(0,s.tZ)("span",{style:{color:"#64748b"},children:x}),L&&u&&(0,s.tZ)(d.ZP,{type:"link",size:"small",onClick:u,style:{height:20,padding:0,fontSize:12},children:b("imageForm.quotaNotice.upgradePlan")})]})]})}}}]);

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.