@regenbio/regenbio-components-react 1.4.35 → 1.4.37
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/build/index.js +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
`}))),PFe=e=>{const{setTableLoading:t,responsive:n,styles:r,tableLoading:a,restProps:i,actionRef:o}=(e=>{const[t,n]=(0,u.useState)(),[r,a]=(0,u.useState)(!1),i=(0,u.useRef)(void 0),{request:o,loading:c,columns:s,...l}=e,{styles:f}=AFe();return(0,u.useImperativeHandle)(e.actionRef,(()=>({startLoading:()=>{a(!0)},finishLoading:()=>{a(!1)},...i.current}))),(0,u.useEffect)((()=>{n(e.responsive)}),[e.responsive]),(0,u.useEffect)((()=>{e.loadChange&&e.loadChange.call(void 0,r)}),[r]),{setTableLoading:a,responsive:t,styles:f,tableLoading:r,restProps:l,actionRef:i}})(e);return(0,l.jsx)(LFe,{tableClassName:r.customTable,scroll:{x:1300},rowKey:"guid",search:{labelWidth:120},loading:a,columns:e.columns.map((e=>{const t={...e};return t.fixed=!n&&t.fixed,e})),request:async(n,r,a)=>{let i;t(!0);try{i=await e.request.call(void 0,n,r,a)}finally{t(!1)}return i},...i,actionRef:o},"dragTable"+n)},RFe=f().forwardRef((({fieldProps:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,options:c,...s},f)=>{const d={options:c,mode:a||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label",...e},h=(0,u.useContext)($Pe.FieldContext);return(0,l.jsx)($Pe.ProFormField,{valueEnum:vBe(i),params:n,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:{getPopupContainer:h.getPopupContainer,...d},ref:f,proFieldProps:r,...s,children:t})})),jFe=f().forwardRef((({widthControl:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,...c},s)=>{const{setKeywords:f,onFuzzy:d,start:p,loading:m,context:g,data:y,intl:b,keywords:w}=(({widthControl:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,userType:c,...s})=>{const{intl:l}=v(),f=(0,u.useContext)($Pe.FieldContext),[d,h]=(0,u.useState)([]),[p,m]=(0,u.useState)(),[g,y]=(0,u.useState)(!1),[b,w]=(0,u.useState)(!1),x=async e=>{y(!0);const t=f.formRef?.current?.getFieldValue(s.name);let n;n=H.isNotNull(t)?await o(e,Array.isArray(t)?t:[t],void 0,c):await o(e,[],void 0,c),1===n.code?h(n.data):h([]),y(!1)};return(0,u.useEffect)((()=>{(async()=>{w(!0),await x(null),w(!1)})()}),[]),(0,u.useEffect)((()=>{if(e){const e=document.getElementsByClassName("ant-form-item-control");for(const t of e){const e=t.getElementsByClassName("ant-col ant-form-item-control");for(const t of e)t.style.maxWidth="none"}}}),[b,e]),{setKeywords:m,onFuzzy:x,start:b,loading:g,context:f,data:d,intl:l,keywords:p}})({widthControl:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,...c});return(0,l.jsx)($Pe.ProFormField,{valueEnum:vBe(i),params:n,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:p?{value:null,loading:m,mode:a,getPopupContainer:g.getPopupContainer,defaultActiveFirstOption:!1,labelRender:e=>e.title,optionRender:e=>{const t=e.data;return(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"default",src:c.avatarPreview(t.avatar),children:t.name[0]}),(0,l.jsxs)(h.Space,{direction:"vertical",size:0,children:[(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{children:t.name}),t.alias&&(0,l.jsx)("span",{children:"("+t.alias+")"})]}),(0,l.jsx)("span",{style:{fontSize:"0.875rem"},children:t.phone})]})]})},options:(y||[]).map((e=>({...e,value:e.guid,label:e.name,title:(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"small",src:c.avatarPreview(e.avatar),children:e.name[0]}),(0,l.jsx)("span",{children:(0,l.jsx)("span",{children:e.name})})]})}))),dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(h.Divider,{style:{marginTop:"0.5rem",marginBottom:"0.5rem",marginLeft:"0rem",marginRight:"0rem"}}),(0,l.jsxs)(h.Space.Compact,{style:{width:"100%"},children:[(0,l.jsx)(h.Input,{placeholder:b.formatMessage({id:"components.user-selector.placeholder",defaultMessage:"请输入关键字"}),onKeyDown:e=>e.stopPropagation(),value:w,onChange:e=>{f(e.target.value)}}),(0,l.jsx)(h.Button,{loading:m,type:"primary",onClick:()=>{d(w)},children:b.formatMessage({id:"components.user-selector.search",defaultMessage:"搜索"})})]})]})}:{loading:m,mode:a,getPopupContainer:g.getPopupContainer,defaultActiveFirstOption:!1,labelRender:e=>e.label,optionRender:e=>{const t=e.data;return(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"default",src:c.avatarPreview(t.avatar),children:t.name[0]}),(0,l.jsxs)(h.Space,{direction:"vertical",size:0,children:[(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{children:t.name}),t.alias&&(0,l.jsx)("span",{children:"("+t.alias+")"})]}),(0,l.jsx)("span",{style:{fontSize:"0.875rem"},children:t.phone})]})]})},options:(y||[]).map((e=>({...e,value:e.guid,label:(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"small",src:c.avatarPreview(e.avatar),children:e.name[0]}),(0,l.jsx)("span",{children:(0,l.jsx)("span",{children:e.name})})]}),title:e.name}))),dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(h.Divider,{style:{marginTop:"0.5rem",marginBottom:"0.5rem",marginLeft:"0rem",marginRight:"0rem"}}),(0,l.jsxs)(h.Space.Compact,{style:{width:"100%"},children:[(0,l.jsx)(h.Input,{placeholder:b.formatMessage({id:"components.user-selector.placeholder",defaultMessage:"请输入关键字"}),onKeyDown:e=>e.stopPropagation(),value:w,onChange:e=>{f(e.target.value)}}),(0,l.jsx)(h.Button,{loading:m,type:"primary",onClick:()=>{d(w)},children:b.formatMessage({id:"components.user-selector.search",defaultMessage:"搜索"})})]})]})},ref:s,proFieldProps:r,...c,children:t})})),HFe=RFe,BFe=jFe;BFe.SearchSelect=HFe,BFe.displayName="ProFormComponent";const VFe=BFe;function NFe(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function IFe(e,t){return e.reduce(((e,n,r)=>{const a=t.get(n);return a&&(e[r]=a),e}),Array(e.length))}function FFe(e){return null!==e&&e>=0}const DFe=e=>{let{rects:t,activeIndex:n,overIndex:r,index:a}=e;const i=NFe(t,r,n),o=t[a],c=i[a];return c&&o?{x:c.left-o.left,y:c.top-o.top,scaleX:c.width/o.width,scaleY:c.height/o.height}:null},$Fe={scaleX:1,scaleY:1},WFe=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:a,rects:i,overIndex:o}=e;const c=null!=(t=i[n])?t:r;if(!c)return null;if(a===n){const e=i[o];return e?{x:0,y:n<o?e.top+e.height-(c.top+c.height):e.top-c.top,...$Fe}:null}const s=function(e,t,n){const r=e[t],a=e[t-1],i=e[t+1];return r?n<t?a?r.top-(a.top+a.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):a?r.top-(a.top+a.height):0:0}(i,a,n);return a>n&&a<=o?{x:0,y:-c.height-s,...$Fe}:a<n&&a>=o?{x:0,y:c.height+s,...$Fe}:{x:0,y:0,...$Fe}},qFe="Sortable",UFe=f().createContext({activeIndex:-1,containerId:qFe,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:DFe,disabled:{draggable:!1,droppable:!1}});function GFe(e){let{children:t,id:n,items:r,strategy:a=DFe,disabled:i=!1}=e;const{active:o,dragOverlay:c,droppableRects:s,over:l,measureDroppableContainers:d}=nFe(),h=hNe(qFe,n),p=Boolean(null!==c.rect),v=(0,u.useMemo)((()=>r.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[r]),m=null!=o,g=o?v.indexOf(o.id):-1,y=l?v.indexOf(l.id):-1,b=(0,u.useRef)(v),w=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(v,b.current),x=-1!==y&&-1===g||w,M=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(i);oNe((()=>{w&&m&&d(v)}),[w,v,m,d]),(0,u.useEffect)((()=>{b.current=v}),[v]);const k=(0,u.useMemo)((()=>({activeIndex:g,containerId:h,disabled:M,disableTransforms:x,items:v,overIndex:y,useDragOverlay:p,sortedRects:IFe(v,s),strategy:a})),[g,h,M.draggable,M.droppable,x,v,y,s,p,a]);return f().createElement(UFe.Provider,{value:k},t)}const KFe=e=>{let{id:t,items:n,activeIndex:r,overIndex:a}=e;return NFe(n,r,a).indexOf(t)},YFe=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:a,items:i,newIndex:o,previousItems:c,previousContainerId:s,transition:l}=e;return!(!l||!r||c!==i&&a===o||!n&&(o===a||t!==s))},XFe={duration:200,easing:"ease"},ZFe="transform",QFe=bNe.Transition.toString({property:ZFe,duration:0,easing:"linear"}),JFe={roleDescription:"sortable"};lIe.Down,lIe.Right,lIe.Up,lIe.Left;const eDe=e=>{const{setNodeRef:t,style:n,isDragging:r,attributes:a,listeners:i}=(e=>{const{attributes:t,listeners:n,setNodeRef:r,transform:a,transition:i,isDragging:o}=function(e){let{animateLayoutChanges:t=YFe,attributes:n,disabled:r,data:a,getNewIndex:i=KFe,id:o,strategy:c,resizeObserverConfig:s,transition:l=XFe}=e;const{items:f,containerId:d,activeIndex:h,disabled:p,disableTransforms:v,sortedRects:m,overIndex:g,useDragOverlay:y,strategy:b}=(0,u.useContext)(UFe),w=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,p),x=f.indexOf(o),M=(0,u.useMemo)((()=>({sortable:{containerId:d,index:x,items:f},...a})),[d,a,x,f]),k=(0,u.useMemo)((()=>f.slice(f.indexOf(o))),[f,o]),{rect:O,node:z,isOver:_,setNodeRef:S}=aFe({id:o,data:M,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:k,...s}}),{active:E,activatorEvent:C,activeNodeRect:T,attributes:L,setNodeRef:A,listeners:P,isDragging:R,over:j,setActivatorNodeRef:H,transform:B}=tFe({id:o,data:M,attributes:{...JFe,...n},disabled:w.draggable}),V=ZVe(S,A),N=Boolean(E),I=N&&!v&&FFe(h)&&FFe(g),F=!y&&R,D=F&&I?B:null,$=I?null!=D?D:(null!=c?c:b)({rects:m,activeNodeRect:T,activeIndex:h,overIndex:g,index:x}):null,W=FFe(h)&&FFe(g)?i({id:o,items:f,activeIndex:h,overIndex:g}):x,q=null==E?void 0:E.id,U=(0,u.useRef)({activeId:q,items:f,newIndex:W,containerId:d}),G=f!==U.current.items,K=t({active:E,containerId:d,isDragging:R,isSorting:N,id:o,index:x,items:f,newIndex:U.current.newIndex,previousItems:U.current.items,previousContainerId:U.current.containerId,transition:l,wasDragging:null!=U.current.activeId}),Y=function(e){let{disabled:t,index:n,node:r,rect:a}=e;const[i,o]=(0,u.useState)(null),c=(0,u.useRef)(n);return oNe((()=>{if(!t&&n!==c.current&&r.current){const e=a.current;if(e){const t=$Ne(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==c.current&&(c.current=n)}),[t,n,r,a]),(0,u.useEffect)((()=>{i&&o(null)}),[i]),i}({disabled:!K,index:x,node:z,rect:O});return(0,u.useEffect)((()=>{N&&U.current.newIndex!==W&&(U.current.newIndex=W),d!==U.current.containerId&&(U.current.containerId=d),f!==U.current.items&&(U.current.items=f)}),[N,W,d,f]),(0,u.useEffect)((()=>{if(q===U.current.activeId)return;if(null!=q&&null==U.current.activeId)return void(U.current.activeId=q);const e=setTimeout((()=>{U.current.activeId=q}),50);return()=>clearTimeout(e)}),[q]),{active:E,activeIndex:h,attributes:L,data:M,rect:O,index:x,newIndex:W,items:f,isOver:_,isSorting:N,isDragging:R,listeners:P,node:z,overIndex:g,over:j,setNodeRef:V,setActivatorNodeRef:H,setDroppableNodeRef:S,setDraggableNodeRef:A,transform:null!=Y?Y:$,transition:Y||G&&U.current.newIndex===x?QFe:F&&!gNe(C)||!l?void 0:N||K?bNe.Transition.toString({...l,property:ZFe}):void 0}}({id:e.file.uid});return{setNodeRef:r,style:{transform:bNe.Translate.toString(a),transition:i,cursor:"move"},isDragging:o,attributes:t,listeners:n}})(e);return(0,l.jsx)("div",{ref:t,style:n,className:r?"is-dragging":"",...a,...i,children:"error"===e.file.status&&r?e.originNode.props.children:e.originNode})},tDe=e=>{const{fileList:t,sensor:n,globalFunctions:r,onDragEnd:a,onChange:i}=(e=>{const{globalFunctions:t}=v(),[n,r]=(0,u.useState)([]),a=LNe(wIe,{activationConstraint:{distance:10}});return(0,u.useEffect)((()=>{e.value?r(e.value.map((e=>({uid:e.guid,status:"done",name:e.name,url:t.getPreviewUrl.call(void 0,e.guid)})))):r([])}),[e.value]),{fileList:n,sensor:a,globalFunctions:t,onDragEnd:({active:t,over:r})=>{if(t.id!==r?.id){const a=n.findIndex((e=>e.uid===t.id)),i=n.findIndex((e=>e.uid===r?.id));e.onChange(NFe(n,a,i).filter((e=>"done"===e.status)).map((e=>({name:e.name,guid:e.uid}))))}},onChange:({file:t,fileList:n})=>{"done"===t.status?t.response&&1===t.response.code?(e.onChange(n.filter((e=>"done"===e.status)).map((e=>e.uid===t.uid?{name:e.name,guid:t.response.data.guid}:{name:e.name,guid:e.uid}))),e.afterSuccess?.call(void 0)):(r(n.map((e=>e.uid===t.uid?{...e,status:"error"}:e))),e.afterFail?.call(void 0,t.response.message)):"removed"===t.status?(r(n),e.onChange(n.filter((e=>"done"===e.status)).map((e=>({name:e.name,guid:e.uid}))))):r(n)}}})(e);return(0,l.jsx)(QIe,{sensors:[n],onDragEnd:a,children:(0,l.jsx)(GFe,{items:t.map((e=>e.uid)),strategy:WFe,children:(0,l.jsx)(h.Upload,{action:r.getUploadUrl.call(void 0,e.fileCode),fileList:t,listType:"picture",onChange:i,maxCount:e.maxCount,itemRender:(e,t)=>(0,l.jsx)(eDe,{originNode:e,file:t}),headers:{Authorization:e.headers?.accessToken,Language:e.headers?.locale,"Client-Id":e.headers?.clientId},children:e.children??(0,l.jsx)(h.Button,{icon:(0,l.jsx)(FTe,{}),children:e.placeholder})})})})},nDe=e=>{const{label:t,name:n,tooltip:r,rules:a,...i}=e;return(0,l.jsx)($Pe.ProFormItem,{label:t,name:n,style:void 0===t&&{marginBottom:0},tooltip:r,rules:a,children:(0,l.jsx)(tDe,{...e})})},rDe=e=>{const{intl:t,inputRef:n}=(()=>{const{intl:e,globalFunctions:t}=v();return{intl:e,globalFunctions:t,inputRef:(0,u.useRef)(null)}})();return(0,l.jsxs)(d.ProCard,{style:e.style,className:e.className,bodyStyle:{padding:10},bordered:!0,onClick:()=>{n&&n.current.focus()},children:[(0,l.jsx)($Pe.ProFormItem,{name:e.contentName,style:{marginBottom:0},children:(0,l.jsx)(h.Input.TextArea,{showCount:!0,autoSize:!0,maxLength:e.maxLength,ref:n,variant:"borderless",placeholder:e.placeholder})}),(0,l.jsx)(nDe,{name:e.fileName,fileCode:e.configCode,maxCount:e.maxFile,afterFail:e.afterFail,afterSuccess:e.afterSuccess,headers:e.headers,children:(0,l.jsx)(h.Tooltip,{title:t.formatMessage({id:"components.attachment-text.appendix",defaultMessage:"点击上传附件"}),children:(0,l.jsx)(h.Button,{type:"text",icon:(0,l.jsx)(ige,{})})})})]})},aDe=lVe,iDe=e=>{const{mode:t,loading:n,initialState:r,headerHeight:a,token:i}=(()=>{const{initialState:e}=v(),t="mix"!==e.settings.layout?0:e?.settings?.token?.header?.heightLayoutHeader??56,{token:n}=h.theme.useToken(),[r,a]=(0,u.useState)(Wt.getThemeMode()),[i,o]=(0,u.useState)(!0);return(0,u.useEffect)((()=>{const e=e=>{e="light"===e?"light":"realDark",Wt.setThemeMode(e),a(void 0),setTimeout((()=>{a(e)}),1)};return setTimeout((()=>{o(!1)}),800),Bt.eventEmitter.on(Nt.THEME_MODE,e),()=>{Bt.eventEmitter.off(Nt.THEME_MODE,e)}}),[]),{mode:r,loading:i,initialState:e,headerHeight:t,token:n}})();return t&&(0,l.jsx)(h.Watermark,{content:e.watermark,children:(0,l.jsx)(aDe,{onResize:t=>{e.onResponsive?.call(void 0,t.width<(e.responsiveWidth??i.screenSM)),e.onResize?.call(void 0,t)},children:(0,l.jsx)("div",{ref:e.scrollbarsRef,style:{height:0===a?"100vh":`calc(100vh - ${a}px)`,overflow:"auto"},children:(0,l.jsxs)(d.PageContainer,{...e,children:[(0,l.jsx)(d.ProCard,{ghost:!(!1!==e.animate&&e.loadDuringAnimate&&n||e.loading),className:!1===e.animate?"":`animate__animated animate__${e.animate??"fadeInRight"} animate__fast`,loading:!1!==e.animate&&e.loadDuringAnimate&&n||e.loading,children:e.children}),r?.currentTheme?.copyright&&(0,l.jsx)(d.DefaultFooter,{copyright:r?.currentTheme?.copyright,links:r?.currentTheme?.links.map(((e,t)=>({key:`${t}`,title:e.key,href:e.value,blankTarget:!0}))),style:{background:"none"}})]})})})})},oDe=e=>{const{isChild:t}=(e=>{const[t,n]=(0,u.useState)(!0);return(0,u.useLayoutEffect)((()=>{n(!e.location.endsWith(e.path))}),[e.location]),{isChild:t}})(e);return t?e.children:e.home};var cDe=n(8365),sDe=n(1552),lDe=n(5072),uDe=n.n(lDe),fDe=n(7825),dDe=n.n(fDe),hDe=n(7659),pDe=n.n(hDe),vDe=n(5056),mDe=n.n(vDe),gDe=n(540),yDe=n.n(gDe),bDe=n(1113),wDe=n.n(bDe),xDe=n(2795),MDe={};MDe.styleTagTransform=wDe(),MDe.setAttributes=mDe(),MDe.insert=pDe().bind(null,"head"),MDe.domAPI=dDe(),MDe.insertStyleElement=yDe(),uDe()(xDe.A,MDe),xDe.A&&xDe.A.locals&&xDe.A.locals;const kDe=new sDe.Converter({tables:!0,simplifiedAutoLink:!0,strikethrough:!0,tasklists:!0}),ODe=e=>{const{intl:t,selectedTab:n,setSelectedTab:r}=(()=>{const{intl:e}=v(),[t,n]=(0,u.useState)("write");return{intl:e,selectedTab:t,setSelectedTab:n}})();return(0,l.jsx)(cDe.default,{childProps:{writeButton:{style:{color:"black",paddingRight:4,paddingLeft:4}},previewButton:{style:{color:"black",paddingRight:4,paddingLeft:4}},textArea:{style:{color:"black",minHeight:"400px"}}},value:e.value,onChange:e.onChange,selectedTab:n,onTabChange:r,l18n:{write:t.formatMessage({id:"components.markdown-editor.write",defaultMessage:"编辑"}),preview:t.formatMessage({id:"components.markdown-editor.preview",defaultMessage:"预览"}),uploadingImage:t.formatMessage({id:"components.markdown-editor.uploading-image",defaultMessage:"上传图片"}),pasteDropSelect:t.formatMessage({id:"components.markdown-editor.paste-drop-select",defaultMessage:"粘贴下拉选择"})},generateMarkdownPreview:e=>Promise.resolve(kDe.makeHtml(e))})},zDe=e=>{const{intl:t,globalFunctions:n,loading:r,fileList:a,handleRemove:i,handleChange:o}=(e=>{const[t,n]=(0,u.useState)(!1),[r,a]=(0,u.useState)([]),{intl:i,globalFunctions:o}=v();return(0,u.useEffect)((()=>{!e.value||Array.isArray(e.value)&&e.value.length<1?a([]):e.purity?a([{uid:e.value,url:o.getPreviewUrl.call(void 0,e.value),status:"done",name:""}]):a(e.value)}),[e.value]),{intl:i,globalFunctions:o,loading:t,fileList:r,handleRemove:()=>(e.purity?e.onChange(void 0):e.onChange([]),!0),handleChange:t=>{a(t.fileList),"uploading"!==t.file.status?"done"===t.file.status&&(t.file.response&&1===t.file.response.code?(e.purity?e.onChange(t.file.response.data.guid):e.onChange([{uid:t.file.response.data.guid,name:t.file.name,status:"done",url:o.getPreviewUrl.call(void 0,t.file.response.data.guid)}]),e.afterSuccess?.call(void 0)):(e.onChange(void 0),e.afterFail?.call(void 0,t.file.response.message)),n(!1)):n(!0)}}})(e),{mode:c}=(0,u.useContext)(d.ProForm.EditOrReadOnlyContext);return"read"===c&&void 0===e.value?(0,l.jsx)("span",{children:"-"}):(0,l.jsx)(h.Upload,{disabled:"read"===c,name:"file",listType:e.listType??"picture-card",action:n.getUploadUrl.call(void 0,e.fileCode),headers:{Authorization:e.headers?.accessToken,Language:e.headers?.locale,"Client-Id":e.headers?.clientId},fileList:a,onRemove:i,onChange:o,children:(()=>{if(r)return;if(Array.isArray(e.value)){if(e.value.length>0)return}else if($t.isNotNullAndUndefined(e.value))return;const n=(0,l.jsxs)("button",{style:{border:0,background:"none"},type:"button",children:[r?(0,l.jsx)(Ghe,{}):(0,l.jsx)(Wye,{}),(0,l.jsx)("div",{style:{marginTop:8},children:t.formatMessage({id:"components.single-image-uploader.upload-button",defaultMessage:"单击上传"})})]});return"picture-card"!==e.listType?(0,l.jsx)(h.Upload,{listType:"picture-card",openFileDialogOnClick:!1,children:n}):n})()})},_De=e=>(0,l.jsx)($Pe.ProFormItem,{label:e.label,name:e.name,tooltip:e.tooltip,rules:e.rules,children:(0,l.jsx)(zDe,{...e})}),SDe=e=>e.childrenRender?e.childrenRender(e.children,e.messageHolder,e.notificationHolder,e.globalState):e.children,EDe=e=>{const[t,n]=h.message.useMessage(),[r,a]=h.notification.useNotification();return(0,u.useEffect)((()=>{const e=({level:e,content:n})=>t[e](n),n=({level:e,config:t})=>r[e](t);return Bt.eventEmitter.on(Nt.MESSAGE,e),Bt.eventEmitter.on(Nt.NOTIFICATION,n),()=>{Bt.eventEmitter.off(Nt.MESSAGE,e),Bt.eventEmitter.off(Nt.NOTIFICATION,n)}}),[e]),{messageHolder:n,notificationHolder:a}},CDe=(e,t)=>e.map((({path:e,guid:n,icon:r,children:a,hideStatus:i,i18n:o,...c})=>{const s=o.filter((e=>e.locale===t));let u;return u=s.length>0?s[0].name:o[0].name,{...c,name:u,hideInMenu:0===i,icon:r&&(0,l.jsx)(FPe,{name:r}),children:a&&CDe(a,t),key:n,path:e}})),TDe=(e,t,n)=>{e&&t&&e.forEach((e=>{t.includes(e.key)&&!e.hideInMenu&&n.push(e),e.children&&TDe(e.children,t,n)}))},LDe=(e,t)=>{const n=Wt.getQuickMethod(t),r=[];return TDe(e,n,r),r.map(((e,t)=>({key:t,icon:e.icon,title:e.name,url:e.path})))},ADe=async e=>{const t=async()=>{let t;try{t=await e.getUserInitDetail.call(void 0)}catch(t){return void jDe.executeLogout(e.history,e.loginLoadPath)}if(1===t.code&&t.data){const n=t.data;return n.menuList&&(n.menuList=CDe(n.menuList,e.getLocale.call(void 0))),n.avatar&&(n.avatar=e.getPreviewUrl.call(void 0,n.avatar)),n}jDe.executeLogout(e.history,e.loginLoadPath)},n=async()=>{const t=await e.getCurrentThemeDetail.call(void 0);if(1===t.code&&t.data){if(t.data.favicons){const n=document.querySelector("link[rel*='icon']")||document.createElement("link");n.type="image/x-icon",n.rel="shortcut icon",n.href=e.getPreviewUrl.call(void 0,t.data.favicons),document.getElementsByTagName("head")[0].appendChild(n)}return t.data}},{location:r}=e.history,a=Wt.getThemeMode(),i=e.defaultSettings;return i.navTheme=a,r.pathname.endsWith(e.loginLoadPath)?{settings:i,currentTheme:await n(),fetchUserInfo:t,fetchThemeInfo:n}:{settings:i,currentUser:await t(),currentTheme:await n(),fetchUserInfo:t,fetchThemeInfo:n}},PDe=e=>{const{messageHolder:t,notificationHolder:n}=EDe(),{layout:r,splitMenus:a,title:i,logo:o,...c}=e.globalState.initialState?.settings??{},s=window.__POWERED_BY_QIANKUN__?"side":r;return(0,u.useEffect)((()=>{const t=Wt.getThemeMode();e.globalState.initialState?.settings.navTheme&&e.globalState.initialState?.settings.navTheme!==t&&e.setInitialState.call(void 0,(n=>{const r=(0,D.cloneDeep)(e.globalState.initialState.settings);return r.navTheme=t,{...n,settings:r}}));const n=t=>{e.setInitialState.call(void 0,(n=>{const r=(0,D.cloneDeep)(e.globalState.initialState.settings);return r.navTheme=t,{...n,settings:r}}))};return Bt.eventEmitter.on(Nt.THEME_MODE,n),()=>{Bt.eventEmitter.off(Nt.THEME_MODE,n)}}),[e.globalState.initialState?.settings.navTheme]),{menu:{locale:!1,request:()=>e.globalState.initialState.currentUser.menuList},actionsRender:()=>window.__POWERED_BY_QIANKUN__?[]:[...e.headerOperations??[],(0,l.jsx)(qt,{},"theme"),f().cloneElement(e.selectLang,{key:"localeChange"})],avatarProps:{src:e.globalState.initialState?.currentUser?.avatar,title:f().cloneElement(e.avatarName,{key:"avatarName"}),render:(t,n)=>f().cloneElement(e.avatarDropdown,{key:"avatarDropdown"},n)},footerRender:void 0,onPageChange:t=>{e.globalState.initialState?.currentUser||t.pathname.endsWith(e.loginLoadPath)||e.history.push(e.loginLoadPath)},bgLayoutImgList:[{src:e.globalState.globalFunctions.getPreviewUrl(e.globalState.initialState?.currentTheme?.backgroundImg),bottom:0,left:0,height:"100%"}],appList:LDe(e.globalState.initialState?.currentUser?.menuList,e.clientId),links:[],menuHeaderRender:void 0,childrenRender:r=>(0,l.jsx)(SDe,{...e,currentLayout:s,messageHolder:t,notificationHolder:n,children:r}),layout:s,splitMenus:!window.__POWERED_BY_QIANKUN__&&a,title:e.globalState.initialState?.currentTheme?.title??i,logo:e.globalState.globalFunctions.getPreviewUrl(e.globalState.initialState?.currentTheme?.icon)??o,...c}};var RDe=n(7186);const jDe={convertPageParam:async(e,t,n,r)=>{const a={...t};void 0!==a.current&&(a.pageNum=a.current,a.current=void 0),n&&(a.sort=n),a.filter=r;for(const e in a)Array.isArray(a[e])&&(a[e]=String(a[e]));const i=await e(a);return 1===i.code?{data:i.data,success:!0,total:i.total}:{data:i.message,success:!1,total:i.total}},downloadFile:(e,t)=>{if(!e)return;const n=document.createElement("a");n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},executeLogout:(e,t)=>{const{search:n,pathname:r}=window.location,a=new URL(window.location.href).searchParams.get("redirect");window.location.pathname.endsWith(t)||a||e.replace({pathname:t,search:(0,RDe.stringify)({redirect:r+n})})},getOAuth2Url:(e,t,n,r,a)=>{const i=new URL(`${n}/authorization/oauth2/authorize?`);for(const e in r)"client_secret"!==e&&i.searchParams.set(e,r[e]);let o;const c=new URL(window.location.href);return c.searchParams.delete("code"),c.searchParams.delete("state"),a&&c.searchParams.set("redirect",a),o=c.toString(),i.searchParams.set("redirect_uri",o),i.searchParams.set("state",JSON.stringify({locale:e,theme:t})),i.toString()},getExternalAuthUrl:(e,t,n,r,a,i)=>{const o=new URL(e),c=new URL(window.location.href);return c.search="",c.pathname=a,o.searchParams.set("redirect_uri",c.toString()),o.searchParams.set("state",JSON.stringify({locale:t,theme:n,external_guid:r,user_guid:i})),o.toString().replace(/%3A/g,":")},getExternalAuthUrl4Auth:function(e,t,n,r,a){const i=new URL(t),o=new URL(e);return i.searchParams.set("redirect_uri",o.toString()),i.searchParams.set("state",JSON.stringify({locale:n,theme:r,external_guid:a})),i.toString().replace(/%3A/g,":")}},HDe=e=>{const{intl:t,initialState:n}=v(),[r,a]=(0,u.useState)(void 0),i=async()=>{const t=await(n?.fetchUserInfo?.call(void 0));t&&(0,TBe.flushSync)((()=>{e.setInitialState.call(void 0,(e=>({...e,currentUser:t})))}));const r=await(n?.fetchThemeInfo?.call(void 0));r&&(0,TBe.flushSync)((()=>{e.setInitialState.call(void 0,(e=>({...e,currentTheme:r})))}))},o=async(t,n)=>{if(1===t.code){if(L.getDb().delete(),Wt.setToken(t.data),await i(),window.__POWERED_BY_QIANKUN__){const{pathname:t}=window.location,r=t.replace(e.loginLoadPath,"");r&&n.redirect.startsWith(r)&&(n.redirect=n.redirect.replace(new RegExp(`^${r}`),""))}e.onFinish.call(void 0,n.redirect,void 0)}else a(t.message)},c=(e,t)=>{const n=document.createElement("script");n.src=e,n.async=!0,n.onload=t,document.body.appendChild(n)};return(0,u.useEffect)((()=>{(async()=>{const t=(()=>{const t=e.searchParams.get("code"),n=e.searchParams.get("state"),r=e.searchParams.get("redirect")??"/";let a=null,i=null,o=null,c=null;if(n){let e;try{e=JSON.parse(n)}catch{e=null}e&&(a=e.locale,i=e.theme,o=e.external_guid,c=e.user_guid)}return{code:t,state:n,redirect:r,locale:a,theme:i,externalGuid:o,userGuid:c}})();t.locale&&e.setLocale.call(void 0,t.locale,!1),t.theme&&Wt.setThemeMode("realDark"===t.theme?"realDark":"light"),t.code?t.externalGuid&&t.userGuid?(async t=>{const n=new URL(window.location.href);n.search="";const r=await e.bindExternalData.call(void 0,{guid:t.externalGuid,code:t.code,redirectUrl:n.toString()}),a=Wt.getBeforeExternalBindPathname();if(1===r.code){await i();const t=r.data.i18n.filter((t=>e.locale===t.locale));e.onFinish.call(void 0,void 0!==a?a:"/user-center",{external:t[0].title,externalBindResult:!0})}else e.onFinish.call(void 0,void 0!==a?a:"/user-center",{external:r.message,externalBindResult:!1})})(t):(async t=>{let n;if(t.externalGuid){const r=new URL(window.location.href),a=new URLSearchParams;r.searchParams.has("redirect")&&a.set("redirect",r.searchParams.get("redirect")),r.search=a.toString(),n=await e.getTokenByCode.call(void 0,{code:t.code,external_guid:t.externalGuid,external_redirect_uri:encodeURIComponent(r.toString())})}else n=await e.getTokenByCode.call(void 0,{code:t.code});await o(n,t)})(t):(t=>{if(Wt.getActiveLogout())return Wt.removeToken(),void(window.location.href=jDe.getOAuth2Url(e.locale,Wt.getThemeMode(),e.gatewayUrl,e.clientConfig,t.redirect));if(!e.externalIntegrationConfig||e.externalIntegrationConfig.length<1)return Wt.removeToken(),void(window.location.href=jDe.getOAuth2Url(e.locale,Wt.getThemeMode(),e.gatewayUrl,e.clientConfig,t.redirect));for(const n of e.externalIntegrationConfig)"feishu"===n.platform&&c("https://lf1-cdn-tos.bytegoofy.com/goofy/lark/op/h5-js-sdk-1.5.26.js",(()=>{window.h5sdk&&window.tt.requestAccess?window.tt.requestAccess({appID:n.appId,scopeList:[],success:async({code:r})=>{const a=new URL(window.location.href);a.search="";const i=await e.getTokenByCode.call(void 0,{code:r,external_client_id:n.appId,external_redirect_uri:a.toString(),platform:n.platform});await o(i,t)},fail:({errString:e})=>{a(e)}}):window.location.href=jDe.getOAuth2Url(e.locale,Wt.getThemeMode(),e.gatewayUrl,e.clientConfig,t.redirect)}))})(t)})()}),[]),{setExceptionMsg:a,exceptionMsg:r,intl:t}},BDe=h.Result,VDe=e=>{const{setExceptionMsg:t,exceptionMsg:n,intl:r}=HDe(e);return(0,l.jsx)(l.Fragment,{children:void 0===n?(0,l.jsx)(h.Spin,{percent:"auto",size:"large"}):(0,l.jsx)(BDe,{status:"500",title:n,extra:(0,l.jsx)(h.Button,{type:"primary",onClick:()=>{t(void 0),window.location.href=jDe.getOAuth2Url(e.locale,Wt.getThemeMode(),e.gatewayUrl,e.clientConfig)},children:r.formatMessage({id:"components.auth-frame.operation.back-auth",defaultMessage:"返回授权页面"})})})})},NDe=e=>{const{setCurrent:t,setLoading:n,steps:r,mailStep:a,externalStep:i,current:o,loading:c,externalBind:s}=(e=>{const{intl:t}=v(),[n,r]=(0,u.useState)(!1),[a,i]=(0,u.useState)({}),[o,c]=(0,u.useState)([]),[s,f]=(0,u.useState)(0),[d,h]=(0,u.useState)(),[p,m]=(0,u.useState)(),[g,y]=(0,u.useState)();return(0,u.useEffect)((()=>{(async()=>{const n=await e.getUserForceBind.call(void 0),r=[];1===n.code?(n.data&&(n.data.mailForce&&(r.push({title:t.formatMessage({id:"components.bind-frame.title.mail-force",defaultMessage:"绑定邮箱"}),icon:(0,l.jsx)(yG,{})}),h(r.length-1)),n.data.passwordForce&&(r.push({title:t.formatMessage({id:"components.bind-frame.title.password-force",defaultMessage:"重置密码"}),icon:(0,l.jsx)(Jhe,{})}),m(r.length-1)),n.data.externalForceList&&n.data.externalForceList.length>0&&(r.push({title:t.formatMessage({id:"components.bind-frame.title.external-force",defaultMessage:"绑定外部授权"}),icon:(0,l.jsx)(s0,{})}),y(r.length-1),i(n.data.externalForceList))),c(r)):i([]),r.length<1&&e.onFinish.call(void 0)})()}),[]),{setCurrent:f,setLoading:r,steps:o,mailStep:d,externalStep:g,current:s,loading:n,externalBind:a}})(e);return(0,l.jsx)(l.Fragment,{children:r&&r.length>0?(0,l.jsxs)(AQ,{style:{maxWidth:"36rem"},hoverable:!e.responsive,bordered:!e.responsive,children:[(0,l.jsx)(h.Steps,{size:"small",items:r,current:o}),(0,l.jsx)(h.Divider,{dashed:!0}),void 0!==a&&a===o&&(0,l.jsx)(l.Fragment,{children:f().cloneElement(e.mailBindFrame,{key:"mail-bind-frame",onFinish:n=>{o+1>=r.length?e.onFinish.call(void 0):t(o+1)}})}),void 0!==i&&i===o&&(0,l.jsx)(h.Spin,{spinning:c,children:f().cloneElement(e.externalAuthFrame,{key:"external-auth-frame",externalFilterList:s,onLoadChange:e=>{n(e)}})})]}):(0,l.jsx)(h.Spin,{percent:"auto",size:"large"})})},IDe={setScale:(e,t=2)=>{const n=Math.pow(10,t);return Math.round(e*n)/n}},FDe={randomStr:e=>{let t="";for(let n=0;n<e;n++)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[Math.floor(62*Math.random())];return t}},DDe={fromUnicode:e=>e.replace(/\\u([\dA-Fa-f]{4})/g,((e,t)=>String.fromCharCode(parseInt(t,16)))),toUnicode:e=>encodeURIComponent(e).replace(/%/g,"\\u").replace(/\\u([0-9a-fA-F]{2})/g,((e,t)=>"\\u00"+t))},$De={generateUploadFile:(e,t,n,r)=>{if(e[t]&&e[n])return[{uid:e[n],name:e[t],status:"done",url:r.call(void 0,e[n])}]}},WDe=new Map,qDe=()=>{const{getLocale:e,globalFunctions:t}=v(),n=async n=>{if(WDe.has(n))return WDe.get(n);const r=(async()=>{const r=L.getDb();r.version(1).stores({sys_dict:"++id, type, name, enName, value, color, sort"});let a=await r.sys_dict.where("type").equals(n).sortBy("sort");if(0===a.length){const e=await(t?.getDictDataByType.call(void 0,n));1===e.code&&(a=e.data,a.length>0&&await r.sys_dict.bulkPut(a.map((e=>({...e,type:n})))))}return a.map((t=>{const r=t.i18n.filter((t=>t.locale===e())),a=r.length>0?r[0].name:t.i18n?.[0]?.name;return{type:n,label:a,value:t.value,color:t.color,sort:t.sort}}))})();WDe.set(n,r);try{return await r}finally{WDe.delete(n)}};return{getDataByType:n,getTagDataByType:async e=>(await n(e)).map((e=>({label:(0,l.jsx)(h.Tag,{style:{maxWidth:"100%"},bordered:!0,color:e.color,children:(0,l.jsx)(h.Typography.Text,{ellipsis:{tooltip:e.label},children:e.label})}),value:isNaN(Number(e.value))?e.value:Number(e.value),title:e.label})))}},UDe=()=>({info:e=>Bt.pushMessageEvent("info",e),success:e=>Bt.pushMessageEvent("success",e),error:e=>Bt.pushMessageEvent("error",e),warning:e=>Bt.pushMessageEvent("warning",e),loading:e=>Bt.pushMessageEvent("loading",e)}),GDe=()=>({info:e=>Bt.pushNotificationEvent("info",e),success:e=>Bt.pushNotificationEvent("success",e),error:e=>Bt.pushNotificationEvent("error",e),warning:e=>Bt.pushNotificationEvent("warning",e),loading:e=>Bt.pushNotificationEvent("loading",e)}),KDe=()=>({phoneNumber:e=>{if($t.isNullOrUndefined(e))return"-";const t=e.length;if(t<=3)return e;if(t<=9)return e.slice(0,3)+"*".repeat(t-3);{const n=e.slice(0,3),r=e.slice(-4);return n+"*".repeat(t-7)+r}}}),YDe=()=>{const e=UDe(),t=GDe(),{intl:n}=v();return{trigger:async(r,a,i)=>{try{const o=await r({responseType:"blob",getResponse:!0}),c=o.data;console.log(o.headers);const s=o.headers["content-type"];if(s&&s.includes("application/json"))try{const r=await c.text(),a=JSON.parse(r);return 401===a.code?(e.error(a.message||n.formatMessage({id:"components.use-rb-download.401",defaultMessage:"登录超时或未登录"})),setTimeout((()=>{jDe.executeLogout(history,i)}),2e3)):403===a.code?t.warning({message:a.message||n.formatMessage({id:"components.use-rb-download.403",defaultMessage:"无权限访问"}),description:(0,l.jsx)(h.Typography.Text,{copyable:!0,children:a.data}),duration:null}):e.error(a.message||n.formatMessage({id:"components.use-rb-download.unknown-error",defaultMessage:"发生未知错误"})),!1}catch(t){return console.error("下载内容解析失败:",t),e.error(n.formatMessage({id:"components.use-rb-download.parse-error",defaultMessage:"下载失败,无法解析错误信息"})),!1}const u=o.headers["content-disposition"];let f=a;if(u&&u.includes("filename=")){const e=u.match(/filename\*?=['"]?([^'";]+)['"]?/);if(e?.[1]){const t=u.match(/filename\*=UTF-8''(.+)/);f=t&&t[1]?decodeURIComponent(t[1]):decodeURIComponent(e[1])}}const d=window.URL.createObjectURL(c),p=document.createElement("a");return p.href=d,p.setAttribute("download",f),document.body.appendChild(p),p.click(),p.remove(),window.URL.revokeObjectURL(d),e.success(n.formatMessage({id:"components.use-rb-download.success",defaultMessage:"下载任务已完成"})),!0}catch(t){return console.error("下载请求失败:",t),e.error(n.formatMessage({id:"components.use-rb-download.request-error",defaultMessage:"请求失败,请检查网络连接或联系管理员"})),!1}}}},XDe={outlinedConstants:["StepBackwardOutlined","StepForwardOutlined","FastBackwardOutlined","FastForwardOutlined","ShrinkOutlined","ArrowsAltOutlined","DownOutlined","UpOutlined","LeftOutlined","RightOutlined","CaretUpOutlined","CaretDownOutlined","CaretLeftOutlined","CaretRightOutlined","UpCircleOutlined","DownCircleOutlined","LeftCircleOutlined","RightCircleOutlined","DoubleRightOutlined","DoubleLeftOutlined","VerticalLeftOutlined","VerticalRightOutlined","VerticalAlignTopOutlined","VerticalAlignMiddleOutlined","VerticalAlignBottomOutlined","ForwardOutlined","BackwardOutlined","RollbackOutlined","EnterOutlined","RetweetOutlined","SwapOutlined","SwapLeftOutlined","SwapRightOutlined","ArrowUpOutlined","ArrowDownOutlined","ArrowLeftOutlined","ArrowRightOutlined","PlayCircleOutlined","UpSquareOutlined","DownSquareOutlined","LeftSquareOutlined","RightSquareOutlined","LoginOutlined","LogoutOutlined","MenuFoldOutlined","MenuUnfoldOutlined","BorderBottomOutlined","BorderHorizontalOutlined","BorderInnerOutlined","BorderOuterOutlined","BorderLeftOutlined","BorderRightOutlined","BorderTopOutlined","BorderVerticleOutlined","PicCenterOutlined","PicLeftOutlined","PicRightOutlined","RadiusBottomleftOutlined","RadiusBottomrightOutlined","RadiusUpleftOutlined","RadiusUprightOutlined","FullscreenOutlined","FullscreenExitOutlined","QuestionOutlined","QuestionCircleOutlined","PlusOutlined","PlusCircleOutlined","PauseOutlined","PauseCircleOutlined","MinusOutlined","MinusCircleOutlined","PlusSquareOutlined","MinusSquareOutlined","InfoOutlined","InfoCircleOutlined","ExclamationOutlined","ExclamationCircleOutlined","CloseOutlined","CloseCircleOutlined","CloseSquareOutlined","CheckOutlined","CheckCircleOutlined","CheckSquareOutlined","ClockCircleOutlined","WarningOutlined","IssuesCloseOutlined","StopOutlined","EditOutlined","FormOutlined","CopyOutlined","ScissorOutlined","DeleteOutlined","SnippetsOutlined","DiffOutlined","HighlightOutlined","AlignCenterOutlined","AlignLeftOutlined","AlignRightOutlined","BgColorsOutlined","BoldOutlined","ItalicOutlined","UnderlineOutlined","StrikethroughOutlined","RedoOutlined","UndoOutlined","ZoomInOutlined","ZoomOutOutlined","FontColorsOutlined","FontSizeOutlined","LineHeightOutlined","DashOutlined","SmallDashOutlined","SortAscendingOutlined","SortDescendingOutlined","DragOutlined","OrderedListOutlined","UnorderedListOutlined","RadiusSettingOutlined","ColumnWidthOutlined","ColumnHeightOutlined","AreaChartOutlined","PieChartOutlined","BarChartOutlined","DotChartOutlined","LineChartOutlined","RadarChartOutlined","HeatMapOutlined","FallOutlined","RiseOutlined","StockOutlined","BoxPlotOutlined","FundOutlined","SlidersOutlined","AndroidOutlined","AppleOutlined","WindowsOutlined","IeOutlined","ChromeOutlined","GithubOutlined","AliwangwangOutlined","DingdingOutlined","WeiboSquareOutlined","WeiboCircleOutlined","TaobaoCircleOutlined","Html5Outlined","WeiboOutlined","TwitterOutlined","WechatOutlined","WhatsAppOutlined","YoutubeOutlined","AlipayCircleOutlined","TaobaoOutlined","DingtalkOutlined","SkypeOutlined","QqOutlined","MediumWorkmarkOutlined","GitlabOutlined","MediumOutlined","LinkedinOutlined","GooglePlusOutlined","DropboxOutlined","FacebookOutlined","CodepenOutlined","CodeSandboxOutlined","AmazonOutlined","GoogleOutlined","CodepenCircleOutlined","AlipayOutlined","AntDesignOutlined","AntCloudOutlined","AliyunOutlined","ZhihuOutlined","SlackOutlined","SlackSquareOutlined","BehanceOutlined","BehanceSquareOutlined","DribbbleOutlined","DribbbleSquareOutlined","InstagramOutlined","YuqueOutlined","AlibabaOutlined","YahooOutlined","RedditOutlined","SketchOutlined","AccountBookOutlined","AimOutlined","AlertOutlined","ApartmentOutlined","ApiOutlined","AppstoreAddOutlined","AppstoreOutlined","AudioOutlined","AudioMutedOutlined","AuditOutlined","BankOutlined","BarcodeOutlined","BarsOutlined","BellOutlined","BlockOutlined","BookOutlined","BorderOutlined","BorderlessTableOutlined","BranchesOutlined","BugOutlined","BuildOutlined","BulbOutlined","CalculatorOutlined","CalendarOutlined","CameraOutlined","CarOutlined","CarryOutOutlined","CiCircleOutlined","CiOutlined","ClearOutlined","CloudDownloadOutlined","CloudOutlined","CloudServerOutlined","CloudSyncOutlined","CloudUploadOutlined","ClusterOutlined","CodeOutlined","CoffeeOutlined","CommentOutlined","CompassOutlined","CompressOutlined","ConsoleSqlOutlined","ContactsOutlined","ContainerOutlined","ControlOutlined","CopyrightOutlined","CreditCardOutlined","CrownOutlined","CustomerServiceOutlined","DashboardOutlined","DatabaseOutlined","DeleteColumnOutlined","DeleteRowOutlined","DeliveredProcedureOutlined","DeploymentUnitOutlined","DesktopOutlined","DisconnectOutlined","DislikeOutlined","DollarOutlined","DownloadOutlined","EllipsisOutlined","EnvironmentOutlined","EuroCircleOutlined","EuroOutlined","ExceptionOutlined","ExpandAltOutlined","ExpandOutlined","ExperimentOutlined","ExportOutlined","EyeOutlined","EyeInvisibleOutlined","FieldBinaryOutlined","FieldNumberOutlined","FieldStringOutlined","FieldTimeOutlined","FileAddOutlined","FileDoneOutlined","FileExcelOutlined","FileExclamationOutlined","FileOutlined","FileGifOutlined","FileImageOutlined","FileJpgOutlined","FileMarkdownOutlined","FilePdfOutlined","FilePptOutlined","FileProtectOutlined","FileSearchOutlined","FileSyncOutlined","FileTextOutlined","FileUnknownOutlined","FileWordOutlined","FileZipOutlined","FilterOutlined","FireOutlined","FlagOutlined","FolderAddOutlined","FolderOutlined","FolderOpenOutlined","FolderViewOutlined","ForkOutlined","FormatPainterOutlined","FrownOutlined","FunctionOutlined","FundProjectionScreenOutlined","FundViewOutlined","FunnelPlotOutlined","GatewayOutlined","GifOutlined","GiftOutlined","GlobalOutlined","GoldOutlined","GroupOutlined","HddOutlined","HeartOutlined","HistoryOutlined","HolderOutlined","HomeOutlined","HourglassOutlined","IdcardOutlined","ImportOutlined","InboxOutlined","InsertRowAboveOutlined","InsertRowBelowOutlined","InsertRowLeftOutlined","InsertRowRightOutlined","InsuranceOutlined","InteractionOutlined","KeyOutlined","LaptopOutlined","LayoutOutlined","LikeOutlined","LineOutlined","LinkOutlined","Loading3QuartersOutlined","LoadingOutlined","LockOutlined","MacCommandOutlined","MailOutlined","ManOutlined","MedicineBoxOutlined","MehOutlined","MenuOutlined","MergeCellsOutlined","MessageOutlined","MobileOutlined","MoneyCollectOutlined","MonitorOutlined","MoreOutlined","NodeCollapseOutlined","NodeExpandOutlined","NodeIndexOutlined","NotificationOutlined","NumberOutlined","OneToOneOutlined","PaperClipOutlined","PartitionOutlined","PayCircleOutlined","PercentageOutlined","PhoneOutlined","PictureOutlined","PlaySquareOutlined","PoundCircleOutlined","PoundOutlined","PoweroffOutlined","PrinterOutlined","ProfileOutlined","ProjectOutlined","PropertySafetyOutlined","PullRequestOutlined","PushpinOutlined","QrcodeOutlined","ReadOutlined","ReconciliationOutlined","RedEnvelopeOutlined","ReloadOutlined","RestOutlined","RobotOutlined","RocketOutlined","RotateLeftOutlined","RotateRightOutlined","SafetyCertificateOutlined","SafetyOutlined","SaveOutlined","ScanOutlined","ScheduleOutlined","SearchOutlined","SecurityScanOutlined","SelectOutlined","SendOutlined","SettingOutlined","ShakeOutlined","ShareAltOutlined","ShopOutlined","ShoppingCartOutlined","ShoppingOutlined","SisternodeOutlined","SkinOutlined","SmileOutlined","SolutionOutlined","SoundOutlined","SplitCellsOutlined","StarOutlined","SubnodeOutlined","SwitcherOutlined","SyncOutlined","TableOutlined","TabletOutlined","TagOutlined","TagsOutlined","TeamOutlined","ThunderboltOutlined","ToTopOutlined","ToolOutlined","TrademarkCircleOutlined","TrademarkOutlined","TransactionOutlined","TranslationOutlined","TrophyOutlined","UngroupOutlined","UnlockOutlined","UploadOutlined","UsbOutlined","UserAddOutlined","UserDeleteOutlined","UserOutlined","UserSwitchOutlined","UsergroupAddOutlined","UsergroupDeleteOutlined","VerifiedOutlined","VideoCameraAddOutlined","VideoCameraOutlined","WalletOutlined","WifiOutlined","WomanOutlined"]},ZDe={"components.data-table.pagination.total":"总","components.file-tag.operation.preview-pdf":"预览PDF","components.file-tag.operation.download":"下载","components.user-card.unknown":"未知用户","components.user-card.is-me":"(我)","components.user-card.phone":"手机号码","components.user-card.email":"邮箱地址","components.user-card.sex":"性别","components.user-card.status":"状态","components.user-card.role":"角色","components.user-selector.placeholder":"请输入关键字","components.user-selector.search":"搜索","components.attachment-text.appendix":"点击上传附件","components.markdown-editor.write":"编辑","components.markdown-editor.preview":"预览","components.markdown-editor.uploading-image":"上传图片","components.markdown-editor.paste-drop-select":"粘贴下拉选择","components.single-image-uploader.upload-button":"单击上传","components.auth-frame.operation.back-auth":"返回授权页面","components.bind-frame.title.mail-force":"绑定邮箱","components.bind-frame.title.password-force":"重置密码","components.bind-frame.title.external-force":"绑定外部授权","components.constants.status-list.enable":"启用","components.constants.status-list.disable":"停用","components.constants.sex-list.secret":"保密","components.constants.sex-list.male":"男","components.constants.sex-list.female":"女","components.use-rb-download.401":"登录超时或未登录","components.use-rb-download.403":"无权限访问","components.use-rb-download.unknown-error":"发生未知错误","components.use-rb-download.parse-error":"下载失败,无法解析错误信息","components.use-rb-download.success":"下载任务已完成","components.use-rb-download.request-error":"请求失败,请检查网络连接或联系管理员"},QDe={"components.data-table.pagination.total":"Total","components.file-tag.operation.preview-pdf":"Preview PDF","components.file-tag.operation.download":"Download","components.user-card.unknown":"Unknown user","components.user-card.is-me":"(Me)","components.user-card.phone":"Phone number","components.user-card.email":"Email address","components.user-card.sex":"Gender","components.user-card.status":"Status","components.user-card.role":"Role","components.user-selector.placeholder":"Please enter keywords","components.user-selector.search":"Search","components.attachment-text.appendix":"Click to upload attachment","components.markdown-editor.write":"Edit","components.markdown-editor.preview":"Preview","components.markdown-editor.uploading-image":"Upload image","components.markdown-editor.paste-drop-select":"Paste drop-down selection","components.single-image-uploader.upload-button":"Click Upload","components.auth-frame.operation.back-auth":"Return to Authorization Page","components.bind-frame.title.mail-force":"Bind Email","components.bind-frame.title.password-force":"Reset Password","components.bind-frame.title.external-force":"Bind External Authorization","components.constants.status-list.enable":"Enable","components.constants.status-list.disable":"disable","components.constants.sex-list.secret":"Secret","components.constants.sex-list.male":"Male","components.constants.sex-list.female":"female","components.use-rb-download.401":"Login timed out or not logged in","components.use-rb-download.403":"No permission to access","components.use-rb-download.unknown-error":"An unknown error occurred","components.use-rb-download.parse-error":"Download failed, unable to parse error information","components.use-rb-download.success":"Download task completed","components.use-rb-download.request-error":"Request failed, please check your network connection or contact the administrator"},JDe={RbDataTable:W,RbActionBarItem:U,RbActionBar:G,RbThemeSetter:qt,RbDataChart:_U,RbFileTag:lG,RbUserCard:jQ,RbIconRender:FPe,RbHtmlRender:DPe,RbDragTable:PFe,RbUserSelector:VFe,RbAttachmentText:rDe,RbPageContainer:iDe,RbRouteWrapper:oDe,RbMarkdownConverter:kDe,RbMarkdownEditor:ODe,RbSingleImageUploader:_De,RbAuthFrame:VDe,RbBindFrame:NDe,RbGlobalContext:p,RbDraggableUploader:nDe}})(),module.exports=r})();
|
|
28
|
+
`}))),PFe=e=>{const{setTableLoading:t,responsive:n,styles:r,tableLoading:a,restProps:i,actionRef:o}=(e=>{const[t,n]=(0,u.useState)(),[r,a]=(0,u.useState)(!1),i=(0,u.useRef)(void 0),{request:o,loading:c,columns:s,...l}=e,{styles:f}=AFe();return(0,u.useImperativeHandle)(e.actionRef,(()=>({startLoading:()=>{a(!0)},finishLoading:()=>{a(!1)},...i.current}))),(0,u.useEffect)((()=>{n(e.responsive)}),[e.responsive]),(0,u.useEffect)((()=>{e.loadChange&&e.loadChange.call(void 0,r)}),[r]),{setTableLoading:a,responsive:t,styles:f,tableLoading:r,restProps:l,actionRef:i}})(e);return(0,l.jsx)(LFe,{tableClassName:r.customTable,scroll:{x:1300},rowKey:"guid",search:{labelWidth:120},loading:a,columns:e.columns.map((e=>{const t={...e};return t.fixed=!n&&t.fixed,e})),request:async(n,r,a)=>{let i;t(!0);try{i=await e.request.call(void 0,n,r,a)}finally{t(!1)}return i},...i,actionRef:o},"dragTable"+n)},RFe=f().forwardRef((({fieldProps:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,options:c,...s},f)=>{const d={options:c,mode:a||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label",...e},h=(0,u.useContext)($Pe.FieldContext);return(0,l.jsx)($Pe.ProFormField,{valueEnum:vBe(i),params:n,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:{getPopupContainer:h.getPopupContainer,...d},ref:f,proFieldProps:r,...s,children:t})})),jFe=f().forwardRef((({widthControl:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,...c},s)=>{const{setKeywords:f,onFuzzy:d,start:p,loading:m,context:g,data:y,intl:b,keywords:w}=(({widthControl:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,userType:c,...s})=>{const{intl:l}=v(),f=(0,u.useContext)($Pe.FieldContext),[d,h]=(0,u.useState)([]),[p,m]=(0,u.useState)(),[g,y]=(0,u.useState)(!1),[b,w]=(0,u.useState)(!1),x=async e=>{y(!0);const t=f.formRef?.current?.getFieldValue(s.name);let n;n=H.isNotNull(t)?await o(e,Array.isArray(t)?t:[t],void 0,c):await o(e,[],void 0,c),1===n.code?h(n.data):h([]),y(!1)};return(0,u.useEffect)((()=>{(async()=>{w(!0),await x(null),w(!1)})()}),[]),(0,u.useEffect)((()=>{if(e){const e=document.getElementsByClassName("ant-form-item-control");for(const t of e){const e=t.getElementsByClassName("ant-col ant-form-item-control");for(const t of e)t.style.maxWidth="none"}}}),[b,e]),{setKeywords:m,onFuzzy:x,start:b,loading:g,context:f,data:d,intl:l,keywords:p}})({widthControl:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,...c});return(0,l.jsx)($Pe.ProFormField,{valueEnum:vBe(i),params:n,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:p?{value:null,loading:m,mode:a,getPopupContainer:g.getPopupContainer,defaultActiveFirstOption:!1,labelRender:e=>e.title,optionRender:e=>{const t=e.data;return(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"default",src:c.avatarPreview(t.avatar),children:t.name[0]}),(0,l.jsxs)(h.Space,{direction:"vertical",size:0,children:[(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{children:t.name}),t.alias&&(0,l.jsx)("span",{children:"("+t.alias+")"})]}),(0,l.jsx)("span",{style:{fontSize:"0.875rem"},children:t.phone})]})]})},options:(y||[]).map((e=>({...e,key:e.guid,value:e.guid,label:e.name,title:(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"small",src:c.avatarPreview(e.avatar),children:e.name[0]}),(0,l.jsx)("span",{children:(0,l.jsx)("span",{children:e.name})})]})}))),dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(h.Divider,{style:{marginTop:"0.5rem",marginBottom:"0.5rem",marginLeft:"0rem",marginRight:"0rem"}}),(0,l.jsxs)(h.Space.Compact,{style:{width:"100%"},children:[(0,l.jsx)(h.Input,{placeholder:b.formatMessage({id:"components.user-selector.placeholder",defaultMessage:"请输入关键字"}),onKeyDown:e=>e.stopPropagation(),value:w,onChange:e=>{f(e.target.value)}}),(0,l.jsx)(h.Button,{loading:m,type:"primary",onClick:()=>{d(w)},children:b.formatMessage({id:"components.user-selector.search",defaultMessage:"搜索"})})]})]})}:{loading:m,mode:a,getPopupContainer:g.getPopupContainer,defaultActiveFirstOption:!1,labelRender:e=>e.label,optionRender:e=>{const t=e.data;return(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"default",src:c.avatarPreview(t.avatar),children:t.name[0]}),(0,l.jsxs)(h.Space,{direction:"vertical",size:0,children:[(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{children:t.name}),t.alias&&(0,l.jsx)("span",{children:"("+t.alias+")"})]}),(0,l.jsx)("span",{style:{fontSize:"0.875rem"},children:t.phone})]})]})},options:(y||[]).map((e=>({...e,key:e.guid,value:e.guid,label:(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"small",src:c.avatarPreview(e.avatar),children:e.name[0]}),(0,l.jsx)("span",{children:(0,l.jsx)("span",{children:e.name})})]}),title:e.name}))),dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(h.Divider,{style:{marginTop:"0.5rem",marginBottom:"0.5rem",marginLeft:"0rem",marginRight:"0rem"}}),(0,l.jsxs)(h.Space.Compact,{style:{width:"100%"},children:[(0,l.jsx)(h.Input,{placeholder:b.formatMessage({id:"components.user-selector.placeholder",defaultMessage:"请输入关键字"}),onKeyDown:e=>e.stopPropagation(),value:w,onChange:e=>{f(e.target.value)}}),(0,l.jsx)(h.Button,{loading:m,type:"primary",onClick:()=>{d(w)},children:b.formatMessage({id:"components.user-selector.search",defaultMessage:"搜索"})})]})]})},ref:s,proFieldProps:r,...c,children:t})})),HFe=RFe,BFe=jFe;BFe.SearchSelect=HFe,BFe.displayName="ProFormComponent";const VFe=BFe;function NFe(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function IFe(e,t){return e.reduce(((e,n,r)=>{const a=t.get(n);return a&&(e[r]=a),e}),Array(e.length))}function FFe(e){return null!==e&&e>=0}const DFe=e=>{let{rects:t,activeIndex:n,overIndex:r,index:a}=e;const i=NFe(t,r,n),o=t[a],c=i[a];return c&&o?{x:c.left-o.left,y:c.top-o.top,scaleX:c.width/o.width,scaleY:c.height/o.height}:null},$Fe={scaleX:1,scaleY:1},WFe=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:a,rects:i,overIndex:o}=e;const c=null!=(t=i[n])?t:r;if(!c)return null;if(a===n){const e=i[o];return e?{x:0,y:n<o?e.top+e.height-(c.top+c.height):e.top-c.top,...$Fe}:null}const s=function(e,t,n){const r=e[t],a=e[t-1],i=e[t+1];return r?n<t?a?r.top-(a.top+a.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):a?r.top-(a.top+a.height):0:0}(i,a,n);return a>n&&a<=o?{x:0,y:-c.height-s,...$Fe}:a<n&&a>=o?{x:0,y:c.height+s,...$Fe}:{x:0,y:0,...$Fe}},qFe="Sortable",UFe=f().createContext({activeIndex:-1,containerId:qFe,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:DFe,disabled:{draggable:!1,droppable:!1}});function GFe(e){let{children:t,id:n,items:r,strategy:a=DFe,disabled:i=!1}=e;const{active:o,dragOverlay:c,droppableRects:s,over:l,measureDroppableContainers:d}=nFe(),h=hNe(qFe,n),p=Boolean(null!==c.rect),v=(0,u.useMemo)((()=>r.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[r]),m=null!=o,g=o?v.indexOf(o.id):-1,y=l?v.indexOf(l.id):-1,b=(0,u.useRef)(v),w=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(v,b.current),x=-1!==y&&-1===g||w,M=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(i);oNe((()=>{w&&m&&d(v)}),[w,v,m,d]),(0,u.useEffect)((()=>{b.current=v}),[v]);const k=(0,u.useMemo)((()=>({activeIndex:g,containerId:h,disabled:M,disableTransforms:x,items:v,overIndex:y,useDragOverlay:p,sortedRects:IFe(v,s),strategy:a})),[g,h,M.draggable,M.droppable,x,v,y,s,p,a]);return f().createElement(UFe.Provider,{value:k},t)}const KFe=e=>{let{id:t,items:n,activeIndex:r,overIndex:a}=e;return NFe(n,r,a).indexOf(t)},YFe=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:a,items:i,newIndex:o,previousItems:c,previousContainerId:s,transition:l}=e;return!(!l||!r||c!==i&&a===o||!n&&(o===a||t!==s))},XFe={duration:200,easing:"ease"},ZFe="transform",QFe=bNe.Transition.toString({property:ZFe,duration:0,easing:"linear"}),JFe={roleDescription:"sortable"};lIe.Down,lIe.Right,lIe.Up,lIe.Left;const eDe=e=>{const{setNodeRef:t,style:n,isDragging:r,attributes:a,listeners:i}=(e=>{const{attributes:t,listeners:n,setNodeRef:r,transform:a,transition:i,isDragging:o}=function(e){let{animateLayoutChanges:t=YFe,attributes:n,disabled:r,data:a,getNewIndex:i=KFe,id:o,strategy:c,resizeObserverConfig:s,transition:l=XFe}=e;const{items:f,containerId:d,activeIndex:h,disabled:p,disableTransforms:v,sortedRects:m,overIndex:g,useDragOverlay:y,strategy:b}=(0,u.useContext)(UFe),w=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,p),x=f.indexOf(o),M=(0,u.useMemo)((()=>({sortable:{containerId:d,index:x,items:f},...a})),[d,a,x,f]),k=(0,u.useMemo)((()=>f.slice(f.indexOf(o))),[f,o]),{rect:O,node:z,isOver:_,setNodeRef:S}=aFe({id:o,data:M,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:k,...s}}),{active:E,activatorEvent:C,activeNodeRect:T,attributes:L,setNodeRef:A,listeners:P,isDragging:R,over:j,setActivatorNodeRef:H,transform:B}=tFe({id:o,data:M,attributes:{...JFe,...n},disabled:w.draggable}),V=ZVe(S,A),N=Boolean(E),I=N&&!v&&FFe(h)&&FFe(g),F=!y&&R,D=F&&I?B:null,$=I?null!=D?D:(null!=c?c:b)({rects:m,activeNodeRect:T,activeIndex:h,overIndex:g,index:x}):null,W=FFe(h)&&FFe(g)?i({id:o,items:f,activeIndex:h,overIndex:g}):x,q=null==E?void 0:E.id,U=(0,u.useRef)({activeId:q,items:f,newIndex:W,containerId:d}),G=f!==U.current.items,K=t({active:E,containerId:d,isDragging:R,isSorting:N,id:o,index:x,items:f,newIndex:U.current.newIndex,previousItems:U.current.items,previousContainerId:U.current.containerId,transition:l,wasDragging:null!=U.current.activeId}),Y=function(e){let{disabled:t,index:n,node:r,rect:a}=e;const[i,o]=(0,u.useState)(null),c=(0,u.useRef)(n);return oNe((()=>{if(!t&&n!==c.current&&r.current){const e=a.current;if(e){const t=$Ne(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==c.current&&(c.current=n)}),[t,n,r,a]),(0,u.useEffect)((()=>{i&&o(null)}),[i]),i}({disabled:!K,index:x,node:z,rect:O});return(0,u.useEffect)((()=>{N&&U.current.newIndex!==W&&(U.current.newIndex=W),d!==U.current.containerId&&(U.current.containerId=d),f!==U.current.items&&(U.current.items=f)}),[N,W,d,f]),(0,u.useEffect)((()=>{if(q===U.current.activeId)return;if(null!=q&&null==U.current.activeId)return void(U.current.activeId=q);const e=setTimeout((()=>{U.current.activeId=q}),50);return()=>clearTimeout(e)}),[q]),{active:E,activeIndex:h,attributes:L,data:M,rect:O,index:x,newIndex:W,items:f,isOver:_,isSorting:N,isDragging:R,listeners:P,node:z,overIndex:g,over:j,setNodeRef:V,setActivatorNodeRef:H,setDroppableNodeRef:S,setDraggableNodeRef:A,transform:null!=Y?Y:$,transition:Y||G&&U.current.newIndex===x?QFe:F&&!gNe(C)||!l?void 0:N||K?bNe.Transition.toString({...l,property:ZFe}):void 0}}({id:e.file.uid});return{setNodeRef:r,style:{transform:bNe.Translate.toString(a),transition:i,cursor:"move"},isDragging:o,attributes:t,listeners:n}})(e);return(0,l.jsx)("div",{ref:t,style:n,className:r?"is-dragging":"",...a,...i,children:"error"===e.file.status&&r?e.originNode.props.children:e.originNode})},tDe=e=>{const{fileList:t,sensor:n,globalFunctions:r,onDragEnd:a,onChange:i}=(e=>{const{globalFunctions:t}=v(),[n,r]=(0,u.useState)([]),a=LNe(wIe,{activationConstraint:{distance:10}});return(0,u.useEffect)((()=>{e.value?r(e.value.map((e=>({uid:e.guid,status:"done",name:e.name,url:t.getPreviewUrl.call(void 0,e.guid)})))):r([])}),[e.value]),{fileList:n,sensor:a,globalFunctions:t,onDragEnd:({active:t,over:r})=>{if(t.id!==r?.id){const a=n.findIndex((e=>e.uid===t.id)),i=n.findIndex((e=>e.uid===r?.id));e.onChange(NFe(n,a,i).filter((e=>"done"===e.status)).map((e=>({name:e.name,guid:e.uid}))))}},onChange:({file:t,fileList:n})=>{"done"===t.status?t.response&&1===t.response.code?(e.onChange(n.filter((e=>"done"===e.status)).map((e=>e.uid===t.uid?{name:e.name,guid:t.response.data.guid}:{name:e.name,guid:e.uid}))),e.afterSuccess?.call(void 0)):(r(n.map((e=>e.uid===t.uid?{...e,status:"error"}:e))),e.afterFail?.call(void 0,t.response.message)):"removed"===t.status?(r(n),e.onChange(n.filter((e=>"done"===e.status)).map((e=>({name:e.name,guid:e.uid}))))):r(n)}}})(e);return(0,l.jsx)(QIe,{sensors:[n],onDragEnd:a,children:(0,l.jsx)(GFe,{items:t.map((e=>e.uid)),strategy:WFe,children:(0,l.jsx)(h.Upload,{action:r.getUploadUrl.call(void 0,e.fileCode),fileList:t,listType:"picture",onChange:i,maxCount:e.maxCount,itemRender:(e,t)=>(0,l.jsx)(eDe,{originNode:e,file:t}),headers:{Authorization:e.headers?.accessToken,Language:e.headers?.locale,"Client-Id":e.headers?.clientId},children:e.children??(0,l.jsx)(h.Button,{icon:(0,l.jsx)(FTe,{}),children:e.placeholder})})})})},nDe=e=>{const{label:t,name:n,tooltip:r,rules:a,...i}=e;return(0,l.jsx)($Pe.ProFormItem,{label:t,name:n,style:void 0===t?{marginBottom:0}:void 0,tooltip:r,rules:a,children:(0,l.jsx)(tDe,{...e})})},rDe=e=>{const{intl:t,inputRef:n}=(()=>{const{intl:e,globalFunctions:t}=v();return{intl:e,globalFunctions:t,inputRef:(0,u.useRef)(null)}})();return(0,l.jsxs)(d.ProCard,{style:e.style,className:e.className,bodyStyle:{padding:10},bordered:!0,onClick:()=>{n&&n.current.focus()},children:[(0,l.jsx)($Pe.ProFormItem,{name:e.contentName,style:{marginBottom:0},children:(0,l.jsx)(h.Input.TextArea,{showCount:!0,autoSize:!0,maxLength:e.maxLength,ref:n,variant:"borderless",placeholder:e.placeholder})}),(0,l.jsx)(nDe,{name:e.fileName,fileCode:e.configCode,maxCount:e.maxFile,afterFail:e.afterFail,afterSuccess:e.afterSuccess,headers:e.headers,children:(0,l.jsx)(h.Tooltip,{title:t.formatMessage({id:"components.attachment-text.appendix",defaultMessage:"点击上传附件"}),children:(0,l.jsx)(h.Button,{type:"text",icon:(0,l.jsx)(ige,{})})})})]})},aDe=lVe,iDe=e=>{const{mode:t,loading:n,initialState:r,headerHeight:a,token:i}=(()=>{const{initialState:e}=v(),t="mix"!==e.settings.layout?0:e?.settings?.token?.header?.heightLayoutHeader??56,{token:n}=h.theme.useToken(),[r,a]=(0,u.useState)(Wt.getThemeMode()),[i,o]=(0,u.useState)(!0);return(0,u.useEffect)((()=>{const e=e=>{e="light"===e?"light":"realDark",Wt.setThemeMode(e),a(void 0),setTimeout((()=>{a(e)}),1)};return setTimeout((()=>{o(!1)}),800),Bt.eventEmitter.on(Nt.THEME_MODE,e),()=>{Bt.eventEmitter.off(Nt.THEME_MODE,e)}}),[]),{mode:r,loading:i,initialState:e,headerHeight:t,token:n}})();return t&&(0,l.jsx)(h.Watermark,{content:e.watermark,children:(0,l.jsx)(aDe,{onResize:t=>{e.onResponsive?.call(void 0,t.width<(e.responsiveWidth??i.screenSM)),e.onResize?.call(void 0,t)},children:(0,l.jsx)("div",{ref:e.scrollbarsRef,style:{height:0===a?"100vh":`calc(100vh - ${a}px)`,overflow:"auto"},children:(0,l.jsxs)(d.PageContainer,{...e,children:[(0,l.jsx)(d.ProCard,{ghost:!(!1!==e.animate&&e.loadDuringAnimate&&n||e.loading),className:!1===e.animate?"":`animate__animated animate__${e.animate??"fadeInRight"} animate__fast`,loading:!1!==e.animate&&e.loadDuringAnimate&&n||e.loading,children:e.children}),r?.currentTheme?.copyright&&(0,l.jsx)(d.DefaultFooter,{copyright:r?.currentTheme?.copyright,links:r?.currentTheme?.links.map(((e,t)=>({key:`${t}`,title:e.key,href:e.value,blankTarget:!0}))),style:{background:"none"}})]})})})})},oDe=e=>{const{isChild:t}=(e=>{const[t,n]=(0,u.useState)(!0);return(0,u.useLayoutEffect)((()=>{n(!e.location.endsWith(e.path))}),[e.location]),{isChild:t}})(e);return t?e.children:e.home};var cDe=n(8365),sDe=n(1552),lDe=n(5072),uDe=n.n(lDe),fDe=n(7825),dDe=n.n(fDe),hDe=n(7659),pDe=n.n(hDe),vDe=n(5056),mDe=n.n(vDe),gDe=n(540),yDe=n.n(gDe),bDe=n(1113),wDe=n.n(bDe),xDe=n(2795),MDe={};MDe.styleTagTransform=wDe(),MDe.setAttributes=mDe(),MDe.insert=pDe().bind(null,"head"),MDe.domAPI=dDe(),MDe.insertStyleElement=yDe(),uDe()(xDe.A,MDe),xDe.A&&xDe.A.locals&&xDe.A.locals;const kDe=new sDe.Converter({tables:!0,simplifiedAutoLink:!0,strikethrough:!0,tasklists:!0}),ODe=e=>{const{intl:t,selectedTab:n,setSelectedTab:r}=(()=>{const{intl:e}=v(),[t,n]=(0,u.useState)("write");return{intl:e,selectedTab:t,setSelectedTab:n}})();return(0,l.jsx)(cDe.default,{childProps:{writeButton:{style:{color:"black",paddingRight:4,paddingLeft:4}},previewButton:{style:{color:"black",paddingRight:4,paddingLeft:4}},textArea:{style:{color:"black",minHeight:"400px"}}},value:e.value,onChange:e.onChange,selectedTab:n,onTabChange:r,l18n:{write:t.formatMessage({id:"components.markdown-editor.write",defaultMessage:"编辑"}),preview:t.formatMessage({id:"components.markdown-editor.preview",defaultMessage:"预览"}),uploadingImage:t.formatMessage({id:"components.markdown-editor.uploading-image",defaultMessage:"上传图片"}),pasteDropSelect:t.formatMessage({id:"components.markdown-editor.paste-drop-select",defaultMessage:"粘贴下拉选择"})},generateMarkdownPreview:e=>Promise.resolve(kDe.makeHtml(e))})},zDe=e=>{const{intl:t,globalFunctions:n,loading:r,fileList:a,handleRemove:i,handleChange:o}=(e=>{const[t,n]=(0,u.useState)(!1),[r,a]=(0,u.useState)([]),{intl:i,globalFunctions:o}=v();return(0,u.useEffect)((()=>{!e.value||Array.isArray(e.value)&&e.value.length<1?a([]):e.purity?a([{uid:e.value,url:o.getPreviewUrl.call(void 0,e.value),status:"done",name:""}]):a(e.value)}),[e.value]),{intl:i,globalFunctions:o,loading:t,fileList:r,handleRemove:()=>(e.purity?e.onChange(void 0):e.onChange([]),!0),handleChange:t=>{a(t.fileList),"uploading"!==t.file.status?"done"===t.file.status&&(t.file.response&&1===t.file.response.code?(e.purity?e.onChange(t.file.response.data.guid):e.onChange([{uid:t.file.response.data.guid,name:t.file.name,status:"done",url:o.getPreviewUrl.call(void 0,t.file.response.data.guid)}]),e.afterSuccess?.call(void 0)):(e.onChange(void 0),e.afterFail?.call(void 0,t.file.response.message)),n(!1)):n(!0)}}})(e),{mode:c}=(0,u.useContext)(d.ProForm.EditOrReadOnlyContext);return"read"===c&&void 0===e.value?(0,l.jsx)("span",{children:"-"}):(0,l.jsx)(h.Upload,{disabled:"read"===c,name:"file",listType:e.listType??"picture-card",action:n.getUploadUrl.call(void 0,e.fileCode),headers:{Authorization:e.headers?.accessToken,Language:e.headers?.locale,"Client-Id":e.headers?.clientId},fileList:a,onRemove:i,onChange:o,children:(()=>{if(r)return;if(Array.isArray(e.value)){if(e.value.length>0)return}else if($t.isNotNullAndUndefined(e.value))return;const n=(0,l.jsxs)("button",{style:{border:0,background:"none"},type:"button",children:[r?(0,l.jsx)(Ghe,{}):(0,l.jsx)(Wye,{}),(0,l.jsx)("div",{style:{marginTop:8},children:t.formatMessage({id:"components.single-image-uploader.upload-button",defaultMessage:"单击上传"})})]});return"picture-card"!==e.listType?(0,l.jsx)(h.Upload,{listType:"picture-card",openFileDialogOnClick:!1,children:n}):n})()})},_De=e=>(0,l.jsx)($Pe.ProFormItem,{label:e.label,name:e.name,tooltip:e.tooltip,rules:e.rules,children:(0,l.jsx)(zDe,{...e})}),SDe=e=>e.childrenRender?e.childrenRender(e.children,e.messageHolder,e.notificationHolder,e.globalState):e.children,EDe=e=>{const[t,n]=h.message.useMessage(),[r,a]=h.notification.useNotification();return(0,u.useEffect)((()=>{const e=({level:e,content:n})=>t[e](n),n=({level:e,config:t})=>r[e](t);return Bt.eventEmitter.on(Nt.MESSAGE,e),Bt.eventEmitter.on(Nt.NOTIFICATION,n),()=>{Bt.eventEmitter.off(Nt.MESSAGE,e),Bt.eventEmitter.off(Nt.NOTIFICATION,n)}}),[e]),{messageHolder:n,notificationHolder:a}},CDe=(e,t)=>e.map((({path:e,guid:n,icon:r,children:a,hideStatus:i,i18n:o,...c})=>{const s=o.filter((e=>e.locale===t));let u;return u=s.length>0?s[0].name:o[0].name,{...c,name:u,hideInMenu:0===i,icon:r&&(0,l.jsx)(FPe,{name:r}),children:a&&CDe(a,t),key:n,path:e}})),TDe=(e,t,n)=>{e&&t&&e.forEach((e=>{t.includes(e.key)&&!e.hideInMenu&&n.push(e),e.children&&TDe(e.children,t,n)}))},LDe=(e,t)=>{const n=Wt.getQuickMethod(t),r=[];return TDe(e,n,r),r.map(((e,t)=>({key:t,icon:e.icon,title:e.name,url:e.path})))},ADe=async e=>{const t=async()=>{let t;try{t=await e.getUserInitDetail.call(void 0)}catch(t){return void jDe.executeLogout(e.history,e.loginLoadPath)}if(1===t.code&&t.data){const n=t.data;return n.menuList&&(n.menuList=CDe(n.menuList,e.getLocale.call(void 0))),n.avatar&&(n.avatar=e.getPreviewUrl.call(void 0,n.avatar)),n}jDe.executeLogout(e.history,e.loginLoadPath)},n=async()=>{const t=await e.getCurrentThemeDetail.call(void 0);if(1===t.code&&t.data){if(t.data.favicons){const n=document.querySelector("link[rel*='icon']")||document.createElement("link");n.type="image/x-icon",n.rel="shortcut icon",n.href=e.getPreviewUrl.call(void 0,t.data.favicons),document.getElementsByTagName("head")[0].appendChild(n)}return t.data}},{location:r}=e.history,a=Wt.getThemeMode(),i=e.defaultSettings;return i.navTheme=a,r.pathname.endsWith(e.loginLoadPath)?{settings:i,currentTheme:await n(),fetchUserInfo:t,fetchThemeInfo:n}:{settings:i,currentUser:await t(),currentTheme:await n(),fetchUserInfo:t,fetchThemeInfo:n}},PDe=e=>{const{messageHolder:t,notificationHolder:n}=EDe(),{layout:r,splitMenus:a,title:i,logo:o,...c}=e.globalState.initialState?.settings??{},s=window.__POWERED_BY_QIANKUN__?"side":r;return(0,u.useEffect)((()=>{const t=Wt.getThemeMode();e.globalState.initialState?.settings.navTheme&&e.globalState.initialState?.settings.navTheme!==t&&e.setInitialState.call(void 0,(n=>{const r=(0,D.cloneDeep)(e.globalState.initialState.settings);return r.navTheme=t,{...n,settings:r}}));const n=t=>{e.setInitialState.call(void 0,(n=>{const r=(0,D.cloneDeep)(e.globalState.initialState.settings);return r.navTheme=t,{...n,settings:r}}))};return Bt.eventEmitter.on(Nt.THEME_MODE,n),()=>{Bt.eventEmitter.off(Nt.THEME_MODE,n)}}),[e.globalState.initialState?.settings.navTheme]),{menu:{locale:!1,request:()=>e.globalState.initialState.currentUser.menuList},actionsRender:()=>window.__POWERED_BY_QIANKUN__?[]:[...e.headerOperations??[],(0,l.jsx)(qt,{},"theme"),f().cloneElement(e.selectLang,{key:"localeChange"})],avatarProps:{src:e.globalState.initialState?.currentUser?.avatar,title:f().cloneElement(e.avatarName,{key:"avatarName"}),render:(t,n)=>f().cloneElement(e.avatarDropdown,{key:"avatarDropdown"},n)},footerRender:void 0,onPageChange:t=>{e.globalState.initialState?.currentUser||t.pathname.endsWith(e.loginLoadPath)||e.history.push(e.loginLoadPath)},bgLayoutImgList:[{src:e.globalState.globalFunctions.getPreviewUrl(e.globalState.initialState?.currentTheme?.backgroundImg),bottom:0,left:0,height:"100%"}],appList:LDe(e.globalState.initialState?.currentUser?.menuList,e.clientId),links:[],menuHeaderRender:void 0,childrenRender:r=>(0,l.jsx)(SDe,{...e,currentLayout:s,messageHolder:t,notificationHolder:n,children:r}),layout:s,splitMenus:!window.__POWERED_BY_QIANKUN__&&a,title:e.globalState.initialState?.currentTheme?.title??i,logo:e.globalState.globalFunctions.getPreviewUrl(e.globalState.initialState?.currentTheme?.icon)??o,...c}};var RDe=n(7186);const jDe={convertPageParam:async(e,t,n,r)=>{const a={...t};void 0!==a.current&&(a.pageNum=a.current,a.current=void 0),n&&(a.sort=n),a.filter=r;for(const e in a)Array.isArray(a[e])&&(a[e]=String(a[e]));const i=await e(a);return 1===i.code?{data:i.data,success:!0,total:i.total}:{data:i.message,success:!1,total:i.total}},downloadFile:(e,t)=>{if(!e)return;const n=document.createElement("a");n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},executeLogout:(e,t)=>{const{search:n,pathname:r}=window.location,a=new URL(window.location.href).searchParams.get("redirect");window.location.pathname.endsWith(t)||a||e.replace({pathname:t,search:(0,RDe.stringify)({redirect:r+n})})},getOAuth2Url:(e,t,n,r,a)=>{const i=new URL(`${n}/authorization/oauth2/authorize?`);for(const e in r)"client_secret"!==e&&i.searchParams.set(e,r[e]);let o;const c=new URL(window.location.href);return c.searchParams.delete("code"),c.searchParams.delete("state"),a&&c.searchParams.set("redirect",a),o=c.toString(),i.searchParams.set("redirect_uri",o),i.searchParams.set("state",JSON.stringify({locale:e,theme:t})),i.toString()},getExternalAuthUrl:(e,t,n,r,a,i)=>{const o=new URL(e),c=new URL(window.location.href);return c.search="",c.pathname=a,o.searchParams.set("redirect_uri",c.toString()),o.searchParams.set("state",JSON.stringify({locale:t,theme:n,external_guid:r,user_guid:i})),o.toString().replace(/%3A/g,":")},getExternalAuthUrl4Auth:function(e,t,n,r,a){const i=new URL(t),o=new URL(e);return i.searchParams.set("redirect_uri",o.toString()),i.searchParams.set("state",JSON.stringify({locale:n,theme:r,external_guid:a})),i.toString().replace(/%3A/g,":")}},HDe=e=>{const{intl:t,initialState:n}=v(),[r,a]=(0,u.useState)(void 0),i=async()=>{const t=await(n?.fetchUserInfo?.call(void 0));t&&(0,TBe.flushSync)((()=>{e.setInitialState.call(void 0,(e=>({...e,currentUser:t})))}));const r=await(n?.fetchThemeInfo?.call(void 0));r&&(0,TBe.flushSync)((()=>{e.setInitialState.call(void 0,(e=>({...e,currentTheme:r})))}))},o=async(t,n)=>{if(1===t.code){if(L.getDb().delete(),Wt.setToken(t.data),await i(),window.__POWERED_BY_QIANKUN__){const{pathname:t}=window.location,r=t.replace(e.loginLoadPath,"");r&&n.redirect.startsWith(r)&&(n.redirect=n.redirect.replace(new RegExp(`^${r}`),""))}e.onFinish.call(void 0,n.redirect,void 0)}else a(t.message)},c=(e,t)=>{const n=document.createElement("script");n.src=e,n.async=!0,n.onload=t,document.body.appendChild(n)};return(0,u.useEffect)((()=>{(async()=>{const t=(()=>{const t=e.searchParams.get("code"),n=e.searchParams.get("state"),r=e.searchParams.get("redirect")??"/";let a=null,i=null,o=null,c=null;if(n){let e;try{e=JSON.parse(n)}catch{e=null}e&&(a=e.locale,i=e.theme,o=e.external_guid,c=e.user_guid)}return{code:t,state:n,redirect:r,locale:a,theme:i,externalGuid:o,userGuid:c}})();t.locale&&e.setLocale.call(void 0,t.locale,!1),t.theme&&Wt.setThemeMode("realDark"===t.theme?"realDark":"light"),t.code?t.externalGuid&&t.userGuid?(async t=>{const n=new URL(window.location.href);n.search="";const r=await e.bindExternalData.call(void 0,{guid:t.externalGuid,code:t.code,redirectUrl:n.toString()}),a=Wt.getBeforeExternalBindPathname();if(1===r.code){await i();const t=r.data.i18n.filter((t=>e.locale===t.locale));e.onFinish.call(void 0,void 0!==a?a:"/user-center",{external:t[0].title,externalBindResult:!0})}else e.onFinish.call(void 0,void 0!==a?a:"/user-center",{external:r.message,externalBindResult:!1})})(t):(async t=>{let n;if(t.externalGuid){const r=new URL(window.location.href),a=new URLSearchParams;r.searchParams.has("redirect")&&a.set("redirect",r.searchParams.get("redirect")),r.search=a.toString(),n=await e.getTokenByCode.call(void 0,{code:t.code,external_guid:t.externalGuid,external_redirect_uri:encodeURIComponent(r.toString())})}else n=await e.getTokenByCode.call(void 0,{code:t.code});await o(n,t)})(t):(t=>{if(Wt.getActiveLogout())return Wt.removeToken(),void(window.location.href=jDe.getOAuth2Url(e.locale,Wt.getThemeMode(),e.gatewayUrl,e.clientConfig,t.redirect));if(!e.externalIntegrationConfig||e.externalIntegrationConfig.length<1)return Wt.removeToken(),void(window.location.href=jDe.getOAuth2Url(e.locale,Wt.getThemeMode(),e.gatewayUrl,e.clientConfig,t.redirect));for(const n of e.externalIntegrationConfig)"feishu"===n.platform&&c("https://lf1-cdn-tos.bytegoofy.com/goofy/lark/op/h5-js-sdk-1.5.26.js",(()=>{window.h5sdk&&window.tt.requestAccess?window.tt.requestAccess({appID:n.appId,scopeList:[],success:async({code:r})=>{const a=new URL(window.location.href);a.search="";const i=await e.getTokenByCode.call(void 0,{code:r,external_client_id:n.appId,external_redirect_uri:a.toString(),platform:n.platform});await o(i,t)},fail:({errString:e})=>{a(e)}}):window.location.href=jDe.getOAuth2Url(e.locale,Wt.getThemeMode(),e.gatewayUrl,e.clientConfig,t.redirect)}))})(t)})()}),[]),{setExceptionMsg:a,exceptionMsg:r,intl:t}},BDe=h.Result,VDe=e=>{const{setExceptionMsg:t,exceptionMsg:n,intl:r}=HDe(e);return(0,l.jsx)(l.Fragment,{children:void 0===n?(0,l.jsx)(h.Spin,{percent:"auto",size:"large"}):(0,l.jsx)(BDe,{status:"500",title:n,extra:(0,l.jsx)(h.Button,{type:"primary",onClick:()=>{t(void 0),window.location.href=jDe.getOAuth2Url(e.locale,Wt.getThemeMode(),e.gatewayUrl,e.clientConfig)},children:r.formatMessage({id:"components.auth-frame.operation.back-auth",defaultMessage:"返回授权页面"})})})})},NDe=e=>{const{setCurrent:t,setLoading:n,steps:r,mailStep:a,externalStep:i,current:o,loading:c,externalBind:s}=(e=>{const{intl:t}=v(),[n,r]=(0,u.useState)(!1),[a,i]=(0,u.useState)({}),[o,c]=(0,u.useState)([]),[s,f]=(0,u.useState)(0),[d,h]=(0,u.useState)(),[p,m]=(0,u.useState)(),[g,y]=(0,u.useState)();return(0,u.useEffect)((()=>{(async()=>{const n=await e.getUserForceBind.call(void 0),r=[];1===n.code?(n.data&&(n.data.mailForce&&(r.push({title:t.formatMessage({id:"components.bind-frame.title.mail-force",defaultMessage:"绑定邮箱"}),icon:(0,l.jsx)(yG,{})}),h(r.length-1)),n.data.passwordForce&&(r.push({title:t.formatMessage({id:"components.bind-frame.title.password-force",defaultMessage:"重置密码"}),icon:(0,l.jsx)(Jhe,{})}),m(r.length-1)),n.data.externalForceList&&n.data.externalForceList.length>0&&(r.push({title:t.formatMessage({id:"components.bind-frame.title.external-force",defaultMessage:"绑定外部授权"}),icon:(0,l.jsx)(s0,{})}),y(r.length-1),i(n.data.externalForceList))),c(r)):i([]),r.length<1&&e.onFinish.call(void 0)})()}),[]),{setCurrent:f,setLoading:r,steps:o,mailStep:d,externalStep:g,current:s,loading:n,externalBind:a}})(e);return(0,l.jsx)(l.Fragment,{children:r&&r.length>0?(0,l.jsxs)(AQ,{style:{maxWidth:"36rem"},hoverable:!e.responsive,bordered:!e.responsive,children:[(0,l.jsx)(h.Steps,{size:"small",items:r,current:o}),(0,l.jsx)(h.Divider,{dashed:!0}),void 0!==a&&a===o&&(0,l.jsx)(l.Fragment,{children:f().cloneElement(e.mailBindFrame,{key:"mail-bind-frame",onFinish:n=>{o+1>=r.length?e.onFinish.call(void 0):t(o+1)}})}),void 0!==i&&i===o&&(0,l.jsx)(h.Spin,{spinning:c,children:f().cloneElement(e.externalAuthFrame,{key:"external-auth-frame",externalFilterList:s,onLoadChange:e=>{n(e)}})})]}):(0,l.jsx)(h.Spin,{percent:"auto",size:"large"})})},IDe={setScale:(e,t=2)=>{const n=Math.pow(10,t);return Math.round(e*n)/n}},FDe={randomStr:e=>{let t="";for(let n=0;n<e;n++)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[Math.floor(62*Math.random())];return t}},DDe={fromUnicode:e=>e.replace(/\\u([\dA-Fa-f]{4})/g,((e,t)=>String.fromCharCode(parseInt(t,16)))),toUnicode:e=>encodeURIComponent(e).replace(/%/g,"\\u").replace(/\\u([0-9a-fA-F]{2})/g,((e,t)=>"\\u00"+t))},$De={generateUploadFile:(e,t,n,r)=>{if(e[t]&&e[n])return[{uid:e[n],name:e[t],status:"done",url:r.call(void 0,e[n])}]}},WDe=new Map,qDe=()=>{const{getLocale:e,globalFunctions:t}=v(),n=async n=>{if(WDe.has(n))return WDe.get(n);const r=(async()=>{const r=L.getDb();r.version(1).stores({sys_dict:"++id, type, name, enName, value, color, sort"});let a=await r.sys_dict.where("type").equals(n).sortBy("sort");if(0===a.length){const e=await(t?.getDictDataByType.call(void 0,n));1===e.code&&(a=e.data,a.length>0&&await r.sys_dict.bulkPut(a.map((e=>({...e,type:n})))))}return a.map((t=>{const r=t.i18n.filter((t=>t.locale===e())),a=r.length>0?r[0].name:t.i18n?.[0]?.name;return{type:n,label:a,value:t.value,color:t.color,sort:t.sort}}))})();WDe.set(n,r);try{return await r}finally{WDe.delete(n)}};return{getDataByType:n,getTagDataByType:async e=>(await n(e)).map((e=>({label:(0,l.jsx)(h.Tag,{style:{maxWidth:"100%"},bordered:!0,color:e.color,children:(0,l.jsx)(h.Typography.Text,{ellipsis:{tooltip:e.label},children:e.label})}),value:isNaN(Number(e.value))?e.value:Number(e.value),title:e.label})))}},UDe=()=>({info:e=>Bt.pushMessageEvent("info",e),success:e=>Bt.pushMessageEvent("success",e),error:e=>Bt.pushMessageEvent("error",e),warning:e=>Bt.pushMessageEvent("warning",e),loading:e=>Bt.pushMessageEvent("loading",e)}),GDe=()=>({info:e=>Bt.pushNotificationEvent("info",e),success:e=>Bt.pushNotificationEvent("success",e),error:e=>Bt.pushNotificationEvent("error",e),warning:e=>Bt.pushNotificationEvent("warning",e),loading:e=>Bt.pushNotificationEvent("loading",e)}),KDe=()=>({phoneNumber:e=>{if($t.isNullOrUndefined(e))return"-";const t=e.length;if(t<=3)return e;if(t<=9)return e.slice(0,3)+"*".repeat(t-3);{const n=e.slice(0,3),r=e.slice(-4);return n+"*".repeat(t-7)+r}}}),YDe=()=>{const e=UDe(),t=GDe(),{intl:n}=v();return{trigger:async(r,a,i)=>{try{const o=await r({responseType:"blob",getResponse:!0}),c=o.data;console.log(o.headers);const s=o.headers["content-type"];if(s&&s.includes("application/json"))try{const r=await c.text(),a=JSON.parse(r);return 401===a.code?(e.error(a.message||n.formatMessage({id:"components.use-rb-download.401",defaultMessage:"登录超时或未登录"})),setTimeout((()=>{jDe.executeLogout(history,i)}),2e3)):403===a.code?t.warning({message:a.message||n.formatMessage({id:"components.use-rb-download.403",defaultMessage:"无权限访问"}),description:(0,l.jsx)(h.Typography.Text,{copyable:!0,children:a.data}),duration:null}):e.error(a.message||n.formatMessage({id:"components.use-rb-download.unknown-error",defaultMessage:"发生未知错误"})),!1}catch(t){return console.error("下载内容解析失败:",t),e.error(n.formatMessage({id:"components.use-rb-download.parse-error",defaultMessage:"下载失败,无法解析错误信息"})),!1}const u=o.headers["content-disposition"];let f=a;if(u&&u.includes("filename=")){const e=u.match(/filename\*?=['"]?([^'";]+)['"]?/);if(e?.[1]){const t=u.match(/filename\*=UTF-8''(.+)/);f=t&&t[1]?decodeURIComponent(t[1]):decodeURIComponent(e[1])}}const d=window.URL.createObjectURL(c),p=document.createElement("a");return p.href=d,p.setAttribute("download",f),document.body.appendChild(p),p.click(),p.remove(),window.URL.revokeObjectURL(d),e.success(n.formatMessage({id:"components.use-rb-download.success",defaultMessage:"下载任务已完成"})),!0}catch(t){return console.error("下载请求失败:",t),e.error(n.formatMessage({id:"components.use-rb-download.request-error",defaultMessage:"请求失败,请检查网络连接或联系管理员"})),!1}}}},XDe={outlinedConstants:["StepBackwardOutlined","StepForwardOutlined","FastBackwardOutlined","FastForwardOutlined","ShrinkOutlined","ArrowsAltOutlined","DownOutlined","UpOutlined","LeftOutlined","RightOutlined","CaretUpOutlined","CaretDownOutlined","CaretLeftOutlined","CaretRightOutlined","UpCircleOutlined","DownCircleOutlined","LeftCircleOutlined","RightCircleOutlined","DoubleRightOutlined","DoubleLeftOutlined","VerticalLeftOutlined","VerticalRightOutlined","VerticalAlignTopOutlined","VerticalAlignMiddleOutlined","VerticalAlignBottomOutlined","ForwardOutlined","BackwardOutlined","RollbackOutlined","EnterOutlined","RetweetOutlined","SwapOutlined","SwapLeftOutlined","SwapRightOutlined","ArrowUpOutlined","ArrowDownOutlined","ArrowLeftOutlined","ArrowRightOutlined","PlayCircleOutlined","UpSquareOutlined","DownSquareOutlined","LeftSquareOutlined","RightSquareOutlined","LoginOutlined","LogoutOutlined","MenuFoldOutlined","MenuUnfoldOutlined","BorderBottomOutlined","BorderHorizontalOutlined","BorderInnerOutlined","BorderOuterOutlined","BorderLeftOutlined","BorderRightOutlined","BorderTopOutlined","BorderVerticleOutlined","PicCenterOutlined","PicLeftOutlined","PicRightOutlined","RadiusBottomleftOutlined","RadiusBottomrightOutlined","RadiusUpleftOutlined","RadiusUprightOutlined","FullscreenOutlined","FullscreenExitOutlined","QuestionOutlined","QuestionCircleOutlined","PlusOutlined","PlusCircleOutlined","PauseOutlined","PauseCircleOutlined","MinusOutlined","MinusCircleOutlined","PlusSquareOutlined","MinusSquareOutlined","InfoOutlined","InfoCircleOutlined","ExclamationOutlined","ExclamationCircleOutlined","CloseOutlined","CloseCircleOutlined","CloseSquareOutlined","CheckOutlined","CheckCircleOutlined","CheckSquareOutlined","ClockCircleOutlined","WarningOutlined","IssuesCloseOutlined","StopOutlined","EditOutlined","FormOutlined","CopyOutlined","ScissorOutlined","DeleteOutlined","SnippetsOutlined","DiffOutlined","HighlightOutlined","AlignCenterOutlined","AlignLeftOutlined","AlignRightOutlined","BgColorsOutlined","BoldOutlined","ItalicOutlined","UnderlineOutlined","StrikethroughOutlined","RedoOutlined","UndoOutlined","ZoomInOutlined","ZoomOutOutlined","FontColorsOutlined","FontSizeOutlined","LineHeightOutlined","DashOutlined","SmallDashOutlined","SortAscendingOutlined","SortDescendingOutlined","DragOutlined","OrderedListOutlined","UnorderedListOutlined","RadiusSettingOutlined","ColumnWidthOutlined","ColumnHeightOutlined","AreaChartOutlined","PieChartOutlined","BarChartOutlined","DotChartOutlined","LineChartOutlined","RadarChartOutlined","HeatMapOutlined","FallOutlined","RiseOutlined","StockOutlined","BoxPlotOutlined","FundOutlined","SlidersOutlined","AndroidOutlined","AppleOutlined","WindowsOutlined","IeOutlined","ChromeOutlined","GithubOutlined","AliwangwangOutlined","DingdingOutlined","WeiboSquareOutlined","WeiboCircleOutlined","TaobaoCircleOutlined","Html5Outlined","WeiboOutlined","TwitterOutlined","WechatOutlined","WhatsAppOutlined","YoutubeOutlined","AlipayCircleOutlined","TaobaoOutlined","DingtalkOutlined","SkypeOutlined","QqOutlined","MediumWorkmarkOutlined","GitlabOutlined","MediumOutlined","LinkedinOutlined","GooglePlusOutlined","DropboxOutlined","FacebookOutlined","CodepenOutlined","CodeSandboxOutlined","AmazonOutlined","GoogleOutlined","CodepenCircleOutlined","AlipayOutlined","AntDesignOutlined","AntCloudOutlined","AliyunOutlined","ZhihuOutlined","SlackOutlined","SlackSquareOutlined","BehanceOutlined","BehanceSquareOutlined","DribbbleOutlined","DribbbleSquareOutlined","InstagramOutlined","YuqueOutlined","AlibabaOutlined","YahooOutlined","RedditOutlined","SketchOutlined","AccountBookOutlined","AimOutlined","AlertOutlined","ApartmentOutlined","ApiOutlined","AppstoreAddOutlined","AppstoreOutlined","AudioOutlined","AudioMutedOutlined","AuditOutlined","BankOutlined","BarcodeOutlined","BarsOutlined","BellOutlined","BlockOutlined","BookOutlined","BorderOutlined","BorderlessTableOutlined","BranchesOutlined","BugOutlined","BuildOutlined","BulbOutlined","CalculatorOutlined","CalendarOutlined","CameraOutlined","CarOutlined","CarryOutOutlined","CiCircleOutlined","CiOutlined","ClearOutlined","CloudDownloadOutlined","CloudOutlined","CloudServerOutlined","CloudSyncOutlined","CloudUploadOutlined","ClusterOutlined","CodeOutlined","CoffeeOutlined","CommentOutlined","CompassOutlined","CompressOutlined","ConsoleSqlOutlined","ContactsOutlined","ContainerOutlined","ControlOutlined","CopyrightOutlined","CreditCardOutlined","CrownOutlined","CustomerServiceOutlined","DashboardOutlined","DatabaseOutlined","DeleteColumnOutlined","DeleteRowOutlined","DeliveredProcedureOutlined","DeploymentUnitOutlined","DesktopOutlined","DisconnectOutlined","DislikeOutlined","DollarOutlined","DownloadOutlined","EllipsisOutlined","EnvironmentOutlined","EuroCircleOutlined","EuroOutlined","ExceptionOutlined","ExpandAltOutlined","ExpandOutlined","ExperimentOutlined","ExportOutlined","EyeOutlined","EyeInvisibleOutlined","FieldBinaryOutlined","FieldNumberOutlined","FieldStringOutlined","FieldTimeOutlined","FileAddOutlined","FileDoneOutlined","FileExcelOutlined","FileExclamationOutlined","FileOutlined","FileGifOutlined","FileImageOutlined","FileJpgOutlined","FileMarkdownOutlined","FilePdfOutlined","FilePptOutlined","FileProtectOutlined","FileSearchOutlined","FileSyncOutlined","FileTextOutlined","FileUnknownOutlined","FileWordOutlined","FileZipOutlined","FilterOutlined","FireOutlined","FlagOutlined","FolderAddOutlined","FolderOutlined","FolderOpenOutlined","FolderViewOutlined","ForkOutlined","FormatPainterOutlined","FrownOutlined","FunctionOutlined","FundProjectionScreenOutlined","FundViewOutlined","FunnelPlotOutlined","GatewayOutlined","GifOutlined","GiftOutlined","GlobalOutlined","GoldOutlined","GroupOutlined","HddOutlined","HeartOutlined","HistoryOutlined","HolderOutlined","HomeOutlined","HourglassOutlined","IdcardOutlined","ImportOutlined","InboxOutlined","InsertRowAboveOutlined","InsertRowBelowOutlined","InsertRowLeftOutlined","InsertRowRightOutlined","InsuranceOutlined","InteractionOutlined","KeyOutlined","LaptopOutlined","LayoutOutlined","LikeOutlined","LineOutlined","LinkOutlined","Loading3QuartersOutlined","LoadingOutlined","LockOutlined","MacCommandOutlined","MailOutlined","ManOutlined","MedicineBoxOutlined","MehOutlined","MenuOutlined","MergeCellsOutlined","MessageOutlined","MobileOutlined","MoneyCollectOutlined","MonitorOutlined","MoreOutlined","NodeCollapseOutlined","NodeExpandOutlined","NodeIndexOutlined","NotificationOutlined","NumberOutlined","OneToOneOutlined","PaperClipOutlined","PartitionOutlined","PayCircleOutlined","PercentageOutlined","PhoneOutlined","PictureOutlined","PlaySquareOutlined","PoundCircleOutlined","PoundOutlined","PoweroffOutlined","PrinterOutlined","ProfileOutlined","ProjectOutlined","PropertySafetyOutlined","PullRequestOutlined","PushpinOutlined","QrcodeOutlined","ReadOutlined","ReconciliationOutlined","RedEnvelopeOutlined","ReloadOutlined","RestOutlined","RobotOutlined","RocketOutlined","RotateLeftOutlined","RotateRightOutlined","SafetyCertificateOutlined","SafetyOutlined","SaveOutlined","ScanOutlined","ScheduleOutlined","SearchOutlined","SecurityScanOutlined","SelectOutlined","SendOutlined","SettingOutlined","ShakeOutlined","ShareAltOutlined","ShopOutlined","ShoppingCartOutlined","ShoppingOutlined","SisternodeOutlined","SkinOutlined","SmileOutlined","SolutionOutlined","SoundOutlined","SplitCellsOutlined","StarOutlined","SubnodeOutlined","SwitcherOutlined","SyncOutlined","TableOutlined","TabletOutlined","TagOutlined","TagsOutlined","TeamOutlined","ThunderboltOutlined","ToTopOutlined","ToolOutlined","TrademarkCircleOutlined","TrademarkOutlined","TransactionOutlined","TranslationOutlined","TrophyOutlined","UngroupOutlined","UnlockOutlined","UploadOutlined","UsbOutlined","UserAddOutlined","UserDeleteOutlined","UserOutlined","UserSwitchOutlined","UsergroupAddOutlined","UsergroupDeleteOutlined","VerifiedOutlined","VideoCameraAddOutlined","VideoCameraOutlined","WalletOutlined","WifiOutlined","WomanOutlined"]},ZDe={"components.data-table.pagination.total":"总","components.file-tag.operation.preview-pdf":"预览PDF","components.file-tag.operation.download":"下载","components.user-card.unknown":"未知用户","components.user-card.is-me":"(我)","components.user-card.phone":"手机号码","components.user-card.email":"邮箱地址","components.user-card.sex":"性别","components.user-card.status":"状态","components.user-card.role":"角色","components.user-selector.placeholder":"请输入关键字","components.user-selector.search":"搜索","components.attachment-text.appendix":"点击上传附件","components.markdown-editor.write":"编辑","components.markdown-editor.preview":"预览","components.markdown-editor.uploading-image":"上传图片","components.markdown-editor.paste-drop-select":"粘贴下拉选择","components.single-image-uploader.upload-button":"单击上传","components.auth-frame.operation.back-auth":"返回授权页面","components.bind-frame.title.mail-force":"绑定邮箱","components.bind-frame.title.password-force":"重置密码","components.bind-frame.title.external-force":"绑定外部授权","components.constants.status-list.enable":"启用","components.constants.status-list.disable":"停用","components.constants.sex-list.secret":"保密","components.constants.sex-list.male":"男","components.constants.sex-list.female":"女","components.use-rb-download.401":"登录超时或未登录","components.use-rb-download.403":"无权限访问","components.use-rb-download.unknown-error":"发生未知错误","components.use-rb-download.parse-error":"下载失败,无法解析错误信息","components.use-rb-download.success":"下载任务已完成","components.use-rb-download.request-error":"请求失败,请检查网络连接或联系管理员"},QDe={"components.data-table.pagination.total":"Total","components.file-tag.operation.preview-pdf":"Preview PDF","components.file-tag.operation.download":"Download","components.user-card.unknown":"Unknown user","components.user-card.is-me":"(Me)","components.user-card.phone":"Phone number","components.user-card.email":"Email address","components.user-card.sex":"Gender","components.user-card.status":"Status","components.user-card.role":"Role","components.user-selector.placeholder":"Please enter keywords","components.user-selector.search":"Search","components.attachment-text.appendix":"Click to upload attachment","components.markdown-editor.write":"Edit","components.markdown-editor.preview":"Preview","components.markdown-editor.uploading-image":"Upload image","components.markdown-editor.paste-drop-select":"Paste drop-down selection","components.single-image-uploader.upload-button":"Click Upload","components.auth-frame.operation.back-auth":"Return to Authorization Page","components.bind-frame.title.mail-force":"Bind Email","components.bind-frame.title.password-force":"Reset Password","components.bind-frame.title.external-force":"Bind External Authorization","components.constants.status-list.enable":"Enable","components.constants.status-list.disable":"disable","components.constants.sex-list.secret":"Secret","components.constants.sex-list.male":"Male","components.constants.sex-list.female":"female","components.use-rb-download.401":"Login timed out or not logged in","components.use-rb-download.403":"No permission to access","components.use-rb-download.unknown-error":"An unknown error occurred","components.use-rb-download.parse-error":"Download failed, unable to parse error information","components.use-rb-download.success":"Download task completed","components.use-rb-download.request-error":"Request failed, please check your network connection or contact the administrator"},JDe={RbDataTable:W,RbActionBarItem:U,RbActionBar:G,RbThemeSetter:qt,RbDataChart:_U,RbFileTag:lG,RbUserCard:jQ,RbIconRender:FPe,RbHtmlRender:DPe,RbDragTable:PFe,RbUserSelector:VFe,RbAttachmentText:rDe,RbPageContainer:iDe,RbRouteWrapper:oDe,RbMarkdownConverter:kDe,RbMarkdownEditor:ODe,RbSingleImageUploader:_De,RbAuthFrame:VDe,RbBindFrame:NDe,RbGlobalContext:p,RbDraggableUploader:nDe}})(),module.exports=r})();
|