You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__Lists__Exerc...

1 line
24 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[95125],{68742:function(e,n,l){l.d(n,{Z:function(){return o}});var t=l(38329),i=l(59301),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},r=l(91851),a=function(e,n){return i.createElement(r.Z,(0,t.Z)({},e,{ref:n,icon:s}))};var o=i.forwardRef(a)},73321:function(e,n,l){l.r(n),l.d(n,{default:function(){return S}});var t=l(26801),i=l.n(t),s=l(10574),r=l.n(s),a=l(39343),o=l.n(a),c=l(11006),d=l.n(c),u=l(59301),x=l(22211),m=l(95237),h=l(66104),p=l(43604),j=l(99313),v=l(5112),f=l(72315),g=l(43418),b=l(68742),y={flex_box_center:"flex_box_center___Qx5by",flex_space_between:"flex_space_between___Jovvb",flex_box_vertical_center:"flex_box_vertical_center___ZgKxt",flex_box_center_end:"flex_box_center_end___rLoZQ",flex_box_column:"flex_box_column___H7gvw",title:"title___mKlZQ",link:"link____MbLK",wrap:"wrap___M54Mm",info:"info___LS1sD",name:"name___XFTyf",box:"box___MY5TN",tab:"tab___Pts7W",group:"group___KTR8B",modal:"modal___wynb6",head:"head___rpYjK",des:"des___PNfp8",sub:"sub___LF5wd",tags:"tags___tdrDl"},_=l(15830),k=l(9498),N=l.n(k),w=l(67871),O=l(37712),S=(0,x.connect)((function(e){return{exercise:e.exercise,user:e.user}}))((function(e){e.exercise;var n,l,t,s=e.user,a=(e.dispatch,null===(n=window.location.pathname)||void 0===n?void 0:n.includes("exercise")),c=a?"exercise":"shixun_homework",k=(0,x.useParams)(),S=s.userInfo,C=(0,u.useState)({}),I=d()(C,2),E=I[0],Z=I[1],P=(0,u.useState)(),D=d()(P,2),L=D[0],T=D[1],z=(0,u.useState)(0),B=d()(z,2),$=B[0],R=B[1],M=(0,u.useState)([]),F=d()(M,2),X=F[0],A=F[1],H=(0,u.useState)(!0),K=d()(H,2),Q=K[0],W=K[1],q=(0,u.useState)(!1),G=d()(q,2),J=G[0],U=G[1],Y=(0,u.useState)(0),V=d()(Y,2),ee=V[0],ne=V[1],le=(0,u.useState)({type:"2",degree:0,page:1,limit:10,id:k.studentId}),te=d()(le,2),ie=te[0],se=te[1],re=(null==E?void 0:E.analysis_data)||{},ae=re.bug,oe=re.vulnerability,ce=re.codeSmall;(0,u.useEffect)((function(){de(),ue(ie)}),[]);var de=function(){var e=o()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_.ZP)("/api/code_analyses_detail/analyse_detail.json",{method:"get",params:{id:k.studentId}});case 2:0===(n=e.sent).status&&Z(n.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=o()(r()().mark((function e(n){var l,t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return W(!0),e.next=3,(0,_.ZP)("/api/code_analyses_detail/analyse_detail_list.json",{method:"get",params:n});case 3:0===(l=e.sent).status&&(A(l.data.recordList),ne(null===(t=l.data)||void 0===t?void 0:t.recordSum)),W(!1);case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),xe={"阻断":(0,O.jsx)("i",{style:{color:"#D4333F"},className:"iconfont icon-zuduan font14"}),"严重":(0,O.jsx)("i",{style:{color:"#D4333F"},className:"iconfont icon-yanzhong font14"}),"主要":(0,O.jsx)("i",{style:{color:"#D4333F"},className:"iconfont icon-zhuyao font14"}),"次要":(0,O.jsx)("i",{style:{color:"#B0D513"},className:"iconfont icon-ciyao font14"}),"提示":(0,O.jsx)("i",{style:{color:"#4B9FD5"},className:"iconfont icon-tishi10 font14"}),Bug:(0,O.jsx)("i",{className:"iconfont icon-bug"}),"漏洞":(0,O.jsx)("i",{className:"iconfont icon-loudong1"}),"代码规范":(0,O.jsx)("i",{className:"iconfont icon-yiwei"})},me=[{title:"序号",dataIndex:"name",align:"left",width:80,render:function(e,n,l){return ie.limit*(ie.page-1)+l+1}},{title:"".concat("2"===ie.type?"Bug":"3"===ie.type?"漏洞":"规范异常","名称"),align:"left",ellipsis:!0,dataIndex:"name",render:function(e,n){return(0,O.jsx)("a",{target:"_blank",href:"/classrooms/".concat(k.coursesId,"/").concat(c,"/").concat(k.exerciseId,"/analysis/").concat(k.studentId,"/code?name=").concat(null==E?void 0:E.user_name,"&rule_id=").concat(n.ruleId,"&uuid=").concat(n.uuid,"&issueId=").concat(n.issueId,"&language=").concat(n.language,"&rowNumber=").concat(n.rowNumber),className:y.link,children:e})}},{title:"文件路径",align:"left",ellipsis:!0,dataIndex:"filePath"},{title:"严重程度",align:"left",width:90,dataIndex:"level",render:function(e){return(0,O.jsxs)("span",{children:[xe[e],(0,O.jsx)("span",{className:"ml5",children:e})]})}},{title:"操作",width:154,align:"left",dataIndex:"action",render:function(e,n){return(0,O.jsxs)(m.Z,{justify:"space-between",align:"middle",children:[(0,O.jsx)("span",{onClick:function(){return he(n)},className:"current c-light-primary",children:"问题分析"}),(0,O.jsx)("a",{target:"_blank",href:"/classrooms/".concat(k.coursesId,"/").concat(c,"/").concat(k.exerciseId,"/analysis/").concat(k.studentId,"/code?name=").concat(null==E?void 0:E.user_name,"&rule_id=").concat(n.ruleId,"&uuid=").concat(n.uuid,"&issueId=").concat(n.issueId,"&language=").concat(n.language,"&rowNumber=").concat(n.rowNumber),className:"current c-light-primary",children:"代码详情"})]})}}],he=function(){var e=o()(r()().mark((function e(n){var l;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_.ZP)("/api/code_analyses_detail/problem_analysis.json",{method:"get",params:{rule_id:n.ruleId}});case 2:0===(l=e.sent).status&&(T(i()(i()({},l.data),{},{level:n.level,type:"2"===ie.type?"Bug":"3"===ie.type?"漏洞":"代码规范"})),R(32));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,O.jsxs)("section",{className:"edu-container",children:[(0,O.jsxs)("section",{className:"animated fadeIn",children:[(0,O.jsx)("aside",{className:"mt10",children:S&&(0,O.jsxs)(h.Z,{separator:">",children:[(0,O.jsx)(h.Z.Item,{children:(0,O.jsx)(x.Link,{to:"/classrooms/".concat(k.coursesId,"/").concat(c),children:null==S||null===(l=S.course)||void 0===l?void 0:l.course_name})}),(0,O.jsx)(h.Z.Item,{children:(0,O.jsxs)(x.Link,{to:"/classrooms/".concat(k.coursesId,"/").concat(c),children:[a?"考试":"实训","列表"]})}),(0,O.jsx)(h.Z.Item,{children:(0,O.jsxs)(x.Link,{to:"/classrooms/".concat(k.coursesId,"/").concat(c,"/").concat(null==k?void 0:k.exerciseId,"/detail"),children:[a?"试卷":"作业","详情"]})}),(0,O.jsx)(h.Z.Item,{children:null==E?void 0:E.user_name})]})}),(0,O.jsx)("aside",{className:[y.title,"mt20"].join(" "),children:(0,O.jsx)(m.Z,{style:{width:"100%"},children:(0,O.jsxs)(p.Z,{flex:"1",style:{lineHeight:"24px"},children:[(0,O.jsx)(x.Link,{to:"/classrooms/".concat(k.coursesId,"/").concat(c,"/").concat(null==k?void 0:k.exerciseId,"/detail"),children:(0,O.jsx)(b.Z,{className:"font16 c-black"})}),(0,O.jsx)("strong",{className:"font20 ml5",children:null==E?void 0:E.name}),(0,O.jsx)("span",{className:"iconfont icon-a-wenhaobeifen2",onClick:function(){U(!0)},style:{fontWeight:800,color:"#0152d9",float:"right",cursor:"pointer"},children:"规则说明"})]})})})]}),(0,O.jsxs)("section",{className:y.wrap,children:[(0,O.jsxs)("div",{className:y.info,children:[(0,O.jsx)("img",{src:"".concat(w.Z.IMG_SERVER,"/images/").concat(null==E?void 0:E.avatar),alt:""}),(0,O.jsxs)("ul",{style:{marginLeft:30},children:[(0,O.jsx)("li",{className:y.name,children:null==E?void 0:E.user_name}),(0,O.jsxs)("li",{children:[(0,O.jsx)("span",{children:"学号:"}),null==E?void 0:E.student_number]}),(0,O.jsxs)("li",{children:[(0,O.jsx)("span",{children:"代码行数:"}),null==E?void 0:E.total_row_number]})]}),(0,O.jsxs)("ul",{style:{marginTop:65},children:[(0,O.jsxs)("li",{children:[(0,O.jsx)("span",{children:"分班:"}),null==E?void 0:E.group_course_name]}),(0,O.jsxs)("li",{children:[(0,O.jsx)("span",{children:"复杂代码:"}),null==E?void 0:E.complexity]})]}),(0,O.jsxs)("ol",{children:[(0,O.jsx)("li",{children:"质量评分:"}),(0,O.jsx)("li",{children:null==E?void 0:E.quality_score})]})]}),(0,O.jsxs)("div",{className:y.box,children:[(0,O.jsxs)("ul",{children:[(0,O.jsxs)("li",{children:[(0,O.jsx)("p",{className:"mb20",children:null==ae?void 0:ae.total}),(0,O.jsx)("div",{children:"缺陷"})]}),(0,O.jsxs)("li",{children:[(0,O.jsxs)("div",{children:["等级:",(0,O.jsx)("b",{children:null==ae?void 0:ae.levelStr})]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("span",{children:"阻断"}),(0,O.jsx)("div",{children:(0,O.jsx)("aside",{style:{background:"#A73E38",width:0===(null==ae?void 0:ae.blocker)?0:"".concat((null==ae?void 0:ae.blocker)/(null==ae?void 0:ae.total)*100,"%")}})}),(0,O.jsx)("span",{children:null==ae?void 0:ae.blocker})]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("span",{children:"严重"}),(0,O.jsx)("div",{children:(0,O.jsx)("aside",{style:{background:"#DB544D",width:0===(null==ae?void 0:ae.critical)?0:"".concat((null==ae?void 0:ae.critical)/(null==ae?void 0:ae.total)*100,"%")}})}),(0,O.jsx)("span",{children:null==ae?void 0:ae.critical})]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("span",{children:"主要"}),(0,O.jsx)("div",{children:(0,O.jsx)("aside",{style:{background:"#F7AB3E",width:0===(null==ae?void 0:ae.major)?0:"".concat((null==ae?void 0:ae.major)/(null==ae?void 0:ae.total)*100,"%")}})}),(0,O.jsx)("span",{children:null==ae?void 0:ae.major})]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("span",{children:"次要"}),(0,O.jsx)("div",{children:(0,O.jsx)("aside",{style:{background:"#E7DF37",width:0===(null==ae?void 0:ae.minor)?0:"".concat((null==ae?void 0:ae.minor)/(null==ae?void 0:ae.total)*100,"%")}})}),(0,O.jsx)("span",{children:null==ae?void 0:ae.minor})]})]})]}),(0,O.jsxs)("ul",{children:[(0,O.jsxs)("li",{children:[(0,O.jsx)("p",{className:"mb20",children:null==oe?void 0:oe.total}),(0,O.jsx)("div",{children:"漏洞"})]}),(0,O.jsxs)("li",{children:[(0,O.jsxs)("div",{children:["等级:",(0,O.jsx)("b",{children:null==oe?void 0:oe.levelStr})]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("span",{children:"阻断"}),(0,O.jsx)("div",{children:(0,O.jsx)("aside",{style:{background:"#A73E38",width:0===(null==oe?void 0:oe.blocker)?0:"".concat((null==oe?void 0:oe.blocker)/(null==oe?void 0:oe.total)*100,"%")}})}),(0,O.jsx)("span",{children:null==oe?void 0:oe.blocker})]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("span",{children:"严重"}),(0,O.jsx)("div",{children:(0,O.jsx)("aside",{style:{background:"#DB544D",width:0===(null==oe?void 0:oe.critical)?0:"".concat((null==oe?void 0:oe.critical)/(null==oe?void 0:oe.total)*100,"%")}})}),(0,O.jsx)("span",{children:null==oe?void 0:oe.critical})]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("span",{children:"主要"}),(0,O.jsx)("div",{children:(0,O.jsx)("aside",{style:{background:"#F7AB3E",width:0===(null==oe?void 0:oe.major)?0:"".concat((null==oe?void 0:oe.major)/(null==oe?void 0:oe.total)*100,"%")}})}),(0,O.jsx)("span",{children:null==oe?void 0:oe.major})]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("span",{children:"次要"}),(0,O.jsx)("div",{children:(0,O.jsx)("aside",{style:{background:"#E7DF37",width:0===(null==oe?void 0:oe.minor)?0:"".concat((null==oe?void 0:oe.minor)/(null==oe?void 0:oe.total)*100,"%")}})}),(0,O.jsx)("span",{children:null==oe?void 0:oe.minor})]})]})]}),(0,O.jsxs)("ul",{children:[(0,O.jsxs)("li",{children:[(0,O.jsx)("p",{className:"mb20",children:null==ce?void 0:ce.total}),(0,O.jsx)("div",{children:"代码规范"})]}),(0,O.jsxs)("li",{children:[(0,O.jsxs)("div",{children:["等级:",(0,O.jsx)("b",{children:null==ce?void 0:ce.levelStr})]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("span",{children:"阻断"}),(0,O.jsx)("div",{children:(0,O.jsx)("aside",{style:{background:"#A73E38",width:0===(null==ce?void 0:ce.blocker)?0:"".concat((null==ce?void 0:ce.blocker)/(null==ce?void 0:ce.total)*100,"%")}})}),(0,O.jsx)("span",{children:null==ce?void 0:ce.blocker})]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("span",{children:"严重"}),(0,O.jsx)("div",{children:(0,O.jsx)("aside",{style:{background:"#DB544D",width:0===(null==ce?void 0:ce.critical)?0:"".concat((null==ce?void 0:ce.critical)/(null==ce?void 0:ce.total)*100,"%")}})}),(0,O.jsx)("span",{children:null==ce?void 0:ce.critical})]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("span",{children:"主要"}),(0,O.jsx)("div",{children:(0,O.jsx)("aside",{style:{background:"#F7AB3E",width:0===(null==ce?void 0:ce.major)?0:"".concat((null==ce?void 0:ce.major)/(null==ce?void 0:ce.total)*100,"%")}})}),(0,O.jsx)("span",{children:null==ce?void 0:ce.major})]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("span",{children:"次要"}),(0,O.jsx)("div",{children:(0,O.jsx)("aside",{style:{background:"#E7DF37",width:0===(null==ce?void 0:ce.minor)?0:"".concat((null==ce?void 0:ce.minor)/(null==ce?void 0:ce.total)*100,"%")}})}),(0,O.jsx)("span",{children:null==ce?void 0:ce.minor})]})]})]})]}),(0,O.jsxs)(j.Z,{className:y.tab,activeKey:ie.type,onChange:function(e){ie.page=1,ie.type=e,se(i()({},ie)),ue(ie)},children:[(0,O.jsx)(j.Z.TabPane,{tab:"Bug (".concat((null==ae?void 0:ae.total)||0,")")},"2"),(0,O.jsx)(j.Z.TabPane,{tab:"漏洞 (".concat((null==oe?void 0:oe.total)||0,")")},"3"),(0,O.jsx)(j.Z.TabPane,{tab:"代码规范 (".concat((null==ce?void 0:ce.total)||0,")")},"1")]}),(0,O.jsxs)("div",{className:y.group,children:[(0,O.jsx)("span",{className:"mr5",children:"严重程度:"}),(0,O.jsxs)(v.ZP.Group,{value:ie.degree,onChange:function(e){ie.page=1,ie.degree=e.target.value,se(i()({},ie)),ue(ie)},children:[(0,O.jsx)(v.ZP,{value:0,children:"全部"}),(0,O.jsx)(v.ZP,{value:1,children:"阻断"}),(0,O.jsx)(v.ZP,{value:2,children:"严重"}),(0,O.jsx)(v.ZP,{value:3,children:"主要"}),(0,O.jsx)(v.ZP,{value:4,children:"次要"})]})]}),(0,O.jsx)(f.Z,{style:{padding:"30px 30px 0 30px"},dataSource:X,columns:me,onChange:function(e){ie.page=null==e?void 0:e.current,ie.limit=null==e?void 0:e.pageSize,se(i()({},ie)),ue(ie)},loading:Q,pagination:{pageSize:ie.limit,total:ee,current:ie.page,showQuickJumper:!0,hideOnSinglePage:!0,position:["bottomCenter"],showTotal:function(e){return(0,O.jsxs)("span",{className:"mr10",children:["共",(0,O.jsx)("span",{className:"c-orange",children:e}),"条数据"]})}}})]}),(0,O.jsxs)("div",{className:y.modal,style:{height:"".concat($,"vh")},children:[(0,O.jsxs)("div",{className:y.head,children:[(0,O.jsx)("span",{children:"问题分析"}),(0,O.jsx)("i",{className:"icon-zuixiaohua iconfont mt10",onClick:function(){return R(32)}}),(0,O.jsx)("i",{style:{margin:"0 18px"},className:"icon-fangda iconfont",onClick:function(){return R(80)}}),(0,O.jsx)("i",{className:"icon-guanbi7 iconfont",onClick:function(){return R(0)}})]}),(0,O.jsxs)("div",{className:y.des,children:[(0,O.jsx)("div",{className:y.sub,children:null==L?void 0:L.title}),(0,O.jsxs)("div",{className:y.tags,children:[(0,O.jsxs)("span",{children:[xe[null==L?void 0:L.type]," ",null==L?void 0:L.type]}),(0,O.jsxs)("span",{children:[xe[null==L?void 0:L.level]," ",null==L?void 0:L.level]}),(0,O.jsxs)("span",{children:[(0,O.jsx)("i",{className:"iconfont icon-biaoqian4 mr5"}),null==L||null===(t=L.tags)||void 0===t?void 0:t.join(",")]}),(0,O.jsxs)("span",{children:["生效时间",N()(null==L?void 0:L.createTime).format("ll")]}),(0,O.jsx)("span",{children:null==L?void 0:L.language}),(0,O.jsxs)("span",{children:["常量/任务:",null==L?void 0:L.constantIssue]})]}),(0,O.jsx)("div",{className:y.example,dangerouslySetInnerHTML:{__html:(null==L?void 0:L.example)||""}})]})]}),(0,O.jsxs)(g.Z,{open:J,title:"规则说明",width:800,footer:null,onCancel:function(){U(!1)},children:[(0,O.jsx)("p",{children:"一、等级规则"}),(0,O.jsx)("p",{style:{marginLeft:"10px"},children:"1. 缺陷等级"}),(0,O.jsx)("p",{style:{marginLeft:"10px"},children:(0,O.jsx)(f.Z,{dataSource:[{live:"A",gz:"0个错误",ld:"0个漏洞",gf:"0 - 5%"},{live:"B",gz:"至少1个次要错误",ld:"至少1个次要漏洞",gf:"6% - 10%"},{live:"C",gz:"至少1个主要错误",ld:"至少1个主要漏洞",gf:"11% - 20%"},{live:"D",gz:"至少1个严重错误",ld:"至少1个严重漏洞",gf:"21% - 50%"},{live:"E",gz:"至少1个阻断错误",ld:"至少1个阻断漏洞",gf:"超过50%"}],columns:[{title:"等级",dataIndex:"live"},{title:"缺陷评估规则",dataIndex:"gz"},{title:"漏洞评估规则",dataIndex:"ld"},{title:"代码规范评估规则",dataIndex:"gf"}],pagination:!1})}),(0,O.jsx)("p",{style:{marginLeft:"10px"},children:"注代码规范评估规则中数值来源为计算技术债务时间占开发所有代码所需要的时间的比例Technical Debt Ratio"}),(0,O.jsx)("p",{style:{marginLeft:"20px"},children:"Technical Debt Ratio = 技术债务时间 / 开发时间"}),(0,O.jsx)("p",{style:{marginLeft:"20px"},children:"技术债务时间为修复所有问题所需要的时间。"}),(0,O.jsx)("p",{children:"二、复杂度规则"}),(0,O.jsx)("p",{style:{marginLeft:"10px"},children:"根据代码路径数计算的数值,每当一个函数的控制流分叉时,复杂度计数器就会自增一。"}),(0,O.jsx)("p",{style:{marginLeft:"10px"},children:"每个程序语言的关键字对应的复杂度数据不同但每个函数的最小复杂度为1。特定语言的详细数据略"}),(0,O.jsx)("p",{children:"三、代码质量分规则"}),(0,O.jsx)("p",{style:{marginLeft:"10px"},children:"代码质量分 = 0.5*缺陷分数 + 0.3*漏洞分数 + 0.2*代码规范性分数"}),(0,O.jsx)("p",{style:{marginLeft:"10px"},children:"其中:"}),(0,O.jsx)("p",{style:{marginLeft:"10px"},children:"缺陷/漏洞/代码规范性分数计算规则为100 - 100 *((100*阻断数 + 5*严重数 + 3*主要数 + 1*次数)/ 代码行数)"}),(0,O.jsx)("p",{style:{marginLeft:"10px"},children:"注:分数为空的代表不支持的文件格式。"})]})]})}))},66104:function(e,n,l){l.d(n,{Z:function(){return E}});var t=l(73287),i=l.n(t),s=l(45659),r=l(3286),a=l(59301),o=l(92343),c=l(36355),d=l(42884),u=l(91857);const x=e=>{let{children:n}=e;const{getPrefixCls:l}=a.useContext(c.E_),t=l("breadcrumb");return a.createElement("li",{className:`${t}-separator`,"aria-hidden":"true"},""===n?n:n||"/")};x.__ANT_BREADCRUMB_SEPARATOR=!0;var m=x,h=function(e,n){var l={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(l[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(e);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(l[t[i]]=e[t[i]])}return l};function p(e,n,l,t){if(null==l)return null;const{className:s,onClick:o}=n,c=h(n,["className","onClick"]),d=Object.assign(Object.assign({},(0,r.Z)(c,{data:!0,aria:!0})),{onClick:o});return void 0!==t?a.createElement("a",Object.assign({},d,{className:i()(`${e}-link`,s),href:t}),l):a.createElement("span",Object.assign({},d,{className:i()(`${e}-link`,s)}),l)}function j(e,n){return(l,t,i,s,r)=>{if(n)return n(l,t,i,s);const a=function(e,n){if(void 0===e.title||null===e.title)return null;const l=Object.keys(n).join("|");return"object"==typeof e.title?e.title:String(e.title).replace(new RegExp(`:(${l})`,"g"),((e,l)=>n[l]||e))}(l,t);return p(e,l,a,r)}}var v=function(e,n){var l={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(l[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(e);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(l[t[i]]=e[t[i]])}return l};const f=e=>{const{prefixCls:n,separator:l="/",children:t,menu:i,overlay:s,dropdownProps:r,href:o}=e;const c=(e=>{if(i||s){const l=Object.assign({},r);if(i){const e=i||{},{items:n}=e,t=v(e,["items"]);l.menu=Object.assign(Object.assign({},t),{items:null==n?void 0:n.map(((e,n)=>{var{key:l,title:t,label:i,path:s}=e,r=v(e,["key","title","label","path"]);let c=null!=i?i:t;return s&&(c=a.createElement("a",{href:`${o}${s}`},c)),Object.assign(Object.assign({},r),{key:null!=l?l:n,label:c})}))})}else s&&(l.overlay=s);return a.createElement(u.Z,Object.assign({placement:"bottom"},l),a.createElement("span",{className:`${n}-overlay-link`},e,a.createElement(d.Z,null)))}return e})(t);return null!=c?a.createElement(a.Fragment,null,a.createElement("li",null,c),l&&a.createElement(m,null,l)):null},g=e=>{const{prefixCls:n,children:l,href:t}=e,i=v(e,["prefixCls","children","href"]),{getPrefixCls:s}=a.useContext(c.E_),r=s("breadcrumb",n);return a.createElement(f,Object.assign({},i,{prefixCls:r}),p(r,i,l,t))};g.__ANT_BREADCRUMB_ITEM=!0;var b=g,y=l(17313),_=l(83116),k=l(37613);const N=e=>{const{componentCls:n,iconCls:l}=e;return{[n]:Object.assign(Object.assign({},(0,y.Wf)(e)),{color:e.itemColor,fontSize:e.fontSize,[l]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${e.paddingXXS}px`,borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",marginInline:-e.marginXXS,"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover}},(0,y.Qy)(e)),"li:last-child":{color:e.lastItemColor},[`${n}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${n}-link`]:{[`\n > ${l} + span,\n > ${l} + a\n `]:{marginInlineStart:e.marginXXS}},[`${n}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",padding:`0 ${e.paddingXXS}px`,marginInline:-e.marginXXS,[`> ${l}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}};var w=(0,_.Z)("Breadcrumb",(e=>{const n=(0,k.TS)(e,{});return[N(n)]}),(e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS}))),O=function(e,n){var l={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(l[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(e);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(l[t[i]]=e[t[i]])}return l};function S(e){const{breadcrumbName:n,children:l}=e,t=O(e,["breadcrumbName","children"]),i=Object.assign({title:n},t);return l&&(i.menu={items:l.map((e=>{var{breadcrumbName:n}=e,l=O(e,["breadcrumbName"]);return Object.assign(Object.assign({},l),{title:n})}))}),i}var C=function(e,n){var l={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(l[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(e);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(l[t[i]]=e[t[i]])}return l};const I=e=>{const{prefixCls:n,separator:l="/",style:t,className:d,rootClassName:u,routes:x,items:h,children:p,itemRender:v,params:g={}}=e,b=C(e,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:y,direction:_,breadcrumb:k}=a.useContext(c.E_);let N;const O=y("breadcrumb",n),[I,E]=w(O),Z=function(e,n){return(0,a.useMemo)((()=>e||(n?n.map(S):null)),[e,n])}(h,x);const P=j(O,v);if(Z&&Z.length>0){const e=[],n=h||x;N=Z.map(((t,i)=>{const{path:s,key:o,type:c,menu:d,overlay:u,onClick:x,className:h,separator:p,dropdownProps:j}=t,v=((e,n)=>{if(void 0===n)return n;let l=(n||"").replace(/^\//,"");return Object.keys(e).forEach((n=>{l=l.replace(`:${n}`,e[n])})),l})(g,s);void 0!==v&&e.push(v);const b=null!=o?o:i;if("separator"===c)return a.createElement(m,{key:b},p);const y={},_=i===Z.length-1;d?y.menu=d:u&&(y.overlay=u);let{href:k}=t;return e.length&&void 0!==v&&(k=`#/${e.join("/")}`),a.createElement(f,Object.assign({key:b},y,(0,r.Z)(t,{data:!0,aria:!0}),{className:h,dropdownProps:j,href:k,separator:_?"":l,onClick:x,prefixCls:O}),P(t,g,n,e,k))}))}else if(p){const e=(0,s.Z)(p).length;N=(0,s.Z)(p).map(((n,t)=>{if(!n)return n;const i=t===e-1;return(0,o.Tm)(n,{separator:i?"":l,key:t})}))}const D=i()(O,null==k?void 0:k.className,{[`${O}-rtl`]:"rtl"===_},d,u,E),L=Object.assign(Object.assign({},null==k?void 0:k.style),t);return I(a.createElement("nav",Object.assign({className:D,style:L},b),a.createElement("ol",null,N)))};I.Item=b,I.Separator=m;var E=I}}]);