@rsdoctor/client 1.3.3 → 1.3.4

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.
@@ -0,0 +1,81 @@
1
+ (()=>{"use strict";var e,t,r,s,n,i,a={21254:function(e,t,r){var s=r(65723);r(19023);var n=r(3149);r(22155);var i=r(128),a=r(61323),l=r(85892);function o(){let e=[{path:l._y.wE,element:(0,s.jsx)(l._y.YW,{})},{path:l.hK.wE,element:(0,s.jsx)(l.hK.YW,{})},{path:l.FO.wE,element:(0,s.jsx)(l.FO.YW,{})},{path:l.dn.wE,element:(0,s.jsx)(l.dn.YW,{})},{path:l.pI.wE,element:(0,s.jsx)(l.pI.YW,{})},{path:l.PR.wE,element:(0,s.jsx)(l.PR.YW,{})},{path:l.s0.wE,element:(0,s.jsx)(l.s0.BU,{})}].filter(e=>!!e);return(0,s.jsxs)(a.BV,{children:[(0,s.jsx)(a.qh,{path:"/",element:(0,s.jsx)(l.wm.YW,{})}),(0,s.jsx)(a.qh,{path:l.wm.wE,element:(0,s.jsx)(l.wm.YW,{})}),e.map(e=>(0,s.jsx)(a.qh,{path:e.path,element:e.element},e.path)),(0,s.jsx)(a.qh,{path:l.aD.wE,element:(0,s.jsx)(l.aD.YW,{})}),(0,s.jsx)(a.qh,{path:l.d9.wE,element:(0,s.jsx)(l.d9.YW,{})})]})}var d=r(49914),c=r(31448),u=r(58997);r(88880);let h=document.getElementById("root");u.createRoot(h).render((0,s.jsx)(()=>{let e=(0,i.useDetectIfCloudIdeEnv)();return(0,s.jsx)(d.A,{router:(0,s.jsx)(o,{}),renderFailState:()=>{let e=(0,i.getDemoUrl)();return e?(0,s.jsxs)(c.A.Text,{style:{fontSize:16},children:["or you can open the",(0,s.jsx)(c.A.Text,{strong:!0,style:{fontSize:"inherit"},children:(0,s.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",children:"demo"})}),"to get started with the Rsdoctor."]}):null},extraContent:e&&(0,s.jsx)(n.A,{message:"Warning",description:(0,s.jsx)("a",{href:window.location.href.replace(/https/,"http"),children:`Please jump to:${window.location.href.replace(/https/,"http")}`}),type:"warning",showIcon:!0,closable:!0})})},{}));let p=document.createElement("link");p.setAttribute("type","image/x-icon"),p.setAttribute("rel","icon"),p.setAttribute("href","https://assets.rspack.rs/rsdoctor/rsdoctor-logo-960x960.png"),document.head.appendChild(p)},56108:function(e,t,r){r.d(t,{A:()=>n});var s=r(65723);r(22155);let n=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,s.jsx)("rect",{width:16,height:16,fill:"#FFF7E6",rx:2}),(0,s.jsx)("g",{clipPath:"url(#total-size_svg__a)",children:(0,s.jsx)("path",{fill:"#F2793D",d:"m2.5 5.77 5.026 2.534V13.5L2.5 11.011zm11-.016v5.23l-1.775.881-1.508.747-1.685.854V8.254zM8 2.5l4.902 2.472L7.999 7.45 3.04 4.961z"})}),(0,s.jsx)("defs",{children:(0,s.jsx)("clipPath",{id:"total-size_svg__a",children:(0,s.jsx)("path",{fill:"#fff",d:"M2 2h12v12H2z"})})})]})},1024:function(e,t,r){r.d(t,{m:()=>h});var s=r(65723),n=r(22155),i=r(83397),a=r(128),l=r(54995),o=r(70054),d=r(43928),c=r(23995),u=r(17086);let h=(0,o.eN)({api:i.SDK.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{filter:t,project:r}=e,{errors:i,root:o}=r,{setBundleAlertsViewMode:h,viewMode:p,setViewMode:m}=(0,a.useViewMode)(),{t:f}=(0,a.useI18n)(),g=t?i.filter(t):i;return(0,n.useEffect)(()=>{(0,a.hasViewModeFromStorage)()||m({bundleAlerts:i.length>=5?d.nE.Group:d.nE.List},!1)},[]),(0,s.jsx)(u.Ay,{theme:{components:{Alert:{colorInfoBg:"#e6f4ff57",colorInfoBorder:"none"}},token:{padding:16,colorText:"rgba(0, 0, 0, 0.85)"}},children:(0,s.jsx)(l.J,{title:f("Bundle Alerts"),dataSource:g,extraData:{cwd:o,getPackageRelationContentComponent:e=>(0,s.jsx)(c.rU,{body:{id:e.data.id,target:e.package.target},cwd:o})},viewMode:p.bundleAlerts,setViewMode:h,cwd:o})})}})},39009:function(e,t,r){r.d(t,{Bq:()=>u,QR:()=>p,Wy:()=>f,iv:()=>h,kr:()=>m});var s=r(32792),n=r(4171),i=r.n(n),a=r(19139),l=r(63935),o=r(128);r(65704);var d=r(90989),c=r(22155);function u(e){return`
2
+ <div class="loader-tooltip-container">
3
+ <div class="loader-tooltip-title">${e.loader}</div>
4
+ <li class="loader-tooltip-item">
5
+ <span>isPitch</span>
6
+ <span>${e.isPitch}</span>
7
+ </li>
8
+ ${e.layer&&"undefined"!==e.layer?`<li class="loader-tooltip-item">
9
+ <span>layer</span>
10
+ <span>${e.layer}</span>
11
+ </li>`:""}
12
+ <li class="loader-tooltip-item">
13
+ <span>duration</span>
14
+ <span class="loader-tooltip-text-bold">${(0,o.formatCosts)(e.costs)}</span>
15
+ </li>
16
+ <li class="loader-tooltip-item">
17
+ <span>filepath</span>
18
+ <span>${e.resource}</span>
19
+ </li>
20
+ <li class="loader-tooltip-item">
21
+ <span>start</span>
22
+ <span class="loader-tooltip-text-bold">${i()(e.startAt).format("YYYY/MM/DD HH:mm:ss")}</span>
23
+ </li>
24
+ <li class="loader-tooltip-item">
25
+ <span>end</span>
26
+ <span class="loader-tooltip-text-bold">${i()(e.endAt).format("YYYY/MM/DD HH:mm:ss")}</span>
27
+ </li>
28
+ </div>
29
+ `.trim()}function h(e,t,r){let n=t=>t.loader===e,d=t.filter(n),c=d.map(e=>e.resource),u=c.filter(e=>e.includes("/node_modules/")),h=c.filter(e=>!e.startsWith(r)),p=(0,a.w)(d,e=>e.startAt).startAt,m=(0,l.S)(d,e=>e.endAt).endAt,f=s.aH.getLoadersCosts(n,t);return`
30
+ <div class="loader-tooltip-container">
31
+ <div class="loader-tooltip-title">${e}</div>
32
+ <li class="loader-tooltip-item">
33
+ <span>files</span>
34
+ <span class="loader-tooltip-text-bold">${c.length}</span>
35
+ </li>
36
+ <li class="loader-tooltip-item">
37
+ <span>files(node_modules)</span>
38
+ <span class="loader-tooltip-text-bold">${u.length}</span>
39
+ </li>
40
+ <li class="loader-tooltip-item">
41
+ <span>files(outside the cwd)</span>
42
+ <span class="loader-tooltip-text-bold">${h.length}</span>
43
+ </li>
44
+ <li class="loader-tooltip-item">
45
+ <span>duration(estimated)</span>
46
+ <span class="loader-tooltip-text-bold">${(0,o.formatCosts)(f)}</span>
47
+ </li>
48
+ <li class="loader-tooltip-item">
49
+ <span>start(min)</span>
50
+ <span>${i()(p).format("YYYY/MM/DD HH:mm:ss")}</span>
51
+ </li>
52
+ <li class="loader-tooltip-item">
53
+ <span>end(max)</span>
54
+ <span>${i()(m).format("YYYY/MM/DD HH:mm:ss")}</span>
55
+ </li>
56
+ </div>
57
+ `.trim()}function p(e){return function e(t){return t.reduce((t,r)=>{if(r.c){let s=e(r.c);t.push({name:r.n,ph:d.a.BEGIN,pid:r.p,ts:r.s,args:r},...s,{name:r.n,ph:d.a.END,pid:r.p,ts:r.e,args:r})}else t.push({name:r.n,ph:d.a.BEGIN,pid:r.p,ts:r.s,args:r}),t.push({name:r.n,ph:d.a.END,pid:r.p,ts:r.e,args:r});return t},[])}(Object.entries(e.sort((e,t)=>e.s-t.s).reduce((e,t)=>{let r=e[t.p];return r?function(e,t){let r=[e];for(;r.length>0;){let e,s=r.shift()||[];if(0===s.length)return;let n=s[s.length-1];if(n.e<=t.s)return s.push(t);for(let t=s.length-1;t>=0;t--){let{c:r}=s[t];r&&(e=r)}e?r.push(e):n.c=[t]}}(r,t):e[t.p]=[t],e},{})).reduce((e,t)=>{let[r,s]=t;return e.push(...s),e},[]))}function m(e){let{ext:t}=e.data;return`
58
+ <div class="loader-tooltip-container">
59
+ <div class="loader-tooltip-title">[${t.args.p}] ${t.args.n}</div>
60
+ <li class="loader-tooltip-item">
61
+ <span>hook</span>
62
+ <span>${t.args.p}</span>
63
+ </li>
64
+ <li class="loader-tooltip-item">
65
+ <span>tap name</span>
66
+ <span>${t.args.n}</span>
67
+ </li>
68
+ <li class="loader-tooltip-item">
69
+ <span>start</span>
70
+ <span>${i()(t.args.s).format("YYYY/MM/DD HH:mm:ss")}</span>
71
+ </li>
72
+ <li class="loader-tooltip-item">
73
+ <span>end</span>
74
+ <span>${i()(t.args.e).format("YYYY/MM/DD HH:mm:ss")}</span>
75
+ </li>
76
+ <li class="loader-tooltip-item">
77
+ <span>duration</span>
78
+ <span>${(0,o.formatCosts)(t.args.e-t.args.s)}</span>
79
+ </li>
80
+ </div>
81
+ `.trim()}function f(e,t){let[r,s]=(0,c.useState)(e);return(0,c.useEffect)(()=>{let r=setTimeout(()=>s(e),t);return()=>clearTimeout(r)},[e,t]),r}},54241:function(e,t,r){r.d(t,{U:()=>v});var s=r(65723),n=r(83397),i=r(63079),a=r(8879),l=r(98369),o=r(31448),d=r(46941),c=r(37622),u=r(22155),h=r(14006),p=r.n(h),m=r(128),f=r(70054),g=r(1361),y=r(11771),x=r(83912),A=r(32792);let v=(0,f.eN)({Component:e=>{let{defaultKeys:t,configs:r}=e,n=(0,m.useWebpackConfigurationByConfigs)(r||[]);if(!n)return null;let{config:h,version:f,name:v}=n,S=Object.keys(h),[j,D]=(0,u.useState)(t||S);return(0,s.jsxs)(g.hX,{text:(0,s.jsxs)("div",{className:x.A.title,children:[(0,s.jsx)("span",{style:{marginRight:"8px",fontSize:"13px"},children:"View Bundler Config"}),(0,s.jsx)(c.A,{style:{fontSize:"10px"}})]}),children:[(0,s.jsxs)(i.A,{children:[(0,s.jsx)(y.h,{text:"Bundler Config Viewer"}),(0,s.jsx)(a.A,{}),(0,s.jsxs)(l.A,{children:[(0,s.jsx)(o.A.Text,{children:"Properties: "}),(0,s.jsx)(d.A,{dropdownStyle:{zIndex:999},mode:"multiple",allowClear:!0,value:j.length===S.length?[]:j,style:{width:350},popupMatchSelectWidth:!0,placeholder:"Show Selected Properties Only.",onChange:e=>{D(e)},children:S.map(e=>(0,s.jsx)(d.A.Option,{label:e,value:e,children:e},e))})]}),(0,s.jsx)(a.A,{})]}),(0,s.jsx)(p(),{name:f&&"unknown"!==f?`${v}@${f}`:"webpack.config",theme:"monokai",src:0===j.length?h:A.AP.pick(h,j),displayDataTypes:!1,displayObjectSize:!1,style:{overflowX:"auto"}})]})},api:n.SDK.ServerAPI.API.LoadDataByKey,responsePropName:"configs",body:{key:"configs"},showSkeleton:!1})},51002:function(e,t,r){r.d(t,{e:()=>m,z:()=>p});var s=r(65723),n=r(83397),i=r(64430),a=r(12772),l=r(22155),o=r(92523),d=r(128),c=r(43928),u=r(71623),h=r(32792);let p=e=>{let{manifestLoader:t=d.fetchManifest,api:r,children:p,body:m=null,showSkeleton:f=!0,fallbackComponent:g}=e,[y,x]=(0,l.useState)(),[A,v]=(0,l.useState)(c.nl.Pending),[S,j]=(0,l.useState)({}),{loader:D}=(0,d.useDataLoader)(y);function M(e){window[n.Constants.WINDOW_RSDOCTOR_TAG]?P(e):t().then(e=>{x(e)}).catch(e=>{throw v(c.nl.Fail),e}).then(()=>{P(e)})}let I=(0,l.useCallback)(e=>{let{req:t,res:s}=e;t.api===r&&((0,o.n)(t.body,m)||h.AP.isNil(t.body)&&h.AP.isNil(m))&&!(0,o.n)(S,s)&&j(s),v(c.nl.Success)},[S,r,m]);function P(e){e&&(Object.values(n.SDK.ServerAPI.APIExtends).includes(r)?v(c.nl.Success):e.loadAPI(r,m).then(e=>{h.AP.isNil(e)||(j(e),v(c.nl.Success))}).catch(e=>{console.error(e),v(c.nl.Fail)}))}return((0,l.useEffect)(()=>{M(D)},[D,r,m]),(0,l.useEffect)(()=>{if(D)return D.onDataUpdate(r,I),()=>{D.removeOnDataUpdate(r,I)}},[D,r,m]),A===c.nl.Pending)?f?(0,s.jsx)(i.A,{active:!0}):null:A===c.nl.Fail?g||(0,s.jsx)(u.c,{retry:()=>{v(c.nl.Pending),t(),M()}}):A===c.nl.Updating?(0,s.jsx)(a.A,{spinning:!0,children:p(S)}):p(S)};function m(e){let{Component:t,api:r,responsePropName:n,body:i,fallbackComponent:a,showSkeleton:l}=e;return function(e){let{body:o=i,...d}=e;return(0,s.jsx)(p,{api:r,body:o,showSkeleton:l,fallbackComponent:a,children:e=>{let r={...d,[n]:e};return(0,s.jsx)(t,{...r})}})}}},75978:function(e,t,r){r.d(t,{u:()=>d});var s=r(65723),n=r(64430),i=r(22155),a=r(128),l=r(43928),o=r(71623);function d(e,t,r){let d=e();return function(){let[c,u]=(0,i.useState)(),[h,p]=(0,i.useState)(l.jK.Pending),[m,f]=(0,i.useState)({}),{loader:g}=(0,a.useDataLoader)(c);function y(e){return e.then(e=>{u(e)}).catch(()=>{p(l.jK.Fail)})}function x(e){e&&Promise.all(t.map(t=>{let[r]=t;return e.loadData(r)})).then(e=>{f(e.reduce((e,r,s)=>{let[n,i]=t[s];return e[i]=r,e},{})),p(l.jK.Success)}).catch(e=>{console.error(e),p(l.jK.Fail)})}return((0,i.useEffect)(()=>{y(d).then(()=>{x(g)})},[g]),h===l.jK.Pending)?(0,s.jsx)(n.A,{active:!0}):h===l.jK.Fail?(0,s.jsx)(o.c,{retry:()=>{p(l.jK.Pending),d.then(()=>{x(g)}).catch(()=>{y(e())})}}):(0,s.jsx)(r,{...m})}}},28220:function(e,t,r){r.d(t,{Wf:()=>B,oc:()=>_});var s=r(65723),n=r(22155),i=r(95587),a=r(64801),l=r(4309),o=r(31786),d=r(95154),c=r(45586),u=r(37622),h=r(61323),p=r(96800),m=r(128),f=r(1361),g=r(97255),y=r(70054),x=r(5848),A=r(59890),v=r(11728),S=r(56108);let j=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,s.jsx)("rect",{width:16,height:16,fill:"#E6F7FF",rx:2}),(0,s.jsx)("path",{fill:"#3874F6",d:"M13.353 4.51c.094.095.147.221.147.354V14.5a.5.5 0 0 1-.5.5H3a.5.5 0 0 1-.5-.5v-13A.5.5 0 0 1 3 1h6.636c.133 0 .26.053.355.147zm-1.006.584-2.94-2.94v2.94z"})]});r(42197);let D={errorNumber:"errorNumber-NtnGpL",warningNumber:"warningNumber-UgutU8",successNumber:"successNumber-YOK23K",errorText:"errorText-u5Q3ns",warningText:"warningText-PymRi4",successText:"successText-ddFAF_",errorButton:"errorButton-jYRQzL",warningButton:"warningButton-KAF3GT",successButton:"successButton-clAJSx",container:"container-ssAvLP",icon:"icon-K6JtIV",description:"description-Ik1PO7",data:"data-J9Vxvq",common:"common-sHeHRd",warning:"warning-HnVMOj"},M=e=>{let{theme:t,number:r,description:n}=e;return(0,s.jsxs)("div",{className:`${D.container} ${D[t]}`,children:[(0,s.jsx)(v.A,{style:{fontSize:"18px",margin:"0 5px"},component:"common"===t?j:S.A}),(0,s.jsx)("span",{className:D.description,children:n}),(0,s.jsx)("span",{className:D.data,children:r})]})};var I=r(83397);r(26779);let P="column-VJtpT7",k="description-nwRikm",b="unit-poAoxV",w="tag-fNEiQ8",E="label-vITl7c",{DirectoryTree:C}=i.A,_=e=>{let t=[];e.files.length&&(t=e.files.map(e=>{let t=e.path.split("/");return{fileName:t.pop(),defaultDir:t.join("/")||"output",size:e.size,initial:e.initial}}));let r=[];return t.forEach(e=>{let t=r.find(t=>t.title===e.defaultDir),n=t||{title:e.defaultDir,key:e.defaultDir,icon:(0,s.jsx)(c.A,{}),children:[]},i=(0,p.C)(e.fileName);t||r.push(n),n.children.push({title:(0,s.jsxs)("div",{className:"treeContainer-jcFlxc",children:[(0,s.jsx)("div",{className:"treeTitle-B083rc",children:e.fileName}),(0,s.jsx)("div",{className:"line-Ia_8Yg"}),(0,s.jsx)(a.A,{className:w,color:"green",children:(0,m.formatSize)(e.size)}),e.initial?(0,s.jsx)(a.A,{className:w,color:"cyan",children:"initial"}):null]}),key:e.fileName,isLeaf:!0,icon:i})}),{treeData:r}},z=e=>{let{treeData:t}=_(e);return(0,s.jsx)(s.Fragment,{children:e.files.length?(0,s.jsx)(f.hX,{buttonProps:{size:"small"},buttonStyle:{fontSize:"inherit"},drawerProps:{title:"Files"},text:(0,s.jsx)("span",{children:e.count}),children:(0,s.jsx)(C,{defaultExpandAll:!0,selectable:!1,treeData:t,rootStyle:{minHeight:"800px",border:"1px solid rgba(235, 237, 241)"}})}):e.count})},R=e=>{let{res:t,view:r}=e,n=[{key:"js-files-count",label:"JS files",children:(0,s.jsx)("span",{className:`${k} ${P}`,children:z(t.js.total)})},{key:"css-files-count",label:"CSS files",children:(0,s.jsx)("span",{className:`${k} ${P}`,children:z(t.css.total)})},{key:"font-files-count",label:"Font files",children:(0,s.jsx)("span",{className:`${k} ${P}`,children:z(t.fonts.total)})},{key:"html-files-count",label:"HTML files",children:(0,s.jsx)("span",{className:k,children:z(t.html.total)})},{key:"image-files-count",label:"Image files",children:(0,s.jsx)("span",{className:k,children:z(t.imgs.total)})},{key:"media-files-count",label:"Media files",children:(0,s.jsx)("span",{className:k,children:z(t.media.total)})}],[i,a]=(0,m.formatSize)(t.js.total.size).split(" "),[o,d]=(0,m.formatSize)(t.css.total.size).split(" "),[c,u]=(0,m.formatSize)(t.fonts.total.size).split(" "),[h,p]=(0,m.formatSize)(t.html.total.size).split(" "),[f,g]=(0,m.formatSize)(t.imgs.total.size).split(" "),[y,A]=(0,m.formatSize)(t.media.total.size).split(" "),v=[{key:"js-files-size",label:(0,s.jsx)("span",{className:E,children:"JS size"}),children:(0,s.jsxs)("div",{className:P,children:[(0,s.jsx)("span",{className:k,children:i}),(0,s.jsx)("span",{className:b,children:a})]})},{key:"css-files-size",label:(0,s.jsx)("span",{className:E,children:"CSS size"}),children:(0,s.jsxs)("div",{className:P,children:[(0,s.jsx)("span",{className:k,children:o}),(0,s.jsx)("span",{className:b,children:d})]})},{key:"font-files-size",label:(0,s.jsx)("span",{className:E,children:"Font size"}),children:(0,s.jsxs)("div",{className:P,children:[(0,s.jsx)("span",{className:k,children:c}),(0,s.jsx)("span",{className:b,children:u})]})},{key:"html-files-size",label:(0,s.jsx)("span",{className:E,children:"HTML size"}),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:k,children:h}),(0,s.jsx)("span",{className:b,children:p})]})},{key:"image-files-size",label:(0,s.jsx)("span",{className:E,children:"Image size"}),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:k,children:f}),(0,s.jsx)("span",{className:b,children:g})]})},{key:"media-files-size",label:(0,s.jsx)("span",{className:E,children:"Media size"}),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:k,children:y}),(0,s.jsx)("span",{className:b,children:A})]})}];return(0,s.jsx)(l.A,{layout:"vertical",className:x.A.bundleOverall,size:"small",column:3,colon:!1,items:"files"===r?n:v})},B=()=>{let[e,t]=(0,n.useState)("size"),r=(0,h.Zp)(),{t:i}=(0,m.useI18n)();return(0,s.jsx)(y.zW,{api:I.SDK.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:n=>{let a=(0,m.formatSize)(n.all.total.size);return(0,s.jsx)(g.Zp,{className:A.A.card,style:{height:"316px"},children:(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"title-fNYU5O",children:[(0,s.jsx)("span",{children:i("Bundle Overall")}),(0,s.jsx)(o.Ay,{type:"link",style:{padding:"0px"},onClick:()=>{r(I.Client.RsdoctorClientRoutes.BundleSize)},children:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,s.jsx)("span",{style:{marginRight:"8px",fontSize:"13px"},children:i("ViewBundleSize")}),(0,s.jsx)(u.A,{style:{fontSize:"10px"}})]})})]}),(0,s.jsx)(d.A,{options:["Size","Files"],onChange:e=>{t(e.toLocaleLowerCase())},size:"small",style:{marginBottom:8,fontSize:"14px"}}),(0,s.jsx)(M,{theme:"files"===e?"common":"warning",number:"files"===e?n.all.total.count:a,description:`Total ${e}`}),(0,s.jsx)(R,{view:e,res:n})]})})}})}},59890:function(e,t,r){r.d(t,{A:()=>s}),r(6237);let s={card:"card-lyOUB6"}},93246:function(e,t,r){r.d(t,{R:()=>k});var s=r(65723),n=r(32792),i=r(31448),a=r(8879),l=r(98369),o=r(6048),d=r(22155),c=r(128),u=r(97255),h=r(83397),p=r(1361);r(22481),r(65704);var m=r(3149),f=r(41257),g=r(39009);let y=e=>{let{plugins:t,defaultDatas:r=[],type:n}=e,{isDark:i}=(0,c.useTheme)(),a=(0,d.useRef)(null),[l,o]=(0,d.useState)([]);return(0,d.useEffect)(()=>{let e=[];t.forEach(t=>{t.data.forEach(r=>{e.push({p:t.hook,n:`${t.tapName}`,s:r.startAt,e:r.endAt})})}),o([...(0,g.QR)(r),...(0,g.QR)(e)])},[]),(0,s.jsx)("div",{className:["loader-chart-container",i?"loader-chart-container_dark":""].join(" ").trim(),ref:a,style:{width:"100%"},children:(0,s.jsx)(f.n,{pluginsData:l,formatterFn:g.kr,chartType:n})})},x=()=>(0,s.jsx)(m.A,{message:(0,s.jsxs)(i.A.Text,{children:[(0,s.jsx)(i.A.Text,{children:"make sure that you have turn on "}),(0,s.jsxs)(i.A.Text,{children:[" ","in configuration for the Rsdoctor plugin."]})]}),type:"info",showIcon:!0});var A=r(70054),v=r(8857);let S=e=>{let{summary:t}=e,{costs:r=[]}=t||{};return r.find(e=>e.name===n.BD.SummaryCostsDataName.Bootstrap)?(0,s.jsx)(p.hX,{containerProps:{style:{display:"inline"}},drawerProps:{title:'Chart of the "Bootstrap -> BeforeCompile" stage'},text:(0,s.jsx)(l.A,{children:"detail"}),children:(0,s.jsx)(A.zW,{api:h.SDK.ServerAPI.API.GetPluginData,body:{hooks:["environment","afterEnvironment","entryOption","afterPlugins","afterResolvers","initialize","beforeRun","run","watchRun","normalModuleFactory","contextModuleFactory","beforeCompile"]},children:e=>e&&e.length?(0,s.jsx)(y,{plugins:e,type:v.wx.Bootstrap}):(0,s.jsx)(x,{})})}):null};var j=r(2384);let D=e=>{let{summary:t}=e,{costs:r=[]}=t||{},i=r.find(e=>e.name===n.BD.SummaryCostsDataName.Done),o='of the "AfterCompile -> Done" stage';return i?(0,s.jsx)(p.hX,{containerProps:{style:{display:"inline"}},drawerProps:{title:`Details ${o}`},text:(0,s.jsx)(l.A,{children:"detail"}),children:(0,s.jsx)(A.zW,{api:h.SDK.ServerAPI.API.GetPluginData,body:{hooks:["afterCompile","shouldEmit","emit","afterEmit","assetEmitted","done"]},children:e=>e&&e.length?(0,s.jsxs)(l.A,{direction:"vertical",style:{width:"100%"},children:[(0,s.jsx)(u.Zp,{title:`Plugin DataSource of ${o}`,collapsable:!0,children:(0,s.jsx)(j.u,{dataSource:e})}),(0,s.jsx)(a.A,{}),(0,s.jsx)(u.Zp,{title:`Chart ${o}`,children:(0,s.jsx)(y,{plugins:e,type:v.wx.Done})})]}):(0,s.jsx)(x,{})})}):null},M=e=>{let{summary:t}=e,{costs:r=[]}=t||{};return r.find(e=>e.name===n.BD.SummaryCostsDataName.Minify)?(0,s.jsx)(p.hX,{containerProps:{style:{display:"inline"}},drawerProps:{title:'Details of the "Minify" stage'},text:(0,s.jsx)(l.A,{children:"detail"}),children:(0,s.jsx)(A.zW,{api:h.SDK.ServerAPI.API.GetPluginData,body:{hooks:["processAssets","optimizeChunkAssets"]},children:e=>e&&e.length?(0,s.jsxs)(l.A,{direction:"vertical",style:{width:"100%"},children:[(0,s.jsx)(u.Zp,{title:'Plugin DataSource of the "Minify"',collapsable:!0,children:(0,s.jsx)(j.u,{dataSource:e})}),(0,s.jsx)(a.A,{}),(0,s.jsx)(u.Zp,{title:'Chart of the "Minify"',children:(0,s.jsx)(y,{plugins:e,type:v.wx.Minify})})]}):(0,s.jsx)(x,{})})}):null};var I=r(59890);r(71800);let P=e=>{let{children:t,name:r,showDivider:n=!0}=e;return(0,s.jsxs)(i.A.Text,{style:{color:"inherit"},children:[(0,s.jsx)(i.A.Text,{style:{color:"inherit"},children:r}),n?(0,s.jsx)(a.A,{type:"vertical"}):null,t]})},k=e=>{var t;let{summary:r}=e,{t:i}=(0,c.useI18n)();if(!(null==r||null==(t=r.costs)?void 0:t.length))return null;let a=Math.max(...r.costs.map(e=>e.costs));return(0,s.jsx)(u.Zp,{className:I.A.card,children:(0,s.jsx)("div",{children:(0,s.jsxs)(l.A,{style:{wordBreak:"break-all",width:"100%",marginTop:"0"},size:20,direction:"vertical",children:[(0,s.jsx)("div",{className:"title-wq4_QM",children:i("Compile Overall")}),r.costs.map(e=>{let{name:t,costs:i}=e,l=(0,s.jsx)(o.A,{className:"progress-y4rFf4",percent:100*i/a,status:"normal",format:()=>(0,c.formatCosts)(i)});switch(t){case n.BD.SummaryCostsDataName.Bootstrap:return(0,s.jsxs)(P,{name:"Bootstrap ~ BeforeCompile",children:[(0,s.jsx)(S,{summary:r}),l]},t);case n.BD.SummaryCostsDataName.Compile:return(0,s.jsx)(P,{name:"Compile",showDivider:!1,children:l},t);case n.BD.SummaryCostsDataName.Done:return(0,s.jsxs)(P,{name:"AfterCompile ~ Done",children:[(0,s.jsx)(D,{summary:r}),l]},t);case n.BD.SummaryCostsDataName.Minify:return(0,s.jsxs)(P,{name:"Minify",children:[(0,s.jsx)(M,{summary:r}),l]},t);default:return null}})]})})})}},5848:function(e,t,r){r.d(t,{A:()=>s}),r(90139);let s={projectOverall:"projectOverall-T7onhG",bundleOverall:"bundleOverall-Ay7WmZ"}},83819:function(e,t,r){r.d(t,{A:()=>n,h:()=>i});var s=r(65723);r(31180);let n=e=>{let{title:t,description:r,icon:n,style:i}=e;return(0,s.jsxs)("div",{className:"container-KSV5DZ",style:i,children:[(0,s.jsxs)("div",{className:"content-BsjkSU",children:[(0,s.jsx)("div",{className:"title-jUwqD5",children:t}),(0,s.jsx)("div",{className:"description-ArkOg4",children:r})]}),n]})},i=n},37625:function(e,t,r){r.d(t,{D:()=>x});var s=r(65723),n=r(28695),i=r(4309),a=r(78965),l=r(12303),o=r(59531),d=r(49983),c=r(70054),u=r(128),h=r(54241),p=r(97255),m=r(83819);r(33776);var f=r(5848),g=r(59890),y=r(83397);let x=e=>{let{configs:t=[],cwd:r,envinfo:x,alerts:A=[]}=e,{t:v}=(0,u.useI18n)(),S=A.filter(e=>"warn"===e.level).length,j=A.length-S,D=[...Object.keys(x).map(e=>{let t=/Version$/,r=t.test(e);return{key:e,label:r?e.replace(t,""):e,children:x?x[e]:void 0}}),...t.filter(e=>!!e.version).map(e=>{let{name:t,version:r}=e;return{key:t,label:t,children:r}}),{key:"cwd",label:"cwd",children:r}];return(0,s.jsx)(c.zW,{api:y.SDK.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:e=>{let t=(0,u.formatSize)(e.all.total.size),r=e.all.total.count,[c,y]=t.split(" "),x=[{title:"Errors",description:(0,s.jsx)("span",{style:{color:"#FF4D4F"},children:j}),icon:(0,s.jsx)(n.A,{style:{background:"#FF4D4F"},shape:"circle",icon:(0,s.jsx)(a.A,{style:{fontSize:"18px"}})})},{title:"Warnings",description:(0,s.jsx)("span",{style:{color:"#FAAD14"},children:S}),icon:(0,s.jsx)(n.A,{style:{background:"#FAAD14"},shape:"circle",icon:(0,s.jsx)(l.A,{style:{fontSize:"18px"}})})},{title:"Total Files",description:(0,s.jsx)("span",{children:r}),icon:(0,s.jsx)(n.A,{style:{background:"#3874F6"},shape:"circle",icon:(0,s.jsx)(o.A,{style:{fontSize:"18px"}})})},{title:"Total Size",description:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{style:{fontSize:"20px"},children:c}),(0,s.jsx)("span",{style:{fontSize:"13px",marginLeft:"5px"},children:y})]}),icon:(0,s.jsx)(n.A,{style:{background:"rgba(226, 129, 73)"},shape:"circle",icon:(0,s.jsx)(d.A,{style:{fontSize:"18px"}})})}];return(0,s.jsx)(p.Zp,{className:g.A.card,children:(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"title-cqt0lp",children:[(0,s.jsx)("span",{className:"left-sk7eLC",children:v("Project Overall")}),(0,s.jsx)(h.U,{})]}),(0,s.jsx)("div",{className:"overview-ZAp1A3",children:x.map((e,t)=>(0,s.jsx)(m.A,{title:e.title,description:(0,s.jsx)("span",{children:e.description}),icon:e.icon},t))}),(0,s.jsx)(i.A,{className:f.A.projectOverall,items:D})]})})}})}},2384:function(e,t,r){r.d(t,{u:()=>o});var s=r(65723);r(22155);var n=r(36643),i=r(26316),a=r(75454),l=r(128);let o=e=>{let{dataSource:t}=e;return(0,s.jsx)(n.A,{dataSource:t,rowKey:e=>`${e.tapName}_${e.hook}`,columns:[{title:"Plugin Tap Name",render:(e,t)=>t.tapName},{title:"Hook",render:(e,t)=>t.hook},{title:"calls",render:(e,t)=>(0,s.jsx)(i.A,{title:`"${t.hook}" has been called ${t.data.length} times by "${t.tapName}"`,children:t.data.length}),sorter:(e,t)=>e.data.length-t.data.length},{title:"duration(total)",render:(e,t)=>(0,l.formatCosts)((0,a.x)(t.data,e=>e.costs)),sorter:(e,t)=>(0,a.x)(e.data,e=>e.costs)-(0,a.x)(t.data,e=>e.costs),defaultSortOrder:"descend"}]})}},71623:function(e,t,r){r.d(t,{c:()=>o});var s=r(65723),n=r(81489),i=r(98369),a=r(31448),l=r(31786);let o=r(22155).memo(e=>{let{title:t="Load data failed, please try again",buttonText:r="retry",retry:o}=e;return(0,s.jsx)(n.A,{description:(0,s.jsxs)(i.A,{direction:"vertical",children:[(0,s.jsx)(a.A.Text,{children:t}),(0,s.jsx)(l.Ay,{type:"primary",onClick:()=>{o()},children:r})]})})})},18919:function(e,t,r){r.d(t,{U:()=>n,w:()=>i});var s=r(83397);let n="Overall",i=s.Client.RsdoctorClientRoutes.Overall},85892:function(e,t,r){r.d(t,{_y:()=>n,dn:()=>o,FO:()=>l,s0:()=>c,aD:()=>tr,hK:()=>a,PR:()=>d,pI:()=>i,d9:()=>u,wm:()=>s});var s={};r.r(s),r.d(s,{YW:()=>D,wE:()=>j.w});var n={};r.r(n),r.d(n,{YW:()=>el,UU:()=>ei,wE:()=>ea});var i={};r.r(i),r.d(i,{YW:()=>eA,UU:()=>ey,wE:()=>ex});var a={};r.r(a),r.d(a,{YW:()=>eC,UU:()=>eb,wE:()=>ew});var l={};r.r(l),r.d(l,{YW:()=>eO,UU:()=>eN,wE:()=>eT});var o={};r.r(o),r.d(o,{YW:()=>eJ,UU:()=>eV,wE:()=>eZ});var d={};r.r(d),r.d(d,{YW:()=>e2,wE:()=>e1});var c={};r.r(c),r.d(c,{BU:()=>tt,wE:()=>te});var u={};r.r(u),r.d(u,{YW:()=>th,wE:()=>tu});var h=r(65723),p=r(83397),m=r(22155),f=r(38238),g=r(59500),y=r(5709),x=r(70054),A=r(22185),v=r(23308),S=r(14752),j=r(18919);let D=(0,x.eN)({api:p.SDK.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{project:t}=e,{summary:r,configs:s,root:n,envinfo:i,errors:a}=t;return(0,h.jsx)("div",{className:S.A.overall,children:(0,h.jsxs)(f.A,{style:{width:"100%"},children:[(0,h.jsx)("div",{style:{flex:3,marginRight:"16px",maxWidth:"75%"},children:(0,h.jsxs)(v.X,{children:[(0,h.jsx)(A.DG,{configs:s,cwd:n,envinfo:i,alerts:a}),(0,h.jsx)(y.mn,{})]})}),(0,h.jsx)("div",{style:{flex:1},children:(0,h.jsxs)(v.X,{children:[(0,h.jsx)(A.Wf,{errors:a,cwd:n}),(0,h.jsx)(A.Rl,{summary:r}),(0,h.jsx)(g.t,{})]})})]})})}});var M=r(63079),I=r(84585),P=r(43928),k=r(85189),b=r(44830),w=r(1853),E=r(90345),C=r(46941),_=r(98369),z=r(31448),R=r(26316),B=r(64801),N=r(31786),T=r(8879),O=r(20772),G=r(2183),K=r(81489),F=r(35621),$=r(75454),W=r(71999),L=r(42868),U=r(96800),q=r(10142),Y=r(72854),H=r(128),V=r(87665),Z=r(35410),J=r(89405);r(46045);var Q=r(14303),X=r(69263),ee=r(32792);let{Option:et}=C.A,er=[{key:"tree",label:(0,h.jsxs)(_.A,{children:[(0,h.jsx)(z.A.Text,{children:"Tree Graph"}),(0,h.jsx)(R.A,{overlayStyle:{maxWidth:380},overlayInnerStyle:{marginLeft:16,padding:10},color:"white",title:(0,h.jsxs)(_.A,{direction:"vertical",color:"white",size:"middle",children:[(0,h.jsx)(M.A,{children:(0,h.jsxs)(I.A,{children:[(0,h.jsx)(B.A,{color:"cyan",style:{margin:0},children:"initial"}),(0,h.jsx)(z.A.Text,{style:{marginLeft:4},children:"Identify whether the chunk is an initial chunk."})]})}),(0,h.jsx)(M.A,{children:(0,h.jsxs)(I.A,{children:[(0,h.jsx)(B.A,{color:"green",style:{margin:0},children:"concatenated"}),(0,h.jsx)(z.A.Text,{style:{marginLeft:4},children:"Identify whether the module is a concatenated module"}),(0,h.jsx)(R.A,{overlayStyle:{maxWidth:408},placement:"bottom",color:"white",title:(0,h.jsx)(_.A,{direction:"vertical",color:"white",children:(0,h.jsx)(M.A,{children:(0,h.jsxs)(I.A,{children:[(0,h.jsx)(z.A.Text,{strong:!0,children:"Concatenated Module"}),(0,h.jsx)(z.A.Text,{children:': A performance optimization where multiple modules are merged (or "hoisted") into a single scope instead of wrapping each module in separate function closures. This reduces the bundle size and improves runtime performance by minimizing function call overhead.'})]})})}),children:(0,h.jsx)(k.A,{style:{color:"rgba(0,0,0,.45)",marginLeft:4}})}),(0,h.jsx)(z.A.Text,{children:"."})]})}),(0,h.jsx)(M.A,{children:(0,h.jsxs)(I.A,{children:[(0,h.jsx)(N.Ay,{size:"small",icon:(0,h.jsx)(b.A,{})}),(0,h.jsx)(z.A.Text,{style:{marginLeft:4},children:"Open the code."})]})}),(0,h.jsx)(M.A,{children:(0,h.jsxs)(I.A,{children:[(0,h.jsx)(N.Ay,{size:"small",icon:(0,h.jsx)(w.A,{})}),(0,h.jsx)(z.A.Text,{style:{marginLeft:4},children:"View the module dependency, that is, module reasons in stats.json."})]})}),(0,h.jsx)(M.A,{children:(0,h.jsxs)(I.A,{children:[(0,h.jsx)(B.A,{color:"purple",children:"Bundled: 15.77 KB"}),(0,h.jsx)(z.A.Text,{children:"The final size of the output files after processing, bundling, and optimization. This is what is delivered to the browser."})]})}),(0,h.jsx)(M.A,{children:(0,h.jsxs)(I.A,{children:[(0,h.jsx)(B.A,{color:"orange",children:"Source: 60.46 KB"}),(0,h.jsx)(z.A.Text,{children:"The original size of your source code files before any processing or transformations. This is the raw size of your code as you wrote it."})]})})]}),children:(0,h.jsx)(k.A,{style:{color:"rgba(0,0,0,.45)"}})})]})},{key:"treemap",label:"Treemap"}],es=e=>{let{errors:t,cwd:r,summary:s,entryPoints:n}=e,[i,a]=(0,m.useState)([]),[l,o]=(0,m.useState)(0),[d,c]=(0,m.useState)(""),[u,f]=(0,m.useState)(0),[g,y]=(0,m.useState)(!1),[A,v]=(0,m.useState)(""),[S,j]=(0,m.useState)(""),[D,b]=(0,m.useState)(null),[w,B]=(0,m.useState)("tree"),{showCode:N,codeDrawerComponent:es}=(0,W.Y)("Do not have the codes of assets. If you use the lite or brief mode, there will have codes."),{t:en}=(0,H.useI18n)(),ei=s.all.total.files,ea=(0,m.useCallback)(e=>t=>{"module"===e?v(t):"chunk"===e&&j(t)},[]),el=e=>(0,h.jsxs)(C.A,{defaultValue:"kb",onChange:ea(e),children:[(0,h.jsx)(et,{value:"kb",children:"KB"}),(0,h.jsx)(et,{value:"mb",children:"MB"})]}),eo=(0,m.useCallback)((0,F.s)(e=>{o("mb"===A?1024*e*1024:1024*e)},300),[]),ed=(0,m.useCallback)((0,F.s)(e=>{f("mb"===S?1024*e*1024:1024*e)},300),[]),ec=(0,m.useMemo)(()=>{let e=ei.slice();return d&&(e=e.filter(e=>e.path.indexOf(d)>-1)),u>0&&(e=e.filter(e=>e.size>=u)),i.length&&(e=e.filter(e=>!!i.some(t=>t.assets.includes(e.path)))),e.sort((e,t)=>{let r=+(e.path.indexOf("/")>-1);return(t.path.indexOf("/")>-1)-r})},[ei,i,d,u]);(0,m.useEffect)(()=>{s.all.total.files.forEach(e=>{let t;"js"===((t=e.path.split(".")).length>1?t.pop():"")&&b(e.path)})},[s.all.total.files]);let eu=(0,m.useMemo)(()=>(0,H.createFileStructures)({files:ec.map(e=>e.path).filter(Boolean),fileTitle(e,t){let{size:r,initial:s,path:n,content:i}=ec.find(t=>t.path===e);return(0,h.jsxs)("div",{className:J.A.assetBox,onClick:()=>{b(n)},children:[(0,h.jsx)(Y.i,{text:t,keyword:"",className:J.A.fileText}),(0,h.jsxs)(_.A,{size:"small",className:J.A.assetsTag,children:[(0,h.jsx)(T.A,{type:"vertical"}),(0,h.jsx)(z.A.Text,{style:{color:"#4FD233"},children:(0,H.formatSize)(r)}),(0,h.jsx)(T.A,{type:"vertical"}),s?(0,h.jsx)(z.A.Text,{style:{color:"#009A9E"},children:"initial"}):null,(0,h.jsx)(E.A,{style:{fontSize:14,padding:0},onClick:()=>N({code:i,filePath:n})})]})]})}}),[ec]);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:"bundle-size-card",children:[(0,h.jsx)(Z.k,{cwd:r,errors:t,summary:s}),(0,h.jsx)(O.A,{className:"bundle-size=card",tabList:er,activeTabKey:w,onTabChange:e=>B(e),hidden:"tree"===w,tabProps:{size:"middle"},children:(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetProjectInfo,children:e=>{let{isRspack:t,hasSourceMap:r}=ee.l5.checkSourceMapSupport(e.configs);return(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetSummaryBundles,children:e=>{let s=e.filter(e=>{let t;return"js"===(t=e.asset.path.toLowerCase().split(".").pop()||"")||"cjs"===t||"mjs"===t||"css"===t||"html"===t}).map(e=>({name:e.asset.path,value:e.asset.size,children:(0,H.flattenTreemapData)(e.modules).children}));return(0,h.jsx)(X.d,{treeData:s,bundledSize:r||t})}})}})}),(0,h.jsx)(O.A,{hidden:"treemap"===w,tabList:er,activeTabKey:w,onTabChange:e=>B(e),tabProps:{size:"middle"},children:(0,h.jsxs)(_.A,{direction:"vertical",children:[(0,h.jsxs)(M.A,{align:"middle",gutter:[P.or.BasePadding,P.or.BasePadding],children:[n&&n.length?(0,h.jsx)(I.A,{children:(0,h.jsx)(C.A,{mode:"multiple",value:i.map(e=>e.name),style:{minWidth:230,width:"auto",maxWidth:300},placeholder:"filter assets by entry point",onChange:e=>{a(e.map(e=>n.find(t=>t.name===e)).filter(Boolean))},allowClear:!0,onClear:()=>{a([])},children:n.map(e=>(0,h.jsx)(C.A.Option,{value:e.name,children:(0,h.jsx)(_.A,{children:(0,h.jsx)(L.Ex,{label:e.name,value:(0,H.formatSize)(e.size),tooltip:e.name})})},e.name))})}):null,(0,h.jsx)(I.A,{children:(0,h.jsx)(q.E,{placeholder:"search asset by keyword",onChange:e=>{c(e),y(!1)}})}),(0,h.jsx)(I.A,{span:6,children:(0,h.jsx)(G.A,{min:0,style:{width:"95%"},addonBefore:(0,h.jsxs)(_.A,{children:[(0,h.jsx)(z.A.Text,{style:{fontSize:14,color:"inherit"},children:"Asset Size"}),(0,h.jsx)(R.A,{title:en("filter the output assets which size is greater than the input value"),style:{marginLeft:3},children:(0,h.jsx)(k.A,{style:{color:"rgba(0,0,0,.45)"}})})]}),onChange:e=>ed(Number(e)),addonAfter:el("chunk")})}),(0,h.jsx)(I.A,{span:6,children:(0,h.jsx)(G.A,{min:0,style:{width:"95%"},addonBefore:(0,h.jsxs)(_.A,{children:[(0,h.jsx)(z.A.Text,{style:{fontSize:14,color:"inherit"},children:"Module Size"}),(0,h.jsx)(R.A,{title:en("filter the modules which size is greater than the input value"),style:{marginLeft:3},children:(0,h.jsx)(k.A,{style:{color:"rgba(0,0,0,.45)"}})})]}),onChange:e=>{eo(Number(e))},addonAfter:el("module")})})]}),(0,h.jsx)(M.A,{children:(0,h.jsx)(Q.s,{})}),(0,h.jsx)(M.A,{align:"middle",gutter:[P.or.BasePadding,P.or.BasePadding],children:(0,h.jsx)(I.A,{span:24,children:ec.length?(0,h.jsxs)(M.A,{gutter:P.or.BasePadding,children:[(0,h.jsx)(I.A,{span:6,children:(0,h.jsx)(O.A,{title:(0,h.jsxs)(_.A,{children:[(0,h.jsx)(z.A.Text,{children:en("Output Assets List")}),(0,h.jsx)(T.A,{type:"vertical"}),(0,h.jsx)(R.A,{title:`total assets count is ${ei.length}, the filtered assets count is ${ec.length}`,children:(0,h.jsxs)(z.A.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:[ec.length," / ",ei.length]})}),(0,h.jsx)(T.A,{type:"vertical"}),(0,h.jsx)(z.A.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:(0,H.formatSize)((0,$.x)(ec,e=>e.size))})]}),size:"small",bodyStyle:{overflow:"scroll",height:600},children:(0,h.jsx)(U.h,{className:J.A.assets,treeData:eu,autoExpandParent:!0,defaultExpandAll:g||ec.length<=20},`tree_${d}_${g}`)})}),(0,h.jsx)(I.A,{span:18,children:D?(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetAssetDetails,body:{assetPath:D},children:e=>(0,h.jsx)(V.i5,{asset:e.asset,chunks:e.chunks,modules:e.modules,height:600,moduleSizeLimit:l,root:r})}):(0,h.jsx)(O.A,{bodyStyle:{height:600},children:(0,h.jsx)(K.A,{description:(0,h.jsx)(z.A.Text,{strong:!0,children:"Click the file path on the left to show the modules of the asset"})})})})]}):(0,h.jsx)(K.A,{})})})]})})]}),es]})},en=(0,x.eN)({api:p.SDK.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{root:t,errors:r}=e.project;return(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!0},children:e=>(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetEntryPoints,children:s=>(0,h.jsx)(es,{cwd:t,errors:r,summary:e,entryPoints:s})})})}}),ei="BundleSize",ea=p.Client.RsdoctorClientRoutes.BundleSize,el=()=>(0,h.jsx)(M.A,{children:(0,h.jsx)(I.A,{span:24,style:{marginBottom:P.or.BasePadding},children:(0,h.jsx)(en,{})})});r(84141);var eo=r(54241),ed=r(97255),ec=r(41020),eu=r(73255),eh=r(78870);let ep=(0,x.eN)({api:p.SDK.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{project:t}=e,{root:r}=t,[s,n]=(0,m.useState)({filename:"",loaders:[],layer:""}),[i,a]=(0,m.useState)(0);return(0,h.jsxs)(_.A,{direction:"vertical",style:{width:"100%"},children:[(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetLoaderNames,children:e=>(0,h.jsx)(ec.F,{onChange:n,loaderNames:e})}),(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetLoaderChartData,children:e=>{let t=e.filter(e=>(0,eh.ak)(e.resource,e.loader,s.filename,s.loaders,e.layer,null==s?void 0:s.layer));return 0===i?(0,h.jsx)(eu.z,{loaders:t,cwd:r}):(0,h.jsx)(h.Fragment,{})}})]})}});var em=r(58359),ef=r(2083),eg=r(66927);let ey="Loaders Timeline",ex=p.Client.RsdoctorClientRoutes.WebpackLoaderOverall,eA=()=>{let{t:e}=(0,eg.B)();return(0,h.jsx)(ed.Zp,{title:(0,h.jsxs)(em.Space,{align:"baseline",children:[(0,h.jsx)(em.Typography.Title,{level:5,style:{margin:0},children:"Loader Timeline"}),(0,h.jsx)(em.Popover,{content:(0,h.jsxs)("div",{children:[e("AsyncLoaderInfo"),(0,h.jsx)("a",{href:"https://rsdoctor.rs/guide/more/faq#cssextractrspackplugin-%E7%9A%84-loader-%E8%80%97%E6%97%B6%E8%BF%87%E9%95%BF%E9%97%AE%E9%A2%98",target:"_blank",rel:"noreferrer",children:e("Details")})]}),title:"Info",children:(0,h.jsx)(em.Tag,{icon:(0,h.jsx)(ef.A,{}),color:"warning",children:"Info"})})]}),extra:(0,h.jsx)(eo.U,{defaultKeys:["module"]}),children:(0,h.jsx)(ep,{})})};var ev=r(17086),eS=r(41595),ej=r(31058),eD=r(79865);let eM=(0,x.eN)({api:p.SDK.ServerAPI.API.LoadDataByKey,body:{key:"root"},responsePropName:"cwd",Component:e=>{let{cwd:t}=e,[r,s]=(0,m.useState)({filename:"",loaders:[],layer:""});return(0,h.jsx)(eS.Q.Consumer,{children:e=>(0,h.jsx)(ev.Ay,{locale:(0,H.getLocale)(e.locale),theme:{token:{padding:16,fontSize:14}},children:(0,h.jsxs)("div",{className:eD.A.loaderAnalysis,children:[(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetLoaderNames,children:e=>(0,h.jsx)(ec.F,{onChange:e=>s(e),loaderNames:e})}),(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetLoaderFileTree,children:e=>(0,h.jsx)(ej.h,{filename:r.filename,filetree:e,loaders:r.loaders,layer:r.layer,cwd:t})})]})})})}});var eI=r(88415),eP=r(28342),ek=r(6269);let eb="Loaders Analysis",ew=p.Client.RsdoctorClientRoutes.WebpackLoaderAnalysis,{useToken:eE}=eI.A,eC=()=>{let{token:e}=eE();return(0,h.jsx)(ed.Zp,{title:(0,h.jsxs)(_.A,{align:"baseline",children:[(0,h.jsx)(z.A.Title,{level:5,style:{margin:0},children:"Loader Analysis"}),(0,h.jsx)(eP.A,{content:(0,h.jsxs)("div",{children:[(0,ek.t)("AsyncLoaderInfo"),(0,h.jsx)("a",{href:"https://rsdoctor.rs/guide/more/faq#cssextractrspackplugin-%E7%9A%84-loader-%E8%80%97%E6%97%B6%E8%BF%87%E9%95%BF%E9%97%AE%E9%A2%98",target:"_blank",rel:"noreferrer",children:(0,ek.t)("Details")})]}),title:"Info",children:(0,h.jsx)(B.A,{icon:(0,h.jsx)(ef.A,{}),color:"warning",children:"Info"})})]}),extra:(0,h.jsx)(eo.U,{defaultKeys:["module","resolve"]}),bodyStyle:{paddingTop:e.padding,height:800},children:(0,h.jsx)(eM,{})})};var e_=r(29398),ez=r(74522),eR=r(98204),eB=r(2384);r(68878);let eN="Plugins Analysis",eT=p.Client.RsdoctorClientRoutes.WebpackPlugins,eO=()=>{let[e,t]=(0,m.useState)([]),[r,s]=(0,m.useState)([]);return(0,h.jsx)("div",{children:(0,h.jsx)(O.A,{title:"Plugins Overall",bodyStyle:{paddingTop:P.or.BasePadding/3},extra:(0,h.jsx)(eo.U,{defaultKeys:["plugins"]}),children:(0,h.jsxs)(_.A,{direction:"vertical",style:{width:"100%",padding:"0 30px"},children:[(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetPluginSummary,children:e=>{let{hooks:r,tapNames:n}=e;return(0,h.jsxs)(_.A,{style:{marginBottom:P.or.BasePadding/2},children:[(0,h.jsxs)(eR.A.Group,{compact:!0,children:[(0,h.jsxs)(N.Ay,{children:[(0,h.jsx)(e_.A,{}),(0,h.jsx)(z.A.Text,{children:"Plugin Tap Names"})]}),(0,h.jsx)(C.A,{mode:"multiple",allowClear:!0,className:"plugin-select",style:{width:300},popupMatchSelectWidth:!0,onChange:e=>{t(e)},children:n.map(e=>(0,h.jsx)(C.A.Option,{label:e,value:e,children:e},e))})]}),(0,h.jsxs)(eR.A.Group,{compact:!0,children:[(0,h.jsxs)(N.Ay,{children:[(0,h.jsx)(ez.A,{}),(0,h.jsx)(z.A.Text,{children:"Hooks"})]}),(0,h.jsx)(C.A,{mode:"multiple",allowClear:!0,className:"plugin-select",style:{width:300},popupMatchSelectWidth:!0,onChange:e=>{s(e)},children:r.map(e=>(0,h.jsx)(C.A.Option,{label:e,value:e,children:e},e))})]})]})}}),(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetPluginData,body:{hooks:r,tapNames:e},children:e=>(0,h.jsx)(eB.u,{dataSource:e})})]})})})};var eG=r(55007),eK=r(35234),eF=r(83027),e$=r(25659),eW=r(36643),eL=r(98148),eU=r(31465);let eq=e=>{let{filepath:t,before:r,after:s,resolvers:n}=e,[i,a]=(0,m.useState)(!1);return(0,h.jsxs)(m.Fragment,{children:[(0,h.jsx)(I.A,{flex:1,children:(0,h.jsx)(O.A,{title:"Resolve Diff Viewer",styles:{body:{padding:0,overflow:"hidden"}},children:(0,h.jsx)(eU.Mh,{style:{height:785},isEmbed:!0,originalFilePath:t,modifiedFilePath:t,original:r,modified:s})})}),(0,h.jsx)(I.A,{span:i?2:7,children:(0,h.jsx)(O.A,{title:i?"...":"Resolve Details",extra:(0,h.jsx)(N.Ay,{onClick:()=>a(!i),size:"small",icon:i?(0,h.jsx)(eG.A,{}):(0,h.jsx)(eK.A,{})}),style:i?{width:80}:void 0,children:i?null:(0,h.jsx)(eW.A,{style:{width:"100%",height:735,overflowY:"scroll",wordBreak:"break-all"},size:"small",pagination:!1,bordered:!0,rowKey:e=>e.request,columns:[{title:"Source Code",width:200,render:(e,t)=>(0,h.jsx)(z.A.Text,{copyable:!0,children:(0,h.jsx)(z.A.Text,{code:!0,strong:!0,children:t.request})})},{title:"Duration",width:80,render:(e,t)=>(0,h.jsx)(z.A.Text,{strong:!0,children:(0,H.formatCosts)(t.costs)}),sorter:(e,t)=>e.costs-t.costs,sortDirections:["descend","ascend"]},{title:"Resolve Result",render:(e,t)=>ee.xR.isResolveSuccessData(t)?(0,h.jsx)(z.A.Text,{copyable:!0,children:t.result}):(0,h.jsx)(eF.A,{style:{color:"#f50"}})}],dataSource:n})})})]})},eY=e=>{let{resolver:t,cwd:r}=e,[s,n]=(0,m.useState)(""),i="/node_modules/",a=(0,m.useMemo)(()=>t.map(e=>e.issuerPath).filter(Boolean),[t]),l=(0,m.useMemo)(()=>a.filter(t=>!e.filename||t.indexOf(e.filename)>-1),[e.filename,a]),o=l.length&&l.every(e=>e.indexOf(i)>-1),d=(0,m.useMemo)(()=>(0,H.createFileStructures)({files:l.length?l:a,cwd:r,fileTitle:(e,t)=>(0,h.jsx)("div",{onClick:()=>n(e),children:t})}),[e.filename]);return(0,h.jsxs)(M.A,{justify:"start",align:"top",wrap:!1,gutter:P.or.BasePadding,children:[(0,h.jsx)(I.A,{span:7,children:(0,h.jsx)(O.A,{title:"Files",children:(0,h.jsx)(U.h,{style:{width:"100%",height:735,overflow:"scroll"},treeData:d,defaultExpandedKeys:(0,H.mapFileKey)(d,o?1:4,o?void 0:e=>{let t=(0,eL.J)(e,"__RESOURCEPATH__").indexOf(i)>-1;return!!(l.length&&l.every(e=>e.indexOf(i)>-1))||!t})},`tree_${e.filename}`)})}),s&&(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetResolverFileDetails,body:{filepath:s},children:e=>(0,h.jsx)(eq,{...e})})]})},eH=(0,x.eN)({api:p.SDK.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{project:t}=e,{root:r}=t,[s,n]=(0,m.useState)("");return(0,h.jsxs)("div",{style:{width:"100%"},children:[(0,h.jsx)(_.A,{style:{marginTop:P.or.BasePadding,marginBottom:P.or.BasePadding},children:(0,h.jsx)(q.E,{icon:(0,h.jsx)(e$.A,{}),label:"Filename",placeholder:"search filename by keyword",onChange:e=>n(e)})}),(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetResolverFileTree,children:e=>(0,h.jsx)(eY,{filename:s,resolver:e,cwd:r})})]})}}),eV="ModuleResolve",eZ=p.Client.RsdoctorClientRoutes.ModuleResolve,eJ=()=>(0,h.jsx)("div",{children:(0,h.jsx)(O.A,{title:"Webpack Resolver Analysis",extra:(0,h.jsx)(eo.U,{defaultKeys:["resolve","resolveLoader"]}),bodyStyle:{paddingTop:0},children:(0,h.jsx)(eH,{})})});var eQ=r(36147),eX=r(63180),e0=r(11771);let e1=p.Client.RsdoctorClientRoutes.RuleIndex,e2=()=>{let e=(0,H.useUrlQuery)()[p.Rule.RsdoctorRuleClientConstant.UrlQueryForErrorCode]||"",[t,r]=(0,m.useState)(p.Rule.RuleErrorMap[e]),s=Object.values(p.Rule.RuleErrorMap);return(0,m.useEffect)(()=>{window.scrollTo({top:0})},[]),(0,h.jsxs)(M.A,{gutter:P.or.BasePadding/2,children:[(0,h.jsx)(I.A,{span:8,children:(0,h.jsx)(O.A,{title:(0,h.jsx)(e0.h,{text:"list of the error codes."}),bordered:!0,children:(0,h.jsx)(_.A,{direction:"vertical",children:s.map((e,s)=>(0,h.jsxs)(_.A,{style:{marginTop:0===s?0:P.or.BasePadding/2,cursor:"pointer"},onClick:()=>r(e),align:"center",children:[(0,h.jsx)(eQ.A,{status:"default"}),(0,h.jsx)(z.A.Text,{code:!0,children:(0,h.jsx)("a",{children:e.code})}),(0,h.jsx)(z.A.Text,{style:{color:t&&t.code===e.code?"#1890ff":void 0},children:e.title})]},e.code))})})}),(0,h.jsx)(I.A,{span:16,children:t?(0,h.jsx)(O.A,{title:(0,h.jsxs)(M.A,{justify:"space-between",children:[(0,h.jsxs)(_.A,{children:[(0,h.jsx)(z.A.Text,{code:!0,children:t.code}),(0,h.jsx)(z.A.Text,{children:t.title})]}),(0,h.jsx)("div",{children:(0,h.jsx)(B.A,{children:t.category})})]}),bodyStyle:{paddingTop:0},bordered:!0,children:(0,h.jsx)(z.A.Paragraph,{children:"markdown"===t.type?(0,h.jsx)(eX.oz,{children:t.description}):(0,h.jsx)(z.A.Text,{children:t.description})})}):(0,h.jsx)(O.A,{title:"This page lists all the error codes emitted by the Rsdoctor.",bordered:!0,children:(0,h.jsx)(z.A.Text,{children:"click the error code in left bar to show more details."})})})]})};var e3=r(94019),e8=r(13078),e5=r.n(e8),e9=r(67843),e4=r(73311),e6=r(26634),e7=r(81972);r(38124);let te=p.Client.RsdoctorClientRoutes.TreeShaking,tt=(0,x.ug)(H.fetchManifest,[["moduleGraph","data"],["root","cwd"]],e=>{let{data:t,cwd:r}=e,s=(0,H.useModuleGraphInstanceByModuleGraph)(t);if(0===s.size())return(0,h.jsx)(e6.$,{});let[n,i]=(0,m.useState)(""),[a,l]=(0,m.useState)(1),[o,d]=(0,m.useState)([]),[c,u]=(0,m.useState)("side-effect"),f=(0,m.useMemo)(()=>s.getModules().filter(e=>e.kind===p.SDK.ModuleKind.Normal&&e5().basename(e.path).includes(n)),[n]),g=(0,m.useMemo)(()=>f.find(e=>e.isEntry),[]),[y,A]=(0,m.useState)(g||(null==f?void 0:f.length)&&(null==f?void 0:f[0])),v=(0,e9.EV)(f,s,n,y,e=>{S(f.find(t=>t.path===e),[])},r),S=(e,t,r)=>{A(e),d(t.slice()),ee.AP.isNumber(r)&&l(r)};return(0,h.jsxs)(O.A,{title:"Tree Shaking Analysis",bodyStyle:{paddingTop:0},className:"tree-shaking-page",children:[(0,h.jsxs)(M.A,{justify:"space-between",align:"middle",style:{marginBottom:P.or.BasePadding,marginTop:P.or.BasePadding},children:[(0,h.jsx)(q.E,{icon:(0,h.jsx)(e$.A,{}),width:400,label:"FileName",placeholder:"search filename by keyword",style:{width:"auto"},onChange:e=>i(e)}),(0,h.jsxs)(e3.A.Group,{value:c,onChange:e=>{let{target:t}=e;return u(t.value)},children:[(0,h.jsx)(e3.A.Button,{value:"side-effect",children:"SideEffects"}),(0,h.jsx)(e3.A.Button,{value:"export",children:"Export Variables"})]})]}),(0,h.jsxs)(M.A,{justify:"space-between",align:"top",wrap:!1,gutter:[P.or.BasePadding,P.or.BasePadding],children:[(0,h.jsx)(I.A,{span:7,children:(0,h.jsx)(O.A,{title:`Total Files: ${f.length}`,className:"tree-shaking-files-box",children:(0,h.jsx)(U.h,{style:{height:"80%"},className:"tree-shaking-files",selectedKeys:y?[y.path]:[],defaultExpandedKeys:(0,e9.ut)(v),treeData:v,expandAction:"click"})})}),(0,h.jsx)(I.A,{span:9,children:(0,h.jsx)(x.zW,{api:p.SDK.ServerAPI.API.GetModuleCodeByModuleId,body:{moduleId:y.id},children:e=>(0,h.jsx)(e4.B,{module:y,moduleGraph:s,ranges:o,toLine:a,setEditorData:S,source:e})})}),(0,h.jsx)(I.A,{flex:1,children:(0,h.jsx)(e7.oK,{kind:c,setEditorData:S,module:y,moduleGraph:s})})]})]})});var tr=r(59229),ts=r(68338),tn=r(16703),ti=r(12772),ta=r(16984),tl=r(62348);let to=[p.Manifest.RsdoctorManifestClientRoutes.Overall,p.Manifest.RsdoctorManifestClientRoutes.BundleSize],td=(e,t)=>{let r,s;window[p.Constants.WINDOW_RSDOCTOR_TAG]=e,window[p.Constants.WINDOW_RSDOCTOR_TAG].enableRoutes=t;let n=(r=`//${location.host}${location.pathname}#/overall`,s=t&&t.length>0?`?${p.Client.RsdoctorClientUrlQuery.EnableRoutes}=${encodeURIComponent(JSON.stringify(t))}`:"",`${r}${s}`);location.href=n,tn.Ay.success("JSON data loaded successfully!")},tc=async e=>{try{let t=await (0,tl.k)([e]);if(t&&t[0])td(t[0].data,to);else throw Error("Invalid manifest data")}catch(t){let e=t instanceof Error?t.message:"Unknown error";throw tn.Ay.error(`Failed to load Rspack stats: ${e}`),t}},tu=p.Client.RsdoctorClientRoutes.Uploader,th=()=>{let[e,t]=(0,m.useState)(!1),r=async e=>{if(e){t(!0);try{let t=await (0,H.readJSONByFileReader)(e);if(!t||"object"!=typeof t)throw Error("Invalid JSON format");if((0,tl.A)(t))await tc(t);else try{let e=t.clientRoutes||to;td(t.data,e)}catch(t){let e=t instanceof Error?t.message:"Unknown error";tn.Ay.error(`Failed to load manifest data: ${e}`),console.error("Failed to load manifest data:",t)}}catch(t){let e=t instanceof Error?t.message:"Unknown error";tn.Ay.error(`Upload failed: ${e}`),console.error("Upload error:",t)}finally{t(!1)}}};return(0,h.jsx)(ti.A,{spinning:e,tip:"uploading...",children:(0,h.jsxs)(ta.A.Dragger,{multiple:!1,showUploadList:!1,accept:".json",onChange:e=>{let{file:t}=e;r(t)},style:{width:"100%"},beforeUpload:()=>!1,children:[(0,h.jsx)("p",{className:"ant-upload-drag-icon",children:(0,h.jsx)(ts.A,{})}),(0,h.jsx)("p",{className:"ant-upload-text",children:"Click or drag JSON file to this area to upload and analyze your stats.json or rsdoctor's rsdoctor-data.json."}),(0,h.jsxs)("p",{className:"ant-upload-hint",children:["The rsdoctor's rsdoctor-data.json is in brief mode, and use the file type: ['json'].",(0,h.jsx)("a",{href:"https://rsdoctor.rs/zh/config/options/output#mode-brief",target:"_blank",rel:"noopener noreferrer",children:"Check the details."})]}),(0,h.jsx)("p",{className:"ant-upload-hint",children:"By default, Rsdoctor will emit the rsdoctor-data.json to the output folder."})]})})}},13409:function(e,t,r){r.d(t,{Bq:()=>f,ME:()=>p,Rz:()=>x,Zb:()=>g,h4:()=>v,jC:()=>y});var s=r(65723),n=r(98148),i=r(16703),a=r(98369),l=r(37622),o=r(45586),d=r(8208),c=r(76847),u=r(96800);let h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",r=null==e?void 0:e.indexOf(t);return -1===r?null:0===r?t+(h(null==e?void 0:e.slice(1))||""):null==e?void 0:e.slice(0,r)};function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0,s=0,n=[],i=e;for(;s<t&&(i.filter(r).forEach(e=>{e.isLeaf||n.push(e.key)}),(i=i.reduce((e,t)=>e.concat(t.children||[]),[])).length);)s++;return n}let m="__BASENAME__";function f(e){let{files:t,sep:r="/",inlinedResourcePathKey:s="__RESOURCEPATH__",fileTitle:i=(e,t)=>t,dirTitle:a=(e,t)=>t,page:l="other"}=e,o=new RegExp(r),d=t.reduce((e,t)=>{let a=h(t,r),d=a?null==t?void 0:t.slice(a.length+1):t,c=e;for(;a;){let e=c.children.find(e=>e.title===a);if(!e){let t=[c[s],a].filter(Boolean).join(r);e={title:a,icon:"bundle"===l?e=>A(e,!1):null,key:t,children:[],[s]:t,[m]:a},c.children.push(e)}c=e,d=(a=h(d))?d.slice(a.length).replace(o,""):d}return c.children.some(e=>(0,n.J)(e,s)===t)||c.children.push({title:()=>i(t,d),icon:"bundle"===l?e=>A(e):null,key:t,isLeaf:!0,[s]:t,[m]:d}),e},{key:"0",children:[]}).children;return d.forEach(e=>{e.children&&e.children.forEach(t=>(function e(t,r){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:(e,t)=>t;if(!t.isLeaf)if(r.children&&1===r.children.length){let a=[r[m],t[m]].join(s);r[n]=t[n],r[m]=a,r.key=[r.key,t.key].join("-"),r.children=t.children,r.title=i(r,a),t.children&&t.children.forEach(t=>{e(t,r,s,n,i)})}else t.title=i(t,t[m]),t.children&&t.children.forEach(r=>{e(r,t,s,n,i)})})(t,e,r,s,a))}),d}function g(e,t){return e.startsWith(t)?e.replace(t,"."):e}function y(e){return new Promise((t,r)=>{let s=new FileReader;s.onloadend=()=>{let{result:e}=s;console.log("reader result: ",e);try{let r=JSON.parse(e.toString());t(r)}catch(e){i.Ay.error("json parse error"),r(e)}},s.onerror=()=>{let e="upload json file error, please try again.";i.Ay.error(e),r(Error(e))},s.readAsText(e.originFileObj||e)})}function x(e,t){let r=g(e,t),s="/node_modules/",n=r.lastIndexOf(s);return n>-1?{alias:r.slice(n+s.length),inNodeModules:!0}:{alias:r,inNodeModules:!1}}function A(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{data:r}=e,n=e.expanded;return(null==r?void 0:r.children)?(0,s.jsxs)(a.A,{children:[t?(0,s.jsx)(l.A,{className:`file-tree-switcher-arrow ${n?"file-tree-switcher-arrow-expand":""}`}):(0,s.jsx)(s.Fragment,{}),n?(0,s.jsx)(o.A,{}):(0,s.jsx)(d.A,{})]}):e.eventKey&&"string"==typeof e.eventKey?(0,u.C)(e.eventKey):(0,s.jsx)(c.A,{})}function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dist",r=function e(t){if(!t.children||0===t.children.length)return t;let r=t;for(;r.children&&1===r.children.length&&!r.children[0].sourceSize;)r={name:r.name+"/"+r.children[0].name,children:r.children[0].children};return r.children&&(r.children=r.children.map(e)),r}(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dist",r={name:t,children:[],_map:new Map};for(let t of e){let e=t.path.split(/[\\/]/).filter(Boolean),a=r;for(let r=0;r<e.length;r++){let l=e[r];if(r===e.length-1){var s,n,i;a.children||(a.children=[]),a.children.push({name:l,path:t.path,sourceSize:(null==(s=t.size)?void 0:s.sourceSize)??0,bundledSize:(null==(n=t.size)?void 0:n.parsedSize)??0,gzipSize:(null==(i=t.size)?void 0:i.gzipSize)??0})}else{a._map||(a._map=new Map);let e=a._map.get(l);e||(e={name:l,children:[],_map:new Map},a.children.push(e),a._map.set(l,e)),a=e}}}return!function e(t){delete t._map,t.children&&t.children.forEach(e)}(r),r}(e,t));return!function e(t){if(!t.children||0===t.children.length)return{sourceSize:t.sourceSize??0,bundledSize:t.bundledSize??0,gzipSize:t.gzipSize??0};let r=0,s=0,n=0;for(let i of t.children){let{sourceSize:t,bundledSize:a,gzipSize:l}=e(i);r+=t,s+=a,n+=l}return t.sourceSize=r,t.bundledSize=s,t.gzipSize=n,{sourceSize:r,bundledSize:s,gzipSize:n}}(r),r}},128:function(e,t,r){r.d(t,{changeOrigin:()=>B.$G,useUrlQuery:()=>y,formatPercent:()=>z.l,useDuplicatePackagesByErrors:()=>S,setViewModeToStorage:()=>p.ZI,useCompileAlertsByErrors:()=>v,useLocale:()=>E.Ym,useTheme:()=>E.DP,getFirstVisitFromStorage:()=>p.R7,useDataLoader:()=>s.V,useModuleGraphInstanceByModuleGraph:()=>E.mB,setFirstVisitToStorage:()=>p.Yh,formatCosts:()=>R.a4,mapFileKey:()=>n.ME,hasCompile:()=>_.c,readJSONByFileReader:()=>n.jC,useDetectIfCloudIdeEnv:()=>D,useViewMode:()=>E.an,createFileStructures:()=>n.Bq,isDef:()=>B.C8,setThemeToStorage:()=>p.Kv,useWebpackConfigurationByConfigs:()=>j,getLocale:()=>b,getDemoUrl:()=>B.JI,flattenTreemapData:()=>n.h4,useRuleIndexNavigate:()=>g,getShortPath:()=>B.Ml,useI18n:()=>f,isJsDataUrl:()=>B.XC,fetchManifest:()=>C.Cj,hasBundle:()=>_.r,useUniqModules:()=>A,getLanguage:()=>w,useModuleGraph:()=>x,hasViewModeFromStorage:()=>p.it,formatSize:()=>z.X,getEnableRoutesFromUrlQuery:()=>B.TR,beautifyModulePath:()=>n.Rz,filterLoader:()=>M.ak,beautifyPath:()=>n.Zb});var s=r(63546),n=r(13409),i=r(32792),a=r(83397),l=r(51362),o=r(54625);r(22155);var d=r(66927),c=r(61323),u=r(31337),h=r.n(u);r(19023);var p=r(75302);let m=a.Client.RsdoctorClientRoutes.RuleIndex,f=()=>{let{i18n:e,...t}=(0,d.B)();return{...t,i18n:{...e,changeLanguage:(t,r)=>e.changeLanguage(t,(e,s)=>{e||(0,p.XX)(t),r&&r(e,s)})}}};function g(e,t){let r=(0,c.Zp)();return t?()=>window.open(t,"__blank"):()=>{r(`${m}?${a.Rule.RsdoctorRuleClientConstant.UrlQueryForErrorCode}=${e}`)}}function y(){let e=(0,c.zy)().search||location.search,{query:t}=h()(e,!0);return t}function x(e){let t=e;"string"==typeof t&&(e=JSON.parse(i.oG.decompressText(t)));var r=e,s={dependencies:[],modules:[],moduleGraphModules:[],exports:[],sideEffects:[],variables:[]};return r&&"object"==typeof r?Array.isArray(r)?s:(0,l.N)(r,s):s}function A(e){return(0,o.h)(e,e=>e.path)}function v(e){return Array.isArray(e)?e.filter(e=>e.category===a.Rule.RuleMessageCategory.Compile&&e.code!==a.Rule.RuleMessageCodeEnumerated.Overlay):[]}function S(e){return(Array.isArray(e)?e.filter(e=>e.category===a.Rule.RuleMessageCategory.Bundle&&e.code!==a.Rule.RuleMessageCodeEnumerated.Overlay):[]).filter(e=>e.code===a.Rule.RuleErrorMap.E1001.code)}function j(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.find(e=>"webpack"===e.name||"rspack"===e.name):null}function D(){return!!("https:"===window.location.protocol&&window.location.href.indexOf("ide-proxy")>0)}var M=r(78870),I=r(75053),P=r(28599),k=r(43928);function b(e){return"cn"===e||"zh-CN"===e?I.A:P.A}function w(e){return"cn"===e||"zh"===e?k.TM.Cn:k.TM.En}var E=r(27124),C=r(18586),_=r(33061),z=r(39800);r(13592);var R=r(84080),B=r(30050);r(91343),r(62348)},62348:function(e,t,r){r.d(t,{A:()=>a,k:()=>l});var s=r(83397),n=r(80806),i=r(43012);function a(e){return(0,i.c)(e.assets)&&(0,i.c)(e.chunks)}async function l(e){return(await Promise.all(e.map(async e=>{let t=n.L2.chunkTransform(new Map,e),r=n.zG.getModuleGraphByStats(e,".",t);await n.L2.getAssetsModulesData(r,t,e.outputPath||"",{},void 0);let i=n.ps.fromModuleGraph(r,".");return{hash:e.hash||"",moduleGraph:await r.toData(),chunkGraph:t.toData(s.SDK.ToDataType.Normal),packageGraph:i.toData()}}))).map(e=>({client:{enableRoutes:[]},data:{pid:0,root:"",errors:[],configs:[],plugin:{},summary:{costs:[]},envinfo:{},resolver:[],loader:[],moduleCodeMap:{},...e}}))}},30050:function(e,t,r){r.d(t,{$G:()=>d,C8:()=>h,JI:()=>c,Ml:()=>u,TR:()=>o,XC:()=>a,kJ:()=>l});var s=r(31337),n=r.n(s),i=r(83397);function a(e){return e.startsWith("data:text/javascript;")}function l(){let{query:e}=n()(location.href,!0),t=e[i.Client.RsdoctorClientUrlQuery.ManifestFile];if(t)return decodeURIComponent(t)}function o(){let{query:e}=n()(location.href,!0),t=e[i.Client.RsdoctorClientUrlQuery.EnableRoutes];if(!t&&location.hash&&(t=n()(location.hash,!0).query[i.Client.RsdoctorClientUrlQuery.EnableRoutes]),!t&&location.hash){let e=location.hash,r=e.indexOf("?");-1!==r&&(t=new URLSearchParams(e.substring(r+1)).get(i.Client.RsdoctorClientUrlQuery.EnableRoutes)||void 0)}if(t)try{return JSON.parse(decodeURIComponent(t))}catch(e){console.warn("Failed to parse enableRoutes from URL query:",e)}}function d(e){let t=n()(location.href,!0),r=n()(e,!0);return t.hash.endsWith(i.Client.RsdoctorClientRoutes.Uploader)&&t.set("hash",i.Client.RsdoctorClientRoutes.Overall),t.set("origin",e),t.set("protocol",r.protocol),t.set("host",r.host),t.set("port",r.port),t.toString()}function c(){return null}let u=e=>{if((null==e?void 0:e.indexOf("node_modules"))>=0){let t=e.split("node_modules");return`node_modules${t[t.length-1]}`}return(null==e?void 0:e.length)?`${null==e?void 0:e.split("/").slice(-4).join("/")}`:e};function h(e){return null!=e}},80806:function(e,t,r){r.d(t,{L2:()=>p,dh:()=>G,nV:()=>C,ps:()=>U,zG:()=>m});var s=r(83397),n=r(46068),i=r(13078),a=r.n(i),l=r(32792),o=r(31691),d=r(99566),c=r(85409),u=r(8963).Buffer,h={};h.d=(e,t)=>{for(var r in t)h.o(t,r)&&!h.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},h.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),h.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var p={};h.r(p),h.d(p,{assetsContents:()=>J,chunkTransform:()=>V,getAssetsModulesData:()=>q,transformAssetsModulesData:()=>Y});var m={};h.r(m),h.d(m,{getImportKind:()=>X,getModuleGraphByStats:()=>ea,getModulesFromArray:()=>ei,getPositionByStatsLocation:()=>et,isImportDependency:()=>Q,isWebpack5orRspack:()=>er,removeNoImportStyle:()=>ee});var f={};h.r(f),h.d(f,{transStats:()=>el});var g={};h.r(g),h.d(g,{getAllModules:()=>eS,getDependencyPosition:()=>eg,getEntryModule:()=>ef,getExportDependency:()=>ey,getExportStatement:()=>eA,getLastExportInfo:()=>ev,getModuleSource:()=>em,getResolveRequest:()=>eh,getSdkDependencyByWebpackDependency:()=>ex,getWebpackDependencyRequest:()=>eu,getWebpackModuleId:()=>ed,getWebpackModulePath:()=>ec,isExternalModule:()=>ep,isNormalModule:()=>eo});class y{isEntry(){return this.entry}isChunkEntryModule(e){return e.isEntry||e.getImported().every(e=>!this.hasModule(e))}hasModule(e){return this._modules.includes(e)}addModule(e){this.hasModule(e)||(this._modules.push(e),e.addChunk(this))}addAsset(e){this._assets.push(e)}addModules(e){e.forEach(e=>{this.hasModule(e)||(this._modules.push(e),e.addChunk(this))})}addDependency(e){this._dependencies.includes(e)||this._dependencies.push(e)}addImported(e){this._imported.includes(e)||this._imported.push(e)}getAssets(){return this._assets.slice()}getModules(){return this._modules.slice()}getDependencies(){return this._dependencies.slice()}getImported(){return this._imported.slice()}setParsedSize(e){this._parsedSize=e}toData(){return{id:this.id,name:this.name,initial:this.initial,size:this.size,parsedSize:this._parsedSize||0,entry:this.isEntry(),assets:this._assets.map(e=>{let{path:t}=e;return t}),modules:this._modules.map(e=>{let{id:t}=e;return t}),dependencies:this._dependencies.map(e=>{let{id:t}=e;return t}),imported:this._imported.map(e=>{let{id:t}=e;return t})}}setDependencies(e){this._dependencies=e}setImported(e){this._imported=e}setModules(e){this._modules=e}setAssets(e){this._assets=e}constructor(e,t,r,s,n){this._assets=[],this._modules=[],this._dependencies=[],this._imported=[],this.id=e,this.name=t,this.size=r,this.initial=s,this.entry=n}}class x{getAssets(){return Array.from(this._assetMap.values())}getChunks(){return Array.from(this._chunkMap.values())}addAsset(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];t.forEach(e=>{this._assetMap.set(e.id,e),this._assetPathMap.set(e.path,e)})}addChunk(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];t.forEach(e=>{this._chunkMap.set(e.id,e)})}getChunkById(e){return this._chunkMap.get(e)}getAssetByPath(e){return this._assetPathMap.get(e)}getAssetById(e){return this._assetMap.get(e)}getEntryPoints(){return Array.from(this._entrypointMap.values())}getEntryPointById(e){return this._entrypointMap.get(e)}addEntryPoint(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];t.forEach(e=>{this._entrypointMap.set(e.id,e)})}toData(e){return{assets:Array.from(this._assetMap.values()).map(t=>t.toData(e)),chunks:Array.from(this._chunkMap.values()).map(e=>e.toData()),entrypoints:Array.from(this._entrypointMap.values()).map(e=>e.toData())}}setChunks(e){this._chunkMap=new Map(e.map(e=>[e.id,e]))}setEntrypoints(e){this._entrypointMap=new Map(e.map(e=>[e.id,e]))}setAssets(e){this._assetMap=new Map(e.map(e=>[e.id,e])),this._assetPathMap=new Map(e.map(e=>[e.path,e]))}constructor(){this._assetMap=new Map,this._assetPathMap=new Map,this._chunkMap=new Map,this._entrypointMap=new Map}}let A=1;class v{static init(){A=1}toData(e){var t;return{id:this.id,path:this.path,size:this.size,gzipSize:this.gzipSize,chunks:null==(t=this.chunks)?void 0:t.map(e=>e.id),content:e===s.SDK.ToDataType.NoSourceAndAssets||e===s.SDK.ToDataType.NoCode?"":this.content}}setChunks(e){this.chunks=e}setId(e){this.id=e}setGzipSize(e){this.gzipSize=(0,n.gzipSync)(e,{level:9}).length}constructor(e,t,r,s){this.id=A++,this.path=e,this.size=t,this.chunks=r,this.content=s}}let S=1;class j{static init(){S=1}addChunk(e){this._chunks.includes(e)||this._chunks.push(e)}addAsset(e){this._assets.includes(e)||this._assets.push(e)}toData(){return{id:this.id,name:this.name,chunks:this._chunks.map(e=>e.id),assets:this._assets.map(e=>e.path),size:this._assets.length?this._assets.reduce((e,t)=>e+t.size,0):0}}setChunks(e){this._chunks=e}setAssets(e){this._assets=e}setId(e){this.id=e}constructor(e){this.name=e,this._chunks=[],this._assets=[],this.id=S++}}let D=1;class M{static init(){D=1}get resolvedRequest(){return this.dependency.path}get dependency(){return this.originDependency.rootModule??this.originDependency}get originDependency(){return this._originDependency}get kindString(){return s.SDK.DependencyKind[this.kind]}get resolveConcatenationModule(){return this.dependency.kind===s.SDK.ModuleKind.Concatenation}isSameWithoutStatements(e){return this.request===e.request&&this.kind===e.kind&&this.module.id===e.module.id&&this.dependency.id===e.dependency.id}addStatement(e){this.hasStatement(e)||this.statements.push(e)}hasStatement(e){return this.statements.some(t=>t.isSame(e))}setBuildMeta(e){this.meta={...this.meta,...e}}toData(){return{id:this.id,request:this.request,resolvedRequest:this.resolvedRequest,kind:this.kind,module:this.module.id,dependency:this.dependency.id,originDependency:this.originDependency.id,statements:this.statements.map(e=>e.toData())}}setId(e){this.id=e}constructor(e,t,r,s,n){this.statements=[],this.meta={exportsType:"default-with-named"},this.id=D++,this.request=e,this.module=t,this._originDependency=r,this.kind=s,this.statements=n??[]}}function I(e,t){return e.line===t.line&&e.column===t.column}M.kind=s.SDK.DependencyKind;let P=/!/,k=/\s\+\s\d*\smodules$/,b=/^css\s.*node_modules(?!\/)/;class w{static getDefaultStatement(e){let t={line:1,column:0},r={start:{...t},end:{...t}};return new w(e,{source:{...r},transformed:{...r}})}isSame(e){var t,r;return this.module.id===e.module.id&&(t=this.position.transformed,r=e.position.transformed,!!I(t.start,r.start)&&(l.AP.isNil(t.end)||l.AP.isNil(r.end)?l.AP.isUndefined(t.end)&&l.AP.isUndefined(r.end):I(t.end,r.end)))}getSourcePosition(){let{module:e,position:t}=this;return t.source?t.source:e.getSourceMap()?(t.source=e.getSourceRange(t.transformed),t.source):void 0}getLineCode(){let e=this.module.isPreferSource&&this.position.source,t=this.module.getSource(),r=e?t.source:t.transformed,s=e?this.position.source.start.line:this.position.transformed.start.line;if("number"==typeof s)return r.split("\n")[s-1]}toData(){let e={transformed:this.position.transformed};return this.position.source&&(e.source=this.position.source),{position:e,module:this.module.id}}constructor(e,t){this.module=e,this.position=t}}let E=1;class C{static init(){E=1}get rootModule(){return this.modules.find(e=>e.path===this.path)}get isPreferSource(){if("boolean"==typeof this._isPreferSource)return this._isPreferSource;let e=this.source.source.length>0&&"test code"!==this.source.source&&!!this.sourceMap;return this._isPreferSource=e,e}addBailoutReason(e){this.bailoutReason.push(e)}getBailoutReason(){return this.bailoutReason}getChunks(){return this.chunks.slice()}addChunk(e){this.chunks.includes(e)||(this.chunks.push(e),e.addModule(this))}removeChunk(e){this.chunks=this.chunks.filter(t=>t!==e)}getDependencies(){return this.dependencies.slice()}getDependencyByRequest(e){return this.dependencies.find(t=>t.request===e)}getDependencyByModule(e){return this.dependencies.find(t=>t.originDependency===e||t.dependency===e)}addDependency(e,t,r,s){let n=new M(e,this,t,r,s);if(this.dependencies.every(e=>!e.isSameWithoutStatements(n)))return this.dependencies.push(n),t.addImported(this),t.rootModule&&t.rootModule.addImported(this),n}removeDependency(e){this.dependencies=this.dependencies.filter(t=>t===e)}removeDependencyByModule(e){let t=this.getDependencyByModule(e);t&&this.removeDependency(t)}getImported(){return this.imported.slice()}addImported(e){this.imported.includes(e)||this.imported.push(e)}removeImported(e){this.imported=this.imported.filter(t=>t===e)}setProgram(e){this.program=e}getProgram(){return this.program}setSource(e){let{source:t}=this;t.source=e.source??t.source,t.transformed=e.transformed??t.transformed,t.parsedSource=e.parsedSource??t.parsedSource}getSource(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.SDK.ToDataType.Normal;return e===s.SDK.ToDataType.NoCode?{source:"",transformed:"",parsedSource:""}:e===s.SDK.ToDataType.NoSourceAndAssets||e===s.SDK.ToDataType.NoSource?{source:"",transformed:"",parsedSource:this.isPreferSource?"":this.source.parsedSource}:e===s.SDK.ToDataType.All?{source:this.source.source,transformed:this.source.transformed,parsedSource:this.isPreferSource?"":this.source.parsedSource}:{source:this.source.source,transformed:"",parsedSource:this.isPreferSource?"":this.source.parsedSource}}setSourceMap(e){this.sourceMap=e}getSourceMap(){return this.sourceMap}setSize(e){let{size:t}=this;if(t.sourceSize=e.sourceSize??t.sourceSize,t.transformedSize=e.transformedSize??t.transformedSize,t.parsedSize=e.parsedSize??t.parsedSize,"number"==typeof e.gzipSize)t.gzipSize=e.gzipSize;else{let e=this.source.parsedSource||this.source.source;if(e&&"string"==typeof e&&e.length>0)try{t.gzipSize=(0,n.gzipSync)(e,{level:9}).length}catch(e){t.gzipSize=0}}}getSize(){return{...this.size}}getStatement(e){return new w(this,{source:this.getSourceRange(e),transformed:{start:{...e.start},end:e.end?{...e.end}:void 0}})}getSourceRange(e){let{sourceMap:t}=this;if(!t)return;let r={start:{}},s=t.originalPositionFor({line:e.start.line??0,column:e.start.column??0,bias:1});if(l.AP.isNumber(s.line)&&(r.start={line:s.line,column:s.column??void 0}),e.end){let s=t.originalPositionFor({line:e.end.line??0,column:e.end.column??0});l.AP.isNumber(s.line)&&(r.end={line:s.line,column:s.column??void 0})}return r}addNormalModule(e){this.modules.includes(e)||(this.modules.push(e),e.addConcatenationModule(this))}getNormalModules(){return this.modules.slice()}addConcatenationModule(e){this.concatenationModules.includes(e)||this.concatenationModules.push(e)}addIssuerPath(e){var t;(null==(t=this.issuerPath)?void 0:t.length)||(this.issuerPath=e)}getIssuerPath(){return this.issuerPath}getConcatenationModules(){return this.concatenationModules.slice()}toData(e,t){var r;let{isPreferSource:s}=this,n=function(e){if(!e)return"";if(P.test(e)){let t=l.AP.last(e.split(P));if(null==t?void 0:t.trim())return t}return k.test(e)?e.replace(k,""):b.test(e)?e.replace(b,""):e}(this.webpackId),i={id:this.id,renderId:this.renderId,webpackId:e&&n.indexOf(".")>0?a().relative(e,n):this.webpackId,path:this.path,isPreferSource:s,dependencies:this.dependencies.map(e=>e.id),imported:this.imported.map(e=>e.id),chunks:this.chunks.map(e=>e.id),size:this.getSize(),kind:this.kind,...this.layer?{layer:this.layer}:{},issuerPath:t?void 0:(null==(r=this.issuerPath)?void 0:r.filter(e=>e.moduleId).map(e=>e.moduleId))||[],bailoutReason:t?void 0:this.bailoutReason};return(this.meta.hasSetEsModuleStatement||this.meta.strictHarmonyModule)&&(i.meta={},this.meta.hasSetEsModuleStatement&&(i.meta.hasSetEsModuleStatement=!0),this.meta.strictHarmonyModule&&(i.meta.strictHarmonyModule=!0)),this.isEntry&&(i.isEntry=this.isEntry),this.modules.length>0&&(i.modules=this.modules.map(e=>e.id)),this.rootModule&&(i.rootModule=this.rootModule.id),this.concatenationModules.length>0&&(i.concatenationModules=this.concatenationModules.map(e=>e.id)),i}setId(e){this.id=e}setRenderId(e){this.renderId=e}setChunks(e){this.chunks=e}setDependencies(e){this.dependencies=e}setImported(e){this.imported=e}setModules(e){this.modules=e}setConcatenationModules(e){this.concatenationModules=e}constructor(e,t,r=!1,n=s.SDK.ModuleKind.Normal,i,a=""){this.issuerPath=[],this.bailoutReason=[],this.source={source:"",transformed:"",parsedSource:""},this.size={sourceSize:0,transformedSize:0,parsedSize:0,gzipSize:0},this.chunks=[],this.dependencies=[],this.imported=[],this.modules=[],this.concatenationModules=[],this.meta={hasSetEsModuleStatement:!1,strictHarmonyModule:!1},this.id=E++,this.webpackId=e,this.path=t,this.isEntry=r,this.kind=n,this.renderId=i,this.layer=a}}C.kind=s.SDK.ModuleKind;let _=1;class z{static init(){_=1}get isReExport(){return!!this.from}set variable(e){this._variable=e}get variable(){var e;if(this._variable)return this._variable;if(!this.from||!1===this._variable){this._variable=!1;return}let t=null==(e=this.getRecursiveExport())?void 0:e.variable;return t||(this._variable=!1),t}addSideEffect(e){this._sideEffects.every(t=>t.id!==e.id)&&(this._sideEffects.push(e),this.from&&this.from.addSideEffect(e))}getSideEffects(){return this._sideEffects.slice()}setFromExport(e){this.from=e}getRecursiveExport(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0;if(0===e)throw Error("`getRecursiveExport` method parameter depth must be greater than 1.");if(!this.from)return this;let t=0,r=this;for(;r.from&&t<e;)t++,r=r.from;return r}toData(){let e={id:this.id,name:this.name,isReExport:this.isReExport,used:this._sideEffects.map(e=>e.id)};return this.from&&(e.from=this.from.id,e.root=this.getRecursiveExport().id),this.variable&&(e.variable=this.variable.id),e}constructor(e,t,r){this.id=_++,this._sideEffects=[],this.name=e,this.identifier=t,this._variable=r}}let R=1;class B{static init(){R=1}get variable(){var e,t;if(void 0!==this._variable)return this._variable?this._variable:void 0;let r=null==(t=this.exports[0])||null==(e=t.getRecursiveExport())?void 0:e.variable;return this._variable=r??!1,r}get exports(){var e;return(null==(e=this._exports)?void 0:e.slice())??[]}setModuleExport(e){e.getExports().forEach(e=>this.setExportInfo(e))}setExportInfo(e){this._exports.push(e),e.addSideEffect(this)}toData(){let e={id:this.id,name:this.name,identifier:this.identifier.toData(),module:this.module.id};return this.fromDependency&&(e.fromDependency=this.fromDependency.id),this.isNameSpace&&(e.isNameSpace=this.isNameSpace),this.exports.length>0&&(e.exports=this.exports.map(e=>e.id)),this.variable&&(e.variable=this.variable.id),e}constructor(e,t,r,s,n){this.id=R++,this._exports=[],this.name=e,this.module=t,this.identifier=r,s&&(this.fromDependency=this.module.getDependencyByRequest(s)),n===B.NamespaceSymbol?this.isNameSpace=!0:(this.isNameSpace=!1,this.originName=n)}}B.NamespaceSymbol=Symbol("namespace");let N=1;class T{static init(){N=1}get isUsed(){return!!this._exported&&this._exported.getSideEffects().length>0}setExportInfo(e){this._exported=e,e.variable=this}getExportInfo(){return this._exported}toData(){let e={id:this.id,name:this.name,module:this.module.id,identifier:this.identifier.toData(),usedInfo:this.usedInfo};return this._exported&&(e.exported=this._exported.id),e}constructor(e,t,r,s){this.id=N++,this.name=e,this.module=t,this.usedInfo=r,this.identifier=s}}class O{static init(){z.init(),B.init(),T.init()}get dynamic(){return"boolean"==typeof this._dynamic?this._dynamic:this.module.getImported().map(e=>e.getDependencyByModule(this.module)).some(e=>e&&"dynamic"===e.meta.exportsType)}addExportInfo(e){this.exports.push(e),this._graph.addExportInfo(e)}addSideEffect(e){this.sideEffects.push(e),this._graph.addSideEffect(e)}addVariable(e){this.variables.push(e),this._graph.addVariable(e)}getExports(){return this.exports.slice()}getSideEffects(e){return e?this.sideEffects.filter(t=>t.name===e):this.sideEffects.slice()}getOwnExports(){return this.exports.filter(e=>!e.isReExport)}getExport(e){return this.exports.find(t=>t.name===e)}getReExports(){return this.exports.filter(e=>e.isReExport)}getOwnExport(e){return this.getOwnExports().find(t=>t.name===e)}getReExport(e){return this.getReExports().find(t=>t.name===e)}toData(){return{module:this.module.id,dynamic:this.dynamic,exports:this.exports.map(e=>e.id),sideEffects:this.sideEffects.map(e=>e.id),variables:this.variables.map(e=>e.id)}}constructor(e,t,r){this.exports=[],this.sideEffects=[],this.variables=[],this.module=e,this._graph=t,"boolean"==typeof this._dynamic&&(this._dynamic=r)}}class G{static init(){C.init(),M.init(),O.init()}static fromData(e){let t=new G,r=e=>new w(t.getModuleById(e.module),e.position);for(let r of e.modules??[]){var s,n;let e=new C(String(r.id),r.path,r.isEntry,r.kind,r.renderId,r.layer);e.id=r.id,e.setSize(r.size),e.meta={strictHarmonyModule:(null==(s=r.meta)?void 0:s.strictHarmonyModule)??!1,hasSetEsModuleStatement:(null==(n=r.meta)?void 0:n.hasSetEsModuleStatement)??!1},e._isPreferSource=r.isPreferSource,e.chunks=r.chunks,t.addModule(e)}for(let s of e.modules??[]){let n=t.getModuleById(s.id);for(let i of s.dependencies){let s=(e.dependencies??[]).find(e=>e.id===i),a=s&&t.getModuleById(s.originDependency);if(!s||!a){console.warn(`The connection data ID is empty: ${i}`);continue}let l=n.addDependency(s.request,a,s.kind,s.statements.map(r));l&&(l.id=s.id,t.addDependency(l))}for(let e of s.modules??[]){let r=t.getModuleById(e);if(!r){console.warn(`Add the ordinary module ID as empty: ${e}`);continue}n.addNormalModule(r)}for(let e of s.concatenationModules??[]){let r=t.getModuleById(e);if(!r){console.warn(`The aggregation module ID is empty: ${r}`);continue}n.addConcatenationModule(r)}}for(let s of e.exports??[]){let e=new z(s.name,s.identifier?r(s.identifier):void 0);e.id=s.id,t.addExportInfo(e)}for(let r of e.exports??[])if(r.from){let e=t._exportIdMap.get(r.id),s=t._exportIdMap.get(r.from);e&&s&&e.setFromExport(s)}for(let s of e.variables??[]){let e=t.getModuleById(s.module);if(!e){console.warn(`The module ID in the variable is empty:${s.module}`);continue}let n=new T(s.name,e,s.usedInfo,r(s.identifier)),i=t._exportIdMap.get(s.exported??-1);i&&n.setExportInfo(i),n.id=s.id,t.addVariable(n)}for(let s of e.sideEffects??[]){let e=t.getModuleById(s.module);if(!e){console.warn(`The module ID in the side effects is empty:${s.module}`);continue}let n=new B(s.name,e,r(s.identifier),s.originName);for(let e of(n.isNameSpace=s.isNameSpace,n.id=s.id,s.exports??[])){let r=t._exportIdMap.get(e);r&&r.addSideEffect(n)}if(s.variable){let e=t._varIdMap.get(s.variable);e&&(n._variable=e)}t.addSideEffect(n)}for(let r of e.moduleGraphModules??[]){let e=t.getModuleById(r.module);if(!e){console.warn(`The module ID in ModuleGraphModule is empty: ${r.module}`);continue}let s=new O(e,t,r.dynamic);t.addModuleGraphModule(s),r.exports.forEach(e=>{let r=t._exportIdMap.get(e);r&&s.addExportInfo(r)}),r.sideEffects.forEach(e=>{let r=t._sideEffectIdMap.get(e);r&&s.addSideEffect(r)}),r.variables.forEach(e=>{let r=t._varIdMap.get(e);r&&s.addVariable(r)})}return G.init(),t}clear(){this._dependenciesIdMap=new Map,this._moduleWebpackIdMap=new Map,this._moduleIdMap=new Map,this._moduleGraphModules=new Map,this._exportIdMap=new Map,this._sideEffectIdMap=new Map,this._varIdMap=new Map,this._layers=new Map}size(){return this._moduleIdMap.size}fromInstance(e){this._dependenciesIdMap=new Map(e._dependenciesIdMap),this._moduleWebpackIdMap=new Map(e._moduleWebpackIdMap),this._moduleIdMap=new Map(e._moduleIdMap),this._moduleGraphModules=new Map(e._moduleGraphModules),this._exportIdMap=new Map(e._exportIdMap),this._sideEffectIdMap=new Map(e._sideEffectIdMap),this._varIdMap=new Map(e._varIdMap),this._layers=new Map(e._layers)}getSubGraphByModule(e){let t=new Set,r=[e];t.add(e);for(let e=0;e<r.length;e++)for(let{dependency:s}of r[e].getDependencies())t.has(s)||(t.add(s),r.push(s));return r}getModules(){return Array.from(this._moduleWebpackIdMap.values())}getDependencies(){return Array.from(this._dependenciesIdMap.values())}getEntryModules(){return this.getModules().filter(e=>e.isEntry&&e.kind!==s.SDK.ModuleKind.Concatenation)}getModuleById(e){return this._moduleIdMap.get(e)}getDependencyById(e){return this._dependenciesIdMap.get(e)}getModuleByWebpackId(e){return this._moduleWebpackIdMap.get(e)}getModuleByFile(e){return this.getModules().find(t=>t.path===e)}addModule(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];for(let e of t)!this._moduleIdMap.has(e.id)&&(this._moduleWebpackIdMap.set(e.webpackId,e),this._moduleIdMap.set(e.id,e),e.layer&&this.addLayer(e.layer))}addDependency(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];for(let e of t)this._dependenciesIdMap.has(e.id)||(this._dependenciesIdMap.set(e.id,e),this.addModule(e.module),this.addModule(e.dependency))}removeModule(e){for(let t of(this._moduleIdMap.delete(e.id),this._moduleWebpackIdMap.delete(e.webpackId),e.getDependencies()))this.removeDependency(t),this._dependenciesIdMap.delete(t.id);for(let t of e.getImported())t.removeDependencyByModule(t)}removeDependency(e){e.module.removeDependency(e),e.dependency.removeImported(e.module),this._dependenciesIdMap.delete(e.id)}addModuleGraphModule(e){this._moduleGraphModules.has(e.module)||this._moduleGraphModules.set(e.module,e)}getModuleGraphModule(e){return this._moduleGraphModules.get(e)}getModuleGraphModules(){return Array.from(this._moduleGraphModules.values())}addExportInfo(e){this._exportIdMap.set(e.id,e)}addSideEffect(e){this._sideEffectIdMap.set(e.id,e)}addVariable(e){this._varIdMap.set(e.id,e)}addLayer(e){this._layers.get(e)||this._layers.set(e,1)}getLayers(){return this._layers}toData(e){var t;let r=!!((null==e||null==(t=e.briefOptions)?void 0:t.type)&&e.briefOptions.type.length);return{dependencies:this.getDependencies().map(e=>e.toData()),modules:this.getModules().map(t=>t.toData(null==e?void 0:e.contextPath,r)),moduleGraphModules:r?[]:Array.from(this._moduleGraphModules.values()).map(e=>e.toData()),exports:r?[]:Array.from(this._exportIdMap.values()).map(e=>e.toData()),sideEffects:r?[]:Array.from(this._sideEffectIdMap.values()).map(e=>e.toData()),variables:r?[]:Array.from(this._varIdMap.values()).map(e=>e.toData()),layers:Array.from(this._layers.keys())}}toCodeData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.SDK.ToDataType.Normal,t={};return this.getModules().forEach(r=>{t[r.id]=r.getSource(e)}),t}setModules(e){this._moduleIdMap=new Map(e.map(e=>[e.id,e])),this._moduleWebpackIdMap=new Map(e.map(e=>[e.webpackId,e])),this._layers=new Map(e.filter(e=>e.layer).map(e=>[e.layer,1]))}setDependencies(e){this._dependenciesIdMap=new Map(e.map(e=>[e.id,e]))}constructor(){this._dependenciesIdMap=new Map,this._moduleWebpackIdMap=new Map,this._moduleIdMap=new Map,this._moduleGraphModules=new Map,this._exportIdMap=new Map,this._sideEffectIdMap=new Map,this._varIdMap=new Map,this._layers=new Map}}let K=1;class F{get name(){return this.dependency.name}get version(){return this.dependency.version}get root(){return this.dependency.root}isSame(e){return this.refDependency===e.refDependency&&this.dependency.isSame(e.dependency)}toData(){return{id:this.id,dependency:this.dependency.id,package:this.package.id,refDependency:this.refDependency.id}}constructor(e,t,r){this.id=K++,this.package=e,this.dependency=t,this.refDependency=r}}let $=(e,t)=>{let r,s=e;for(;"/"!==s&&!r&&(0,i.dirname)(s)!==s;)s=(0,i.dirname)(s),t&&(r=t((0,i.join)(s,"package.json"))),t?(null==r?void 0:r.name)||(r=void 0):r=l.lP.getPackageMetaFromModulePath(e);if(r)return!t||r.name&&r.version?{...r,root:s}:$((0,i.dirname)(s),t)},W=1;class L{setDuplicates(e){this.duplicates.push({module:e.module,chunks:e.chunks})}getModules(){return this._modules.slice()}getDependencies(){return this._dependencies.slice()}getImported(){return this._imported.slice()}addModule(e){this._modules.includes(e)||this._modules.push(e)}addDependency(e){this._dependencies.every(t=>!t.isSame(e))&&(this._dependencies.push(e),e.dependency.addImported(this))}getDependenciesChain(e){return function t(r,s){for(let n of e.getDependenciesFromPackage(r))if(n.refDependency&&!s.some(e=>e.dependency===r)){if(!n.package)return s.concat(n);return t(n.package,s.concat(n))}return s}(this,[])}addImported(e){this._imported.includes(e)||this._imported.push(e)}contain(e){var t;return!!e.includes(this.root)&&(t=(0,i.relative)(this.root,e),!/(^|[/\\])node_modules[/\\]/.test(t))}isSame(e){return this.root===e.root&&this.version===e.version&&this.name===e.name}getSize(){return this._modules.reduce((e,t)=>{let r=t.getSize();return e.sourceSize+=r.sourceSize,e.transformedSize+=r.transformedSize,e.parsedSize+=r.parsedSize,e.gzipSize+=r.gzipSize,e},{sourceSize:0,transformedSize:0,parsedSize:0,gzipSize:0})}toData(){return{id:this.id,name:this.name,root:this.root,version:this.version,modules:this.getModules().map(e=>e.id),size:this.getSize(),duplicates:this.duplicates}}constructor(e,t,r){this.id=W++,this._modules=[],this._dependencies=[],this._imported=[],this.name=e,this.root=t,this.version=r,this.duplicates=[]}}class U{static fromModuleGraph(e,t,r){let n=new U(t);for(let t of e.getModules().filter(e=>e.kind===s.SDK.ModuleKind.Normal)){if(!t.getChunks())continue;let e=n.getPackageByModule(t,r);e&&(n.addPackage(e),e.addModule(t))}for(let t of e.getDependencies()){let e=n.getPackageByFile(t.module.path),r=n.getPackageByFile(t.dependency.path);if(e&&r&&!e.isSame(r)){let s=new F(e,r,t);n.addDependency(s),e.addDependency(s)}}return n}getPackages(){return this._packages.slice()}getPackageByModule(e,t){let{path:r,meta:s}=e,{_pkgFileMap:n}=this,a=e=>this.getPackageByData(e)??new L(e.name,e.root,e.version);if(n.has(r))return n.get(r);if(s.packageData){let t=a(s.packageData);return this.setDuplicates(e,t),n.set(r,t),t}let l=this.getPackageContainFile(r);if(l)return n.set(r,l),l;let o=$(r,t);if(!o)return;o.root.startsWith(".")&&(o.root=(0,i.resolve)(this._root,o.root));let d=a(o);return this.setDuplicates(e,d),this.addPackage(d),n.set(r,d),d}getPackageByFile(e){return this._pkgFileMap.get(e)}getPackageContainFile(e){return this._packages.find(t=>t.contain(e))}getPackagesByName(e){return this._pkgNameMap.get(e)??[]}getPackageByData(e){var t;return null==(t=this._pkgNameMap.get(e.name))?void 0:t.find(t=>t.version===e.version&&t.root===e.root)}addPackage(e){if(this._packages.every(t=>!t.isSame(e))){this._packages.push(e);let{_pkgNameMap:t}=this,r=t.get(e.name)??[];r.every(t=>!t.isSame(e))&&(r.push(e),t.set(e.name,r))}}setDuplicates(e,t){let r=[],s=e.getChunks();s.forEach(e=>r.push(...e.getAssets().filter(e=>e.path.endsWith(".js")))),s.length>1&&t.setDuplicates({module:{id:e.id,path:e.path},chunks:r.map(e=>({name:e.path}))})}getDependenciesFromPackage(e){return this._dependencies.filter(t=>t.dependency===e)}addDependency(e){this._dependencies.every(t=>!t.isSame(e))&&this._dependencies.push(e)}getDependenciesFromOrigin(){return this._dependencies.filter(e=>!e.package)}getDuplicatePackages(){return(0,o.R)(Array.from(this._pkgNameMap.values()).map(e=>(0,o.R)(e,"version")).filter(e=>e.length>1),e=>e[0].name)}toData(){return{packages:this._packages.map(e=>e.toData()),dependencies:this._dependencies.map(e=>e.toData())}}constructor(e){this._dependencies=[],this._packages=[],this._pkgNameMap=new Map,this._pkgFileMap=new Map,this._root=e}}async function q(e,t,s,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new Map;if(n.parseBundle&&i.size<1){(0,d.kB)("Start Parse bundle by AST.");let{parseBundle:r=()=>({})}=n||{},i=t.getAssets(),o=e.getModules(),u=null,h=null;if(s&&i.length){for(let e of(u={},h={},i)){let t,n=a().join(s,e.path);try{t=r(n,o)}catch(s){let{code:e="",message:t}=s,r="ENOENT"===e?"no such file":t;"1"===c.env.DEVTOOLS_NODE_DEV&&d.vF.warn(`Error parsing bundle asset "${n}": ${r}`);continue}u[e.path]=l.AP.pick(t,["src","runtimeSrc"]),Object.assign(h,(null==t?void 0:t.modules)||{})}l.AP.isEmpty(u)&&(u=null,h=null,c.env.DEVTOOLS_DEV&&d.vF.warn("\nNo bundles were parsed. Analyzer will show only original module sizes from stats file.\n")),h&&Y(h,e)}(0,d.PZ)("Start Parse bundle by AST.")}else{for(let[t,s]of((0,d.kB)("Start Parse bundle by sourcemap."),i.entries())){let n,i=e.getModuleByFile(t);if(i){try{if(s&&"string"==typeof s&&s.length>0){let{gzipSync:e}=await Promise.resolve().then(r.t.bind(r,46068,23));n=e(s,{level:9}).length}}catch{}null==i||i.setSize({parsedSize:s.length,gzipSize:n}),null==i||i.setSource({parsedSource:s})}}(0,d.PZ)("Start Parse bundle by sourcemap.")}}function Y(e,t){t&&Object.entries(e).forEach(e=>{let[r,s]=e,i,a=t.getModuleByWebpackId(r??"");try{(null==s?void 0:s.content)&&"string"==typeof s.content&&s.content.length>0&&(i=(0,n.gzipSync)(s.content,{level:9}).length)}catch{}null==a||a.setSize({parsedSize:null==s?void 0:s.size,gzipSize:i}),null==a||a.setSource({parsedSource:(null==s?void 0:s.content)||""})})}let H="assets by status";function V(e,t){var r,s,n,i,a,l;let o=new x;if(null==(r=t.chunks)||r.forEach(e=>{var t,r;let s=new y(String(e.id),(null==(t=e.names)?void 0:t.join(""))||(null==(r=e.files)?void 0:r.join("| "))||"",e.size,e.initial,e.entry);s.setParsedSize(0),o.addChunk(s)}),(null==(s=t.assets)?void 0:s.every(e=>e.type===H))?null==(n=t.chunks)||n.forEach(t=>{let r=o.getChunkById(String(t.id));r&&t.files&&t.files.forEach(t=>{if(!o.getAssetByPath(t)){let{content:s=""}=e.get(t)||{},n=new v(t,0,[r],s);r.addAsset(n),o.addAsset(n)}})}):null==(i=t.assets)||i.forEach(t=>{var r;if(t.type===H)return;let s=(null==(r=t.chunks)?void 0:r.map(e=>o.getChunkById(String(e))).filter(e=>!!e))||[],{content:n=""}=e.get(t.name)||{},i=new v(t.name,t.size,s,n);s.forEach(e=>null==e?void 0:e.addAsset(i)),o.addAsset(i)}),t.entrypoints)for(let[e,r]of Object.entries(t.entrypoints)){let t=new j(r.name||e);null==(a=r.chunks)||a.forEach(e=>{let r=o.getChunkById(`${e}`);r&&t.addChunk(r)}),null==(l=r.assets)||l.forEach(e=>{let r=o.getAssetByPath(e.name);r&&t.addAsset(r)}),o.addEntryPoint(t)}return o}let Z=/\.(?:js|css|html|json|svg|txt|xml|xhtml|wasm|manifest)$/i;function J(e,t,r){t.getAssets().forEach(t=>{let{content:s=""}=e.get(t.path)||{};t.content=s,Z.test(t.path)&&(null==r?void 0:r.gzip)&&t.setGzipSize(s)})}function Q(e){let{type:t}=e;return"harmony side effect evaluation"===t||"cjs require"===t||"cjs full require"===t||"cjs export require"===t||"provided"===t||"esm import"===t}function X(e){let{type:t}=e;return t?t.includes("harmony")?s.SDK.DependencyKind.ImportStatement:t.includes("cjs")?s.SDK.DependencyKind.RequireCall:t.includes("import()")?s.SDK.DependencyKind.DynamicImport:t.includes("amd")?s.SDK.DependencyKind.AMDRequire:s.SDK.DependencyKind.Unknown:s.SDK.DependencyKind.Unknown}function ee(e){e.getModules().filter(e=>l.ZH.isStyleExt(e.path)).filter(e=>0===e.getImported().length).forEach(t=>e.removeModule(t))}function et(e){function t(e){let[t,r]=e.split(":");return{line:Number(t),column:Number(r)}}if(e.includes("-")){let r=e.split("-"),s=t(r[0]),n=t(r[1]);return{start:s,end:Number.isNaN(n.column)?{line:s.line,column:n.line}:n}}return e.includes(":")?{start:t(e)}:e.includes("[")?{start:{index:Number(e.match(/\[(\d+)\]/)[1])}}:void 0}function er(e){return"moduleGraph"in e&&!!e.moduleGraph}function es(e){var t;if(!e.identifier||!((null==e?void 0:e.nameForCondition)||e.name)||e.identifier.startsWith("webpack/runtime")||(null==e||null==(t=e.name)?void 0:t.startsWith("(webpack)")))return!0}function en(e,t){if(t.nameForCondition)return t.nameForCondition.replace("\0","");let r=t.name.replace(/ ?\+ ?\d+ ?modules$/,"");return a().isAbsolute(r)?r:a().join(e,r)}function ei(e,t){e.forEach(e=>{"module"===e.type||void 0===e.type?t.push(e):"children"in e&&e.children&&ei(e.children,t)})}function ea(e,t,r){var n,i,a,l,o;let{modules:d,chunks:c}=e;G.init();let h=new G,p=[],m=[];for(let e of(ei(d??[],m),null==(n=c??[])||n.forEach(e=>{var t;(null==(t=e.modules)?void 0:t.length)&&m.push(...e.modules)}),m??[])){if(es(e)||h.getModuleByWebpackId(e.identifier))continue;p.push(e);let n=!!(e.modules&&e.modules.length>0),d=new C(e.identifier,en(t,e),0===e.depth,n?s.SDK.ModuleKind.Concatenation:s.SDK.ModuleKind.Normal,e.id?String(e.id):void 0,e.layer);for(let n of(e.optimizationBailout&&e.optimizationBailout.forEach(e=>d.addBailoutReason(e)),e.issuerPath&&d.addIssuerPath(e.issuerPath),null==(i=e.chunks)||i.forEach(e=>{let t=r.getChunkById(String(e));t&&d.addChunk(t)}),h.addModule(d),e.source&&d.setSource({transformed:u.isBuffer(e.source)?e.source.toString():e.source}),"number"==typeof e.size&&d.setSize({sourceSize:e.size,transformedSize:e.size}),e.modules??[])){let i;if(es(n))continue;p.push(n);let c=n.identifier;i=h.getModuleByWebpackId(c)||(h.getModuleByWebpackId(c)??new C(c,en(t,n),0===n.depth,s.SDK.ModuleKind.Normal,n.id?String(n.id):void 0,n.layer)),n.optimizationBailout&&n.optimizationBailout.forEach(e=>i.addBailoutReason(e)),n.issuerPath&&i.addIssuerPath(n.issuerPath),(null==(a=n.chunks)?void 0:a.length)?null==(l=n.chunks)||l.forEach(e=>{let t=r.getChunkById(String(e));t&&i.addChunk(t)}):null==(o=e.chunks)||o.forEach(e=>{let t=r.getChunkById(String(e));t&&i.addChunk(t)}),n.source&&i.setSource({transformed:u.isBuffer(n.source)?n.source.toString():n.source}),"number"==typeof n.size&&i.setSize({sourceSize:n.size,transformedSize:n.size}),h.addModule(i),d.addNormalModule(i)}}for(let e of p){let t=h.getModuleByWebpackId(e.identifier??"");if(!t)continue;let r=(e.reasons??[]).filter(Q).filter(e=>!!(e.moduleIdentifier&&e.userRequest));for(let s of((e.reasons??[]).filter(e=>"from origin"===e.type).forEach(e=>{var t;return null==e||null==(t=e.children)?void 0:t.forEach(t=>r.push({...e,...t,children:void 0}))}),r)){let e=s.userRequest,r=h.getModuleByWebpackId(s.moduleIdentifier);if(!r)continue;if(!r.getDependencyByRequest(e)){let n=r.addDependency(e,t,X(s));n&&h.addDependency(n)}let n=r.getDependencyByRequest(e);if(n&&(null==s?void 0:s.loc)){let e=et(s.loc);e&&n.addStatement(new w(r,{transformed:e}))}}}let f=new Map;return h.getModules().forEach(e=>{e.issuerPath&&e.issuerPath.forEach(e=>{let t=f.get(e.identifier);!t&&(t=h.getModuleByWebpackId(e.identifier))&&f.set(e.identifier,t),t&&(e.moduleId=t.id)})}),h}async function el(e){let t=V(new Map,e),r=ea(e,".",t);return await q(r,t,e.outputPath||"",{}),{chunkGraph:t,moduleGraph:r}}function eo(e){return"request"in e&&"rawRequest"in e&&"resource"in e}function ed(e){return e.identifier()}function ec(e){var t;return e.resource??(null==(t=e.nameForCondition)?void 0:t.call(e))??ed(e)}function eu(e,t){return e.request??e.userRequest??(null==t?void 0:t.rawRequest)}function eh(e,t){return ec(t.getResolvedModule(e))}function ep(e){return!!e.externalType}function em(e){var t,r;return ep(e)?"":(null==(r=e.originalSource)||null==(t=r.call(e))?void 0:t.source().toString())??""}function ef(e){return Array.from(e.values()).map(e=>e.getRuntimeChunk()).map(e=>e?e.entryModule:null).filter(Boolean).map(e=>eo(e)?e:e.rootModule)}function eg(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],{loc:s}=e;if(void 0===s||!("start"in s))return;let n={start:{line:s.start.line,column:s.start.column},end:s.end?{line:s.end.line,column:s.end.column}:void 0};return new w(t,{source:r?t.getSourceRange(n):void 0,transformed:n})}function ey(e,t){let r=t.dependencies.find(t=>t.name===e.name&&("harmony export imported specifier"===t.type||"harmony export specifier"===t.type));return!r&&e._target&&e._target.size>0&&(r=e._getMaxTarget().values().next().value.connection.dependency),r}function ex(e,t,r){let s=ec(t),n=eu(e);return r.getDependencies().find(e=>e.module.path===s&&e.request===n)}function eA(e,t,r){let s=ey(e,t);if(!s)return;let n=ec(t),i=eu(s),a=r.getDependencies().find(e=>e.module.path===n&&e.request===i);if(a&&1===a.statements.length)return a.statements[0];let l=r.getModuleByWebpackId(ed(t));if(l)return eg(s,l)}function ev(e,t){let r=e.findTarget(t,()=>!0);if(r&&r.export)return t.getExportsInfo(r.module).getExportInfo(r.export[0])}function eS(e){let t=[];for(let r of e.modules)t.push(...r.modules??[]),t.push(r);return(0,o.R)(t.filter(e=>!ed(e).startsWith("webpack/runtime")),e=>ed(e))}},32792:function(e,t,r){r.d(t,{AP:()=>R,BD:()=>v,B_:()=>z,TS:()=>b,Wh:()=>C,ZH:()=>T,_8:()=>M,aH:()=>I,gX:()=>P,l5:()=>_,lP:()=>B,oG:()=>j,s0:()=>D,xR:()=>k});var s,n,i=r(26838),a=r(46068),l=r(8963),o=r(97142),d=r.n(o),c=r(67115),u=r(83397),h=r(13078),p=r.n(h),m=r(85409),f=r(4678),g=r.n(f),y=r(35207),x=r(85409),A={};A.d=(e,t)=>{for(var r in t)A.o(t,r)&&!A.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},A.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),A.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var v={};A.r(v),A.d(v,{SummaryCostsDataName:()=>O});var S={};A.r(S),A.d(S,{decode:()=>K,encode:()=>G});var j={};A.r(j),A.d(j,{compressText:()=>W,decompressText:()=>L,mergeIntervals:()=>$,random:()=>U});var D={};A.r(D),A.d(D,{isFilePath:()=>Y,isRemoteUrl:()=>H,isUrl:()=>q});var M={};A.r(M),A.d(M,{fetchShardingData:()=>Z,fetchShardingFiles:()=>J,isShardingData:()=>V});var I={};A.r(I),A.d(I,{LoaderInternalPropertyName:()=>ec,findLoaderTotalTiming:()=>Q,getDirectoriesLoaders:()=>el,getLoaderChartData:()=>es,getLoaderCosts:()=>ee,getLoaderFileDetails:()=>ei,getLoaderFileFirstInput:()=>eo,getLoaderFileInputAndOutput:()=>ed,getLoaderFileTree:()=>en,getLoaderFolderStatistics:()=>ea,getLoaderNames:()=>et,getLoadersCosts:()=>X,getLoadersTransformData:()=>er,isVue:()=>eu});var P={};A.r(P),A.d(P,{formatCosts:()=>ef,getCurrentTimestamp:()=>eg,getUnit:()=>em,toFixedDigits:()=>ep});var k={};A.r(k),A.d(k,{getResolverCosts:()=>eA,getResolverFileDetails:()=>eS,getResolverFileTree:()=>ev,isResolveFailData:()=>ex,isResolveSuccessData:()=>ey});var b={};A.r(b),A.d(b,{diffAssetsByExtensions:()=>eZ,diffSize:()=>eV,extname:()=>e0,filterAssets:()=>eL,filterAssetsByExtensions:()=>eW,filterModulesAndDependenciesByPackageDeps:()=>eT,formatAssetName:()=>eK,getAllBundleData:()=>eX,getAssetDetails:()=>eQ,getAssetsDiffResult:()=>eH,getAssetsSizeInfo:()=>eU,getAssetsSummary:()=>eJ,getChunkByChunkId:()=>eM,getChunkIdsByAsset:()=>ej,getChunksByAsset:()=>eP,getChunksByChunkIds:()=>eI,getChunksByModule:()=>eD,getChunksByModuleId:()=>ek,getDependenciesByModule:()=>ew,getDependencyByPackageData:()=>eb,getDependencyByResolvedRequest:()=>eE,getEntryPoints:()=>e1,getInitialAssetsSizeInfo:()=>eY,getModuleByDependency:()=>eN,getModuleDetails:()=>eO,getModuleIdsByChunk:()=>e_,getModuleIdsByModulesIds:()=>ez,getModulesByAsset:()=>eC,getModulesByChunk:()=>eR,getModulesByChunks:()=>eB,isAssetMatchExtension:()=>eF,isAssetMatchExtensions:()=>e$,isInitialAsset:()=>eq});var w={};A.r(w),A.d(w,{getBundleDiffPageQueryString:()=>e2,getBundleDiffPageUrl:()=>e3,parseFilesFromBundlePageUrlQuery:()=>e8});var E={};A.r(E),A.d(E,{getPluginData:()=>e6,getPluginHooks:()=>e5,getPluginSummary:()=>e4,getPluginTapNames:()=>e9});var C={};A.r(C),A.d(C,{getPackageRelationAlertDetails:()=>e7});var _={};A.r(_),A.d(_,{RspackLoaderInternalPropertyName:()=>te,RspackSummaryCostsDataName:()=>tt,checkSourceMapSupport:()=>tr});var z={};A.r(z),A.d(z,{APIDataLoader:()=>ts});var R={};A.r(R),A.d(R,{compact:()=>td,isEmpty:()=>tl,isNil:()=>tc,isNumber:()=>ti,isObject:()=>ta,isPlainObject:()=>tu,isString:()=>th,isUndefined:()=>tn,last:()=>to,pick:()=>tp});var B={};A.r(B),A.d(B,{MODULE_PATH_PACKAGES:()=>tf,PACKAGE_PATH_NAME:()=>tg,getPackageMetaFromModulePath:()=>ty});var N={};A.r(N),A.d(N,{getMcpConfigPath:()=>tA,writeMcpPort:()=>tx});var T={};A.r(T),A.d(T,{isJsExt:()=>tS,isStyleExt:()=>tv});var O=((s={}).Bootstrap="bootstrap->beforeCompile",s.Compile="beforeCompile->afterCompile",s.Done="afterCompile->done",s.Minify="minify(processAssets)",s);function G(e){let t=`${e.charCodeAt(0)}`;for(let r=1;r<e.length;r++)t+=`!${e.charCodeAt(r)}`;return t}function K(e){let t="",r="";for(let s=0;s<e.length;s++)"!"===e[s]?(t+=String.fromCharCode(+r),r=""):r+=e[s];return r&&(t+=String.fromCharCode(+r)),t}let F=(0,c.h)();function $(e){let t,r;e.sort((e,t)=>e[0]-t[0]);let s=[];for(let n=0;n<e.length;n++)r=e[n],!t||r[0]>t[1]?(t=r,s.push(r)):t[1]=Math.max(t[1],r[1]);return s}function W(e){try{return(0,a.deflateSync)(e).toString("base64")}catch(e){return F.debug(`compressText error: ${e}`),""}}function L(e){return(0,a.inflateSync)(l.Buffer.from(e,"base64")).toString()}function U(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function q(e){return/^https?:\/\//.test(e)}function Y(e){return(0,h.isAbsolute)(e)}function H(e){return!!("string"==typeof e&&(q(e)||(0,h.isAbsolute)(e)))}function V(e){return!!(Array.isArray(e)&&e.length>0&&e.every(e=>H(e)))}async function Z(e,t){let r=await Promise.all(e.map(e=>t(e))),s=0===r.length?[]:r.reduce((e,t)=>e+t);return"object"==typeof s?s:JSON.parse(L(s))}async function J(e,t,r){return(await Promise.all(Object.keys(e).map(async s=>{let n=e[s];return(null==r?void 0:r.length)&&0>r.indexOf(s)?{[s]:[]}:V(n)?{[s]:await Z(n,t)}:{[s]:n}}))).reduce((e,t)=>Object.assign(e,t))}function Q(e){let t=1/0,r=-1/0;for(let s=0;s<e.length;s++){let n=e[s];n.startAt<=t&&(t=n.startAt),n.endAt>=r&&(r=n.endAt)}return{start:t,end:r}}function X(e,t){let r={},s={};t.forEach(t=>{e(t)?(r[t.pid]||(r[t.pid]=[]),r[t.pid].push([t.startAt,t.endAt])):(s[t.pid]||(s[t.pid]=[]),s[t.pid].push([t.startAt,t.endAt]))});let n=0,i=Object.keys(r);for(let e=0;e<i.length;e++){let t=i[e],a=$(r[t]),l=$(s[t]||[]).filter(e=>{let[t,r]=e;return a.some(e=>t>=e[0]&&r<=e[1])});n+=(a.length?a.reduce((e,t)=>e+=t[1]-t[0],0):0)-(l.length?l.reduce((e,t)=>e+=t[1]-t[0],0):0)}return n}function ee(e,t){let r=t.filter(t=>!t.loader.includes("builtin")&&t!==e&&t.pid===e.pid&&t.startAt>=e.startAt&&t.endAt<=e.endAt),s=e.endAt-e.startAt;return r.length&&$(r.map(t=>[Math.max(t.startAt,e.startAt),Math.min(t.endAt,e.endAt)])).forEach(e=>{let t=e[1]-e[0];s-=t}),s}function et(e){let t=new Set;return e.forEach(e=>e.loaders.forEach(e=>t.add(eh(e.loader)))),[...t]}function er(e){let t=[];for(let r=0;r<e.length;r++){let s=e[r];for(let e=0;e<s.loaders.length;e++){let r=s.loaders[e];t.push(r)}}return t}function es(e){let t=[],r=er(e);return e.forEach(e=>{e.loaders.forEach(s=>{t.push({layer:e.resource.layer,loader:eh(s.loader),isPitch:s.isPitch,startAt:s.startAt,endAt:s.endAt,pid:s.pid,sync:s.sync,resource:e.resource.path,costs:ee(s,r)})})}),t}function en(e){let t=er(e);return e.map(e=>{let{loaders:r,resource:s}=e;return{path:s.path,layer:s.layer,loaders:r.map(e=>({key:e.path,loader:eh(e.loader),path:e.path,errors:e.errors,costs:ee(e,t)}))}})}function ei(e,t){let r=t.find(t=>t.resource.path===e);if(!r)throw Error(`"${e}" not match any loader data`);let s=er(t);return{...r,loaders:r.loaders.map(e=>({...e,loader:eh(e.loader),costs:ee(e,s)}))}}function ea(e,t){let r=t.filter(t=>{let{path:r}=t.resource;return r.startsWith(e)}),s=[],n=new Map;return r.forEach(e=>{e.loaders.forEach(e=>{let t=n.get(e.loader);return t?n.set(e.loader,{files:t.files+1,path:e.path}):n.set(e.loader,{files:1,path:e.path}),s.push({loader:e.loader,startAt:e.startAt,endAt:e.endAt,pid:e.pid})})}),Array.from(n).map(e=>{let t=X(t=>t.loader===e[0],s);return{loader:e[0],files:e[1].files,path:e[1].path,costs:t}})}function el(e,t){let r,s=t||x.cwd();return(r=new Set,e.forEach(e=>{if(e.resource.path.startsWith(s)){let t=e.resource.path.split(s).slice(1).join("/").split("/");if(t.length>=2){let e=t.slice(0,2).join("/");r.add(`${s}/${e}`)}}else{let t=e.resource.path.split("/"),s=t.slice(0,t.length-1).join("/");r.add(s)}}),Array.from(r)).map(t=>{let r=ea(t,e);return{directory:t,stats:r}})}function eo(e,t){for(let r=0;r<t.length;r++){let s=t[r];if(s.resource.path===e){let e=s.loaders.filter(e=>!e.isPitch);if(!e.length)return"";return e[0].input||""}}return""}function ed(e,t,r,s){for(let n=0;n<s.length;n++){let i=s[n];if(i.resource.path===e)for(let e=0;e<i.loaders.length;e++){let s=i.loaders[e];if(s.loader===t&&s.loaderIndex===r)return{input:s.input||"",output:s.result||""};return{input:"",output:""}}}return{input:"",output:""}}F.override({log:e=>{console.log(`${d().green("[RSDOCTOR LOG]")} ${e}`)},info:e=>{console.log(`${d().yellow("[RSDOCTOR INFO]")} ${e}`)},warn:e=>{console.warn(`${d().yellow("[RSDOCTOR WARN]")} ${e}`)},start:e=>{console.log(`${d().green("[RSDOCTOR START]")} ${e}`)},ready:e=>{console.log(`${d().green("[RSDOCTOR READY]")} ${e}`)},error:e=>{console.error(`${d().red("[RSDOCTOR ERROR]")} ${e}`)},success:e=>{console.error(`${d().green("[RSDOCTOR SUCCESS]")} ${e}`)},debug:e=>{x.env.DEBUG&&console.log(`${d().blue("[RSDOCTOR DEBUG]")} ${e}`)}});let ec="__l__",eu=e=>("module"in e.options&&e.options.module.rules||[]).some(e=>{var t;return!!(e&&"object"==typeof e&&e.test instanceof RegExp&&(null==(t=e.test)?void 0:t.test(".vue")))}),eh=e=>{let t=e.includes("node_modules")?e.split("node_modules"):null;return t?t[t.length-1]:e};function ep(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return 0===t?Math.floor(e):+e.toFixed(t)}function em(e,t){return"m"===t?e>1?"mins":"min":e>1?"hours":"hour"}function ef(e){if((e=Number(e))>=1e3){let t=e/1e3;if(t>=60){let e=t/60;if(e>=60){let t=ep(e/60,0),r=ep(e%60,1),s=em(t,"h");return r>0?`${t}${s} ${r}${em(r,"m")}`:`${t}${s}`}let r=em(e=ep(e,0),"m"),s=ep(t%60,0);return s>0?`${e}${r} ${s}s`:`${e}${r}`}return`${ep(t,1)}s`}if(e>=10)return`${+ep(e,0)}ms`;if(e>=1)return`${+ep(e,1)}ms`;let t=+ep(e,2);return 0===t&&(t=+ep(e,3)),`${t}ms`}function eg(e,t){let r=(0,m.hrtime)(t);return e+1e3*r[0]+(x.env.RSTEST?Math.round(r[1]/1e6):r[1]/1e6)}function ey(e){return!!e.result}function ex(e){return!!e.error}function eA(e,t){let r=t.filter(t=>t!==e&&t.pid===e.pid&&t.startAt>=e.startAt&&t.endAt<=e.endAt),s=e.endAt-e.startAt;return r.length&&$(r.map(t=>[Math.max(t.startAt,e.startAt),Math.min(t.endAt,e.endAt)])).forEach(e=>{let t=e[1]-e[0];s-=t}),s}function ev(e){return e.map(e=>({issuerPath:e.issuerPath}))}function eS(e,t,r,s){let n=r.find(t=>t.path===e),i=t.filter(t=>t.issuerPath===e),a=n&&s&&s[n.id]?s[n.id].source:"",l=i.reduce((e,t)=>t.request&&ey(t)?e.replace(RegExp(`["']${t.request}["']`),`"${t.result}"`):e,a);return{filepath:e,before:a,after:l,resolvers:i.map(e=>({...e,costs:eA(e,t)}))}}function ej(e){return e.chunks?e.chunks:[]}function eD(e,t){return e.chunks.length?eI(e.chunks,t):[]}function eM(e,t){return t.find(t=>t.id===e)}function eI(e,t,r){return e.length?e.map(e=>t.find(t=>t.id===e)).filter(Boolean).map(e=>{if(r&&r.length>0){let t={};for(let s of r)void 0!==e[s]&&(t[s]=e[s]);return t}return e}):[]}function eP(e,t,r){return eI(ej(e),t,r)}function ek(e,t,r){let s=t.find(t=>t.id===e);return s?eD(s,r):[]}function eb(e,t){return t.find(t=>t.id===e.dependencyId)}function ew(e,t){return e.dependencies.map(e=>t.find(t=>t.id===e)).filter(Boolean)}function eE(e,t){return t.find(t=>t.resolvedRequest===e)}function eC(e,t,r,s,n){return eB(eI(ej(e),t),r,s,n)}function e_(e){let{modules:t=[]}=e;return t}function ez(e,t){return e.map(e=>t.find(t=>t.id===e)).filter(Boolean)}function eR(e,t,r){return e_(e).map(e=>{let s=t.find(t=>t.id===e);if(r&&r.length>0){if(!s)return null;let e={};for(let t of r)void 0!==s[t]&&(e[t]=s[t]);return e}return s}).filter(Boolean)}function eB(e,t,r,s){let n=[];try{e.forEach(e=>{eR(e,t,r).forEach(e=>{(!s||s(e))&&!n.filter(t=>t.id===e.id).length&&n.push(e)})})}catch(e){F.debug(e)}return n}function eN(e,t){return t.find(t=>t.id===e.module)}function eT(e,t,r){let s=[],n=[];for(let i=0;i<e.length;i++){let a=eb(e[i],t);if(a){s.push(a);let e=eN(a,r);e&&n.push(e)}}return{dependencies:s,modules:n}}function eO(e,t,r){let s=t.find(t=>t.id===e);return{module:s,dependencies:ew(s,r)}}let eG=RegExp(`(.*)${/[-|.]/.source}${/[a-z|A-Z|0-9]{4,32}/.source}(${/(?:\.[a-z|A-Z|0-9]{2,}){1,}/.source})$`);function eK(e,t){var r;let s=null==t?void 0:t.split("."),n="",i=e;return(null==s?void 0:s.length)&&s.length>=3&&(null==(r=s[s.length-2])?void 0:r.indexOf("["))<0&&"js|css|html".indexOf(s[s.length-1])>-1?(n=s[s.length-2],i=e.replace(/(.*)(\.[a-f0-9]{4,32})([^.]*.[^.]+){2,}/g,"$1"),`${i}.${n}.${e.substring(e.lastIndexOf(".")+1)}`):e.replace(eG,"$1$2")}function eF(e,t){return e.path.slice(-t.length)===t||e0(e.path)===t}function e$(e,t){return!!t.length&&t.some(t=>eF(e,t))}function eW(e,t){return"string"==typeof t?e.filter(e=>eF(e,t)):Array.isArray(t)?e.filter(e=>e$(e,t)):[]}function eL(e,t){return t&&(e="function"==typeof t?e.filter(t):eW(e,t)),e}function eU(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{withFileContent:s=!0,filterOrExtensions:n}=r;return(e=e.filter(e=>!e$(e,u.Constants.MapExtensions)),n&&(e=eL(e,n)),e.length)?{count:e.length,size:e.reduce((e,t)=>e+t.size,0),files:e.map(e=>({path:e.path,size:e.size,gzipSize:e.gzipSize,initial:eq(e,t),content:s?e.content:void 0}))}:{count:0,size:0,files:[]}}function eq(e,t){return eP(e,t).some(e=>!!e.initial)}function eY(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.filterOrExtensions&&(e=eL(e,r.filterOrExtensions)),eU(e,t,{...r,filterOrExtensions:e=>eq(e,t)})}function eH(e,t){return{all:{total:eZ(e,t)},js:{total:eZ(e,t,u.Constants.JSExtension),initial:eZ(e,t,u.Constants.JSExtension,!0)},css:{total:eZ(e,t,u.Constants.CSSExtension),initial:eZ(e,t,u.Constants.CSSExtension,!0)},imgs:{total:eZ(e,t,u.Constants.ImgExtensions)},html:{total:eZ(e,t,u.Constants.HtmlExtension)},media:{total:eZ(e,t,u.Constants.MediaExtensions)},fonts:{total:eZ(e,t,u.Constants.FontExtensions)},others:{total:eZ(e,t,e=>!e$(e,[u.Constants.JSExtension,u.Constants.CSSExtension,u.Constants.HtmlExtension].concat(u.Constants.ImgExtensions,u.Constants.MediaExtensions,u.Constants.FontExtensions,u.Constants.MapExtensions)))}}}function eV(e,t){let r=e===t;return{percent:r?0:0===e?100:Math.abs(t-e)/e*100,state:r?u.Client.RsdoctorClientDiffState.Equal:e>t?u.Client.RsdoctorClientDiffState.Down:u.Client.RsdoctorClientDiffState.Up}}function eZ(e,t,r){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n,i,{size:a,count:l}=s?eY(e.assets,e.chunks,{filterOrExtensions:r}):eU(e.assets,e.chunks,{filterOrExtensions:r});if(e===t)n=a,i=l;else{let{size:e,count:a}=s?eY(t.assets,t.chunks,{filterOrExtensions:r}):eU(t.assets,t.chunks,{filterOrExtensions:r});n=e,i=a}let{percent:o,state:d}=eV(a,n);return{size:{baseline:a,current:n},count:{baseline:l,current:i},percent:o,state:d}}function eJ(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s={...r,filterOrExtensions:u.Constants.JSExtension},n={...r,filterOrExtensions:u.Constants.CSSExtension},i={...r,filterOrExtensions:u.Constants.ImgExtensions},a={...r,filterOrExtensions:u.Constants.HtmlExtension},l={...r,filterOrExtensions:u.Constants.MediaExtensions},o={...r,filterOrExtensions:u.Constants.FontExtensions},d={...r,filterOrExtensions:e=>!e$(e,[u.Constants.JSExtension,u.Constants.CSSExtension,u.Constants.HtmlExtension].concat(u.Constants.ImgExtensions,u.Constants.MediaExtensions,u.Constants.FontExtensions,u.Constants.MapExtensions))};return{all:{total:eU(e,t,r)},js:{total:eU(e,t,s),initial:eY(e,t,s)},css:{total:eU(e,t,n),initial:eY(e,t,n)},imgs:{total:eU(e,t,i)},html:{total:eU(e,t,a)},media:{total:eU(e,t,l)},fonts:{total:eU(e,t,o)},others:{total:eU(e,t,d)}}}function eQ(e,t,r,s,n){let i=t.find(t=>t.path===e);return{asset:i,chunks:eP(i,r),modules:eC(i,r,s,void 0,n)}}function eX(e,t,r,s){let n=[];try{for(let i=0;i<e.length;i++){let a=e[i];n.push({asset:a,modules:eC(a,t,r,s)})}return n}catch(e){return console.error(e),[]}}function e0(e){let t=e.split("?")[0].match(/\.([0-9a-z]+)(?:[\?#]|$)/i);return t?`.${t[1]}`:""}function e1(e){return e}function e2(e){let t=encodeURIComponent(e.join(","));return t&&(t=`?${u.Client.RsdoctorClientUrlQuery.BundleDiffFiles}=${t}`),t}function e3(e){let t=e2(e);return`${t}#${u.Client.RsdoctorClientRoutes.BundleDiff}`}function e8(e){return decodeURIComponent(e).split(",")}function e5(e){return Object.keys(e)}function e9(e){let t=e5(e),r=new Set;return t.forEach(t=>{e[t].forEach(e=>{r.add(e.tapName)})}),[...r]}function e4(e){return{hooks:e5(e),tapNames:e9(e)}}function e6(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=e5(e).filter(e=>!t.length||-1!==t.indexOf(e));return s.length?e9(e).reduce((t,n)=>(r.length&&-1===r.indexOf(n)||s.forEach(r=>{let s=e[r].filter(e=>e.tapName===n);0!==s.length&&t.push({tapName:n,hook:r,data:s.map(e=>({startAt:e.startAt,endAt:e.endAt,costs:e.costs,type:e.type}))})}),t),[]):[]}function e7(e,t,r,s,n){return s.slice().reverse().map(s=>{let i=t.find(e=>e.id===s.dependencyId);if(!i)return null;let a=e.find(e=>e.id===i.module);return a?{group:s.group,module:a,dependency:i,relativePath:(0,h.relative)(r,a.path),moduleCode:null==n?void 0:n[a.id]}:null}).filter(Boolean)}let te="__l__";var tt=((n={}).Bootstrap="bootstrap->rspack:beforeCompile",n.Compile="rspack:beforeCompile->afterCompile",n.Done="rspack:afterCompile->done",n.Minify="rspack:minify(rspack:optimizeChunkAssets)",n);function tr(e){var t,r,s,n;if(!Array.isArray(e)||!e[0])return{isRspack:!1,hasSourceMap:!1};let i="rspack"===e[0].name&&(null==(r=e[0])||null==(t=r.config)?void 0:t.name)!=="lynx",a=null==(s=e[0].config)?void 0:s.devtool,l=null==(n=e[0].config)?void 0:n.plugins,o=null==l?void 0:l.filter(e=>e&&e.includes("SourceMapDevToolPlugin"));return{isRspack:i,hasSourceMap:"string"==typeof a&&a.includes("source-map")&&!a.includes("eval")||!!(null==o?void 0:o.length)}}class ts{log(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];console.log(`[${this.constructor.name}]`,...t)}loadAPI(){for(var e,t=arguments.length,r=Array(t),s=0;s<t;s++)r[s]=arguments[s];let[n,i]=r;switch(n){case u.SDK.ServerAPI.API.LoadDataByKey:return this.loader.loadData(i.key);case u.SDK.ServerAPI.API.GetProjectInfo:return Promise.all([this.loader.loadData("root"),this.loader.loadData("pid"),this.loader.loadData("hash"),this.loader.loadData("summary"),this.loader.loadData("configs"),this.loader.loadData("envinfo"),this.loader.loadData("errors")]).then(e=>{let[t,r,s,n,i,a,l]=e;return{root:t,pid:r,hash:s,summary:n,configs:i,envinfo:a,errors:l}});case u.SDK.ServerAPI.API.GetClientRoutes:if("undefined"!=typeof window&&(null==(e=window)?void 0:e[u.Constants.WINDOW_RSDOCTOR_TAG]))return window[u.Constants.WINDOW_RSDOCTOR_TAG].enableRoutes;return this.loader.loadManifest().then(e=>{let{enableRoutes:t=[]}=e.client||{};return t});case u.SDK.ServerAPI.API.GetLoaderNames:return this.loader.loadData("loader").then(e=>et(e||[]));case u.SDK.ServerAPI.API.GetLayers:return this.loader.loadData("moduleGraph").then(e=>{let{layers:t}=e||{};return t});case u.SDK.ServerAPI.API.GetLoaderChartData:return this.loader.loadData("loader").then(e=>es(e||[]));case u.SDK.ServerAPI.API.GetLoaderFileTree:return this.loader.loadData("loader").then(e=>en(e||[]));case u.SDK.ServerAPI.API.GetLoaderFileDetails:return this.loader.loadData("loader").then(e=>ei(i.path,e||[]));case u.SDK.ServerAPI.API.GetLoaderFolderStatistics:return this.loader.loadData("loader").then(e=>ea(i.folder,e||[]));case u.SDK.ServerAPI.API.GetLoaderFileFirstInput:return this.loader.loadData("loader").then(e=>eo(i.file,e||[]));case u.SDK.ServerAPI.API.GetLoaderFileInputAndOutput:return this.loader.loadData("loader").then(e=>eo(i.file,e||[]));case u.SDK.ServerAPI.API.GetResolverFileTree:return this.loader.loadData("resolver").then(e=>ev(e||[]));case u.SDK.ServerAPI.API.GetResolverFileDetails:return Promise.all([this.loader.loadData("resolver"),this.loader.loadData("moduleGraph.modules"),this.loader.loadData("moduleCodeMap")]).then(e=>{let t=e[0],r=e[1],s=e[2];return eS(i.filepath,t||[],r||[],s||{})});case u.SDK.ServerAPI.API.GetPluginSummary:return this.loader.loadData("plugin").then(e=>e4(e||{}));case u.SDK.ServerAPI.API.GetPluginData:return this.loader.loadData("plugin").then(e=>{let{hooks:t,tapNames:r}=i;return e6(e||{},t,r)});case u.SDK.ServerAPI.API.GetAssetsSummary:return this.loader.loadData("chunkGraph").then(e=>{let{withFileContent:t=!0}=i,{assets:r=[],chunks:s=[]}=e||{};return eJ(r,s,{withFileContent:t})});case u.SDK.ServerAPI.API.GetAssetDetails:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph"),this.loader.loadData("configs")]).then(e=>{let{assetPath:t}=i,{isRspack:r,hasSourceMap:s}=tr(e[2]||[]),{assets:n=[],chunks:a=[]}=e[0]||{},{modules:l=[]}=e[1]||{};return eQ(t,n,a,l,r||s?e=>!0:()=>!0)});case u.SDK.ServerAPI.API.GetSummaryBundles:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph")]).then(e=>{let{assets:t=[],chunks:r=[]}=e[0]||{},{modules:s=[]}=e[1]||{};return eX(t,r,s,["id","path","size","kind"])});case u.SDK.ServerAPI.API.GetChunksByModuleId:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph")]).then(e=>{let{moduleId:t}=i,{chunks:r=[]}=e[0]||{},{modules:s=[]}=e[1]||{};return ek(t,s,r)});case u.SDK.ServerAPI.API.GetModuleDetails:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph")]).then(e=>{let{moduleId:t}=i,{modules:r=[],dependencies:s=[]}=e[1]||{};return eO(t,r,s)});case u.SDK.ServerAPI.API.GetModulesByModuleIds:return this.loader.loadData("moduleGraph").then(e=>{let{moduleIds:t}=i,{modules:r=[]}=e||{};return ez(t,r)});case u.SDK.ServerAPI.API.GetEntryPoints:return Promise.all([this.loader.loadData("chunkGraph")]).then(e=>{let[t]=e,{entrypoints:r=[]}=t||{};return r});case u.SDK.ServerAPI.API.GetModuleCodeByModuleId:return this.loader.loadData("moduleCodeMap").then(e=>{let{moduleId:t}=i;return e?e[t]:{source:"",transformed:"",parsedSource:""}});case u.SDK.ServerAPI.API.GetModuleCodeByModuleIds:return this.loader.loadData("moduleCodeMap").then(e=>{let{moduleIds:t}=i,r={};return e?(t.forEach(t=>{r[t]=e[t]}),r):[]});case u.SDK.ServerAPI.API.GetAllModuleGraph:return this.loader.loadData("moduleGraph").then(e=>null==e?void 0:e.modules);case u.SDK.ServerAPI.API.GetSearchModules:return Promise.all([this.loader.loadData("moduleGraph"),this.loader.loadData("chunkGraph")]).then(e=>{let[t,r]=e,{moduleName:s}=i;if(!s)return[];let n=r.chunks.reduce((e,t)=>(t.assets.forEach(r=>{e[t.id]||(e[t.id]=[]),e[t.id].push(r)}),e),{}),a=new Map;return null==t||t.modules.filter(e=>{e.webpackId.includes(s)&&e.chunks.forEach(e=>{a.has(e)||(n[e]||[]).forEach(t=>{t.endsWith(".js")&&a.set(e,t)})})}),Object.fromEntries(a)});case u.SDK.ServerAPI.API.GetSearchModuleInChunk:return Promise.all([this.loader.loadData("moduleGraph"),this.loader.loadData("root")]).then(e=>{let[t,r]=e,{moduleName:s,chunk:n}=i;return s?null==t?void 0:t.modules.filter(e=>e.webpackId.includes(s)&&e.chunks.includes(n)).map(e=>({id:e.id,path:e.path,relativePath:(0,h.relative)(r,e.path)})):[]});case u.SDK.ServerAPI.API.GetAllChunkGraph:return this.loader.loadData("chunkGraph").then(e=>null==e?void 0:e.chunks);case u.SDK.ServerAPI.API.GetPackageRelationAlertDetails:return Promise.all([this.loader.loadData("moduleGraph"),this.loader.loadData("errors"),this.loader.loadData("root"),this.loader.loadData("moduleCodeMap")]).then(e=>{let{id:t,target:r}=i,[s,n=[],a="",l]=e,{modules:o=[],dependencies:d=[]}=s||{},{packages:c=[]}=n.find(e=>e.id===t)||{},{dependencies:u=[]}=c.find(e=>e.target.name===r.name&&e.target.root===r.root&&e.target.version===r.version)||{};return e7(o,d,a,u,l||{})});case u.SDK.ServerAPI.API.GetOverlayAlerts:return this.loader.loadData("errors").then(e=>(e||[]).filter(e=>e.code===u.Rule.RuleMessageCodeEnumerated.Overlay));case u.SDK.ServerAPI.API.BundleDiffManifest:return this.loader.loadManifest();case u.SDK.ServerAPI.API.GetBundleDiffSummary:return Promise.all([this.loader.loadManifest(),this.loader.loadData("root"),this.loader.loadData("hash"),this.loader.loadData("errors"),this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph"),this.loader.loadData("moduleCodeMap"),this.loader.loadData("packageGraph"),this.loader.loadData("configs")]).then(e=>{var t,r,s,n;let[i,a="",l="",o={},d={},c={},u={},h={},p=[]]=e,m="";return"string"==typeof(null==(s=p[0])||null==(r=s.config)||null==(t=r.output)?void 0:t.chunkFilename)&&(m=null==(n=p[0])?void 0:n.config.output.chunkFilename),{root:a,hash:l,errors:o,chunkGraph:d,moduleGraph:c,packageGraph:h,outputFilename:m,moduleCodeMap:u}});case u.SDK.ServerAPI.API.GetChunkGraph:return this.loader.loadData("chunkGraph").then(e=>{let{chunks:t=[]}=e||{};return t});case u.SDK.ServerAPI.API.GetAllModuleGraphFilter:return this.loader.loadData("moduleGraph").then(e=>null==e?void 0:e.modules.map(e=>({id:e.id,webpackId:e.webpackId,path:e.path,size:e.size,chunks:e.chunks,kind:e.kind})));case u.SDK.ServerAPI.API.GetModuleByName:return this.loader.loadData("moduleGraph").then(e=>{let{moduleName:t}=i,{modules:r=[]}=e||{};return r.filter(e=>e.path.includes(t)).map(e=>({id:e.id,path:e.path}))||[]});case u.SDK.ServerAPI.API.GetModuleIssuerPath:return this.loader.loadData("moduleGraph").then(e=>{var t;let{moduleId:r}=i,s=(null==e?void 0:e.modules)||[],n=(null==(t=s.find(e=>String(e.id)===r))?void 0:t.issuerPath)||[];return Array.isArray(n)&&n.length>0&&"number"==typeof n[0]?n.map(e=>{var t;return null==(t=s.find(t=>t.id===e))?void 0:t.path}).filter(Boolean):n});case u.SDK.ServerAPI.API.GetPackageInfo:return this.loader.loadData("packageGraph").then(e=>null==e?void 0:e.packages);case u.SDK.ServerAPI.API.GetPackageDependency:return this.loader.loadData("packageGraph").then(e=>(null==e?void 0:e.dependencies)||[]);case u.SDK.ServerAPI.API.GetChunkGraphAI:return this.loader.loadData("chunkGraph").then(e=>{let{chunks:t=[]}=e||{};return t.map(e=>{let{modules:t,...r}=e;return r})});case u.SDK.ServerAPI.API.GetChunkByIdAI:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph")]).then(e=>{let[t,r]=e,{chunks:s=[]}=t||{},{modules:n=[]}=r||{},{chunkId:a}=i,l=s.find(e=>e.id===a);if(!l)return null;let o=n.filter(e=>l.modules.includes(e.id)).map(e=>({id:e.id,path:e.path,size:e.size,chunks:e.chunks,kind:e.kind,issuerPath:e.issuerPath}));return l.modulesInfo=o,l});case u.SDK.ServerAPI.API.GetDirectoriesLoaders:return Promise.all([this.loader.loadData("root"),this.loader.loadData("loader")]).then(e=>{let[t,r]=e;return el(r||[],t||"")});default:throw Error(`API not implement: "${n}"`)}}constructor(e){(0,i._)(this,"loader",void 0),this.loader=e,this.loadAPI=this.loadAPI.bind(this)}}function tn(e){return void 0===e}function ti(e){return"number"==typeof e&&!Number.isNaN(e)}function ta(e){return"object"==typeof e&&null!==e}function tl(e){return null==e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length}function to(e){return e[e.length-1]}function td(e){return e.filter(e=>null!=e||!e)}function tc(e){return null==e}let tu=e=>null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype,th=e=>"string"==typeof e||!!e&&"object"==typeof e&&!Array.isArray(e)&&"[object String]"===({}).toString.call(e);function tp(e,t){let r={};for(let s=0;s<t.length;s++){let n=t[s];Object.hasOwn(e,n)&&(r[n]=e[n])}return r}let tm=/[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*/,tf=RegExp(`(?:${/(?:node_modules|~)(?:\/\.pnpm)?/.source}/)(?:(?:@${tm.source}[/|+])?(?:${tm.source}\\+)*(?:${tm.source})(?:${/@[\w|\-|_|.]+/.source})?)(?:_(?:@${tm.source}[/|+])?(?:${tm.source})(?:@${tm.source})?)*/`,"g"),tg=/(?:(?:node_modules|~)(?:\/\.pnpm)?\/)(?:((?:@[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*[/|+])?(?:(?:[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*\+)*)(?:[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*))(?:@[\w|\-|_|.]+)?)(?:_((?:@[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*[/|+])?(?:[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*))(?:@[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*))*\//gm,ty=e=>{var t,r,s;let n,i=e.match(tf);if(!i)return{name:"",version:""};let a=(s=i.flatMap(e=>{let t=e.matchAll(tg);return t?td([...t].flat()).slice(1).filter(Boolean).map(e=>e.replace(/\+/g,"/")):[]}),n=[],s.forEach((e,t)=>{s.slice(t+1).includes(e)||n.push(e)}),n);if(tl(a))return{name:"",version:""};let l=to(a),o=RegExp(`(.*)(${to(i)}).*`),d=e.replace(o,"$1$2").replace(/\/$/,"");return{name:l,version:d&&l&&(null==(r=d.match(RegExp(`${l}@([\\d.]+)`)))||null==(t=r.flat().slice(1))?void 0:t[0])||""}};function tx(e,t){let r=y.homedir(),s=p().join(r,".cache/rsdoctor"),n=p().join(s,"mcp.json");g().existsSync(s)||g().mkdirSync(s,{recursive:!0});let i={portList:{},port:0};if(g().existsSync(n))try{i=JSON.parse(g().readFileSync(n,"utf8"))}catch(e){F.debug("Failed to parse mcp.json",e)}i.portList||(i.portList={}),i.portList[t||"builder"]=e,i.port=e,g().writeFileSync(n,JSON.stringify(i,null,2),"utf8")}function tA(){let e=y.homedir(),t=p().join(e,".cache/rsdoctor");return p().join(t,"mcp.json")}function tv(e){return/\.(c|le|sa|sc)ss(\?.*)?$/.test(e)}function tS(e){return/\.(js|ts|jsx|tsx)(\?.*)?$/.test(e)}}},l={};function o(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={exports:{}};return a[e].call(r.exports,r,r.exports,o),r.exports}o.m=a,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(r,s){if(1&s&&(r=this(r)),8&s||"object"==typeof r&&r&&(4&s&&r.__esModule||16&s&&"function"==typeof r.then))return r;var n=Object.create(null);o.r(n);var i={};e=e||[null,t({}),t([]),t(t)];for(var a=2&s&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>{i[e]=()=>r[e]});return i.default=()=>r,o.d(n,i),n},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r=[],o.O=(e,t,s,n)=>{if(t){n=n||0;for(var i=r.length;i>0&&r[i-1][2]>n;i--)r[i]=r[i-1];r[i]=[t,s,n];return}for(var a=1/0,i=0;i<r.length;i++){for(var[t,s,n]=r[i],l=!0,d=0;d<t.length;d++)(!1&n||a>=n)&&Object.keys(o.O).every(e=>o.O[e](t[d]))?t.splice(d--,1):(l=!1,n<a&&(a=n));if(l){r.splice(i--,1);var c=s();void 0!==c&&(e=c)}}return e},o.j="410",s={410:0},o.O.j=e=>0===s[e],n=(e,t)=>{var r,n,[i,a,l]=t,d=0;if(i.some(e=>0!==s[e])){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(l)var c=l(o)}for(e&&e(t);d<i.length;d++)n=i[d],o.o(s,n)&&s[n]&&s[n][0](),s[n]=0;return o.O(c)},(i=self.webpackChunk_rsdoctor_client=self.webpackChunk_rsdoctor_client||[]).forEach(n.bind(null,0)),i.push=n.bind(null,i.push.bind(i));var d=o.O(void 0,["85","416","286","637","767","576","25","66","195","485","61","625","682"],function(){return o(21254)});d=o.O(d)})();