@rsdoctor/client 1.5.3-alpha.0 → 1.5.3

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/dist/diff.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><title>Rsdoctor</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="./resource/js/react.3dfe4388.js"></script><script defer src="./resource/js/vender.964dfc5c.js"></script><script defer src="./resource/js/375.29108e01.js"></script><script defer src="./resource/js/808.8095cfcb.js"></script><script defer src="./resource/js/159.bb69af39.js"></script><script defer src="./resource/js/diff.1a4b5776.js"></script><link href="./resource/css/159.99c13fd4.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
1
+ <!DOCTYPE html><html><head><title>Rsdoctor</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="./resource/js/react.419e5c4a.js"></script><script defer src="./resource/js/vender.08a5ec82.js"></script><script defer src="./resource/js/375.29108e01.js"></script><script defer src="./resource/js/611.00341793.js"></script><script defer src="./resource/js/538.26a222ec.js"></script><script defer src="./resource/js/diff.d7e8e4b5.js"></script><link href="./resource/css/538.99c13fd4.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><title>Rsdoctor</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="./resource/js/react.3dfe4388.js"></script><script defer src="./resource/js/vender.964dfc5c.js"></script><script defer src="./resource/js/rc-0.bd9999ac.js"></script><script defer src="./resource/js/rc-1.eb2754d2.js"></script><script defer src="./resource/js/ant-design-0.71243426.js"></script><script defer src="./resource/js/ant-design-1.6050f2c5.js"></script><script defer src="./resource/js/ant-design-2.16432452.js"></script><script defer src="./resource/js/ant-design-3.23ce91b6.js"></script><script defer src="./resource/js/ant-design-4.97833ea2.js"></script><script defer src="./resource/js/ant-design-icons.6f529e48.js"></script><script defer src="./resource/js/375.29108e01.js"></script><script defer src="./resource/js/510.e39f3818.js"></script><script defer src="./resource/js/159.bb69af39.js"></script><script defer src="./resource/js/index.48c2b819.js"></script><link href="./resource/css/159.99c13fd4.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
1
+ <!DOCTYPE html><html><head><title>Rsdoctor</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="./resource/js/react.419e5c4a.js"></script><script defer src="./resource/js/vender.08a5ec82.js"></script><script defer src="./resource/js/rc-0.5662d149.js"></script><script defer src="./resource/js/rc-1.eb2754d2.js"></script><script defer src="./resource/js/ant-design-0.71243426.js"></script><script defer src="./resource/js/ant-design-1.6050f2c5.js"></script><script defer src="./resource/js/ant-design-2.16432452.js"></script><script defer src="./resource/js/ant-design-3.23ce91b6.js"></script><script defer src="./resource/js/ant-design-4.97833ea2.js"></script><script defer src="./resource/js/ant-design-icons.6f529e48.js"></script><script defer src="./resource/js/375.29108e01.js"></script><script defer src="./resource/js/510.e39f3818.js"></script><script defer src="./resource/js/538.26a222ec.js"></script><script defer src="./resource/js/index.2c346ce0.js"></script><link href="./resource/css/538.99c13fd4.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
@@ -0,0 +1,112 @@
1
+ "use strict";(self.webpackChunk_rsdoctor_client=self.webpackChunk_rsdoctor_client||[]).push([["538"],{8071(){},69064(){},3302(){},91419(){},35402(){},73472(){},52992(){},97862(){},87773(){},31535(){},85960(){},68371(){},42405(){},45545(){},70232(){},11341(){},31396(){},18682(){},79725(){},34861(){},38169(){},22797(e,t,n){n.d(t,{A:()=>v});var l=n(65723),r=n(21919),s=n(98685),i=n(10117),a=n(17400),o=n(66287),d=n(66020),c=n(60503),u=n(35500),h=n(19143),p=n(68701),x=n(47748),m=n(22155),g=n(67409),f=n(97322);let{jK:j,Sx:y}=i,v=e=>{let{router:t,renderFailState:n,extraContent:v}=e,[A,b]=(0,m.useState)(j.Success),[w,C]=(0,m.useState)({...a.s.viewMode}),[S,k]=(0,m.useState)(),[N,M]=(0,m.useState)(a.s.theme);return A===i.jK.Fail?n?(0,l.jsx)(l.Fragment,{children:n()}):(0,l.jsxs)(o.A,{direction:"vertical",style:{padding:14},children:[(0,l.jsx)(d.A.Text,{strong:!0,style:{fontSize:16},children:"load json file of Rsdoctor failed."}),(0,l.jsxs)(d.A.Text,{children:["try to use ",(0,l.jsx)(d.A.Text,{keyboard:!0,children:"command + r"})," to refresh page."]}),null,(0,l.jsx)(c.A,{}),(0,l.jsx)(o.A,{direction:"vertical",style:{width:"100%"},children:(0,l.jsxs)(d.A.Text,{style:{fontSize:16},children:["you can",(0,l.jsx)(d.A.Text,{strong:!0,style:{fontSize:"inherit"},children:"upload a file"}),"in the area below to analyze your project."]})}),(0,l.jsx)(c.A,{})]}):(0,l.jsx)(f.I9,{children:(0,l.jsx)(a.Q.Provider,{value:{...a.s,theme:N,setTheme:e=>{M(e),(0,s.setThemeToStorage)(e)},pageState:A,json:S,viewMode:w,setManifest:k,setPageState:b,setViewMode(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n={...w,...e};C(n),t&&(0,s.setViewModeToStorage)(n)}},children:(0,l.jsx)(a.Q.Consumer,{children:e=>(0,l.jsx)(u.Ay,{locale:(0,s.getLocale)(e.locale),theme:{algorithm:N===y.Dark?h.A.darkAlgorithm:h.A.defaultAlgorithm,token:{padding:16,colorText:"rgba(0, 0, 0, 0.85)",fontFamily:"var(--font-family-code)"}},children:(0,l.jsx)(r.PE,{children:(0,l.jsxs)(l.Fragment,{children:[v,(0,l.jsx)(g.tH,{FallbackComponent:e=>{let{error:t,resetErrorBoundary:n}=e;return(0,l.jsx)(p.Ay,{status:"error",title:"Sorry, something went wrong.",extra:(0,l.jsx)(x.Ay,{type:"primary",onClick:n,loading:A===j.Pending,children:"Reload"}),children:(0,l.jsxs)(d.A.Paragraph,{children:[(0,l.jsx)(d.A.Title,{level:3,children:"Error Stack"}),(0,l.jsx)("pre",{children:t.stack||t.message})]})})},onReset:()=>{window.location.reload()},children:t})]})})})})})})}},21376(e,t,n){n.d(t,{ZZ:()=>T,aM:()=>N,rU:()=>M});var l=n(65723),r=n(63079),s=n(84585),i=n(73147),a=n(66020),o=n(87417),d=n(14913),c=n(44759),u=n(66287),h=n(60503),p=n(84262),x=n(87655),m=n(47748),g=n(92554),f=n(55828),j=n(94959),y=n(71079),v=n(98685),A=n(14760),b=n(90220),w=n(10117),C=n(35471),S=n(74579),k=n(91888);let N=e=>{let{data:t}=e;return(0,l.jsx)(r.A,{gutter:w.or.BasePadding,wrap:!1,align:"top",children:(0,l.jsx)(s.A,{style:{height:"100%",width:"100%"},children:t.length?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(i.A,{style:{marginTop:"20px"},children:t.map((e,n)=>{var r;let{dependency:s,module:o,relativePath:d}=e,{statements:c}=s,{start:u}=(null==c||null==(r=c[0])?void 0:r.position)?o.isPreferSource?c[0].position.source:c[0].position.transformed:{start:{line:0,column:0}},h=`${d}:${u.line}:${u.column||1}`;return(0,l.jsx)(i.A.Item,{style:{cursor:"default"},children:(0,l.jsxs)(a.A.Text,{children:[(0,l.jsxs)("div",{className:"filePath-UF3inH",children:[h,(0,l.jsx)(a.A.Paragraph,{copyable:{text:d},style:{position:"relative",top:"7px"}})]}),n!==t.length-1?(0,l.jsx)(f.A,{className:"arrow-VrZOco"}):null]})},h)})})}):(0,l.jsx)(o.A,{description:"This package no dependencies"})})})},M=(0,S.eN)({Component:N,api:k.hp.ServerAPI.API.GetPackageRelationAlertDetails,responsePropName:"data"}),T=e=>{var t;let{data:n,getPackageRelationContentComponent:r}=e,{level:s,code:i,packages:o}=n,f=(0,v.useRuleIndexNavigate)(i,n.link),S=(0,g.x)(o,e=>e.targetSize.sourceSize),N=(0,v.formatSize)(S),{xs:M,lg:T,xxl:E}=d.Ay.useBreakpoint(),{name:R}=o.find(e=>!!e.target.name).target,z=o.map(e=>e.target.version);return(0,l.jsx)(c.A,{showIcon:!M,message:(0,l.jsxs)(u.A,{wrap:!0,split:M?null:(0,l.jsx)(h.A,{type:"vertical"}),align:"center",children:[(0,l.jsxs)(u.A,{wrap:!1,children:[(0,l.jsx)(a.A.Text,{code:!0,strong:!0,onClick:f,style:{cursor:"pointer"},children:(0,l.jsx)("a",{children:i})}),(0,l.jsx)(a.A.Text,{strong:!0,children:(null==(t=k.jO.RuleErrorMap[i])?void 0:t.title)||n.title})]}),(0,l.jsxs)(a.A.Paragraph,{ellipsis:{rows:1},style:{marginBottom:0},children:[(0,l.jsx)(a.A.Text,{strong:!0,code:!0,children:R}),(0,l.jsxs)(a.A.Text,{strong:!0,children:[" ",n.packages.length]}),(0,l.jsx)(a.A.Text,{children:" versions was found"})]}),(0,l.jsx)(C.Ex,{label:"total size",value:N,type:"error",tooltip:`total size of ${n.packages.length} versions is ${N}`})]}),description:(0,l.jsx)(u.A,{direction:"vertical",wrap:!1,children:n.packages.map(e=>{let{target:t,targetSize:n}=e,r=(0,v.formatSize)(n.sourceSize),s=n.parsedSize?(0,v.formatSize)(n.parsedSize):null,i=`${t.name}@${t.version}`;return(0,l.jsxs)(u.A,{style:{wordBreak:"break-all"},align:"center",split:M?null:(0,l.jsx)(h.A,{type:"vertical"}),wrap:!0,children:[(0,l.jsxs)(u.A,{wrap:!1,children:[(0,l.jsx)(a.A.Text,{style:{marginLeft:4},children:"└"}),(0,l.jsx)(C.Ex,{label:t.name,value:`v${t.version}`,tooltip:i})]}),(0,l.jsxs)(u.A,{children:[(0,l.jsx)(C.Ex,{label:(0,l.jsxs)("div",{color:"rgb(255, 255, 255)",children:["Source Size ",(0,l.jsx)(j.A,{})]}),value:r,tooltip:`The bundle size of "${i}" is ${r}, this is source size.`,type:"error"}),(0,l.jsx)(C.Ex,{label:"Bundled size",value:s||"CONCATENATED",tooltip:`The bundle size of "${i}" is ${r}, this is after bundled, concatenated module cannot get bundled size. `,type:"error"})]}),(0,l.jsx)(a.A.Paragraph,{style:{marginBottom:0,width:E?"40rem":T?"30rem":"20rem"},copyable:{text:t.root},ellipsis:{rows:1,expandable:!0,symbol:(0,l.jsx)(y.A,{}),tooltip:t.root},code:!0,children:t.root})]},t.version)})}),type:"warn"===s?"info":s,action:(0,l.jsxs)(l.Fragment,{children:[o&&o.length>0?(0,l.jsx)(A.hX,{text:"Show Relations",buttonProps:{size:"small"},drawerProps:{title:n.title,width:"60%"},children:(0,l.jsxs)(u.A,{direction:"vertical",className:"alert-space",children:[(0,l.jsxs)(u.A,{style:{marginBottom:w.or.BasePadding/2},children:[(0,l.jsx)(b.h,{text:R,upperFirst:!1}),(0,l.jsx)(a.A.Text,{strong:!0,children:z.length}),(0,l.jsx)(a.A.Text,{children:" versions was found: "}),z.map(e=>(0,l.jsx)(a.A.Text,{strong:!0,code:!0,children:e},e))]}),(0,l.jsx)(p.A,{type:"card",size:"middle",className:"tabs-space",defaultActiveKey:z[0],items:o.map(e=>{let{target:t,targetSize:s}=e;return{label:(0,l.jsxs)(u.A,{children:[(0,l.jsx)(a.A.Text,{children:`${R}@${t.version}`}),(0,l.jsx)(x.A,{color:w.Q1.Red,children:(0,v.formatSize)(s.sourceSize)})]}),key:`${t.root}${t.name}${t.version}`,children:r({data:n,package:e})}})})]})}):null,(0,l.jsx)(h.A,{type:"vertical"}),(0,l.jsx)(m.Ay,{type:"link",onClick:f,size:"small",icon:(0,l.jsx)(j.A,{})})]})})}},34280(e,t,n){n.d(t,{J:()=>el});var l=n(65723),r=n(87655),s=n(87417),i=n(84262),a=n(30786),o=n(66020),d=n(47748),c=n(11728),u=n(22155);let h=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,l.jsx)("rect",{width:16,height:16,fill:"#FFF2E8",rx:2}),(0,l.jsx)("path",{fill:"#FA541C",d:"M13.21 4.026a.5.5 0 0 0-.5-.5H3.29a.5.5 0 0 0-.5.5v1.316a.5.5 0 0 0 .5.5h9.42a.5.5 0 0 0 .5-.5zM13.21 7.342a.5.5 0 0 0-.5-.5H3.29a.5.5 0 0 0-.5.5v1.316a.5.5 0 0 0 .5.5h9.42a.5.5 0 0 0 .5-.5zM13.21 10.658a.5.5 0 0 0-.5-.5H3.29a.5.5 0 0 0-.5.5v1.316a.5.5 0 0 0 .5.5h9.42a.5.5 0 0 0 .5-.5z"})]}),p=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,l.jsx)("rect",{width:16,height:16,fill:"#F6FFED",rx:2}),(0,l.jsx)("path",{fill:"#52C41A",fillRule:"evenodd",d:"M4.586 6.172a.853.853 0 0 0-.853.854v5.12c0 .472.382.854.853.854h6.828a.853.853 0 0 0 .853-.854v-5.12a.853.853 0 0 0-.853-.854H9.707V7.88a1.707 1.707 0 1 1-3.414 0V6.172z",clipRule:"evenodd"}),(0,l.jsx)("path",{fill:"#52C41A",d:"M7.147 4.466a.853.853 0 1 1 1.707 0V7.88a.853.853 0 0 1-1.707 0z"}),(0,l.jsx)("path",{fill:"#52C41A",d:"m8 3 2.217 2.304H5.783z"})]}),x=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,l.jsx)("rect",{width:16,height:16,fill:"#FFF1F0",rx:2}),(0,l.jsx)("path",{fill:"#FF5658",fillRule:"evenodd",d:"M13 8A5 5 0 1 1 3 8a5 5 0 0 1 10 0M9.768 6.232a.5.5 0 0 1 0 .707L8.708 8l1.06 1.06a.5.5 0 0 1-.707.708L8 8.708l-1.062 1.06a.5.5 0 0 1-.707-.707L7.293 8l-1.06-1.062a.5.5 0 0 1 .706-.707L8 7.293l1.06-1.06a.5.5 0 0 1 .708 0",clipRule:"evenodd"})]});var m=n(98685);let g="box-yCgd0f",f="title-OR484p",j="content-iOwxYc",{Text:y}=o.A,v=e=>{let{data:t}=e;return t.map(e=>{let{code:t,link:n,error:r}=e,{source:s,output:i}=r||{},a=(null==s?void 0:s.path)?`${null==s?void 0:s.path}:${null==s?void 0:s.line}:${null==s?void 0:s.column}`:null,o=(null==i?void 0:i.path)?`${null==i?void 0:i.path}:${null==i?void 0:i.line}:${null==i?void 0:i.column}`:`There's no source map for this error. Possible reasons are as follows:
2
+ 1. It might come from a third-party library without source map.
3
+ 2. If this is your business source code, source map should be enabled in your build config.
4
+ `,u=(0,m.useRuleIndexNavigate)(t,n);return(0,l.jsxs)("div",{className:"container-iQTvf7",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:f,children:"Source"}),(0,l.jsxs)("div",{className:g,children:[(0,l.jsx)(c.A,{component:h}),(0,l.jsx)(y,{ellipsis:{tooltip:a},className:`${j} e2e-ecma-source`,children:a})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:f,children:"Output"}),(0,l.jsxs)("div",{className:g,children:[(0,l.jsx)(c.A,{component:p}),(0,l.jsx)(y,{ellipsis:{tooltip:o},className:`${j} e2e-ecma-output`,children:o})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:f,children:"Error"}),(0,l.jsxs)("div",{className:g,children:[(0,l.jsx)(c.A,{component:x}),(0,l.jsx)(y,{ellipsis:{tooltip:e.description},className:`${j} e2e-ecma-error`,children:e.description})]})]}),(0,l.jsx)(d.Ay,{onClick:u,type:"link",children:"more"})]})})};var A=n(23230),b=n(29656),w=n(60503),C=n(66287),S=n(58023),k=n(92554),N=n(14760),M=n(90220),T=n(10117);let E=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,l.jsx)("rect",{width:16,height:16,fill:"#FFF7E6",rx:2}),(0,l.jsx)("path",{fill:"#F2793D",fillRule:"evenodd",d:"M11.377 5.186h1.488L10.973 3H5.027L3.135 5.186h1.488l.87-1.005h5.015z",clipRule:"evenodd"}),(0,l.jsx)("path",{fill:"#F2793D",fillRule:"evenodd",d:"M3.676 4.82h8.648c.299 0 .54.243.54.545v7.09a.543.543 0 0 1-.54.545H3.676a.543.543 0 0 1-.54-.545v-7.09c0-.302.241-.546.54-.546m2.702 1.77a.54.54 0 0 0 0 1.082h3.244a.54.54 0 1 0 0-1.081z",clipRule:"evenodd"})]}),R=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,l.jsx)("rect",{width:16,height:16,fill:"#FFF7E6",rx:2}),(0,l.jsx)("path",{fill:"#F2793D",d:"M3 7V5c0-1.105 2.239-2 5-2s5 .895 5 2v2c0 1.105-2.239 2-5 2s-5-.895-5-2"}),(0,l.jsx)("path",{fill:"#F2793D",d:"M8 10c2.761 0 5-.895 5-2v1c0 1.105-2.239 2-5 2s-5-.895-5-2V8c0 1.105 2.239 2 5 2"}),(0,l.jsx)("path",{fill:"#F2793D",d:"M8 12c2.761 0 5-.895 5-2v1c0 1.105-2.239 2-5 2s-5-.895-5-2v-1c0 1.105 2.239 2 5 2"})]});var z=n(85817);let L=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,l.jsx)("rect",{width:16,height:16,fill:"#E6F7FF",rx:2}),(0,l.jsx)("g",{clipPath:"url(#version_svg__a)",children:(0,l.jsx)("path",{fill:"#3874F6",d:"M13.438 9.875a.6.6 0 0 0-.216.043h-.002l-.002.002L8 12.079l-5.217-2.16H2.78l-.002-.001a.562.562 0 0 0-.43 1.039l5.432 2.248.002.001.003.001a.56.56 0 0 0 .43 0h.003l.002-.002 5.433-2.248a.563.563 0 0 0-.216-1.082M2.348 6.082 7.78 8.33l.003.001.002.001a.56.56 0 0 0 .43 0h.003l.002-.002 5.433-2.248a.563.563 0 0 0 0-1.04L8.22 2.796l-.002-.001-.003-.001a.56.56 0 0 0-.43 0h-.003l-.002.002-5.433 2.248a.563.563 0 0 0 0 1.039m11.09 1.355a.6.6 0 0 0-.216.043l-.002.001-.002.001L8 9.642l-5.217-2.16H2.78l-.002-.002a.563.563 0 0 0-.43 1.04l5.432 2.248h.002l.003.002a.56.56 0 0 0 .43 0l.003-.001.002-.001 5.433-2.248a.563.563 0 0 0-.216-1.083"})}),(0,l.jsx)("defs",{children:(0,l.jsx)("clipPath",{id:"version_svg__a",children:(0,l.jsx)("path",{fill:"#fff",d:"M2 2h12v12H2z"})})})]}),P="label-XufLCq",D="labelContent-nkrbEg",B="collapseContainer-RlFMpI",I="collapseChild-WWZD3z",F="attribute-bDSZ0z",O="iconContainer-qPzCrR",$="data-po89g7",G="pkgName-vA16cZ",{Paragraph:_,Text:W}=o.A,{innerWidth:V}=window,H=e=>{let{title:t,description:n,extra:r}=e;return(0,l.jsxs)("div",{className:P,children:[(0,l.jsxs)("div",{className:D,children:[(0,l.jsx)("div",{children:t}),(0,l.jsx)("div",{children:n})]}),(0,l.jsx)("div",{children:r})]})},U=e=>{let{data:t,extraData:n}=e,s=t.map(e=>{let{packages:t}=e;return{totalSize:(0,k.x)(t,e=>e.targetSize.sourceSize),data:e}}).sort((e,t)=>t.totalSize-e.totalSize).map(e=>{let{data:t,totalSize:s}=e,{packages:a}=t,d=(0,m.formatSize)(s),{name:u}=a.find(e=>!!e.target.name).target,h=a.map(e=>e.target.version);return{key:u,label:(0,l.jsx)(H,{title:(0,l.jsx)(r.A,{style:{backgroundColor:"#EAEDF1",borderRadius:"2px"},children:(0,l.jsx)("span",{className:G,children:u})}),description:`${a.length} versions was found`,extra:(0,l.jsxs)("div",{className:"extraContainer-Zf1u14",children:[(0,l.jsxs)("div",{className:O,children:[(0,l.jsx)(c.A,{style:{fontSize:"18px"},component:z.A}),(0,l.jsx)("span",{className:$,children:d})]}),a&&a.length>0?(0,l.jsx)(N.hX,{text:"Show Relations",buttonProps:{size:"small"},drawerProps:{title:t.title,width:"60%"},children:(0,l.jsxs)(C.A,{direction:"vertical",className:"alert-space",style:{width:"100%"},children:[(0,l.jsxs)(C.A,{style:{marginBottom:T.or.BasePadding/2,width:"100%"},children:[(0,l.jsx)(M.h,{text:(0,l.jsx)(r.A,{style:{backgroundColor:"#EAEDF1"},children:u}),upperFirst:!1}),(0,l.jsx)(o.A.Text,{strong:!0,children:h.length}),(0,l.jsx)(o.A.Text,{children:" versions found"})]}),(0,l.jsx)(i.A,{size:"middle",items:a.map(e=>{let{target:s,targetSize:i}=e;return{label:(0,l.jsxs)(C.A,{className:"drawerLabelTitle-bDwhFt",children:[(0,l.jsxs)("div",{children:["v",s.version]}),(0,l.jsx)(r.A,{className:"drawerLabelSize-gzchzs",children:(0,m.formatSize)(i.sourceSize)})]}),key:`${s.root}${s.name}${s.version}`,children:n.getPackageRelationContentComponent({data:t,package:e})}})})]})}):null]})}),children:(0,l.jsx)(()=>a.map((e,t)=>{let n=e.target.version,r=e.target.root,s=(0,m.formatSize)(e.targetSize.sourceSize),i=e.targetSize.parsedSize?(0,m.formatSize)(e.targetSize.parsedSize):null;return(0,l.jsxs)("div",{className:B,children:[(0,l.jsx)(A.h,{style:{backgroundColor:"#fff"},title:(0,l.jsx)(W,{style:{width:V>1500?900:700},ellipsis:{tooltip:r},children:r}),description:(0,l.jsxs)("div",{className:I,children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:F,children:"Version"}),(0,l.jsxs)("div",{className:O,children:[(0,l.jsx)(c.A,{style:{fontSize:"18px"},component:L}),(0,l.jsxs)("span",{className:$,children:["v",n]})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:F,children:"Source size"}),(0,l.jsxs)("div",{className:O,children:[(0,l.jsx)(c.A,{style:{fontSize:"18px"},component:R}),(0,l.jsx)("span",{className:$,children:s})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:F,children:"Bundle size"}),(0,l.jsxs)("div",{className:O,children:[(0,l.jsx)(c.A,{style:{fontSize:"18px"},component:E}),(0,l.jsx)(b.A,{title:`The bundle size of "${u}" is ${s}, this is after bundled, concatenated module cannot get bundled size. `,children:(0,l.jsx)("span",{className:$,children:i||"CONCATENATED"})})]})]})]}),icon:(0,l.jsx)(_,{style:{position:"relative",top:"-10px"},copyable:{text:r}})}),t!==a.length-1?(0,l.jsx)(w.A,{style:{margin:"10px 0"}}):null]})}),{})}});return(0,l.jsx)(S.A,{style:{width:"100%"},defaultActiveKey:["E1001"],items:s})},q=e=>{let{data:t}=e;return t.map(e=>{let{code:t,link:n,description:r}=e,s=(0,m.useRuleIndexNavigate)(t,n);return(0,l.jsx)(A.A,{style:{background:"#fff"},description:(0,l.jsx)("div",{className:"description-h4sYv3",dangerouslySetInnerHTML:{__html:r||""}}),icon:(0,l.jsx)(d.Ay,{onClick:()=>s,type:"link",children:"more"})})})},{Text:K}=o.A,{innerWidth:Q}=window,Z=e=>{let{title:t,description:n,extra:r}=e;return(0,l.jsxs)("div",{className:P,children:[(0,l.jsxs)("div",{className:D,children:[(0,l.jsx)("div",{children:t}),(0,l.jsx)("div",{children:n})]}),(0,l.jsx)("div",{children:r})]})},Y=e=>{let{data:t}=e,n=t.map(e=>{let{package:t,chunks:n}=e;return{key:`${t.name}@${t.version}`,label:(0,l.jsx)(Z,{title:(0,l.jsx)(r.A,{style:{backgroundColor:"#EAEDF1",borderRadius:"2px"},children:(0,l.jsx)("span",{className:G,children:`${t.name}@${t.version}`})}),description:"has duplicates bundled into multiple chunks."}),children:(0,l.jsx)(()=>n.map(e=>{let{chunks:t,module:n}=e;return(0,l.jsx)("div",{className:B,children:(0,l.jsx)(A.h,{style:{backgroundColor:"#fff"},title:(0,l.jsxs)(C.A,{children:[(0,l.jsx)(c.A,{style:{fontSize:"18px"},component:z.A}),(0,l.jsxs)(K,{style:{width:Q>1500?900:700},children:["Module:"," ",(0,l.jsx)(K,{style:{fontSize:12,color:"rgba(28, 31, 35, 0.6)",fontWeight:300},children:n.path})]})]}),description:(0,l.jsx)("div",{className:I,children:t.map(e=>(0,l.jsxs)("div",{style:{display:"flex"},children:[(0,l.jsx)("div",{className:F,children:"Chunk"}),(0,l.jsx)("div",{className:O,children:(0,l.jsx)("span",{className:$,children:e.name})})]}))})})})}),{})}});return(0,l.jsx)(S.A,{style:{width:"100%"},defaultActiveKey:["E1005"],items:n})};var J=n(33498);let{Text:X}=o.A,{innerWidth:ee}=window,et=e=>{let{title:t,description:n,extra:r}=e;return(0,l.jsxs)("div",{className:P,children:[(0,l.jsxs)("div",{className:D,children:[(0,l.jsx)("div",{children:t}),(0,l.jsx)("div",{children:n})]}),(0,l.jsx)("div",{children:r})]})},en=e=>{let{data:t,extraData:n}=e,{cwd:s}=n,i=t.map(e=>{let{module:t,initialChunks:n,asyncChunks:i}=e,a=(0,J.Zb)(t.path,s);return{key:a,label:(0,l.jsx)(et,{title:(0,l.jsx)(r.A,{style:{backgroundColor:"#EAEDF1",borderRadius:"2px"},children:(0,l.jsx)("span",{className:G,children:a})}),description:"is included in both initial and async chunks."}),children:(0,l.jsx)(()=>(0,l.jsx)("div",{className:B,children:(0,l.jsx)(A.h,{style:{backgroundColor:"#fff"},title:(0,l.jsxs)(C.A,{children:[(0,l.jsx)(c.A,{style:{fontSize:"18px"},component:z.A}),(0,l.jsxs)(X,{style:{width:ee>1500?900:700},children:["Module:"," ",(0,l.jsx)(X,{style:{fontSize:12,color:"rgba(28, 31, 35, 0.6)",fontWeight:300},children:a})]})]}),description:(0,l.jsxs)("div",{className:I,children:[n.length>0&&(0,l.jsxs)("div",{style:{marginBottom:16},children:[(0,l.jsx)("div",{style:{marginBottom:8,fontWeight:500,color:"rgba(28, 31, 35, 0.85)"},children:"Initial Chunks:"}),n.map(e=>(0,l.jsxs)("div",{style:{display:"flex",marginBottom:4},children:[(0,l.jsx)("div",{className:F,children:"Chunk"}),(0,l.jsx)("div",{className:O,children:(0,l.jsx)("span",{className:$,children:e.name||`chunk-${e.id}`})})]},e.id))]}),i.length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{marginBottom:8,fontWeight:500,color:"rgba(28, 31, 35, 0.85)"},children:"Async Chunks:"}),i.map(e=>(0,l.jsxs)("div",{style:{display:"flex",marginBottom:4},children:[(0,l.jsx)("div",{className:F,children:"Chunk"}),(0,l.jsx)("div",{className:O,children:(0,l.jsx)("span",{className:$,children:e.name||`(no chunk name, ChunkId: ${e.id})`})})]},e.id))]})]})})}),{})}});return(0,l.jsx)(S.A,{style:{width:"100%"},defaultActiveKey:i.map(e=>e.key),items:i})},el=e=>{let{title:t,dataSource:n,extraData:o}=e,[d,c]=(0,u.useState)("E1001"),h=[{key:"E1001",label:"Duplicate Packages",data:[]},{key:"E1002",label:"Cross Chunks Package",data:[]},{key:"E1003",label:"Loader Performance Optimization",data:[]},{key:"E1004",label:"ECMA Version Check",data:[]},{key:"E1005",label:"Default Import Check",data:[]},{key:"E1006",label:"Module Mixed Chunks",data:[]}];n.forEach(e=>{var t;let n=null==(t=h.find(t=>t.key===e.code))?void 0:t.data;null==n||n.push(e)});let p=h.map(e=>{let t,n,i=d===e.key?{border:"1px solid #91D5FF",backgroundColor:"#E6F7FF"}:{},c=d===e.key?{color:"#1890FF"}:{};switch(e.key){case"E1001":t=(0,l.jsx)(U,{data:e.data,extraData:o});break;case"E1002":t=(0,l.jsx)(Y,{data:e.data,extraData:o});break;case"E1003":case"E1005":t=(0,l.jsx)(q,{data:e.data});break;case"E1004":n=(0,l.jsx)("span",{children:"No ECMA Version Check Rules were found. Please refer to 「https://rsdoctor.rs/guide/usage/rule-config」."}),t=(0,l.jsx)(v,{data:e.data});break;case"E1006":t=(0,l.jsx)(en,{data:e.data,extraData:o});break;default:t=null}return e.data.length||(t=(0,l.jsx)(s.A,{description:n,image:s.A.PRESENTED_IMAGE_SIMPLE})),{key:e.key,label:(0,l.jsx)(()=>(0,l.jsx)(A.A,{style:{backgroundColor:"transparent",paddingLeft:0,paddingRight:0,width:"100%"},title:(0,l.jsx)("span",{className:"labelTitle-tjSCQ_",children:e.label}),description:(0,l.jsxs)("div",{className:"labelDescription-kB74lb",children:[(0,l.jsx)("span",{children:e.data.length}),(0,l.jsx)(r.A,{style:{fontFamily:"Menlo",borderRadius:"2px",...i},children:(0,l.jsx)("span",{style:{...c},children:e.key})})]})}),{}),children:(0,l.jsx)(a.Zp,{className:"card-HNTMcZ",type:"inner",title:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.A,{style:{fontFamily:"Menlo",fontWeight:"700",fontSize:"13px",backgroundColor:"#EAEDF1",borderRadius:"2px"},children:e.key}),(0,l.jsx)("span",{children:e.label})]}),children:t})}});return(0,l.jsx)(a.Zp,{style:{width:"100%",borderRadius:"12px"},children:(0,l.jsxs)("div",{className:"container-TWzmhb",children:[(0,l.jsx)("div",{className:"title-gD67_A",children:t}),n.length?(0,l.jsx)(i.A,{onChange:c,tabBarGutter:10,type:"card",defaultActiveKey:"E1001",items:p}):(0,l.jsx)("div",{style:{minHeight:"480px",display:"flex",justifyContent:"center",alignItems:"center"},children:(0,l.jsx)(s.A,{description:"No Bundle Alerts Data",image:s.A.PRESENTED_IMAGE_SIMPLE})})]})})}},30942(e,t,n){var l=n(65723),r=n(22155),s=n(91888),i=n(98685),a=n(34280),o=n(74579),d=n(10117),c=n(21376);(0,o.eN)({api:s.hp.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{filter:t,project:n}=e,{root:s,errors:o}=n,u=(0,i.useCompileAlertsByErrors)(o),{setCompileAlertsViewMode:h,viewMode:p,setViewMode:x}=(0,i.useViewMode)(),m=t?u.filter(t):u;return(0,r.useEffect)(()=>{(0,i.hasViewModeFromStorage)()||x({compileAlerts:u.length>=5?d.nE.Group:d.nE.List},!1)},[]),(0,l.jsx)(a.J,{title:"Compile Alerts",dataSource:m,extraData:{cwd:s,getPackageRelationContentComponent:e=>(0,l.jsx)(c.rU,{body:{id:e.data.id,target:e.package.target},cwd:s})},viewMode:p.compileAlerts,setViewMode:h,cwd:s})}})},49084(e,t,n){n.d(t,{EJ:()=>S});var l=n(65723),r=n(22155),s=n(91888),i=n(66020),a=n(63079),o=n(47748),d=n(84585),c=n(58023),u=n(87655),h=n(44759),p=n(35423),x=n(40961),m=n(52416),g=n(68108),f=n(29269),j=n(27222),y=n(96131),v=n.n(y),A=n(74579),b=n(10117);function w(e){let t=0,n=0;e.forEach(e=>{"warn"===e.level?t++:n++});let r=0!==t&&0!==n?"problems":0===t?"errors":"warns";return{title:`${e.length} compiled ${r}`,detail:(0,l.jsxs)(i.A.Text,{strong:!0,style:{color:"#fff",marginBottom:0},children:[(0,l.jsx)(i.A.Text,{style:{color:"inherit",fontSize:16},children:"Compiled with"}),(0,l.jsxs)(i.A.Text,{strong:!0,style:{color:b.Q1.Red,fontSize:16},children:[" ",n," ",1===n?"error":"errors"," "]}),(0,l.jsx)(i.A.Text,{style:{color:"inherit",fontSize:16},children:"and"}),(0,l.jsxs)(i.A.Text,{strong:!0,style:{color:b.Q1.Yellow,fontSize:16},children:[" ",t," ",1===t?"warning":"warnings"]})]}),warns:t,errors:n}}n(70284);let C=e=>{let{alerts:t=[],open:n,onClose:s}=e;return t.length?(0,l.jsxs)(j.default,{visible:n,onClose:()=>s(),style:{width:"100%",height:"100%",margin:0,zIndex:1e3},closable:!1,modalRender:e=>r.cloneElement(e,{style:{background:"rgba(0, 0, 0, 0.7)",color:"#fff",height:"100%",overflow:"scroll",borderRadius:0}}),children:[(0,l.jsxs)(a.A,{justify:"space-between",align:"middle",children:[w(t).detail,(0,l.jsx)(o.Ay,{onClick:()=>s(),type:"text",style:{color:"#fff"},size:"large",icon:(0,l.jsx)(x.A,{})})]}),(0,l.jsx)(a.A,{gutter:[0,b.or.BasePadding],children:t.map(e=>(0,l.jsx)(d.A,{span:24,style:{whiteSpace:"pre-wrap",lineHeight:"16px",fontSize:14},children:(0,l.jsx)(c.A,{ghost:!0,style:{background:"#000"},defaultActiveKey:[e.id],expandIcon:e=>e.isActive?(0,l.jsx)(m.A,{style:{color:"#fff"}}):(0,l.jsx)(g.A,{style:{color:"#fff"}}),children:(0,l.jsx)(c.A.Panel,{header:(0,l.jsxs)("div",{style:{color:"#fff"},children:["warn"===e.level?(0,l.jsx)(u.A,{color:b.Q1.Yellow,children:"WARNING"}):(0,l.jsx)(u.A,{color:b.Q1.Red,children:"ERROR"}),(0,l.jsx)(v(),{children:e.description||e.title})]}),children:(0,l.jsx)("div",{style:{color:"#fff"},children:(0,l.jsx)(v(),{children:e.stack})})},e.id)})},e.id))})]}):null},S=(0,A.eN)({api:s.hp.ServerAPI.API.GetOverlayAlerts,Component:e=>{let{alerts:t=[]}=e;if(!t.length)return null;let[n,s]=(0,r.useState)(!1);return(0,l.jsxs)("div",{className:"container-t1WME9",children:[(0,l.jsx)("div",{onClick:()=>s(!n),className:"badgeContainer-K7EgOu",children:(0,l.jsx)(p.A,{count:t.length,size:"small",children:(0,l.jsx)(f.A,{style:{fontSize:15}})})}),(0,l.jsx)(C,{alerts:t,open:n,onClose:()=>s(!1)})]})},responsePropName:"alerts",fallbackComponent:()=>null});(0,A.eN)({api:s.hp.ServerAPI.API.GetOverlayAlerts,Component:e=>{let{alerts:t=[],defaultOpen:n=t.length>0}=e;if(!t.length)return null;let[s,i]=(0,r.useState)(n);return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)(h.A,{banner:!0,message:r.cloneElement(w(t).detail,{style:{color:"#000"}}),icon:(0,l.jsx)(f.A,{}),action:(0,l.jsx)(o.Ay,{onClick:()=>i(!0),size:"small",children:"More"})}),(0,l.jsx)(C,{alerts:t,open:s,onClose:()=>i(!1)})]})},responsePropName:"alerts",fallbackComponent:()=>null})},35471(e,t,n){n.d(t,{Ex:()=>i});var l=n(65723),r=n(29656);n(22155);let s={default:"linear-gradient(to bottom, #3ea2ff 0%, #0072db 100%)",success:"linear-gradient(to bottom, #6cf42a 0%, #52C41A 100%)",warn:"linear-gradient(to bottom, #ffc100 0%, #f59025 100%)",error:"linear-gradient(to bottom, rgb(250 127 22), #FF4D4F 100%)"},i=e=>{let{label:t,value:n,type:i="default",tooltip:a}=e,o={height:"100%",lineHeight:"22px",width:"auto",display:"inline-block",boxSizing:"border-box",padding:"0 6px",color:"#fff",fontSize:12,textAlign:"center",verticalAlign:"middle"},d=(0,l.jsxs)("div",{style:{height:22,margin:0,padding:0,boxSizing:"border-box",borderRadius:4,fontSize:0,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",display:"flex",justifyContent:"flex-start",alignItems:"center"},children:[(0,l.jsx)("div",{style:{...o,borderTopLeftRadius:4,borderBottomLeftRadius:4,background:"linear-gradient(to bottom, #525252a3 0%, #1F1F1F 100%)"},children:t}),(0,l.jsx)("div",{style:{...o,borderTopRightRadius:4,borderBottomRightRadius:4,overflow:"hidden",textOverflow:"ellipsis",background:s[i]||s.default},children:n})]});return a?(0,l.jsx)(r.A,{title:!0===a?n:a,placement:"topLeft",children:d}):d}},67331(e,t,n){n.d(t,{QE:()=>m,aq:()=>f,vh:()=>x});var l=n(65723),r=n(91888),s=n(66020),i=n(66287),a=n(29656),o=n(85768),d=n(40799),c=n(22155),u=n(98685),h=n(10117),p=n(25800);let x=e=>{let{baseline:t,current:n,...r}=e,s=d.TS.diffSize(t,n);return(0,l.jsx)(m,{...r,...s})},m=e=>{let{percent:t,state:n,fontSize:i=14}=e,a=+t.toFixed(2);if(a>0){let e=`${a}`;if(n===r.Kj.RsdoctorClientDiffState.Up)return(0,l.jsxs)(s.A.Text,{strong:!0,style:{fontSize:i,color:h.Q1.Red},children:["+",e,"%"]});if(n===r.Kj.RsdoctorClientDiffState.Down)return(0,l.jsxs)(s.A.Text,{strong:!0,style:{fontSize:i,color:h.Q1.Green},children:["-",e,"%"]})}return null},g=e=>{let{data:t,formatter:n}=e,{percent:r,state:o,size:d}=t,{baseline:c,current:h}=d,p=n?n(c,"baseline"):(0,u.formatSize)(c),x=n?n(h,"current"):(0,u.formatSize)(h);return(0,l.jsx)(i.A,{align:"start",children:(0,l.jsxs)(i.A,{direction:"vertical",style:{textAlign:"left"},children:[(0,l.jsxs)(i.A,{children:[(0,l.jsx)(s.A.Text,{style:{fontSize:10,color:"inherit"},keyboard:!0,children:"Current"}),(0,l.jsx)(a.A,{title:"number"==typeof x||"string"==typeof x?`Value of Current is ${x}`:void 0,children:(0,l.jsx)(s.A.Text,{style:{fontSize:16,color:"inherit"},strong:!0,children:x})}),(0,l.jsx)(m,{percent:r,state:o})]}),(0,l.jsxs)(i.A,{children:[(0,l.jsx)(s.A.Text,{style:{fontSize:10,color:"inherit"},keyboard:!0,children:"Baseline"}),(0,l.jsx)(a.A,{title:"number"==typeof p||"string"==typeof p?`Value of Baseline is ${p}`:void 0,children:(0,l.jsx)(s.A.Text,{style:{fontSize:14},type:"secondary",children:p})})]})]})})},f=e=>{let{titles:t,datas:n,formatter:r,showPercentInTitle:a}=e,[d,u]=(0,c.useState)(0);return(0,l.jsx)(p.j,{title:t.length>1?(0,l.jsx)(o.A,{defaultValue:t[d],options:a?t.map((e,t)=>{let r=n[t];return{label:(0,l.jsxs)(i.A,{children:[(0,l.jsx)(s.A.Text,{children:e}),(0,l.jsx)(m,{percent:r.percent,state:r.state})]}),value:e}}):t,onChange:e=>{u(t.indexOf(e))},size:"small",style:{transition:"transform 0.3s ease"},value:t[d]||t[0]}):t[d],value:(0,l.jsx)(g,{data:n[d],formatter:r}),statisticProps:{style:{textAlign:"left"}}})}},30786(e,t,n){n.d(t,{Zp:()=>d});var l=n(65723),r=n(22155),s=n(61986),i=n(37324),a=n(94042),o=n(66287);n(67331);let d=e=>{let{collapsable:t=!1,children:n,title:d,dividerStyle:c,defaultCollapsed:u=!1,...h}=e,[p,x]=(0,r.useState)(u);return d&&t?(0,l.jsx)(a.A,{style:{borderRadius:"12px"},...h,title:(0,l.jsxs)(o.A,{style:{fontSize:"inherit"},children:[(0,l.jsx)("div",{style:{cursor:"pointer"},onClick:()=>x(!p),children:p?(0,l.jsx)(s.A,{}):(0,l.jsx)(i.A,{})}),d]}),children:p?null:n}):(0,l.jsx)(a.A,{style:{borderRadius:"12px"},title:d,...h,children:n})}},25800(e,t,n){n.d(t,{j:()=>s});var l=n(65723),r=n(26032);let s=e=>{let{title:t,value:n,statisticProps:s,boxProps:i}=e;return(0,l.jsx)("div",{className:"statistic-card",...i,children:(0,l.jsx)(r.A,{title:(0,l.jsx)("div",{className:"statistic-card-title",children:t}),valueRender:()=>n,valueStyle:{fontSize:24},...s})})}},53878(e,t,n){n.d(t,{n:()=>j});var l=n(65723),r=n(22155),s=n(62188),i=n(44491),a=n(26658),o=n(43653),d=n(33840),c=n(61223),u=n(18814),h=n.n(u),p=n(23276),x=n(57568),m=n(36473),g=n(36443),f=n(30029);let j=(0,r.memo)(e=>{let{loaderData:t,pluginsData:n,formatterFn:u,chartType:j=x.wx.Normal,exts:y=null}=e,v=[],A=[],[b,w]=(0,r.useState)({});return m.Y([i.a,a.a,o.a,d.a,c.a]),(0,r.useEffect)(()=>{if(!t)return;let e=[];t.forEach(t=>{e.unshift(t.n+" total"),e.unshift(t.n)}),t.forEach(function(t,n){var l;if(v.push({name:t.n+" total",value:[e.indexOf(t.n+" total"),t.s,t.e,t.e-t.s],itemStyle:{normal:{color:x.dK[Math.floor(27*Math.random())],opacity:.25}}}),null==t?void 0:t.c)for(let n=0;n<(null==t||null==(l=t.c)?void 0:l.length);n++)v.push({name:t.n,value:[e.indexOf(t.n),t.c[n].s,t.c[n].e,t.c[n].e-t.c[n].s],itemStyle:{normal:{color:x.dK[Math.floor(27*Math.random())],opacity:.25}},ext:t.c[n].ext})}),A=e.map((e,t)=>t%2!=0?e.replace(" total",""):"")},[t]),(0,r.useEffect)(()=>{if(!n)return;let e=(0,p.$)(n,e=>e.pid);Object.keys(e).reverse().forEach(function(t,n){e[t].forEach((e,t)=>{v.push({name:String(e.pid),value:[n,e.args.s,e.args.e,e.args.e-e.args.s],itemStyle:{normal:{color:x.dK[Math.floor(27*Math.random())],opacity:.25}},ext:e})}),A.push(String(t.charAt(0).toUpperCase()+t.slice(1)))})},[n]),(0,r.useEffect)(()=>{w({tooltip:{formatter:e=>u(e)},dataZoom:[{type:"slider",filterMode:"weakFilter",showDataShadow:!1,top:-10},{type:"inside",filterMode:"weakFilter"}],grid:{top:10,left:0,bottom:10,right:0,height:A.length>(j===x.wx.Loader?6:3)?"auto":60*A.length,containLabel:!0},xAxis:{interval:(null==y?void 0:y.endTimestamp)&&(null==y?void 0:y.startTimestamp)?Math.floor((y.endTimestamp-y.startTimestamp)/8):null,position:"top",splitLine:{show:!0},scale:!0,axisLine:{show:!1},axisLabel:{formatter:e=>h()(e).format("HH:mm:ss:SSS")}},yAxis:{type:"category",splitLine:{show:!1},axisLabel:{inside:!0,lineHeight:20,width:100,fontSize:12,color:"#000",verticalAlign:"bottom"},axisLine:{show:!1},axisTick:{show:!1},data:A},series:[{type:"custom",renderItem:function(e,t){let n=t.value(0),l=t.coord([t.value(1),n]),r=t.coord([t.value(2),n]),s=.3*t.size([0,1])[1],i=g.clipRectByRect({x:l[0],y:j===x.wx.Loader?l[1]-(n%2!=0?0:2*s):l[1],width:r[0]-l[0]||5,height:s},{x:e.coordSys.x,y:e.coordSys.y,width:e.coordSys.width,height:e.coordSys.height});return i&&{type:"rect",transition:["shape"],shape:i,style:t.style(),enterFrom:{style:{opacity:0},x:0}}},itemStyle:{opacity:.8},encode:{x:[1,2],y:0},data:v}]})},[t,n,y]),(0,l.jsx)(s.A,{option:b,echarts:f,style:{width:"100%",minHeight:j===x.wx.Loader?"500px":j===x.wx.Minify?"100px":"200px",maxHeight:j===x.wx.Minify?"100px":"1000px",border:"1px solid #eee",borderRadius:"10px"}})})},76627(e,t,n){n.d(t,{z:()=>m});var l=n(65723),r=n(22155),s=n(23276),i=n(87417);n(3302);var a=n(18679),o=n(47001),d=n(33498),c=n(53878),u=n(54132),h=n(57568);let p=0,x=0,m=e=>{let{loaders:t,cwd:n}=e,{isDark:m}=(0,a.DP)(),g=(0,r.useRef)(null),[f,j]=(0,r.useState)([]),y=(0,u.Wy)(f,200),v=(0,r.useMemo)(()=>(0,s.$)(t,e=>e.loader),[t]),A=(0,r.useCallback)(e=>{let{name:l,data:r}=e,s=l.replace(" total","");return(null==r?void 0:r.ext)?(0,u.Bq)(r.ext):(0,u.iv)(s,t,n)},[]);return(0,r.useEffect)(()=>{j(Object.keys(v).map(e=>{let t=v[e]||[],{start:l,end:r}=(0,o.xr)(t);return(l<p||0===p)&&(p=l),(r>x||0===x)&&(x=r),{p:e,n:e,s:l,e:r,c:t.map(t=>({p:e,n:(0,d.Zb)(t.resource,n),s:t.startAt,e:t.endAt,ext:t}))}}))},[v]),(0,l.jsx)(l.Fragment,{children:(null==f?void 0:f.length)?(0,l.jsx)("div",{className:["loader-chart-container",m?"loader-chart-container_dark":""].join(" ").trim(),ref:g,style:{width:"100%"},children:(0,l.jsx)(c.n,{loaderData:y,formatterFn:A,chartType:h.wx.Loader,exts:{startTimestamp:p,endTimestamp:x}})}):(0,l.jsx)(i.A,{})})}},203(e,t,n){n.d(t,{A:()=>l});let l={title:"title-BZ9xk1"}},53289(e,t,n){n.d(t,{h:()=>A,C:()=>v});var l=n(65723);n(22155);var r=n(19143),s=n(66287),i=n(68108),a=n(64060),o=n(61858),d=n(76681),c=n(17848);let u=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,l.jsx)("path",{fill:"#FAAD14",d:"M11.409 3.51 8.046.146A.5.5 0 0 0 7.693 0H1.056a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.5.5 0 0 0-.147-.355M7.462 1.152l2.94 2.94h-2.94zm2.969 11.722H1.68V1.125h4.718V4.5a.656.656 0 0 0 .657.656h3.375z"}),(0,l.jsx)("path",{fill:"#FAAD14",d:"M6.927 9.651h.888a1.6 1.6 0 0 1-.24.775q-.211.339-.592.528-.377.19-.908.19a1.9 1.9 0 0 1-.745-.142 1.6 1.6 0 0 1-.564-.416 1.9 1.9 0 0 1-.354-.653 2.8 2.8 0 0 1-.121-.858v-.3q0-.474.124-.858.128-.386.362-.656.238-.27.567-.415.33-.146.737-.146.54 0 .911.196.375.195.58.54.206.345.249.784H6.93a1.15 1.15 0 0 0-.104-.442.6.6 0 0 0-.27-.276 1 1 0 0 0-.475-.095.86.86 0 0 0-.39.083.7.7 0 0 0-.278.252 1.3 1.3 0 0 0-.17.428q-.053.255-.053.6v.305q0 .335.05.591.051.251.155.428a.7.7 0 0 0 .273.26.9.9 0 0 0 .407.087q.28 0 .46-.09a.6.6 0 0 0 .276-.263q.098-.176.116-.437"}),(0,l.jsx)("path",{fill:"#FFF1B8",fillRule:"evenodd",d:"M6.4 1.125V4.5a.656.656 0 0 0 .656.656h3.375v7.719H1.68V1.125zm1.415 8.526h-.888q-.017.261-.116.437a.6.6 0 0 1-.276.264q-.18.09-.46.089a.9.9 0 0 1-.407-.086.7.7 0 0 1-.273-.261q-.104-.176-.154-.428a3 3 0 0 1-.05-.59v-.307q0-.345.053-.6.056-.258.169-.427a.7.7 0 0 1 .279-.252.86.86 0 0 1 .389-.083q.297 0 .475.095a.6.6 0 0 1 .27.276q.09.18.104.442h.89a1.8 1.8 0 0 0-.249-.784q-.205-.345-.579-.54-.37-.195-.911-.196-.407 0-.737.146-.33.145-.567.415-.234.27-.362.656a2.8 2.8 0 0 0-.124.858v.3q0 .476.121.858.122.383.354.653.234.27.564.416.33.143.745.143.531 0 .908-.19.38-.19.591-.529a1.6 1.6 0 0 0 .24-.775",clipRule:"evenodd"})]}),h=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,l.jsx)("path",{fill:"#722ED1",d:"M6.076 7.58a.356.356 0 0 1 .646.299l-1.576 3.414a.356.356 0 0 1-.646-.298zM7.198 8.135a.356.356 0 0 0 0 .503l.8.799-.8.8a.356.356 0 1 0 .503.502l1.05-1.05a.356.356 0 0 0 0-.503l-1.05-1.05a.356.356 0 0 0-.503 0M4.024 8.135a.356.356 0 0 1 0 .503l-.799.799.8.8a.356.356 0 1 1-.504.502l-1.05-1.05a.356.356 0 0 1 0-.503l1.05-1.05a.356.356 0 0 1 .503 0"}),(0,l.jsx)("path",{fill:"#EFDBFF",fillRule:"evenodd",d:"M5.955 1.125V4.5a.656.656 0 0 0 .656.656h3.375v7.719h-8.75V1.125zm.121 6.456a.356.356 0 1 1 .646.298l-1.576 3.414a.356.356 0 1 1-.646-.298zm1.122.554a.356.356 0 0 0 0 .503l.8.799-.8.8a.356.356 0 1 0 .503.502l1.05-1.05a.356.356 0 0 0 0-.503l-1.05-1.05a.356.356 0 0 0-.503 0m-3.174.503a.356.356 0 1 0-.503-.503l-1.05 1.05a.356.356 0 0 0 0 .503l1.05 1.05a.355.355 0 1 0 .503-.502l-.799-.799z",clipRule:"evenodd"}),(0,l.jsx)("path",{fill:"#722ED1",d:"M10.964 3.51 7.602.146A.5.5 0 0 0 7.249 0H.61a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.5.5 0 0 0-.147-.355M7.017 1.152l2.941 2.94h-2.94zm2.97 11.722h-8.75V1.125h4.718V4.5a.656.656 0 0 0 .656.656h3.375z"})]}),p=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,l.jsx)("path",{fill:"#E6F7FF",d:"M6.733 4.5V1.125h-4.72v11.75h8.75V5.156H7.39a.656.656 0 0 1-.656-.656m-2.094.781a.625.625 0 1 1 0 1.25.625.625 0 0 1 0-1.25m4.625 4.594H3.515a.125.125 0 0 1-.098-.202l1.56-1.987a.125.125 0 0 1 .196 0l.642.819 1.216-1.55a.126.126 0 0 1 .199 0l2.132 2.718a.125.125 0 0 1-.098.202"}),(0,l.jsx)("path",{fill:"#1890FF",d:"M11.742 3.51 8.38.146A.5.5 0 0 0 8.026 0H1.39a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.5.5 0 0 0-.147-.355M7.795 1.152l2.94 2.94h-2.94zm2.969 11.722h-8.75V1.125h4.719V4.5a.656.656 0 0 0 .656.656h3.375z"}),(0,l.jsx)("path",{fill:"#1890FF",d:"m7.031 6.955-1.215 1.55-.643-.82a.125.125 0 0 0-.196 0l-1.56 1.988a.125.125 0 0 0 .099.202h5.748c.105 0 .163-.12.098-.202L7.23 6.955a.127.127 0 0 0-.199 0M4.014 5.906a.625.625 0 1 0 1.25 0 .625.625 0 0 0-1.25 0"})]}),x=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,l.jsx)("path",{fill:"#E6F7FF",fillRule:"evenodd",d:"M6.177 1.125V4.5a.656.656 0 0 0 .656.656h3.375v7.719h-8.75V1.125zm1.806 8.7q.03.081.03.183a.411.411 0 0 1-.26.388.8.8 0 0 1-.333.057q-.166 0-.307-.034a.7.7 0 0 1-.24-.11.5.5 0 0 1-.153-.197.7.7 0 0 1-.055-.3H5.88q0 .321.133.555.132.234.354.386.225.15.497.226.275.073.555.073.313 0 .565-.07.254-.07.435-.206.183-.135.279-.33a1 1 0 0 0 .096-.443q0-.235-.08-.42a1 1 0 0 0-.24-.33 1.7 1.7 0 0 0-.396-.263 3.5 3.5 0 0 0-.544-.211 3 3 0 0 1-.326-.118 1.3 1.3 0 0 1-.237-.127.5.5 0 0 1-.146-.146.33.33 0 0 1-.047-.174q0-.129.068-.23a.45.45 0 0 1 .203-.164.8.8 0 0 1 .339-.062q.21 0 .349.073a.48.48 0 0 1 .208.2q.07.125.07.292h.777q0-.339-.175-.602a1.17 1.17 0 0 0-.484-.414 1.7 1.7 0 0 0-.732-.15q-.307 0-.565.075-.255.075-.443.216a1 1 0 0 0-.292.333.9.9 0 0 0-.104.43q0 .244.1.43.1.184.275.325.178.138.406.242.232.104.49.188.232.072.378.14a1 1 0 0 1 .226.138q.08.068.11.152M4.595 7.209v2.628q0 .195-.063.33a.46.46 0 0 1-.17.206.47.47 0 0 1-.257.07.6.6 0 0 1-.263-.051.36.36 0 0 1-.17-.175.8.8 0 0 1-.057-.33h-.783q0 .398.164.658.164.258.45.383t.659.125q.36 0 .646-.146.289-.146.456-.416.166-.274.166-.654V7.208z",clipRule:"evenodd"}),(0,l.jsx)("path",{fill:"#1890FF",d:"M8.014 10.008a.5.5 0 0 0-.031-.182.34.34 0 0 0-.11-.152 1 1 0 0 0-.226-.138 3 3 0 0 0-.378-.14 5 5 0 0 1-.49-.188 2 2 0 0 1-.406-.242 1.1 1.1 0 0 1-.276-.325.9.9 0 0 1-.099-.43q0-.237.104-.43a1 1 0 0 1 .292-.333q.188-.141.443-.216.258-.075.565-.076.42 0 .732.151.312.152.484.414.175.264.175.602h-.776a.6.6 0 0 0-.07-.292.48.48 0 0 0-.21-.2.74.74 0 0 0-.348-.073.8.8 0 0 0-.339.062.45.45 0 0 0-.203.164.4.4 0 0 0-.067.23q0 .096.046.174.05.078.146.146t.237.127q.14.06.326.118.31.093.544.21.237.118.396.264a1 1 0 0 1 .24.33q.08.185.08.42a1 1 0 0 1-.096.442.9.9 0 0 1-.279.331q-.181.135-.435.206a2.1 2.1 0 0 1-.565.07q-.28 0-.555-.073a1.7 1.7 0 0 1-.497-.226q-.222-.152-.354-.386a1.1 1.1 0 0 1-.133-.555h.784q0 .178.055.3a.5.5 0 0 0 .153.198q.102.075.24.11.14.033.307.033.204 0 .333-.057a.41.41 0 0 0 .26-.388M4.595 9.836V7.208h.778v2.628q0 .38-.166.654-.167.27-.456.416a1.4 1.4 0 0 1-.646.146q-.372 0-.659-.125a1 1 0 0 1-.45-.383q-.164-.26-.164-.659h.783q0 .21.058.331a.36.36 0 0 0 .169.175q.109.052.263.052a.47.47 0 0 0 .258-.07.46.46 0 0 0 .17-.206q.061-.135.062-.331"}),(0,l.jsx)("path",{fill:"#1890FF",d:"M11.186 3.51 7.824.146A.5.5 0 0 0 7.47 0H.833a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.5.5 0 0 0-.147-.355M7.24 1.152l2.94 2.94H7.24zm2.968 11.722h-8.75V1.125h4.72V4.5a.656.656 0 0 0 .655.656h3.375z"})]}),m=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,l.jsx)("path",{fill:"#F0F0F0",d:"M6.288 4.5V1.125H1.57v11.75h8.75V5.156H6.944a.656.656 0 0 1-.656-.656m-.344 6.625a.5.5 0 1 1 0-.999.5.5 0 0 1 0 .999m1.72-3.569c.01.702-.465 1.32-1.162 1.546a.22.22 0 0 0-.151.207V9.5c0 .086-.07.156-.157.156h-.5a.157.157 0 0 1-.156-.156V9a.65.65 0 0 1 .542-.627c.443-.057.77-.4.77-.795 0-.439-.402-.805-.906-.805-.503 0-.906.366-.906.807a.15.15 0 0 1-.153.147H4.38a.15.15 0 0 1-.153-.149c0-.897.783-1.62 1.742-1.61.926.013 1.683.721 1.695 1.588"}),(0,l.jsx)("path",{fill:"#8C8C8C",d:"M11.298 3.51 7.935.148A.5.5 0 0 0 7.58 0H.944a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.5.5 0 0 0-.146-.353M7.35 1.154l2.94 2.94h-2.94zm2.968 11.722H1.57V1.125h4.72V4.5a.656.656 0 0 0 .655.656h3.375z"}),(0,l.jsx)("path",{fill:"#8C8C8C",d:"M5.444 10.625a.5.5 0 1 0 1 0 .5.5 0 0 0-1 0M4.226 7.578a.15.15 0 0 0 .153.149h.506a.15.15 0 0 0 .153-.147c0-.44.403-.807.906-.807.504 0 .907.366.907.805 0 .395-.328.738-.77.795A.65.65 0 0 0 5.537 9v.5c0 .086.07.156.156.156h.5c.086 0 .157-.07.157-.156v-.19a.22.22 0 0 1 .151-.208c.697-.225 1.172-.844 1.161-1.546-.012-.867-.769-1.575-1.695-1.587-.96-.011-1.742.712-1.742 1.61"})]});var g=n(98685),f=n(13078),j=n.n(f);let{useToken:y}=r.A;function v(e){let t=function(e){switch(j().extname(e).slice(1).toLowerCase()){case"js":case"jsx":case"ts":case"mjs":case"cjs":case"mts":case"cts":return(0,l.jsx)(x,{});case"tsx":default:return(0,l.jsx)(m,{});case"css":case"scss":case"sass":case"less":case"styl":case"stylus":return(0,l.jsx)(u,{});case"html":return(0,l.jsx)(h,{});case"png":case"jpg":case"jpeg":case"gif":case"svg":case"bmp":case"webp":case"ico":case"apng":case"avif":case"tif":case"tiff":case"jfif":case"pjpeg":case"pjp":return(0,l.jsx)(p,{})}}(e);return(0,l.jsx)("div",{className:"file-icon",children:t})}let A=e=>{let{isDark:t}=(0,g.useTheme)(),{token:n}=y(),r=t?n.colorWhite:n.colorText,u={fontSize:n.fontSize};return(0,l.jsx)(c.default,{checkable:!1,selectable:!0,switcherIcon:e=>{let{data:t,expanded:n}=e;return(null==t?void 0:t.children)?(0,l.jsxs)(s.A,{style:{color:r},children:[(0,l.jsx)(i.A,{twoToneColor:r,className:`file-tree-switcher-arrow ${n?"file-tree-switcher-arrow-expand":""}`,style:u}),n?(0,l.jsx)(a.A,{}):(0,l.jsx)(o.A,{})]}):(null==t?void 0:t.key)&&"string"==typeof t.key?v(t.key):(0,l.jsx)(d.A,{})},expandAction:"click",...e})}},94175(e,t,n){n.d(t,{E:()=>o});var l=n(65723),r=n(22155),s=n(32354),i=n(47748),a=n(66020);let o=e=>{let t,{icon:n,label:o,labelStyle:d={},placeholder:c,onChange:u,style:h,className:p,width:x,delay:m=300}=e,[g,f]=(0,r.useState)(""),j={width:120,...d},y=(0,r.useRef)(null);return(0,r.useEffect)(()=>{u(g)},[g]),(0,l.jsxs)(s.A.Group,{compact:!0,style:h,className:p,children:[o||n?(0,l.jsxs)(i.Ay,{style:j,onClick:()=>{y&&y.current&&y.current.focus()},children:[n||null,(0,l.jsx)(a.A.Text,{children:o})]}):null,(0,l.jsx)(s.A,{ref:y,allowClear:!0,defaultValue:g,style:{width:x?x-120:250},placeholder:c,onChange:e=>{t&&clearTimeout(t);let n=e.target.value.trim();t=setTimeout(()=>{f(n)},m)}})]})}},76385(e,t,n){n.d(t,{A:()=>l});let l={text:"text-QI6k9S"}},70972(e,t,n){n.d(t,{P:()=>V});var l=n(65723),r=n(22155),s=n(42617),i=n(16753),a=n(10117),o=n(90982),d=n(63079),c=n(84585),u=n(5515),h=n(98685),p=n(78363),x=n(60503),m=n(66287),g=n(66020),f=n(43995),j=n(85817),y=n(11728);let v=()=>{let[e,t]=(0,r.useState)(""),[n,s]=(0,r.useState)([]);return((0,r.useEffect)(()=>{(0,h.fetchManifest)().then(e=>{let{name:n,series:l}=e;n&&t(n),l&&l.length>0&&s(l)})},[]),e.length<=0||n.length<=0)?(0,l.jsx)(l.Fragment,{}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.A,{type:"vertical",style:{margin:"0 24px"}}),(0,l.jsxs)(m.A,{children:[(0,l.jsx)(y.A,{style:{fontSize:"18px"},component:j.A}),(0,l.jsx)(g.A,{children:"Compiler"}),(0,l.jsx)(f.A,{className:"builder-selector",defaultValue:e,bordered:!1,style:{minWidth:100},onChange:e=>{let t=n.find(t=>t.name===e);t&&(t.origin?location.href=(0,h.changeOrigin)(t.origin):console.error("No RsdoctorManifestSeriesData.origin"))},children:n.map((e,t)=>(0,l.jsx)(f.A.Option,{value:e.name,className:"builder-selector-option-item",children:e.name},t))})]})]})};var A=n(64904),b=n(5198),w=n(5991),C=n(86874),S=n(60634),k=n(91888),N=n(36903),M=n(41346),T=n(45554),E=n(74579);let R=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,l.jsx)("rect",{width:12,height:9.333,x:.396,y:.167,fill:"#0079FF",rx:1}),(0,l.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M3.563 3.5c.276 0 .5.214.5.478v3.044a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478V3.978a.49.49 0 0 1 .5-.478M6.396 1.833c.276 0 .5.214.5.479v4.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-4.71a.49.49 0 0 1 .5-.479M9.23 4.833c.275 0 .5.214.5.479v1.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-1.71a.49.49 0 0 1 .5-.479",clipRule:"evenodd"}),(0,l.jsx)("rect",{width:6,height:1.333,x:3.396,y:10.5,fill:"#0079FF",fillOpacity:.5,rx:.667})]}),z=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,l.jsx)("rect",{width:12,height:9.333,x:.396,y:.167,fill:"#0079FF",rx:1}),(0,l.jsx)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M4.023 6.212 2.676 5.014l1.347-1.199M8.752 6.212l1.347-1.198-1.347-1.199M5.742 7.014l1.362-4"}),(0,l.jsx)("rect",{width:6,height:1.333,x:3.396,y:10.5,fill:"#0079FF",fillOpacity:.5,rx:.667})]}),L=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,l.jsx)("path",{fill:"#0079FF",fillRule:"evenodd",d:"M6.329.788A1 1 0 0 0 5.35.8L.466 3.62l5.36 2.83 5.327-3.044zm-.993 12.777V7.322L.063 4.54v5.404a1 1 0 0 0 .5.866z",clipRule:"evenodd"}),(0,l.jsx)("path",{fill:"#0079FF",fillOpacity:.5,fillRule:"evenodd",d:"M5.354.8H5.35L.546 3.576l.017-.01L5.336.81zm-.018 12.765V7.322L.063 4.54l5.273 2.783zm1-6.254 5.265-3.009q.009.064.009.13v5.511a1 1 0 0 1-.5.866l-4.774 2.756z",clipRule:"evenodd"})]});var P=n(70738);let D="Compile Analysis",B={overall:(0,l.jsx)(e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,l.jsx)("rect",{width:12,height:9.333,x:.615,y:.167,fill:"#5E6673",rx:1}),(0,l.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M3.781 3.5c.277 0 .5.214.5.478v3.044a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478V3.978a.49.49 0 0 1 .5-.478M6.615 1.833c.276 0 .5.214.5.479v4.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-4.71a.49.49 0 0 1 .5-.479M9.448 4.833c.276 0 .5.214.5.479v1.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-1.71a.49.49 0 0 1 .5-.479",clipRule:"evenodd"}),(0,l.jsx)("rect",{width:6,height:1.333,x:3.615,y:10.5,fill:"#5E6673",fillOpacity:.5,rx:.667})]}),{}),webpack:(0,l.jsx)(e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,l.jsx)("rect",{width:12,height:9.333,x:.615,y:.167,fill:"#5E6673",rx:1}),(0,l.jsx)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M4.241 6.212 2.895 5.014 4.24 3.815M8.97 6.212l1.347-1.198-1.346-1.199M5.96 7.014l1.363-4"}),(0,l.jsx)("rect",{width:6,height:1.333,x:3.615,y:10.5,fill:"#5E6673",fillOpacity:.5,rx:.667})]}),{}),bundle:(0,l.jsx)(e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,l.jsx)("path",{fill:"#5E6673",fillRule:"evenodd",d:"M6.44.672a1 1 0 0 0-.977.013L.578 3.505l5.36 2.83 5.327-3.044zm-.992 12.777V7.206L.175 4.423v5.404a1 1 0 0 0 .5.866z",clipRule:"evenodd"}),(0,l.jsx)("path",{fill:"#5E6673",fillOpacity:.5,fillRule:"evenodd",d:"m5.466.683-.003.002L.658 3.459l.017-.01L5.448.693zM5.448 13.45V7.206L.175 4.423l5.273 2.783zm1-6.254 5.265-3.009q.009.064.009.13v5.511a1 1 0 0 1-.5.866L6.448 13.45z",clipRule:"evenodd"})]}),{})},I=(0,E.eN)({api:k.hp.ServerAPI.API.GetClientRoutes,responsePropName:"routes",Component:e=>{let{t}=(0,h.useI18n)(),{pathname:n}=(0,M.zy)(),s=(0,M.Zp)(),[i,o]=(0,r.useState)(B),{routes:d}=e,c=(0,h.getEnableRoutesFromUrlQuery)(),u=d&&d.length>0?d:c||[];(0,r.useEffect)(()=>{n.includes("webpack")?o({...B,webpack:(0,l.jsx)(z,{})}):n.includes("overall")||"/"===n?o({...B,overall:(0,l.jsx)(R,{})}):n.includes("bundle")&&o({...B,bundle:(0,l.jsx)(L,{})})},[n]);let p={color:"rgba(96, 102, 114)"},x=[];u.includes(k._8.RsdoctorManifestClientRoutes.Overall)&&x.push({label:t(T.U),key:T.w,icon:i.overall,children:[],onTitleClick(e){s(e.key)}}),(0,h.hasCompile)(u)&&x.push({label:t(D),key:D,icon:i.webpack,children:[u.includes(k._8.RsdoctorManifestClientRoutes.WebpackLoaders)&&{label:t(P.pI.UU),key:P.pI.wE,icon:(0,l.jsx)(A.A,{style:p})},u.includes(k._8.RsdoctorManifestClientRoutes.WebpackLoaders)&&{label:t(P.hK.UU),key:P.hK.wE,icon:(0,l.jsx)(b.A,{style:p})},u.includes(k._8.RsdoctorManifestClientRoutes.ModuleResolve)&&{label:t(P.dn.UU),key:P.dn.wE,icon:(0,l.jsx)(w.A,{style:p})},u.includes(k._8.RsdoctorManifestClientRoutes.WebpackPlugins)&&{label:t(P.FO.UU),key:P.FO.wE,icon:(0,l.jsx)(C.A,{style:p})}].filter(e=>!!e)}),(0,h.hasBundle)(u)&&x.push({label:t(P._y.UU),key:P._y.UU,icon:i.bundle,children:[],onTitleClick(){s(P._y.wE)}});let m=(0,l.jsx)(N.A,{items:x,mode:"horizontal",onClick:e=>{e.keyPath.includes("builder-switcher")||s(e.key)},disabledOverflow:!0,overflowedIndicator:(0,l.jsx)(S.A,{}),style:{height:a.or.NavBarHeight,lineHeight:`${a.or.NavBarHeight}px`,minWidth:0,justifyContent:"flex-end",...e.style},selectedKeys:["/"===n?T.w:n]},u.join(""));return(0,l.jsx)("div",{style:{marginLeft:"30px"},children:m})},fallbackComponent:()=>null,showSkeleton:!1}),F=e=>{let{enableRoutes:t}=e,{i18n:n}=(0,h.useI18n)(),r=(0,M.Zp)(),{isLight:i}=(0,h.useTheme)(),x=[{value:a.TM.Cn,label:"中文"},{value:a.TM.En,label:"English"}];return(0,l.jsx)(s.A.Header,{style:{height:a.or.NavBarHeight,padding:0,paddingLeft:a.or.BasePadding,paddingRight:a.or.BasePadding,position:"fixed",zIndex:999,width:"100%",backgroundColor:i?"#fff":"#141414",transition:"none"},children:(0,l.jsxs)(d.A,{justify:"space-between",align:"middle",style:{height:a.or.NavBarHeight},wrap:!1,children:[(0,l.jsx)(c.A,{style:{height:a.or.NavBarHeight,lineHeight:`${a.or.NavBarHeight+2}px`},children:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"100%"},children:[(0,l.jsx)("img",{src:"https://assets.rspack.rs/rsdoctor/rsdoctor-title-logo.png",className:"rsdoctor-logo",alt:"logo",onClick:()=>{location.hash.includes(k.Kj.RsdoctorClientRoutes.Uploader)&&location.pathname.includes("/preview")?location.href="http://rsdoctor.rs":r(k.Kj.RsdoctorClientRoutes.Home)}}),(0,l.jsx)(v,{})]})}),(0,l.jsx)(I,{style:{transition:"none"}},t?JSON.stringify(t):"default"),(0,l.jsx)(c.A,{flex:1,children:(0,l.jsxs)(d.A,{align:"middle",justify:"end",style:{height:a.or.NavBarHeight},wrap:!1,gutter:[a.or.BasePadding/3,0],children:[(0,l.jsx)(c.A,{children:(0,l.jsx)(p.EJ,{})}),(0,l.jsx)(c.A,{children:(0,l.jsx)(u.A,{overlayStyle:{zIndex:1e3},menu:{items:x.map(e=>({label:e.label,key:e.value,onClick(){n.changeLanguage(e.value)}})),selectedKeys:[n.language]},children:(0,l.jsx)(o.A,{className:"header-icon",style:{display:"inline-block",fontSize:20,textAlign:"center",verticalAlign:"middle",cursor:"pointer",width:30,transition:"all 0.3s ease"}})})})]})})]})})};var O=n(98184);let $=(0,E.eN)({api:k.hp.ServerAPI.APIExtends.GetCompileProgress,responsePropName:"progress",Component:e=>{let{progress:t}=e;if(!t)return null;let{percentage:n=1,message:r}=t;if(n>=1)return null;let s=+(100*n).toFixed(1);return(0,l.jsx)(d.A,{wrap:!0,style:{width:"100%",position:"fixed",top:a.or.NavBarHeight,left:1,zIndex:99},children:(0,l.jsx)(c.A,{span:Math.min(Math.floor(24*n),24),children:(0,l.jsx)(O.A,{percent:100,status:"active",size:"small",format:()=>(0,l.jsx)(g.A.Text,{style:{fontSize:12},type:"secondary",children:`${s}% ${r}`})})})})},fallbackComponent:()=>null,showSkeleton:!1});var G=n(17400),_=n(99008);let W=e=>{let{name:t}=e;return(0,r.useEffect)(()=>{t?document.title=`Rsdoctor - ${t}`:document.title="Rsdoctor"},[t]),null},V=e=>{let t=(0,h.useLocale)(),{i18n:n}=(0,h.useI18n)(),{children:o}=e,d=(0,h.useUrlQuery)(),[c,u]=(0,r.useState)(()=>(0,h.getEnableRoutesFromUrlQuery)()||void 0);(0,r.useEffect)(()=>{let e=t;if(!(0,h.getFirstVisitFromStorage)()){(0,h.setFirstVisitToStorage)("1");let t=window.navigator.language.split("-")[0],n=(0,h.getLanguage)(t);Object.values(a.TM).includes(n)&&(e=n)}n.language!==e&&n.changeLanguage(e)},[t]),(0,r.useEffect)(()=>{u((0,h.getEnableRoutesFromUrlQuery)()||void 0)},[d]);let p=(0,r.useContext)(G.Q);return(0,l.jsx)(E.zW,{api:k.hp.ServerAPI.API.GetProjectInfo,showSkeleton:!1,children:e=>(0,l.jsx)(_.h.Provider,{value:{project:e},children:(0,l.jsxs)(s.A,{children:[(0,l.jsx)(W,{name:null==e?void 0:e.name}),p.embedded?null:(0,l.jsx)(F,{enableRoutes:c}),(0,l.jsx)($,{}),(0,l.jsxs)(s.A.Content,{style:{height:"100%",minHeight:"100vh",padding:a.or.BasePadding,marginTop:p.embedded?0:a.or.NavBarHeight,background:""},children:[o,(0,l.jsx)(i.A.BackTop,{})]})]})})})}},24364(e,t,n){n.d(t,{h:()=>_});var l=n(65723),r=n(40961),s=n(91888),i=n(60503),a=n(87655),o=n(66287),d=n(29656),c=n(66020),u=n(28342),h=n(95134),p=n(63079),x=n(84585),m=n(94042),g=n(58094),f=n(36025),j=n(66450),y=n(22155),v=n(10117),A=n(98685),b=n(53289),w=n(78899),C=n(74579),S=n(45286),k=n(87417),N=n(73147),M=n(84262),T=n(18814),E=n.n(T);let R=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:12,fill:"none",viewBox:"0 0 10 12",...e,children:[(0,l.jsx)("path",{fill:"#FAAD14",fillRule:"evenodd",d:"M3.151 7.98h-1.85a.925.925 0 0 1-.924-.925V1.508c0-.511.414-.925.925-.925h7.396c.511 0 .925.414.925.925v5.547c0 .51-.414.924-.925.924H6.85V6.13a1.85 1.85 0 0 0-3.698 0z",clipRule:"evenodd"}),(0,l.jsx)("path",{fill:"#FAAD14",d:"M4.076 9.829a.925.925 0 0 0 1.849 0V6.13a.925.925 0 0 0-1.85 0z"}),(0,l.jsx)("path",{fill:"#FAAD14",d:"M5 11.416 7.402 8.92H2.598z"})]}),z=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,l.jsx)("rect",{width:16,height:16,fill:"#F6FFED",rx:2}),(0,l.jsx)("path",{fill:"#52C41A",fillRule:"evenodd",d:"M4.302 6.02a.925.925 0 0 0-.925.925v5.547c0 .51.414.925.925.925h7.396c.511 0 .925-.414.925-.925V6.945a.925.925 0 0 0-.925-.925zm5.547 0H6.151v1.85a1.85 1.85 0 0 0 3.698 0z",clipRule:"evenodd"}),(0,l.jsx)("path",{fill:"#52C41A",d:"M7.076 4.171a.925.925 0 0 1 1.849 0V7.87a.925.925 0 0 1-1.85 0z"}),(0,l.jsx)("path",{fill:"#52C41A",d:"m8 2.584 2.402 2.496H5.598z"})]}),L=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none",viewBox:"0 0 14 14",...e,children:(0,l.jsx)("path",{fill:"#2994FF",d:"M7 10.736 1.7 6.589a.125.125 0 0 0-.201.098v1.208c0 .077.036.15.095.197l5.097 3.989a.5.5 0 0 0 .617 0l5.095-3.99a.25.25 0 0 0 .096-.196V6.687a.125.125 0 0 0-.202-.098zm0-4.75L1.7 1.839a.125.125 0 0 0-.201.098v1.208c0 .077.036.15.095.197L6.692 7.33a.5.5 0 0 0 .617 0l5.095-3.99a.25.25 0 0 0 .096-.196V1.937a.125.125 0 0 0-.202-.098z"})});var P=n(68850),D=n(30786),B=n(58793),I=n(90220),F=n(45742);let O=e=>{let{loader:t,resource:n,cwd:r}=e;return(0,l.jsx)(D.Zp,{title:"Loader Details",style:{border:"none"},extra:(0,l.jsx)(a.A,{icon:(0,l.jsx)(S.A,{}),color:"default",children:E()(t.startAt).format("YYYY-MM-DD HH:mm:ss")}),children:(0,l.jsxs)(o.A,{direction:"vertical",style:{width:"100%"},children:[t.isPitch?(0,l.jsx)(c.A.Text,{code:!0,children:"pitch"}):null,(0,l.jsxs)(h.A,{size:"large",bordered:!0,children:[(0,l.jsxs)(h.A.Item,{children:[(0,l.jsx)(c.A.Text,{strong:!0,children:"File Path"}),(0,l.jsx)("div",{children:(0,A.beautifyPath)(n.path,r)})]}),(0,l.jsxs)(h.A.Item,{children:[(0,l.jsx)(c.A.Text,{strong:!0,children:"Resource Path"}),(0,l.jsx)(B.hZ,{cwd:r,url:n.path,loc:"",disabled:!0})]}),(0,l.jsxs)(h.A.Item,{children:[(0,l.jsx)(c.A.Text,{strong:!0,children:"Resource Query"}),(0,l.jsx)("div",{children:n.queryRaw||"-"})]}),(0,l.jsxs)(h.A.Item,{children:[(0,l.jsx)(c.A.Text,{strong:!0,children:"Duration"}),(0,l.jsx)("div",{children:(0,A.formatCosts)(t.costs)})]}),(0,l.jsxs)(h.A.Item,{children:[(0,l.jsx)(c.A.Text,{strong:!0,children:"Loader"}),(0,l.jsx)("div",{children:(0,l.jsx)(c.A.Text,{code:!0,children:t.loader})})]}),(0,l.jsxs)(h.A.Item,{children:[(0,l.jsx)(c.A.Text,{strong:!0,children:"Loader Index"}),(0,l.jsx)("div",{children:`${t.loaderIndex}`})]}),(0,l.jsxs)(h.A.Item,{children:[(0,l.jsx)(c.A.Text,{strong:!0,children:"Loader Path"}),(0,l.jsx)(B.hZ,{cwd:r,url:t.path,loc:"",disabled:!0})]}),(0,l.jsxs)(h.A.Item,{children:[(0,l.jsx)("div",{style:{width:180},children:(0,l.jsx)(c.A.Text,{strong:!0,children:"Options"})}),(0,l.jsx)(i.A,{type:"vertical"}),(0,l.jsx)(c.A.Paragraph,{ellipsis:{rows:2,expandable:!0,symbol:"more"},copyable:!0,children:JSON.stringify(t.options||"-")})]})]})]})})},$=e=>{let{loader:t,resource:n,isLight:r,codeData:s}=e,i=t.errors&&t.errors.length,a=(null==s?void 0:s.input)||"",o=(null==s?void 0:s.output)||"";return(0,l.jsx)("div",{style:{height:"100%"},children:i?(0,l.jsxs)(x.A,{span:24,style:{height:"53%",minHeight:400},children:[(0,l.jsx)("div",{style:{padding:v.or.BasePadding,borderTop:`1px solid ${r?"#f0f0f0":"rgba(253, 253, 253, 0.12)"}`,borderBottom:`1px solid ${r?"#f0f0f0":"rgba(253, 253, 253, 0.12)"}`},children:(0,l.jsx)(I.h,{text:`the error stack of [${t.loader}] ${t.isPitch?"pitch":""}`})}),(0,l.jsx)("div",{style:{height:"90%"},children:(0,l.jsx)(P.Cv,{code:t.errors[0].message,lang:"javascript"})})]}):(0,l.jsxs)(x.A,{span:24,style:{height:"53%",minHeight:400},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:v.or.BasePadding,borderBottom:`1px solid ${r?"#f0f0f0":"rgba(253, 253, 253, 0.12)"}`},children:[(0,l.jsx)(I.h,{text:(0,l.jsxs)(l.Fragment,{children:[`the result of [${t.loader}] ${t.isPitch?"pitch":""}`,!t.isPitch&&(0,l.jsxs)("span",{style:{fontWeight:400},children:["(",(0,l.jsx)(R,{style:{verticalAlign:"middle",margin:"0 2px"}}),"Input ⟷",(0,l.jsx)(z,{style:{verticalAlign:"middle",position:"relative",top:-2}}),"Output)"]})]})}),(0,l.jsx)("div",{style:{flex:1}})]}),t.isPitch?o?(0,l.jsx)("div",{style:{height:"90%"},children:(0,l.jsx)(P.Cv,{isEmbed:!0,code:o,filePath:n.path})}):(0,l.jsx)(k.A,{description:"No loader result. If you use the Brief Mode, there will not have loader results."}):(0,l.jsx)("div",{style:{minHeight:"700px"},children:(0,l.jsx)("div",{style:{height:"40rem",overflow:"hidden"},children:o||a?(0,l.jsx)(P.Mh,{isEmbed:!0,original:a,modified:o||"",originalFilePath:n.path,modifiedFilePath:n.path}):(0,l.jsx)(k.A,{description:"No loader result. If you use the Brief Mode, there will not have loader results."})})})]})})},G=e=>{let{data:t,cwd:n,index:r}=e,{loaders:i,resource:u}=t,[h,m]=(0,y.useState)(r||0),{theme:g}=(0,A.useTheme)(),f="light"===g,j=i[h],[b,w]=(0,y.useState)("loaderDetails"),k=(0,y.useCallback)(e=>{w(e)},[]);return(0,l.jsxs)(p.A,{className:F.A.executions,style:{height:"100%"},children:[(0,l.jsx)(x.A,{span:5,style:{borderRight:f?"1px solid #f0f0f0":void 0,padding:v.or.BasePadding},children:(0,l.jsxs)(o.A,{direction:"vertical",style:{width:"100%"},children:[(0,l.jsx)(I.h,{text:"Executions"}),(0,l.jsx)(N.A,{mode:"left",style:{marginTop:v.or.BasePadding},children:i.map((e,t,n)=>{var r;let{loader:s,isPitch:i}=e,o=(0,A.formatCosts)(e.costs);return(0,l.jsxs)(N.A.Item,{dot:i?(0,l.jsx)(a.A,{style:{marginLeft:1,fontWeight:500},children:"pitch"}):(0,l.jsx)(S.A,{}),style:{paddingBottom:10,textAlign:"center"},children:[(0,l.jsx)(p.A,{align:"middle",justify:"space-between",gutter:[0,10],children:(0,l.jsx)(x.A,{span:24,className:F.A.timeline,children:(0,l.jsx)(d.A,{title:s,trigger:"hover",children:(0,l.jsxs)("div",{className:`${F.A.box} ${h===t?F.A.selected:""}`,onClick:()=>{m(t)},style:{textAlign:"left"},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.A.Text,{style:{color:"#000"},children:null==(r=o.match(/[0-9]*\.?[0-9]+/g))?void 0:r[0]})," ",(0,l.jsx)(c.A.Text,{style:{color:"rgba(0,0,0,0.45)"},children:o.match(/[a-zA-Z]+/g)})]}),(0,l.jsx)(c.A.Text,{style:{color:"rgba(0,0,0,0.65)"},className:F.A.loader,children:s})]})})})}),t===n.length-1?null:(0,l.jsx)("div",{style:{paddingTop:10},children:(0,l.jsx)(L,{})})]},t)})})]})}),(0,l.jsx)(x.A,{span:19,style:{height:"100%"},children:(0,l.jsx)(M.A,{type:"card",defaultActiveKey:"loaderDetails",activeKey:b,items:[{label:"Loader Props",key:"loaderProps",children:(0,l.jsx)(O,{loader:j,resource:u,cwd:n})},{label:"Loader Details",key:"loaderDetails",children:"loaderDetails"===b?(0,l.jsx)(C.zW,{api:s.hp.ServerAPI.API.GetLoaderFileInputAndOutput,body:{file:u.path,loader:j.loader,loaderIndex:j.loaderIndex},showSkeleton:!1,children:e=>(0,l.jsx)($,{loader:j,resource:u,isLight:f,codeData:e})}):null}],onChange:k})})]})},_=e=>{let{cwd:t,filetree:n}=e,[S,k]=(0,y.useState)(!1),[N,M]=(0,y.useState)(""),[T,E]=(0,y.useState)(0),[R,z]=(0,y.useState)(null),L=(0,y.useMemo)(()=>n.filter(t=>t.loaders.some(n=>(0,A.filterLoader)(t.path,n.loader,e.filename,e.loaders,t.layer,null==e?void 0:e.layer))),[e.filename,e.loaders,e.layer]),P="__RESOURCEPATH__",D=(0,y.useMemo)(()=>(0,A.createFileStructures)({files:L.map(e=>e.path),cwd:t,fileTitle(e,t){let{loaders:s,layer:p}=n.find(t=>t.path===e),x=[];return s.forEach((e,t)=>t>3&&x.push(e)),(0,l.jsxs)("div",{style:{wordBreak:"break-all",display:"flex",cursor:"pointer"},onClick:()=>{E(0),M(e),k(!0)},children:[(0,l.jsx)("div",{className:F.A.box,children:(0,l.jsx)("div",{className:F.A.keywords,children:(0,l.jsx)(w.i,{text:t.replace(/\[.*?\]/g,""),keyword:""})})}),(0,l.jsx)("div",{className:F.A.dividerDiv,style:{flex:1},children:(0,l.jsx)(i.A,{className:F.A.divider,dashed:!0})}),p&&(0,l.jsx)(a.A,{color:"cyan",bordered:!1,children:p}),(0,l.jsxs)(o.A,{children:[s.slice(0,3).map((t,n)=>{var s;let a=t.errors&&t.errors.length,o=`${e}_${t.loader}_${n}`;if(n<=3)return(0,l.jsx)(d.A,{title:t.path,children:(0,l.jsxs)(c.A.Text,{className:F.A.textBox,style:{color:a?"#f50":"inherit"},onClick:t=>{t.stopPropagation(),M(e),E(n),k(!0)},children:[(0,l.jsx)(c.A.Text,{className:F.A.text,ellipsis:!0,children:(null==(s=t.loader.match(/([^/]+-loader)/g))?void 0:s[0])||t.loader}),(0,l.jsx)(i.A,{type:"vertical"}),a?(0,l.jsx)(r.A,{}):(0,l.jsx)(c.A.Text,{className:F.A.text,children:(0,A.formatCosts)(t.costs)})]})},o)}),(null==x?void 0:x.length)?(0,l.jsx)(u.A,{content:(0,l.jsx)(h.A,{dataSource:x,renderItem:(t,n)=>{var r;let s=t.errors&&t.errors.length,a=`${e}_${t.loader}_${n+3}`;return(0,l.jsx)(h.A.Item,{children:(0,l.jsx)(d.A,{title:t.path,children:(0,l.jsx)("div",{style:{paddingBottom:5},children:(0,l.jsxs)(c.A.Text,{className:F.A.textBox,style:{color:s?"#f50":"inherit"},onClick:t=>{t.stopPropagation(),M(e),E(n),k(!0)},children:[(0,l.jsx)(c.A.Text,{className:F.A.text,ellipsis:!0,children:(null==(r=t.loader.match(/([^/]+-loader)/g))?void 0:r[0])||t.loader}),(0,l.jsx)(i.A,{type:"vertical"}),(0,l.jsx)(c.A.Text,{className:F.A.text,children:(0,A.formatCosts)(t.costs)})]})})},a)})}}),children:(0,l.jsx)("div",{className:F.A.textBox,children:(0,l.jsx)(c.A.Text,{children:"\xb7\xb7\xb7"})})}):(0,l.jsx)(l.Fragment,{})]})]})},dirTitle:(e,t)=>(0,l.jsx)("div",{style:{display:"flex",cursor:"pointer"},children:(0,l.jsx)(w.i,{text:t,keyword:""})})}),[L]);return(0,l.jsxs)(p.A,{style:{width:"100%",marginLeft:0},gutter:v.or.BasePadding,children:[(0,l.jsx)(x.A,{span:24,children:(0,l.jsxs)(m.A,{title:(0,l.jsxs)(o.A,{children:[(0,l.jsx)(c.A.Text,{strong:!0,children:"Files"}),(0,l.jsxs)(c.A.Text,{style:{fontSize:12,fontWeight:400,color:"#1C1F2399",opacity:.6},children:["Total Files: ",L.length]})]}),bodyStyle:{overflow:"auto",maxHeight:800,minHeight:"40rem",padding:14},children:[(0,l.jsx)(b.h,{defaultExpandedKeys:(0,A.mapFileKey)(D,L.length>=100?3:4,e=>!((0,j.J)(e,P).indexOf("/node_modules/")>-1)),treeData:D,onSelect:(e,t)=>{t.node.isLeaf||z(t.node)},selectedKeys:R?[R.key]:void 0,expandAction:"click"},`${e.loaders.join("|")}_${e.filename}`),(0,l.jsx)(g.A,{open:S,onClose:()=>k(!1),maskClosable:!0,width:v.Y7,zIndex:999,bodyStyle:{padding:0},children:S?(0,l.jsx)(C.zW,{api:s.hp.ServerAPI.API.GetLoaderFileDetails,body:{path:N},children:e=>(0,l.jsx)(G,{data:e,cwd:t,index:T})}):null})]})}),(0,l.jsx)(g.A,{open:!!R,onClose:()=>z(null),maskClosable:!0,width:v.Y7,zIndex:999,bodyStyle:{padding:0},children:R&&(0,l.jsx)(p.A,{children:(0,l.jsx)(x.A,{span:24,children:(0,l.jsx)(m.A,{title:(0,l.jsx)(d.A,{title:y.cloneElement(R.title,{style:{color:"#fff"}}),children:(0,l.jsxs)(c.A.Text,{children:["Statistics of",R.title]})}),children:(0,l.jsx)(C.zW,{api:s.hp.ServerAPI.API.GetLoaderFolderStatistics,body:{folder:R[P]},children:e=>(0,l.jsx)(f.A,{style:{width:"100%",maxHeight:800,height:"40rem",overflowY:"scroll",wordBreak:"break-all"},pagination:!1,bordered:!0,rowKey:e=>e.loader,columns:[{title:"Loader Name",dataIndex:"loader"},{title:"Files",dataIndex:"files"},{title:"Total Duration",dataIndex:"costs",render:e=>(0,l.jsx)(c.A.Text,{strong:!0,children:(0,A.formatCosts)(e)}),sorter:(e,t)=>e.costs-t.costs,defaultSortOrder:"descend",sortDirections:["descend","ascend"]}],dataSource:e})})})})})})]})}},45742(e,t,n){n.d(t,{A:()=>l});let l={loaderAnalysis:"loaderAnalysis-h6mG3n",dividerDiv:"dividerDiv-hrfVKQ",divider:"divider-hnPRxv",box:"box-lFdvrG",keyword:"keyword-UO64w1",textBox:"textBox-sVZZ_A",text:"text-omPvlh",space:"space-qT5CaN",executions:"executions-uZxmQC",timeline:"timeline-wMFXyU",loader:"loader-PHR4ca",selected:"selected-wUMOH3"}},74579(e,t,n){n.d(t,{eN:()=>r.e,ug:()=>l.u,zW:()=>r.z});var l=n(25957),r=n(99359)},58396(e,t,n){n.d(t,{h:()=>c});var l=n(65723),r=n(66020),s=n(13078),i=n.n(s),a=n(96729),o=n(98685);let d=+Date.now().toString().slice(-4)+1e3,c=e=>{let t,n,{cwd:s,url:c,loc:u,windowId:h=d,label:p,disabled:x,code:m=!1}=e,g=i().resolve(s,(t=c.split(" "),n="",1===t.length?[n]=t:[n]=t.filter(e=>i().isAbsolute(e)||e.startsWith("./")),n||c)),{line:f,columnStart:j}=function(e){if(!e)return{line:1,column:1};let[t,n=""]=e.split(":"),[l=1,r]=n.split("-");return{line:t,columnStart:l,columnEnd:r||l}}(u);return(0,l.jsxs)("span",{style:{wordBreak:"break-all"},children:[(0,l.jsx)(r.A.Text,{copyable:{text:g},children:(0,l.jsxs)(r.A.Text,{code:m,onClick:()=>{x||(0,a.jk)({file:g,line:f,column:j,windowId:h})},style:{cursor:x?"revert":"pointer"},children:[p||(0,o.getShortPath)(c),u?`:${u}`:""]})}),(0,l.jsx)("div",{style:{display:"inline-block"}})]})}},85333(e,t,n){n.d(t,{F:()=>y});var l=n(65723),r=n(22155),s=n(32354),i=n(47748),a=n(66020),o=n(43995),d=n(63079),c=n(84585),u=n(7710),h=n(45917),p=n(94175),x=n(10117),m=n(74579),g=n(91888);let f=e=>{let{style:t,onChange:n,loaderNames:d}=e,[c,h]=(0,r.useState)([]);return(0,l.jsxs)(s.A.Group,{compact:!0,style:t,children:[(0,l.jsxs)(i.Ay,{style:{width:120},children:[(0,l.jsx)(u.A,{}),(0,l.jsx)(a.A.Text,{children:"Loaders"})]}),(0,l.jsx)(o.A,{mode:"multiple",allowClear:!0,defaultValue:c,className:"loader-select",style:{width:300},popupMatchSelectWidth:300,placeholder:"select loaders",onChange:e=>{h(e),n(e)},children:d.map(e=>(0,l.jsx)(o.A.Option,{label:e,value:e,children:e},e))})]})},j=e=>{let{onChange:t,layers:n}=e,[d,c]=(0,r.useState)("");return(0,l.jsxs)(s.A.Group,{compact:!0,children:[(0,l.jsxs)(i.Ay,{style:{width:120},children:[(0,l.jsx)(u.A,{}),(0,l.jsx)(a.A.Text,{children:"Layers"})]}),(0,l.jsx)(o.A,{allowClear:!0,className:"layer-select",style:{width:150},defaultValue:d,placeholder:"select layer",onChange:e=>{c(e),t(e)},children:(null==n?void 0:n.length)?null==n?void 0:n.map(e=>(0,l.jsx)(o.A.Option,{label:e,value:e,children:e},e)):(0,l.jsx)(l.Fragment,{})})]})},y=e=>{let{onChange:t,loaderNames:n}=e,[s,i]=(0,r.useState)([]),[a,o]=(0,r.useState)(""),[u,y]=(0,r.useState)("");return(0,r.useEffect)(()=>{t({loaders:s,filename:a,layer:u})},[s,a,u]),(0,l.jsxs)(d.A,{style:{marginBottom:x.or.BasePadding,marginLeft:10},children:[(0,l.jsx)(c.A,{children:(0,l.jsx)(f,{loaderNames:n,style:{marginRight:x.or.BasePadding},onChange:e=>{i(e)}})}),(0,l.jsx)(c.A,{children:(0,l.jsx)(p.E,{icon:(0,l.jsx)(h.A,{}),style:{marginRight:x.or.BasePadding},label:"Filename",placeholder:"search filename by keyword",onChange:e=>{o(e)}})}),(0,l.jsx)(c.A,{children:(0,l.jsx)(m.zW,{api:g.hp.ServerAPI.API.GetLayers,children:e=>e.length?(0,l.jsx)(j,{layers:e,onChange:e=>{y(e)}}):(0,l.jsx)(l.Fragment,{})})})]})}},14760(e,t,n){n.d(t,{P6:()=>v,hX:()=>A});var l=n(65723),r=n(77665),s=n(47748),i=n(58094),a=n(22155),o=n(29656),d=n(66287),c=n(66020),u=n(63079),h=n(84585),p=n(91888),x=n(74620),m=n(40799),g=n(10117),f=n(21376),j=n(74579);let y=e=>{let{duplicatePackages:t=[],cwd:n,children:r,...s}=e;return(0,l.jsx)(A,{...s,buttonStyle:{fontSize:"inherit",...s.buttonStyle},buttonProps:{type:"text",...s.buttonProps},text:(0,l.jsx)(o.A,{title:"Click to show the details of duplicate packages",children:(0,l.jsxs)(d.A,{style:{fontSize:"inherit"},children:[(0,l.jsx)(c.A.Text,{strong:!0,style:{fontSize:"inherit",color:"inherit",...s.textStyle},children:t.length}),(0,l.jsx)(x.A,{})]})}),drawerProps:{title:"Duplicate Packages Viewer",...s.drawerProps},children:(0,l.jsx)(u.A,{gutter:[g.or.BasePadding,g.or.BasePadding],children:t.map((e,t)=>(0,l.jsx)(h.A,{span:24,children:(0,l.jsx)(f.ZZ,{data:e,cwd:n,getPackageRelationContentComponent:r})},t))})})},v=e=>{let{moduleGraph:t,...n}=e;return(0,l.jsx)(y,{...n,children:e=>(0,l.jsx)(j.zW,{api:p.hp.ServerAPI.API.GetModuleCodeByModuleIds,body:{moduleIds:t.modules.map(e=>e.id)},children:r=>(0,l.jsx)(f.aM,{data:m.Wh.getPackageRelationAlertDetails(t.modules,t.dependencies,n.cwd,e.package.dependencies,r),cwd:n.cwd})})})},A=e=>{let[t,n]=(0,a.useState)(!1);return(0,l.jsxs)("div",{onClick:e=>e.stopPropagation(),...e.containerProps,children:[e.button?(0,l.jsx)("div",{onClick:()=>n(!t),children:e.button}):e.text?(0,l.jsx)(s.Ay,{type:"link",...e.buttonProps,onClick:()=>n(!t),style:{padding:0,...e.buttonStyle},children:e.text}):(0,l.jsx)(r.A,{style:{fontSize:14,padding:0},onClick:()=>n(!t)}),(0,l.jsx)(i.A,{maskClosable:!0,zIndex:999,width:"60%",...e.drawerProps,open:t,onClose:()=>n(!1),destroyOnClose:!0,children:e.children})]})}},90220(e,t,n){n.d(t,{h:()=>i});var l=n(65723);n(22155);var r=n(66020),s=n(4949);let i=e=>{let{upperFirst:t=!0,fontSize:n=16,text:i,hash:a}=e,o="string"==typeof i&&t?(0,s.Z)(i):i;return(0,l.jsx)(r.A.Text,{style:{fontSize:n},strong:!0,children:a?(0,l.jsx)("a",{href:a,id:a.replace(/^#/,""),style:{color:"inherit"},children:o}):o})}},85240(e,t,n){n.d(t,{Cv:()=>c});var l=n(65723),r=n(83021),s=n(70851),i=n(22155),a=n(27618),o=n(28322),d=n(40799);function c(e){let{className:t,style:n,code:c="",lang:u,filePath:h="",defaultLine:p,ranges:x,isEmbed:m=!1,headerVisible:g=!0,isLightTheme:f=!0,formatOnMount:j=!1}=e,y=(0,i.useRef)(),v=(0,i.useRef)(),A=(0,i.useMemo)(()=>u||(0,a.rZ)(h)||"plaintext",[u,h]),[b,w]=(0,i.useState)(!0),C=(0,i.useMemo)(()=>(0,a.$N)({wordWrap:b?"on":"off"}),[b]),S=(0,i.useCallback)((e,t)=>{y.current=e,v.current=t,(0,a.sK)(e,t,x),d.AP.isNumber(p)&&setTimeout(()=>{e.revealLine(p)}),j&&setTimeout(()=>{var t;null==(t=e.getAction("editor.action.formatDocument"))||t.run()},0)},[x,p,j]);return(0,i.useEffect)(()=>()=>{var e;null==(e=y.current)||e.setModel(null)},[]),(0,l.jsxs)("div",{className:(0,s.A)("monaco-component","code-viewer","code-viewer-H7hGrZ",m&&"embed-tjljOS",t),style:n,children:[g&&!!h&&(0,l.jsxs)("div",{className:"header-qejtwX",children:[(0,l.jsx)("div",{children:(0,a.WP)(h)}),(0,l.jsx)("div",{style:{flex:1}}),(0,l.jsx)("div",{children:(0,l.jsx)(o.A,{className:"text-T29bd1",title:"side-by-side",checked:b,onChange:e=>{w(e.target.checked)},children:"word-wrap"})})]}),(0,l.jsx)("div",{className:(0,s.A)("content-EVSW1C","editor-wrap"),children:(0,l.jsx)(r.KE,{theme:f?"vs-light":"vs-dark",language:A,value:c,options:C,onMount:S})})]})}n(75652)},27618(e,t,n){n.d(t,{$N:()=>i,WP:()=>a,XX:()=>s,qK:()=>o,rZ:()=>r,sK:()=>d});var l=n(13078);function r(e){if(!e)return"";let t=function(e){if(!e)return"";try{if(!e.startsWith("data:"))return"";let{mimeType:t}=function(e){if(!e.startsWith("data:"))throw Error("输入不是有效的 Data URL");let t=e.substring(5),n=t.indexOf(",");if(-1===n)throw Error("无效的 Data URL 格式: 缺少数据分隔符");let l=t.substring(0,n),r=t.substring(n+1),s="",i="",a=!1,o=l.split(";");o.length>0&&(s=o[0]||"text/plain");for(let e=1;e<o.length;e++){let t=o[e];"base64"===t?a=!0:t.startsWith("charset=")&&(i=t.substring(8))}return{mimeType:s,charset:i,isBase64:a,data:r}}(e);switch(t){case"text/javascript":return"javascript";case"text/html":return"html";case"text/css":return"css";case"text/plain":return"text";case"application/json":return"json";default:return""}}catch(e){return console.error("解析 data 协议文件格式失败::",e),""}}(e);if(t)return t;try{let t=(0,l.extname)(e).slice(1);switch(t){case"js":case"cjs":case"mjs":case"jsx":return"javascript";case"ts":case"tsx":return"typescript";case"md":return"markdown";default:return t}}catch(e){return""}}let s={readOnly:!0,domReadOnly:!0,fontSize:14,tabSize:2,lineHeight:24,renderValidationDecorations:"off",hideCursorInOverviewRuler:!0,smoothScrolling:!0,wordWrap:"on",colorDecorators:!0,codeLens:!1,cursorWidth:0,minimap:{enabled:!1},contextmenu:!1,gotoLocation:{multiple:"goto",multipleDefinitions:"goto",multipleTypeDefinitions:"goto",multipleDeclarations:"goto",multipleImplementations:"goto",multipleReferences:"goto"},hover:{enabled:!1},links:!1};function i(e){return{...structuredClone(s),...e}}function a(e){return e?e.startsWith("data:")?"data":e.split("/").at(-1)||"":""}function o(e,t){let{start:n,end:l}=e,{line:r=1,column:s=0}=n;return new t(r,s+1,(null==l?void 0:l.line)??r,((null==l?void 0:l.column)??9999)+1)}function d(e,t,n){if(!n||0===n.length)return;let l=n.map(e=>({range:o(e,t.Range),options:{inlineClassName:"file-inline-decoration"}}));e.deltaDecorations([],l),setTimeout(()=>{e.revealLine(l[0].range.startLineNumber)})}},68850(e,t,n){n.d(t,{Mh:()=>u,Cv:()=>l.Cv});var l=n(85240),r=n(65723),s=n(83021),i=n(28322),a=n(70851),o=n(22155),d=n(27618);let c={...structuredClone(d.XX),readOnly:!0,originalEditable:!1,renderSideBySide:!0,renderSideBySideInlineBreakpoint:1,renderIndicators:!0,definitionLinkOpensInPeek:!1,domReadOnly:!0,minimap:{enabled:!1},diffWordWrap:"on",folding:!1,lineNumbersMinChars:3,renderLineHighlight:"none",matchBrackets:"never",diffAlgorithm:"advanced",ignoreTrimWhitespace:!0,renderOverviewRuler:!0,renderLineHighlightOnlyWhenFocus:!0,smoothScrolling:!0,letterSpacing:.5};function u(e){let{className:t,style:n,original:l="",modified:u="",originalFilePath:h="",modifiedFilePath:p="",originalLang:x,modifiedLang:m,isEmbed:g=!1,isLightTheme:f=!0,headerVisible:j=!0}=e,[y,v]=(0,o.useState)(!0),A=(0,o.useRef)(),b=(0,o.useMemo)(()=>x||(0,d.rZ)(h)||"plaintext",[x,h]),w=(0,o.useMemo)(()=>m||(0,d.rZ)(p)||"plaintext",[m,p]),C=(0,o.useMemo)(()=>{var e;return e={renderSideBySide:y},{...structuredClone(c),...e}},[y]),S=(0,o.useCallback)(e=>{A.current=e},[]);return(0,o.useEffect)(()=>()=>{var e;null==(e=A.current)||e.setModel(null)},[]),(0,r.jsxs)("div",{className:(0,a.A)("monaco-component","diff-viewer","diff-viewer-CczjmT",g&&"embed-VNMDA8",t),style:n,children:[j&&(0,r.jsxs)("div",{className:"header-VBdMD0",children:[(0,r.jsx)("div",{children:(0,d.WP)(h)}),(0,r.jsx)("div",{style:{flex:1}}),(0,r.jsx)("div",{children:(0,r.jsx)(i.A,{className:"text-Pi6YdN",title:"side-by-side",checked:y,onChange:e=>{v(e.target.checked)},children:"side-by-side"})})]}),(0,r.jsx)("div",{className:(0,a.A)("content-BsfSuD","editor-wrap"),children:(0,r.jsx)(s.zC,{theme:f?"vs-light":"vs-dark",originalLanguage:b,modifiedLanguage:w,original:l,modified:u,width:"100%",options:C,onMount:S})})]})}},17400(e,t,n){n.d(t,{Q:()=>a,s:()=>i});var l=n(22155),r=n(96307),s=n(10117);let i={locale:(0,r.U)(),theme:(0,r.DT)(),pageState:s.jK.Pending,viewMode:(0,r.oi)(),json:{},setTheme(){},setManifest(){},setPageState(e){},setViewMode(){}},a=(0,l.createContext)({...i})},10117(e,t,n){n.d(t,{Q1:()=>g,Sx:()=>c,TM:()=>x,Y7:()=>f,jK:()=>u,nE:()=>p,nl:()=>h,or:()=>m});var l,r,s,i,a,o,d,c=((l={}).Light="light",l.Dark="dark",l),u=((r={})[r.Success=0]="Success",r[r.Pending=1]="Pending",r[r.Fail=2]="Fail",r),h=((s={})[s.Success=0]="Success",s[s.Pending=1]="Pending",s[s.Updating=2]="Updating",s[s.Fail=3]="Fail",s),p=((i={}).List="list",i.Group="group",i),x=((a={}).Cn="cn",a.En="en",a),m=((o={})[o.BasePadding=20]="BasePadding",o[o.BaseBorderRadius=8]="BaseBorderRadius",o[o.NavBarHeight=54]="NavBarHeight",o),g=((d={}).Red="#e17055",d.Green="#52c41a",d.Yellow="#faad14",d.Blue="#1677ff",d);let f="u"<typeof window?0:.85*window.innerWidth>=1100?.85*window.innerWidth:1100},4324(e,t,n){n.d(t,{wE:()=>ej,YW:()=>ey});var l,r,s=n(65723),i=n(22155),a=n(16753),o=n(29656),d=n(66287),c=n(94042),u=n(66020),h=n(60503),p=n(47748),x=n(19126),m=n(84262),g=n(94959),f=n(75168),j=n(91888),y=n(10117),v=n(63079),A=n(84585),b=n(67331),w=n(98685),C=n(14760),S=n(87417),k=n(43995),N=n(36025),M=n(5330),T=n(92554),E=n(87655),R=n(45917),z=n(94175),L=n(80956),P=n(85768),D=n(68850);let B=e=>{let{file:t,data:n}=e,[l,r]=(0,i.useState)(n[0].group),a=n.find(e=>e.group===l);return(0,s.jsxs)(v.A,{wrap:!0,gutter:[y.or.BasePadding,y.or.BasePadding],style:{height:"100%",alignContent:"flex-start"},children:[n.length>1?(0,s.jsx)(A.A,{span:24,children:(0,s.jsx)(P.A,{value:l,options:n.map(e=>e.group),onChange:e=>r(e)})}):null,a?(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(A.A,{span:24,children:(0,s.jsxs)(u.A.Text,{strong:!0,children:[a.baselineTitle||"Baseline"," ⟷"," ",a.currentTitle||"Current"]})}),(0,s.jsx)(A.A,{span:24,children:(0,s.jsx)(D.Mh,{originalFilePath:t,modifiedFilePath:t,original:a.baseline||"",modified:a.current||""})})]},l):null]})},I=e=>{let{text:t="View Changes",...n}=e;return(0,s.jsx)(C.hX,{text:t,buttonProps:{size:"small",icon:(0,s.jsx)(L.A,{})},drawerProps:{destroyOnClose:!0,title:`Content diff for "${n.file}"`},children:(0,s.jsx)(B,{...n})})};var F=((l={}).New="New",l.Changed="Changed",l.Deleted="Deleted",l.NotChanged="Not Changed",l),O=((r={}).Name="Sorted by Name",r.Size="Sorted by Size",r.Delta="Sorted by Delta",r),$=n(35471),G=n(78172),_=n(32354),W=n(4949);let V=(e,t,n,l)=>(0,s.jsx)(s.Fragment,{children:t-e==0?(0,s.jsx)(s.Fragment,{}):(0,s.jsxs)(u.A.Text,{strong:!0,style:{color:n===j.Kj.RsdoctorClientDiffState.Up?y.Q1.Red:y.Q1.Green,...l},children:[n===j.Kj.RsdoctorClientDiffState.Up?"+":"-",(0,w.formatSize)(Math.abs(t-e))]})});var H=n(40799);let U=/[a-fA-F0-9]{20,}/,q=(e,t,n)=>{let l=n?(e,n)=>{var l,r,s,i;return((null==(l=e.current)?void 0:l.size[t])||0)-((null==(r=e.baseline)?void 0:r.size[t])||0)-((null==(s=n.current)?void 0:s.size[t])||0)+((null==(i=n.baseline)?void 0:i.size[t])||0)}:(n,l)=>{var r,s;return((null==(r=n[e])?void 0:r.size[t])||0)-((null==(s=l[e])?void 0:s.size[t])||0)};return{width:200,sorter:(e,t)=>l(e,t),render:(n,l)=>{var r,i;if(!l[e])return"-";let a=l[e].size[t];return(0,s.jsxs)(d.A,{children:[(0,s.jsx)(u.A.Text,{children:(0,w.formatSize)(a)}),"current"===e?V((null==(r=l.baseline)?void 0:r.size[t])||0,a,((null==(i=l.baseline)?void 0:i.size[t])||0)>a?j.Kj.RsdoctorClientDiffState.Down:j.Kj.RsdoctorClientDiffState.Up):null]})}}},K=(e,t,n)=>{let[l,r]=(0,i.useState)(!1),a="baseline"===e;return{title:()=>{let l=a?t:n,r=(0,W.Z)(e),i=H.TS.diffSize(t,n);return(0,s.jsxs)("div",{children:[(0,s.jsx)(u.A.Text,{children:r}),(0,s.jsx)(h.A,{type:"vertical"}),(0,s.jsx)(o.A,{title:(0,s.jsxs)(d.A,{direction:"vertical",children:[(0,s.jsxs)(u.A.Text,{style:{color:"inherit"},children:[r," modules is ",l]}),a?null:(0,s.jsxs)(u.A.Text,{style:{color:"inherit"},children:["Percent is ",(0,w.formatPercent)(i.percent)]})]}),children:(0,s.jsxs)(d.A,{children:[(0,s.jsx)(u.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400},children:l}),(0,s.jsx)(g.A,{})]})})]})},children:[{title:"Source Size",...q(e,"sourceSize",l)},{title:"Parsed Size",defaultSortOrder:a?void 0:"descend",...q(e,"parsedSize",l)}],filterSearch:!0,filters:[{text:"Show Changed",value:F.NotChanged},{text:"Show All",value:"All"}],onFilter:(e,t)=>(e===F.NotChanged?r(!0):r(!1),e!==F.NotChanged||Z(t)!==e)}},Q=e=>{let{data:t,baseline:n,current:l}=e,{modules:r}=n.moduleGraph,{modules:a}=l.moduleGraph,{chunks:c}=n.chunkGraph,{chunks:x}=l.chunkGraph,m=n.root,f=l.root,[j,v]=(0,i.useState)(""),A=(0,i.useRef)(null),b=(e,t)=>{t(),v(e[0])},C="__is_baseline__",S=(0,i.useMemo)(()=>t.baseline?H.TS.getModulesByAsset(t.baseline,c,r).map(e=>({...e,[C]:!0})).filter(e=>{var t;return!(null==(t=e.concatenationModules)?void 0:t.length)}):[],[t,n]),k=(0,i.useMemo)(()=>t.current?H.TS.getModulesByAsset(t.current,x,a).map(e=>({...e,[C]:!1})).filter(e=>{var t;return!(null==(t=e.concatenationModules)?void 0:t.length)}):[],[t,l]),M=e=>(0,w.beautifyModulePath)(e.path,e.__is_baseline__?m:f),T=(0,i.useMemo)(()=>{let e=[...S,...k],t=new Map;return e.forEach(e=>{var n,l;let r=(null==(n=e.webpackId)?void 0:n.replace(U,""))||(null==(l=e.path)?void 0:l.replace(U,"")),s=t.get(r);s||(s={path:r}),e[C]?s.baseline=e:s.current=e,t.set(r,s)}),[...t.values()]},[S,k,j]),{bModulesCount:R,cModulesCount:z,totalCount:L}=(0,i.useMemo)(()=>{let e=e=>M(e).alias.indexOf(j)>-1,t=T.filter(e=>e.baseline),n=T.filter(e=>e.current),l=T.length;return j&&(t=t.filter(e),n=n.filter(e),l=T.filter(e).length),{bModulesCount:t.length,cModulesCount:n.length,totalCount:l}},[T,j]);return(0,s.jsx)(N.A,{dataSource:T,rowKey:e=>e.path,size:"small",pagination:{size:"small"},bordered:!0,scroll:{x:1500},columns:[{fixed:"left",title:()=>(0,s.jsxs)("div",{children:[(0,s.jsxs)(u.A.Text,{children:["Modules of ",`"${t.alias}"`]}),(0,s.jsx)(h.A,{type:"vertical"}),(0,s.jsxs)(o.A,{title:(0,s.jsxs)(d.A,{direction:"vertical",children:[(0,s.jsxs)(u.A.Text,{style:{color:"inherit"},children:["filtered modules: ",L]}),(0,s.jsxs)(u.A.Text,{style:{color:"inherit"},children:["total modules: ",T.length]})]}),children:[(0,s.jsxs)(u.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400,marginRight:4},children:[L,"/",T.length]}),(0,s.jsx)(g.A,{})]})]}),filterDropdown(e){let{setSelectedKeys:t,selectedKeys:n,confirm:l,clearFilters:r}=e;return(0,s.jsxs)("div",{style:{padding:8},onKeyDown:e=>e.stopPropagation(),children:[(0,s.jsx)(_.A,{ref:A,placeholder:"Search by file name",value:n[0],onChange:e=>t(e.target.value?[e.target.value]:[]),onPressEnter:()=>b(n,l),style:{marginBottom:8,display:"block"}}),(0,s.jsxs)(d.A,{children:[(0,s.jsx)(p.Ay,{type:"primary",onClick:()=>b(n,l),icon:(0,s.jsx)(G.A,{}),size:"small",style:{width:90},children:"Search"}),(0,s.jsx)(p.Ay,{onClick:()=>{r&&(r(),v("")),t([]),b([],l)},size:"small",style:{width:90},children:"Reset"})]})]})},filterSearch:!0,filterIcon:e=>(0,s.jsxs)(d.A,{children:[(0,s.jsx)(u.A.Text,{type:j?void 0:"secondary",style:{fontWeight:400},children:j||"Search by file name"}),(0,s.jsx)(G.A,{style:{color:e?y.Q1.Blue:void 0}})]}),onFilterDropdownOpenChange:e=>{e&&setTimeout(()=>{var e;return null==(e=A.current)?void 0:e.focus()},100)},onFilter:(e,t)=>M(t).alias.indexOf(e)>-1,render:(e,t)=>{let{alias:n,inNodeModules:l}=M(t);return(0,s.jsxs)(d.A,{children:[(0,s.jsx)(o.A,{title:t.path,children:(0,s.jsx)(u.A.Text,{copyable:{text:t.path},children:n})}),l?(0,s.jsx)(E.A,{color:"warning",children:"node_modules"}):null,(0,s.jsx)(Y,{type:Z(t)})]})}},K("current",R,z),K("baseline",R,z),{title:"Actions",width:200,render:(e,t)=>{var r,i,a,o,c,u,h,p,x,m,g,f;return(0,s.jsx)(d.A,{direction:"vertical",style:{maxWidth:170},children:(0,s.jsx)(I,{text:"View Changes",file:t.path,data:[{baseline:null==(r=n.moduleCodeMap[null==(i=t.baseline)?void 0:i.id])?void 0:r.source,current:null==(a=l.moduleCodeMap[null==(o=t.current)?void 0:o.id])?void 0:a.source,group:"Source"},{baseline:null==(c=n.moduleCodeMap[null==(u=t.baseline)?void 0:u.id])?void 0:c.transformed,current:null==(h=l.moduleCodeMap[null==(p=t.current)?void 0:p.id])?void 0:h.transformed,group:"Transformed Source"},{baseline:null==(x=n.moduleCodeMap[null==(m=t.baseline)?void 0:m.id])?void 0:x.parsedSource,current:null==(g=l.moduleCodeMap[null==(f=t.current)?void 0:f.id])?void 0:g.parsedSource,group:"Parsed Source"}]})})}}]})};function Z(e){if(e.baseline&&!e.current)return F.Deleted;if(!e.baseline&&e.current)return F.New;if(e.baseline&&e.current)return e.baseline.size.sourceSize===e.current.size.sourceSize&&e.baseline.size.parsedSize===e.current.size.parsedSize?F.NotChanged:F.Changed;throw Error("Update Type not match")}let Y=e=>{let{type:t}=e;return t===F.NotChanged?(0,s.jsx)(o.A,{title:"It hasn't changed between Baseline and Current",children:(0,s.jsx)(E.A,{color:"success",children:"Not Changed"})}):t===F.Changed?(0,s.jsx)(o.A,{title:"It has been changed between Baseline and Current",children:(0,s.jsx)(E.A,{color:"warning",children:"Changed"})}):t===F.New?(0,s.jsx)(o.A,{title:"It is created in Current",children:(0,s.jsx)(E.A,{color:"error",children:"New"})}):t===F.Deleted?(0,s.jsx)(o.A,{title:"It has been deleted in Current",children:(0,s.jsx)(E.A,{color:"error",children:"Deleted"})}):null},J=e=>{let{baseline:t,current:n}=e,l=(0,i.useMemo)(()=>(0,w.useUniqModules)(t.moduleGraph.modules),[t]),r=(0,i.useMemo)(()=>(0,w.useUniqModules)(n.moduleGraph.modules),[n]),a=t.chunkGraph.chunks,c=n.chunkGraph.chunks,p=t.root,x=n.root,[m,f]=(0,i.useState)(),[j,b]=(0,i.useState)([]),C=(0,i.useMemo)(()=>{let e={};return l.forEach(t=>{var n,l;let r=(null==(n=t.webpackId)?void 0:n.replace(U,""))||(null==(l=t.path)?void 0:l.replace(U,""));e[r]?console.warn("[Baseline Module Exists]: ",t,e):e[r]={path:r,baseline:t}}),r.forEach(t=>{var n,l;let r=(null==(n=t.webpackId)?void 0:n.replace(U,""))||(null==(l=t.path)?void 0:l.replace(U,""));e[r]||(e[r]={path:r}),e[r].current=t}),Object.values(e)},[l,r]),S=(0,i.useMemo)(()=>{let e=C.slice();return m&&(e=e.filter(e=>e.path.indexOf(m)>-1)),j.length&&(e=e.filter(e=>j.includes(Z(e)))),e},[C,m,j]),{bFilteredModulesLength:T,cFilteredModulesLength:L}=(0,i.useMemo)(()=>({bFilteredModulesLength:S.filter(e=>e.baseline).length,cFilteredModulesLength:S.filter(e=>e.current).length}),[S]);return(0,s.jsxs)(v.A,{gutter:[y.or.BasePadding,y.or.BasePadding],children:[(0,s.jsx)(A.A,{span:24,children:(0,s.jsxs)(d.A,{wrap:!0,children:[(0,s.jsx)(z.E,{icon:(0,s.jsx)(R.A,{}),label:"",labelStyle:{width:45},placeholder:"Search by name",onChange:e=>{f(e)}}),(0,s.jsx)(k.A,{mode:"multiple",placeholder:"Filter by changed type",style:{width:200},options:Object.values(F).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{b(e)}})]})}),(0,s.jsx)(A.A,{span:24,children:(0,s.jsx)(N.A,{bordered:!0,sticky:{offsetHeader:54},pagination:{pageSize:20,size:"small"},scroll:{x:1700},dataSource:S,rowKey:e=>e.path,columns:[{fixed:"left",title:(0,s.jsxs)(o.A,{title:(0,s.jsxs)(d.A,{direction:"vertical",children:[(0,s.jsxs)(u.A.Text,{style:{color:"inherit"},children:["filtered modules is ",S.length," (Current & Baseline)"]}),(0,s.jsxs)(u.A.Text,{style:{color:"inherit"},children:["total modules is ",C.length," (Current & Baseline)"]})]}),children:[(0,s.jsx)(u.A.Text,{strong:!0,children:"Modules"}),(0,s.jsx)(h.A,{type:"vertical"}),(0,s.jsxs)(u.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400,marginRight:4},children:[S.length,"/",C.length]}),(0,s.jsx)(g.A,{})]}),render:(e,t)=>{let{alias:n,inNodeModules:l}=(0,w.beautifyModulePath)(t.path,t.baseline?p:x);return(0,s.jsxs)(d.A,{children:[(0,s.jsx)(o.A,{title:t.path,children:(0,s.jsx)(u.A.Text,{copyable:{text:t.path},children:n})}),(0,s.jsx)(Y,{type:Z(t)}),l?(0,s.jsx)(E.A,{color:"warning",children:"node_modules"}):null]})}},K("current",T,L),K("baseline",T,L),{title:"in Assets",render:(e,t)=>{let n=[],l=[];return(t.current&&H.TS.getChunksByModule(t.current,c).forEach(e=>e.assets.forEach(e=>l.push(e))),t.baseline&&H.TS.getChunksByModule(t.baseline,a).forEach(e=>e.assets.forEach(e=>n.push(e))),n.length||l.length)?(0,s.jsxs)(d.A,{direction:"vertical",children:[(0,M.s)(l).filter(Boolean).map(e=>(0,s.jsx)($.Ex,{label:"Current",value:e},`c_${e}`)),(0,M.s)(n).filter(Boolean).map(e=>(0,s.jsx)($.Ex,{label:"Baseline",value:e},`b_${e}`))]}):null}},{title:"Actions",width:200,render:(e,l)=>{var r,i,a,o,c,u,h,p,x,m,g,f,j,y,v,A;let b=Z(l)===F.Changed;return(0,s.jsxs)(d.A,{direction:"vertical",style:{maxWidth:170},children:[b?(0,s.jsx)(I,{text:"View Changes",file:l.path,data:[{baseline:null==(r=t.moduleCodeMap[null==(i=l.baseline)?void 0:i.id])?void 0:r.source,current:null==(a=n.moduleCodeMap[null==(o=l.current)?void 0:o.id])?void 0:a.source,group:"Source"},{baseline:null==(c=t.moduleCodeMap[null==(u=l.baseline)?void 0:u.id])?void 0:c.transformed,current:null==(h=n.moduleCodeMap[null==(p=l.current)?void 0:p.id])?void 0:h.transformed,group:"Transformed Source"},{baseline:null==(x=t.moduleCodeMap[null==(m=l.baseline)?void 0:m.id])?void 0:x.parsedSource,current:null==(g=n.moduleCodeMap[null==(f=l.current)?void 0:f.id])?void 0:g.parsedSource,group:"Parsed Source"}]}):null,(null==l?void 0:l.current)?(0,s.jsx)(I,{text:"Current Result Viewer",file:l.path,data:[{baseline:null==(j=n.moduleCodeMap[l.current.id])?void 0:j.source,current:null==(y=n.moduleCodeMap[l.current.id])?void 0:y.transformed,baselineTitle:"Current Source",currentTitle:"Current Transformed Source",group:"Transformed Source"},{baseline:null==(v=n.moduleCodeMap[l.current.id])?void 0:v.source,current:null==(A=n.moduleCodeMap[l.current.id])?void 0:A.parsedSource,baselineTitle:"Current Source",currentTitle:"Current Parsed Source",group:"Parsed Source"}]}):null]})}}]})})]})},X=e=>e.baseline&&e.current?e.baseline.map(e=>e.version).sort().join()===e.current.map(e=>e.version).sort().join()?F.NotChanged:F.Changed:e.baseline||e.current?e.baseline&&!e.current?F.Deleted:F.New:F.NotChanged,ee=e=>X(e)!==F.NotChanged,et=e=>{let{dataSource:t}=e,{newCount:n,deleteCount:l,changedCount:r}=(0,i.useMemo)(()=>({newCount:t.filter(e=>e.updateType===F.New).length,deleteCount:t.filter(e=>e.updateType===F.Deleted).length,changedCount:t.filter(e=>e.updateType===F.Changed).length}),[t]);return(0,s.jsxs)(d.A,{children:[(0,s.jsx)($.Ex,{label:"New",value:n,type:n>0?"error":"default",tooltip:`Current has ${n} packages which not found in Baseline`}),(0,s.jsx)($.Ex,{label:"Deleted",value:l,type:l>0?"error":"default",tooltip:`Current delete ${l} packages than Baseline`}),(0,s.jsx)($.Ex,{label:"Changed",value:r,type:r>0?"error":"default",tooltip:`Current has ${r} changed packages than Baseline`})]})},en=e=>{let{baseline:t,current:n}=e,{packages:l=[]}=t||{},{packages:r=[]}=n||{},s={},i=(e,t)=>{s[e.name]||(s[e.name]={name:e.name,updateType:F.NotChanged}),s[e.name][t]||(s[e.name][t]=[]),s[e.name][t].push(e)};l.forEach(e=>i(e,"baseline")),r.forEach(e=>i(e,"current"));let a=[],o=[];return Object.values(s).forEach(e=>{ee(e)?a.push(e):o.push(e)}),a.concat(o).map(e=>({...e,updateType:X(e)}))},el=e=>{let{baseline:t,current:n}=e,{packages:l=[]}=t||{},{packages:r=[]}=n||{};if(!l.length&&!r.length)return(0,s.jsx)(S.A,{});let a=(0,i.useMemo)(()=>(0,M.s)(l.concat(r).map(e=>e.name)),[l,r]),[c,p]=(0,i.useState)([]),[x,m]=(0,i.useState)([]),g=(0,i.useMemo)(()=>en({baseline:t,current:n}),[t,n]),f=(0,i.useMemo)(()=>g.filter(e=>x.length?x.indexOf(e.updateType)>-1:!c.length||c.indexOf(e.name)>-1),[g,c,x]);return(0,s.jsxs)(v.A,{gutter:[y.or.BasePadding,y.or.BasePadding],children:[(0,s.jsx)(A.A,{span:24,style:{marginTop:16},children:(0,s.jsxs)(d.A,{wrap:!0,children:[(0,s.jsx)(k.A,{mode:"multiple",placeholder:"Filter by package names",style:{width:400},options:a.map(e=>{let t=g.find(t=>t.name===e);return t&&ee(t)?{label:(0,s.jsxs)(d.A,{children:[(0,s.jsx)(u.A.Text,{children:e}),(0,s.jsx)(Y,{type:X(t)})]}),value:e}:{label:e,value:e}}),allowClear:!0,onChange:e=>{p(e)}}),(0,s.jsx)(k.A,{mode:"multiple",placeholder:"Filter by changed type",style:{width:200},options:Object.values(F).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{m(e)}})]})}),(0,s.jsx)(A.A,{span:24,children:(0,s.jsx)(N.A,{bordered:!0,sticky:{offsetHeader:54},pagination:{pageSize:20,size:"small"},dataSource:f,rowKey:e=>e.name,columns:[{title:()=>(0,s.jsxs)(d.A,{children:[(0,s.jsx)(u.A.Text,{children:"Package Name"}),(0,s.jsx)(h.A,{type:"vertical"}),(0,s.jsx)(o.A,{title:`Filtered Package Count is ${f.length}, Total Package Count is ${g.length}`,children:(0,s.jsxs)(u.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400},children:[f.length," / ",g.length]})})]}),render:(e,t)=>t.updateType!==F.NotChanged?(0,s.jsxs)(d.A,{children:[(0,s.jsx)(u.A.Text,{children:t.name}),(0,s.jsx)(Y,{type:t.updateType})]}):t.name},{title:()=>(0,s.jsxs)(d.A,{children:[(0,s.jsx)(u.A.Text,{children:"Current"}),(0,s.jsx)(h.A,{type:"vertical"}),(0,s.jsx)(et,{dataSource:g})]}),children:[{title:"Version",render:(e,t)=>t.current?(0,s.jsx)(d.A,{direction:"vertical",children:t.current.map(e=>(0,s.jsx)($.Ex,{label:"version",value:e.version,tooltip:e.root,type:t.updateType===F.Deleted?"error":t.updateType===F.Changed?"warn":"default"},e.version))}):null},{title:"Parsed Size",render:(e,t)=>{let n=(0,T.x)(t.current,e=>e.size.parsedSize),l=()=>(0,s.jsx)(b.vh,{baseline:(0,T.x)(t.baseline,e=>e.size.parsedSize),current:n});return t.current?(0,s.jsxs)(d.A,{children:[(0,s.jsx)(u.A.Text,{strong:t.updateType!==F.NotChanged,children:(0,w.formatSize)(n)}),(0,s.jsx)(l,{})]}):(0,s.jsx)(l,{})}}]},{title:"Baseline",children:[{title:"Version",render:(e,t)=>t.baseline?(0,s.jsx)(d.A,{direction:"vertical",children:t.baseline.map(e=>(0,s.jsx)($.Ex,{label:"version",value:e.version,tooltip:e.root,type:t.updateType===F.Deleted?"error":t.updateType===F.Changed?"warn":"default"},e.version))}):null},{title:"Parsed Size",render:(e,t)=>{if(t.baseline){let e=(0,T.x)(t.baseline,e=>e.size.parsedSize);return(0,s.jsx)(u.A.Text,{children:(0,w.formatSize)(e)})}return null}}]}]})})]})},er=e=>{let{baseline:t,current:n,assetsDiffResult:l}=e,r=(0,w.useUniqModules)(t.moduleGraph.modules),i=(0,w.useUniqModules)(n.moduleGraph.modules),a=(0,w.useDuplicatePackagesByErrors)(t.errors),o=(0,w.useDuplicatePackagesByErrors)(n.errors),c=(0,w.useModuleGraph)(t.moduleGraph),h=(0,w.useModuleGraph)(n.moduleGraph),p=t.root,x=n.root,m=en({baseline:t.packageGraph,current:n.packageGraph}),g=[{title:["Bundle Size"],value:[l.all.total]},{title:["Total JS","Initial JS"],value:[l.js.total,l.js.initial]},{title:["Total CSS","Initial CSS"],value:[l.css.total,l.css.initial]},{title:["Images","Fonts","Media"],value:[l.imgs.total,l.fonts.total,l.media.total]},{title:["HTML"],value:[l.html.total]},{title:["Others"],value:[l.others.total]}];return(0,s.jsxs)(v.A,{gutter:[y.or.BasePadding,y.or.BasePadding],wrap:!0,style:{marginBottom:y.or.BasePadding},children:[g.map(e=>(0,s.jsx)(A.A,{style:{minWidth:335},children:(0,s.jsx)(b.aq,{titles:e.title,datas:e.value,showPercentInTitle:!0})},e.title.join(","))),(0,s.jsx)(A.A,{style:{minWidth:335},children:(0,s.jsx)(b.aq,{titles:["Duplicate Packages"],datas:[{size:{baseline:a.length,current:o.length},count:{baseline:a.length,current:o.length},percent:0,state:j.Kj.RsdoctorClientDiffState.Equal}],formatter:(e,l)=>(0,s.jsx)(C.P6,{duplicatePackages:"baseline"===l?a:o,moduleGraph:"baseline"===l?c:h,cwd:"baseline"===l?p:x,buttonProps:{size:"small"},moduleCodeMap:"baseline"===l?t.moduleCodeMap:n.moduleCodeMap})})}),(0,s.jsx)(A.A,{style:{minWidth:335},children:(0,s.jsx)(b.aq,{titles:["Modules"],datas:[{size:{baseline:r.length,current:i.length},count:{baseline:r.length,current:i.length},percent:0,state:j.Kj.RsdoctorClientDiffState.Equal}],formatter:(e,t)=>{if("baseline"===t)return e;let n=H.TS.diffSize(r.length,i.length);return(0,s.jsxs)(d.A,{style:{fontSize:"inherit"},children:[(0,s.jsx)(u.A.Text,{style:{fontSize:"inherit"},children:e}),(0,s.jsx)(b.QE,{...n})]})}})}),(0,s.jsx)(A.A,{style:{minWidth:335},children:(0,s.jsx)(b.aq,{titles:[(0,s.jsxs)(d.A,{children:[(0,s.jsx)(u.A.Text,{style:{color:"inherit"},children:"Packages"}),(0,s.jsx)(et,{dataSource:m})]},"0")],datas:[{size:{baseline:m.filter(e=>e.baseline).length,current:m.filter(e=>e.current).length},count:{baseline:m.filter(e=>e.baseline).length,current:m.filter(e=>e.current).length},percent:0,state:j.Kj.RsdoctorClientDiffState.Equal}],formatter:(e,t)=>"baseline"===t?e:(0,s.jsx)(d.A,{children:e})})})]})},es=e=>{let{assetsDiffResult:t}=e,n=[{type:"JS",data:t.js},{type:"CSS",data:t.css},{type:"Imgs",data:t.imgs},{type:"Fonts",data:t.fonts},{type:"Media",data:t.media},{type:"HTML",data:t.html},{type:"Others",data:t.others}];return(0,s.jsx)(N.A,{bordered:!0,pagination:!1,dataSource:n,rowKey:e=>e.type,style:{marginTop:y.or.BasePadding-y.or.BasePadding/4},columns:[{title:"File Type",dataIndex:"type",key:"type",render:e=>(0,s.jsx)(u.A.Text,{strong:!0,children:e})},{title:"Size",dataIndex:"data",key:"size",children:[{title:"Current",dataIndex:"data",key:"csize",render:e=>{let t=(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(u.A.Text,{strong:!0,children:(0,w.formatSize)(e.total.size.current)}),(0,s.jsx)(b.QE,{percent:e.total.percent,state:e.total.state}),V(e.total.size.baseline,e.total.size.current,e.total.state)]});return e.initial?(0,s.jsxs)(d.A,{direction:"vertical",children:[(0,s.jsxs)(d.A,{children:[(0,s.jsx)(E.A,{color:y.Q1.Blue,children:"Total"}),t]}),(0,s.jsxs)(d.A,{children:[(0,s.jsx)(E.A,{color:y.Q1.Blue,children:"Initial"}),(0,s.jsx)(u.A.Text,{strong:!0,children:(0,w.formatSize)(e.initial.size.current)}),(0,s.jsx)(b.QE,{percent:e.initial.percent,state:e.initial.state}),V(e.initial.size.baseline,e.initial.size.current,e.initial.state)]})]}):(0,s.jsx)(d.A,{children:t})}},{title:"Baseline",dataIndex:"data",key:"bsize",render:e=>{let t=(0,s.jsx)(u.A.Text,{children:(0,w.formatSize)(e.total.size.baseline)});return e.initial?(0,s.jsxs)(d.A,{direction:"vertical",children:[(0,s.jsxs)(d.A,{children:[(0,s.jsx)(E.A,{color:y.Q1.Blue,children:"Total"}),t]}),(0,s.jsxs)(d.A,{children:[(0,s.jsx)(E.A,{color:y.Q1.Blue,children:"Initial"}),(0,s.jsx)(u.A.Text,{children:(0,w.formatSize)(e.initial.size.baseline)})]})]}):t}}]},{title:"Count",dataIndex:"data",key:"count",children:[{title:"Current",dataIndex:"data",key:"ccount",render:e=>{let t=(0,s.jsx)(u.A.Text,{strong:!0,children:e.total.count.current});return e.initial?(0,s.jsxs)(d.A,{direction:"vertical",children:[(0,s.jsxs)(d.A,{children:[(0,s.jsx)(E.A,{color:y.Q1.Blue,children:"Total"}),t]}),(0,s.jsxs)(d.A,{children:[(0,s.jsx)(E.A,{color:y.Q1.Blue,children:"Initial"}),(0,s.jsx)(u.A.Text,{strong:!0,children:e.initial.count.current})]})]}):(0,s.jsx)(d.A,{children:t})}},{title:"Baseline",dataIndex:"data",key:"bcount",render:e=>{let t=(0,s.jsx)(u.A.Text,{children:e.total.count.baseline});return e.initial?(0,s.jsxs)(d.A,{direction:"vertical",children:[(0,s.jsxs)(d.A,{children:[(0,s.jsx)(E.A,{color:y.Q1.Blue,children:"Total"}),t]}),(0,s.jsxs)(d.A,{children:[(0,s.jsx)(E.A,{color:y.Q1.Blue,children:"Initial"}),(0,s.jsx)(u.A.Text,{children:e.initial.count.baseline})]})]}):(0,s.jsx)(d.A,{children:t})}}]}]})};var ei=n(26845),ea=n(87836),eo=n(48787),ed=n(81740),ec=n(5574);let eu={JS:j.YM.JSExtensions,CSS:[j.YM.CSSExtension],HTML:[j.YM.HtmlExtension],Imgs:j.YM.ImgExtensions,Fonts:j.YM.FontExtensions,Media:j.YM.MediaExtensions,Others:[]},eh=Object.values(eu).flat(),ep=e=>{let{data:t}=e,n=(0,s.jsxs)(d.A,{children:[(0,s.jsx)(u.A.Text,{strong:!0,children:t.alias}),(0,s.jsx)(o.A,{title:(0,s.jsxs)(d.A,{style:{color:"inherit"},direction:"vertical",children:[t.current?(0,s.jsxs)(u.A.Text,{style:{color:"inherit"},children:["Current realpath: ",t.current.path]}):null,t.baseline?(0,s.jsxs)(u.A.Text,{style:{color:"inherit"},children:["Baseline realpath: ",t.baseline.path]}):null]}),children:(0,s.jsx)(g.A,{})})]});return t.baseline&&!t.current?(0,s.jsxs)(d.A,{children:[(0,s.jsx)(ei.A,{style:{color:y.Q1.Red}}),n]}):!t.baseline&&t.current?(0,s.jsxs)(d.A,{children:[(0,s.jsx)(ea.A,{style:{color:y.Q1.Green}}),n]}):t.baseline&&t.current?(0,s.jsxs)(d.A,{children:[(0,s.jsx)(eo.A,{style:{color:y.Q1.Yellow}}),n]}):n},ex=e=>{let{baseline:t,current:n,outputFilename:l}=e,[r,a]=(0,i.useState)(),[c,x]=(0,i.useState)([]),[m,f]=(0,i.useState)([]),[C,S]=(0,i.useState)(O.Size),[M,L]=(0,i.useState)(null),[P,D]=(0,i.useState)(null),{assets:B}=t.chunkGraph,{assets:$}=n.chunkGraph,G=(0,i.useMemo)(()=>{let e={};return M&&P?e.choose={alias:`${M}
5
+ ${P}`,current:$.find(e=>e.path===P),baseline:B.find(e=>e.path===M)}:(B.forEach(t=>{let n=H.TS.formatAssetName(t.path,l);e[n]?console.warn("[Baseline Asset Exists]: ",t,e):e[n]={alias:n,baseline:t}}),$.forEach(t=>{let n=H.TS.formatAssetName(t.path,l);e[n]||(e[n]={alias:n}),e[n].current=t})),Object.values(e)},[B,$,M,P]),_=(0,i.useMemo)(()=>{let e=G.slice();if(r&&(e=e.filter(e=>e.alias.indexOf(r)>-1)),c.length){let t=c.map(e=>eu[e]).flat(),n=c.indexOf("Others")>-1;e=e.filter(e=>{let l=e.baseline||e.current;return!!H.TS.isAssetMatchExtensions(l,t)||!!n&&!H.TS.isAssetMatchExtensions(l,eh)})}if(m.length&&(e=e.filter(e=>e.baseline&&!e.current?m.includes(F.Deleted):!e.baseline&&e.current?m.includes(F.New):!!e.baseline&&!!e.current&&(e.baseline.size===e.current.size?m.includes(F.NotChanged):m.includes(F.Changed)))),C)if(C===O.Name)e.sort((e,t)=>e.alias.localeCompare(t.alias));else{let{prev:r,others:s}=e.reduce((e,t)=>(t.current?t.baseline?e.prev.unshift(t):e.prev.push(t):e.others.push(t),e),{prev:[],others:[]});e=[...r.sort((e,r)=>{if(r.current&&e.current){if(C===O.Delta){let{percent:s}=H.TS.diffAssetsByExtensions(t.chunkGraph,n.chunkGraph,t=>H.TS.formatAssetName(t.path,l)===e.alias),{percent:i}=H.TS.diffAssetsByExtensions(t.chunkGraph,n.chunkGraph,e=>H.TS.formatAssetName(e.path,l)===r.alias);return i-s}return r.current.size-e.current.size}return -1}),...s]}return e},[G,r,c,m,C]),W=(0,i.useMemo)(()=>(0,T.x)(_,e=>e.current?e.current.size:0)||0,[_]),U=(0,i.useMemo)(()=>(0,T.x)(_,e=>e.baseline?e.baseline.size:0)||0,[_]);return(0,s.jsxs)(v.A,{gutter:[y.or.BasePadding,y.or.BasePadding],children:[(0,s.jsxs)(A.A,{span:24,children:[(0,s.jsxs)(d.A,{wrap:!0,children:[(0,s.jsx)(z.E,{icon:(0,s.jsx)(R.A,{}),label:"",labelStyle:{width:45},placeholder:"Search by file name",onChange:e=>{a(e)}}),(0,s.jsx)(k.A,{mode:"multiple",placeholder:"Filter by file type",style:{width:250},options:Object.keys(eu).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{x(e)}}),(0,s.jsx)(k.A,{mode:"multiple",placeholder:"Filter by file changed type",style:{width:200},options:Object.values(F).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{f(e)}}),(0,s.jsx)(k.A,{suffixIcon:(0,s.jsx)(ed.A,{}),options:Object.values(O).map(e=>({label:e,value:e})),value:C,onChange:e=>{S(e)}})]}),(0,s.jsxs)(v.A,{style:{marginTop:10},gutter:[6,6],children:[(0,s.jsx)(A.A,{children:(0,s.jsx)(p.Ay,{children:"Select Baseline Asset and Current Asset to Diff "})}),(0,s.jsx)(A.A,{children:(0,s.jsx)(k.A,{allowClear:!0,placeholder:"select baseline assets",showSearch:!0,style:{width:300},options:Object.values(t.chunkGraph.assets).map(e=>({label:e.path,value:e.path})),onChange:e=>L(e)})}),(0,s.jsx)(A.A,{children:(0,s.jsx)(k.A,{allowClear:!0,placeholder:"select current assets",showSearch:!0,style:{width:300},options:Object.values(n.chunkGraph.assets).map(e=>({label:e.path,value:e.path})),onChange:e=>D(e)})})]})]}),(0,s.jsx)(A.A,{span:24,children:(0,s.jsx)(N.A,{bordered:!0,sticky:{offsetHeader:54},pagination:{pageSize:20,size:"small"},dataSource:_,rowKey:e=>e.alias,expandable:{expandedRowRender:e=>(0,s.jsx)("div",{style:{margin:y.or.BasePadding/3},children:(0,s.jsx)(Q,{data:e,baseline:t,current:n})}),columnTitle:(0,s.jsx)(o.A,{title:"Click to expand row to see the modules which the chunk contains",placement:"left",children:(0,s.jsx)(ec.A,{style:{cursor:"pointer"}})})},columns:[{title:(0,s.jsxs)(o.A,{title:(0,s.jsxs)(d.A,{direction:"vertical",children:[(0,s.jsxs)(u.A.Text,{style:{color:"inherit"},children:["filtered assets is ",_.length]}),(0,s.jsxs)(u.A.Text,{style:{color:"inherit"},children:["total assets is ",G.length]})]}),children:[(0,s.jsx)(u.A.Text,{strong:!0,children:"Assets"}),(0,s.jsx)(h.A,{type:"vertical"}),(0,s.jsxs)(u.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400,marginRight:4},children:[_.length,"/",G.length]}),(0,s.jsx)(g.A,{})]}),render:(e,t)=>(0,s.jsx)(ep,{data:t})},{title:()=>{let e=(0,w.formatSize)(W),t=H.TS.diffSize(U,W);return(0,s.jsxs)(o.A,{title:`Current size is ${e}, Delta is ${(0,w.formatPercent)(t.percent)}`,children:[(0,s.jsx)(u.A.Text,{strong:!0,children:"Current"}),(0,s.jsx)(h.A,{type:"vertical"}),(0,s.jsxs)(u.A.Text,{style:{fontSize:10,fontWeight:400,marginRight:4},children:[(0,s.jsx)(u.A.Text,{style:{fontSize:"inherit",marginRight:8},children:e}),(0,s.jsx)(b.vh,{fontSize:"inherit",baseline:U,current:W}),V(U,W,U>W?j.Kj.RsdoctorClientDiffState.Down:j.Kj.RsdoctorClientDiffState.Up,{fontSize:10,fontWeight:400,marginLeft:4})]}),(0,s.jsx)(g.A,{})]})},render:(e,r)=>{if(r.current){let{percent:e,state:i}=H.TS.diffAssetsByExtensions(t.chunkGraph,n.chunkGraph,e=>H.TS.formatAssetName(e.path,l)===r.alias),a=H.TS.isInitialAsset(r.current,n.chunkGraph.chunks);return(0,s.jsxs)(d.A,{children:[(0,s.jsx)(u.A.Text,{children:(0,w.formatSize)(r.current.size)}),(0,s.jsx)(b.QE,{percent:e,state:i}),a?(0,s.jsx)(E.A,{color:y.Q1.Blue,children:"initial"}):null]})}return"-"}},{title:()=>{let e=(0,w.formatSize)(U);return(0,s.jsxs)(o.A,{title:`Baseline size is ${e}`,children:[(0,s.jsx)(u.A.Text,{strong:!0,children:"Baseline"}),(0,s.jsx)(h.A,{type:"vertical"}),(0,s.jsx)(u.A.Text,{style:{fontSize:10,fontWeight:400,marginRight:4},children:e}),(0,s.jsx)(g.A,{})]})},render:(e,n)=>{if(n.baseline){let e=H.TS.isInitialAsset(n.baseline,t.chunkGraph.chunks);return(0,s.jsxs)(d.A,{children:[(0,s.jsx)(u.A.Text,{children:(0,w.formatSize)(n.baseline.size)}),e?(0,s.jsx)(E.A,{color:y.Q1.Blue,children:"initial"}):null]})}return"-"}},{title:"Actions",key:"actions",render:(e,t)=>{var n,l;return(0,s.jsx)(I,{file:t.alias,data:[{baseline:null==(n=t.baseline)?void 0:n.content,current:null==(l=t.current)?void 0:l.content,group:"assets"}]})}}]})})]})};var em=n(74579);let eg=e=>{var t;let{api:n,body:l,children:r,manifests:i}=e,a=(0,w.useUrlQuery)(),o=window[j.YM.WINDOW_RSDOCTOR_TAG];if((null==o?void 0:o.baseline)&&(null==o?void 0:o.current)){let e=JSON.parse(H.oG.decompressText(o.baseline)),t=JSON.parse(H.oG.decompressText(o.current));return(0,s.jsx)(s.Fragment,{children:r(e,t)})}if(null==i?void 0:i.length)return(0,s.jsx)(s.Fragment,{children:r(i[0].data,i[1].data)});let[d,c]=(null==(t=a[j.Kj.RsdoctorClientUrlQuery.BundleDiffFiles])?void 0:t.split(","))||[];return(0,s.jsx)(em.zW,{api:n,body:l,manifestLoader:d?()=>(0,w.fetchManifest)(d):void 0,children:e=>(0,s.jsx)(em.zW,{api:n,body:l,manifestLoader:c?()=>(0,w.fetchManifest)(c):void 0,children:t=>r(e,t)})})},ef=e=>{let{manifests:t}=e;return(0,i.useEffect)(()=>{console.log("BundleDiff Manifests: ",t)},[t]),(0,s.jsx)(eg,{api:j.hp.ServerAPI.API.GetBundleDiffSummary,manifests:t,children:(e,t)=>{let n=e.chunkGraph===t.chunkGraph,l=e.chunkGraph,r=n?l:t.chunkGraph,i=H.TS.getAssetsDiffResult(l,r);return(0,s.jsxs)("div",{children:[(0,s.jsxs)(a.A.Group,{children:[(0,s.jsx)(o.A,{placement:"leftBottom",title:(0,s.jsx)(d.A,{direction:"vertical",children:[{title:"Baseline",data:e},{title:"Current",data:t}].map(e=>{let{title:t,data:n}=e;return(0,s.jsx)(c.A,{size:"small",children:(0,s.jsxs)(d.A,{direction:"vertical",children:[(0,s.jsx)(u.A.Text,{strong:!0,children:t}),(0,s.jsxs)(d.A,{style:{fontSize:10},children:[(0,s.jsx)(u.A.Text,{style:{fontSize:"inherit",width:30,display:"inline-block"},children:"Hash"}),(0,s.jsx)(h.A,{type:"vertical"}),(0,s.jsx)(u.A.Text,{type:"secondary",style:{fontSize:"inherit"},children:n.hash||"-"})]}),n.cloudManifestUrl?(0,s.jsx)(p.Ay,{type:"link",size:"small",style:{padding:0,fontSize:10},onClick:()=>window.open(n.cloudManifestUrl),children:"Open File"}):null]})},t)})}),children:(0,s.jsx)(a.A,{icon:(0,s.jsx)(g.A,{})})}),(0,s.jsx)(x.A,{title:(0,s.jsxs)(u.A.Text,{children:["Are you sure to",(0,s.jsx)(u.A.Text,{strong:!0,children:" re-upload "}),"json files for bundle diff?"]}),onConfirm:()=>{},okText:"Yes",cancelText:"Cancel",placement:"topLeft",trigger:"hover",children:(0,s.jsx)(a.A,{icon:(0,s.jsx)(f.A,{})})}),(0,s.jsx)(a.A.BackTop,{})]}),(0,s.jsx)(er,{baseline:e,current:t,onlyBaseline:n,assetsDiffResult:i}),(0,s.jsx)(m.A,{defaultActiveKey:"Overview",tabBarStyle:{marginBottom:y.or.BasePadding/3},items:[{label:"Overview",key:"Overview",children:(0,s.jsx)(es,{assetsDiffResult:i})},{label:"Assets",key:"Assets",children:(0,s.jsx)(ex,{outputFilename:e.outputFilename,baseline:e,current:t})},{label:"Modules",key:"Modules",children:(0,s.jsx)(J,{baseline:e,current:t,onlyBaseline:n,assetsDiffResult:i})},{label:"Packages",key:"Packages",children:(0,s.jsx)(el,{baseline:e.packageGraph,current:t.packageGraph})}].map(e=>({...e,label:(0,s.jsx)(u.A.Text,{strong:!0,children:e.label})}))})]})}})},ej=j.Kj.RsdoctorClientRoutes.BundleDiff,ey=()=>(0,s.jsx)(ef,{manifests:[]})},14296(e,t,n){n.d(t,{B:()=>y});var l=n(65723),r=n(94959),s=n(15248),i=n(83021),a=n(94042),o=n(29656),d=n(66287),c=n(66020),u=n(13078),h=n.n(u),p=n(22155),x=n(27618),m=n(71720),g=n(60338),f=n(8302);let j=(0,x.$N)();function y(e){let{module:t,moduleGraph:n,ranges:u,toLine:y,setEditorData:v,source:A}=e,b=(0,p.useRef)(),w=(0,p.useRef)([]),C=(0,p.useRef)([]),S=(0,p.useRef)(),k=(0,p.useRef)(!1),[N,M]=(0,p.useState)("");return((0,p.useEffect)(()=>{let{isPreferSource:e}=t;k.current=!0,M(A.source||e?A.source:A.transformed),setTimeout(()=>{var e,l;C.current=(null==(l=b.current)||null==(e=l.getModel())?void 0:e.deltaDecorations(C.current,(0,f.L1)(t,n)))??[]},200)},[t,A]),(0,p.useEffect)(()=>{function e(){var e;let t=null==(e=b.current)?void 0:e.getModel();t&&(w.current=t.deltaDecorations(w.current,u.map(e=>({range:(0,x.qK)(e,g.Q),options:{stickiness:1,inlineClassName:"tree-shaking-statement-side-effect",isWholeLine:!1,showIfCollapsed:!0}}))),b.current&&"number"==typeof y&&S.current!==y&&(S.current=y,b.current.revealLine(y,0)))}k?setTimeout(e,300):e(),k.current=!1},[u,y]),(0,p.useEffect)(()=>{let e=e=>{let t=(0,m.U1)(e.target);if(t){let e=n.getModuleById(t.module);e&&v(e,[t.range],t.range.start.line)}};return document.body.addEventListener("click",e),()=>{document.body.removeEventListener("click",e)}},[]),t)?(0,l.jsx)(a.A,{title:(0,l.jsx)(o.A,{title:t.path,children:(0,l.jsxs)(d.A,{children:[(0,l.jsx)(c.A.Text,{children:h().basename(t.path)}),(0,l.jsx)(r.A,{})]})}),className:"tree-shaking-editor",children:(0,l.jsx)(i.Ay,{theme:"vs-dark",language:(0,x.rZ)(t.path),value:N,loading:(0,l.jsx)(s.A,{style:{fontSize:30}}),options:j,onMount:e=>{b.current=e}})}):(0,l.jsx)("div",{children:"请选择要查看的模块"})}},71720(e,t,n){function l(e,t,n){return`<a data-href="data-module=${e}&data-range=${encodeURIComponent(JSON.stringify(t))}">${n}</a>`}function r(e){if("a"!==e.tagName.toLocaleLowerCase())return;let t=e.getAttribute("data-href")??"",n={module:-1,range:{start:{line:1,column:0},end:{line:1,column:0}}};for(let e of t.split("&")){let[t,l]=e.split("=");if("data-module"===t){n.module=Number.parseInt(l,10);continue}"data-range"===t&&(n.range=JSON.parse(decodeURIComponent(l)))}return n}n.d(t,{U1:()=>r,mJ:()=>l})},60338(e,t,n){function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Q:()=>r});class r{isEmpty(){return r.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return r.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber)&&!(t.lineNumber>e.endLineNumber)&&(t.lineNumber!==e.startLineNumber||!(t.column<e.startColumn))&&(t.lineNumber!==e.endLineNumber||!(t.column>e.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumber<e.startLineNumber)&&!(t.lineNumber>e.endLineNumber)&&(t.lineNumber!==e.startLineNumber||!(t.column<=e.startColumn))&&(t.lineNumber!==e.endLineNumber||!(t.column>=e.endColumn))}containsRange(e){return r.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber)&&!(t.endLineNumber<e.startLineNumber)&&!(t.startLineNumber>e.endLineNumber)&&!(t.endLineNumber>e.endLineNumber)&&(t.startLineNumber!==e.startLineNumber||!(t.startColumn<e.startColumn))&&(t.endLineNumber!==e.endLineNumber||!(t.endColumn>e.endColumn))}strictContainsRange(e){return r.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber)&&!(t.endLineNumber<e.startLineNumber)&&!(t.startLineNumber>e.endLineNumber)&&!(t.endLineNumber>e.endLineNumber)&&(t.startLineNumber!==e.startLineNumber||!(t.startColumn<=e.startColumn))&&(t.endLineNumber!==e.endLineNumber||!(t.endColumn>=e.endColumn))}plusRange(e){return r.plusRange(this,e)}static plusRange(e,t){let n,l,s,i;return t.startLineNumber<e.startLineNumber?(n=t.startLineNumber,l=t.startColumn):t.startLineNumber===e.startLineNumber?(n=t.startLineNumber,l=Math.min(t.startColumn,e.startColumn)):(n=e.startLineNumber,l=e.startColumn),t.endLineNumber>e.endLineNumber?(s=t.endLineNumber,i=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,i=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,i=e.endColumn),new r(n,l,s,i)}intersectRanges(e){return r.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,l=e.startColumn,s=e.endLineNumber,i=e.endColumn,a=t.startLineNumber,o=t.startColumn,d=t.endLineNumber,c=t.endColumn;return(n<a?(n=a,l=o):n===a&&(l=Math.max(l,o)),s>d?(s=d,i=c):s===d&&(i=Math.min(i,c)),n>s||n===s&&l>i)?null:new r(n,l,s,i)}equalsRange(e){return r.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return r.getEndPosition(this)}static getEndPosition(e){return new s(e.endLineNumber,e.endColumn)}getStartPosition(){return r.getStartPosition(this)}static getStartPosition(e){return new s(e.startLineNumber,e.startColumn)}toString(){return`[${this.startLineNumber},${this.startColumn} -> ${this.endLineNumber},${this.endColumn}]`}setEndPosition(e,t){return new r(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new r(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return r.collapseToStart(this)}static collapseToStart(e){return new r(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return r.collapseToEnd(this)}static collapseToEnd(e){return new r(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new r(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new r(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber)&&(e.endLineNumber!==t.startLineNumber||!(e.endColumn<t.startColumn))&&!(t.endLineNumber<e.startLineNumber)&&(t.endLineNumber!==e.startLineNumber||!(t.endColumn<e.startColumn))}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber)&&(e.endLineNumber!==t.startLineNumber||!(e.endColumn<=t.startColumn))&&!(t.endLineNumber<e.startLineNumber)&&(t.endLineNumber!==e.startLineNumber||!(t.endColumn<=e.startColumn))}static compareRangesUsingStarts(e,t){if(e&&t){let n=0|e.startLineNumber,l=0|t.startLineNumber;if(n===l){let n=0|e.startColumn,l=0|t.startColumn;if(n===l){let n=0|e.endLineNumber,l=0|t.endLineNumber;return n===l?(0|e.endColumn)-(0|t.endColumn):n-l}return n-l}return n-l}return!!e-!!t}static compareRangesUsingEnds(e,t){if(e.endLineNumber===t.endLineNumber)return e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn;return e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}toJSON(){return this}constructor(e,t,n,r){l(this,"startLineNumber",void 0),l(this,"startColumn",void 0),l(this,"endLineNumber",void 0),l(this,"endColumn",void 0),e>n||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}}class s{with(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lineNumber,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.column;return e===this.lineNumber&&t===this.column?this:new s(e,t)}delta(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.with(this.lineNumber+e,this.column+t)}equals(e){return s.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return s.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column}isBeforeOrEqual(e){return s.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column}static compare(e,t){let n=0|e.lineNumber,l=0|t.lineNumber;return n===l?(0|e.column)-(0|t.column):n-l}clone(){return new s(this.lineNumber,this.column)}toString(){return`(${this.lineNumber},${this.column})`}static lift(e){return new s(e.lineNumber,e.column)}static isIPosition(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column}toJSON(){return{lineNumber:this.lineNumber,column:this.column}}constructor(e,t){l(this,"lineNumber",void 0),l(this,"column",void 0),this.lineNumber=e,this.column=t}}},49815(e,t,n){n.d(t,{$:()=>i});var l=n(65723),r=n(94042),s=n(87417);function i(){return(0,l.jsx)(r.A,{title:"Tree Shaking Analysis",bodyStyle:{paddingTop:0},className:"tree-shaking-page",children:(0,l.jsx)(s.A,{style:{marginTop:30}})})}},36797(e,t,n){n.d(t,{oK:()=>b});var l=n(65723),r=n(29656),s=n(47748),i=n(32354),a=n(66287),o=n(66020),d=n(60503),c=n(36025),u=n(78172),h=n(22155),p=n(57474),x=n.n(p),m=n(30786),g=n(8302),f=n(98685);function j(e,t){if(!e)return(0,l.jsx)("div",{children:"Can not find declaration."});let{module:n}=e,i=n.isPreferSource?e.position.source:e.position.transformed;return(0,l.jsx)(r.A,{title:`${n.path}, line ${i.start.line}`,children:(0,l.jsx)(s.Ay,{type:"link",onClick:()=>t(n,[i],i.start.line),children:"Move To"})})}function y(e){let[t,n]=(0,h.useState)(""),[r,o]=(0,h.useState)(""),d=(0,h.useRef)(null),c=(e,t,l)=>{t(),n(e[0]),o(l)};return{filterDropdown:t=>{let{setSelectedKeys:r,selectedKeys:o,confirm:h,clearFilters:p,close:x}=t;return(0,l.jsxs)("div",{style:{padding:8},onKeyDown:e=>e.stopPropagation(),children:[(0,l.jsx)(i.A,{ref:d,placeholder:`Search ${e}`,value:o[0],onChange:e=>r(e.target.value?[e.target.value]:[]),onPressEnter:()=>c(o,h,e),style:{marginBottom:8,display:"block"}}),(0,l.jsxs)(a.A,{children:[(0,l.jsx)(s.Ay,{type:"primary",onClick:()=>c(o,h,e),icon:(0,l.jsx)(u.A,{}),size:"small",style:{width:90},children:"Search"}),(0,l.jsx)(s.Ay,{onClick:()=>p&&void(p(),n("")),size:"small",style:{width:90},children:"Reset"}),(0,l.jsx)(s.Ay,{type:"link",size:"small",onClick:x,children:"close"})]})]})},filterIcon:e=>(0,l.jsx)(u.A,{style:{color:e?"#1890ff":void 0}}),onFilter:(t,n)=>n[e].toString().toLowerCase().includes(t.toLowerCase()),render:n=>r===e?(0,l.jsx)(x(),{highlightStyle:{backgroundColor:"#ffc069",padding:0},searchWords:[t],autoEscape:!0,textToHighlight:n?n.toString():""}):n}}let v=e=>{let{module:t,moduleGraph:n,setEditorData:i}=e,u=(0,h.useMemo)(()=>n.getModuleGraphModule(t).getSideEffects(),[t]),p=u.map((e,n)=>{let{variable:l,name:r,identifier:s}=e;return{key:n,name:r,identifier:t.isPreferSource?s.position.source:s.position.transformed,declaration:null==l?void 0:l.identifier}}).sort((e,t)=>e.name===t.name?e.identifier.start.line>t.identifier.start.line?1:-1:e.name>t.name?1:-1).reduce((e,t)=>{let n=e[e.length-1];return n&&n.name===t.name?(n.children||(n.children=[]),n.children.push(t)):e.push(t),e},[]),x=[{title:"Name",dataIndex:"name",key:"name",align:"center",...y("name")},{title:"SideEffect",dataIndex:"identifier",key:"identifier",align:"center",render:e=>(0,l.jsx)(r.A,{title:`Current File line ${e.start.line}`,children:(0,l.jsx)(s.Ay,{type:"link",onClick:()=>i(t,[e],e.start.line),children:"Move To"})})},{title:"Declaration",dataIndex:"declaration",key:"declaration",align:"center",render:e=>j(e,i)}],g=(0,l.jsx)(h.Fragment,{children:(0,l.jsxs)(a.A,{style:{fontWeight:400},children:["Import",(0,l.jsx)(o.A.Text,{strong:!0,children:p.length}),"variables",(0,l.jsx)(d.A,{type:"vertical"}),(0,l.jsx)(o.A.Text,{strong:!0,children:u.length}),"sideEffects"]})});return(0,l.jsx)(m.Zp,{style:{marginBottom:10},title:g,className:"tree-shaking-export-table",children:(0,l.jsx)(c.A,{size:"small",dataSource:p,columns:x,pagination:!1,scroll:{y:600}})})},A=e=>{let{module:t,moduleGraph:n,setEditorData:i}=e,u=(0,h.useMemo)(()=>n.getModuleGraphModule(t).getExports(),[t]),p=u.filter(e=>0===e.getSideEffects().length),x=(0,l.jsxs)(h.Fragment,{children:[(0,l.jsxs)(a.A,{style:{fontWeight:400},children:["Export",(0,l.jsx)(o.A.Text,{strong:!0,children:u.length})]}),u.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.A,{type:"vertical"}),(0,l.jsxs)(o.A.Text,{style:{fontWeight:400},code:!0,children:[(0,l.jsx)(o.A.Text,{children:"Unused"}),(0,l.jsx)(d.A,{type:"vertical"}),(0,l.jsx)(o.A.Text,{strong:!0,children:p.length})]}),(0,l.jsx)(d.A,{type:"vertical"}),(0,l.jsxs)(o.A.Text,{style:{fontWeight:400},code:!0,children:[(0,l.jsx)(o.A.Text,{children:"Used"}),(0,l.jsx)(d.A,{type:"vertical"}),(0,l.jsx)(o.A.Text,{strong:!0,children:u.length-p.length})]})]}):""]}),v=u.map((e,t)=>{let{variable:n}=e;return{key:t,name:e.name,declaration:null==n?void 0:n.identifier,used:e.getSideEffects().map(e=>{let{module:t,identifier:n}=e,l=(null==t?void 0:t.isPreferSource)?n.position.source:n.position.transformed;if(t&&l)return{module:t,range:l}}).filter(f.isDef)}}),A=[{title:"Name",dataIndex:"name",key:"name",align:"center",...y("name")},{title:"Declaration",dataIndex:"declaration",key:"declaration",align:"center",render:e=>j(e,i)},{title:"Info",dataIndex:"used",key:"used",align:"center",sorter:(e,t)=>e.used.length-t.used.length,sortDirections:["descend","ascend"],render:e=>(0,l.jsxs)("span",{children:["Used ",e.length," times"]})}];return(0,l.jsx)(m.Zp,{title:x,className:"tree-shaking-export-table",children:(0,l.jsx)(c.A,{size:"small",dataSource:v,columns:A,pagination:!1,scroll:{y:600},expandable:{expandedRowRender:e=>(0,l.jsxs)("div",{className:"tree-shaking-side-effect-list",children:[(0,l.jsx)(o.A.Text,{children:"List of SideEffect:"}),e.used.map(e=>{let{module:t,range:n}=e;return(0,l.jsx)(r.A,{title:`${t.path}:${n.start.line}`,children:(0,l.jsx)(s.Ay,{className:"tree-shaking-side-effect-list-item",type:"link",onClick:()=>{i(t,[n],n.start.line)},children:`${(0,g.jx)(t.path)}:${n.start.line}`})},t.id)})]}),rowExpandable:e=>e.used.length>0}})})},b=e=>"side-effect"===e.kind?(0,l.jsx)(v,{...e}):(0,l.jsx)(A,{...e})},8302(e,t,n){n.d(t,{EV:()=>f,L1:()=>v,jx:()=>y,ut:()=>j});var l=n(65723),r=n(44751),s=n(66287),i=n(87655),a=n(66450),o=n(90549),d=n(13078),c=n.n(d),u=n(22155),h=n(27618),p=n(78899),x=n(98685),m=n(71720),g=n(60338);function f(e,t,n,a,o,d){return(0,u.useMemo)(()=>(0,x.createFileStructures)({files:e.map(e=>e.path),cwd:d,fileTitle(e,n){let a=t.getModules().find(t=>t.path===e&&t.kind===r.nV.kind.Normal),d=t.getModuleGraphModule(a),c=d.getExports().filter(e=>0===e.getSideEffects().length);return(0,l.jsxs)(s.A,{style:{wordBreak:"break-all"},children:[(0,l.jsx)(p.i,{text:n,keyword:e,onClick:()=>o(e)}),d.dynamic?(0,l.jsx)(i.A,{color:"cyan",children:"dynamic"}):"",c.length>0?(0,l.jsxs)(i.A,{color:"green",children:[c.length," Unused"]}):""]})}}),[n,a])}function j(e){return(0,x.mapFileKey)(e,3,e=>!((0,a.J)(e,"__RESOURCEPATH__").indexOf("/node_modules/")>-1))}function y(e){let t="",n=e;for(let e=0;e<3;e++)t=t?`${c().basename(n)}/${t}`:c().basename(n),n=c().dirname(n);return`...${t}`}function v(e,t){let n=t.getModuleGraphModule(e).getOwnExports(),l=n.map(e=>e.variable).filter(e=>!!e);if(0===n.length&&0===l.length)return[];let{isPreferSource:r}=e;return l.map(e=>{let t=r?e.identifier.position.source:e.identifier.position.transformed,n=t&&(0,h.qK)(t,g.Q);if(t&&n)return{range:n,options:{stickiness:1,inlineClassName:"tree-shaking-statement-declaration-identifier",isWholeLine:!1,showIfCollapsed:!0,hoverMessage:{supportHtml:!0,supportThemeIcons:!0,isTrusted:!0,value:function(e){let t=e.getExportInfo();if(!t)return"Can not find SideEffect info.";let n=t.getSideEffects();if(0===n.length)return"Have no sideEffect.";let l=`Used **${n.length}** times:
6
+
7
+ <div data-code="tree-shaking-hover">
8
+ <li>`;for(let e of n){if(!e)continue;let{identifier:t,module:n}=e;if(!n)continue;let{id:r,isPreferSource:s}=n,i=t.getLineCode();l+=`
9
+ <ol>
10
+ ${(0,m.mJ)(r,s?t.position.source:t.position.transformed,function(e,t){let{path:n,isPreferSource:l}=t,r=l?e.position.source.start:e.position.transformed.start,s=`:${r.line??1}:${r.column??0}`;return n.length<=30?`${n}${s}`:`...${n.substring(n.length-30)}${s}`}(t,n))}
11
+ ${i?`<pre>${(0,o.i)(i)}</pre>`:""}
12
+ </ol>`}return l+"\n</li></div>"}(e)}}}}).filter(e=>!!e)}},14415(e,t,n){n.d(t,{V:()=>g});var l=n(91888),r=n(22155),s=n(40799),i=n(66450);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class o{get(e){if(this.manifest)return this.manifest[e]}getData(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data",n=this.get(t);if(n)return n[e]}getKeys(e){return e.split(".")}joinKeys(e){return e.join(".")}dispose(){this.disposed=!0}limit(e,t){if(this.pool.has(e))return this.pool.get(e);let n=t().finally(()=>this.pool.delete(e));return this.pool.set(e,n),n}log(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];console.log(`[${this.constructor.name}]`,...t)}async loadManifest(){return this.manifest}constructor(e){a(this,"manifest",void 0),a(this,"pool",void 0),a(this,"loader",void 0),a(this,"disposed",void 0),a(this,"shardingDataMap",void 0),this.manifest=e,this.pool=new Map,this.disposed=!1,this.shardingDataMap=new Map,this.loader=new s.B_.APIDataLoader(this),console.log("[DataLoader] isLocal: ",this.isLocal())}}var d=n(37503);class c extends o{isLocal(){return!0}async loadData(e){return this.limit(e,async()=>{let[t,...n]=this.getKeys(e),r=this.getData(t);if(!r)return;let a=r;if(s._8.isShardingData(a)){if(!this.shardingDataMap.has(e)){let t=new Promise(t=>{(0,d.O)().emit(l.hp.ServerAPI.API.LoadDataByKey,{key:e},e=>{t(e.res)})});this.shardingDataMap.set(e,t)}return a=await this.shardingDataMap.get(e),this.shardingDataMap.delete(e),a}return n.length>0?(0,i.J)(a,this.joinKeys(n)):a})}async loadAPI(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[l,r]=t,s=r?`${l}_${JSON.stringify(r)}`:`${l}`,i=this.get("__SOCKET__PORT__")??"";return this.limit(s,async()=>new Promise(e=>{(0,d.O)(i).emit(l,r,t=>{e(t.res)})}))}dispose(){super.dispose(),this.events.forEach((e,t)=>{e.forEach(e=>{this.removeOnDataUpdate(t,e)}),e.clear()}),this.events.clear()}onDataUpdate(e,t){this.events.has(e)||this.events.set(e,new Set),this.events.get(e).has(t)||(this.events.get(e).add(t),(0,d.O)().on(e,t))}removeOnDataUpdate(e,t){(0,d.O)().off(e,t),this.events.get(e).delete(t)}constructor(...e){super(...e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"events",new Map)}}var u=n(20219);class h extends o{isLocal(){return!1}async loadData(e){return this.limit(e,async()=>{let[t,...n]=this.getKeys(e),l=this.getData(t,"cloudData");if(!l)return;let r=l;if(s._8.isShardingData(r)){if(!this.shardingDataMap.has(t)){let n=s._8.fetchShardingData(r,u.fZ).catch(t=>{throw this.log("loadData error: ",r,e),t});this.shardingDataMap.set(t,n)}r=await this.shardingDataMap.get(t)}return n.length>0?(0,i.J)(r,this.joinKeys(n)):r})}async loadAPI(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[l,r]=t,s=r?`${l}_${JSON.stringify(r)}`:`${l}`;return this.limit(s,async()=>this.loader.loadAPI(...t))}dispose(){super.dispose()}onDataUpdate(){}removeOnDataUpdate(){}}n(96307),n(10117);class p extends o{isLocal(){return!1}async loadData(e){console.log(`[loadData]-[key]: ${e}`);let[t]=this.getKeys(e);console.log(`[loadData]-[scope]: ${t}`);let n=this.getData(t);if(!n)return;let l=n;if(!this.shardingDataMap.has(t)){let e=this.parseData(l);this.shardingDataMap.set(t,Promise.resolve(e))}return await this.shardingDataMap.get(t)}getData(e){return console.log(`[getData]-[scope]: ${e}`),window[l.YM.WINDOW_RSDOCTOR_TAG][e]}parseData(e){if("object"==typeof e&&null!==e||"string"!=typeof e)return e;try{return JSON.parse(s.oG.decompressText(e))}catch{return e}}async loadAPI(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.loader.loadAPI(...t)}dispose(){super.dispose()}onDataUpdate(){}removeOnDataUpdate(){}}let x=new WeakMap;async function m(e){try{if(e.__LOCAL__SERVER__)return console.log("[LocalServerDataLoader]"),new c(e)}catch(e){console.log("[DataLoader] fallback to RemoteDataLoader")}return new h(e)}function g(e){let[t,n]=(0,r.useState)(void 0);return(0,r.useEffect)(()=>{window[l.YM.WINDOW_RSDOCTOR_TAG]&&(console.log("[brief mode]"),n(new p({data:[]})))},[]),(0,r.useEffect)(()=>{if(e){if(!x.has(e)){let t=m(e);x.set(e,t)}x.get(e).then(e=>{n(e)})}},[e]),{loader:t}}},92958(e,t,n){var l=n(25205),r=n(9858),s=n(96307);l.Ay.use(r.r9).init({lng:(0,s.U)(),resources:{en:{translations:{Overall:"Overall","Compile Analysis":"Compile Analysis","Bundle Alerts":"Bundle Alerts","Help Center":"Help Center",LoadersAnalysis:"Loaders Analysis","Loaders Timeline":"Loaders Timeline","Loaders Analysis":"Loaders Analysis","Rsdoctor Introduction":"Rsdoctor Introduction","Compilation Alerts":"Compilation Alerts","Plugins Analysis":"Plugins Analysis",PluginsAnalysis:"Plugins Analysis",ModuleResolve:"Module Resolve","Bundle Analysis":"Bundle Analysis",BundleSize:"Bundle Size",ViewBundleSize:"View Bundle Size","Module Graph":"Module Graph",TreeShaking:"Tree Shaking","Rule Index":"Rule Index",Resources:"Resources","Project Overall":"Project Overall","Compile Overall":"Compile Overall","Bundle Overall":"Bundle Overall","Expand Omitted":"By default, the reasons tree collapses to the middle of the module introduced by a third party. Click on this icon to view the full tree diagram","Concatenated Tag":"Concatenated Module,hover can display the name of the concatenated main module. Note: the bundled size of the concatenated module is zero, possibly because it is aggregated into the main module.","the file content not changed after transpiled by this loader":"the file content not changed after transpiled by this loader","Output Assets List":"Output Assets List","filter the output assets which size is greater than the input value":"filter the output assets which size is greater than the input value","filter the modules which size is greater than the input value":"filter the modules which size is greater than the input value","After Compile":"After Compile","After Bundle":"After Bundle",CodeModeExplain:"In lite mode or pure stats.json upload, only source code.",DuplicatePakCodeExplain:"There is no code, when in the case of pure stats.json.",AsyncLoaderInfo:"For async loaders, the time cost of each loader is not accurate. For example: mini-css-extract-plugin's loader.",Details:"Details",Expand:"Expand",Collapse:"Collapse"}},cn:{translations:{Overall:"概览","Compile Analysis":"编译分析","Bundle Alerts":"编译预警","Help Center":"帮助中心","Rsdoctor Introduction":"Rsdoctor 介绍","Compilation Alerts":"编译预警","Plugins Analysis":"Plugins 分析",LoadersAnalysis:"Loaders 分析","Loaders Timeline":"Loaders 概览","Loaders Analysis":"Loaders 分析",PluginsAnalysis:"Plugins 分析",ModuleResolve:"Module Resolve 分析","Bundle Analysis":"产物分析",BundleSize:"产物体积分析",ViewBundleSize:"查看包大小","Module Graph":"Module Graph",TreeShaking:"Tree Shaking","Rule Index":"错误索引信息",Resources:"资源","Project Overall":"项目信息概览","Compile Overall":"编译数据概览","Bundle Overall":"产物数据概览","Expand Omitted":" reasons 树会默认折叠中间的第三方引入的模块,点击这个图标可以查看完整树图","Concatenated Tag":"串联模块,hover 上去可以显示聚合成的主模块名称。注:聚合模块 bundled size 为零,有可能是因为被聚合到了主模块中。","the file content not changed after transpiled by this loader":"该文件内容在 loader 处理前后没有发生变化","Output Assets List":"产物文件列表","filter the output assets which size is greater than the input value":"筛选大小大于输入值的产物文件","filter the modules which size is greater than the input value":"筛选大小大于输入值的模块","After Compile":"编译后","After Bundle":"打包后",CodeModeExplain:"Lite 模式下或纯 stats.json 上传的情况下只有 source code.",DuplicatePakCodeExplain:"纯 stats.json 输入的情况下没有代码,可使用 Rsdoctor 插件参与构建会有对应代码。",AsyncLoaderInfo:"对于异步 loader,单个 loader 的耗时可能不准确。例如:mini-css-extract-plugin 的 loader。",Details:"详情",Expand:"展开",Collapse:"收起"}}},fallbackLng:{"zh-CN":["cn"],default:["en"]},debug:!1,ns:["translations"],defaultNS:"translations",keySeparator:!1,interpolation:{escapeValue:!1}})},47001(e,t,n){n.d(t,{ak:()=>s,xr:()=>l});let{findLoaderTotalTiming:l,getLoaderCosts:r}=n(40799).aH;function s(e,t,n,l,r,s){return(!n||-1!==e.indexOf(n))&&(!r||!s||r===s)&&(null==l||!l.length||!!l.includes(t))}},18679(e,t,n){n.d(t,{DP:()=>o,Ym:()=>a,an:()=>d,mB:()=>c});var l=n(22155),r=n(44751),s=n(17400),i=n(10117);function a(){return(0,l.useContext)(s.Q).locale}function o(){let{theme:e,setTheme:t}=(0,l.useContext)(s.Q),n=e===i.Sx.Dark;return{theme:e,setTheme:t,isDark:n,isLight:!n}}function d(){let{viewMode:e,setViewMode:t}=(0,l.useContext)(s.Q),{bundleAlerts:n,compileAlerts:r}=e;return{viewMode:e,setViewMode:t,setCompileAlertsViewMode(e){t({compileAlerts:e})},setBundleAlertsViewMode(e){t({bundleAlerts:e})},isCompileList:r===i.nE.List,isBundleList:n===i.nE.List}}function c(e){return(0,l.useMemo)(()=>r.dh.fromData(e),[e])}n(20219)},20219(e,t,n){n.d(t,{Cj:()=>c,fZ:()=>a});var l=n(76452),r=n(91888),s=n(40799);n(10117);var i=n(62975);async function a(e){return s.s0.isUrl(e)?l.A.get(e,{timeout:999999,responseType:"text"}).then(e=>e.data):e}async function o(e){let t=(await l.A.get(e,{timeout:3e4})).data;if("string"==typeof t){let e=t.trim();t=/^<!doctype html\b/i.test(e)||/^<html\b/i.test(e)?{}:JSON.parse(t)}return t}n(96307);let d=new Map;async function c(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:((e=window[r._8.RsdoctorManifestClientConstant.WindowPropertyForManifestUrl]?window[r._8.RsdoctorManifestClientConstant.WindowPropertyForManifestUrl]:(0,i.kJ)())||(e=r.hp.ServerAPI.API.Manifest),e);return d.has(t)||d.set(t,o(t).catch(e=>{throw d.delete(t),e})),await d.get(t)}},40686(e,t,n){n.d(t,{c:()=>r,r:()=>s});var l=n(91888);function r(e){return e.includes(l._8.RsdoctorManifestClientRoutes.WebpackLoaders)||e.includes(l._8.RsdoctorManifestClientRoutes.ModuleResolve)||e.includes(l._8.RsdoctorManifestClientRoutes.WebpackPlugins)}function s(e){return e.includes(l._8.RsdoctorManifestClientRoutes.BundleSize)||e.includes(l._8.RsdoctorManifestClientRoutes.ModuleGraph)||e.includes(l._8.RsdoctorManifestClientRoutes.TreeShaking)}},9919(e,t,n){function l(e){return e>=1e9?`${(e/1e9).toFixed(2)} GB`:e>=1e6?`${(e/1e6).toFixed(2)} MB`:e>=1e3?`${(e/1e3).toFixed(2)} KB`:e>1?`${e} bytes`:1===e?`${e} byte`:"0 bytes"}function r(e){return`${+e.toFixed(2)}%`}n.d(t,{X:()=>l,l:()=>r})},37503(e,t,n){n.d(t,{O:()=>o});var l=n(57734);let r=new Map,s=location.protocol.includes("https")?"wss":"ws",i=`${s}://${location.host}`,a=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;function o(e){let t=function(e){let{port:t,protocol:n,hostname:l}=e;if("u">typeof URL){let e=new URL("http://localhost");return e.port=String(t),e.hostname=l,e.protocol=location.protocol.includes("https")?"wss":"ws",a.test(l)||l.includes("localhost")?e.toString():`${n}//${l}`}let r=-1===n.indexOf(":")?":":"";return`${n}${r}//${l}:${t}`}({port:e,hostname:location.hostname,protocol:location.protocol});return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;if(!r.has(e)){let t=(0,l.io)(e,{});t.on("connect",()=>{console.log(`Socket Connect ${e}`)}),r.set(e,t)}return r.get(e)}(e?t:i)}},96307(e,t,n){n.d(t,{DT:()=>i,Kv:()=>a,R7:()=>p,U:()=>o,XX:()=>d,Yh:()=>x,ZI:()=>u,it:()=>h,oi:()=>c});var l=n(10117);function r(e){return window.localStorage.getItem(`__RSDOCTOR__STORAGE__${e}`)}function s(e,t){try{return window.localStorage.setItem(`__RSDOCTOR__STORAGE__${e}`,t),!0}catch(e){return console.error(e),!1}}function i(){return r("THEME")||l.Sx.Light}function a(e){s("THEME",e)}function o(){return r("LOCALE")||l.TM.En}function d(e){s("LOCALE",e)}function c(){let e={bundleAlerts:l.nE.List,compileAlerts:l.nE.List};try{let t=r("VIEWMODE");if(t)return JSON.parse(t)||e;return e}catch(t){return e}}function u(e){s("VIEWMODE",JSON.stringify(e))}function h(){return!!r("VIEWMODE")}function p(){return r("FIRST_VISIT")}function x(e){s("FIRST_VISIT",e)}},22679(e,t,n){n.d(t,{a4:()=>s});let{toFixedDigits:l,getUnit:r,formatCosts:s}=n(40799).gX},28306(){function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class t{setup(){this.worker.onmessage=e=>{let{data:t}=e;if(this.callbacks.has(t.id)){let e=this.callbacks.get(t.id);this.callbacks.delete(t.id),e(t.data)}}}createEventId(){return`${Date.now()}_${++this.timer}`}emit(e,t){var n;let l=this.createEventId();return this.callbacks.set(l,t),n={id:l,data:e},this.worker.postMessage(n),{abort:()=>this.callbacks.delete(l)}}dispose(){this.worker.terminate()}constructor(t){e(this,"worker",void 0),e(this,"timer",void 0),e(this,"callbacks",void 0),this.worker=t,this.timer=0,this.callbacks=new Map,this.setup()}}new class{detectWorker(e){if(this._workerMap.has(e))return this._workerMap.get(e);let n=new t(e());return this._workerMap.set(e,n),n}constructor(){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_workerMap",new WeakMap)}}},91888(e,t,n){n.d(t,{Kj:()=>M,YM:()=>T,_8:()=>A,hp:()=>S,jO:()=>N});var l,r,s,i,a,o,d,c,u,h,p,x,m,g,f,j,y,v={};v.d=(e,t)=>{for(var n in t)v.o(t,n)&&!v.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},v.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),v.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var A={};v.r(A),v.d(A,{RsdoctorManifestClientConstant:()=>R,RsdoctorManifestClientRoutes:()=>E}),v.r({}),v.r({}),v.r({});var b={};v.r(b),v.d(b,{ErrorLevel:()=>z});var w={};v.r(w),v.d(w,{LogLevel:()=>L});var C={};v.r(C),v.d(C,{API:()=>I,APIExtends:()=>F});var S={};v.r(S),v.d(S,{DependencyKind:()=>P,IMode:()=>$,ModuleKind:()=>D,ServerAPI:()=>C,StatementKind:()=>O,ToDataType:()=>B}),v.r({});var k={};v.r(k),v.d(k,{Severity:()=>z});var N={};v.r(N),v.d(N,{RsdoctorRuleClientConstant:()=>Q,RuleErrorMap:()=>K,RuleMessageCategory:()=>q,RuleMessageCodeEnumerated:()=>U}),v.r({});var M={};v.r(M),v.d(M,{RsdoctorClientDiffState:()=>J,RsdoctorClientRoutes:()=>Y,RsdoctorClientUrlQuery:()=>Z});var T={};v.r(T),v.d(T,{BundleExtension:()=>ee,CSSExtension:()=>en,FontExtensions:()=>ei,HtmlExtension:()=>el,ImgExtensions:()=>er,JSExtension:()=>X,JSExtensions:()=>et,MapExtensions:()=>ea,MediaExtensions:()=>es,RsdoctorClientUrl:()=>eg,RsdoctorMonitorDocBId:()=>ex,RsdoctorMonitorNodeBId:()=>eh,RsdoctorMonitorWebBId:()=>ep,RsdoctorOutputFolder:()=>eo,RsdoctorOutputManifest:()=>ed,RsdoctorOutputManifestPath:()=>ec,RsdoctorProcessEnvDebugKey:()=>em,StatsFilePath:()=>eu,WINDOW_RSDOCTOR_TAG:()=>ef}),v.r({}),v.r({});var E=((l={}).Overall="Overall",l.WebpackLoaders="Compile.WebpackLoaders",l.ModuleResolve="Compile.ModuleResolve",l.WebpackPlugins="Compile.WebpackPlugins",l.BundleSize="Bundle.BundleSize",l.ModuleGraph="Bundle.ModuleGraph",l.TreeShaking="Bundle.TreeShaking",l),R=((r={}).WindowPropertyForManifestUrl="__DEVTOOLS_MANIFEST_URL__",r),z=((s={})[s.Ignore=0]="Ignore",s[s.Warn=1]="Warn",s[s.Error=2]="Error",s),L=((i={})[i.Silent=0]="Silent",i[i.Error=1]="Error",i[i.Warning=2]="Warning",i[i.Info=3]="Info",i[i.Debug=4]="Debug",i[i.Verbose=5]="Verbose",i),P=((a={})[a.Unknown=0]="Unknown",a[a.ImportStatement=1]="ImportStatement",a[a.DynamicImport=2]="DynamicImport",a[a.RequireCall=3]="RequireCall",a[a.AMDRequire=4]="AMDRequire",a),D=((o={})[o.Normal=0]="Normal",o[o.Concatenation=1]="Concatenation",o),B=((d={})[d.NoCode=0]="NoCode",d[d.Normal=1]="Normal",d[d.NoSource=2]="NoSource",d[d.NoSourceAndAssets=3]="NoSourceAndAssets",d[d.All=4]="All",d),I=((c={}).ApplyErrorFix="/api/apply/error/fix",c.Env="/api/env",c.EntryHtml="/index.html",c.Manifest="/api/manifest.json",c.LoadDataByKey="/api/data/key",c.SendAPIDataToClient="/api/socket/send",c.GetProjectInfo="/api/project/info",c.GetClientRoutes="/api/routes",c.ReportLoader="/api/loader/report",c.GetLoaderNames="/api/loader/names",c.GetLoaderChartData="/api/loader/chart/data",c.GetLoaderFileTree="/api/loader/filetree",c.GetLoaderFileDetails="/api/loader/file",c.GetLoaderFolderStatistics="/api/loader/folder/statics",c.GetLoaderFileFirstInput="/api/loader/input",c.GetLoaderFileInputAndOutput="/api/loader/inputandoutput",c.GetDirectoriesLoaders="/api/loader/directories",c.ReportSourceMap="/api/sourcemap/report",c.GetResolverFileTree="/api/resolver/filetree",c.GetResolverFileDetails="/api/resolver/file",c.GetPluginSummary="/api/plugins/summary",c.GetPluginData="/api/plugins/data",c.GetSummaryBundles="/api/graph/bundles/summary",c.GetChunkGraph="/api/graph/chunks/graph",c.GetAssetsSummary="/api/graph/assets/summary",c.GetAssetDetails="/api/graph/asset/details",c.GetChunksByModuleId="/api/graph/chunk/module",c.GetModuleDetails="/api/graph/module/details",c.GetModulesByModuleIds="/api/graph/modules/ids",c.GetEntryPoints="/api/graph/entrypoints",c.GetModuleCodeByModuleId="/api/graph/module/code",c.GetModuleCodeByModuleIds="/api/graph/module/codes",c.GetAllModuleGraph="/api/graph/module/all",c.GetAllChunkGraph="/api/graph/chunk/all",c.GetLayers="/api/graph/layers",c.GetSearchModules="/api/search/modules",c.GetSearchModuleInChunk="/api/search/chunk/modules",c.GetAllModuleGraphFilter="/api/graph/module/filter",c.GetModuleByName="/api/graph/module/name",c.GetModuleIssuerPath="/api/graph/module/issuer_path",c.GetPackageInfo="/api/package/info",c.GetPackageDependency="/api/package/dependency",c.GetPackageRelationAlertDetails="/api/alerts/details/package/relation",c.GetOverlayAlerts="/api/alerts/overlay",c.GetBundleAlerts="/api/alerts/bundle",c.BundleDiffManifest="/api/bundle_diff/manifest.json",c.GetBundleDiffSummary="/api/bundle_diff/summary",c.GetChunkGraphAI="/api/graph/chunks/graph/ai",c.GetChunkByIdAI="/api/graph/chunk/id/ai",c),F=((u={}).GetCompileProgress="/api/progress",u),O=((h={})[h.ImportDefault=100]="ImportDefault",h[h.ImportNamed=101]="ImportNamed",h[h.ImportDefaultWithNamed=102]="ImportDefaultWithNamed",h[h.ImportDefaultWithNamespace=103]="ImportDefaultWithNamespace",h[h.ImportNamespace=104]="ImportNamespace",h[h.ImportSideEffect=105]="ImportSideEffect",h[h.ImportDynamic=106]="ImportDynamic",h[h.ExportDeclaration=200]="ExportDeclaration",h[h.ExportList=201]="ExportList",h[h.ExportDefault=202]="ExportDefault",h[h.ExportAggregating=203]="ExportAggregating",h[h.ExportNamespace=204]="ExportNamespace",h[h.RequireCall=300]="RequireCall",h[h.RequireName=301]="RequireName",h[h.RequireExports=302]="RequireExports",h[h.RequireExportAggregating=303]="RequireExportAggregating",h[h.RequireExportName=304]="RequireExportName",h[h.Unknown=999]="Unknown",h),$=((p={}).brief="brief",p.lite="lite",p.normal="normal",p);let G={code:"E1001",title:"Duplicate Packages",type:"markdown",category:"bundle",description:`
13
+ #### Description
14
+
15
+ There is a same name package which is bundled in multiple versions in your application.
16
+
17
+ This negatively impacts the bundle size of your application.
18
+
19
+ #### General Solution
20
+
21
+ Add an entry in \`resolve.alias\` to configure Webpack to route any package references to a single specified path.
22
+
23
+ For example, if \`lodash\` is duplicated in your bundle, the following configuration would make all Lodash imports refer to the \`lodash\` instance found at \`./node_modules/lodash\`:
24
+
25
+ \`\`\`js
26
+ {
27
+ alias: {
28
+ lodash: path.resolve(__dirname, 'node_modules/lodash')
29
+ }
30
+ }
31
+ \`\`\`
32
+ `},_={code:"E1002",title:"Cross Chunks Packages",type:"markdown",category:"bundle",description:`
33
+ #### Description
34
+
35
+ There is a package with the same version that is duplicated across different chunks in your application. This redundancy increases the overall bundle size, which is not optimal for performance.
36
+
37
+ #### General Solution
38
+
39
+ To address this issue, you can use Rspack's **SplitChunksPlugin** to extract common dependencies into a separate chunk. This ensures that the same package is not duplicated across multiple chunks, thereby reducing the bundle size.
40
+
41
+ For example, if **lodash** is being duplicated across different chunks, you can configure the **optimization.splitChunks** option in your Webpack configuration to extract **lodash** into a separate chunk:
42
+
43
+ \`\`\`
44
+ module.exports = {
45
+ optimization: {
46
+ splitChunks: {
47
+ cacheGroups: {
48
+ commons: {
49
+ test: /[\\/]node_modules[\\/]lodash[\\/]/,
50
+ name: 'lodash',
51
+ chunks: 'all',
52
+ },
53
+ },
54
+ },
55
+ },
56
+ };
57
+ \`\`\`
58
+
59
+ This configuration will automatically split out common dependencies (including those from \`node_modules\`) into separate chunks, ensuring that no package is duplicated across different chunks.
60
+ `},W={code:"E1003",title:"Loader Performance Optimization",type:"markdown",category:"compile",description:`
61
+ #### Description
62
+
63
+ Usually the slow compile of most projects is due to the slow execution of the loaders.
64
+
65
+ And the loaders always pre-process many unnecessary files, such as \`node_modules files\` and \`already compiled files\`.
66
+
67
+ #### General Solution
68
+
69
+ Set \`exclude\` to the \`module.rules\` of webpack configuration for target loader.
70
+
71
+ For example, if \`node_modules/lodash\` is processed by the \`babel-loader\` that make the compile slowly:
72
+
73
+ \`\`\`
74
+ {
75
+ module: {
76
+ rules: [
77
+ {
78
+ test: /\\.js$/,
79
+ use: 'babel-loader',
80
+ exclude: [
81
+ /node_modules\\/lodash/
82
+ ]
83
+ }
84
+ ]
85
+ }
86
+ }
87
+ \`\`\`
88
+ `},V={code:"E1004",title:"ECMA Version Check",type:"markdown",category:"bundle",description:`
89
+ #### Description
90
+
91
+ Detect if there is a newer version of ECMA syntax in the js bundle file
92
+ `},H={code:"E1005",title:"Default Import Check",type:"markdown",category:"compile",description:`
93
+ #### Description
94
+
95
+ Usually webpack will automatically compatible different modules that has different types, but in a special case, the operation of compatibility will fail.
96
+ That is, when you use \`Default Import\` to import a cjs module, and this cjs module do not have the compatible statement, such as \`exports.default = \`.
97
+
98
+ #### General Solution
99
+
100
+ 1. for cjs module, write a \`exports.default = \` statement for default export.
101
+ 2. use \`Namespace Import\` for import the cjs module.
102
+
103
+ For example, for the package \`htmlparser2@7.2.0\`:
104
+
105
+ \`\`\`ts
106
+ // you should use this
107
+ import * as Parser from 'htmlparser2';
108
+
109
+ // can not use this
110
+ import Parser from 'htmlparser2';
111
+ \`\`\`
112
+ `};var U=((x={}).Extend="EXTEND",x.Overlay="OVERLAY",x),q=((m={}).Compile="compile",m.Bundle="bundle",m.EMO="emo",m);let K={E1001:G,E1002:_,E1003:W,E1004:V,E1005:H,E1006:{code:"E1006",title:"Module Mixed Chunks",type:"markdown",category:"bundle",description:"\n#### Description\n\nWhen a module is included in both **initial chunks** and **async chunks**, the same module code is bundled into multiple chunks, increasing output size and potentially affecting first-screen load and cache efficiency.\n\n- **Initial chunks**: Chunks loaded with the main entry (e.g. entry points, synchronous `import` in the main bundle).\n- **Async chunks**: Chunks loaded on demand via dynamic `import()` or similar.\n\nIn the **Module Mixed Chunks** tab of Bundle Alerts, each entry shows the module path, **Initial Chunks** list, and **Async Chunks** list so you can locate duplicated modules.\n\n#### Common Causes\n\n- **Same module referenced in two ways**: The module is both synchronously imported in the main bundle or entry and dynamically `import()`ed elsewhere, so the bundler emits it in both initial and async chunks.\n- **A file is both an entry and an async chunk**: e.g. a utility module is configured as an entry and also `import()`ed in app code, so it appears in the entry's initial chunk and in a dynamically loaded async chunk.\n- **splitChunks overlapping with entry**: A path is split into an async chunk via `splitChunks` / `chunkSplit`, but that path is also an entry or a main-bundle dependency, leading to mixed chunk types.\n\n#### General Solution\n\n1. **Use a single import style**: Prefer one way to reference a module—either all synchronous imports (initial) or all dynamic `import()` (async). Avoid the same file being both synchronously imported in the main bundle and dynamically imported elsewhere.\n2. **Review entry vs dynamic loading**: If a file is both an entry and part of an async chunk, remove one of those usages or extract it into a single shared chunk via build config so both initial and async chunks reference it instead of duplicating it.\n3. **Adjust splitChunks**: Check rules for that module path in `optimization.splitChunks` (Rspack/Webpack) or `performance.chunkSplit` (Rsbuild), and avoid the same module being split into both initial and async chunks. Use `chunks: 'async'` or `chunks: 'initial'` where appropriate, or control which chunk type it goes into via `cacheGroups` and `test` / `chunks`.\n4. **Trace dependencies**: From the reported module path and chunk list, search the codebase for references to that module, distinguish sync vs dynamic imports, then converge to a single chunk type or extract a common chunk.\n"}};var Q=((g={}).UrlQueryForErrorCode="code",g),Z=((f={}).BundleDiffFiles="__bundle_files__",f.ManifestFile="manifest",f.EnableRoutes="enableRoutes",f),Y=((j={}).Home="/",j.Overall="/overall",j.WebpackLoaderOverall="/webpack/loaders/overall",j.WebpackLoaderAnalysis="/webpack/loaders/analysis",j.ModuleResolve="/module/resolve",j.WebpackPlugins="/webpack/plugins",j.BundleSize="/bundle/size",j.ModuleAnalyze="/module/analyze",j.TreeShaking="/treeshaking",j.BundleDiff="/resources/bundle/diff",j.RuleIndex="/resources/rules",j.Uploader="/resources/uploader",j.EmoCheck="/emo/check",j),J=((y={}).Equal="-",y.Up="UP",y.Down="DOWN",y);let X=".js",ee=".bundle",et=[X,ee],en=".css",el=".html",er=[".png",".jpg",".svg",".webp",".jpeg",".gif",".bmp"],es=[".mp3",".mp4",".avi",".wav",".flv",".mov",".mpg",".mpeg"],ei=[".ttf",".fnt",".fon",".otf",".woff",".woff2"],ea=[".js.map",".css.map",".ts.map",".LICENSE.txt"],eo=".rsdoctor",ed="manifest.json",ec=`${eo}/${ed}`,eu="dist/stats.json",eh="Rsdoctor",ep="Rsdoctor-Client",ex="Rsdoctor-Doc",em="rsdoctor",eg="",ef="__RSDOCTOR__"},76554(e,t,n){n.d(t,{PZ:()=>u,kB:()=>c,vF:()=>o});var l=n(97142),r=n.n(l),s=n(66963),i=n(91888),a=n(85409);let o=(0,s.h)();o.override({log:e=>{console.log(`${r().green("[RSDOCTOR LOG]")} ${e}`)},info:e=>{console.log(`${r().yellow("[RSDOCTOR INFO]")} ${e}`)},warn:e=>{console.warn(`${r().yellow("[RSDOCTOR WARN]")} ${e}`)},start:e=>{console.log(`${r().green("[RSDOCTOR START]")} ${e}`)},ready:e=>{console.log(`${r().green("[RSDOCTOR READY]")} ${e}`)},error:e=>{console.error(`${r().red("[RSDOCTOR ERROR]")} ${e}`)},success:e=>{console.error(`${r().green("[RSDOCTOR SUCCESS]")} ${e}`)},debug:e=>{a.env.DEBUG&&console.log(`${r().blue("[RSDOCTOR DEBUG]")} ${e}`)}});let d=new Map;function c(e){a.env.DEBUG!==i.YM.RsdoctorProcessEnvDebugKey||d.has(e)||d.set(e,Date.now())}function u(e){if(a.env.DEBUG!==i.YM.RsdoctorProcessEnvDebugKey)return;let t=d.get(e);if(null==t)return void s.v.debug(`Timer '${e}' does not exist.`);let n=Date.now()-t;s.v.debug(`Timer '${e}' ended: ${n}ms`),d.delete(e)}},50902(){},3710(){},39980(){}}]);