diff --git a/video-gen-api/app/services/admin_credit_record_service.py b/video-gen-api/app/services/admin_credit_record_service.py index cbc6b682..33e9deac 100644 --- a/video-gen-api/app/services/admin_credit_record_service.py +++ b/video-gen-api/app/services/admin_credit_record_service.py @@ -282,7 +282,7 @@ async def list_admin_credit_records( summary_query = select( func.coalesce(func.sum(case((CreditRecord.type == "recharge", CreditRecord.amount), else_=0)), 0), - func.coalesce(func.sum(case((CreditRecord.type == "consume", func.abs(CreditRecord.amount)), else_=0)), 0), + func.coalesce(func.sum(case((CreditRecord.type.in_(["consume", "team_internal"]), func.abs(CreditRecord.amount)), else_=0)), 0), func.coalesce(func.sum(case((CreditRecord.type == "refund", CreditRecord.amount), else_=0)), 0), func.count(CreditRecord.id), func.count(distinct(case((and_(CreditRecord.credit_subject == CreditRecordSubject.MEDIA.value, CreditRecord.type == "consume"), func.concat(CreditRecord.owner_type, ":", CreditRecord.owner_id)), else_=None))), diff --git a/video-gen-app/dist/assets/index-CBCYIy6s.js b/video-gen-app/dist/assets/index-DACceVTG.js similarity index 99% rename from video-gen-app/dist/assets/index-CBCYIy6s.js rename to video-gen-app/dist/assets/index-DACceVTG.js index 8a895850..59fd53d0 100644 --- a/video-gen-app/dist/assets/index-CBCYIy6s.js +++ b/video-gen-app/dist/assets/index-DACceVTG.js @@ -502,4 +502,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho div::-webkit-scrollbar { display: none; } - `}),(0,$.jsx)(`div`,{style:{margin:`auto`,display:`flex`,flexDirection:`column`,width:y.length>0?`${y.length*80+Math.max(0,y.length-1)*1}px`:`100%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,height:86,borderRadius:12,background:`#fff`,gap:1,position:`relative`},children:[x&&y.length===0?(0,$.jsxs)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(VK,{size:`small`}),(0,$.jsx)(Qie,{style:{marginLeft:8,color:`#64748b`},children:`正在抽取每秒帧...`})]}):y.length>0?y.map(e=>{let t=e.second>=_[0]&&e.second<_[1];return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>I(e.second),title:`${e.second}s${e.fallback?`,实际取帧 ${e.captureSecond?.toFixed(1)}s`:``}`,style:{minWidth:80,flex:`0 0 80px`,height:86,borderTop:t?`5px solid #6366f1`:`none`,borderBottom:t?`5px solid #6366f1`:`none`,padding:0,background:`transparent`,overflow:`hidden`,cursor:A?`not-allowed`:`pointer`,position:`relative`},children:[e.status===`success`&&e.image?(0,$.jsx)(`img`,{src:e.image,alt:`${e.second}s`,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):e.status===`loading`?(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(VK,{size:`small`})}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,color:`#64748b`,fontSize:12,background:`#fff`},children:[(0,$.jsxs)(`span`,{children:[e.second,`s`]}),(0,$.jsx)(`span`,{style:{fontSize:11},children:`无有效帧`})]}),(0,$.jsxs)(`span`,{style:{position:`absolute`,left:0,bottom:3,color:`#ffffffff`,fontSize:16,textShadow:`0 1px 3px rgba(0,0,0,.7)`},children:[e.second,`s`]})]},e.second)}):(0,$.jsx)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#64748b`},children:`暂无帧预览,请确认视频是否加载完成`}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:-10,left:0,right:0,bottom:0},children:(0,$.jsx)(LV,{range:!0,min:0,max:O||a,step:1,value:_,onChange:P,onChangeComplete:F,tooltip:{formatter:e=>`${H9(Number(e||0))}s`},disabled:!O||A,styles:{track:{background:`#6969dd63`,height:86,borderRadius:12,margin:`0 `},rail:{height:86,borderRadius:12},handle:{width:20,height:86,marginTop:0,borderRadius:`50%`}}})})]})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`,color:`#64748b`,fontSize:14},children:[`已选取 `,k,`s`]}),E&&(0,$.jsx)(`div`,{style:{marginTop:12,padding:`10px 14px`,borderRadius:8,background:`rgba(239, 68, 68, 0.08)`,border:`1px solid rgba(239, 68, 68, 0.15)`,color:`#ef4444`,fontSize:13,textAlign:`center`},children:E})]})]})})},{TextArea:sae}=PG,cae=`http://ceshi.apiforeign.minzhong.cn`,q9=2,J9=15;function Y9(e){return e?/^https?:\/\//i.test(e)?e:`${cae}${e}`:``}function lae(){let{creatID:e}=$e(),t=Ye(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(null),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),m=(0,S.useRef)(null),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)([]),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(!1),[A,j]=(0,S.useState)(!1),M=(0,S.useRef)(null),N=(0,S.useRef)(null),P=(0,S.useMemo)(()=>Y9(x?.videoUrl),[x?.videoUrl]),F=(0,S.useMemo)(()=>w.length===0?`AI自动拆分`:w.some(e=>e.sourceMode===`ai_suggestion`)?`AI重拆`:`AI自动拆分`,[w]),I=(0,S.useCallback)(async()=>{if(e)try{C(await z7(e))}catch{Z.error(`获取任务详情失败`)}},[e]),L=(0,S.useCallback)(async()=>{if(e)try{let t=(await B7(e)).items||[];T(t),t.some(e=>e.moduleProjectCurrentStepCode!==`video_generate`&&e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?M.current||=window.setInterval(async()=>{try{let t=(await B7(e)).items||[];T(e=>e.map(e=>{let n=t.find(t=>t.id===e.id);return n&&(e.moduleProjectCurrentStepCode!==`video_generate`||e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?n:e})),t.every(e=>e.moduleProjectCurrentStepCode===`video_generate`||e.moduleProjectStatus===`completed`||e.moduleProjectStatus===`failed`)&&(M.current&&=(clearInterval(M.current),null))}catch{}},3e4):M.current&&=(clearInterval(M.current),null)}catch{Z.error(`获取拆镜列表失败`)}},[e]),R=(0,S.useCallback)(async()=>{await Promise.all([I(),L()])},[I,L]);(0,S.useEffect)(()=>(R(),()=>{M.current&&=(clearInterval(M.current),null),N.current&&=(clearInterval(N.current),null)}),[R]),(0,S.useEffect)(()=>{if(x)return x.analysisStatus===`processing`?N.current=window.setInterval(async()=>{try{C(await z7(e))}catch{}},3e3):N.current&&=(clearInterval(N.current),null),()=>{N.current&&=(clearInterval(N.current),null)}},[x?.analysisStatus,e]);let z=(e,t)=>{s(e),l(t),r(!0)},B=()=>{r(!1),s(null),g(``),l(``),v(``),b(``)},V=e=>{e.fileList.length===0&&b(``)},H=async e=>{try{b((await m7(e)).url),Z.success(`图片上传成功`)}catch{Z.error(`图片上传失败,请重试`)}return!1},U=async()=>{if(!o){Z.warning(`请先选择拆镜片段`);return}if(!y){Z.warning(`请上传产品图`);return}if(!h.trim()){Z.warning(`请输入产品名称`);return}if(!_.trim()){Z.warning(`请输入产品卖点`);return}let n={target_project_name:h.trim(),core_content_point:_.trim(),material_image_url:Y9(y),idempotency_key:`replication_${Date.now()}`};D(!0);try{await ure(o,n),Z.success(`视频生成任务创建成功`),B(),B7(e).then(e=>{let n=e.items.find(e=>e.id===o);Z.loading(`创建中...`,3),setTimeout(()=>{t(`/removelens/${n.moduleProjectId}/removefenbu`)},3e3)})}catch(e){Z.error(e?.message||`创建失败,请重试`)}finally{D(!1)}},W=async()=>{if(e){j(!0);try{let t=w.some(e=>e.sourceMode===`ai_suggestion`);await cre(e,{selected_indices:[],replace_existing:t}),Z.success(t?`AI 重拆任务已提交`:`AI 拆镜任务已提交`),await R()}catch(e){Z.error(e?.message||`拆镜失败`)}finally{j(!1)}}},ee=()=>{if(!P){Z.warning(`原视频地址不存在`);return}a(!0)},te=async t=>{if(e){if(t.durationSecondJ9){Z.warning(`拆镜片段不能超过 ${J9} 秒`);return}k(!0);try{await lre(e,{start_second:t.startSecond,end_second:t.endSecond}),Z.success(`手动拆镜任务已提交`),a(!1),await R()}catch(e){Z.error(e?.message||`手动拆镜失败`)}finally{k(!1)}}},ne=e=>e?.splitStatus===`completed`&&!!e?.segmentVideoUrl;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,display:`flex`,flexDirection:`column`,overflow:`hidden`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{padding:`16px 24px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(W2,{}),onClick:()=>t(-1),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{style:{fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,margin:0},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`一键拆解画面分镜,助力仿拍或创作`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})}),x?(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,overflow:`hidden`,padding:`0 32px 32px`},children:[(0,$.jsxs)(`div`,{style:{flex:1,background:`linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.6) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,display:`flex`,alignItems:`center`,gap:30,padding:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`relative`,width:280,height:160,borderRadius:12,overflow:`hidden`,flexShrink:0,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`},children:(0,$.jsx)(`video`,{controls:!0,src:P,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,position:`relative`,zIndex:1},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`h2`,{style:{fontSize:20,fontWeight:600,marginBottom:16,background:`linear-gradient(135deg, #1e293b 0%, #334155 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频总结`}),(0,$.jsx)(`div`,{style:{textAlign:`right`},children:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`上传时间: `,x.createdAt?new Date(x.createdAt).toLocaleString(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}):`-`]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`产品名称:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500},children:x.title})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`受众群体:`}),x.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(VK,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):x.analysisStatus===`completed`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:(x.originalVideoAudience?.split(`、`)||[]).map((e,t)=>(0,$.jsx)(y$,{style:{fontSize:12,background:`rgba(99, 102, 241, 0.1)`,color:`#6366f1`,border:`none`,borderRadius:20},children:e},t))}):null]}),(0,$.jsxs)(`div`,{style:{display:`flex`},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`视频内容:`}),x.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(VK,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):x.analysisStatus===`completed`?(0,$.jsx)(`span`,{style:{color:`#475569`,lineHeight:1.6,height:100,overflowY:`auto`},children:x.originalVideoContent}):null]})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:20,marginTop:20},children:[(0,$.jsx)(X,{type:`default`,onClick:ee,disabled:!P||O,style:{flex:1,height:52,borderRadius:12,border:`2px solid rgba(99, 102, 241, 0.3)`,color:`#6366f1`,fontWeight:600,fontSize:15,background:`rgba(255, 255, 255, 0.9)`,backdropFilter:`blur(10px)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.boxShadow=`none`},children:`手动`}),(0,$.jsx)(gq,{title:F===`AI重拆`?`确定要AI重拆吗?`:`确定要AI拆分吗?`,okText:`确定`,cancelText:`取消`,onConfirm:W,children:(0,$.jsxs)(X,{type:`primary`,loading:A,disabled:A,style:{flex:1,height:52,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.3)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,position:`relative`,overflow:`hidden`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 25px rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.3)`},children:[(0,$.jsx)(`span`,{style:{position:`relative`,zIndex:1},children:F}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:`-100%`,width:`100%`,height:`100%`,background:`linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent)`,transition:`left 0.5s ease`},onMouseEnter:e=>{e.currentTarget.style.left=`100%`}}),x?.aiSuggestions&&x.aiSuggestions.length>0&&(0,$.jsx)(zw,{title:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontWeight:600,marginBottom:8,color:`#6366f1`},children:`AI拆分方案`}),(x?.ai_suggestions||x?.aiSuggestions||[]).map(e=>(0,$.jsxs)(`div`,{style:{marginBottom:8,fontSize:13,lineHeight:1.5},children:[(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#6366f1`},children:[e.index,`.`]}),(0,$.jsx)(`span`,{style:{marginLeft:4,color:`#000000ff`},children:e.timeNode}),(0,$.jsx)(`br`,{}),(0,$.jsx)(`span`,{style:{color:`#666`},children:e.content})]},e.index))]}),placement:`top`,trigger:`hover`,overlayInnerStyle:{backgroundColor:`#fff`,height:300,overflowY:`auto`,border:`1px solid rgba(99, 102, 241, 0.1)`,borderRadius:12,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.12)`},children:(0,$.jsx)(`span`,{style:{marginLeft:8,fontSize:13,opacity:.9},children:`(AI 镜头拆分方案)`})})]})})]}),(0,$.jsxs)(`div`,{style:{flex:2,background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,display:`flex`,flexDirection:`column`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,background:`linear-gradient(135deg, rgba(99,102,241,0.02) 0%, transparent 100%)`},children:[(0,$.jsx)(`h3`,{style:{fontSize:16,fontWeight:600,color:`#1e293b`,margin:0},children:`拆镜片段列表`}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#64748b`,marginLeft:12},children:[`共 `,w.length,` 个片段`]})]}),(0,$.jsx)(o$,{columns:[{title:`片段`,width:100,fixed:`left`,align:`center`,render:(e,t)=>(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#333`},children:t.segmentName||`片段${t.segmentIndex||``}`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#999`},children:t.timeNode}),t.sourceMode===`custom`&&(0,$.jsx)(y$,{color:`blue`,style:{marginTop:6},children:`手动`}),t.sourceMode===`ai_suggestion`&&(0,$.jsx)(y$,{color:`orange`,style:{marginTop:6},children:`自动`})]})},{title:`片段视频`,width:150,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{position:`relative`,width:120,height:80,borderRadius:6,overflow:`hidden`,background:`#f1f5f9`,cursor:`pointer`},onClick:()=>{t.segmentVideoUrl&&(d(Y9(t.segmentVideoUrl)),p(!0))},children:t.segmentVideoUrl?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:Y9(t.segmentVideoUrl),style:{width:`100%`,height:`100%`,objectFit:`cover`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.3)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:`50%`,background:`rgba(255,255,255,0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:0,height:0,borderTop:`8px solid transparent`,borderBottom:`8px solid transparent`,borderLeft:`14px solid #6366f1`,marginLeft:2}})})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:12},children:t.splitStatus===`failed`?`切割失败`:`切割中`})})},{title:`视频内容`,width:500,align:`left`,render:(e,t)=>{if(t.source_mode===`ai_suggestion`||t.sourceMode===`ai_suggestion`)return(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:t.segmentContent||t.lastError||`-`});let n=t.analysis_status||t.analysisStatus,r={not_required:`无需单独分析`,pending:`等待分析`,processing:`分析中`,failed:`分析失败`};return n===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(VK,{size:`small`}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):n===`failed`?(0,$.jsx)(`div`,{style:{fontSize:14,color:`#ef4444`,lineHeight:1.6},children:`分析失败`}):(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:n&&r[n]?r[n]:t.segmentContent||t.lastError||`-`})}},{title:`视频类型`,width:120,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,fontWeight:500},children:t.segmentCategory||`-`})},{title:`状态`,width:120,align:`center`,dataIndex:`moduleProjectStatus`,render:(e,t)=>{let n=e,r=t.moduleProjectCurrentStepCode||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return n||`-`}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return t.moduleProjectId?{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}:{text:`待生成任务`,color:`#94a3b8`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`操作`,width:140,fixed:`right`,align:`center`,render:(e,n)=>(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:8},children:n.moduleProjectId?(0,$.jsx)(X,{type:`text`,onClick:()=>t(`/removelens/${n.moduleProjectId}/removefenbu`),style:{color:`#10b981`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`详情任务`}):(0,$.jsx)(X,{type:`text`,onClick:()=>z(String(n.id),n.segmentName),disabled:!ne(n),style:{color:ne(n)?`#f59e0b`:`#94a3b8`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:ne(n)?`视频生成`:`待切割完成`})})}],dataSource:w,pagination:!1,bordered:!1,rowKey:`id`,scroll:{y:300},style:{flex:1},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`,height:80,overflow:`auto`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(255, 255, 255, 1)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})]})]}):(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{fontSize:16,color:`#999`},children:`加载中...`})})]}),(0,$.jsx)(oae,{open:i,videoUrl:P,title:`手动视频切片`,loading:O,minDuration:q9,maxDuration:J9,onCancel:()=>a(!1),onConfirm:te}),(0,$.jsx)(XH,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:18,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`智能视频复刻`}),c&&(0,$.jsxs)(`span`,{style:{fontSize:14,color:`#64748b`},children:[`- `,c]})]}),(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(Z5,{}),onClick:B,style:{padding:0,color:`#64748b`,fontSize:14}})]}),placement:`right`,closable:!1,onClose:B,open:n,size:480,styles:{body:{padding:`24px`,background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`},section:{borderRadius:`20px 0 0 20px`,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:[(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品白底图 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(U0,{listType:`picture-card`,onChange:V,beforeUpload:H,maxCount:1,accept:`image/*`,style:{width:120,height:120,borderRadius:8,border:`2px dashed rgba(99, 102, 241, 0.3)`,background:`rgba(99, 102, 241, 0.02)`},children:!y&&(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:6},children:[(0,$.jsx)(zL,{style:{fontSize:20,color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`上传产品图`})]})})})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品名称 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(PG,{value:h,onChange:e=>g(e.target.value),placeholder:`请输入产品名称`,style:{height:44,borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:10,showCount:!0})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品卖点 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(sae,{value:_,onChange:e=>v(e.target.value),placeholder:`请输入产品卖点`,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:100,showCount:!0,rows:3})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,marginTop:8},children:(0,$.jsx)(X,{type:`primary`,onClick:U,loading:E,disabled:E,style:{flex:1,height:48,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 15px rgba(99, 102, 241, 0.3)`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.4)`,e.currentTarget.style.transform=`translateY(-1px)`},onMouseLeave:e=>{e.currentTarget.style.boxShadow=`0 4px 15px rgba(99, 102, 241, 0.3)`,e.currentTarget.style.transform=`translateY(0)`},children:E?`生成中...`:`手动生成`})})]})}),(0,$.jsx)(fq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频预览`})]}),open:f,onCancel:()=>p(!1),afterClose:()=>{m.current&&(m.current.pause(),m.current.currentTime=0)},footer:null,width:640,centered:!0,styles:{body:{padding:24},header:{borderBottom:`1px solid #e0e0e0`,padding:`20px 24px`}},children:(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`},children:(0,$.jsx)(`video`,{ref:m,controls:!0,src:u||``,style:{width:`100%`,maxHeight:420,objectFit:`contain`,backgroundColor:`#000`},playsInline:!0,"webkit-playsinline":!0,autoPlay:!0})})})]})}var{Title:uae,Text:X9}=Q,{TextArea:dae}=PG;function fae(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function Z9(){let e=Ye(),{creatID:t}=$e(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(`image`),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(null),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(5),[N,P]=(0,S.useState)(`16:9`),[F,I]=(0,S.useState)(`480p`),[L,R]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[z,B]=(0,S.useState)([]),[V,H]=(0,S.useState)(1),[U,W]=(0,S.useState)(20),[ee,te]=(0,S.useState)(0),[ne,re]=(0,S.useState)(``),[G,ie]=(0,S.useState)({}),[K,ae]=(0,S.useState)([]),[q,oe]=(0,S.useState)([]),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(``),[de,fe]=(0,S.useState)(`image`),pe=S.useRef(null);(0,S.useEffect)(()=>{if(se&&de===`video`){let e=()=>{pe.current&&pe.current.play().catch(()=>{})};pe.current&&(pe.current.readyState>=2?e():pe.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),pe.current&&(pe.current.removeEventListener(`loadedmetadata`,e),pe.current.pause())}}else pe.current&&pe.current.pause()},[se,de]);let me=[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}].map((e,t)=>({...e,status:K[t]?.status||``,id:K[t]?.id||t,output:K[t]?.output||``,engineId:K[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=me.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=me.length-1;t>=0;t--)if(me[t].status===`completed`||me[t].status===`failed`){e.add(String(me[t].childId));break}e.size>0?oe(Array.from(e)):oe([])},[K]);let he=(e,t,n)=>{R7(e,t,n).then(e=>{e.items&&B(e.items),e.total!==void 0&&te(e.total)}).catch(e=>{})},ge=(e,t)=>{H(e),W(t),he(e,t,ne)},_e=()=>{he(1,20,ne)};(0,S.useEffect)(()=>{he(V,U,ne)},[]),(0,S.useEffect)(()=>{E7().then(e=>{if(x(e.engine||{}),e.engine?.video&&e.engine.video.length>0){w(e.engine.video[0].id);let t=e.engine.video[0];R({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]})}e.engine?.image&&e.engine.image.length>0&&E(e.engine.image[0].id)}).catch(e=>{})},[]),(0,S.useEffect)(()=>()=>{m&&(clearInterval(m),h(null))},[m]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(O(!1),A(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&V7(t).then(e=>{ie(e),e.steps&&ae(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=me[4];e&&e.status!==`completed`&&e.status!==`failed`?m||h(setInterval(be,3e4)):e&&m&&(clearInterval(m),h(null))},[me]);let ve=(e,t,n,i)=>{l(t||`image`),_(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?fae(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},ye=async()=>{if(c===`image`){if(!G?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}y(!0);try{await fre(G.id,g,{prompt:i.trim()}),Z.success(`图片提示词已保存`),xe(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{y(!1)}return}if(!G?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!u||typeof u!=`object`||Object.keys(u).length===0){Z.warning(`视频提示词不能为空`);return}if(!f){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=w9(u,f);if(e){Z.warning(e);return}y(!0);try{await pre(G.id,g,{prompt_schema:u}),Z.success(`视频提示词已保存`),xe(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{y(!1)}},be=()=>{t&&V7(t).then(e=>{ie(e),e.steps&&ae(e.steps)}).catch(e=>{})},xe=()=>{t&&V7(t).then(e=>{ie(e),e.steps&&ae(e.steps)}).catch(e=>{})},Se=(e,t)=>{ue(e),fe(t),ce(!0)},Ce=()=>{ce(!1),ue(``),pe.current&&pe.current.pause()},we=e=>{if(e.preventDefault(),e.stopPropagation(),!le)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${le}&download=1`,t.download=de===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},Te=e=>{dre(G.id,e.toString()).then(e=>{Z.info(`正在生成图片提示词,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ee=e=>{let t={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};H7(G.id,e.toString(),t).then(e=>{Z.info(`正在生成图片,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},De=()=>{let e={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};H7(G.id,me[1].id.toString(),e).then(e=>{Z.info(`正在生成图片,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Oe=e=>{let t={engine_id:C,duration:j,aspect_ratio:N,resolution:F,target_platform:`抖音`};mre(G.id,e.toString(),t).then(e=>{Z.info(`正在生成视频提示词,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},ke=(e,t)=>{U7(G.id,e.toString(),{engine_id:``}).then(e=>{Z.info(`正在生成视频,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ae=()=>{U7(G.id,me[3].id.toString(),{engine_id:``}).then(e=>{xe()}).catch(e=>{})};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsxs)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(W2,{}),onClick:()=>window.history.back(),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`拆镜复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(X,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>s(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:G?.material?.materialVideoUrl?`pointer`:`default`},onClick:()=>G?.material?.materialVideoUrl&&Se(G.material.materialVideoUrl,`video`),children:G?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.material.materialVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:G?.material?.materialImageUrl?`pointer`:`default`},onClick:()=>G?.material?.materialImageUrl&&Se(G.material.materialImageUrl,`image`),children:G?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:G.material.materialImageUrl,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),G?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`},onClick:()=>Se(G.finalImageUrl,`image`),children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),G?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`},onClick:()=>Se(G.finalVideoUrl,`video`),children:(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(t_,{activeKey:q,onChange:oe,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:me.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(F4,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(X9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:G?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.material.materialVideoUrl}`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(X9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:G?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:G.material.materialImageUrl,alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]}),(0,$.jsx)(X,{onClick:()=>{Te(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片提示词`})]})}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(X9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(aU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(t1,{}),onClick:()=>ve(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(X,{onClick:()=>{Ee(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[G.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(t1,{}),onClick:()=>De(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{O(!D),A(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(W8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(X9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),D&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(X9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:b.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{w(e.id),R({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(N)||P(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(F)||I(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(j)||M(e.supportedDurations?.[0]||5),O(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:C===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:C===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:C===e.id?600:500,color:C===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{A(!k),O(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(d6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(X9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[N,` · `,j,`s · `,F]})]}),k&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(X9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:L.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>P(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${N===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:N===e?`#6366f1`:`#6b7280`,fontWeight:N===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(X9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(j-Math.min(...L.durations))/(Math.max(...L.durations)-Math.min(...L.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...L.durations),max:Math.max(...L.durations),value:j,onChange:e=>M(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:j}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(X9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:L.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>I(e),style:{flex:1,height:42,borderRadius:6,border:F===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:F===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:F===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(X,{type:`primary`,style:{width:`100%`,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},onClick:()=>{Oe(e.id)},disabled:e.status!==`completed`,children:`下一步:生成视频提示词`})]}),e.childId===4&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(X9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(aU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(t1,{}),onClick:()=>ve(G?.videoGeneration?.promptSchema,`video`,e.id,G?.videoGeneration?.schemaConfigSnapshot),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!G?.videoGeneration?.promptSchema||!G?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(X,{onClick:()=>{ke(e.id,e.engineId)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成视频`})]})]}),e.childId===5&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,position:`relative`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:e.status===`completed`&&G?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalVideoUrl}`,style:{width:`100%`,height:180,objectFit:`cover`},controls:!0}):e.status===`processing`?(0,$.jsxs)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:20,height:20,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}),(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14},children:`视频生成中...`})]}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#ef4444`,fontSize:14},children:`视频生成失败`}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无视频`})}),(0,$.jsxs)(aU,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(X,{onClick:()=>Ae(),type:`default`,icon:(0,$.jsx)(t1,{}),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`重新生成`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(L0,{}),style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,onClick:()=>{let e=`http://ceshi.apiforeign.minzhong.cn${G?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})]}),(0,$.jsx)(fq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:c===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:n,onCancel:()=>{v||r(!1)},footer:[(0,$.jsx)(X,{onClick:()=>r(!1),disabled:v,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:ye,loading:v,disabled:v,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:800,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:c===`image`?(0,$.jsx)(dae,{value:i,onChange:e=>a(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:500,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(j9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(fq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`创作记录`})]}),open:o,onCancel:()=>s(!1),width:800,footer:null,styles:{body:{background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16,gap:8},children:[(0,$.jsx)(PG,{placeholder:`搜索产品名称`,value:ne,onChange:e=>re(e.target.value),onPressEnter:_e,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(X,{type:`primary`,onClick:_e,style:{borderRadius:10,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(o$,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:t=>(0,$.jsx)(X,{type:`text`,onClick:()=>e(`/removelens/${t.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`})}],dataSource:z,rowKey:`id`,pagination:{current:V,pageSize:U,total:ee,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:ge,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:350},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})]}),(0,$.jsx)(fq,{open:se,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:Ce,width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(L0,{}),onClick:we,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:de===`image`?(0,$.jsx)(`img`,{src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:pe,src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})})]})}var pae=`/assets/homebtn1-DjQgGq1F.png`,mae=`/assets/homebtn2-BNQvBUFh.png`,hae=`/assets/homebtn3-CaXf7CQb.png`;function gae(e){if(!e)return`-`;let t=String(e).trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``);let[r=``,i=``]=t.split(`T`),[,a=``,o=``]=r.split(`-`),s=i.slice(0,5);return!a||!o?`-`:`${a}-${o} ${s}`}var _ae=()=>{let e=Ye(),[t,n]=(0,S.useState)(`project`),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)([]),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(null),h=(0,S.useRef)(null);(0,S.useEffect)(()=>{Ere().then(e=>{if(e?.items?.length>0){c(e.items);let t=e.items[0].id;u(t),J7(t).then(e=>{console.log(`caseButton:`,e),e?.categories?.[0]?.assets&&f(e.categories[0].assets)})}})},[]),(0,S.useEffect)(()=>{(async()=>{try{xre(5).then(e=>{for(let t in e)e[t].forEach(e=>{e.type=t,o(t=>[...t,e])});o(e=>e)})}catch{}})()},[]);let g=e=>{n(e)},_=[{icon:(0,$.jsx)(uU,{style:{fontSize:24,color:`#6366f1`}}),title:`爆款复刻`,description:`上传参考视频与产品图片,一键复刻爆款视频开头`,action:`立即创作`,path:`/initial`},{icon:(0,$.jsx)(R8,{style:{fontSize:24,color:`#f97316`}}),title:`拆镜复刻`,description:`精细化镜头复刻工具,拆分参考视频单镜头独立复刻,提升素材原创度,规避素材同质化`,action:`开始混剪`,path:`/removelens`},{icon:(0,$.jsx)(E8,{style:{fontSize:24,color:`#10b981`}}),title:`AI成片`,description:`输入想法、剧本或上传参考,智能生成视频/图片`,action:`立即生成`,path:`/conversation`}],v=[{key:`all`,label:`全部`},{key:`project`,label:`项目媒体`},{key:`chatAi`,label:`AI成片`},{key:`hotOpeningReplicate`,label:`爆款复刻`},{key:`shotReplicate`,label:`拆镜复刻`}],y=t===`all`?a:a.filter(e=>e.type===t);return(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsx)(`h3`,{children:`首页工作台 `}),(0,$.jsxs)(`p`,{style:{cursor:`pointer`,fontSize:12,letterSpacing:.3,padding:`10px 16px`,backgroundColor:`#ffffffff`,borderRadius:30,boxShadow:`0px 4px 12px 0px rgba(0, 0, 0, 0.1)`},children:[`如需进行账户素材推送:`,(0,$.jsxs)(`span`,{style:{color:`#1a50bbff`},onClick:()=>{e(`/authorization`)},children:[`一键推送`,(0,$.jsx)(q2,{style:{marginLeft:8,transform:`rotate(0deg)`}})]})]})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`linear-gradient(135deg, #f0f9ff 0%, #faf5ff 50%, #fef3c7 100%)`,border:`1px solid rgba(99,102,241,0.10)`,margin:`0 0 20px`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:18},children:(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsxs)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:[`我的项目`,(0,$.jsx)(`span`,{style:{color:`#a8a8a8ff`,fontSize:12},children:`(操作步骤)`})]})]})})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,background:`#fff`,borderRadius:14,padding:`20px 18px`,display:`flex`,flexDirection:`column`,boxShadow:`0 2px 8px rgba(15, 23, 42, 0.04)`},children:[(0,$.jsx)(`div`,{style:{textAlign:`center`,fontSize:20,fontWeight:700,color:`#1e293b`,marginBottom:14,letterSpacing:1},children:`第1步`}),(0,$.jsxs)(`div`,{style:{flex:1,minHeight:140,border:`1px dashed #c7d2fe`,borderRadius:8,background:`#fafbff`,padding:10,display:`flex`,flexDirection:`column`,gap:8,marginBottom:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:2,background:`#6366f1`}}),(0,$.jsx)(`div`,{style:{flex:1,height:22,background:`#fff`,border:`1px solid #e2e8f0`,borderRadius:4,display:`flex`,alignItems:`center`,padding:`0 8px`,fontSize:10,color:`#94a3b8`},children:`项目名称...`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:[(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#eef2ff`,color:`#6366f1`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #c7d2fe`},children:`美妆`}),(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#fff7ed`,color:`#f97316`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #fed7aa`},children:`美食`}),(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#ecfdf5`,color:`#10b981`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #a7f3d0`},children:`3C数码`}),(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#f5f3ff`,color:`#8b5cf6`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #ddd6fe`},children:`服饰`})]}),(0,$.jsx)(`div`,{style:{height:16,background:`#fff`,border:`1px solid #e2e8f0`,borderRadius:4}}),(0,$.jsx)(`div`,{style:{height:16,width:`70%`,background:`#fff`,border:`1px solid #e2e8f0`,borderRadius:4}})]}),(0,$.jsx)(`div`,{style:{background:`#f1f5f9`,borderRadius:10,padding:`14px 12px`,textAlign:`center`,fontSize:13,color:`#475569`,lineHeight:1.6},children:`创建新项目,自定义项目名称并选择对应行业分类`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,color:`#94a3b8`,fontSize:22},children:(0,$.jsx)(q2,{style:{transform:`rotate(0deg)`}})}),(0,$.jsxs)(`div`,{style:{flex:1,background:`#fff`,borderRadius:14,padding:`20px 18px`,display:`flex`,flexDirection:`column`,boxShadow:`0 2px 8px rgba(15, 23, 42, 0.04)`},children:[(0,$.jsx)(`div`,{style:{textAlign:`center`,fontSize:20,fontWeight:700,color:`#1e293b`,marginBottom:14,letterSpacing:1},children:`第2步`}),(0,$.jsxs)(`div`,{style:{flex:1,minHeight:140,border:`1px solid #e2e8f0`,borderRadius:8,background:`#fafafa`,padding:10,display:`flex`,flexDirection:`column`,gap:8,marginBottom:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,background:`#f1f5f9`,borderRadius:6,padding:2,gap:2},children:[(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`5px 0`,background:`#fff`,borderRadius:4,fontSize:11,fontWeight:600,color:`#6366f1`,boxShadow:`0 1px 3px rgba(99,102,241,0.15)`},children:[(0,$.jsx)(W5,{style:{fontSize:11}}),`视频`]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`5px 0`,fontSize:11,color:`#94a3b8`},children:[(0,$.jsx)(n8,{style:{fontSize:11}}),` 图片`]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:9,color:`#94a3b8`,marginBottom:3},children:`尺寸比例`}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#eef2ff`,color:`#6366f1`,border:`1px solid #c7d2fe`,borderRadius:4,fontSize:10,fontWeight:600},children:`9:16`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`16:9`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`1:1`})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:9,color:`#94a3b8`,marginBottom:3},children:`时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`5s`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff7ed`,color:`#f97316`,border:`1px solid #fed7aa`,borderRadius:4,fontSize:10,fontWeight:600},children:`10s`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`15s`})]})]})]}),(0,$.jsx)(`div`,{style:{background:`#f1f5f9`,borderRadius:10,padding:`14px 12px`,textAlign:`center`,fontSize:13,color:`#475569`,lineHeight:1.6},children:`选择生成图片或视频,设置尺寸、时长等参数,点击生成即可一键优化提示词`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,color:`#94a3b8`,fontSize:22},children:(0,$.jsx)(q2,{})}),(0,$.jsxs)(`div`,{style:{flex:1,background:`#fff`,borderRadius:14,padding:`20px 18px`,display:`flex`,flexDirection:`column`,boxShadow:`0 2px 8px rgba(15, 23, 42, 0.04)`},children:[(0,$.jsx)(`div`,{style:{textAlign:`center`,fontSize:20,fontWeight:700,color:`#1e293b`,marginBottom:14,letterSpacing:1},children:`第3步`}),(0,$.jsxs)(`div`,{style:{flex:1,minHeight:140,border:`1px solid #e2e8f0`,borderRadius:8,background:`#fafafa`,padding:10,display:`flex`,flexDirection:`column`,gap:6,marginBottom:12,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 8px`,background:`#f0fdf4`,border:`1px solid #bbf7d0`,borderRadius:5},children:[(0,$.jsx)(`div`,{style:{width:14,height:14,borderRadius:`50%`,background:`#10b981`,color:`#fff`,fontSize:10,display:`flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700},children:`✓`}),(0,$.jsx)(`div`,{style:{fontSize:10,color:`#065f46`,fontWeight:500},children:`提示词已智能优化`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 8px`,background:`#f0fdf4`,border:`1px solid #bbf7d0`,borderRadius:5},children:[(0,$.jsx)(`div`,{style:{width:14,height:14,borderRadius:`50%`,background:`#10b981`,color:`#fff`,fontSize:10,display:`flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700},children:`✓`}),(0,$.jsx)(`div`,{style:{fontSize:10,color:`#065f46`,fontWeight:500},children:`尺寸 9:16 · 时长 5s`})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`6px 0`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,borderRadius:5,fontSize:11,fontWeight:600,boxShadow:`0 2px 6px rgba(99,102,241,0.25)`},children:[(0,$.jsx)(E5,{style:{fontSize:11}}),`确认并生成素材`]})]}),(0,$.jsx)(`div`,{style:{background:`#f1f5f9`,borderRadius:10,padding:`14px 12px`,textAlign:`center`,fontSize:13,color:`#475569`,lineHeight:1.6},children:`核对图片 / 视频参数与优化后的提示词,确认后一键生成素材`})]}),(0,$.jsxs)(`div`,{onClick:()=>e(`/projects`),onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px) scale(1.05)`,e.currentTarget.style.boxShadow=`0 14px 32px rgba(99,102,241,0.45)`;let t=e.currentTarget.querySelector(`.round-arrow`);t&&(t.style.transform=`translateX(3px)`)},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0) scale(1)`,e.currentTarget.style.boxShadow=`0 8px 20px rgba(99,102,241,0.30)`;let t=e.currentTarget.querySelector(`.round-arrow`);t&&(t.style.transform=`translateX(0)`)},style:{cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,width:64,height:64,borderRadius:`50%`,textAlign:`center`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,color:`#fff`,fontSize:14,fontWeight:600,letterSpacing:.5,boxShadow:`0 8px 20px rgba(99,102,241,0.30)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,userSelect:`none`,position:`relative`},children:[(0,$.jsx)(`span`,{style:{position:`absolute`,inset:0,borderRadius:`50%`,background:`radial-gradient(circle at 30% 25%, rgba(255,255,255,0.35) 0%, transparent 55%)`,pointerEvents:`none`}}),`前往`,(0,$.jsx)(q2,{className:`round-arrow`,style:{fontSize:13,transition:`transform 0.3s ease`}})]})]})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp stagger-children`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:18},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`AI 创作入口`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`一键开启智能创作`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:16},children:_.map((t,n)=>{let r=[{color:`#6366f1`,light:`rgba(99,102,241,0.10)`,tag:`复刻`,bg:pae},{color:`#f97316`,light:`rgba(249,115,22,0.10)`,tag:`混剪`,bg:mae},{color:`#10b981`,light:`rgba(16,185,129,0.10)`,tag:`云创`,bg:hae}],i=r[n]||r[0];return(0,$.jsxs)(`div`,{onClick:()=>e(t.path),className:`project-card`,style:{flex:1,padding:`20px 22px`,borderRadius:14,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,position:`relative`,overflow:`hidden`,backgroundImage:`url(${i.bg})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},onMouseEnter:e=>{e.currentTarget.style.borderColor=i.color,e.currentTarget.style.boxShadow=`0 12px 32px ${i.light}`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#e2e8f0`,e.currentTarget.style.boxShadow=`none`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:`linear-gradient(90deg, ${i.color}, ${i.color}88)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:14},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,background:i.light,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:i.color,fontSize:22,display:`flex`},children:t.icon})}),(0,$.jsx)(`div`,{style:{fontSize:11,color:i.color,padding:`2px 8px`,borderRadius:6,background:i.light,fontWeight:600},children:i.tag})]}),(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:700,color:`#1f2937`,marginBottom:4},children:t.title}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#6b7280`,marginBottom:14,lineHeight:1.5,minHeight:36},children:t.description}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,color:i.color,fontSize:13,fontWeight:600},children:[t.action,(0,$.jsx)(q2,{style:{fontSize:12}})]})]},n)})})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,marginBottom:20},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`近期作品`})]})}),(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(cR,{activeKey:t,onChange:g,items:v.map(e=>({key:e.key,label:e.label})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(5, 1fr)`,gap:16},children:y.length===0?(0,$.jsxs)(`div`,{style:{gridColumn:`1 / -1`,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(n8,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无作品`})]}):y.map(t=>(0,$.jsxs)(`div`,{className:`project-card`,onClick:()=>{let n=t.moduleProjectId;t.type===`hotOpeningReplicate`&&n!=null?e(`/initial/${n}/initialinfo`):t.type===`shotReplicate`&&n!=null?e(`/removelens/${n}/removefenbu`):t.type===`chatAi`?e(`/conversation`):t.type===`project`&&e(`/project`)},style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`},children:[(()=>{let e=t.type!==`hotOpeningReplicate`&&(String(t.resourceType??``).toLowerCase()===`image`||t.resourceType===1||String(t.resourceType??``)===`1`),n=``;return n=e?`/static`+t.resultUrl+`&w=300&p=50`||``:(t.type,t.coverUrl||t.resultUrl||t.resultUrl||``),(0,$.jsx)(`img`,{src:n?n.startsWith(`http`)?n:`http://ceshi.apiforeign.minzhong.cn`+n:``,alt:t.title||t.name||`作品`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})(),String(t.resourceType??``).toLowerCase()===`image`?null:(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.2)`},children:(0,$.jsx)(W5,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,background:`#f8fafc`,paddingTop:0},children:(0,$.jsxs)(`div`,{style:{marginTop:6,display:`flex`,alignItems:`center`,gap:6,fontSize:12,color:`#64748b`},children:[(0,$.jsx)(`span`,{style:{display:`inline-block`,padding:`1px 6px`,border:`1px solid #3b82f6`,borderRadius:4,color:`#3b82f6`,fontSize:11,fontWeight:500,background:`#fff`,lineHeight:1.4,whiteSpace:`nowrap`},children:{project:`项目媒体`,chatAi:`AI成片`,hotOpeningReplicate:`爆款复刻`,shotReplicate:`拆镜复刻`}[t.type]||`其他`}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`·`}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:gae(t.generatedTime)})]})})]},t.id||`${t.type}-${Math.random()}`))})]}),d.length>0&&(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:18},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`素材案例`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:4},children:`精选优质作品参考`})]})}),(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(cR,{activeKey:l,onChange:e=>{u(e),J7(e).then(e=>{e?.categories?.[0]?.assets?f(e.categories[0].assets):f([])})},items:s.map(e=>({key:e.id,label:e.name})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(5, 1fr)`,gap:16},children:d.length===0?(0,$.jsxs)(`div`,{style:{gridColumn:`1 / -1`,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(n8,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无素材`})]}):d.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card`,onClick:()=>m(e),style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(`div`,{style:{position:`relative`,aspectRatio:`16/9`},children:e.mediaType===`video`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},muted:!0,playsInline:!0}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.2)`},children:(0,$.jsx)(W5,{style:{fontSize:28,color:`#fff`}})})]}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,alt:e.title||`素材 ${t+1}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,background:`#f8fafc`},children:(0,$.jsx)(`div`,{style:{fontSize:12,color:`#64748b`,textAlign:`center`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.title||`素材 ${t+1}`})})]},e.id||t))})]}),(0,$.jsxs)(fq,{open:!!p,onCancel:()=>{h.current?.pause(),m(null)},footer:null,width:760,centered:!0,className:`preview-modal`,bodyStyle:{padding:0,background:`#fff`,borderRadius:16,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{width:`100%`,paddingTop:`56.25%`,position:`relative`},children:(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`},children:p?.mediaType===`video`?(0,$.jsx)(`video`,{ref:h,src:`http://ceshi.apiforeign.minzhong.cn${p.url}`,controls:!0,autoPlay:!0,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${p?.url}`,alt:p?.title,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})}),p?.title&&(0,$.jsx)(`div`,{style:{padding:`14px 20px`,fontSize:14,color:`#4b5563`,fontWeight:500,borderTop:`1px solid #f1f5f9`,textAlign:`center`},children:p.title})]})]})},{RangePicker:vae}=pH,Q9=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),yae=()=>{let e=Ye(),[t]=On(),{message:n}=ux.useApp(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(1),[x,C]=(0,S.useState)(10),[w,T]=(0,S.useState)(t.get(`advertiserId`)||``),[E,D]=(0,S.useState)(),[O,k]=(0,S.useState)((0,rD.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),[A,j]=(0,S.useState)(``);(0,S.useEffect)(()=>{N(),M()},[]);let M=async(e=1,t=10,r,a)=>{c(!0);try{let n=await _re({advertiser_id:a??w,consume_date:r??E,page:e,page_size:t});i(n.data||[]),o(n.pagination?.total||0),b(n.pagination?.page||1),C(n.pagination?.pageSize||10)}catch{n.error(`加载数据失败`)}finally{c(!1)}},N=async()=>{try{let e=((await K7()).data||[]).map(e=>({name:Q9(e.field),description:e.description}));m(e);let t=localStorage.getItem(`consumeColumns`);g(t?JSON.parse(t):e.map(e=>e.name))}catch{n.error(`加载表头字段失败`)}},P=r.map((e,t)=>({...e,index:t+1,key:e.id})),F=()=>{document.referrer.includes(window.location.origin)?e(-1):e(`/materials`)},I=()=>{b(1),M(1,x)},L=()=>{fq.confirm({title:`拉取消耗数据`,content:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`同步日期:`}),(0,$.jsx)(pH,{value:(0,rD.default)(O),onChange:e=>k(e?e.format(`YYYY-MM-DD`):(0,rD.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),style:{width:`100%`}})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`广告主ID(可选):`}),(0,$.jsx)(PG,{placeholder:`不指定则同步所有授权的广告主`,value:A,onChange:e=>j(e.target.value)})]})]}),onOk:async()=>{u(!0);try{await vre({date:O,advertiser_id:A||void 0}),n.success(`拉取消耗数据成功`),M(y,x)}catch{n.error(`拉取消耗数据失败`)}finally{u(!1)}},okText:`开始拉取`,cancelText:`取消`})},R=h.map(e=>p.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[t.get(`advertiserId`)&&(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(W2,{}),onClick:F}),(0,$.jsx)(b3,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(PG,{placeholder:`广告主ID`,value:w,onChange:e=>T(e.target.value),style:{width:180},allowClear:!0,onPressEnter:()=>{b(1),M(1,x)}}),(0,$.jsx)(vae,{value:E?[(0,rD.default)(E[0]),(0,rD.default)(E[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?D([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):D(void 0)}}),(0,$.jsx)(X,{type:`primary`,size:`medium`,onClick:I,children:`搜索`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(_5,{}),onClick:L,loading:l,style:{borderRadius:8},children:`拉取消耗`}),(0,$.jsx)(X,{icon:(0,$.jsx)(W8,{}),onClick:()=>f(!0),style:{borderRadius:8},children:`自定义表头`})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(o$,{dataSource:P,columns:R,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(bK,{current:y,pageSize:x,total:a,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{b(e),C(t),M(e,t)},size:`small`})})]}),(0,$.jsx)(fq,{title:`自定义表头`,open:d,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(h)),n.success(`表头设置已保存`),f(!1)},onCancel:()=>{f(!1),v(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(PG,{placeholder:`搜索指标...`,value:_,allowClear:!0,onChange:e=>v(e.target.value),style:{marginBottom:8}}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,$.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,$.jsx)($z,{checked:h.length===p.length&&p.length>0,indeterminate:h.length>0&&h.length{e.target.checked?g(p.map(e=>e.name)):g([])},style:{marginBottom:12},children:`全选`}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:p.filter(e=>e.description.toLowerCase().includes(_.toLowerCase())||e.name.toLowerCase().includes(_.toLowerCase())).map(e=>(0,$.jsx)($z,{checked:h.includes(e.name),onChange:t=>{t.target.checked?g(t=>[...t,e.name]):g(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,h.length,`)`]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>g([]),disabled:h.length===0,children:`清空`}),(0,$.jsx)(X,{size:`small`,onClick:async()=>{try{let e=((await K7()).data||[]).map(e=>({name:Q9(e.field),description:e.description}));m(e),g(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),n.success(`表头字段已更新`)}catch{n.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:h.length===0?(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,$.jsx)(`div`,{children:h.map((e,t)=>{let n=p.find(t=>t.name===e);return(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...h],[t]=e.splice(n,1);e.splice(r,0,t),g(e)}},children:[(0,$.jsx)(Q.Text,{children:n?.description||e}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},bae=()=>{let e=Ye(),[t]=On(),{message:n}=ux.useApp(),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{let r=t.get(`auth_code`),a=t.get(`state`);if(!r||!a){o(!1),i(10);return}let s={auth_code:r,state:a,app_id:t.get(`app_id`)||void 0,material_auth_status:t.get(`material_auth_status`)||void 0,scope:t.get(`scope`)||void 0,uid:t.get(`uid`)||void 0};(async()=>{try{let t=await nre(s);c(!0),o(!1),n.success(t?.message||`授权成功`),setTimeout(()=>{e(`/authorization`)},1500)}catch(e){let t=e?.message||`授权失败`;u(t),o(!1),n.error(t)}})();let l=setInterval(()=>{i(e=>e>=11?(o(!1),e):e+1)},1e3);return()=>{clearInterval(l)}},[e,t,n]);let d=()=>{i(0),o(!0),c(!1),u(``),window.location.href=`/authorization`};return s?(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`#dcfce7`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:(0,$.jsx)(Q.Text,{style:{fontSize:40,color:`#22c55e`},children:`✓`})}),(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权成功`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`},children:`正在跳转至授权管理页面...`})]})}):(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:a&&r<10?(0,$.jsx)(VK,{size:`large`,tip:`加载中`,style:{color:`#fff`}}):(0,$.jsx)(oH,{style:{fontSize:40,color:`#fff`}})}),l?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权失败`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:l}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(Qq,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):r>=10?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权无响应`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`请重新授权`}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(Qq,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权中,请等待`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`正在等待平台完成授权操作`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8},children:[(0,$.jsx)(oH,{style:{color:`#6366f1`}}),(0,$.jsxs)(Q.Text,{style:{color:`#6366f1`,fontWeight:500,fontSize:16},children:[r,`s`]})]})]})]})})},xae=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fed7aa 100%)`,border:`1px solid rgba(245, 158, 11, 0.18)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(245, 158, 11, 0.3)`},children:(0,$.jsx)(c4,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700,backgroundImage:`linear-gradient(90deg, #f59e0b 0%, #d97706 30%, #ea580c 50%, #d97706 70%, #f59e0b 100%)`},children:`行业爆款大盘`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#b45309`},children:[(0,$.jsx)(C8,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`实时追踪全网热门素材趋势`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#78716c`,fontSize:14,lineHeight:1.7},children:`实时追踪各行业爆款素材,把握创作风向,打造热门内容`})]}),(0,$.jsx)(`div`,{style:{position:`relative`},children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(M5,{style:{marginRight:8,color:`#6366f1`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`爆款素材榜单`}),(0,$.jsx)(`span`,{style:{marginLeft:10,fontSize:12,fontWeight:400,color:`#94a3b8`}})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(2, 1fr)`,gap:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,zIndex:1,inset:0,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:2,color:`#fff`,borderRadius:6},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(b6,{style:{marginRight:6}}),`立即解锁全部`,(0,$.jsx)(q2,{style:{marginLeft:4,fontSize:12}})]})}),[{rank:1,title:`夏日美妆教程:3 步打造奶油肌`,author:`美妆博主·小雅`,views:`128.4w`,likes:`12.6w`,comments:`8,234`,tag:`NO.1`,tagColor:`#f59e0b`},{rank:2,title:`平价穿搭 | 学生党一周不重样`,author:`穿搭达人·Miki`,views:`96.2w`,likes:`9.8w`,comments:`6,128`,tag:`NO.2`,tagColor:`#a78bfa`},{rank:3,title:`探店 vlog | 网红咖啡馆测评`,author:`美食探店·阿伦`,views:`78.5w`,likes:`7.4w`,comments:`4,892`,tag:`NO.3`,tagColor:`#6366f1`},{rank:4,title:`iPhone 16 Pro 一周深度体验`,author:`数码评测·老王`,views:`65.7w`,likes:`6.1w`,comments:`3,847`,tag:`NO.4`,tagColor:`#94a3b8`}].map(e=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{display:`flex`,gap:14,padding:14,borderRadius:14,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:140,height:80,flexShrink:0,borderRadius:10,overflow:`hidden`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(d8,{style:{fontSize:28,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:6,left:6,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:600},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:4,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:8},children:e.author}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,fontSize:12,color:`#64748b`},children:[(0,$.jsxs)(`span`,{children:[(0,$.jsx)(fG,{style:{marginRight:3}}),e.views]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(m6,{style:{marginRight:3}}),e.likes]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(n3,{style:{marginRight:3}}),e.comments]})]})]})]},e.rank))]})]})})]}),Sae=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #fce7f3 100%)`,border:`1px solid rgba(139, 92, 246, 0.12)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(139, 92, 246, 0.3)`},children:(0,$.jsx)(R3,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700},children:`创意素材案例`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#7c3aed`},children:[(0,$.jsx)(d3,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`探索 AI 创作无限可能`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:14,lineHeight:1.7},children:`精选 AI 生成的优秀素材案例,展示 AI 创作的无限潜力与创意灵感`})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(m5,{style:{marginRight:8,color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`精选案例展示`})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(3, 1fr)`,gap:16,marginBottom:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,zIndex:1,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,borderRadius:14,gap:4,color:`#fff`},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(b6,{style:{marginRight:6}}),`解锁全部案例`,(0,$.jsx)(q2,{style:{marginLeft:4,fontSize:12}})]})}),[{title:`美妆直播切片`,tag:`热门`,tagColor:`#ef4444`},{title:`3C 数码测评`,tag:`推荐`,tagColor:`#6366f1`},{title:`美食探店 vlog`,tag:`推荐`,tagColor:`#6366f1`},{title:`服饰穿搭合集`,tag:`热门`,tagColor:`#ef4444`},{title:`家居场景展示`,tag:`推荐`,tagColor:`#6366f1`},{title:`母婴亲子内容`,tag:`热门`,tagColor:`#ef4444`}].map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{position:`relative`,borderRadius:14,overflow:`hidden`,cursor:`pointer`,border:`1px solid #e2e8f0`,background:`#fff`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(d8,{style:{fontSize:36,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,left:10,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:500},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{padding:`10px 14px`,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,color:`#334155`,fontWeight:500,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(fG,{style:{fontSize:13,color:`#94a3b8`}})]})]},t))]})]})]}),{RangePicker:Cae}=pH;function $9(e){if(!e)return`-`;try{return new Date(e).toLocaleString(`zh-CN`,{hour12:!1})}catch{return`-`}}var wae={recharge:{color:`green`,label:`充值`},consume:{color:`red`,label:`消费`},refund:{color:`orange`,label:`退款`},team_internal:{color:`blue`,label:`团队内部`}},Tae=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(!1),i=(0,S.useCallback)(async()=>{r(!0);try{t(await Fre())}catch(e){Z.error(e?.message||`获取团队信息失败`)}finally{r(!1)}},[]);(0,S.useEffect)(()=>{i()},[i]);let[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(1),p=(0,S.useCallback)(async()=>{if(e){u(!0);try{let e=await Ire(d);o(e.items||[]),c(e.total||0)}catch(e){Z.error(e?.message||`加载成员失败`)}finally{u(!1)}}},[e,d]);(0,S.useEffect)(()=>{p()},[p]);let[m,h]=(0,S.useState)({open:!1,member:null}),[g]=$U.useForm(),[_,v]=(0,S.useState)(!1),y=async()=>{if(m.member)try{let e=await g.validateFields(),t=Number(e.amount);if(!t||t<=0||t>9999999){Z.error(`请输入有效的正数积分数量`);return}v(!0),await Lre(m.member.id,t,e.direction||`increase`,e.description),Z.success(e.direction===`decrease`?`积分扣减成功`:`积分增加成功`),h({open:!1,member:null}),g.resetFields(),p(),ce()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`操作失败`)}finally{v(!1)}},[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)(!1),[T,E]=(0,S.useState)(!1),[D]=$U.useForm(),[O,k]=(0,S.useState)(!1),A=(0,S.useCallback)(async()=>{w(!0);try{x(await Rre()||[])}catch(e){Z.error(e?.message||`加载邀请码失败`)}finally{w(!1)}},[]);(0,S.useEffect)(()=>{A()},[A]);let j=async()=>{try{let e=await D.validateFields();k(!0);let t=e.expiresAt?new Date(e.expiresAt).toISOString():null;await zre(e.maxUses||null,t),Z.success(`邀请码已生成`),E(!1),D.resetFields(),A()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`创建失败`)}finally{k(!1)}},M=async e=>{try{await Bre(e),Z.success(`已撤销`),A()}catch(e){Z.error(e?.message||`撤销失败`)}},N=e=>{navigator.clipboard.writeText(e).then(()=>{Z.success(`邀请链接已复制`)}).catch(()=>{Z.warning(`复制失败,请手动复制`)})},[P,F]=(0,S.useState)([]),[I,L]=(0,S.useState)(!1),R=(0,S.useCallback)(async()=>{L(!0);try{F(await Vre()||[])}catch(e){Z.error(e?.message||`加载申请失败`)}finally{L(!1)}},[]);(0,S.useEffect)(()=>{R()},[R]);let z=async(e,t,n)=>{try{await Hre(e,t,n),Z.success(t===`approve`?`已通过`:`已拒绝`),R(),p()}catch(e){Z.error(e?.message||`操作失败`)}},[B,V]=(0,S.useState)([]),[H,U]=(0,S.useState)(0),[W,ee]=(0,S.useState)(null),[te,ne]=(0,S.useState)(!1),[re,G]=(0,S.useState)(1),[ie,K]=(0,S.useState)(``),[ae,q]=(0,S.useState)(``),[oe,se]=(0,S.useState)(null),ce=(0,S.useCallback)(async()=>{ne(!0);try{let e=await Gre({page:re,pageSize:10,phone:ae||void 0,recordType:ie||void 0,startDate:oe?.[0]||void 0,endDate:oe?.[1]||void 0});V(e.items||[]),U(e.total||0),ee(e.summary||null)}catch(e){Z.error(e?.message||`加载积分记录失败`)}finally{ne(!1)}},[re,ie,ae,oe]);(0,S.useEffect)(()=>{ce()},[ce]);let le=()=>{K(``),q(``),se(null),G(1)},ue=()=>{let e=Kre({phone:ae||void 0,recordType:ie||void 0,startDate:oe?.[0]||void 0,endDate:oe?.[1]||void 0}),t=localStorage.getItem(`auth_token`),n=t?{Authorization:`Bearer ${t}`}:{};fetch(e,{headers:n}).then(e=>e.blob()).then(e=>{let t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=`team_credits_${(0,rD.default)().format(`YYYYMMDD_HHmmss`)}.csv`,t.click(),URL.revokeObjectURL(t.href)}).catch(()=>Z.error(`导出失败`))},de=[{title:`用户名`,dataIndex:`username`,width:140,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,width:130,render:e=>e||`-`},{title:`积分`,dataIndex:`credits`,width:100,render:e=>(0,$.jsx)(Q.Text,{style:{color:`#6366f1`},children:(e??0).toFixed(2)})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,$.jsx)(y$,{color:e?`green`:`red`,children:e?`启用`:`禁用`})},{title:`加入时间`,dataIndex:`joinedAt`,width:170,render:e=>$9(e)},{title:`操作`,key:`action`,width:100,render:(e,t)=>(0,$.jsx)(X,{size:`small`,type:`link`,style:{padding:0},onClick:()=>{h({open:!0,member:t}),g.resetFields()},children:`调整积分`})}],fe=[{title:`邀请码`,dataIndex:`code`,width:200,render:e=>(0,$.jsx)(Q.Text,{copyable:!0,style:{fontFamily:`monospace`},children:e})},{title:`邀请链接`,dataIndex:`inviteLink`,ellipsis:!0,render:e=>(0,$.jsxs)(aU,{children:[(0,$.jsx)(Q.Text,{ellipsis:!0,style:{maxWidth:250,fontSize:12},children:e}),(0,$.jsx)(zw,{title:`复制链接`,children:(0,$.jsx)(X,{size:`small`,type:`text`,icon:(0,$.jsx)(w1,{}),onClick:()=>N(e)})})]})},{title:`状态`,dataIndex:`status`,width:80,render:e=>(0,$.jsx)(y$,{color:e===`active`?`green`:`default`,children:e===`active`?`有效`:`已撤销`})},{title:`使用次数`,key:`uses`,width:100,render:(e,t)=>`${t.useCount}${t.maxUses?`/${t.maxUses}`:``}`},{title:`过期时间`,dataIndex:`expiresAt`,width:170,render:e=>e?$9(e):`永不过期`},{title:`操作`,key:`action`,width:80,render:(e,t)=>t.status===`active`?(0,$.jsx)(X,{size:`small`,type:`link`,danger:!0,onClick:()=>M(t.id),children:`撤销`}):null}],pe=[{title:`申请人`,dataIndex:`username`,width:140,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,width:130,render:e=>e||`-`},{title:`申请时间`,dataIndex:`createdAt`,width:170,render:e=>$9(e)},{title:`操作`,key:`action`,width:160,render:(e,t)=>(0,$.jsxs)(aU,{size:4,children:[(0,$.jsx)(X,{size:`small`,type:`link`,style:{color:`#16a34a`,padding:0},onClick:()=>z(t.id,`approve`),children:`通过`}),(0,$.jsx)(X,{size:`small`,type:`link`,danger:!0,style:{padding:0},onClick:()=>{fq.confirm({title:`拒绝申请`,content:(0,$.jsx)($U,{layout:`vertical`,style:{marginTop:12},children:(0,$.jsx)($U.Item,{name:`note`,label:`拒绝原因(可选)`,children:(0,$.jsx)(PG.TextArea,{rows:2,placeholder:`选填`,id:`reject-note-input`})})}),onOk:()=>{let e=document.getElementById(`reject-note-input`)?.value||void 0;z(t.id,`reject`,e)}})},children:`拒绝`})]})}],me=[{title:`用户名`,dataIndex:`username`,width:120,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e||`-`})},{title:`手机号`,dataIndex:`phone`,width:120,render:e=>e||`-`},{title:`类型`,dataIndex:`type`,width:100,render:(e,t)=>{let n=wae[t.type]||{color:`default`,label:t.type||`-`};return(0,$.jsx)(y$,{color:n.color,children:n.label})}},{title:`变动积分`,dataIndex:`amount`,width:110,align:`right`,render:(e,t)=>(0,$.jsxs)(Q.Text,{strong:!0,style:{color:t.amount>=0?`#10b981`:`#ef4444`,fontSize:14},children:[t.amount>=0?`+`:``,(t.amount??0).toFixed(2)]})},{title:`余额`,dataIndex:`balanceAfter`,width:100,align:`right`,render:e=>(e??0).toFixed(2)},{title:`说明`,dataIndex:`description`,ellipsis:!0,minWidth:160,render:e=>e||`-`},{title:`时间`,dataIndex:`createdAt`,width:170,render:e=>$9(e)}],he={borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},ge={padding:`16px`,textAlign:`right`},_e=[{key:`members`,label:(0,$.jsxs)(aU,{children:[(0,$.jsx)(V5,{}),`成员列表`,s>0&&(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`(`,s,`)`]})]}),children:(0,$.jsxs)(`div`,{style:he,children:[(0,$.jsx)(o$,{columns:de,dataSource:a,rowKey:`id`,loading:l,pagination:!1,bordered:!1,scroll:{x:800},locale:{emptyText:(0,$.jsx)(yC,{description:`暂无成员`})}}),s>0&&(0,$.jsx)(`div`,{style:ge,children:(0,$.jsx)(bK,{current:d,pageSize:20,total:s,onChange:e=>f(e),size:`small`})})]})},{key:`credits`,label:(0,$.jsxs)(aU,{children:[(0,$.jsx)(K5,{}),`团队积分变动`]}),children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12,display:`flex`,gap:8,flexWrap:`wrap`,alignItems:`center`},children:[(0,$.jsx)(YC,{value:ie||void 0,onChange:e=>{K(e||``),G(1)},allowClear:!0,placeholder:`交易类型`,style:{width:130},options:[{value:`recharge`,label:`充值`},{value:`consume`,label:`消费`},{value:`team_internal`,label:`团队内部`},{value:`refund`,label:`退款`}]}),(0,$.jsx)(PG,{placeholder:`搜索手机号`,value:ae,onChange:e=>{q(e.target.value),G(1)},style:{width:160},allowClear:!0}),(0,$.jsx)(Cae,{value:oe?[(0,rD.default)(oe[0]),(0,rD.default)(oe[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?se([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):se(null),G(1)}}),(0,$.jsx)(X,{onClick:le,children:`重置`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(L0,{}),onClick:ue,children:`导出 Excel`})]}),(0,$.jsxs)(`div`,{style:{marginBottom:12,padding:`8px 16px`,background:`#f8f9fc`,borderRadius:8,display:`flex`,gap:24,flexWrap:`wrap`,fontSize:13},children:[(0,$.jsxs)(`span`,{children:[`总充值:`,(0,$.jsxs)(`strong`,{style:{color:`#10b981`,fontSize:15},children:[`+`,W?.total_recharge??0]})]}),(0,$.jsxs)(`span`,{children:[`总消费:`,(0,$.jsxs)(`strong`,{style:{color:`#ef4444`,fontSize:15},children:[`-`,W?.total_consume??0]})]})]}),(0,$.jsxs)(`div`,{style:he,children:[(0,$.jsx)(o$,{rowKey:`id`,loading:te,dataSource:B,pagination:!1,bordered:!1,scroll:{x:950},columns:me,locale:{emptyText:(0,$.jsx)(yC,{description:`暂无积分记录`})}}),H>0&&(0,$.jsx)(`div`,{style:ge,children:(0,$.jsx)(bK,{current:re,pageSize:10,total:H,onChange:e=>G(e),size:`small`,showTotal:e=>`共 ${e} 条`})})]})]})},{key:`invitations`,label:(0,$.jsxs)(aU,{children:[(0,$.jsx)(w1,{}),`邀请管理`]}),children:(0,$.jsxs)(`div`,{style:he,children:[(0,$.jsx)(`div`,{style:{padding:16,paddingBottom:0},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(zL,{}),onClick:()=>E(!0),children:`生成邀请码`})}),(0,$.jsx)(o$,{columns:fe,dataSource:b,rowKey:`id`,loading:C,pagination:!1,bordered:!1,scroll:{x:900},locale:{emptyText:(0,$.jsx)(yC,{description:`暂无邀请码`})}})]})},{key:`requests`,label:(0,$.jsxs)(aU,{children:[(0,$.jsx)(X3,{}),`加入申请`,P.length>0&&(0,$.jsx)(y$,{color:`red`,children:P.length})]}),children:(0,$.jsx)(`div`,{style:he,children:(0,$.jsx)(o$,{columns:pe,dataSource:P,rowKey:`id`,loading:I,pagination:!1,bordered:!1,scroll:{x:600},locale:{emptyText:(0,$.jsx)(yC,{description:`暂无待审批申请`})}})})}];return(0,$.jsxs)(`div`,{style:{padding:24},children:[(0,$.jsx)(`div`,{style:{marginBottom:24},children:n?(0,$.jsx)(Q.Text,{type:`secondary`,children:`加载中...`}):e?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexWrap:`wrap`,gap:12},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:e.name}),(0,$.jsxs)(Q.Text,{type:`secondary`,children:[`代码: `,e.code||`-`,` 成员: `,e.memberCount,` 人`]})]}),(0,$.jsx)(X,{icon:(0,$.jsx)(Qq,{}),onClick:()=>{i(),p(),A(),R(),ce()},children:`刷新`})]}):(0,$.jsx)(Q.Text,{type:`secondary`,children:`无法获取团队信息`})}),(0,$.jsx)(cR,{items:_e,defaultActiveKey:`members`,size:`large`}),(0,$.jsx)(fq,{title:(0,$.jsxs)(aU,{children:[(0,$.jsx)(V5,{}),`调整成员积分 - `,m.member?.username]}),open:m.open,confirmLoading:_,onOk:y,onCancel:()=>h({open:!1,member:null}),okText:`确认`,width:480,okButtonProps:{disabled:!g.getFieldValue(`amount`)||g.getFieldValue(`amount`)<=0||g.getFieldValue(`amount`)>9999999},children:(0,$.jsxs)($U,{form:g,layout:`vertical`,style:{marginTop:16},initialValues:{direction:`increase`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:`10px 16px`,background:`#f0f4ff`,borderRadius:8,display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{type:`secondary`,children:`我的当前积分`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:20,color:`#6366f1`},children:Z7.getState().user?.credits?.toFixed(2)??`0.00`})]}),(0,$.jsx)($U.Item,{name:`direction`,label:`操作类型`,rules:[{required:!0,message:`请选择操作类型`}],children:(0,$.jsxs)(pL.Group,{buttonStyle:`solid`,size:`large`,style:{width:`100%`},children:[(0,$.jsx)(pL.Button,{value:`increase`,style:{width:`50%`,textAlign:`center`},children:`增加成员积分`}),(0,$.jsx)(pL.Button,{value:`decrease`,style:{width:`50%`,textAlign:`center`},children:`扣减成员积分`})]})}),(0,$.jsx)($U.Item,{name:`amount`,label:`积分数量`,required:!0,rules:[{required:!0,message:`请输入积分数量`},{type:`number`,min:.01,message:`必须大于 0`},{type:`number`,max:9999999,message:`单次不能超过 9999999`}],validateTrigger:[`onChange`,`onBlur`],children:(0,$.jsx)(qB,{style:{width:`100%`},step:1,min:.01,max:9999999,precision:2,placeholder:`请输入正数积分数量`,size:`large`,formatter:e=>{if(!e)return``;let t=`${e}`.replace(/[^0-9.]/g,``);return t=t.replace(/^0+(?=\d)/,``),t},parser:e=>{if(!e||e===`.`)return``;let t=parseFloat(e);return isNaN(t)||t<=0?``:Math.min(t,9999999)},onKeyDown:e=>{(e.key===`-`||e.key===`e`||e.key===`E`)&&e.preventDefault()},onChange:e=>{e??g.validateFields([`amount`])}})}),(0,$.jsx)($U.Item,{name:`description`,label:`备注`,children:(0,$.jsx)(PG.TextArea,{rows:2,maxLength:256,placeholder:`选填,例如:活动奖励`})})]})}),(0,$.jsx)(fq,{title:(0,$.jsxs)(aU,{children:[(0,$.jsx)(w1,{}),`生成邀请码`]}),open:T,confirmLoading:O,onOk:j,onCancel:()=>{E(!1),D.resetFields()},okText:`生成`,width:480,children:(0,$.jsxs)($U,{form:D,layout:`vertical`,style:{marginTop:16},children:[(0,$.jsx)($U.Item,{name:`maxUses`,label:`最大使用次数`,children:(0,$.jsx)(qB,{style:{width:`100%`},min:1,placeholder:`留空表示不限`,size:`large`})}),(0,$.jsx)($U.Item,{name:`expiresAt`,label:`过期时间`,children:(0,$.jsx)(PG,{type:`datetime-local`,style:{width:`100%`},placeholder:`留空表示永不过期`,size:`large`})})]})})]})},Eae=()=>{let[e]=On(),t=Ye(),n=e.get(`code`)||``,[r,i]=(0,S.useState)(!0),[a,o]=(0,S.useState)(null),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1);return(0,S.useEffect)(()=>{if(!n){i(!1);return}Ure(n).then(e=>o(e)).catch(()=>o(null)).finally(()=>i(!1))},[n]),r?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:`60vh`},children:(0,$.jsx)(VK,{size:`large`})}):l?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(_J,{status:`success`,icon:(0,$.jsx)(F4,{style:{color:`#6366f1`}}),title:`申请已提交`,subTitle:`您的加入申请已提交,请等待团队管理人审批。审批通过后将自动加入团队。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):!n||!a?.valid?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(_J,{status:`error`,title:`邀请链接无效`,subTitle:`该邀请链接可能已过期或不存在,请联系团队管理人重新获取。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):a.alreadyInTeam?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(_J,{status:`info`,title:`您已在此团队中`,subTitle:`您已经是「${a.teamName}」的成员了,无需再次加入。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsxs)(SR,{variant:`outlined`,style:{borderRadius:16,maxWidth:480,width:`100%`,textAlign:`center`},children:[(0,$.jsx)(C5,{style:{fontSize:48,color:`#6366f1`,marginBottom:16}}),(0,$.jsx)(Q.Title,{level:3,children:`加入团队`}),(0,$.jsx)(Q.Text,{style:{fontSize:16,color:`#475569`,display:`block`,marginBottom:8},children:`您被邀请加入团队`}),(0,$.jsxs)(Q.Title,{level:4,style:{color:`#6366f1`,margin:`16px 0 24px`},children:[`「`,a.teamName,`」`]}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{display:`block`,marginBottom:24},children:`加入后团队管理人可以为您分配积分、查看您的积分使用情况。`}),(0,$.jsx)(X,{type:`primary`,size:`large`,block:!0,loading:s,onClick:async()=>{n&&fq.confirm({title:`确认加入团队`,icon:(0,$.jsx)(C5,{style:{color:`#6366f1`}}),content:a?.teamName?`您确定要加入团队「${a.teamName}」吗?提交后需等待团队管理人审批。`:`您确定要加入该团队吗?`,okText:`确认加入`,cancelText:`取消`,onOk:async()=>{try{c(!0),await Wre(n),u(!0)}catch(e){Z.error(e?.message||`申请失败`)}finally{c(!1)}}})},children:`申请加入`})]})})};rD.default.locale(`zh-cn`);var Dae=({children:e})=>{let{user:t,loading:n,checkAuth:r}=Z7();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,$.jsx)(VK,{size:`large`})}):t?(0,$.jsx)($.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,$.jsx)(()=>{let{checkAuth:e}=Z7();return(0,S.useEffect)(()=>{e()},[]),(0,$.jsx)(Fm,{locale:n2.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8,fontFamily:`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif`},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,$.jsx)(ux,{children:(0,$.jsx)(_n,{children:(0,$.jsxs)(Dt,{children:[(0,$.jsx)(Tt,{path:`/login`,element:(0,$.jsx)(Zre,{})}),(0,$.jsxs)(Tt,{path:`/`,element:(0,$.jsx)(Dae,{children:(0,$.jsx)(Yre,{})}),children:[(0,$.jsx)(Tt,{index:!0,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})}),(0,$.jsx)(Tt,{path:`projects`,element:(0,$.jsx)($re,{})}),(0,$.jsx)(Tt,{path:`projects/:projectId/generate`,element:(0,$.jsx)(tie,{})}),(0,$.jsx)(Tt,{path:`records`,element:(0,$.jsx)(nie,{})}),(0,$.jsx)(Tt,{path:`credits`,element:(0,$.jsx)(rie,{})}),(0,$.jsx)(Tt,{path:`credit-records`,element:(0,$.jsx)(u9,{})}),(0,$.jsx)(Tt,{path:`order-records`,element:(0,$.jsx)(u9,{})}),(0,$.jsx)(Tt,{path:`user-center`,element:(0,$.jsx)(u9,{})}),(0,$.jsx)(Tt,{path:`messages`,element:(0,$.jsx)(oie,{})}),(0,$.jsx)(Tt,{path:`home`,element:(0,$.jsx)(_ae,{})}),(0,$.jsx)(Tt,{path:`conversation`,element:(0,$.jsx)(Cie,{})}),(0,$.jsx)(Tt,{path:`initial`,element:(0,$.jsx)(Die,{})}),(0,$.jsx)(Tt,{path:`initial/:creatID/initialinfo`,element:(0,$.jsx)(Nie,{})}),(0,$.jsx)(Tt,{path:`removelens`,element:(0,$.jsx)(Pie,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removeinfo`,element:(0,$.jsx)(lae,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removefenbu`,element:(0,$.jsx)(Z9,{})}),(0,$.jsx)(Tt,{path:`generated`,element:(0,$.jsx)(zie,{})}),(0,$.jsx)(Tt,{path:`pretest`,element:(0,$.jsx)(Vie,{})}),(0,$.jsx)(Tt,{path:`authorization`,element:(0,$.jsx)(Uie,{})}),(0,$.jsx)(Tt,{path:`authoriza-waiting`,element:(0,$.jsx)(bae,{})}),(0,$.jsx)(Tt,{path:`materials`,element:(0,$.jsx)(Zie,{})}),(0,$.jsx)(Tt,{path:`consume`,element:(0,$.jsx)(yae,{})}),(0,$.jsx)(Tt,{path:`popular`,element:(0,$.jsx)(xae,{})}),(0,$.jsx)(Tt,{path:`authacc`,element:(0,$.jsx)(Gie,{})}),(0,$.jsx)(Tt,{path:`creativeplaza`,element:(0,$.jsx)(Sae,{})}),(0,$.jsx)(Tt,{path:`team-management`,element:(0,$.jsx)(Tae,{})}),(0,$.jsx)(Tt,{path:`join-team`,element:(0,$.jsx)(Eae,{})})]}),(0,$.jsx)(Tt,{path:`*`,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})})]})})})})},{})); \ No newline at end of file + `}),(0,$.jsx)(`div`,{style:{margin:`auto`,display:`flex`,flexDirection:`column`,width:y.length>0?`${y.length*80+Math.max(0,y.length-1)*1}px`:`100%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,height:86,borderRadius:12,background:`#fff`,gap:1,position:`relative`},children:[x&&y.length===0?(0,$.jsxs)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(VK,{size:`small`}),(0,$.jsx)(Qie,{style:{marginLeft:8,color:`#64748b`},children:`正在抽取每秒帧...`})]}):y.length>0?y.map(e=>{let t=e.second>=_[0]&&e.second<_[1];return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>I(e.second),title:`${e.second}s${e.fallback?`,实际取帧 ${e.captureSecond?.toFixed(1)}s`:``}`,style:{minWidth:80,flex:`0 0 80px`,height:86,borderTop:t?`5px solid #6366f1`:`none`,borderBottom:t?`5px solid #6366f1`:`none`,padding:0,background:`transparent`,overflow:`hidden`,cursor:A?`not-allowed`:`pointer`,position:`relative`},children:[e.status===`success`&&e.image?(0,$.jsx)(`img`,{src:e.image,alt:`${e.second}s`,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):e.status===`loading`?(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(VK,{size:`small`})}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,color:`#64748b`,fontSize:12,background:`#fff`},children:[(0,$.jsxs)(`span`,{children:[e.second,`s`]}),(0,$.jsx)(`span`,{style:{fontSize:11},children:`无有效帧`})]}),(0,$.jsxs)(`span`,{style:{position:`absolute`,left:0,bottom:3,color:`#ffffffff`,fontSize:16,textShadow:`0 1px 3px rgba(0,0,0,.7)`},children:[e.second,`s`]})]},e.second)}):(0,$.jsx)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#64748b`},children:`暂无帧预览,请确认视频是否加载完成`}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:-10,left:0,right:0,bottom:0},children:(0,$.jsx)(LV,{range:!0,min:0,max:O||a,step:1,value:_,onChange:P,onChangeComplete:F,tooltip:{formatter:e=>`${H9(Number(e||0))}s`},disabled:!O||A,styles:{track:{background:`#6969dd63`,height:86,borderRadius:12,margin:`0 `},rail:{height:86,borderRadius:12},handle:{width:20,height:86,marginTop:0,borderRadius:`50%`}}})})]})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`,color:`#64748b`,fontSize:14},children:[`已选取 `,k,`s`]}),E&&(0,$.jsx)(`div`,{style:{marginTop:12,padding:`10px 14px`,borderRadius:8,background:`rgba(239, 68, 68, 0.08)`,border:`1px solid rgba(239, 68, 68, 0.15)`,color:`#ef4444`,fontSize:13,textAlign:`center`},children:E})]})]})})},{TextArea:sae}=PG,cae=`http://ceshi.apiforeign.minzhong.cn`,q9=2,J9=15;function Y9(e){return e?/^https?:\/\//i.test(e)?e:`${cae}${e}`:``}function lae(){let{creatID:e}=$e(),t=Ye(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(null),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),m=(0,S.useRef)(null),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)([]),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(!1),[A,j]=(0,S.useState)(!1),M=(0,S.useRef)(null),N=(0,S.useRef)(null),P=(0,S.useMemo)(()=>Y9(x?.videoUrl),[x?.videoUrl]),F=(0,S.useMemo)(()=>w.length===0?`AI自动拆分`:w.some(e=>e.sourceMode===`ai_suggestion`)?`AI重拆`:`AI自动拆分`,[w]),I=(0,S.useCallback)(async()=>{if(e)try{C(await z7(e))}catch{Z.error(`获取任务详情失败`)}},[e]),L=(0,S.useCallback)(async()=>{if(e)try{let t=(await B7(e)).items||[];T(t),t.some(e=>e.moduleProjectCurrentStepCode!==`video_generate`&&e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?M.current||=window.setInterval(async()=>{try{let t=(await B7(e)).items||[];T(e=>e.map(e=>{let n=t.find(t=>t.id===e.id);return n&&(e.moduleProjectCurrentStepCode!==`video_generate`||e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?n:e})),t.every(e=>e.moduleProjectCurrentStepCode===`video_generate`||e.moduleProjectStatus===`completed`||e.moduleProjectStatus===`failed`)&&(M.current&&=(clearInterval(M.current),null))}catch{}},3e4):M.current&&=(clearInterval(M.current),null)}catch{Z.error(`获取拆镜列表失败`)}},[e]),R=(0,S.useCallback)(async()=>{await Promise.all([I(),L()])},[I,L]);(0,S.useEffect)(()=>(R(),()=>{M.current&&=(clearInterval(M.current),null),N.current&&=(clearInterval(N.current),null)}),[R]),(0,S.useEffect)(()=>{if(x)return x.analysisStatus===`processing`?N.current=window.setInterval(async()=>{try{C(await z7(e))}catch{}},3e3):N.current&&=(clearInterval(N.current),null),()=>{N.current&&=(clearInterval(N.current),null)}},[x?.analysisStatus,e]);let z=(e,t)=>{s(e),l(t),r(!0)},B=()=>{r(!1),s(null),g(``),l(``),v(``),b(``)},V=e=>{e.fileList.length===0&&b(``)},H=async e=>{try{b((await m7(e)).url),Z.success(`图片上传成功`)}catch{Z.error(`图片上传失败,请重试`)}return!1},U=async()=>{if(!o){Z.warning(`请先选择拆镜片段`);return}if(!y){Z.warning(`请上传产品图`);return}if(!h.trim()){Z.warning(`请输入产品名称`);return}if(!_.trim()){Z.warning(`请输入产品卖点`);return}let n={target_project_name:h.trim(),core_content_point:_.trim(),material_image_url:Y9(y),idempotency_key:`replication_${Date.now()}`};D(!0);try{await ure(o,n),Z.success(`视频生成任务创建成功`),B(),B7(e).then(e=>{let n=e.items.find(e=>e.id===o);Z.loading(`创建中...`,3),setTimeout(()=>{t(`/removelens/${n.moduleProjectId}/removefenbu`)},3e3)})}catch(e){Z.error(e?.message||`创建失败,请重试`)}finally{D(!1)}},W=async()=>{if(e){j(!0);try{let t=w.some(e=>e.sourceMode===`ai_suggestion`);await cre(e,{selected_indices:[],replace_existing:t}),Z.success(t?`AI 重拆任务已提交`:`AI 拆镜任务已提交`),await R()}catch(e){Z.error(e?.message||`拆镜失败`)}finally{j(!1)}}},ee=()=>{if(!P){Z.warning(`原视频地址不存在`);return}a(!0)},te=async t=>{if(e){if(t.durationSecondJ9){Z.warning(`拆镜片段不能超过 ${J9} 秒`);return}k(!0);try{await lre(e,{start_second:t.startSecond,end_second:t.endSecond}),Z.success(`手动拆镜任务已提交`),a(!1),await R()}catch(e){Z.error(e?.message||`手动拆镜失败`)}finally{k(!1)}}},ne=e=>e?.splitStatus===`completed`&&!!e?.segmentVideoUrl;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,display:`flex`,flexDirection:`column`,overflow:`hidden`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{padding:`16px 24px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(W2,{}),onClick:()=>t(-1),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{style:{fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,margin:0},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`一键拆解画面分镜,助力仿拍或创作`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})}),x?(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,overflow:`hidden`,padding:`0 32px 32px`},children:[(0,$.jsxs)(`div`,{style:{flex:1,background:`linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.6) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,display:`flex`,alignItems:`center`,gap:30,padding:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`relative`,width:280,height:160,borderRadius:12,overflow:`hidden`,flexShrink:0,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`},children:(0,$.jsx)(`video`,{controls:!0,src:P,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,position:`relative`,zIndex:1},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`h2`,{style:{fontSize:20,fontWeight:600,marginBottom:16,background:`linear-gradient(135deg, #1e293b 0%, #334155 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频总结`}),(0,$.jsx)(`div`,{style:{textAlign:`right`},children:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`上传时间: `,x.createdAt?new Date(x.createdAt).toLocaleString(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}):`-`]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`产品名称:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500},children:x.title})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`受众群体:`}),x.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(VK,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):x.analysisStatus===`completed`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:(x.originalVideoAudience?.split(`、`)||[]).map((e,t)=>(0,$.jsx)(y$,{style:{fontSize:12,background:`rgba(99, 102, 241, 0.1)`,color:`#6366f1`,border:`none`,borderRadius:20},children:e},t))}):null]}),(0,$.jsxs)(`div`,{style:{display:`flex`},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`视频内容:`}),x.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(VK,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):x.analysisStatus===`completed`?(0,$.jsx)(`span`,{style:{color:`#475569`,lineHeight:1.6,height:100,overflowY:`auto`},children:x.originalVideoContent}):null]})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:20,marginTop:20},children:[(0,$.jsx)(X,{type:`default`,onClick:ee,disabled:!P||O,style:{flex:1,height:52,borderRadius:12,border:`2px solid rgba(99, 102, 241, 0.3)`,color:`#6366f1`,fontWeight:600,fontSize:15,background:`rgba(255, 255, 255, 0.9)`,backdropFilter:`blur(10px)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.boxShadow=`none`},children:`手动`}),(0,$.jsx)(gq,{title:F===`AI重拆`?`确定要AI重拆吗?`:`确定要AI拆分吗?`,okText:`确定`,cancelText:`取消`,onConfirm:W,children:(0,$.jsxs)(X,{type:`primary`,loading:A,disabled:A,style:{flex:1,height:52,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.3)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,position:`relative`,overflow:`hidden`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 25px rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.3)`},children:[(0,$.jsx)(`span`,{style:{position:`relative`,zIndex:1},children:F}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:`-100%`,width:`100%`,height:`100%`,background:`linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent)`,transition:`left 0.5s ease`},onMouseEnter:e=>{e.currentTarget.style.left=`100%`}}),x?.aiSuggestions&&x.aiSuggestions.length>0&&(0,$.jsx)(zw,{title:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontWeight:600,marginBottom:8,color:`#6366f1`},children:`AI拆分方案`}),(x?.ai_suggestions||x?.aiSuggestions||[]).map(e=>(0,$.jsxs)(`div`,{style:{marginBottom:8,fontSize:13,lineHeight:1.5},children:[(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#6366f1`},children:[e.index,`.`]}),(0,$.jsx)(`span`,{style:{marginLeft:4,color:`#000000ff`},children:e.timeNode}),(0,$.jsx)(`br`,{}),(0,$.jsx)(`span`,{style:{color:`#666`},children:e.content})]},e.index))]}),placement:`top`,trigger:`hover`,overlayInnerStyle:{backgroundColor:`#fff`,height:300,overflowY:`auto`,border:`1px solid rgba(99, 102, 241, 0.1)`,borderRadius:12,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.12)`},children:(0,$.jsx)(`span`,{style:{marginLeft:8,fontSize:13,opacity:.9},children:`(AI 镜头拆分方案)`})})]})})]}),(0,$.jsxs)(`div`,{style:{flex:2,background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,display:`flex`,flexDirection:`column`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,background:`linear-gradient(135deg, rgba(99,102,241,0.02) 0%, transparent 100%)`},children:[(0,$.jsx)(`h3`,{style:{fontSize:16,fontWeight:600,color:`#1e293b`,margin:0},children:`拆镜片段列表`}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#64748b`,marginLeft:12},children:[`共 `,w.length,` 个片段`]})]}),(0,$.jsx)(o$,{columns:[{title:`片段`,width:100,fixed:`left`,align:`center`,render:(e,t)=>(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#333`},children:t.segmentName||`片段${t.segmentIndex||``}`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#999`},children:t.timeNode}),t.sourceMode===`custom`&&(0,$.jsx)(y$,{color:`blue`,style:{marginTop:6},children:`手动`}),t.sourceMode===`ai_suggestion`&&(0,$.jsx)(y$,{color:`orange`,style:{marginTop:6},children:`自动`})]})},{title:`片段视频`,width:150,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{position:`relative`,width:120,height:80,borderRadius:6,overflow:`hidden`,background:`#f1f5f9`,cursor:`pointer`},onClick:()=>{t.segmentVideoUrl&&(d(Y9(t.segmentVideoUrl)),p(!0))},children:t.segmentVideoUrl?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:Y9(t.segmentVideoUrl),style:{width:`100%`,height:`100%`,objectFit:`cover`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.3)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:`50%`,background:`rgba(255,255,255,0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:0,height:0,borderTop:`8px solid transparent`,borderBottom:`8px solid transparent`,borderLeft:`14px solid #6366f1`,marginLeft:2}})})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:12},children:t.splitStatus===`failed`?`切割失败`:`切割中`})})},{title:`视频内容`,width:500,align:`left`,render:(e,t)=>{if(t.source_mode===`ai_suggestion`||t.sourceMode===`ai_suggestion`)return(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:t.segmentContent||t.lastError||`-`});let n=t.analysis_status||t.analysisStatus,r={not_required:`无需单独分析`,pending:`等待分析`,processing:`分析中`,failed:`分析失败`};return n===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(VK,{size:`small`}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):n===`failed`?(0,$.jsx)(`div`,{style:{fontSize:14,color:`#ef4444`,lineHeight:1.6},children:`分析失败`}):(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:n&&r[n]?r[n]:t.segmentContent||t.lastError||`-`})}},{title:`视频类型`,width:120,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,fontWeight:500},children:t.segmentCategory||`-`})},{title:`状态`,width:120,align:`center`,dataIndex:`moduleProjectStatus`,render:(e,t)=>{let n=e,r=t.moduleProjectCurrentStepCode||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return n||`-`}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return t.moduleProjectId?{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}:{text:`待生成任务`,color:`#94a3b8`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`操作`,width:140,fixed:`right`,align:`center`,render:(e,n)=>(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:8},children:n.moduleProjectId?(0,$.jsx)(X,{type:`text`,onClick:()=>t(`/removelens/${n.moduleProjectId}/removefenbu`),style:{color:`#10b981`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`详情任务`}):(0,$.jsx)(X,{type:`text`,onClick:()=>z(String(n.id),n.segmentName),disabled:!ne(n),style:{color:ne(n)?`#f59e0b`:`#94a3b8`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:ne(n)?`视频生成`:`待切割完成`})})}],dataSource:w,pagination:!1,bordered:!1,rowKey:`id`,scroll:{y:300},style:{flex:1},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`,height:80,overflow:`auto`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(255, 255, 255, 1)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})]})]}):(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{fontSize:16,color:`#999`},children:`加载中...`})})]}),(0,$.jsx)(oae,{open:i,videoUrl:P,title:`手动视频切片`,loading:O,minDuration:q9,maxDuration:J9,onCancel:()=>a(!1),onConfirm:te}),(0,$.jsx)(XH,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:18,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`智能视频复刻`}),c&&(0,$.jsxs)(`span`,{style:{fontSize:14,color:`#64748b`},children:[`- `,c]})]}),(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(Z5,{}),onClick:B,style:{padding:0,color:`#64748b`,fontSize:14}})]}),placement:`right`,closable:!1,onClose:B,open:n,size:480,styles:{body:{padding:`24px`,background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`},section:{borderRadius:`20px 0 0 20px`,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:[(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品白底图 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(U0,{listType:`picture-card`,onChange:V,beforeUpload:H,maxCount:1,accept:`image/*`,style:{width:120,height:120,borderRadius:8,border:`2px dashed rgba(99, 102, 241, 0.3)`,background:`rgba(99, 102, 241, 0.02)`},children:!y&&(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:6},children:[(0,$.jsx)(zL,{style:{fontSize:20,color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`上传产品图`})]})})})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品名称 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(PG,{value:h,onChange:e=>g(e.target.value),placeholder:`请输入产品名称`,style:{height:44,borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:10,showCount:!0})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品卖点 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(sae,{value:_,onChange:e=>v(e.target.value),placeholder:`请输入产品卖点`,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:100,showCount:!0,rows:3})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,marginTop:8},children:(0,$.jsx)(X,{type:`primary`,onClick:U,loading:E,disabled:E,style:{flex:1,height:48,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 15px rgba(99, 102, 241, 0.3)`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.4)`,e.currentTarget.style.transform=`translateY(-1px)`},onMouseLeave:e=>{e.currentTarget.style.boxShadow=`0 4px 15px rgba(99, 102, 241, 0.3)`,e.currentTarget.style.transform=`translateY(0)`},children:E?`生成中...`:`手动生成`})})]})}),(0,$.jsx)(fq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频预览`})]}),open:f,onCancel:()=>p(!1),afterClose:()=>{m.current&&(m.current.pause(),m.current.currentTime=0)},footer:null,width:640,centered:!0,styles:{body:{padding:24},header:{borderBottom:`1px solid #e0e0e0`,padding:`20px 24px`}},children:(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`},children:(0,$.jsx)(`video`,{ref:m,controls:!0,src:u||``,style:{width:`100%`,maxHeight:420,objectFit:`contain`,backgroundColor:`#000`},playsInline:!0,"webkit-playsinline":!0,autoPlay:!0})})})]})}var{Title:uae,Text:X9}=Q,{TextArea:dae}=PG;function fae(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function Z9(){let e=Ye(),{creatID:t}=$e(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(`image`),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(null),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(5),[N,P]=(0,S.useState)(`16:9`),[F,I]=(0,S.useState)(`480p`),[L,R]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[z,B]=(0,S.useState)([]),[V,H]=(0,S.useState)(1),[U,W]=(0,S.useState)(20),[ee,te]=(0,S.useState)(0),[ne,re]=(0,S.useState)(``),[G,ie]=(0,S.useState)({}),[K,ae]=(0,S.useState)([]),[q,oe]=(0,S.useState)([]),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(``),[de,fe]=(0,S.useState)(`image`),pe=S.useRef(null);(0,S.useEffect)(()=>{if(se&&de===`video`){let e=()=>{pe.current&&pe.current.play().catch(()=>{})};pe.current&&(pe.current.readyState>=2?e():pe.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),pe.current&&(pe.current.removeEventListener(`loadedmetadata`,e),pe.current.pause())}}else pe.current&&pe.current.pause()},[se,de]);let me=[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}].map((e,t)=>({...e,status:K[t]?.status||``,id:K[t]?.id||t,output:K[t]?.output||``,engineId:K[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=me.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=me.length-1;t>=0;t--)if(me[t].status===`completed`||me[t].status===`failed`){e.add(String(me[t].childId));break}e.size>0?oe(Array.from(e)):oe([])},[K]);let he=(e,t,n)=>{R7(e,t,n).then(e=>{e.items&&B(e.items),e.total!==void 0&&te(e.total)}).catch(e=>{})},ge=(e,t)=>{H(e),W(t),he(e,t,ne)},_e=()=>{he(1,20,ne)};(0,S.useEffect)(()=>{he(V,U,ne)},[]),(0,S.useEffect)(()=>{E7().then(e=>{if(x(e.engine||{}),e.engine?.video&&e.engine.video.length>0){w(e.engine.video[0].id);let t=e.engine.video[0];R({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]})}e.engine?.image&&e.engine.image.length>0&&E(e.engine.image[0].id)}).catch(e=>{})},[]),(0,S.useEffect)(()=>()=>{m&&(clearInterval(m),h(null))},[m]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(O(!1),A(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&V7(t).then(e=>{ie(e),e.steps&&ae(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=me[4];e&&e.status!==`completed`&&e.status!==`failed`?m||h(setInterval(be,3e4)):e&&m&&(clearInterval(m),h(null))},[me]);let ve=(e,t,n,i)=>{l(t||`image`),_(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?fae(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},ye=async()=>{if(c===`image`){if(!G?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}y(!0);try{await fre(G.id,g,{prompt:i.trim()}),Z.success(`图片提示词已保存`),xe(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{y(!1)}return}if(!G?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!u||typeof u!=`object`||Object.keys(u).length===0){Z.warning(`视频提示词不能为空`);return}if(!f){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=w9(u,f);if(e){Z.warning(e);return}y(!0);try{await pre(G.id,g,{prompt_schema:u}),Z.success(`视频提示词已保存`),xe(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{y(!1)}},be=()=>{t&&V7(t).then(e=>{ie(e),e.steps&&ae(e.steps)}).catch(e=>{})},xe=()=>{t&&V7(t).then(e=>{ie(e),e.steps&&ae(e.steps)}).catch(e=>{})},Se=(e,t)=>{ue(e),fe(t),ce(!0)},Ce=()=>{ce(!1),ue(``),pe.current&&pe.current.pause()},we=e=>{if(e.preventDefault(),e.stopPropagation(),!le)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${le}&download=1`,t.download=de===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},Te=e=>{dre(G.id,e.toString()).then(e=>{Z.info(`正在生成图片提示词,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ee=e=>{let t={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};H7(G.id,e.toString(),t).then(e=>{Z.info(`正在生成图片,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},De=()=>{let e={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};H7(G.id,me[1].id.toString(),e).then(e=>{Z.info(`正在生成图片,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Oe=e=>{let t={engine_id:C,duration:j,aspect_ratio:N,resolution:F,target_platform:`抖音`};mre(G.id,e.toString(),t).then(e=>{Z.info(`正在生成视频提示词,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},ke=(e,t)=>{U7(G.id,e.toString(),{engine_id:``}).then(e=>{Z.info(`正在生成视频,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ae=()=>{U7(G.id,me[3].id.toString(),{engine_id:``}).then(e=>{xe()}).catch(e=>{})};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsxs)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(W2,{}),onClick:()=>window.history.back(),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`拆镜复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(X,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>s(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:G?.material?.materialVideoUrl?`pointer`:`default`},onClick:()=>G?.material?.materialVideoUrl&&Se(G.material.materialVideoUrl,`video`),children:G?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.material.materialVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:G?.material?.materialImageUrl?`pointer`:`default`},onClick:()=>G?.material?.materialImageUrl&&Se(G.material.materialImageUrl,`image`),children:G?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:G.material.materialImageUrl,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),G?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`},onClick:()=>Se(G.finalImageUrl,`image`),children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),G?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`},onClick:()=>Se(G.finalVideoUrl,`video`),children:(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(t_,{activeKey:q,onChange:oe,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:me.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(F4,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(X9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:G?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.material.materialVideoUrl}`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(X9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:G?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:G.material.materialImageUrl,alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]}),(0,$.jsx)(X,{onClick:()=>{Te(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片提示词`})]})}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(X9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(aU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(t1,{}),onClick:()=>ve(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(X,{onClick:()=>{Ee(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[G.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(t1,{}),onClick:()=>De(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{O(!D),A(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(W8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(X9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),D&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(X9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:b.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{w(e.id),R({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(N)||P(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(F)||I(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(j)||M(e.supportedDurations?.[0]||5),O(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:C===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:C===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:C===e.id?600:500,color:C===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{A(!k),O(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(d6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(X9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[N,` · `,j,`s · `,F]})]}),k&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(X9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:L.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>P(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${N===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:N===e?`#6366f1`:`#6b7280`,fontWeight:N===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(X9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(j-Math.min(...L.durations))/(Math.max(...L.durations)-Math.min(...L.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...L.durations),max:Math.max(...L.durations),value:j,onChange:e=>M(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:j}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(X9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:L.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>I(e),style:{flex:1,height:42,borderRadius:6,border:F===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:F===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:F===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(X,{type:`primary`,style:{width:`100%`,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},onClick:()=>{Oe(e.id)},disabled:e.status!==`completed`,children:`下一步:生成视频提示词`})]}),e.childId===4&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(X9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(aU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(t1,{}),onClick:()=>ve(G?.videoGeneration?.promptSchema,`video`,e.id,G?.videoGeneration?.schemaConfigSnapshot),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!G?.videoGeneration?.promptSchema||!G?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(X,{onClick:()=>{ke(e.id,e.engineId)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成视频`})]})]}),e.childId===5&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,position:`relative`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:e.status===`completed`&&G?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalVideoUrl}`,style:{width:`100%`,height:180,objectFit:`cover`},controls:!0}):e.status===`processing`?(0,$.jsxs)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:20,height:20,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}),(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14},children:`视频生成中...`})]}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#ef4444`,fontSize:14},children:`视频生成失败`}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无视频`})}),(0,$.jsxs)(aU,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(X,{onClick:()=>Ae(),type:`default`,icon:(0,$.jsx)(t1,{}),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`重新生成`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(L0,{}),style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,onClick:()=>{let e=`http://ceshi.apiforeign.minzhong.cn${G?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})]}),(0,$.jsx)(fq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:c===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:n,onCancel:()=>{v||r(!1)},footer:[(0,$.jsx)(X,{onClick:()=>r(!1),disabled:v,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:ye,loading:v,disabled:v,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:800,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:c===`image`?(0,$.jsx)(dae,{value:i,onChange:e=>a(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:500,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(j9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(fq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`创作记录`})]}),open:o,onCancel:()=>s(!1),width:800,footer:null,styles:{body:{background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16,gap:8},children:[(0,$.jsx)(PG,{placeholder:`搜索产品名称`,value:ne,onChange:e=>re(e.target.value),onPressEnter:_e,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(X,{type:`primary`,onClick:_e,style:{borderRadius:10,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(o$,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:t=>(0,$.jsx)(X,{type:`text`,onClick:()=>e(`/removelens/${t.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`})}],dataSource:z,rowKey:`id`,pagination:{current:V,pageSize:U,total:ee,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:ge,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:350},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})]}),(0,$.jsx)(fq,{open:se,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:Ce,width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(L0,{}),onClick:we,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:de===`image`?(0,$.jsx)(`img`,{src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:pe,src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})})]})}var pae=`/assets/homebtn1-DjQgGq1F.png`,mae=`/assets/homebtn2-BNQvBUFh.png`,hae=`/assets/homebtn3-CaXf7CQb.png`;function gae(e){if(!e)return`-`;let t=String(e).trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``);let[r=``,i=``]=t.split(`T`),[,a=``,o=``]=r.split(`-`),s=i.slice(0,5);return!a||!o?`-`:`${a}-${o} ${s}`}var _ae=()=>{let e=Ye(),[t,n]=(0,S.useState)(`project`),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)([]),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(null),h=(0,S.useRef)(null);(0,S.useEffect)(()=>{Ere().then(e=>{if(e?.items?.length>0){c(e.items);let t=e.items[0].id;u(t),J7(t).then(e=>{console.log(`caseButton:`,e),e?.categories?.[0]?.assets&&f(e.categories[0].assets)})}})},[]),(0,S.useEffect)(()=>{(async()=>{try{xre(5).then(e=>{for(let t in e)e[t].forEach(e=>{e.type=t,o(t=>[...t,e])});o(e=>e)})}catch{}})()},[]);let g=e=>{n(e)},_=[{icon:(0,$.jsx)(uU,{style:{fontSize:24,color:`#6366f1`}}),title:`爆款复刻`,description:`上传参考视频与产品图片,一键复刻爆款视频开头`,action:`立即创作`,path:`/initial`},{icon:(0,$.jsx)(R8,{style:{fontSize:24,color:`#f97316`}}),title:`拆镜复刻`,description:`精细化镜头复刻工具,拆分参考视频单镜头独立复刻,提升素材原创度,规避素材同质化`,action:`开始混剪`,path:`/removelens`},{icon:(0,$.jsx)(E8,{style:{fontSize:24,color:`#10b981`}}),title:`AI成片`,description:`输入想法、剧本或上传参考,智能生成视频/图片`,action:`立即生成`,path:`/conversation`}],v=[{key:`all`,label:`全部`},{key:`project`,label:`项目媒体`},{key:`chatAi`,label:`AI成片`},{key:`hotOpeningReplicate`,label:`爆款复刻`},{key:`shotReplicate`,label:`拆镜复刻`}],y=t===`all`?a:a.filter(e=>e.type===t);return(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsx)(`h3`,{children:`首页工作台 `}),(0,$.jsxs)(`p`,{style:{cursor:`pointer`,fontSize:12,letterSpacing:.3,padding:`10px 16px`,backgroundColor:`#ffffffff`,borderRadius:30,boxShadow:`0px 4px 12px 0px rgba(0, 0, 0, 0.1)`},children:[`如需进行账户素材推送:`,(0,$.jsxs)(`span`,{style:{color:`#1a50bbff`},onClick:()=>{e(`/authorization`)},children:[`一键推送`,(0,$.jsx)(q2,{style:{marginLeft:8,transform:`rotate(0deg)`}})]})]})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`linear-gradient(135deg, #f0f9ff 0%, #faf5ff 50%, #fef3c7 100%)`,border:`1px solid rgba(99,102,241,0.10)`,margin:`0 0 20px`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:18},children:(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsxs)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:[`我的项目`,(0,$.jsx)(`span`,{style:{color:`#a8a8a8ff`,fontSize:12},children:`(操作步骤)`})]})]})})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,background:`#fff`,borderRadius:14,padding:`20px 18px`,display:`flex`,flexDirection:`column`,boxShadow:`0 2px 8px rgba(15, 23, 42, 0.04)`},children:[(0,$.jsx)(`div`,{style:{textAlign:`center`,fontSize:20,fontWeight:700,color:`#1e293b`,marginBottom:14,letterSpacing:1},children:`第1步`}),(0,$.jsxs)(`div`,{style:{flex:1,minHeight:140,border:`1px dashed #c7d2fe`,borderRadius:8,background:`#fafbff`,padding:10,display:`flex`,flexDirection:`column`,gap:8,marginBottom:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:2,background:`#6366f1`}}),(0,$.jsx)(`div`,{style:{flex:1,height:22,background:`#fff`,border:`1px solid #e2e8f0`,borderRadius:4,display:`flex`,alignItems:`center`,padding:`0 8px`,fontSize:10,color:`#94a3b8`},children:`项目名称...`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:[(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#eef2ff`,color:`#6366f1`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #c7d2fe`},children:`美妆`}),(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#fff7ed`,color:`#f97316`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #fed7aa`},children:`美食`}),(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#ecfdf5`,color:`#10b981`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #a7f3d0`},children:`3C数码`}),(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#f5f3ff`,color:`#8b5cf6`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #ddd6fe`},children:`服饰`})]}),(0,$.jsx)(`div`,{style:{height:16,background:`#fff`,border:`1px solid #e2e8f0`,borderRadius:4}}),(0,$.jsx)(`div`,{style:{height:16,width:`70%`,background:`#fff`,border:`1px solid #e2e8f0`,borderRadius:4}})]}),(0,$.jsx)(`div`,{style:{background:`#f1f5f9`,borderRadius:10,padding:`14px 12px`,textAlign:`center`,fontSize:13,color:`#475569`,lineHeight:1.6},children:`创建新项目,自定义项目名称并选择对应行业分类`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,color:`#94a3b8`,fontSize:22},children:(0,$.jsx)(q2,{style:{transform:`rotate(0deg)`}})}),(0,$.jsxs)(`div`,{style:{flex:1,background:`#fff`,borderRadius:14,padding:`20px 18px`,display:`flex`,flexDirection:`column`,boxShadow:`0 2px 8px rgba(15, 23, 42, 0.04)`},children:[(0,$.jsx)(`div`,{style:{textAlign:`center`,fontSize:20,fontWeight:700,color:`#1e293b`,marginBottom:14,letterSpacing:1},children:`第2步`}),(0,$.jsxs)(`div`,{style:{flex:1,minHeight:140,border:`1px solid #e2e8f0`,borderRadius:8,background:`#fafafa`,padding:10,display:`flex`,flexDirection:`column`,gap:8,marginBottom:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,background:`#f1f5f9`,borderRadius:6,padding:2,gap:2},children:[(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`5px 0`,background:`#fff`,borderRadius:4,fontSize:11,fontWeight:600,color:`#6366f1`,boxShadow:`0 1px 3px rgba(99,102,241,0.15)`},children:[(0,$.jsx)(W5,{style:{fontSize:11}}),`视频`]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`5px 0`,fontSize:11,color:`#94a3b8`},children:[(0,$.jsx)(n8,{style:{fontSize:11}}),` 图片`]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:9,color:`#94a3b8`,marginBottom:3},children:`尺寸比例`}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#eef2ff`,color:`#6366f1`,border:`1px solid #c7d2fe`,borderRadius:4,fontSize:10,fontWeight:600},children:`9:16`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`16:9`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`1:1`})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:9,color:`#94a3b8`,marginBottom:3},children:`时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`5s`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff7ed`,color:`#f97316`,border:`1px solid #fed7aa`,borderRadius:4,fontSize:10,fontWeight:600},children:`10s`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`15s`})]})]})]}),(0,$.jsx)(`div`,{style:{background:`#f1f5f9`,borderRadius:10,padding:`14px 12px`,textAlign:`center`,fontSize:13,color:`#475569`,lineHeight:1.6},children:`选择生成图片或视频,设置尺寸、时长等参数,点击生成即可一键优化提示词`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,color:`#94a3b8`,fontSize:22},children:(0,$.jsx)(q2,{})}),(0,$.jsxs)(`div`,{style:{flex:1,background:`#fff`,borderRadius:14,padding:`20px 18px`,display:`flex`,flexDirection:`column`,boxShadow:`0 2px 8px rgba(15, 23, 42, 0.04)`},children:[(0,$.jsx)(`div`,{style:{textAlign:`center`,fontSize:20,fontWeight:700,color:`#1e293b`,marginBottom:14,letterSpacing:1},children:`第3步`}),(0,$.jsxs)(`div`,{style:{flex:1,minHeight:140,border:`1px solid #e2e8f0`,borderRadius:8,background:`#fafafa`,padding:10,display:`flex`,flexDirection:`column`,gap:6,marginBottom:12,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 8px`,background:`#f0fdf4`,border:`1px solid #bbf7d0`,borderRadius:5},children:[(0,$.jsx)(`div`,{style:{width:14,height:14,borderRadius:`50%`,background:`#10b981`,color:`#fff`,fontSize:10,display:`flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700},children:`✓`}),(0,$.jsx)(`div`,{style:{fontSize:10,color:`#065f46`,fontWeight:500},children:`提示词已智能优化`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 8px`,background:`#f0fdf4`,border:`1px solid #bbf7d0`,borderRadius:5},children:[(0,$.jsx)(`div`,{style:{width:14,height:14,borderRadius:`50%`,background:`#10b981`,color:`#fff`,fontSize:10,display:`flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700},children:`✓`}),(0,$.jsx)(`div`,{style:{fontSize:10,color:`#065f46`,fontWeight:500},children:`尺寸 9:16 · 时长 5s`})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`6px 0`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,borderRadius:5,fontSize:11,fontWeight:600,boxShadow:`0 2px 6px rgba(99,102,241,0.25)`},children:[(0,$.jsx)(E5,{style:{fontSize:11}}),`确认并生成素材`]})]}),(0,$.jsx)(`div`,{style:{background:`#f1f5f9`,borderRadius:10,padding:`14px 12px`,textAlign:`center`,fontSize:13,color:`#475569`,lineHeight:1.6},children:`核对图片 / 视频参数与优化后的提示词,确认后一键生成素材`})]}),(0,$.jsxs)(`div`,{onClick:()=>e(`/projects`),onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px) scale(1.05)`,e.currentTarget.style.boxShadow=`0 14px 32px rgba(99,102,241,0.45)`;let t=e.currentTarget.querySelector(`.round-arrow`);t&&(t.style.transform=`translateX(3px)`)},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0) scale(1)`,e.currentTarget.style.boxShadow=`0 8px 20px rgba(99,102,241,0.30)`;let t=e.currentTarget.querySelector(`.round-arrow`);t&&(t.style.transform=`translateX(0)`)},style:{cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,width:64,height:64,borderRadius:`50%`,textAlign:`center`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,color:`#fff`,fontSize:14,fontWeight:600,letterSpacing:.5,boxShadow:`0 8px 20px rgba(99,102,241,0.30)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,userSelect:`none`,position:`relative`},children:[(0,$.jsx)(`span`,{style:{position:`absolute`,inset:0,borderRadius:`50%`,background:`radial-gradient(circle at 30% 25%, rgba(255,255,255,0.35) 0%, transparent 55%)`,pointerEvents:`none`}}),`前往`,(0,$.jsx)(q2,{className:`round-arrow`,style:{fontSize:13,transition:`transform 0.3s ease`}})]})]})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp stagger-children`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:18},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`AI 创作入口`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`一键开启智能创作`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:16},children:_.map((t,n)=>{let r=[{color:`#6366f1`,light:`rgba(99,102,241,0.10)`,tag:`复刻`,bg:pae},{color:`#f97316`,light:`rgba(249,115,22,0.10)`,tag:`混剪`,bg:mae},{color:`#10b981`,light:`rgba(16,185,129,0.10)`,tag:`云创`,bg:hae}],i=r[n]||r[0];return(0,$.jsxs)(`div`,{onClick:()=>e(t.path),className:`project-card`,style:{flex:1,padding:`20px 22px`,borderRadius:14,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,position:`relative`,overflow:`hidden`,backgroundImage:`url(${i.bg})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},onMouseEnter:e=>{e.currentTarget.style.borderColor=i.color,e.currentTarget.style.boxShadow=`0 12px 32px ${i.light}`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#e2e8f0`,e.currentTarget.style.boxShadow=`none`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:`linear-gradient(90deg, ${i.color}, ${i.color}88)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:14},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,background:i.light,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:i.color,fontSize:22,display:`flex`},children:t.icon})}),(0,$.jsx)(`div`,{style:{fontSize:11,color:i.color,padding:`2px 8px`,borderRadius:6,background:i.light,fontWeight:600},children:i.tag})]}),(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:700,color:`#1f2937`,marginBottom:4},children:t.title}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#6b7280`,marginBottom:14,lineHeight:1.5,minHeight:36},children:t.description}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,color:i.color,fontSize:13,fontWeight:600},children:[t.action,(0,$.jsx)(q2,{style:{fontSize:12}})]})]},n)})})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,marginBottom:20},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`近期作品`})]})}),(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(cR,{activeKey:t,onChange:g,items:v.map(e=>({key:e.key,label:e.label})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(5, 1fr)`,gap:16},children:y.length===0?(0,$.jsxs)(`div`,{style:{gridColumn:`1 / -1`,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(n8,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无作品`})]}):y.map(t=>(0,$.jsxs)(`div`,{className:`project-card`,onClick:()=>{let n=t.moduleProjectId;t.type===`hotOpeningReplicate`&&n!=null?e(`/initial/${n}/initialinfo`):t.type===`shotReplicate`&&n!=null?e(`/removelens/${n}/removefenbu`):t.type===`chatAi`?e(`/conversation`):t.type===`project`&&e(`/project`)},style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`},children:[(()=>{let e=t.type!==`hotOpeningReplicate`&&(String(t.resourceType??``).toLowerCase()===`image`||t.resourceType===1||String(t.resourceType??``)===`1`),n=``;return n=e?`/static`+t.resultUrl+`&w=300&p=50`||``:(t.type,t.coverUrl||t.resultUrl||t.resultUrl||``),(0,$.jsx)(`img`,{src:n?n.startsWith(`http`)?n:`http://ceshi.apiforeign.minzhong.cn`+n:``,alt:t.title||t.name||`作品`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})(),String(t.resourceType??``).toLowerCase()===`image`?null:(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.2)`},children:(0,$.jsx)(W5,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,background:`#f8fafc`,paddingTop:0},children:(0,$.jsxs)(`div`,{style:{marginTop:6,display:`flex`,alignItems:`center`,gap:6,fontSize:12,color:`#64748b`},children:[(0,$.jsx)(`span`,{style:{display:`inline-block`,padding:`1px 6px`,border:`1px solid #3b82f6`,borderRadius:4,color:`#3b82f6`,fontSize:11,fontWeight:500,background:`#fff`,lineHeight:1.4,whiteSpace:`nowrap`},children:{project:`项目媒体`,chatAi:`AI成片`,hotOpeningReplicate:`爆款复刻`,shotReplicate:`拆镜复刻`}[t.type]||`其他`}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`·`}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:gae(t.generatedTime)})]})})]},t.id||`${t.type}-${Math.random()}`))})]}),d.length>0&&(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:18},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`素材案例`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:4},children:`精选优质作品参考`})]})}),(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(cR,{activeKey:l,onChange:e=>{u(e),J7(e).then(e=>{e?.categories?.[0]?.assets?f(e.categories[0].assets):f([])})},items:s.map(e=>({key:e.id,label:e.name})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(5, 1fr)`,gap:16},children:d.length===0?(0,$.jsxs)(`div`,{style:{gridColumn:`1 / -1`,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(n8,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无素材`})]}):d.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card`,onClick:()=>m(e),style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(`div`,{style:{position:`relative`,aspectRatio:`16/9`},children:e.mediaType===`video`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},muted:!0,playsInline:!0}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.2)`},children:(0,$.jsx)(W5,{style:{fontSize:28,color:`#fff`}})})]}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,alt:e.title||`素材 ${t+1}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,background:`#f8fafc`},children:(0,$.jsx)(`div`,{style:{fontSize:12,color:`#64748b`,textAlign:`center`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.title||`素材 ${t+1}`})})]},e.id||t))})]}),(0,$.jsxs)(fq,{open:!!p,onCancel:()=>{h.current?.pause(),m(null)},footer:null,width:760,centered:!0,className:`preview-modal`,bodyStyle:{padding:0,background:`#fff`,borderRadius:16,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{width:`100%`,paddingTop:`56.25%`,position:`relative`},children:(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`},children:p?.mediaType===`video`?(0,$.jsx)(`video`,{ref:h,src:`http://ceshi.apiforeign.minzhong.cn${p.url}`,controls:!0,autoPlay:!0,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${p?.url}`,alt:p?.title,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})}),p?.title&&(0,$.jsx)(`div`,{style:{padding:`14px 20px`,fontSize:14,color:`#4b5563`,fontWeight:500,borderTop:`1px solid #f1f5f9`,textAlign:`center`},children:p.title})]})]})},{RangePicker:vae}=pH,Q9=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),yae=()=>{let e=Ye(),[t]=On(),{message:n}=ux.useApp(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(1),[x,C]=(0,S.useState)(10),[w,T]=(0,S.useState)(t.get(`advertiserId`)||``),[E,D]=(0,S.useState)(),[O,k]=(0,S.useState)((0,rD.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),[A,j]=(0,S.useState)(``);(0,S.useEffect)(()=>{N(),M()},[]);let M=async(e=1,t=10,r,a)=>{c(!0);try{let n=await _re({advertiser_id:a??w,consume_date:r??E,page:e,page_size:t});i(n.data||[]),o(n.pagination?.total||0),b(n.pagination?.page||1),C(n.pagination?.pageSize||10)}catch{n.error(`加载数据失败`)}finally{c(!1)}},N=async()=>{try{let e=((await K7()).data||[]).map(e=>({name:Q9(e.field),description:e.description}));m(e);let t=localStorage.getItem(`consumeColumns`);g(t?JSON.parse(t):e.map(e=>e.name))}catch{n.error(`加载表头字段失败`)}},P=r.map((e,t)=>({...e,index:t+1,key:e.id})),F=()=>{document.referrer.includes(window.location.origin)?e(-1):e(`/materials`)},I=()=>{b(1),M(1,x)},L=()=>{fq.confirm({title:`拉取消耗数据`,content:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`同步日期:`}),(0,$.jsx)(pH,{value:(0,rD.default)(O),onChange:e=>k(e?e.format(`YYYY-MM-DD`):(0,rD.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),style:{width:`100%`}})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`广告主ID(可选):`}),(0,$.jsx)(PG,{placeholder:`不指定则同步所有授权的广告主`,value:A,onChange:e=>j(e.target.value)})]})]}),onOk:async()=>{u(!0);try{await vre({date:O,advertiser_id:A||void 0}),n.success(`拉取消耗数据成功`),M(y,x)}catch{n.error(`拉取消耗数据失败`)}finally{u(!1)}},okText:`开始拉取`,cancelText:`取消`})},R=h.map(e=>p.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[t.get(`advertiserId`)&&(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(W2,{}),onClick:F}),(0,$.jsx)(b3,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(PG,{placeholder:`广告主ID`,value:w,onChange:e=>T(e.target.value),style:{width:180},allowClear:!0,onPressEnter:()=>{b(1),M(1,x)}}),(0,$.jsx)(vae,{value:E?[(0,rD.default)(E[0]),(0,rD.default)(E[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?D([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):D(void 0)}}),(0,$.jsx)(X,{type:`primary`,size:`medium`,onClick:I,children:`搜索`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(_5,{}),onClick:L,loading:l,style:{borderRadius:8},children:`拉取消耗`}),(0,$.jsx)(X,{icon:(0,$.jsx)(W8,{}),onClick:()=>f(!0),style:{borderRadius:8},children:`自定义表头`})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(o$,{dataSource:P,columns:R,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(bK,{current:y,pageSize:x,total:a,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{b(e),C(t),M(e,t)},size:`small`})})]}),(0,$.jsx)(fq,{title:`自定义表头`,open:d,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(h)),n.success(`表头设置已保存`),f(!1)},onCancel:()=>{f(!1),v(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(PG,{placeholder:`搜索指标...`,value:_,allowClear:!0,onChange:e=>v(e.target.value),style:{marginBottom:8}}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,$.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,$.jsx)($z,{checked:h.length===p.length&&p.length>0,indeterminate:h.length>0&&h.length{e.target.checked?g(p.map(e=>e.name)):g([])},style:{marginBottom:12},children:`全选`}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:p.filter(e=>e.description.toLowerCase().includes(_.toLowerCase())||e.name.toLowerCase().includes(_.toLowerCase())).map(e=>(0,$.jsx)($z,{checked:h.includes(e.name),onChange:t=>{t.target.checked?g(t=>[...t,e.name]):g(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,h.length,`)`]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>g([]),disabled:h.length===0,children:`清空`}),(0,$.jsx)(X,{size:`small`,onClick:async()=>{try{let e=((await K7()).data||[]).map(e=>({name:Q9(e.field),description:e.description}));m(e),g(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),n.success(`表头字段已更新`)}catch{n.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:h.length===0?(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,$.jsx)(`div`,{children:h.map((e,t)=>{let n=p.find(t=>t.name===e);return(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...h],[t]=e.splice(n,1);e.splice(r,0,t),g(e)}},children:[(0,$.jsx)(Q.Text,{children:n?.description||e}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},bae=()=>{let e=Ye(),[t]=On(),{message:n}=ux.useApp(),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{let r=t.get(`auth_code`),a=t.get(`state`);if(!r||!a){o(!1),i(10);return}let s={auth_code:r,state:a,app_id:t.get(`app_id`)||void 0,material_auth_status:t.get(`material_auth_status`)||void 0,scope:t.get(`scope`)||void 0,uid:t.get(`uid`)||void 0};(async()=>{try{let t=await nre(s);c(!0),o(!1),n.success(t?.message||`授权成功`),setTimeout(()=>{e(`/authorization`)},1500)}catch(e){let t=e?.message||`授权失败`;u(t),o(!1),n.error(t)}})();let l=setInterval(()=>{i(e=>e>=11?(o(!1),e):e+1)},1e3);return()=>{clearInterval(l)}},[e,t,n]);let d=()=>{i(0),o(!0),c(!1),u(``),window.location.href=`/authorization`};return s?(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`#dcfce7`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:(0,$.jsx)(Q.Text,{style:{fontSize:40,color:`#22c55e`},children:`✓`})}),(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权成功`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`},children:`正在跳转至授权管理页面...`})]})}):(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:a&&r<10?(0,$.jsx)(VK,{size:`large`,tip:`加载中`,style:{color:`#fff`}}):(0,$.jsx)(oH,{style:{fontSize:40,color:`#fff`}})}),l?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权失败`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:l}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(Qq,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):r>=10?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权无响应`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`请重新授权`}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(Qq,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权中,请等待`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`正在等待平台完成授权操作`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8},children:[(0,$.jsx)(oH,{style:{color:`#6366f1`}}),(0,$.jsxs)(Q.Text,{style:{color:`#6366f1`,fontWeight:500,fontSize:16},children:[r,`s`]})]})]})]})})},xae=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fed7aa 100%)`,border:`1px solid rgba(245, 158, 11, 0.18)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(245, 158, 11, 0.3)`},children:(0,$.jsx)(c4,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700,backgroundImage:`linear-gradient(90deg, #f59e0b 0%, #d97706 30%, #ea580c 50%, #d97706 70%, #f59e0b 100%)`},children:`行业爆款大盘`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#b45309`},children:[(0,$.jsx)(C8,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`实时追踪全网热门素材趋势`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#78716c`,fontSize:14,lineHeight:1.7},children:`实时追踪各行业爆款素材,把握创作风向,打造热门内容`})]}),(0,$.jsx)(`div`,{style:{position:`relative`},children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(M5,{style:{marginRight:8,color:`#6366f1`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`爆款素材榜单`}),(0,$.jsx)(`span`,{style:{marginLeft:10,fontSize:12,fontWeight:400,color:`#94a3b8`}})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(2, 1fr)`,gap:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,zIndex:1,inset:0,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:2,color:`#fff`,borderRadius:6},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(b6,{style:{marginRight:6}}),`立即解锁全部`,(0,$.jsx)(q2,{style:{marginLeft:4,fontSize:12}})]})}),[{rank:1,title:`夏日美妆教程:3 步打造奶油肌`,author:`美妆博主·小雅`,views:`128.4w`,likes:`12.6w`,comments:`8,234`,tag:`NO.1`,tagColor:`#f59e0b`},{rank:2,title:`平价穿搭 | 学生党一周不重样`,author:`穿搭达人·Miki`,views:`96.2w`,likes:`9.8w`,comments:`6,128`,tag:`NO.2`,tagColor:`#a78bfa`},{rank:3,title:`探店 vlog | 网红咖啡馆测评`,author:`美食探店·阿伦`,views:`78.5w`,likes:`7.4w`,comments:`4,892`,tag:`NO.3`,tagColor:`#6366f1`},{rank:4,title:`iPhone 16 Pro 一周深度体验`,author:`数码评测·老王`,views:`65.7w`,likes:`6.1w`,comments:`3,847`,tag:`NO.4`,tagColor:`#94a3b8`}].map(e=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{display:`flex`,gap:14,padding:14,borderRadius:14,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:140,height:80,flexShrink:0,borderRadius:10,overflow:`hidden`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(d8,{style:{fontSize:28,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:6,left:6,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:600},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:4,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:8},children:e.author}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,fontSize:12,color:`#64748b`},children:[(0,$.jsxs)(`span`,{children:[(0,$.jsx)(fG,{style:{marginRight:3}}),e.views]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(m6,{style:{marginRight:3}}),e.likes]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(n3,{style:{marginRight:3}}),e.comments]})]})]})]},e.rank))]})]})})]}),Sae=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #fce7f3 100%)`,border:`1px solid rgba(139, 92, 246, 0.12)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(139, 92, 246, 0.3)`},children:(0,$.jsx)(R3,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700},children:`创意素材案例`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#7c3aed`},children:[(0,$.jsx)(d3,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`探索 AI 创作无限可能`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:14,lineHeight:1.7},children:`精选 AI 生成的优秀素材案例,展示 AI 创作的无限潜力与创意灵感`})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(m5,{style:{marginRight:8,color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`精选案例展示`})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(3, 1fr)`,gap:16,marginBottom:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,zIndex:1,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,borderRadius:14,gap:4,color:`#fff`},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(b6,{style:{marginRight:6}}),`解锁全部案例`,(0,$.jsx)(q2,{style:{marginLeft:4,fontSize:12}})]})}),[{title:`美妆直播切片`,tag:`热门`,tagColor:`#ef4444`},{title:`3C 数码测评`,tag:`推荐`,tagColor:`#6366f1`},{title:`美食探店 vlog`,tag:`推荐`,tagColor:`#6366f1`},{title:`服饰穿搭合集`,tag:`热门`,tagColor:`#ef4444`},{title:`家居场景展示`,tag:`推荐`,tagColor:`#6366f1`},{title:`母婴亲子内容`,tag:`热门`,tagColor:`#ef4444`}].map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{position:`relative`,borderRadius:14,overflow:`hidden`,cursor:`pointer`,border:`1px solid #e2e8f0`,background:`#fff`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(d8,{style:{fontSize:36,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,left:10,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:500},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{padding:`10px 14px`,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,color:`#334155`,fontWeight:500,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(fG,{style:{fontSize:13,color:`#94a3b8`}})]})]},t))]})]})]}),{RangePicker:Cae}=pH;function $9(e){if(!e)return`-`;try{return new Date(e).toLocaleString(`zh-CN`,{hour12:!1})}catch{return`-`}}var wae={recharge:{color:`green`,label:`充值`},consume:{color:`red`,label:`消费`},refund:{color:`orange`,label:`退款`},team_internal:{color:`blue`,label:`团队内部`}},Tae=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(!1),i=(0,S.useCallback)(async()=>{r(!0);try{t(await Fre())}catch(e){Z.error(e?.message||`获取团队信息失败`)}finally{r(!1)}},[]);(0,S.useEffect)(()=>{i()},[i]);let[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(1),p=(0,S.useCallback)(async()=>{if(e){u(!0);try{let e=await Ire(d);o(e.items||[]),c(e.total||0)}catch(e){Z.error(e?.message||`加载成员失败`)}finally{u(!1)}}},[e,d]);(0,S.useEffect)(()=>{p()},[p]);let[m,h]=(0,S.useState)({open:!1,member:null}),[g]=$U.useForm(),[_,v]=(0,S.useState)(!1),y=async()=>{if(m.member)try{let e=await g.validateFields(),t=Number(e.amount);if(!t||t<=0||t>9999999){Z.error(`请输入有效的正数积分数量`);return}v(!0),await Lre(m.member.id,t,e.direction||`increase`,e.description),Z.success(e.direction===`decrease`?`积分扣减成功`:`积分增加成功`),h({open:!1,member:null}),g.resetFields(),p(),ce()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`操作失败`)}finally{v(!1)}},[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)(!1),[T,E]=(0,S.useState)(!1),[D]=$U.useForm(),[O,k]=(0,S.useState)(!1),A=(0,S.useCallback)(async()=>{w(!0);try{x(await Rre()||[])}catch(e){Z.error(e?.message||`加载邀请码失败`)}finally{w(!1)}},[]);(0,S.useEffect)(()=>{A()},[A]);let j=async()=>{try{let e=await D.validateFields();k(!0);let t=e.expiresAt?new Date(e.expiresAt).toISOString():null;await zre(e.maxUses||null,t),Z.success(`邀请码已生成`),E(!1),D.resetFields(),A()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`创建失败`)}finally{k(!1)}},M=async e=>{try{await Bre(e),Z.success(`已撤销`),A()}catch(e){Z.error(e?.message||`撤销失败`)}},N=e=>{navigator.clipboard.writeText(e).then(()=>{Z.success(`邀请链接已复制`)}).catch(()=>{Z.warning(`复制失败,请手动复制`)})},[P,F]=(0,S.useState)([]),[I,L]=(0,S.useState)(!1),R=(0,S.useCallback)(async()=>{L(!0);try{F(await Vre()||[])}catch(e){Z.error(e?.message||`加载申请失败`)}finally{L(!1)}},[]);(0,S.useEffect)(()=>{R()},[R]);let z=async(e,t,n)=>{try{await Hre(e,t,n),Z.success(t===`approve`?`已通过`:`已拒绝`),R(),p()}catch(e){Z.error(e?.message||`操作失败`)}},[B,V]=(0,S.useState)([]),[H,U]=(0,S.useState)(0),[W,ee]=(0,S.useState)(null),[te,ne]=(0,S.useState)(!1),[re,G]=(0,S.useState)(1),[ie,K]=(0,S.useState)(``),[ae,q]=(0,S.useState)(``),[oe,se]=(0,S.useState)(null),ce=(0,S.useCallback)(async()=>{ne(!0);try{let e=await Gre({page:re,pageSize:10,phone:ae||void 0,recordType:ie||void 0,startDate:oe?.[0]||void 0,endDate:oe?.[1]||void 0});V(e.items||[]),U(e.total||0),ee(e.summary||null)}catch(e){Z.error(e?.message||`加载积分记录失败`)}finally{ne(!1)}},[re,ie,ae,oe]);(0,S.useEffect)(()=>{ce()},[ce]);let le=()=>{K(``),q(``),se(null),G(1)},ue=()=>{let e=Kre({phone:ae||void 0,recordType:ie||void 0,startDate:oe?.[0]||void 0,endDate:oe?.[1]||void 0}),t=localStorage.getItem(`auth_token`),n=t?{Authorization:`Bearer ${t}`}:{};fetch(e,{headers:n}).then(e=>e.blob()).then(e=>{let t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=`team_credits_${(0,rD.default)().format(`YYYYMMDD_HHmmss`)}.csv`,t.click(),URL.revokeObjectURL(t.href)}).catch(()=>Z.error(`导出失败`))},de=[{title:`用户名`,dataIndex:`username`,width:140,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,width:130,render:e=>e||`-`},{title:`积分`,dataIndex:`credits`,width:100,render:e=>(0,$.jsx)(Q.Text,{style:{color:`#6366f1`},children:(e??0).toFixed(2)})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,$.jsx)(y$,{color:e?`green`:`red`,children:e?`启用`:`禁用`})},{title:`加入时间`,dataIndex:`joinedAt`,width:170,render:e=>$9(e)},{title:`操作`,key:`action`,width:100,render:(e,t)=>(0,$.jsx)(X,{size:`small`,type:`link`,style:{padding:0},onClick:()=>{h({open:!0,member:t}),g.resetFields()},children:`调整积分`})}],fe=[{title:`邀请码`,dataIndex:`code`,width:200,render:e=>(0,$.jsx)(Q.Text,{copyable:!0,style:{fontFamily:`monospace`},children:e})},{title:`邀请链接`,dataIndex:`inviteLink`,ellipsis:!0,render:e=>(0,$.jsxs)(aU,{children:[(0,$.jsx)(Q.Text,{ellipsis:!0,style:{maxWidth:250,fontSize:12},children:e}),(0,$.jsx)(zw,{title:`复制链接`,children:(0,$.jsx)(X,{size:`small`,type:`text`,icon:(0,$.jsx)(w1,{}),onClick:()=>N(e)})})]})},{title:`状态`,dataIndex:`status`,width:80,render:e=>(0,$.jsx)(y$,{color:e===`active`?`green`:`default`,children:e===`active`?`有效`:`已撤销`})},{title:`使用次数`,key:`uses`,width:100,render:(e,t)=>`${t.useCount}${t.maxUses?`/${t.maxUses}`:``}`},{title:`过期时间`,dataIndex:`expiresAt`,width:170,render:e=>e?$9(e):`永不过期`},{title:`操作`,key:`action`,width:80,render:(e,t)=>t.status===`active`?(0,$.jsx)(X,{size:`small`,type:`link`,danger:!0,onClick:()=>M(t.id),children:`撤销`}):null}],pe=[{title:`申请人`,dataIndex:`username`,width:140,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,width:130,render:e=>e||`-`},{title:`申请时间`,dataIndex:`createdAt`,width:170,render:e=>$9(e)},{title:`操作`,key:`action`,width:160,render:(e,t)=>(0,$.jsxs)(aU,{size:4,children:[(0,$.jsx)(X,{size:`small`,type:`link`,style:{color:`#16a34a`,padding:0},onClick:()=>z(t.id,`approve`),children:`通过`}),(0,$.jsx)(X,{size:`small`,type:`link`,danger:!0,style:{padding:0},onClick:()=>{fq.confirm({title:`拒绝申请`,content:(0,$.jsx)($U,{layout:`vertical`,style:{marginTop:12},children:(0,$.jsx)($U.Item,{name:`note`,label:`拒绝原因(可选)`,children:(0,$.jsx)(PG.TextArea,{rows:2,placeholder:`选填`,id:`reject-note-input`})})}),onOk:()=>{let e=document.getElementById(`reject-note-input`)?.value||void 0;z(t.id,`reject`,e)}})},children:`拒绝`})]})}],me=[{title:`用户名`,dataIndex:`username`,width:120,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e||`-`})},{title:`手机号`,dataIndex:`phone`,width:120,render:e=>e||`-`},{title:`类型`,dataIndex:`type`,width:100,render:(e,t)=>{let n=wae[t.type]||{color:`default`,label:t.type||`-`};return(0,$.jsx)(y$,{color:n.color,children:n.label})}},{title:`变动积分`,dataIndex:`amount`,width:110,align:`right`,render:(e,t)=>(0,$.jsxs)(Q.Text,{strong:!0,style:{color:t.amount>=0?`#10b981`:`#ef4444`,fontSize:14},children:[t.amount>=0?`+`:``,(t.amount??0).toFixed(2)]})},{title:`余额`,dataIndex:`balanceAfter`,width:100,align:`right`,render:e=>(e??0).toFixed(2)},{title:`说明`,dataIndex:`description`,ellipsis:!0,minWidth:160,render:e=>e||`-`},{title:`时间`,dataIndex:`createdAt`,width:170,render:e=>$9(e)}],he={borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},ge={padding:`16px`,textAlign:`right`},_e=[{key:`members`,label:(0,$.jsxs)(aU,{children:[(0,$.jsx)(V5,{}),`成员列表`,s>0&&(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`(`,s,`)`]})]}),children:(0,$.jsxs)(`div`,{style:he,children:[(0,$.jsx)(o$,{columns:de,dataSource:a,rowKey:`id`,loading:l,pagination:!1,bordered:!1,scroll:{x:800},locale:{emptyText:(0,$.jsx)(yC,{description:`暂无成员`})}}),s>0&&(0,$.jsx)(`div`,{style:ge,children:(0,$.jsx)(bK,{current:d,pageSize:20,total:s,onChange:e=>f(e),size:`small`})})]})},{key:`credits`,label:(0,$.jsxs)(aU,{children:[(0,$.jsx)(K5,{}),`团队积分变动`]}),children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12,display:`flex`,gap:8,flexWrap:`wrap`,alignItems:`center`},children:[(0,$.jsx)(YC,{value:ie||void 0,onChange:e=>{K(e||``),G(1)},allowClear:!0,placeholder:`交易类型`,style:{width:130},options:[{value:`recharge`,label:`充值`},{value:`consume`,label:`消费`},{value:`team_internal`,label:`团队内部`},{value:`refund`,label:`退款`}]}),(0,$.jsx)(PG,{placeholder:`搜索手机号`,value:ae,onChange:e=>{q(e.target.value),G(1)},style:{width:160},allowClear:!0}),(0,$.jsx)(Cae,{value:oe?[(0,rD.default)(oe[0]),(0,rD.default)(oe[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?se([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):se(null),G(1)}}),(0,$.jsx)(X,{onClick:le,children:`重置`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(L0,{}),onClick:ue,children:`导出 Excel`})]}),(0,$.jsx)(`div`,{style:{marginBottom:12,padding:`8px 16px`,background:`#f8f9fc`,borderRadius:8,display:`flex`,gap:24,flexWrap:`wrap`,fontSize:13},children:(0,$.jsxs)(`span`,{children:[`总消耗积分:`,(0,$.jsx)(`strong`,{style:{color:`#ef4444`,fontSize:15},children:W?.total_consume??0})]})}),(0,$.jsxs)(`div`,{style:he,children:[(0,$.jsx)(o$,{rowKey:`id`,loading:te,dataSource:B,pagination:!1,bordered:!1,scroll:{x:950},columns:me,locale:{emptyText:(0,$.jsx)(yC,{description:`暂无积分记录`})}}),H>0&&(0,$.jsx)(`div`,{style:ge,children:(0,$.jsx)(bK,{current:re,pageSize:10,total:H,onChange:e=>G(e),size:`small`,showTotal:e=>`共 ${e} 条`})})]})]})},{key:`invitations`,label:(0,$.jsxs)(aU,{children:[(0,$.jsx)(w1,{}),`邀请管理`]}),children:(0,$.jsxs)(`div`,{style:he,children:[(0,$.jsx)(`div`,{style:{padding:16,paddingBottom:0},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(zL,{}),onClick:()=>E(!0),children:`生成邀请码`})}),(0,$.jsx)(o$,{columns:fe,dataSource:b,rowKey:`id`,loading:C,pagination:!1,bordered:!1,scroll:{x:900},locale:{emptyText:(0,$.jsx)(yC,{description:`暂无邀请码`})}})]})},{key:`requests`,label:(0,$.jsxs)(aU,{children:[(0,$.jsx)(X3,{}),`加入申请`,P.length>0&&(0,$.jsx)(y$,{color:`red`,children:P.length})]}),children:(0,$.jsx)(`div`,{style:he,children:(0,$.jsx)(o$,{columns:pe,dataSource:P,rowKey:`id`,loading:I,pagination:!1,bordered:!1,scroll:{x:600},locale:{emptyText:(0,$.jsx)(yC,{description:`暂无待审批申请`})}})})}];return(0,$.jsxs)(`div`,{style:{padding:24},children:[(0,$.jsx)(`div`,{style:{marginBottom:24},children:n?(0,$.jsx)(Q.Text,{type:`secondary`,children:`加载中...`}):e?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexWrap:`wrap`,gap:12},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:e.name}),(0,$.jsxs)(Q.Text,{type:`secondary`,children:[`代码: `,e.code||`-`,` 成员: `,e.memberCount,` 人`]})]}),(0,$.jsx)(X,{icon:(0,$.jsx)(Qq,{}),onClick:()=>{i(),p(),A(),R(),ce()},children:`刷新`})]}):(0,$.jsx)(Q.Text,{type:`secondary`,children:`无法获取团队信息`})}),(0,$.jsx)(cR,{items:_e,defaultActiveKey:`members`,size:`large`}),(0,$.jsx)(fq,{title:(0,$.jsxs)(aU,{children:[(0,$.jsx)(V5,{}),`调整成员积分 - `,m.member?.username]}),open:m.open,confirmLoading:_,onOk:y,onCancel:()=>h({open:!1,member:null}),okText:`确认`,width:480,children:(0,$.jsxs)($U,{form:g,layout:`vertical`,style:{marginTop:16},initialValues:{direction:`increase`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:`10px 16px`,background:`#f0f4ff`,borderRadius:8,display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{type:`secondary`,children:`我的当前积分`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:20,color:`#6366f1`},children:Z7.getState().user?.credits?.toFixed(2)??`0.00`})]}),(0,$.jsx)($U.Item,{name:`direction`,label:`操作类型`,rules:[{required:!0,message:`请选择操作类型`}],children:(0,$.jsxs)(pL.Group,{buttonStyle:`solid`,size:`large`,style:{width:`100%`},children:[(0,$.jsx)(pL.Button,{value:`increase`,style:{width:`50%`,textAlign:`center`},children:`增加成员积分`}),(0,$.jsx)(pL.Button,{value:`decrease`,style:{width:`50%`,textAlign:`center`},children:`扣减成员积分`})]})}),(0,$.jsx)($U.Item,{name:`amount`,label:`积分数量`,required:!0,rules:[{required:!0,message:`请输入积分数量`},{type:`number`,min:.01,message:`必须大于 0`},{type:`number`,max:9999999,message:`单次不能超过 9999999`}],validateTrigger:[`onChange`,`onBlur`],children:(0,$.jsx)(qB,{style:{width:`100%`},step:1,min:.01,max:9999999,precision:2,placeholder:`请输入正数积分数量`,size:`large`,formatter:e=>{if(!e)return``;let t=`${e}`.replace(/[^0-9.]/g,``);return t=t.replace(/^0+(?=\d)/,``),t},parser:e=>{if(!e||e===`.`)return``;let t=parseFloat(e);return isNaN(t)||t<=0?``:Math.min(t,9999999)},onKeyDown:e=>{(e.key===`-`||e.key===`e`||e.key===`E`)&&e.preventDefault()},onChange:e=>{e??g.validateFields([`amount`])}})}),(0,$.jsx)($U.Item,{name:`description`,label:`备注`,children:(0,$.jsx)(PG.TextArea,{rows:2,maxLength:256,placeholder:`选填,例如:活动奖励`})})]})}),(0,$.jsx)(fq,{title:(0,$.jsxs)(aU,{children:[(0,$.jsx)(w1,{}),`生成邀请码`]}),open:T,confirmLoading:O,onOk:j,onCancel:()=>{E(!1),D.resetFields()},okText:`生成`,width:480,children:(0,$.jsxs)($U,{form:D,layout:`vertical`,style:{marginTop:16},children:[(0,$.jsx)($U.Item,{name:`maxUses`,label:`最大使用次数`,children:(0,$.jsx)(qB,{style:{width:`100%`},min:1,placeholder:`留空表示不限`,size:`large`})}),(0,$.jsx)($U.Item,{name:`expiresAt`,label:`过期时间`,children:(0,$.jsx)(PG,{type:`datetime-local`,style:{width:`100%`},placeholder:`留空表示永不过期`,size:`large`})})]})})]})},Eae=()=>{let[e]=On(),t=Ye(),n=e.get(`code`)||``,[r,i]=(0,S.useState)(!0),[a,o]=(0,S.useState)(null),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1);return(0,S.useEffect)(()=>{if(!n){i(!1);return}Ure(n).then(e=>o(e)).catch(()=>o(null)).finally(()=>i(!1))},[n]),r?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:`60vh`},children:(0,$.jsx)(VK,{size:`large`})}):l?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(_J,{status:`success`,icon:(0,$.jsx)(F4,{style:{color:`#6366f1`}}),title:`申请已提交`,subTitle:`您的加入申请已提交,请等待团队管理人审批。审批通过后将自动加入团队。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):!n||!a?.valid?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(_J,{status:`error`,title:`邀请链接无效`,subTitle:`该邀请链接可能已过期或不存在,请联系团队管理人重新获取。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):a.alreadyInTeam?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(_J,{status:`info`,title:`您已在此团队中`,subTitle:`您已经是「${a.teamName}」的成员了,无需再次加入。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsxs)(SR,{variant:`outlined`,style:{borderRadius:16,maxWidth:480,width:`100%`,textAlign:`center`},children:[(0,$.jsx)(C5,{style:{fontSize:48,color:`#6366f1`,marginBottom:16}}),(0,$.jsx)(Q.Title,{level:3,children:`加入团队`}),(0,$.jsx)(Q.Text,{style:{fontSize:16,color:`#475569`,display:`block`,marginBottom:8},children:`您被邀请加入团队`}),(0,$.jsxs)(Q.Title,{level:4,style:{color:`#6366f1`,margin:`16px 0 24px`},children:[`「`,a.teamName,`」`]}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{display:`block`,marginBottom:24},children:`加入后团队管理人可以为您分配积分、查看您的积分使用情况。`}),(0,$.jsx)(X,{type:`primary`,size:`large`,block:!0,loading:s,onClick:async()=>{n&&fq.confirm({title:`确认加入团队`,icon:(0,$.jsx)(C5,{style:{color:`#6366f1`}}),content:a?.teamName?`您确定要加入团队「${a.teamName}」吗?提交后需等待团队管理人审批。`:`您确定要加入该团队吗?`,okText:`确认加入`,cancelText:`取消`,onOk:async()=>{try{c(!0),await Wre(n),u(!0)}catch(e){Z.error(e?.message||`申请失败`)}finally{c(!1)}}})},children:`申请加入`})]})})};rD.default.locale(`zh-cn`);var Dae=({children:e})=>{let{user:t,loading:n,checkAuth:r}=Z7();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,$.jsx)(VK,{size:`large`})}):t?(0,$.jsx)($.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,$.jsx)(()=>{let{checkAuth:e}=Z7();return(0,S.useEffect)(()=>{e()},[]),(0,$.jsx)(Fm,{locale:n2.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8,fontFamily:`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif`},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,$.jsx)(ux,{children:(0,$.jsx)(_n,{children:(0,$.jsxs)(Dt,{children:[(0,$.jsx)(Tt,{path:`/login`,element:(0,$.jsx)(Zre,{})}),(0,$.jsxs)(Tt,{path:`/`,element:(0,$.jsx)(Dae,{children:(0,$.jsx)(Yre,{})}),children:[(0,$.jsx)(Tt,{index:!0,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})}),(0,$.jsx)(Tt,{path:`projects`,element:(0,$.jsx)($re,{})}),(0,$.jsx)(Tt,{path:`projects/:projectId/generate`,element:(0,$.jsx)(tie,{})}),(0,$.jsx)(Tt,{path:`records`,element:(0,$.jsx)(nie,{})}),(0,$.jsx)(Tt,{path:`credits`,element:(0,$.jsx)(rie,{})}),(0,$.jsx)(Tt,{path:`credit-records`,element:(0,$.jsx)(u9,{})}),(0,$.jsx)(Tt,{path:`order-records`,element:(0,$.jsx)(u9,{})}),(0,$.jsx)(Tt,{path:`user-center`,element:(0,$.jsx)(u9,{})}),(0,$.jsx)(Tt,{path:`messages`,element:(0,$.jsx)(oie,{})}),(0,$.jsx)(Tt,{path:`home`,element:(0,$.jsx)(_ae,{})}),(0,$.jsx)(Tt,{path:`conversation`,element:(0,$.jsx)(Cie,{})}),(0,$.jsx)(Tt,{path:`initial`,element:(0,$.jsx)(Die,{})}),(0,$.jsx)(Tt,{path:`initial/:creatID/initialinfo`,element:(0,$.jsx)(Nie,{})}),(0,$.jsx)(Tt,{path:`removelens`,element:(0,$.jsx)(Pie,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removeinfo`,element:(0,$.jsx)(lae,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removefenbu`,element:(0,$.jsx)(Z9,{})}),(0,$.jsx)(Tt,{path:`generated`,element:(0,$.jsx)(zie,{})}),(0,$.jsx)(Tt,{path:`pretest`,element:(0,$.jsx)(Vie,{})}),(0,$.jsx)(Tt,{path:`authorization`,element:(0,$.jsx)(Uie,{})}),(0,$.jsx)(Tt,{path:`authoriza-waiting`,element:(0,$.jsx)(bae,{})}),(0,$.jsx)(Tt,{path:`materials`,element:(0,$.jsx)(Zie,{})}),(0,$.jsx)(Tt,{path:`consume`,element:(0,$.jsx)(yae,{})}),(0,$.jsx)(Tt,{path:`popular`,element:(0,$.jsx)(xae,{})}),(0,$.jsx)(Tt,{path:`authacc`,element:(0,$.jsx)(Gie,{})}),(0,$.jsx)(Tt,{path:`creativeplaza`,element:(0,$.jsx)(Sae,{})}),(0,$.jsx)(Tt,{path:`team-management`,element:(0,$.jsx)(Tae,{})}),(0,$.jsx)(Tt,{path:`join-team`,element:(0,$.jsx)(Eae,{})})]}),(0,$.jsx)(Tt,{path:`*`,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})})]})})})})},{})); \ No newline at end of file diff --git a/video-gen-app/dist/index.html b/video-gen-app/dist/index.html index 81f996e5..ece58b24 100644 --- a/video-gen-app/dist/index.html +++ b/video-gen-app/dist/index.html @@ -28,7 +28,7 @@ } })(); - + diff --git a/video-gen-app/src/pages/TeamManagementPage.tsx b/video-gen-app/src/pages/TeamManagementPage.tsx index 1bbc2ee7..2ec41a32 100644 --- a/video-gen-app/src/pages/TeamManagementPage.tsx +++ b/video-gen-app/src/pages/TeamManagementPage.tsx @@ -420,8 +420,7 @@ const TeamManagementPage: React.FC = () => { {/* 汇总统计 */}
- 总充值:+{creditSummary?.total_recharge ?? 0} - 总消费:-{creditSummary?.total_consume ?? 0} + 总消耗积分:{creditSummary?.total_consume ?? 0}
@@ -517,9 +516,6 @@ const TeamManagementPage: React.FC = () => { onCancel={() => setCreditModal({ open: false, member: null })} okText="确认" width={480} - okButtonProps={{ - disabled: !creditForm.getFieldValue('amount') || creditForm.getFieldValue('amount') <= 0 || creditForm.getFieldValue('amount') > 9999999, - }} >
{/* 显示管理人当前积分 */}