PageSourceSearch

https://photocat.com/_next/static/chunks/2869.a7ccb387d5ef88a3.js

js photocat.com collected 2026-10-02 05:00:51 UTC 13,378 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e0d9ef55-d475-4109-be9b-efde047b25d6",e._sentryDebugIdIdentifier="sentry-dbid-e0d9ef55-d475-4109-be9b-efde047b25d6")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2869],{33412:function(e,t,i){i.d(t,{a:function(){return f}});var l=i(52676),n=i(75271),a=i(68420),r=i(23545),o=i(52890),s=i(76245);let c=e=>{let{className:t,style:i,children:n}=e;return(0,l.jsx)("div",{className:(0,o.cn)("absolute z-[2] bg-[var(--c-bg-diff-tag)] px-4 py-[6px] text-[15px] font-light leading-[1.1] text-[var(--c-text-diff-tag)]",t),style:i,children:n})},d=e=>/^(blob:|data:|https?:)/.test(e),u=e=>/\.[a-zA-Z0-9]+($|\?)/.test(e),h=e=>d(e)||u(e)?[e]:["".concat(e,".avif"),"".concat(e,".webp"),"".concat(e,".png")],m=e=>{let{src:t,alt:i,priority:n,style:a}=e;return d(t)?(0,l.jsx)("img",{src:t,alt:i,className:"h-full w-full object-contain",loading:n?"eager":"lazy",fetchPriority:n?"high":void 0,style:a}):(0,l.jsx)(s.Z,{alt:i,src:t,className:"h-full w-full overflow-hidden",innerImgClassName:"h-full w-full object-contain",fetchpriority:n?"high":void 0,loading:n?"eager":"lazy",style:a})},f=e=>{let{sourceUrl:t,afterUrl:i,className:s,style:d,children:u,hideDiffTag:f,alt:p,priority:x}=e,[v,b]=(0,n.useState)(50),[w,g]=(0,n.useState)(!1),y=(0,n.useRef)(null),N=(0,n.useRef)(!1),j=(0,n.useRef)(0),[k,C]=(0,n.useState)({width:0,height:0}),[F,R]=(0,n.useState)({width:0,height:0}),_=(0,n.useMemo)(()=>{let{width:e,height:t}=k,{width:i,height:l}=F;if(!e||!t||!i||!l)return{width:e,height:t,left:0,top:0};let n=Math.min(e/i,t/l),a=i*n,r=l*n;return{width:a,height:r,left:(e-a)/2,top:(t-r)/2}},[k,F]),I=_.left+_.width*(v/100),E=(0,n.useMemo)(()=>{let e={...d};return!e.height&&F.width&&F.height&&(e.aspectRatio="".concat(F.width," / ").concat(F.height)),e},[F.height,F.width,d]),P=(0,n.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!_.width)return;let i=(e-t-_.left)/_.width*100;b(Math.max(0,Math.min(100,i)))},[_.left,_.width]),T=(0,n.useCallback)(e=>{N.current&&(e.preventDefault(),P(e.clientX,j.current))},[P]),z=(0,n.useCallback)(()=>{N.current=!1},[]),D=(0,n.useCallback)(e=>{var t,i;e.preventDefault(),e.stopPropagation(),N.current=!0,j.current=e.clientX-I,null===(i=(t=e.currentTarget).setPointerCapture)||void 0===i||i.call(t,e.pointerId)},[I]);return(0,n.useEffect)(()=>(window.addEventListener("pointermove",T),window.addEventListener("pointerup",z),window.addEventListener("pointercancel",z),()=>{window.removeEventListener("pointermove",T),window.removeEventListener("pointerup",z),window.removeEventListener("pointercancel",z)}),[T,z]),(0,n.useEffect)(()=>{b(50),g(!1),R({width:0,height:0});let e=!1,i=async()=>{let i=h(t);for(let t of i){let i=await new Promise(e=>{let i=new Image;i.onload=()=>{e({width:i.naturalWidth,height:i.naturalHeight})},i.onerror=()=>e(null),i.src=t});if(e)return;if(i){R(i),g(!0);return}}};return i(),()=>{e=!0}},[t,i]),(0,n.useEffect)(()=>{let e=y.current;if(!e||!window.ResizeObserver)return;let t=()=>{let t=e.getBoundingClientRect();C({width:t.width,height:t.height})};t();let i=new ResizeObserver(t);return i.observe(e),()=>{i.disconnect()}},[]),(0,l.jsxs)("div",{ref:y,className:(0,o.cn)("relative isolate w-full overflow-hidden rounded-[inherit]",s),style:E,children:[(0,l.jsx)("div",{className:"absolute overflow-hidden",style:{width:_.width,height:_.height,left:_.left,top:_.top},children:(0,l.jsx)(m,{src:t,alt:p,priority:x})}),(0,l.jsx)("div",{className:"absolute overflow-hidden",style:{width:_.width,height:_.height,left:_.left,top:_.top,clipPath:"polygon(".concat(v,"% 0%, 100% 0%, 100% 100%, ").concat(v,"% 100%)"),WebkitClipPath:"polygon(".concat(v,"% 0%, 100% 0%, 100% 100%, ").concat(v,"% 100%)")},children:(0,l.jsx)(m,{src:i,alt:p,priority:!0})}),(0,l.jsx)(c,{className:(0,o.cn)("rounded-r-[80px]",(f||!w)&&"invisible"),style:{left:_.left,top:_.top+12.5},children:(0,r.t)("gen.before")}),(0,l.jsx)(c,{className:(0,o.cn)("rounded-l-[80px]",(f||!w)&&"invisible"),style:{right:k.width-_.left-_.width,top:_.top+12.5},children:(0,r.t)("gen.after")}),(0,l.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-white/0"}),(0,l.jsx)("button",{type:"button",onPointerDown:D,className:(0,o.cn)("absolute z-[3] w-px -translate-x-1/2 cursor-ew-resize touch-none bg-white",!w&&"pointer-events-none invisible"),style:{left:I,top:_.top,height:_.height},"aria-label":"compare images",children:(0,l.jsx)("div",{className:"absolute left-1/2 top-1/2 h-6 w-6 -translate-x-1/2 -translate-y-1/2 roun
1ded-full bg-white",children:(0,l.jsx)(a.Z,{className:"absolute left-1/2 top-1/2 h-6 w-6 -translate-x-1/2 -translate-y-1/2 rotate-90 text-black"})})}),(0,l.jsx)("div",{className:(0,o.cn)("pointer-events-none absolute inset-0 z-[4]",!w&&"invisible"),children:(0,l.jsx)("div",{className:"absolute",style:{width:_.width,height:_.height,left:_.left,top:_.top},children:u})})]})}},89840:function(e,t,i){i.r(t);var l=i(52676),n=i(52890),a=i(23545),r=i(75271),o=i(67811),s=i(92868),c=i(470),d=i(62284),u=i.n(d),h=i(15197),m=i(71054),f=i(71477),p=i(33412),x=i(54167);t.default=e=>{let{visible:t,onHide:i,taskDetail:d,wrapStyle:v,onDelete:b,onDownload:w}=e,g=(0,r.useRef)(null),[y,N]=(0,r.useState)(!1),[j,k]=(0,r.useState)(),[C,F]=(0,r.useState)({}),[R,_]=(0,r.useState)(!1),I=(0,r.useCallback)(async e=>{try{if(C[null==e?void 0:e.taskId])return;let t=await (0,s.G1)(null==e?void 0:e.resultUrl);if(!t)throw Error("Failed to get image size");F(i=>({...i,[null==e?void 0:e.taskId]:{width:t.width,height:t.height}}))}catch(e){_(!1)}},[C]);(0,r.useEffect)(()=>{d&&I(d)},[d]),(0,r.useEffect)(()=>{if(!g.current||!window.ResizeObserver||!C[null==d?void 0:d.taskId]){_(!0);return}let e=new ResizeObserver((0,o.Z)(()=>{let e=(0,c.L1)(g.current,{width:C[null==d?void 0:d.taskId].width,height:C[null==d?void 0:d.taskId].height});k(e),_(!1)},200));return e.observe(g.current),()=>{e.disconnect()}},[C,g,d]);let E=(0,r.useCallback)(async()=>{try{N(!0),await w(null==d?void 0:d.taskId),N(!1)}catch(e){N(!1)}},[w,null==d?void 0:d.taskId]),P=(0,r.useMemo)(()=>{if(null==d?void 0:d.updateTimestamp){let e=Date.now()-d.updateTimestamp,t=Math.ceil((6048e5-e)/864e5);return t>0?t:0}return 0},[null==d?void 0:d.updateTimestamp]),T=(0,r.useMemo)(()=>(0,x.gu)(null==d?void 0:d.updateTimestamp),[null==d?void 0:d.updateTimestamp]);return d?(0,l.jsx)("div",{className:(0,n.cn)("w-full",t?"animate-in block":"animate-out pointer-events-none hidden"),style:v,children:(0,l.jsxs)("div",{className:(0,n.cn)(u().main_1600,"relative flex h-full flex-col justify-between"),children:[(0,l.jsxs)("div",{className:"mobile:h-[64px] mobile:px-4 mobile:border-t-[0px] relative flex h-20 w-full shrink-0 items-center border-t border-[rgba(255,255,255,0.1)] px-10",children:[(0,l.jsx)(m.Z,{className:"h-7 w-7 rotate-180 cursor-pointer text-white",onClick:i}),(0,l.jsxs)("div",{className:"text-md absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center",children:[(0,l.jsx)("div",{className:"mobile:text-md mobile:leading-[22px] whitespace-nowrap text-lg font-medium leading-[26px] text-[#F5F5F5]",children:(0,a.t)("agent.workflow.header")}),(0,l.jsx)("div",{className:"text-sm font-normal leading-[22px] text-[#737373]",children:T})]})]}),(0,l.jsx)("div",{className:(0,n.cn)("mobile:px-0 mobile:py-3 mx-auto h-[calc(100%-60px-84px)] w-[calc(100%-48px)] flex-1 px-6 py-7"),children:(0,l.jsx)("div",{ref:g,className:"flex h-full w-full items-center justify-center",children:j&&(0,l.jsxs)("div",{className:"mobile:rounded-xl relative h-fit w-fit overflow-hidden rounded-2xl",children:[(0,l.jsx)(p.a,{className:"rounded-2xl",style:{width:j.width,height:j.height},sourceUrl:null==d?void 0:d.originUrl,afterUrl:null==d?void 0:d.resultUrl}),(0,l.jsx)("div",{className:"backdrop-blur-xs mobile:px-4 mobile:py-1 mobile:rounded-tl-xl mobile:rounded-br-xl absolute bottom-0 right-0 rounded-br-2xl rounded-tl-2xl bg-black/40 px-[23px] py-[7px]",children:(0,l.jsx)("div",{className:"text-md mobile:leading-4 mobile:text-xs font-medium leading-[22px] text-white",children:(0,a.t)("worspace.history.days.left",{param1:P})})})]})})}),(0,l.jsxs)("div",{className:"mobile:px-2 flex w-full shrink-0 items-center justify-center gap-4 py-[18px]",children:[(0,l.jsx)(f.z,{variant:"custom",className:(0,n.cn)("h-[48px] min-w-[195px] border-none bg-[#CA2B2B] px-[30px]","mobile:min-w-[unset] mobile:w-[calc(50%-24px)] mobile:px-6"),onClick:()=>b([d.id]),children:(0,l.jsx)("div",{className:"mobile:text-md text-xl font-semibold text-white",children:(0,a.t)("gen.btn.delete")})}),(0,l.jsx)(f.z,{loading:y,className:(0,n.cn)("h-[48px] min-w-[195px] border-none bg-white px-[30px]","mobile:min-w-[unset] mobile:w-[calc(50%-24px)] mobile:px-6"),onClick:E,children:(0,l.jsx)("div",{className:"mobile:text-md text-xl font-semibold text-black",children:(0,a.t)("gen.download")})})]}),R&&(0,l.jsx)("div",{className:"absolute left-0 top-0 z-[1] flex h-full w-full items-center justify-center rounded-2xl bg-black/60",children:(0,l.jsx)(h.Z,{fill:"none",className:"h-7 w-7 animate-spin text-white"})})]})}):null}},7929:function(e,t,i){i.d(t,{Bq:function(){return r},DT:function(){return d},Tb:function(){return o},Zf:function(){return s},bv:function(){return a},jo:function(){return h},oy:function(){return n},xQ:function(){return c},zN:function(){return u}});var l=i(56078);let n="video_enhancer_cache_key",a="video_enhancer_task_info",r="video.enhancer",o=200,s=600,c=4096,d={[l.cN.Portrait]:1,[l.cN.AIRepair]:3,[l.cN.AIUltraHD]:6},u=e=>[{value:l.cN.Portrait,label:e("vid.enh.portrait.hd"),cost:d[l.cN.Portrait],icon:"https://titan-h5.meitu.com/pixocial/photocat/portrait-icon.svg",resolution:e("video.original")},{value:l.cN.AIRepair,label:e("ai.repair"),cost:d[l.cN.AIRepair],icon:"https://titan-h5.meitu.com/pixocial/photocat/repair-icon.svg",resolution:"2K"},{value:l.cN.AIUltraHD,label:e("image.enhance.ai.hd"),cost:d[l.cN.AIUltraHD],icon:"https://titan-h5.meitu.com/pixocial/photocat/ai-uhd-icon.svg",resolution:"4K"}],h={timeLine:{height:50,x:10,y:10},canvas:{height:70},videoPointer:{url:"https://titan-h5.meitu.com/pixocial/photocat/video-pointer.png",cursor:"https://titan-h5.meitu.com/pixocial/photocat/cursor-left-right.svg",width:8,height:70,x:6,y:1,hotArea:{width:16,height:70,x:6}},range:{borderColor:"#FFFFFF",borderWidth:1,unRangeColor:"rgba(0,0,0,0.6)",text:{width:50,height:20,x:0,y:30,color:"#FFFFFF",bg:"#000000",opacity:.8,fontSize:12}},clip:{url:"https://titan-h5.meitu.com/pixocial/photocat/move.svg",color:"#FFFFFF",width:10,height:51,x:0,y:9.5,cornerRadius:8,control:{color:"#000000",width:2,height:11,cornerRadius:8}}}},56078:function(e,t,i){i.d(t,{K8:function(){return o},OK:function(){return r},cN:function(){return s},sA:function(){return d}});var l,n,a,r,o,s,c=i(75271);(l=r||(r={})).Original="original",l.Preview="preview",(n=o||(o={})).Full="full",n.Ten="10s",n.Thirty="30s",n.Sixty="60s",n.Custom="custom",(a=s||(s={})).Portrait="portrait",a.AIRepair="ai_repair",a.AIUltraHD="ai_uhd";let d=(0,c.createContext)(null)},92467:function(e,t,i){i.d(t,{Bq:function(){return r},DT:function(){return d},Tb:function(){return o},Zf:function(){return s},bv:function(){return a},i8:function(){return u},oy:function(){return n},xQ:function(){return c}});var l=i(17764);let n="video_watermark_rm_cache_key",a="video_watermark_rm_task_info",r="video.watermark.remover",o=200,s=600,c=4096,d={[l.lN.FullClean]:3,[l.lN.RemoveText]:1,[l.lN.ManualClean]:3,[l.lN.Passerby]:3},u=e=>[{value:l.lN.FullClean,label:e("vid.rm.all"),cost:d[l.lN.FullClean],icon:"https://titan-h5.meitu.com/pixocial/photocat/rm-all.svg",desc:e("vid.rm.all.desc")},{value:l.lN.RemoveText,label:e("vid.rm.text"),cost:d[l.lN.RemoveText],icon:"https://titan-h5.meitu.com/pixocial/photocat/rm-text.svg",desc:e("vid.rm.text.desc")},{value:l.lN.Passerby,label:e("passerby.remover.tools.name"),cost:d[l.lN.Passerby],icon:"https://titan-h5.meitu.com/pixocial/photocat/passerby2.svg",desc:e("passerby.remover.tools.name")},{value:l.lN.ManualClean,label:e("vid.rm.manual"),cost:d[l.lN.ManualClean],icon:"https://titan-h5.meitu.com/pixocial/photocat/rm-manual.svg",desc:e("vid.rm.manual.desc")}]},17764:function(e,t,i){i.d(t,{OK:function(){return a},lN:function(){return r},sA:function(){return s}});var l,n,a,r,o=i(75271);(l=a||(a={})).Original="original",l.Preview="preview",(n=r||(r={})).FullClean="full",n.RemoveWm="watermark",n.RemoveText="text",n.ManualClean="manual",n.Passerby="passerby";let s=(0,o.createContext)(null)},68420:function(e,t,i){var l=i(75271);let n=l.forwardRef(function({title:e,titleId:t,...i},n){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},i),e?l.createElement("title",{id:t},e):null,l.createElement("path",{fillRule:"evenodd",d:"M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))});t.Z=n}}]);

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.