@gientech/modual 2.3.55 → 2.3.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "license": "MIT",
4
4
  "style": "assets/style.css",
5
5
  "private": false,
6
- "version": "2.3.55",
6
+ "version": "2.3.59",
7
7
  "author": "hanfeng_Zhang",
8
8
  "type": "module",
9
9
  "main": "index.js",
@@ -104,9 +104,9 @@
104
104
  "./assets/style.css": "./assets/style.css"
105
105
  },
106
106
  "dependencies": {
107
- "@mxmweb/aichat": "2.2.1",
107
+ "@mxmweb/aichat": "2.2.4",
108
108
  "@mxmweb/fviewer": "1.5.7",
109
- "@mxmweb/rtext": "1.8.1",
109
+ "@mxmweb/rtext": "1.8.4",
110
110
  "@mxmweb/xviewer": "1.4.18",
111
111
  "@mxmweb/zui": "1.4.0",
112
112
  "antd": "^5.18.0",
package/reviewManage.js CHANGED
@@ -1,4 +1,4 @@
1
- import{jsxs as r,jsx as u,Fragment as J}from"react/jsx-runtime";import{useMemo as b,useState as l,useCallback as ke,useEffect as I,useRef as Te}from"react";import{DatePicker as Se,message as o,Select as j,Tooltip as X,Space as Z,Input as D,Table as ee,Pagination as Ne,Modal as f,Tag as ze,Button as A}from"antd";import ae from"styled-components";import{useTheme as Re,deepMergeTheme as te,defaultTheme as Ie,DashboardContainer as je,Icon as Pe}from"@mxmweb/zui";import{A as _e,P as Me}from"./assets/server-BOB675f_.js";import{R as He}from"./assets/QuestionCircleOutlined-BsYIcMyN.js";import{R as ue}from"./assets/SearchOutlined-BFI_fmw7.js";import{T as Ye}from"./assets/triangle-alert-LqO4u4ts.js";import"./assets/DrawerVideo-DE96g9Ht.js";import"./assets/GientechStreamReader-CnAI3q38.js";import"axios";import"@mxmweb/fviewer";import"./assets/createLucideIcon-Bj5DlX2s.js";import"./assets/chevron-right-CrkLSPrQ.js";import"./assets/x-CdZQbi--.js";import"dayjs";import"./assets/index-CpW6Dhpp.js";import"./assets/AntdIcon-Vuhc5UuC.js";const{RangePicker:Oe}=Se,Le={0:{text:"\u5168\u90E8",color:"default"},1:{text:"\u5BA1\u6838\u4E2D",color:"processing"},2:{text:"\u5BA1\u6838\u901A\u8FC7",color:"success"},3:{text:"\u5BA1\u6838\u62D2\u7EDD",color:"error"},4:{text:"\u590D\u5BA1\u4E2D",color:"warning"},5:{text:"\u590D\u5BA1\u901A\u8FC7",color:"success"},6:{text:"\u590D\u5BA1\u62D2\u7EDD",color:"error"}},Ke={1:"\u4E0A\u4F20",2:"\u5220\u9664"},Ue={1:"\u77E5\u8BC6\u5E93",2:"\u6570\u636E\u5E93"},mt=({url:P,token:k,role:_,styles:M,CustomComponents:ne,eventsEmit:T})=>{const H=Re(),ie=b(()=>te(te({theme:Ie,mode:"light"},H||{}),M||{}),[H,M]),[c,x]=l({pageNo:1,pageSize:10}),[d,se]=l([1,4]),[Y,le]=l(""),[O,re]=l(""),[m,L]=l(null),[w,oe]=l([]),[ce,K]=l(!1),[S,de]=l(0),[p,U]=l([]),[me,F]=l(!1),[pe,N]=l(),q=t=>{const e=t.split(".");return e.length>1?e[e.length-1]:""},Q=async(t,e,a)=>{var n,i,s,W,$,G;switch(console.log("[adopter] mergedEventsEmit",t,e,a),t){case"request:error_network":{((s=(i=(n=e==null?void 0:e.error)==null?void 0:n.response)==null?void 0:i.data)==null?void 0:s.errorCode)=="51036"?f.warning({title:"\u5F53\u524D\u6587\u6863\u5DF2\u88AB\u5220\u9664",width:400,content:"\u5F53\u524D\u6587\u6863\u5DF2\u88AB\u5220\u9664\uFF0C\u6570\u636E\u65E0\u9700\u7EE7\u7EED\u5BA1\u6838\u3002",okText:"\u77E5\u9053\u4E86",closable:!1,onOk:async()=>{await v()}}):((G=($=(W=e==null?void 0:e.error)==null?void 0:W.response)==null?void 0:$.data)==null?void 0:G.errorCode)=="51038"&&f.warning({title:"\u5BA1\u6838\u5DF2\u5173\u95ED",width:400,content:"\u8D85\u7EA7\u7BA1\u7406\u5458\u5DF2\u5173\u95ED\u5BA1\u6838\u5F00\u5173\uFF0C\u6570\u636E\u65E0\u9700\u7EE7\u7EED\u5BA1\u6838\u3002",okText:"\u77E5\u9053\u4E86",closable:!1,onOk:async()=>{await v()}});break}default:typeof T=="function"&&T(t,e);break}},ge=b(()=>_e({url:P,token:k,role:_,eventsEmit:Q}),[T,_,k,P]),{getReviewData:he,reviewSingleData:E,batchReview:De,getCovertUrl:fe}=ge,v=ke(async()=>{K(!0);const t=d.includes(1),e=d.includes(4),a=t&&e;try{const n={...c,...d.length>0&&!d.includes(0)?{auditStatuses:d}:{},targetNameFuzzy:Y||void 0,fileNameFuzzy:O||void 0,...d.length>0&&(t||e||a)?{sortOrder:"asc"}:{sortOrder:"desc"}};m&&m[0]&&m[1]&&(n.uploadStartTime=m[0].format("YYYY-MM-DD HH:mm:ss"),n.uploadEndTime=m[1].format("YYYY-MM-DD HH:mm:ss"));const i=await he(n);oe(i.records||[]),de(i.total||0)}catch(n){o.error("\u83B7\u53D6\u5BA1\u6838\u5217\u8868\u5931\u8D25"),console.error(n)}finally{K(!1)}},[c,d,m]);I(()=>{v()},[v]);const g=()=>{x({...c,pageNo:1})},y=()=>{x(t=>({...t,pageNo:1}))},xe=t=>{if(t&&t[0]&&t[1]){const e=t[0].startOf("day"),a=t[1].endOf("day");L([e,a])}else L(null);x(e=>({...e,pageNo:1}))},z=(t,e)=>{x(a=>({...a,pageNo:t,pageSize:e||a.pageSize}))},C=async(t,e)=>{const a=t==null?void 0:t.id;if(a)switch(e){case"first_approve":{await E({instanceId:a,actionTypeCode:1})&&(g(),o.success("\u521D\u5BA1\u901A\u8FC7"));break}case"second_approve":{await E({instanceId:a,actionTypeCode:3})&&(g(),o.success("\u590D\u5BA1\u901A\u8FC7"));break}case"first_reject":{let n="";f.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:u("div",{style:{minHeight:220},children:u(D.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:i=>{n=i.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const i=n.trim();if(!i)return o.warning("\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));a&&await E({instanceId:a,actionTypeCode:2,rejectReason:i})&&(g(),o.success("\u521D\u5BA1\u62D2\u7EDD"))}});break}case"second_reject":{let n="";f.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:u("div",{style:{minHeight:220},children:u(D.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:i=>{n=i.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const i=n.trim();if(!i)return o.warning("\u8BF7\u8F93\u5165\u590D\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));a&&await E({instanceId:a,actionTypeCode:4,rejectReason:i})&&(g(),o.success("\u590D\u5BA1\u62D2\u7EDD"))}});break}default:return}},Ae=async t=>{if(p.length===0){o.warning("\u8BF7\u5148\u9009\u62E9\u6570\u636E");return}if(t)if(t==2||t==4){let e="";f.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:u("div",{style:{minHeight:220},children:u(D.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:a=>{e=a.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const a=e.trim();if(!a)return o.warning("\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));await V({instanceIds:p,actionTypeCode:t,rejectReason:a})}})}else await V({instanceIds:p,actionTypeCode:t})},V=async t=>{var a;const e=await De({...t});e&&(((a=e==null?void 0:e.failedInstances)==null?void 0:a.length)>0?f.warning({title:"\u6279\u91CF\u5BA1\u6838\u5931\u8D25",width:900,content:u(ee,{columns:[{title:"\u6587\u4EF6\u540D",dataIndex:"fileName",key:"fileName",width:195},{title:"\u5BA1\u6838\u5931\u8D25\u539F\u56E0",dataIndex:"failedReason",key:"failedReason",width:195}],dataSource:(e==null?void 0:e.failedInstances)||[],pagination:!1,scroll:{y:400}}),okText:"\u77E5\u9053\u4E86",onOk:async()=>{g()}}):g()),U([])},we=async t=>{const{id:e,fileName:a,fileUrl:n}=t;if(e){const i=q(a);if(["html","txt","jpg","jpeg","png"].includes(i))N({url:n||"",parse_url:n||"",file_type:i,file_name:a||""}),F(!0);else if(["mp4","flv","avi","mkv","video"].includes(i))N({link:n||"",parse_url:n||"",file_type:i,source_name:a||""}),F(!0);else if(["xls","xlsx"].includes(i))Q("reviewmanage_table_action_detail",t);else{const s=await fe(e);s?(N({url:(s==null?void 0:s.convertedFilePath)||"",parse_url:(s==null?void 0:s.convertedFilePath)||"",file_type:i,source_name:a||"",pdfPages:s==null?void 0:s.totalPages}),F(!0)):o.error("\u683C\u5F0F\u8F6C\u6362\u5931\u8D25\uFF0C\u65E0\u6CD5\u9884\u89C8")}}},Fe=t=>{const e=q(t);return e==="pdf"?"rag/pdf":e==="ofd"?"rag/ofd":["doc","docx"].includes(e)?"rag/word":["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(e)?"rag/excel":["ppt","pptx"].includes(e)?"rag/ppt":["txt","md"].includes(e)?"rag/txt":["zip","rar","7z"].includes(e)?"rag/zip":["ofd"].includes(e)?"rag/ofd":["mp4","flv","avi","mkv","video"].includes(e)?"rag/video":"rag/file"},Ee=[{title:"\u5F85\u5BA1\u6838\u6587\u4EF6\u540D",dataIndex:"fileName",key:"fileName",fixed:"left",width:380,render:t=>r(Qe,{children:[u("span",{className:"reviewmanage-filename-icon",children:u(Pe,{type:Fe(t),size:16})}),u("span",{className:"reviewmanage-filename-text",title:t,children:t})]})},{title:"\u4F01\u4E1A\u5E93\u540D",dataIndex:"targetName",key:"targetName",width:180,ellipsis:!0},{title:"\u77E5\u8BC6\u7C7B\u578B",dataIndex:"targetType",key:"targetType",width:100,render:t=>u(ze,{color:t===1?"#C5D8FF":"#BEB8FF",style:{color:"#1D2129"},children:Ue[t]||"\u672A\u77E5"})},{title:"\u64CD\u4F5C\u7C7B\u522B",dataIndex:"operateType",key:"operateType",width:100,render:t=>Ke[t]||"\u672A\u77E5"},{title:"\u5BA1\u6838\u72B6\u6001",dataIndex:"auditStatus",key:"auditStatus",width:150,render:(t,e)=>{const n=Le[t].text;return r(qe,{className:"reviewmanage-status-cell","data-status":n,children:[n==="\u5BA1\u6838\u4E2D"||n==="\u590D\u5BA1\u4E2D"?u("span",{className:"reviewmanage-status-spinner","aria-label":"loading"}):u("span",{className:"reviewmanage-status-dot"}),u("span",{className:"reviewmanage-status-text",children:n}),(n==="\u5BA1\u6838\u62D2\u7EDD"||n==="\u590D\u5BA1\u62D2\u7EDD")&&u(X,{title:(e==null?void 0:e.lastRejectReason)||"",children:u(Ye,{size:14,color:"#FF4D4F"})})]})}},{title:"\u5F55\u5165\u5458",dataIndex:"createBy",key:"createBy",width:130},{title:"\u521D\u5BA1\u4EBA\u5458",dataIndex:"firstAuditor",key:"firstAuditor",width:130},{title:"\u590D\u5BA1\u4EBA\u5458",dataIndex:"secondAuditor",key:"secondAuditor",width:130},{title:"\u4E0A\u4F20\u65F6\u95F4",dataIndex:"uploadTime",key:"uploadTime",width:200},{title:"\u521D\u5BA1\u5BA1\u6838\u65F6\u95F4",dataIndex:"firstAuditTime",key:"firstAuditTime",width:200},{title:"\u590D\u5BA1\u5BA1\u6838\u65F6\u95F4",dataIndex:"secondAuditTime",key:"secondAuditTime",width:200},{title:"\u64CD\u4F5C",key:"action",fixed:"right",width:240,render:(t,e)=>r(Z,{size:"small",children:[e.enableFirstAudit&&(e==null?void 0:e.auditStatus)==1&&r(J,{children:[u(A,{type:"link",size:"small",onClick:()=>C(e,"first_approve"),children:"\u5BA1\u6838\u901A\u8FC7"}),u(A,{type:"link",size:"small",onClick:()=>C(e,"first_reject"),children:"\u5BA1\u6838\u62D2\u7EDD"})]}),e.enableSecondAudit&&(e==null?void 0:e.auditStatus)==4&&r(J,{children:[u(A,{type:"link",size:"small",onClick:()=>C(e,"second_approve"),children:"\u590D\u5BA1\u901A\u8FC7"}),u(A,{type:"link",size:"small",onClick:()=>C(e,"second_reject"),children:"\u590D\u5BA1\u62D2\u7EDD"})]}),u(A,{type:"link",size:"small",onClick:()=>we(e),children:"\u67E5\u770B"})]})}],ve=(t,e)=>{const{auditStatus:a,operateType:n,enableFirstAudit:i,enableSecondAudit:s}=t;return n==1?!((a==1||a==4)&&(i||s)):!0},ye={selectedRowKeys:p,fixed:!0,onChange:t=>{U(t)},getCheckboxProps:t=>({disabled:ve(t)})},h=b(()=>w.filter(t=>p.includes(t.id)),[w,p]),Ce=b(()=>{var t;if((h==null?void 0:h.length)>0){const e=(t=h[0])==null?void 0:t.auditStatus;return h.every(n=>(n==null?void 0:n.auditStatus)===e)?[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1,disabled:e==4},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2,disabled:e==4},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3,disabled:e==1},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4,disabled:e==1}]:[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1,disabled:!0},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2,disabled:!0},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3,disabled:!0},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4,disabled:!0}]}return[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4}]},[h]),[Be,be]=l(55),R=Te(null),B=()=>{if(!R.current)return;const t=R.current.clientHeight;console.log("+++++",t);const e=t-54-32,a=Math.floor(e/10),n=Math.min(Math.max(a,40),120);be(n)};return I(()=>(B(),window.addEventListener("resize",B),()=>window.removeEventListener("resize",B)),[]),I(()=>{B()},[w.length]),r(je,{title:"\u5BA1\u6838\u7BA1\u7406",styles:ie,CustomComponents:ne,children:[r("div",{className:"review-manage-component flex flex-col justify-between h-full p-[12px]",style:{backgroundColor:"#fff"},children:[r("div",{className:"flex justify-between",children:[r("div",{children:[u(j,{size:"middle",style:{width:120},placeholder:"\u6279\u91CF\u64CD\u4F5C",options:Ce,onChange:t=>Ae(t)}),u(X,{title:"\u53EA\u6709\u540C\u4E00\u72B6\u6001\u7684\u6587\u6863\u624D\u53EF\u4EE5\u8FDB\u884C\u6279\u91CF\u64CD\u4F5C",children:u(He,{style:{color:"#86909C",marginLeft:10}})})]}),r(Z,{size:"middle",children:[u(j,{mode:"multiple",size:"middle",style:{width:230},placeholder:"\u5BA1\u6838\u72B6\u6001",maxTagCount:"responsive",options:[{label:"\u5BA1\u6838\u4E2D",value:1},{label:"\u5BA1\u6838\u901A\u8FC7",value:2},{label:"\u5BA1\u6838\u62D2\u7EDD",value:3},{label:"\u590D\u5BA1\u4E2D",value:4},{label:"\u590D\u5BA1\u901A\u8FC7",value:5},{label:"\u590D\u5BA1\u62D2\u7EDD",value:6},{label:"\u5168\u90E8",value:0}],value:d,onChange:t=>{se(t),x(e=>({...e,pageNo:1}))}}),u(D,{placeholder:"\u8F93\u5165\u4F01\u4E1A\u5E93\u540D\u641C\u7D22",value:Y,onChange:t=>le(t.target.value),style:{width:200},suffix:u("div",{className:"cursor-pointer",onClick:y,children:u(ue,{style:{color:"#999",fontSize:12}})}),onKeyDown:t=>{t.key==="Enter"&&y()},allowClear:!0}),u(D,{placeholder:"\u8F93\u5165\u5BA1\u6838\u6587\u4EF6\u540D\u641C\u7D22",value:O,onChange:t=>re(t.target.value),style:{width:200},suffix:u("div",{className:"cursor-pointer",onClick:y,children:u(ue,{style:{color:"#999",fontSize:12}})}),onKeyDown:t=>{t.key==="Enter"&&y()},allowClear:!0}),u(Oe,{format:"YYYY-MM-DD",value:m,onChange:xe,placeholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]})]})]}),u("div",{className:"my-[16px]",ref:R,style:{overflowY:"auto",height:"calc(100% - 110px)"},children:u(ee,{rowKey:"id",columns:Ee,dataSource:w,loading:ce,rowSelection:ye,pagination:!1,scroll:{x:1e3},rootClassName:"review-manage-table",components:{body:{cell:({children:t,...e})=>u("td",{...e,style:{...e.style,height:`${Be}px`,padding:"8px 16px",verticalAlign:"middle"},children:t})}}})}),r("div",{className:"flex px-[16px] items-center justify-end gap-2",children:[u("span",{className:"text-sm text-gray-600",children:"\u6BCF\u9875"}),u(j,{value:c.pageSize,options:[{label:"10",value:10},{label:"20",value:20},{label:"50",value:50},{label:"100",value:100}],onChange:t=>z(1,t),style:{width:70}}),u("span",{className:"text-sm text-gray-600",children:"\u6761"}),u(Ne,{current:c.pageNo,pageSize:c.pageSize,total:S,showSizeChanger:!1,showQuickJumper:!1,showTotal:!1,onChange:z}),u("span",{className:"text-sm text-gray-600",children:"\u524D\u5F80"}),u(D,{type:"number",min:1,max:Math.ceil(S/c.pageSize)||1,style:{width:60},onPressEnter:t=>{const e=parseInt(t.target.value),a=Math.ceil(S/c.pageSize)||1;e>=1&&e<=a&&z(e,c.pageSize)}}),u("span",{className:"text-sm text-gray-600",children:"\u9875"})]})]}),u(Me,{open:me,curFileInfo:pe,token:k,onClose:()=>F(!1)})]})},qe=ae.div.attrs({className:"reviewmanage-status-cell"})`
1
+ import{jsxs as r,jsx as u,Fragment as J}from"react/jsx-runtime";import{useMemo as b,useState as l,useCallback as ke,useEffect as I,useRef as Te}from"react";import{DatePicker as Se,message as o,Select as j,Tooltip as X,Space as Z,Input as D,Table as ee,Pagination as Ne,Modal as f,Tag as ze,Button as A}from"antd";import ae from"styled-components";import{useTheme as Re,deepMergeTheme as te,defaultTheme as Ie,DashboardContainer as je,Icon as Pe}from"@mxmweb/zui";import{A as _e,P as Me}from"./assets/server-BOB675f_.js";import{R as He}from"./assets/QuestionCircleOutlined-DCE9HNtM.js";import{R as ue}from"./assets/SearchOutlined-DW1p94FY.js";import{T as Ye}from"./assets/triangle-alert-LqO4u4ts.js";import"./assets/DrawerVideo-DE96g9Ht.js";import"./assets/GientechStreamReader-CnAI3q38.js";import"axios";import"@mxmweb/fviewer";import"./assets/createLucideIcon-Bj5DlX2s.js";import"./assets/chevron-right-CrkLSPrQ.js";import"./assets/x-CdZQbi--.js";import"dayjs";import"./assets/index-CpW6Dhpp.js";import"./assets/AntdIcon-CAOWkvVt.js";const{RangePicker:Oe}=Se,Le={0:{text:"\u5168\u90E8",color:"default"},1:{text:"\u5BA1\u6838\u4E2D",color:"processing"},2:{text:"\u5BA1\u6838\u901A\u8FC7",color:"success"},3:{text:"\u5BA1\u6838\u62D2\u7EDD",color:"error"},4:{text:"\u590D\u5BA1\u4E2D",color:"warning"},5:{text:"\u590D\u5BA1\u901A\u8FC7",color:"success"},6:{text:"\u590D\u5BA1\u62D2\u7EDD",color:"error"}},Ke={1:"\u4E0A\u4F20",2:"\u5220\u9664"},Ue={1:"\u77E5\u8BC6\u5E93",2:"\u6570\u636E\u5E93"},mt=({url:P,token:k,role:_,styles:M,CustomComponents:ne,eventsEmit:T})=>{const H=Re(),ie=b(()=>te(te({theme:Ie,mode:"light"},H||{}),M||{}),[H,M]),[c,x]=l({pageNo:1,pageSize:10}),[d,se]=l([1,4]),[Y,le]=l(""),[O,re]=l(""),[m,L]=l(null),[w,oe]=l([]),[ce,K]=l(!1),[S,de]=l(0),[p,U]=l([]),[me,F]=l(!1),[pe,N]=l(),q=t=>{const e=t.split(".");return e.length>1?e[e.length-1]:""},Q=async(t,e,a)=>{var n,i,s,W,$,G;switch(console.log("[adopter] mergedEventsEmit",t,e,a),t){case"request:error_network":{((s=(i=(n=e==null?void 0:e.error)==null?void 0:n.response)==null?void 0:i.data)==null?void 0:s.errorCode)=="51036"?f.warning({title:"\u5F53\u524D\u6587\u6863\u5DF2\u88AB\u5220\u9664",width:400,content:"\u5F53\u524D\u6587\u6863\u5DF2\u88AB\u5220\u9664\uFF0C\u6570\u636E\u65E0\u9700\u7EE7\u7EED\u5BA1\u6838\u3002",okText:"\u77E5\u9053\u4E86",closable:!1,onOk:async()=>{await v()}}):((G=($=(W=e==null?void 0:e.error)==null?void 0:W.response)==null?void 0:$.data)==null?void 0:G.errorCode)=="51038"&&f.warning({title:"\u5BA1\u6838\u5DF2\u5173\u95ED",width:400,content:"\u8D85\u7EA7\u7BA1\u7406\u5458\u5DF2\u5173\u95ED\u5BA1\u6838\u5F00\u5173\uFF0C\u6570\u636E\u65E0\u9700\u7EE7\u7EED\u5BA1\u6838\u3002",okText:"\u77E5\u9053\u4E86",closable:!1,onOk:async()=>{await v()}});break}default:typeof T=="function"&&T(t,e);break}},ge=b(()=>_e({url:P,token:k,role:_,eventsEmit:Q}),[T,_,k,P]),{getReviewData:he,reviewSingleData:E,batchReview:De,getCovertUrl:fe}=ge,v=ke(async()=>{K(!0);const t=d.includes(1),e=d.includes(4),a=t&&e;try{const n={...c,...d.length>0&&!d.includes(0)?{auditStatuses:d}:{},targetNameFuzzy:Y||void 0,fileNameFuzzy:O||void 0,...d.length>0&&(t||e||a)?{sortOrder:"asc"}:{sortOrder:"desc"}};m&&m[0]&&m[1]&&(n.uploadStartTime=m[0].format("YYYY-MM-DD HH:mm:ss"),n.uploadEndTime=m[1].format("YYYY-MM-DD HH:mm:ss"));const i=await he(n);oe(i.records||[]),de(i.total||0)}catch(n){o.error("\u83B7\u53D6\u5BA1\u6838\u5217\u8868\u5931\u8D25"),console.error(n)}finally{K(!1)}},[c,d,m]);I(()=>{v()},[v]);const g=()=>{x({...c,pageNo:1})},y=()=>{x(t=>({...t,pageNo:1}))},xe=t=>{if(t&&t[0]&&t[1]){const e=t[0].startOf("day"),a=t[1].endOf("day");L([e,a])}else L(null);x(e=>({...e,pageNo:1}))},z=(t,e)=>{x(a=>({...a,pageNo:t,pageSize:e||a.pageSize}))},C=async(t,e)=>{const a=t==null?void 0:t.id;if(a)switch(e){case"first_approve":{await E({instanceId:a,actionTypeCode:1})&&(g(),o.success("\u521D\u5BA1\u901A\u8FC7"));break}case"second_approve":{await E({instanceId:a,actionTypeCode:3})&&(g(),o.success("\u590D\u5BA1\u901A\u8FC7"));break}case"first_reject":{let n="";f.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:u("div",{style:{minHeight:220},children:u(D.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:i=>{n=i.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const i=n.trim();if(!i)return o.warning("\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));a&&await E({instanceId:a,actionTypeCode:2,rejectReason:i})&&(g(),o.success("\u521D\u5BA1\u62D2\u7EDD"))}});break}case"second_reject":{let n="";f.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:u("div",{style:{minHeight:220},children:u(D.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:i=>{n=i.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const i=n.trim();if(!i)return o.warning("\u8BF7\u8F93\u5165\u590D\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));a&&await E({instanceId:a,actionTypeCode:4,rejectReason:i})&&(g(),o.success("\u590D\u5BA1\u62D2\u7EDD"))}});break}default:return}},Ae=async t=>{if(p.length===0){o.warning("\u8BF7\u5148\u9009\u62E9\u6570\u636E");return}if(t)if(t==2||t==4){let e="";f.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:u("div",{style:{minHeight:220},children:u(D.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:a=>{e=a.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const a=e.trim();if(!a)return o.warning("\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));await V({instanceIds:p,actionTypeCode:t,rejectReason:a})}})}else await V({instanceIds:p,actionTypeCode:t})},V=async t=>{var a;const e=await De({...t});e&&(((a=e==null?void 0:e.failedInstances)==null?void 0:a.length)>0?f.warning({title:"\u6279\u91CF\u5BA1\u6838\u5931\u8D25",width:900,content:u(ee,{columns:[{title:"\u6587\u4EF6\u540D",dataIndex:"fileName",key:"fileName",width:195},{title:"\u5BA1\u6838\u5931\u8D25\u539F\u56E0",dataIndex:"failedReason",key:"failedReason",width:195}],dataSource:(e==null?void 0:e.failedInstances)||[],pagination:!1,scroll:{y:400}}),okText:"\u77E5\u9053\u4E86",onOk:async()=>{g()}}):g()),U([])},we=async t=>{const{id:e,fileName:a,fileUrl:n}=t;if(e){const i=q(a);if(["html","txt","jpg","jpeg","png"].includes(i))N({url:n||"",parse_url:n||"",file_type:i,file_name:a||""}),F(!0);else if(["mp4","flv","avi","mkv","video"].includes(i))N({link:n||"",parse_url:n||"",file_type:i,source_name:a||""}),F(!0);else if(["xls","xlsx"].includes(i))Q("reviewmanage_table_action_detail",t);else{const s=await fe(e);s?(N({url:(s==null?void 0:s.convertedFilePath)||"",parse_url:(s==null?void 0:s.convertedFilePath)||"",file_type:i,source_name:a||"",pdfPages:s==null?void 0:s.totalPages}),F(!0)):o.error("\u683C\u5F0F\u8F6C\u6362\u5931\u8D25\uFF0C\u65E0\u6CD5\u9884\u89C8")}}},Fe=t=>{const e=q(t);return e==="pdf"?"rag/pdf":e==="ofd"?"rag/ofd":["doc","docx"].includes(e)?"rag/word":["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(e)?"rag/excel":["ppt","pptx"].includes(e)?"rag/ppt":["txt","md"].includes(e)?"rag/txt":["zip","rar","7z"].includes(e)?"rag/zip":["ofd"].includes(e)?"rag/ofd":["mp4","flv","avi","mkv","video"].includes(e)?"rag/video":"rag/file"},Ee=[{title:"\u5F85\u5BA1\u6838\u6587\u4EF6\u540D",dataIndex:"fileName",key:"fileName",fixed:"left",width:380,render:t=>r(Qe,{children:[u("span",{className:"reviewmanage-filename-icon",children:u(Pe,{type:Fe(t),size:16})}),u("span",{className:"reviewmanage-filename-text",title:t,children:t})]})},{title:"\u4F01\u4E1A\u5E93\u540D",dataIndex:"targetName",key:"targetName",width:180,ellipsis:!0},{title:"\u77E5\u8BC6\u7C7B\u578B",dataIndex:"targetType",key:"targetType",width:100,render:t=>u(ze,{color:t===1?"#C5D8FF":"#BEB8FF",style:{color:"#1D2129"},children:Ue[t]||"\u672A\u77E5"})},{title:"\u64CD\u4F5C\u7C7B\u522B",dataIndex:"operateType",key:"operateType",width:100,render:t=>Ke[t]||"\u672A\u77E5"},{title:"\u5BA1\u6838\u72B6\u6001",dataIndex:"auditStatus",key:"auditStatus",width:150,render:(t,e)=>{const n=Le[t].text;return r(qe,{className:"reviewmanage-status-cell","data-status":n,children:[n==="\u5BA1\u6838\u4E2D"||n==="\u590D\u5BA1\u4E2D"?u("span",{className:"reviewmanage-status-spinner","aria-label":"loading"}):u("span",{className:"reviewmanage-status-dot"}),u("span",{className:"reviewmanage-status-text",children:n}),(n==="\u5BA1\u6838\u62D2\u7EDD"||n==="\u590D\u5BA1\u62D2\u7EDD")&&u(X,{title:(e==null?void 0:e.lastRejectReason)||"",children:u(Ye,{size:14,color:"#FF4D4F"})})]})}},{title:"\u5F55\u5165\u5458",dataIndex:"createBy",key:"createBy",width:130},{title:"\u521D\u5BA1\u4EBA\u5458",dataIndex:"firstAuditor",key:"firstAuditor",width:130},{title:"\u590D\u5BA1\u4EBA\u5458",dataIndex:"secondAuditor",key:"secondAuditor",width:130},{title:"\u4E0A\u4F20\u65F6\u95F4",dataIndex:"uploadTime",key:"uploadTime",width:200},{title:"\u521D\u5BA1\u5BA1\u6838\u65F6\u95F4",dataIndex:"firstAuditTime",key:"firstAuditTime",width:200},{title:"\u590D\u5BA1\u5BA1\u6838\u65F6\u95F4",dataIndex:"secondAuditTime",key:"secondAuditTime",width:200},{title:"\u64CD\u4F5C",key:"action",fixed:"right",width:240,render:(t,e)=>r(Z,{size:"small",children:[e.enableFirstAudit&&(e==null?void 0:e.auditStatus)==1&&r(J,{children:[u(A,{type:"link",size:"small",onClick:()=>C(e,"first_approve"),children:"\u5BA1\u6838\u901A\u8FC7"}),u(A,{type:"link",size:"small",onClick:()=>C(e,"first_reject"),children:"\u5BA1\u6838\u62D2\u7EDD"})]}),e.enableSecondAudit&&(e==null?void 0:e.auditStatus)==4&&r(J,{children:[u(A,{type:"link",size:"small",onClick:()=>C(e,"second_approve"),children:"\u590D\u5BA1\u901A\u8FC7"}),u(A,{type:"link",size:"small",onClick:()=>C(e,"second_reject"),children:"\u590D\u5BA1\u62D2\u7EDD"})]}),u(A,{type:"link",size:"small",onClick:()=>we(e),children:"\u67E5\u770B"})]})}],ve=(t,e)=>{const{auditStatus:a,operateType:n,enableFirstAudit:i,enableSecondAudit:s}=t;return n==1?!((a==1||a==4)&&(i||s)):!0},ye={selectedRowKeys:p,fixed:!0,onChange:t=>{U(t)},getCheckboxProps:t=>({disabled:ve(t)})},h=b(()=>w.filter(t=>p.includes(t.id)),[w,p]),Ce=b(()=>{var t;if((h==null?void 0:h.length)>0){const e=(t=h[0])==null?void 0:t.auditStatus;return h.every(n=>(n==null?void 0:n.auditStatus)===e)?[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1,disabled:e==4},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2,disabled:e==4},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3,disabled:e==1},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4,disabled:e==1}]:[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1,disabled:!0},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2,disabled:!0},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3,disabled:!0},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4,disabled:!0}]}return[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4}]},[h]),[Be,be]=l(55),R=Te(null),B=()=>{if(!R.current)return;const t=R.current.clientHeight;console.log("+++++",t);const e=t-54-32,a=Math.floor(e/10),n=Math.min(Math.max(a,40),120);be(n)};return I(()=>(B(),window.addEventListener("resize",B),()=>window.removeEventListener("resize",B)),[]),I(()=>{B()},[w.length]),r(je,{title:"\u5BA1\u6838\u7BA1\u7406",styles:ie,CustomComponents:ne,children:[r("div",{className:"review-manage-component flex flex-col justify-between h-full p-[12px]",style:{backgroundColor:"#fff"},children:[r("div",{className:"flex justify-between",children:[r("div",{children:[u(j,{size:"middle",style:{width:120},placeholder:"\u6279\u91CF\u64CD\u4F5C",options:Ce,onChange:t=>Ae(t)}),u(X,{title:"\u53EA\u6709\u540C\u4E00\u72B6\u6001\u7684\u6587\u6863\u624D\u53EF\u4EE5\u8FDB\u884C\u6279\u91CF\u64CD\u4F5C",children:u(He,{style:{color:"#86909C",marginLeft:10}})})]}),r(Z,{size:"middle",children:[u(j,{mode:"multiple",size:"middle",style:{width:230},placeholder:"\u5BA1\u6838\u72B6\u6001",maxTagCount:"responsive",options:[{label:"\u5BA1\u6838\u4E2D",value:1},{label:"\u5BA1\u6838\u901A\u8FC7",value:2},{label:"\u5BA1\u6838\u62D2\u7EDD",value:3},{label:"\u590D\u5BA1\u4E2D",value:4},{label:"\u590D\u5BA1\u901A\u8FC7",value:5},{label:"\u590D\u5BA1\u62D2\u7EDD",value:6},{label:"\u5168\u90E8",value:0}],value:d,onChange:t=>{se(t),x(e=>({...e,pageNo:1}))}}),u(D,{placeholder:"\u8F93\u5165\u4F01\u4E1A\u5E93\u540D\u641C\u7D22",value:Y,onChange:t=>le(t.target.value),style:{width:200},suffix:u("div",{className:"cursor-pointer",onClick:y,children:u(ue,{style:{color:"#999",fontSize:12}})}),onKeyDown:t=>{t.key==="Enter"&&y()},allowClear:!0}),u(D,{placeholder:"\u8F93\u5165\u5BA1\u6838\u6587\u4EF6\u540D\u641C\u7D22",value:O,onChange:t=>re(t.target.value),style:{width:200},suffix:u("div",{className:"cursor-pointer",onClick:y,children:u(ue,{style:{color:"#999",fontSize:12}})}),onKeyDown:t=>{t.key==="Enter"&&y()},allowClear:!0}),u(Oe,{format:"YYYY-MM-DD",value:m,onChange:xe,placeholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]})]})]}),u("div",{className:"my-[16px]",ref:R,style:{overflowY:"auto",height:"calc(100% - 110px)"},children:u(ee,{rowKey:"id",columns:Ee,dataSource:w,loading:ce,rowSelection:ye,pagination:!1,scroll:{x:1e3},rootClassName:"review-manage-table",components:{body:{cell:({children:t,...e})=>u("td",{...e,style:{...e.style,height:`${Be}px`,padding:"8px 16px",verticalAlign:"middle"},children:t})}}})}),r("div",{className:"flex px-[16px] items-center justify-end gap-2",children:[u("span",{className:"text-sm text-gray-600",children:"\u6BCF\u9875"}),u(j,{value:c.pageSize,options:[{label:"10",value:10},{label:"20",value:20},{label:"50",value:50},{label:"100",value:100}],onChange:t=>z(1,t),style:{width:70}}),u("span",{className:"text-sm text-gray-600",children:"\u6761"}),u(Ne,{current:c.pageNo,pageSize:c.pageSize,total:S,showSizeChanger:!1,showQuickJumper:!1,showTotal:!1,onChange:z}),u("span",{className:"text-sm text-gray-600",children:"\u524D\u5F80"}),u(D,{type:"number",min:1,max:Math.ceil(S/c.pageSize)||1,style:{width:60},onPressEnter:t=>{const e=parseInt(t.target.value),a=Math.ceil(S/c.pageSize)||1;e>=1&&e<=a&&z(e,c.pageSize)}}),u("span",{className:"text-sm text-gray-600",children:"\u9875"})]})]}),u(Me,{open:me,curFileInfo:pe,token:k,onClose:()=>F(!1)})]})},qe=ae.div.attrs({className:"reviewmanage-status-cell"})`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  gap: 6px;
package/reviewSetting.js CHANGED
@@ -1 +1 @@
1
- import"react/jsx-runtime";import"react";import"styled-components";import"@mxmweb/xviewer";import"antd";import"@mxmweb/zui";import{R as g}from"./assets/ReviewSetting-BE-nCaCT.js";/* empty css */import"./assets/ExclamationCircleFilled-iFno81Rg.js";import"./assets/search-CEuIa9-_.js";import"axios";import"./assets/x-CdZQbi--.js";import"./assets/createLucideIcon-Bj5DlX2s.js";import"./assets/chevron-right-CrkLSPrQ.js";import"./assets/plus-B679mjyt.js";import"./assets/AntdIcon-Vuhc5UuC.js";export{g as default};
1
+ import"react/jsx-runtime";import"react";import"styled-components";import"@mxmweb/xviewer";import"antd";import"@mxmweb/zui";import{R as g}from"./assets/ReviewSetting-Dxtpuyr1.js";/* empty css */import"./assets/ExclamationCircleFilled-BDa8DeZo.js";import"./assets/search-CEuIa9-_.js";import"axios";import"./assets/x-CdZQbi--.js";import"./assets/createLucideIcon-Bj5DlX2s.js";import"./assets/chevron-right-CrkLSPrQ.js";import"./assets/plus-B679mjyt.js";import"./assets/AntdIcon-CAOWkvVt.js";export{g as default};
@@ -1,63 +0,0 @@
1
- import*as C from"react";import U,{createContext as Tt,useContext as Mt,useEffect as jt}from"react";function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H.apply(null,arguments)}function Pt(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function me(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}function Y(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function At(e,t){if(e){if(typeof e=="string")return Y(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y(e,t):void 0}}function Nt(e){if(Array.isArray(e))return e}function kt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,s=[],c=!0,f=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(l){f=!0,i=l}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}function Rt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ct(e,t){return Nt(e)||kt(e,t)||At(e,t)||Rt()}function b(e){"@babel/helpers - typeof";return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(e)}function Et(e,t){if(b(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(b(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function It(e){var t=Et(e,"string");return b(t)=="symbol"?t:t+""}function d(e,t,r){return(t=It(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J(Object(r),!0).forEach(function(n){d(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $t(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Dt(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}var X="data-rc-order",Z="data-rc-priority",Lt="rc-util-key",A=new Map;function ft(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):Lt}function S(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function Ft(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function G(e){return Array.from((A.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function lt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!$t())return null;var r=t.csp,n=t.prepend,i=t.priority,o=i===void 0?0:i,a=Ft(n),s=a==="prependQueue",c=document.createElement("style");c.setAttribute(X,a),s&&o&&c.setAttribute(Z,"".concat(o)),r!=null&&r.nonce&&(c.nonce=r==null?void 0:r.nonce),c.innerHTML=e;var f=S(t),l=f.firstChild;if(n){if(s){var u=(t.styles||G(f)).filter(function(g){if(!["prepend","prependQueue"].includes(g.getAttribute(X)))return!1;var T=Number(g.getAttribute(Z)||0);return o>=T});if(u.length)return f.insertBefore(c,u[u.length-1].nextSibling),c}f.insertBefore(c,l)}else f.appendChild(c);return c}function ut(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=S(t);return(t.styles||G(r)).find(function(n){return n.getAttribute(ft(t))===e})}function be(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=ut(e,t);if(r){var n=S(t);n.removeChild(r)}}function Bt(e,t){var r=A.get(e);if(!r||!Dt(document,r)){var n=lt("",t),i=n.parentNode;A.set(e,i),e.removeChild(n)}}function zt(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=S(r),i=G(n),o=m(m({},r),{},{styles:i});Bt(n,o);var a=ut(t,o);if(a){var s,c;if((s=o.csp)!==null&&s!==void 0&&s.nonce&&a.nonce!==((c=o.csp)===null||c===void 0?void 0:c.nonce)){var f;a.nonce=(f=o.csp)===null||f===void 0?void 0:f.nonce}return a.innerHTML!==e&&(a.innerHTML=e),a}var l=lt(e,o);return l.setAttribute(ft(o),t),l}function ht(e,t){if(e==null)return{};var r,n,i=Pt(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var N={},qt=function(t){};function Wt(e,t){}function Vt(e,t){}function Gt(){N={}}function dt(e,t,r){!t&&!N[r]&&(e(!1,r),N[r]=!0)}function O(e,t){dt(Wt,e,t)}function Kt(e,t){dt(Vt,e,t)}O.preMessage=qt;O.resetWarned=Gt;O.noteOnce=Kt;var gt=Tt({});const h=Math.round;function j(e,t){const r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)n[i]=t(n[i]||0,r[i]||"",i);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const tt=(e,t,r)=>r===0?e:e/100;function v(e,t){const r=t||255;return e>r?r:e<0?0:e}class y{constructor(t){d(this,"isValid",!0),d(this,"r",0),d(this,"g",0),d(this,"b",0),d(this,"a",1),d(this,"_h",void 0),d(this,"_s",void 0),d(this,"_l",void 0),d(this,"_v",void 0),d(this,"_max",void 0),d(this,"_min",void 0),d(this,"_brightness",void 0);function r(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let i=function(o){return n.startsWith(o)};const n=t.trim();/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):i("rgb")?this.fromRgbString(n):i("hsl")?this.fromHslString(n):(i("hsv")||i("hsb"))&&this.fromHsvString(n)}else if(t instanceof y)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=v(t.r),this.g=v(t.g),this.b=v(t.b),this.a=typeof t.a=="number"?v(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const r=t(this.r),n=t(this.g),i=t(this.b);return .2126*r+.7152*n+.0722*i}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=h(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()-t/100;return i<0&&(i=0),this._c({h:r,s:n,l:i,a:this.a})}lighten(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()+t/100;return i>1&&(i=1),this._c({h:r,s:n,l:i,a:this.a})}mix(t,r=50){const n=this._c(t),i=r/100,o=s=>(n[s]-this[s])*i+this[s],a={r:h(o("r")),g:h(o("g")),b:h(o("b")),a:h(o("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const r=this._c(t),n=this.a+r.a*(1-this.a),i=o=>h((this[o]*this.a+r[o]*r.a*(1-this.a))/n);return this._c({r:i("r"),g:i("g"),b:i("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;const n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;const i=(this.b||0).toString(16);if(t+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=h(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),r=h(this.getSaturation()*100),n=h(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){const i=this.clone();return i[t]=v(r,n),i}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const r=t.replace("#","");function n(i,o){return parseInt(r[i]+r[o||i],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a:i}){if(this._h=t%360,this._s=r,this._l=n,this.a=typeof i=="number"?i:1,r<=0){const g=h(n*255);this.r=g,this.g=g,this.b=g}let o=0,a=0,s=0;const c=t/60,f=(1-Math.abs(2*n-1))*r,l=f*(1-Math.abs(c%2-1));c>=0&&c<1?(o=f,a=l):c>=1&&c<2?(o=l,a=f):c>=2&&c<3?(a=f,s=l):c>=3&&c<4?(a=l,s=f):c>=4&&c<5?(o=l,s=f):c>=5&&c<6&&(o=f,s=l);const u=n-f/2;this.r=h((o+u)*255),this.g=h((a+u)*255),this.b=h((s+u)*255)}fromHsv({h:t,s:r,v:n,a:i}){this._h=t%360,this._s=r,this._v=n,this.a=typeof i=="number"?i:1;const o=h(n*255);if(this.r=o,this.g=o,this.b=o,r<=0)return;const a=t/60,s=Math.floor(a),c=a-s,f=h(n*(1-r)*255),l=h(n*(1-r*c)*255),u=h(n*(1-r*(1-c))*255);switch(s){case 0:this.g=u,this.b=f;break;case 1:this.r=l,this.b=f;break;case 2:this.r=f,this.b=u;break;case 3:this.r=f,this.g=l;break;case 4:this.r=u,this.g=f;break;case 5:default:this.g=f,this.b=l;break}}fromHsvString(t){const r=j(t,tt);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=j(t,tt);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=j(t,(n,i)=>i.includes("%")?h(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}}var w=2,et=.16,Qt=.05,Ut=.05,Yt=.15,mt=5,bt=4,Jt=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function rt(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-w*t:Math.round(e.h)+w*t:n=r?Math.round(e.h)+w*t:Math.round(e.h)-w*t,n<0?n+=360:n>=360&&(n-=360),n}function nt(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-et*t:t===bt?n=e.s+et:n=e.s+Qt*t,n>1&&(n=1),r&&t===mt&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function it(e,t,r){var n;return r?n=e.v+Ut*t:n=e.v-Yt*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function Xt(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=new y(e),i=n.toHsv(),o=mt;o>0;o-=1){var a=new y({h:rt(i,o,!0),s:nt(i,o,!0),v:it(i,o,!0)});r.push(a)}r.push(n);for(var s=1;s<=bt;s+=1){var c=new y({h:rt(i,s),s:nt(i,s),v:it(i,s)});r.push(c)}return t.theme==="dark"?Jt.map(function(f){var l=f.index,u=f.amount;return new y(t.backgroundColor||"#141414").mix(r[l],u).toHexString()}):r.map(function(f){return f.toHexString()})}var ye={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},k=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];k.primary=k[5];var R=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];R.primary=R[5];var E=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];E.primary=E[5];var I=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];I.primary=I[5];var $=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];$.primary=$[5];var D=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];D.primary=D[5];var L=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];L.primary=L[5];var F=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];F.primary=F[5];var x=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];x.primary=x[5];var B=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];B.primary=B[5];var z=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];z.primary=z[5];var q=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];q.primary=q[5];var W=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];W.primary=W[5];var pe={red:k,volcano:R,orange:E,gold:I,yellow:$,lime:D,green:L,cyan:F,blue:x,geekblue:B,purple:z,magenta:q,grey:W},P={exports:{}};/*!
3
- Copyright (c) 2018 Jed Watson.
4
- Licensed under the MIT License (MIT), see
5
- http://jedwatson.github.io/classnames
6
- */var ot;function Zt(){return ot||(ot=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(o=i(o,n(s)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var s in o)t.call(o,s)&&o[s]&&(a=i(a,s));return a}function i(o,a){return a?o?o+" "+a:o+a:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(P)),P.exports}var te=Zt();const ee=Ht(te);function yt(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function re(e){return yt(e)instanceof ShadowRoot}function ne(e){return re(e)?yt(e):null}function ie(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function oe(e,t){O(e,"[@ant-design/icons] ".concat(t))}function at(e){return b(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(b(e.icon)==="object"||typeof e.icon=="function")}function st(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:delete t[r],t[ie(r)]=n}return t},{})}function V(e,t,r){return r?U.createElement(e.tag,m(m({key:t},st(e.attrs)),r),(e.children||[]).map(function(n,i){return V(n,"".concat(t,"-").concat(e.tag,"-").concat(i))})):U.createElement(e.tag,m({key:t},st(e.attrs)),(e.children||[]).map(function(n,i){return V(n,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function pt(e){return Xt(e)[0]}function vt(e){return e?Array.isArray(e)?e:[e]:[]}var ae=`
7
- .anticon {
8
- display: inline-flex;
9
- align-items: center;
10
- color: inherit;
11
- font-style: normal;
12
- line-height: 0;
13
- text-align: center;
14
- text-transform: none;
15
- vertical-align: -0.125em;
16
- text-rendering: optimizeLegibility;
17
- -webkit-font-smoothing: antialiased;
18
- -moz-osx-font-smoothing: grayscale;
19
- }
20
-
21
- .anticon > * {
22
- line-height: 1;
23
- }
24
-
25
- .anticon svg {
26
- display: inline-block;
27
- }
28
-
29
- .anticon::before {
30
- display: none;
31
- }
32
-
33
- .anticon .anticon-icon {
34
- display: block;
35
- }
36
-
37
- .anticon[tabindex] {
38
- cursor: pointer;
39
- }
40
-
41
- .anticon-spin::before,
42
- .anticon-spin {
43
- display: inline-block;
44
- -webkit-animation: loadingCircle 1s infinite linear;
45
- animation: loadingCircle 1s infinite linear;
46
- }
47
-
48
- @-webkit-keyframes loadingCircle {
49
- 100% {
50
- -webkit-transform: rotate(360deg);
51
- transform: rotate(360deg);
52
- }
53
- }
54
-
55
- @keyframes loadingCircle {
56
- 100% {
57
- -webkit-transform: rotate(360deg);
58
- transform: rotate(360deg);
59
- }
60
- }
61
- `,se=function(t){var r=Mt(gt),n=r.csp,i=r.prefixCls,o=r.layer,a=ae;i&&(a=a.replace(/anticon/g,i)),o&&(a="@layer ".concat(o,` {
62
- `).concat(a,`
63
- }`)),jt(function(){var s=t.current,c=ne(s);zt(a,"@ant-design-icons",{prepend:!o,csp:n,attachTo:c})},[])},ce=["icon","className","onClick","style","primaryColor","secondaryColor"],_={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function fe(e){var t=e.primaryColor,r=e.secondaryColor;_.primaryColor=t,_.secondaryColor=r||pt(t),_.calculated=!!r}function le(){return m({},_)}var p=function(t){var r=t.icon,n=t.className,i=t.onClick,o=t.style,a=t.primaryColor,s=t.secondaryColor,c=ht(t,ce),f=C.useRef(),l=_;if(a&&(l={primaryColor:a,secondaryColor:s||pt(a)}),se(f),oe(at(r),"icon should be icon definiton, but got ".concat(r)),!at(r))return null;var u=r;return u&&typeof u.icon=="function"&&(u=m(m({},u),{},{icon:u.icon(l.primaryColor,l.secondaryColor)})),V(u.icon,"svg-".concat(u.name),m(m({className:n,onClick:i,style:o,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},c),{},{ref:f}))};p.displayName="IconReact";p.getTwoToneColors=le;p.setTwoToneColors=fe;function Ct(e){var t=vt(e),r=ct(t,2),n=r[0],i=r[1];return p.setTwoToneColors({primaryColor:n,secondaryColor:i})}function ue(){var e=p.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var he=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];Ct(x.primary);var K=C.forwardRef(function(e,t){var r=e.className,n=e.icon,i=e.spin,o=e.rotate,a=e.tabIndex,s=e.onClick,c=e.twoToneColor,f=ht(e,he),l=C.useContext(gt),u=l.prefixCls,g=u===void 0?"anticon":u,T=l.rootClassName,_t=ee(T,g,d(d({},"".concat(g,"-").concat(n.name),!!n.name),"".concat(g,"-spin"),!!i||n.name==="loading"),r),M=a;M===void 0&&s&&(M=-1);var wt=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,xt=vt(c),Q=ct(xt,2),St=Q[0],Ot=Q[1];return C.createElement("span",H({role:"img","aria-label":n.name},f,{ref:t,tabIndex:M,onClick:s,className:_t}),C.createElement(p,{icon:n,primaryColor:St,secondaryColor:Ot,style:wt}))});K.displayName="AntdIcon";K.getTwoToneColor=ue;K.setTwoToneColor=Ct;export{y as F,K as I,H as _,Y as a,At as b,b as c,ge as d,d as e,ct as f,Ht as g,Wt as h,$t as i,m as j,Nt as k,Rt as l,Xt as m,pe as n,ht as o,ye as p,ee as q,be as r,gt as s,It as t,zt as u,me as v,O as w};