@rsdoctor/client 1.1.10 → 1.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.html +1 -1
- package/dist/resource/css/index.12260231.css +1 -0
- package/dist/resource/js/304.5ffff138.js +3 -0
- package/dist/resource/js/{ant-design-0.6bf63acc.js → ant-design-0.c067cf25.js} +4 -4
- package/dist/resource/js/{ant-design-1.05f36d12.js → ant-design-1.32845f6f.js} +2 -2
- package/dist/resource/js/{ant-design-2.3ce1955b.js → ant-design-2.748849f0.js} +4 -4
- package/dist/resource/js/{ant-design-3.c33e6cb4.js → ant-design-3.e823b890.js} +2 -2
- package/dist/resource/js/{ant-design-4.0f462273.js → ant-design-4.fc287b65.js} +4 -4
- package/dist/resource/js/index.7af94924.js +194 -0
- package/dist/resource/js/{rc-0.aabb43ad.js → rc-0.5a695125.js} +1 -1
- package/dist/resource/js/{rc-1.2d9b4e67.js → rc-1.a0853e1e.js} +1 -1
- package/dist/resource/js/react.3416b75d.js +1 -0
- package/dist/resource/js/vender.0a509a76.js +1 -0
- package/package.json +7 -7
- package/dist/resource/css/index.2e484d77.css +0 -1
- package/dist/resource/js/187.54a8d2dc.js +0 -1
- package/dist/resource/js/31.00f60aa6.js +0 -1
- package/dist/resource/js/339.2a821d36.js +0 -194
- package/dist/resource/js/413.53dc0969.js +0 -1
- package/dist/resource/js/715.a638a151.js +0 -1
- package/dist/resource/js/index.a0a1553a.js +0 -2
- package/dist/resource/js/react.17aa4f75.js +0 -1
- package/dist/resource/js/vender.70d6647c.js +0 -1
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_rsdoctor_client=self.webpackChunk_rsdoctor_client||[]).push([["339"],{33410:function(e,t,s){var r,l,n,i,a,o,d,c,u,h,p,m,x,f={};s.r(f),s.d(f,{Il:()=>P,hm:()=>C,SQ:()=>M,qX:()=>_,U7:()=>S,$u:()=>k,Q2:()=>Z,wO:()=>w,RK:()=>D});var g={};s.r(g),s.d(g,{LoaderInternalPropertyName:()=>eu,findLoaderTotalTiming:()=>X,getDirectoriesLoaders:()=>eo,getLoaderChartData:()=>el,getLoaderCosts:()=>et,getLoaderFileDetails:()=>ei,getLoaderFileFirstInput:()=>ed,getLoaderFileInputAndOutput:()=>ec,getLoaderFileTree:()=>en,getLoaderFolderStatistics:()=>ea,getLoaderNames:()=>es,getLoadersCosts:()=>ee,getLoadersTransformData:()=>er,isVue:()=>eh});var j={};s.r(j),s.d(j,{au:()=>ef,Wy:()=>ex,CC:()=>em});var y=s(31549),v=s(81346),b=s(7805),Z=((r=Z||{}).Light="light",r.Dark="dark",r),S=((l=S||{})[l.Success=0]="Success",l[l.Pending=1]="Pending",l[l.Fail=2]="Fail",l),C=((n=C||{})[n.Success=0]="Success",n[n.Pending=1]="Pending",n[n.Updating=2]="Updating",n[n.Fail=3]="Fail",n),w=((i=w||{}).List="list",i.Group="group",i),M=((a=M||{}).Cn="cn",a.En="en",a),k=((o=k||{})[o.BasePadding=20]="BasePadding",o[o.BaseBorderRadius=8]="BaseBorderRadius",o[o.NavBarHeight=54]="NavBarHeight",o),P=((d=P||{}).Red="#e17055",d.Green="#52c41a",d.Yellow="#faad14",d.Blue="#1677ff",d);let D="undefined"==typeof window?0:.85*window.innerWidth>=1100?.85*window.innerWidth:1100,_="";function I(e){return window.localStorage.getItem(`__RSDOCTOR__STORAGE__${e}`)}function A(e,t){try{return window.localStorage.setItem(`__RSDOCTOR__STORAGE__${e}`,t),!0}catch(e){return console.error(e),!1}}function N(){return I("LOCALE")||M.En}function E(){return!!I("VIEWMODE")}v.ZP.use(b.Db).init({lng:N(),resources:{en:{translations:{Overall:"Overall","Compile Analysis":"Compile Analysis","Bundle Alerts":"Bundle Alerts","Help Center":"Help Center",LoadersAnalysis:"Loaders Analysis","Loaders Timeline":"Loaders Timeline","Loaders Analysis":"Loaders Analysis","Rsdoctor Introduction":"Rsdoctor Introduction","Compilation Alerts":"Compilation Alerts","Plugins Analysis":"Plugins Analysis",PluginsAnalysis:"Plugins Analysis",ModuleResolve:"Module Resolve","Bundle Analysis":"Bundle Analysis",BundleSize:"Bundle Size","Module Graph":"Module Graph",TreeShaking:"Tree Shaking","Rule Index":"Rule Index",Resources:"Resources","Project Overall":"Project Overall","Compile Overall":"Compile Overall","Bundle Overall":"Bundle Overall","Expand Omitted":"By default, the reasons tree collapses to the middle of the module introduced by a third party. Click on this icon to view the full tree diagram","Concatenated Tag":"Concatenated Module,hover can display the name of the concatenated main module. Note: the bundled size of the concatenated module is zero, possibly because it is aggregated into the main module.","the file content not changed after transpiled by this loader":"the file content not changed after transpiled by this loader","Output Assets List":"Output Assets List","filter the output assets which size is greater than the input value":"filter the output assets which size is greater than the input value","filter the modules which size is greater than the input value":"filter the modules which size is greater than the input value","After Compile":"After Compile","After Bundle":"After Bundle",CodeModeExplain:"In lite mode or pure stats.json upload, only source code.",DuplicatePakCodeExplain:"There is no code, when in the case of pure stats.json.",AsyncLoaderInfo:"For async loaders, the time cost of each loader is not accurate. For example: mini-css-extract-plugin's loader.",Details:"Details",Expand:"Expand",Collapse:"Collapse"}},cn:{translations:{Overall:"概览","Compile Analysis":"编译分析","Bundle Alerts":"编译预警","Help Center":"帮助中心","Rsdoctor Introduction":"Rsdoctor 介绍","Compilation Alerts":"编译预警","Plugins Analysis":"Plugins 分析",LoadersAnalysis:"Loaders 分析","Loaders Timeline":"Loaders 概览","Loaders Analysis":"Loaders 分析",PluginsAnalysis:"Plugins 分析",ModuleResolve:"Module Resolve 分析","Bundle Analysis":"产物分析",BundleSize:"产物体积分析","Module Graph":"Module Graph",TreeShaking:"Tree Shaking","Rule Index":"错误索引信息",Resources:"资源","Project Overall":"项目信息概览","Compile Overall":"编译数据概览","Bundle Overall":"产物数据概览","Expand Omitted":" reasons 树会默认折叠中间的第三方引入的模块,点击这个图标可以查看完整树图","Concatenated Tag":"串联模块,hover 上去可以显示聚合成的主模块名称。注:聚合模块 bundled size 为零,有可能是因为被聚合到了主模块中。","the file content not changed after transpiled by this loader":"该文件内容在 loader 处理前后没有发生变化","Output Assets List":"产物文件列表","filter the output assets which size is greater than the input value":"筛选大小大于输入值的产物文件","filter the modules which size is greater than the input value":"筛选大小大于输入值的模块","After Compile":"编译后","After Bundle":"打包后",CodeModeExplain:"Lite 模式下或纯 stats.json 上传的情况下只有 source code.",DuplicatePakCodeExplain:"纯 stats.json 输入的情况下没有代码,可使用 Rsdoctor 插件参与构建会有对应代码。",AsyncLoaderInfo:"对于异步 loader,单个 loader 的耗时可能不准确。例如:mini-css-extract-plugin 的 loader。",Details:"详情",Expand:"展开",Collapse:"收起"}}},fallbackLng:{"zh-CN":["cn"],default:["en"]},debug:!1,ns:["translations"],defaultNS:"translations",keySeparator:!1,interpolation:{escapeValue:!1}});var T=s(44194),R=s(76424),z=((c=z||{}).Bootstrap="bootstrap->beforeCompile",c.Compile="beforeCompile->afterCompile",c.Done="afterCompile->done",c.Minify="minify(processAssets)",c),L=s(62802),B=s(57861),O=s(79138),F=s.n(O),$=s(26591),G=s(73656);let K=(0,$.h)();function W(e){let t,s;e.sort((e,t)=>e[0]-t[0]);let r=[];for(let l=0;l<e.length;l++)s=e[l],!t||s[0]>t[1]?(t=s,r.push(s)):t[1]=Math.max(t[1],s[1]);return r}function H(e){return(0,L.inflateSync)(B.Buffer.from(e,"base64")).toString()}K.override({log:e=>{console.log(`${F().green("[RSDOCTOR LOG]")} ${e}`)},info:e=>{console.log(`${F().yellow("[RSDOCTOR INFO]")} ${e}`)},warn:e=>{console.warn(`${F().yellow("[RSDOCTOR WARN]")} ${e}`)},start:e=>{console.log(`${F().green("[RSDOCTOR START]")} ${e}`)},ready:e=>{console.log(`${F().green("[RSDOCTOR READY]")} ${e}`)},error:e=>{console.error(`${F().red("[RSDOCTOR ERROR]")} ${e}`)},success:e=>{console.error(`${F().green("[RSDOCTOR SUCCESS]")} ${e}`)},debug:e=>{G.env.DEBUG&&console.log(`${F().blue("[RSDOCTOR DEBUG]")} ${e}`)}});var V=s(77410),U=s.n(V);function q(e){return/^https?:\/\//.test(e)}function Y(e){return!!(Array.isArray(e)&&e.length>0&&e.every(e=>!!("string"==typeof e&&(q(e)||(0,V.isAbsolute)(e)))))}async function J(e,t){let s=await Promise.all(e.map(e=>t(e))),r=0===s.length?[]:s.reduce((e,t)=>e+t);return"object"==typeof r?r:JSON.parse(H(r))}var Q=s(73656);function X(e){let t=1/0,s=-1/0;for(let r=0;r<e.length;r++){let l=e[r];l.startAt<=t&&(t=l.startAt),l.endAt>=s&&(s=l.endAt)}return{start:t,end:s}}function ee(e,t){let s={},r={};t.forEach(t=>{e(t)?(s[t.pid]||(s[t.pid]=[]),s[t.pid].push([t.startAt,t.endAt])):(r[t.pid]||(r[t.pid]=[]),r[t.pid].push([t.startAt,t.endAt]))});let l=0,n=Object.keys(s);for(let e=0;e<n.length;e++){let t=n[e],i=W(s[t]),a=W(r[t]||[]).filter(e=>{let[t,s]=e;return i.some(e=>t>=e[0]&&s<=e[1])});l+=(i.length?i.reduce((e,t)=>e+=t[1]-t[0],0):0)-(a.length?a.reduce((e,t)=>e+=t[1]-t[0],0):0)}return l}function et(e,t){let s=t.filter(t=>!t.loader.includes("builtin")&&t!==e&&t.pid===e.pid&&!!(t.startAt>=e.startAt)&&!!(t.endAt<=e.endAt)),r=e.endAt-e.startAt;return s.length&&W(s.map(t=>[Math.max(t.startAt,e.startAt),Math.min(t.endAt,e.endAt)])).forEach(e=>{let t=e[1]-e[0];r-=t}),r}function es(e){let t=new Set;return e.forEach(e=>e.loaders.forEach(e=>t.add(ep(e.loader)))),[...t]}function er(e){let t=[];for(let s=0;s<e.length;s++){let r=e[s];for(let e=0;e<r.loaders.length;e++){let s=r.loaders[e];t.push(s)}}return t}function el(e){let t=[],s=er(e);return e.forEach(e=>{e.loaders.forEach(r=>{t.push({layer:e.resource.layer,loader:ep(r.loader),isPitch:r.isPitch,startAt:r.startAt,endAt:r.endAt,pid:r.pid,sync:r.sync,resource:e.resource.path,costs:et(r,s)})})}),t}function en(e){let t=er(e);return e.map(e=>{let{loaders:s,resource:r}=e;return{path:r.path,layer:r.layer,loaders:s.map(e=>({key:e.path,loader:ep(e.loader),path:e.path,errors:e.errors,costs:et(e,t)}))}})}function ei(e,t){let s=t.find(t=>t.resource.path===e);if(!s)throw Error(`"${e}" not match any loader data`);let r=er(t);return{...s,loaders:s.loaders.map(e=>({...e,loader:ep(e.loader),costs:et(e,r)}))}}function ea(e,t){let s=t.filter(t=>{let{path:s}=t.resource;return s.startsWith(e)}),r=[],l=new Map;return s.forEach(e=>{e.loaders.forEach(e=>{let t=l.get(e.loader);return t?l.set(e.loader,{files:t.files+1,path:e.path}):l.set(e.loader,{files:1,path:e.path}),r.push({loader:e.loader,startAt:e.startAt,endAt:e.endAt,pid:e.pid})})}),Array.from(l).map(e=>{let t=ee(t=>t.loader===e[0],r);return{loader:e[0],files:e[1].files,path:e[1].path,costs:t}})}function eo(e,t){return(function(e,t){let s=new Set;return e.forEach(e=>{if(e.resource.path.startsWith(t)){let r=e.resource.path.split(t).slice(1).join("/").split("/");if(r.length>=2){let e=r.slice(0,2).join("/");s.add(`${t}/${e}`)}}else{let t=e.resource.path.split("/"),r=t.slice(0,t.length-1).join("/");s.add(r)}}),Array.from(s)})(e,t||Q.cwd()).map(t=>{let s=ea(t,e);return{directory:t,stats:s}})}function ed(e,t){for(let s=0;s<t.length;s++){let r=t[s];if(r.resource.path===e){let e=r.loaders.filter(e=>!e.isPitch);if(!e.length)return"";return e[0].input||""}}return""}function ec(e,t,s,r){for(let l=0;l<r.length;l++){let n=r[l];if(n.resource.path===e)for(let e=0;e<n.loaders.length;e++){let r=n.loaders[e];if(r.loader===t&&r.loaderIndex===s)return{input:r.input||"",output:r.result||""};return{input:"",output:""}}}return{input:"",output:""}}let eu="__l__",eh=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")))}),ep=e=>{let t=e.includes("node_modules")?e.split("node_modules"):null;return t?t[t.length-1]:e};function em(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return 0===t?Math.floor(e):+e.toFixed(t)}function ex(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=em(e/60,0),s=em(e%60,1),r=ex(t,"h");return s>0?`${t}${r} ${s}${ex(s,"m")}`:`${t}${r}`}let s=ex(e=em(e,0),"m"),r=em(t%60,0);return r>0?`${e}${s} ${r}s`:`${e}${s}`}return`${em(t,1)}s`}if(e>=10)return`${+em(e,0)}ms`;if(e>=1)return`${+em(e,1)}ms`;let t=+em(e,2);return 0===t&&(t=+em(e,3)),`${t}ms`}function eg(e){return e.chunks?e.chunks:[]}function ej(e,t){return e.chunks.length?ey(e.chunks,t):[]}function ey(e,t,s){return e.length?e.map(e=>t.find(t=>t.id===e)).filter(Boolean).map(e=>{if(s&&s.length>0){let t={};for(let r of s)void 0!==e[r]&&(t[r]=e[r]);return t}return e}):[]}s(73656),s(73656);function ev(e,t,s,r){var l=ey(eg(e),t),n=s,i=r;let a=[];try{l.forEach(e=>{(function(e){let{modules:t=[]}=e;return t})(e).map(e=>{let t=n.find(t=>t.id===e);if(i&&i.length>0){if(!t)return null;let e={};for(let s of i)void 0!==t[s]&&(e[s]=t[s]);return e}return t}).filter(Boolean).forEach(e=>{a.filter(t=>t.id===e.id).length||a.push(e)})})}catch(e){K.debug(e)}return a}let eb=RegExp(`(.*)${/[-|.]/.source}${/[a-z|A-Z|0-9]{4,32}/.source}(${/(?:\.[a-z|A-Z|0-9]{2,}){1,}/.source})$`);function eZ(e,t){var s;let r=null==t?void 0:t.split("."),l="",n=e;return(null==r?void 0:r.length)&&r.length>=3&&(null==(s=r[r.length-2])?void 0:s.indexOf("["))<0&&"js|css|html".indexOf(r[r.length-1])>-1?(l=r[r.length-2],n=e.replace(/(.*)(\.[a-f0-9]{4,32})([^.]*.[^.]+){2,}/g,"$1"),`${n}.${l}.${e.substring(e.lastIndexOf(".")+1)}`):e.replace(eb,"$1$2")}function eS(e,t){return e.path.slice(-t.length)===t||function(e){let t=e.split("?")[0].match(/\.([0-9a-z]+)(?:[\?#]|$)/i);return t?`.${t[1]}`:""}(e.path)===t}function eC(e,t){return!!t.length&&t.some(t=>eS(e,t))}function ew(e,t){if(t)if("function"==typeof t)e=e.filter(t);else{var s;s=e,e="string"==typeof t?s.filter(e=>eS(e,t)):Array.isArray(t)?s.filter(e=>eC(e,t)):[]}return e}function eM(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{withFileContent:r=!0,filterOrExtensions:l}=s;return(e=e.filter(e=>!eC(e,R.Constants.MapExtensions)),l&&(e=ew(e,l)),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:ek(e,t),content:r?e.content:void 0}))}:{count:0,size:0,files:[]}}function ek(e,t){return ey(eg(e),t,void 0).some(e=>!!e.initial)}function eP(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return s.filterOrExtensions&&(e=ew(e,s.filterOrExtensions)),eM(e,t,{...s,filterOrExtensions:e=>ek(e,t)})}function eD(e,t){let s=e===t;return{percent:s?0:0===e?100:Math.abs(t-e)/e*100,state:s?R.Client.RsdoctorClientDiffState.Equal:e>t?R.Client.RsdoctorClientDiffState.Down:R.Client.RsdoctorClientDiffState.Up}}function e_(e,t,s){let r,l,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],{size:i,count:a}=n?eP(e.assets,e.chunks,{filterOrExtensions:s}):eM(e.assets,e.chunks,{filterOrExtensions:s});if(e===t)r=i,l=a;else{let{size:e,count:i}=n?eP(t.assets,t.chunks,{filterOrExtensions:s}):eM(t.assets,t.chunks,{filterOrExtensions:s});r=e,l=i}let{percent:o,state:d}=eD(i,r);return{size:{baseline:i,current:r},count:{baseline:a,current:l},percent:o,state:d}}function eI(e){return Object.keys(e)}function eA(e){let t=eI(e),s=new Set;return t.forEach(t=>{e[t].forEach(e=>{s.add(e.tapName)})}),[...s]}function eN(e,t,s,r,l){return r.slice().reverse().map(r=>{let n=t.find(e=>e.id===r.dependencyId);if(!n)return null;let i=e.find(e=>e.id===n.module);return i?{group:r.group,module:i,dependency:n,relativePath:(0,V.relative)(s,i.path),moduleCode:null==l?void 0:l[i.id]}:null}).filter(Boolean)}class eE{log(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];console.log(`[${this.constructor.name}]`,...t)}loadAPI(){for(var e,t=arguments.length,s=Array(t),r=0;r<t;r++)s[r]=arguments[r];let[l,n]=s;switch(l){case R.SDK.ServerAPI.API.LoadDataByKey:return this.loader.loadData(n.key);case R.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,s,r,l,n,i,a]=e;return{root:t,pid:s,hash:r,summary:l,configs:n,envinfo:i,errors:a}});case R.SDK.ServerAPI.API.GetClientRoutes:if("undefined"!=typeof window&&(null==(e=window)?void 0:e[R.Constants.WINDOW_RSDOCTOR_TAG]))return window[R.Constants.WINDOW_RSDOCTOR_TAG].enableRoutes;return this.loader.loadManifest().then(e=>{let{enableRoutes:t=[]}=e.client||{};return t});case R.SDK.ServerAPI.API.GetLoaderNames:return this.loader.loadData("loader").then(e=>es(e||[]));case R.SDK.ServerAPI.API.GetLayers:return this.loader.loadData("moduleGraph").then(e=>{let{layers:t}=e||{};return t});case R.SDK.ServerAPI.API.GetLoaderChartData:return this.loader.loadData("loader").then(e=>el(e||[]));case R.SDK.ServerAPI.API.GetLoaderFileTree:return this.loader.loadData("loader").then(e=>en(e||[]));case R.SDK.ServerAPI.API.GetLoaderFileDetails:return this.loader.loadData("loader").then(e=>ei(n.path,e||[]));case R.SDK.ServerAPI.API.GetLoaderFolderStatistics:return this.loader.loadData("loader").then(e=>ea(n.folder,e||[]));case R.SDK.ServerAPI.API.GetLoaderFileFirstInput:return this.loader.loadData("loader").then(e=>ed(n.file,e||[]));case R.SDK.ServerAPI.API.GetLoaderFileInputAndOutput:return this.loader.loadData("loader").then(e=>ed(n.file,e||[]));case R.SDK.ServerAPI.API.GetResolverFileTree:return this.loader.loadData("resolver").then(e=>(e||[]).map(e=>({issuerPath:e.issuerPath})));case R.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],s=e[1],r=e[2];return function(e,t,s,r){let l=s.find(t=>t.path===e),n=t.filter(t=>t.issuerPath===e),i=l&&r&&r[l.id]?r[l.id].source:"",a=n.reduce((e,t)=>t.request&&t.result?e.replace(RegExp(`["']${t.request}["']`),`"${t.result}"`):e,i);return{filepath:e,before:i,after:a,resolvers:n.map(e=>({...e,costs:function(e,t){let s=t.filter(t=>t!==e&&t.pid===e.pid&&t.startAt>=e.startAt&&t.endAt<=e.endAt),r=e.endAt-e.startAt;return s.length&&W(s.map(t=>[Math.max(t.startAt,e.startAt),Math.min(t.endAt,e.endAt)])).forEach(e=>{let t=e[1]-e[0];r-=t}),r}(e,t)}))}}(n.filepath,t||[],s||[],r||{})});case R.SDK.ServerAPI.API.GetPluginSummary:return this.loader.loadData("plugin").then(e=>{var t;return{hooks:eI(t=e||{}),tapNames:eA(t)}});case R.SDK.ServerAPI.API.GetPluginData:return this.loader.loadData("plugin").then(e=>{let{hooks:t,tapNames:s}=n;return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=eI(e).filter(e=>!t.length||-1!==t.indexOf(e));return r.length?eA(e).reduce((t,l)=>(s.length&&-1===s.indexOf(l)||r.forEach(s=>{let r=e[s].filter(e=>e.tapName===l);0!==r.length&&t.push({tapName:l,hook:s,data:r.map(e=>({startAt:e.startAt,endAt:e.endAt,costs:e.costs,type:e.type}))})}),t),[]):[]}(e||{},t,s)});case R.SDK.ServerAPI.API.GetAssetsSummary:return this.loader.loadData("chunkGraph").then(e=>{let{withFileContent:t=!0}=n,{assets:s=[],chunks:r=[]}=e||{};return function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={...s,filterOrExtensions:R.Constants.JSExtension},l={...s,filterOrExtensions:R.Constants.CSSExtension},n={...s,filterOrExtensions:R.Constants.ImgExtensions},i={...s,filterOrExtensions:R.Constants.HtmlExtension},a={...s,filterOrExtensions:R.Constants.MediaExtensions},o={...s,filterOrExtensions:R.Constants.FontExtensions},d={...s,filterOrExtensions:e=>!eC(e,[R.Constants.JSExtension,R.Constants.CSSExtension,R.Constants.HtmlExtension].concat(R.Constants.ImgExtensions,R.Constants.MediaExtensions,R.Constants.FontExtensions,R.Constants.MapExtensions))};return{all:{total:eM(e,t,s)},js:{total:eM(e,t,r),initial:eP(e,t,r)},css:{total:eM(e,t,l),initial:eP(e,t,l)},imgs:{total:eM(e,t,n)},html:{total:eM(e,t,i)},media:{total:eM(e,t,a)},fonts:{total:eM(e,t,o)},others:{total:eM(e,t,d)}}}(s,r,{withFileContent:t})});case R.SDK.ServerAPI.API.GetAssetDetails:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph")]).then(e=>{let{assetPath:t}=n,{assets:s=[],chunks:r=[]}=e[0]||{},{modules:l=[]}=e[1]||{},i=s.find(e=>e.path===t);return{asset:i,chunks:ey(eg(i),r,void 0),modules:ev(i,r,l)}});case R.SDK.ServerAPI.API.GetSummaryBundles:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph")]).then(e=>{let{assets:t=[],chunks:s=[]}=e[0]||{},{modules:r=[]}=e[1]||{};return function(e,t,s,r){let l=[];try{for(let n=0;n<e.length;n++){let i=e[n];l.push({asset:i,modules:ev(i,t,s,r)})}return l}catch(e){return console.error(e),[]}}(t,s,r,["id","path","size","kind"])});case R.SDK.ServerAPI.API.GetChunksByModuleId:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph")]).then(e=>{let{moduleId:t}=n,{chunks:s=[]}=e[0]||{},{modules:r=[]}=e[1]||{},l=r.find(e=>e.id===t);return l?ej(l,s):[]});case R.SDK.ServerAPI.API.GetModuleDetails:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph")]).then(e=>{let{moduleId:t}=n,{modules:s=[],dependencies:r=[]}=e[1]||{},l=s.find(e=>e.id===t);return{module:l,dependencies:l.dependencies.map(e=>r.find(t=>t.id===e)).filter(Boolean)}});case R.SDK.ServerAPI.API.GetModulesByModuleIds:return this.loader.loadData("moduleGraph").then(e=>{let{moduleIds:t}=n,{modules:s=[]}=e||{};return t.map(e=>s.find(t=>t.id===e)).filter(Boolean)});case R.SDK.ServerAPI.API.GetEntryPoints:return Promise.all([this.loader.loadData("chunkGraph")]).then(e=>{let[t]=e,{entrypoints:s=[]}=t||{};return s});case R.SDK.ServerAPI.API.GetModuleCodeByModuleId:return this.loader.loadData("moduleCodeMap").then(e=>{let{moduleId:t}=n;return e?e[t]:{source:"",transformed:"",parsedSource:""}});case R.SDK.ServerAPI.API.GetModuleCodeByModuleIds:return this.loader.loadData("moduleCodeMap").then(e=>{let{moduleIds:t}=n,s={};return e?(t.forEach(t=>{s[t]=e[t]}),s):[]});case R.SDK.ServerAPI.API.GetAllModuleGraph:return this.loader.loadData("moduleGraph").then(e=>null==e?void 0:e.modules);case R.SDK.ServerAPI.API.GetSearchModules:return Promise.all([this.loader.loadData("moduleGraph"),this.loader.loadData("chunkGraph")]).then(e=>{let[t,s]=e,{moduleName:r}=n;if(!r)return[];let l=s.chunks.reduce((e,t)=>(t.assets.forEach(s=>{e[t.id]||(e[t.id]=[]),e[t.id].push(s)}),e),{}),i=new Map;return null==t||t.modules.filter(e=>{e.webpackId.includes(r)&&e.chunks.forEach(e=>{i.has(e)||(l[e]||[]).forEach(t=>{t.endsWith(".js")&&i.set(e,t)})})}),Object.fromEntries(i)});case R.SDK.ServerAPI.API.GetSearchModuleInChunk:return Promise.all([this.loader.loadData("moduleGraph"),this.loader.loadData("root")]).then(e=>{let[t,s]=e,{moduleName:r,chunk:l}=n;return r?null==t?void 0:t.modules.filter(e=>e.webpackId.includes(r)&&e.chunks.includes(l)).map(e=>({id:e.id,path:e.path,relativePath:(0,V.relative)(s,e.path)})):[]});case R.SDK.ServerAPI.API.GetAllChunkGraph:return this.loader.loadData("chunkGraph").then(e=>null==e?void 0:e.chunks);case R.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:s}=n,[r,l=[],i="",a]=e,{modules:o=[],dependencies:d=[]}=r||{},{packages:c=[]}=l.find(e=>e.id===t)||{},{dependencies:u=[]}=c.find(e=>e.target.name===s.name&&e.target.root===s.root&&e.target.version===s.version)||{};return eN(o,d,i,u,a||{})});case R.SDK.ServerAPI.API.GetOverlayAlerts:return this.loader.loadData("errors").then(e=>(e||[]).filter(e=>e.code===R.Rule.RuleMessageCodeEnumerated.Overlay));case R.SDK.ServerAPI.API.BundleDiffManifest:return this.loader.loadManifest();case R.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,s,r,l;let[n,i="",a="",o={},d={},c={},u={},h={},p=[]]=e,m="";return"string"==typeof(null==(r=p[0])||null==(s=r.config)||null==(t=s.output)?void 0:t.chunkFilename)&&(m=null==(l=p[0])?void 0:l.config.output.chunkFilename),{root:i,hash:a,errors:o,chunkGraph:d,moduleGraph:c,packageGraph:h,outputFilename:m,moduleCodeMap:u}});case R.SDK.ServerAPI.API.GetTileReportHtml:return this.loader.loadData("otherReports").then(e=>null==e?void 0:e.tileReportHtml);case R.SDK.ServerAPI.API.GetChunkGraph:return this.loader.loadData("chunkGraph").then(e=>{let{chunks:t=[]}=e||{};return t});case R.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 R.SDK.ServerAPI.API.GetModuleByName:return this.loader.loadData("moduleGraph").then(e=>{let{moduleName:t}=n,{modules:s=[]}=e||{};return s.filter(e=>e.path.includes(t)).map(e=>({id:e.id,path:e.path}))||[]});case R.SDK.ServerAPI.API.GetModuleIssuerPath:return this.loader.loadData("moduleGraph").then(e=>{var t;let{moduleId:s}=n,r=(null==e?void 0:e.modules)||[],l=(null==(t=r.find(e=>String(e.id)===s))?void 0:t.issuerPath)||[];return Array.isArray(l)&&l.length>0&&"number"==typeof l[0]?l.map(e=>{var t;return null==(t=r.find(t=>t.id===e))?void 0:t.path}).filter(Boolean):l});case R.SDK.ServerAPI.API.GetPackageInfo:return this.loader.loadData("packageGraph").then(e=>null==e?void 0:e.packages);case R.SDK.ServerAPI.API.GetPackageDependency:return this.loader.loadData("packageGraph").then(e=>(null==e?void 0:e.dependencies)||[]);case R.SDK.ServerAPI.API.GetChunkGraphAI:return this.loader.loadData("chunkGraph").then(e=>{let{chunks:t=[]}=e||{};return t.map(e=>{let{modules:t,...s}=e;return s})});case R.SDK.ServerAPI.API.GetChunkByIdAI:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph")]).then(e=>{let[t,s]=e,{chunks:r=[]}=t||{},{modules:l=[]}=s||{},{chunkId:i}=n,a=r.find(e=>e.id===i);if(!a)return null;let o=l.filter(e=>a.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 a.modulesInfo=o,a});case R.SDK.ServerAPI.API.GetDirectoriesLoaders:return Promise.all([this.loader.loadData("root"),this.loader.loadData("loader")]).then(e=>{let[t,s]=e;return eo(s||[],t||"")});default:throw Error(`API not implement: "${l}"`)}}constructor(e){this.loader=e,this.loadAPI=this.loadAPI.bind(this)}}let eT=/[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*/;function eR(e){return"number"==typeof e&&!Number.isNaN(e)}RegExp(`(?:${/(?:node_modules|~)(?:\/\.pnpm)?/.source}/)(?:(?:@${eT.source}[/|+])?(?:${eT.source}\\+)*(?:${eT.source})(?:${/@[\w|\-|_|.]+/.source})?)(?:_(?:@${eT.source}[/|+])?(?:${eT.source})(?:@${eT.source})?)*/`,"g");s(88637),s(72715);var ez=s(50002);class eL{get(e){if(this.manifest)return this.manifest[e]}getData(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data",s=this.get(t);if(s)return s[e]}getKeys(e){return e.split(".")}joinKeys(e){return e.join(".")}dispose(){this.disposed=!0}limit(e,t){if(this.pool.has(e))return this.pool.get(e);let s=t().finally(()=>this.pool.delete(e));return this.pool.set(e,s),s}log(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];console.log(`[${this.constructor.name}]`,...t)}async loadManifest(){return this.manifest}constructor(e){this.manifest=e,this.pool=new Map,this.disposed=!1,this.shardingDataMap=new Map,this.loader=new eE(this),console.log("[DataLoader] isLocal: ",this.isLocal())}}var eB=s(25184);let eO=new Map,eF=location.protocol.includes("https")?"wss":"ws",e$=`${eF}://${location.host}`,eG=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;function eK(e){let t=function(e){let{port:t,protocol:s,hostname:r}=e;if("undefined"!=typeof URL){let e=new URL("http://localhost");return e.port=String(t),e.hostname=r,e.protocol=location.protocol.includes("https")?"wss":"ws",eG.test(r)||r.includes("localhost")?e.toString():`${s}//${r}`}let l=-1===s.indexOf(":")?":":"";return`${s}${l}//${r}:${t}`}({port:e,hostname:location.hostname,protocol:location.protocol});return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e$;if(!eO.has(e)){let t=(0,eB.io)(e,{});t.on("connect",()=>{console.log(`Socket Connect ${e}`)}),eO.set(e,t)}return eO.get(e)}(e?t:e$)}class eW extends eL{isLocal(){return!0}async loadData(e){return this.limit(e,async()=>{let[t,...s]=this.getKeys(e),r=this.getData(t);if(!r)return;let l=r;if(Y(l)){if(!this.shardingDataMap.has(e)){let t=new Promise(t=>{eK().emit(R.SDK.ServerAPI.API.LoadDataByKey,{key:e},e=>{t(e.res)})});this.shardingDataMap.set(e,t)}return l=await this.shardingDataMap.get(e),this.shardingDataMap.delete(e),l}return s.length>0?(0,ez.Z)(l,this.joinKeys(s)):l})}async loadAPI(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];let[r,l]=t,n=l?`${r}_${JSON.stringify(l)}`:`${r}`,i=this.get("__SOCKET__PORT__")??"";return this.limit(n,async()=>new Promise(e=>{eK(i).emit(r,l,t=>{e(t.res)})}))}dispose(){super.dispose(),this.events.forEach((e,t)=>{e.forEach(e=>{this.removeOnDataUpdate(t,e)}),e.clear()}),this.events.clear()}onDataUpdate(e,t){this.events.has(e)||this.events.set(e,new Set),this.events.get(e).has(t)||(this.events.get(e).add(t),eK().on(e,t))}removeOnDataUpdate(e,t){eK().off(e,t),this.events.get(e).delete(t)}constructor(){super(...arguments),this.events=new Map}}var eH=s(83404),eV=s(89730),eU=s.n(eV),eq=s(45641);let eY=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 eJ(e){return null!=e}async function eQ(e){return q(e)?eH.Z.get(e,{timeout:999999,responseType:"text"}).then(e=>e.data):e}async function eX(e){let t=await eH.Z.get(e,{timeout:3e4}).then(e=>e.data);return"string"==typeof t&&(t=JSON.parse(t)),console.log("[json] ",e,t),t}let e0=new Map;async function e1(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:((e=window[R.Manifest.RsdoctorManifestClientConstant.WindowPropertyForManifestUrl]?window[R.Manifest.RsdoctorManifestClientConstant.WindowPropertyForManifestUrl]:function(){let{query:e}=eU()(location.href,!0),t=e[R.Client.RsdoctorClientUrlQuery.ManifestFile];if(t)return decodeURIComponent(t)}())||(e=R.SDK.ServerAPI.API.Manifest),e);return e0.has(t)||e0.set(t,eX(t).catch(e=>{throw e0.delete(t),e})),await e0.get(t)}class e5 extends eL{isLocal(){return!1}async loadData(e){return this.limit(e,async()=>{let[t,...s]=this.getKeys(e),r=this.getData(t,"cloudData");if(!r)return;let l=r;if(Y(l)){if(!this.shardingDataMap.has(t)){let s=J(l,eQ).catch(t=>{throw this.log("loadData error: ",l,e),t});this.shardingDataMap.set(t,s)}l=await this.shardingDataMap.get(t)}return s.length>0?(0,ez.Z)(l,this.joinKeys(s)):l})}async loadAPI(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];let[r,l]=t,n=l?`${r}_${JSON.stringify(l)}`:`${r}`;return this.limit(n,async()=>this.loader.loadAPI(...t))}dispose(){super.dispose()}onDataUpdate(){}removeOnDataUpdate(){}}class e2 extends eL{isLocal(){return!1}async loadData(e){console.log(`[loadData]-[key]: ${e}`);let[t]=this.getKeys(e);console.log(`[loadData]-[scope]: ${t}`);let s=this.getData(t);if(!s)return;let r=s;if(!this.shardingDataMap.has(t)){let e="object"==typeof r?r:JSON.parse(H(r));this.shardingDataMap.set(t,e)}return await this.shardingDataMap.get(t)}getData(e){return console.log(`[getData]-[scope]: ${e}`),window[R.Constants.WINDOW_RSDOCTOR_TAG][e]}async loadAPI(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.loader.loadAPI(...t)}dispose(){super.dispose()}onDataUpdate(){}removeOnDataUpdate(){}}let e4=new WeakMap;async function e6(e){try{if(e.__LOCAL__SERVER__)return console.log("[LocalServerDataLoader]"),new eW(e)}catch(e){console.log("[DataLoader] fallback to RemoteDataLoader")}return new e5(e)}function e3(e){let[t,s]=(0,T.useState)(void 0);return(0,T.useEffect)(()=>{window[R.Constants.WINDOW_RSDOCTOR_TAG]&&(console.log("[brief mode]"),s(new e2({data:[]})))},[]),(0,T.useEffect)(()=>{if(e){if(!e4.has(e)){let t=e6(e);e4.set(e,t)}e4.get(e).then(e=>{s(e)})}},[e]),{loader:t}}var e7=s(96883),e9=s(13775),e8=s(41041),te=s(16517),tt=s(2418),ts=s(78210),tr=s(33126),tl=s(16921),tn=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,y.jsx)("path",{fill:"#FAAD14",d:"M11.409 3.51 8.046.146A.5.5 0 0 0 7.693 0H1.056a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.503.503 0 0 0-.147-.355ZM7.462 1.152l2.94 2.94h-2.94v-2.94Zm2.969 11.722H1.68V1.125h4.718V4.5a.656.656 0 0 0 .657.656h3.375v7.719Z"}),(0,y.jsx)("path",{fill:"#FAAD14",d:"M6.927 9.651h.888a1.61 1.61 0 0 1-.24.775c-.141.226-.338.402-.592.528-.251.127-.554.19-.908.19a1.86 1.86 0 0 1-.745-.142 1.586 1.586 0 0 1-.564-.416 1.851 1.851 0 0 1-.354-.653 2.826 2.826 0 0 1-.121-.858v-.3c0-.316.041-.602.124-.858.085-.257.206-.476.362-.656.159-.18.348-.319.567-.415.22-.097.466-.146.737-.146.36 0 .664.065.911.196.25.13.443.31.58.54.138.23.22.491.249.784H6.93a1.146 1.146 0 0 0-.104-.442.59.59 0 0 0-.27-.276 1.012 1.012 0 0 0-.475-.095.86.86 0 0 0-.39.083.722.722 0 0 0-.278.252 1.245 1.245 0 0 0-.17.428c-.035.17-.053.37-.053.6v.305c0 .224.017.42.05.591.034.168.086.31.155.428a.719.719 0 0 0 .273.26.888.888 0 0 0 .407.087c.186 0 .34-.03.46-.09a.616.616 0 0 0 .276-.263c.065-.117.104-.263.116-.437Z"}),(0,y.jsx)("path",{fill:"#FFF1B8",fillRule:"evenodd",d:"M6.4 1.125V4.5a.656.656 0 0 0 .656.656h3.375v7.719H1.68V1.125h4.718Zm1.415 8.526h-.888c-.012.174-.05.32-.116.437a.616.616 0 0 1-.276.264c-.12.06-.274.089-.46.089a.888.888 0 0 1-.407-.086.72.72 0 0 1-.273-.261c-.07-.117-.12-.26-.154-.428a3.073 3.073 0 0 1-.05-.59v-.307c0-.23.017-.43.053-.6.037-.172.094-.314.169-.427a.722.722 0 0 1 .279-.252.86.86 0 0 1 .389-.083c.198 0 .356.031.475.095a.59.59 0 0 1 .27.276c.06.12.094.268.104.442h.89a1.829 1.829 0 0 0-.249-.784c-.136-.23-.33-.41-.579-.54-.247-.13-.551-.196-.911-.196-.271 0-.517.049-.737.146-.22.097-.408.235-.567.415-.156.18-.277.399-.362.656a2.763 2.763 0 0 0-.124.858v.3c0 .317.04.603.121.858.081.255.2.473.354.653.156.18.344.319.564.416.22.095.468.143.745.143.354 0 .657-.064.908-.19.254-.127.45-.303.591-.529a1.61 1.61 0 0 0 .24-.775Z",clipRule:"evenodd"})]}),ti=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,y.jsx)("path",{fill:"#722ED1",d:"M6.076 7.58a.356.356 0 0 1 .646.299l-1.576 3.414a.356.356 0 0 1-.646-.298l1.576-3.414ZM7.198 8.135a.356.356 0 0 0 0 .503l.8.799-.8.8a.356.356 0 1 0 .503.502l1.05-1.05a.356.356 0 0 0 0-.503l-1.05-1.05a.356.356 0 0 0-.503 0ZM4.024 8.135a.356.356 0 0 1 0 .503l-.799.799.8.8a.356.356 0 1 1-.504.502l-1.05-1.05a.356.356 0 0 1 0-.503l1.05-1.05a.356.356 0 0 1 .503 0Z"}),(0,y.jsx)("path",{fill:"#EFDBFF",fillRule:"evenodd",d:"M5.955 1.125V4.5a.656.656 0 0 0 .656.656h3.375v7.719h-8.75V1.125h4.719Zm.121 6.456a.356.356 0 1 1 .646.298l-1.576 3.414a.356.356 0 1 1-.646-.298l1.576-3.414Zm1.122.554a.356.356 0 0 0 0 .503l.8.799-.8.8a.356.356 0 1 0 .503.502l1.05-1.05a.356.356 0 0 0 0-.503l-1.05-1.05a.356.356 0 0 0-.503 0Zm-3.174.503a.356.356 0 1 0-.503-.503l-1.05 1.05a.356.356 0 0 0 0 .503l1.05 1.05a.355.355 0 1 0 .503-.502l-.799-.799.8-.8Z",clipRule:"evenodd"}),(0,y.jsx)("path",{fill:"#722ED1",d:"M10.964 3.51 7.602.146A.5.5 0 0 0 7.249 0H.61a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.503.503 0 0 0-.147-.355ZM7.017 1.152l2.941 2.94h-2.94v-2.94Zm2.97 11.722h-8.75V1.125h4.718V4.5a.656.656 0 0 0 .656.656h3.375v7.719Z"})]}),ta=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,y.jsx)("path",{fill:"#E6F7FF",d:"M6.733 4.5V1.125h-4.72v11.75h8.75V5.156H7.39a.656.656 0 0 1-.656-.656Zm-2.094.781a.625.625 0 1 1 0 1.25.625.625 0 0 1 0-1.25Zm4.625 4.594H3.515a.125.125 0 0 1-.098-.202l1.56-1.987a.125.125 0 0 1 .196 0l.642.819 1.216-1.55a.126.126 0 0 1 .199 0l2.132 2.718a.125.125 0 0 1-.098.202Z"}),(0,y.jsx)("path",{fill:"#1890FF",d:"M11.742 3.51 8.38.146A.5.5 0 0 0 8.026 0H1.39a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.503.503 0 0 0-.147-.355ZM7.795 1.152l2.94 2.94h-2.94v-2.94Zm2.969 11.722h-8.75V1.125h4.719V4.5a.656.656 0 0 0 .656.656h3.375v7.719Z"}),(0,y.jsx)("path",{fill:"#1890FF",d:"m7.031 6.955-1.215 1.55-.643-.82a.125.125 0 0 0-.196 0l-1.56 1.988a.125.125 0 0 0 .099.202h5.748c.105 0 .163-.12.098-.202L7.23 6.955a.127.127 0 0 0-.199 0ZM4.014 5.906a.625.625 0 1 0 1.25 0 .625.625 0 0 0-1.25 0Z"})]}),to=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,y.jsx)("path",{fill:"#E6F7FF",fillRule:"evenodd",d:"M6.177 1.125V4.5a.656.656 0 0 0 .656.656h3.375v7.719h-8.75V1.125h4.72Zm1.806 8.7c.02.054.03.115.03.183a.411.411 0 0 1-.26.388.833.833 0 0 1-.333.057c-.111 0-.213-.011-.307-.034a.661.661 0 0 1-.24-.11.5.5 0 0 1-.153-.197.733.733 0 0 1-.055-.3H5.88c0 .214.044.399.133.555.088.156.206.285.354.386.15.1.315.176.497.226.183.049.368.073.555.073.208 0 .397-.023.565-.07.169-.047.314-.116.435-.206.122-.09.215-.2.279-.33a.987.987 0 0 0 .096-.443c0-.157-.027-.296-.08-.42a.978.978 0 0 0-.24-.33 1.687 1.687 0 0 0-.396-.263 3.463 3.463 0 0 0-.544-.211 3.423 3.423 0 0 1-.326-.118 1.298 1.298 0 0 1-.237-.127.528.528 0 0 1-.146-.146.333.333 0 0 1-.047-.174c0-.086.023-.162.068-.23a.451.451 0 0 1 .203-.164.808.808 0 0 1 .339-.062c.14 0 .257.024.349.073a.476.476 0 0 1 .208.2c.047.084.07.18.07.292h.777c0-.226-.059-.426-.175-.602a1.172 1.172 0 0 0-.484-.414 1.664 1.664 0 0 0-.732-.15c-.205 0-.393.024-.565.075-.17.05-.318.122-.443.216a.989.989 0 0 0-.292.333.889.889 0 0 0-.104.43c0 .163.033.306.1.43.067.123.159.231.275.325.118.092.254.173.406.242.155.07.318.132.49.188.155.048.28.095.378.14a.97.97 0 0 1 .226.138c.054.046.09.096.11.152ZM4.595 7.209v2.628c0 .13-.021.24-.063.33a.456.456 0 0 1-.17.206.466.466 0 0 1-.257.07.608.608 0 0 1-.263-.051.36.36 0 0 1-.17-.175.791.791 0 0 1-.057-.33h-.783c0 .265.054.485.164.658.109.172.26.3.45.383.191.083.41.125.659.125.24 0 .455-.048.646-.146.193-.097.344-.236.456-.416.11-.183.166-.4.166-.654V7.208h-.778Z",clipRule:"evenodd"}),(0,y.jsx)("path",{fill:"#1890FF",d:"M8.014 10.008a.502.502 0 0 0-.031-.182.344.344 0 0 0-.11-.152.97.97 0 0 0-.226-.138 3.201 3.201 0 0 0-.378-.14 4.777 4.777 0 0 1-.49-.188 2.012 2.012 0 0 1-.406-.242 1.091 1.091 0 0 1-.276-.325.897.897 0 0 1-.099-.43c0-.158.035-.301.104-.43a.989.989 0 0 1 .292-.333c.125-.094.273-.166.443-.216.172-.05.36-.076.565-.076.28 0 .523.05.732.151.208.101.37.239.484.414.116.176.175.376.175.602h-.776a.585.585 0 0 0-.07-.292.476.476 0 0 0-.21-.2.743.743 0 0 0-.348-.073.808.808 0 0 0-.339.062.451.451 0 0 0-.203.164.404.404 0 0 0-.067.23c0 .064.015.122.046.174.033.052.082.1.146.146.064.045.143.088.237.127.094.04.202.08.326.118.206.062.388.132.544.21.158.079.29.166.396.264a.978.978 0 0 1 .24.33c.053.124.08.263.08.42a.987.987 0 0 1-.096.442.909.909 0 0 1-.279.331c-.121.09-.266.159-.435.206a2.11 2.11 0 0 1-.565.07c-.187 0-.372-.024-.555-.073a1.686 1.686 0 0 1-.497-.226c-.148-.101-.266-.23-.354-.386a1.107 1.107 0 0 1-.133-.555h.784c0 .119.018.218.055.3a.5.5 0 0 0 .153.198c.068.05.148.087.24.11.094.022.196.033.307.033.136 0 .247-.019.333-.057a.411.411 0 0 0 .26-.388ZM4.595 9.836V7.208h.778v2.628c0 .253-.055.471-.166.654-.112.18-.263.319-.456.416a1.402 1.402 0 0 1-.646.146c-.248 0-.468-.042-.659-.125a.991.991 0 0 1-.45-.383c-.11-.173-.164-.393-.164-.659h.783c0 .14.02.25.058.331a.36.36 0 0 0 .169.175c.073.034.16.052.263.052a.466.466 0 0 0 .258-.07.456.456 0 0 0 .17-.206c.04-.09.062-.2.062-.331Z"}),(0,y.jsx)("path",{fill:"#1890FF",d:"M11.186 3.51 7.824.146A.5.5 0 0 0 7.47 0H.833a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.503.503 0 0 0-.147-.355ZM7.24 1.152l2.94 2.94H7.24v-2.94Zm2.968 11.722h-8.75V1.125h4.72V4.5a.656.656 0 0 0 .655.656h3.375v7.719Z"})]}),td=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,y.jsx)("path",{fill:"#F0F0F0",d:"M6.288 4.5V1.125H1.57v11.75h8.75V5.156H6.944a.656.656 0 0 1-.656-.656Zm-.344 6.625a.5.5 0 1 1 0-.999.5.5 0 0 1 0 .999Zm1.72-3.569c.01.702-.465 1.32-1.162 1.546a.22.22 0 0 0-.151.207V9.5c0 .086-.07.156-.157.156h-.5a.157.157 0 0 1-.156-.156V9a.648.648 0 0 1 .542-.627c.443-.057.77-.4.77-.795 0-.439-.402-.805-.906-.805-.503 0-.906.366-.906.807a.15.15 0 0 1-.153.147H4.38a.15.15 0 0 1-.153-.149c0-.897.783-1.62 1.742-1.61.926.013 1.683.721 1.695 1.588Z"}),(0,y.jsx)("path",{fill:"#8C8C8C",d:"M11.298 3.51 7.935.148A.503.503 0 0 0 7.58 0H.944a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.5.5 0 0 0-.146-.353ZM7.35 1.154l2.94 2.94h-2.94v-2.94Zm2.968 11.722H1.57V1.125h4.72V4.5a.656.656 0 0 0 .655.656h3.375v7.719Z"}),(0,y.jsx)("path",{fill:"#8C8C8C",d:"M5.444 10.625a.5.5 0 1 0 1 0 .5.5 0 0 0-1 0ZM4.226 7.578a.15.15 0 0 0 .153.149h.506a.15.15 0 0 0 .153-.147c0-.44.403-.807.906-.807.504 0 .907.366.907.805 0 .395-.328.738-.77.795A.648.648 0 0 0 5.537 9v.5c0 .086.07.156.156.156h.5c.086 0 .157-.07.157-.156v-.19a.22.22 0 0 1 .151-.208c.697-.225 1.172-.844 1.161-1.546-.012-.867-.769-1.575-1.695-1.587-.96-.011-1.742.712-1.742 1.61Z"})]});let{useToken:tc}=tr.Z;function tu(e){let t=function(e){switch(U().extname(e).slice(1).toLowerCase()){case"js":case"jsx":case"ts":case"mjs":case"cjs":case"mts":case"cts":return(0,y.jsx)(to,{});case"tsx":default:return(0,y.jsx)(td,{});case"css":case"scss":case"sass":case"less":case"styl":case"stylus":return(0,y.jsx)(tn,{});case"html":return(0,y.jsx)(ti,{});case"png":case"jpg":case"jpeg":case"gif":case"svg":case"bmp":case"webp":case"ico":case"apng":case"avif":case"tif":case"tiff":case"jfif":case"pjpeg":case"pjp":return(0,y.jsx)(ta,{})}}(e);return(0,y.jsx)("div",{className:"file-icon",children:t})}let th=e=>{let{isDark:t}=t4(),{token:s}=tc(),r=t?s.colorWhite:s.colorText,l={fontSize:s.fontSize};return(0,y.jsx)(tl.default,{checkable:!1,selectable:!0,switcherIcon:e=>{let{data:t,expanded:s}=e;return(null==t?void 0:t.children)?(0,y.jsxs)(e9.Z,{style:{color:r},children:[(0,y.jsx)(e8.Z,{twoToneColor:r,className:`file-tree-switcher-arrow ${s?"file-tree-switcher-arrow-expand":""}`,style:l}),s?(0,y.jsx)(te.Z,{}):(0,y.jsx)(tt.Z,{})]}):(null==t?void 0:t.key)&&"string"==typeof t.key?tu(t.key):(0,y.jsx)(ts.Z,{})},expandAction:"click",...e})},tp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",s=null==e?void 0:e.indexOf(t);return -1===s?null:0===s?t+(tp(null==e?void 0:e.slice(1))||""):null==e?void 0:e.slice(0,s)};function tm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0,r=0,l=[],n=e;for(;r<t&&(n.filter(s).forEach(e=>{e.isLeaf||l.push(e.key)}),(n=n.reduce((e,t)=>e.concat(t.children||[]),[])).length);)r++;return l}let tx="__BASENAME__";function tf(e){let{files:t,sep:s="/",inlinedResourcePathKey:r="__RESOURCEPATH__",fileTitle:l=(e,t)=>t,dirTitle:n=(e,t)=>t,page:i="other"}=e,a=new RegExp(s),o=t.reduce((e,t)=>{let n=tp(t,s),o=n?null==t?void 0:t.slice(n.length+1):t,d=e;for(;n;){let e=d.children.find(e=>e.title===n);if(!e){let t=[d[r],n].filter(Boolean).join(s);e={title:n,icon:"bundle"===i?e=>ty(e,!1):null,key:t,children:[],[r]:t,[tx]:n},d.children.push(e)}d=e,o=(n=tp(o))?o.slice(n.length).replace(a,""):o}return d.children.some(e=>(0,ez.Z)(e,r)===t)||d.children.push({title:()=>l(t,o),icon:"bundle"===i?e=>ty(e):null,key:t,isLeaf:!0,[r]:t,[tx]:o}),e},{key:"0",children:[]}).children;return o.forEach(e=>{e.children&&e.children.forEach(t=>(function e(t,s){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",l=arguments.length>3?arguments[3]:void 0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:(e,t)=>t;if(!t.isLeaf)if(s.children&&1===s.children.length){let i=[s[tx],t[tx]].join(r);s[l]=t[l],s[tx]=i,s.key=[s.key,t.key].join("-"),s.children=t.children,s.title=n(s,i),t.children&&t.children.forEach(t=>{e(t,s,r,l,n)})}else t.title=n(t,t[tx]),t.children&&t.children.forEach(s=>{e(s,t,r,l,n)})})(t,e,s,r,n))}),o}function tg(e,t){return(0,e7.Z)(e,t)?e.replace(t,"."):e}function tj(e,t){let s=tg(e,t),r="/node_modules/",l=s.lastIndexOf(r);return l>-1?{alias:s.slice(l+r.length),inNodeModules:!0}:{alias:s,inNodeModules:!1}}function ty(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{data:s}=e,r=e.expanded;return(null==s?void 0:s.children)?(0,y.jsxs)(e9.Z,{children:[t?(0,y.jsx)(e8.Z,{className:`file-tree-switcher-arrow ${r?"file-tree-switcher-arrow-expand":""}`}):(0,y.jsx)(y.Fragment,{}),r?(0,y.jsx)(te.Z,{}):(0,y.jsx)(tt.Z,{})]}):e.eventKey&&"string"==typeof e.eventKey?tu(e.eventKey):(0,y.jsx)(ts.Z,{})}var tv=s(40521),tb=s(2321),tZ=s(78493),tS=s(52812),tC=s(91425);let tw=R.Client.RsdoctorClientRoutes.RuleIndex,tM=()=>{let{i18n:e,...t}=(0,tS.$)();return{...t,i18n:{...e,changeLanguage:(t,s)=>e.changeLanguage(t,(e,r)=>{e||A("LOCALE",t),s&&s(e,r)})}}};function tk(e,t){let s=(0,tC.s0)();return t?()=>window.open(t,"__blank"):()=>{s(`${tw}?${R.Rule.RsdoctorRuleClientConstant.UrlQueryForErrorCode}=${e}`)}}function tP(){let e=(0,tC.TH)().search||location.search,{query:t}=eU()(e,!0);return t}function tD(e){let t=e;"string"==typeof t&&(e=JSON.parse(H(t)));var s=e,r={dependencies:[],modules:[],moduleGraphModules:[],exports:[],sideEffects:[],variables:[]};return s&&"object"==typeof s?(0,tv.Z)(s)?r:(0,tb.Z)(s,r):r}function t_(e){return(0,tZ.Z)(e,e=>e.path)}function tI(e){return((0,tv.Z)(e)?e.filter(e=>e.category===R.Rule.RuleMessageCategory.Bundle&&e.code!==R.Rule.RuleMessageCodeEnumerated.Overlay):[]).filter(e=>e.code===R.Rule.RuleErrorMap.E1001.code)}var tA=s(457);let{findLoaderTotalTiming:tN,getLoaderCosts:tE}=g;function tT(e,t,s,r,l,n){return(!s||-1!==e.indexOf(s))&&(!l||!n||l===n)&&(null==r||!r.length||!!(0,tA.Z)(r,t))}var tR=s(35095),tz=s(55301);function tL(e){return"cn"===e||"zh-CN"===e?tR.Z:tz.Z}let tB=1;class tO{static init(){tB=1}get resolvedRequest(){return this.dependency.path}get dependency(){return this.originDependency.rootModule??this.originDependency}get originDependency(){return this._originDependency}get kindString(){return R.SDK.DependencyKind[this.kind]}get resolveConcatenationModule(){return this.dependency.kind===R.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,s,r,l){this.statements=[],this.meta={exportsType:"default-with-named"},this.id=tB++,this.request=e,this.module=t,this._originDependency=s,this.kind=r,this.statements=l??[]}}function tF(e,t){return e.line===t.line&&e.column===t.column}tO.kind=R.SDK.DependencyKind;let t$=/!/,tG=/\s\+\s\d*\smodules$/,tK=/^css\s.*node_modules(?!\/)/;class tW{static getDefaultStatement(e){let t={line:1,column:0},s={start:{...t},end:{...t}};return new tW(e,{source:{...s},transformed:{...s}})}isSame(e){var t,s;return this.module.id===e.module.id&&(t=this.position.transformed,s=e.position.transformed,!!tF(t.start,s.start)&&(null!=t.end&&null!=s.end?tF(t.end,s.end):void 0===t.end&&void 0===s.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(),s=e?t.source:t.transformed,r=e?this.position.source.start.line:this.position.transformed.start.line;if("number"==typeof r)return s.split("\n")[r-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 tH=1;class tV{static init(){tH=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,s,r){let l=new tO(e,this,t,s,r);if(this.dependencies.every(e=>!e.isSameWithoutStatements(l)))return this.dependencies.push(l),t.addImported(this),t.rootModule&&t.rootModule.addImported(this),l}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]:R.SDK.ToDataType.Normal;return e===R.SDK.ToDataType.NoCode?{source:"",transformed:"",parsedSource:""}:e===R.SDK.ToDataType.NoSourceAndAssets||e===R.SDK.ToDataType.NoSource?{source:"",transformed:"",parsedSource:this.isPreferSource?"":this.source.parsedSource}:e===R.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;t.sourceSize=e.sourceSize??t.sourceSize,t.transformedSize=e.transformedSize??t.transformedSize,t.parsedSize=e.parsedSize??t.parsedSize}getSize(){return{...this.size}}getStatement(e){return new tW(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 s={start:{}},r=t.originalPositionFor({line:e.start.line??0,column:e.start.column??0,bias:1});if(eR(r.line)&&(s.start={line:r.line,column:r.column??void 0}),e.end){let r=t.originalPositionFor({line:e.end.line??0,column:e.end.column??0});eR(r.line)&&(s.end={line:r.line,column:r.column??void 0})}return s}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){var t;let{isPreferSource:s}=this,r=function(e){if(!e)return"";if(t$.test(e)){var t;let s=(t=e.split(t$))[t.length-1];if(null==s?void 0:s.trim())return s}return tG.test(e)?e.replace(tG,""):tK.test(e)?e.replace(tK,""):e}(this.webpackId),l={id:this.id,renderId:this.renderId,webpackId:e&&r.indexOf(".")>0?U().relative(e,r):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:(null==(t=this.issuerPath)?void 0:t.filter(e=>e.moduleId).map(e=>e.moduleId))||[],bailoutReason:this.bailoutReason};return(this.meta.hasSetEsModuleStatement||this.meta.strictHarmonyModule)&&(l.meta={},this.meta.hasSetEsModuleStatement&&(l.meta.hasSetEsModuleStatement=!0),this.meta.strictHarmonyModule&&(l.meta.strictHarmonyModule=!0)),this.isEntry&&(l.isEntry=this.isEntry),this.modules.length>0&&(l.modules=this.modules.map(e=>e.id)),this.rootModule&&(l.rootModule=this.rootModule.id),this.concatenationModules.length>0&&(l.concatenationModules=this.concatenationModules.map(e=>e.id)),l}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,s=!1,r=R.SDK.ModuleKind.Normal,l,n=""){this.issuerPath=[],this.bailoutReason=[],this.source={source:"",transformed:"",parsedSource:""},this.size={sourceSize:0,transformedSize:0,parsedSize:0},this.chunks=[],this.dependencies=[],this.imported=[],this.modules=[],this.concatenationModules=[],this.meta={hasSetEsModuleStatement:!1,strictHarmonyModule:!1},this.id=tH++,this.webpackId=e,this.path=t,this.isEntry=s,this.kind=r,this.renderId=l,this.layer=n}}tV.kind=R.SDK.ModuleKind;let tU=1;class tq{static init(){tU=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,s=this;for(;s.from&&t<e;)t++,s=s.from;return s}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,s){this.id=tU++,this._sideEffects=[],this.name=e,this.identifier=t,this._variable=s}}let tY=1,tJ=class e{static init(){tY=1}get variable(){var e,t;if(void 0!==this._variable)return this._variable?this._variable:void 0;let s=null==(t=this.exports[0])||null==(e=t.getRecursiveExport())?void 0:e.variable;return this._variable=s??!1,s}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(t,s,r,l,n){this.id=tY++,this._exports=[],this.name=t,this.module=s,this.identifier=r,l&&(this.fromDependency=this.module.getDependencyByRequest(l)),n===e.NamespaceSymbol?this.isNameSpace=!0:(this.isNameSpace=!1,this.originName=n)}};tJ.NamespaceSymbol=Symbol("namespace");let tQ=1;class tX{static init(){tQ=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,s,r){this.id=tQ++,this.name=e,this.module=t,this.usedInfo=s,this.identifier=r}}class t0{static init(){tq.init(),tJ.init(),tX.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,s){this.exports=[],this.sideEffects=[],this.variables=[],this.module=e,this._graph=t,"boolean"==typeof this._dynamic&&(this._dynamic=s)}}class t1{static init(){tV.init(),tO.init(),t0.init()}static fromData(e){let t=new t1,s=e=>new tW(t.getModuleById(e.module),e.position);for(let s of e.modules??[]){var r,l;let e=new tV(String(s.id),s.path,s.isEntry,s.kind,s.renderId,s.layer);e.id=s.id,e.setSize(s.size),e.meta={strictHarmonyModule:(null==(r=s.meta)?void 0:r.strictHarmonyModule)??!1,hasSetEsModuleStatement:(null==(l=s.meta)?void 0:l.hasSetEsModuleStatement)??!1},e._isPreferSource=s.isPreferSource,e.chunks=s.chunks,t.addModule(e)}for(let r of e.modules??[]){let l=t.getModuleById(r.id);for(let n of r.dependencies){let r=(e.dependencies??[]).find(e=>e.id===n),i=r&&t.getModuleById(r.originDependency);if(!r||!i){console.warn(`The connection data ID is empty: ${n}`);continue}let a=l.addDependency(r.request,i,r.kind,r.statements.map(s));a&&(a.id=r.id,t.addDependency(a))}for(let e of r.modules??[]){let s=t.getModuleById(e);if(!s){console.warn(`Add the ordinary module ID as empty: ${e}`);continue}l.addNormalModule(s)}for(let e of r.concatenationModules??[]){let s=t.getModuleById(e);if(!s){console.warn(`The aggregation module ID is empty: ${s}`);continue}l.addConcatenationModule(s)}}for(let r of e.exports??[]){let e=new tq(r.name,r.identifier?s(r.identifier):void 0);e.id=r.id,t.addExportInfo(e)}for(let s of e.exports??[])if(s.from){let e=t._exportIdMap.get(s.id),r=t._exportIdMap.get(s.from);e&&r&&e.setFromExport(r)}for(let r of e.variables??[]){let e=t.getModuleById(r.module);if(!e){console.warn(`The module ID in the variable is empty\u{FF1A}${r.module}`);continue}let l=new tX(r.name,e,r.usedInfo,s(r.identifier)),n=t._exportIdMap.get(r.exported??-1);n&&l.setExportInfo(n),l.id=r.id,t.addVariable(l)}for(let r of e.sideEffects??[]){let e=t.getModuleById(r.module);if(!e){console.warn(`The module ID in the side effects is empty\u{FF1A}${r.module}`);continue}let l=new tJ(r.name,e,s(r.identifier),r.originName);for(let e of(l.isNameSpace=r.isNameSpace,l.id=r.id,r.exports??[])){let s=t._exportIdMap.get(e);s&&s.addSideEffect(l)}if(r.variable){let e=t._varIdMap.get(r.variable);e&&(l._variable=e)}t.addSideEffect(l)}for(let s of e.moduleGraphModules??[]){let e=t.getModuleById(s.module);if(!e){console.warn(`The module ID in ModuleGraphModule is empty: ${s.module}`);continue}let r=new t0(e,t,s.dynamic);t.addModuleGraphModule(r),s.exports.forEach(e=>{let s=t._exportIdMap.get(e);s&&r.addExportInfo(s)}),s.sideEffects.forEach(e=>{let s=t._sideEffectIdMap.get(e);s&&r.addSideEffect(s)}),s.variables.forEach(e=>{let s=t._varIdMap.get(e);s&&r.addVariable(s)})}return t1.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,s=[e];t.add(e);for(let e=0;e<s.length;e++)for(let{dependency:r}of s[e].getDependencies())t.has(r)||(t.add(r),s.push(r));return s}getModules(){return Array.from(this._moduleWebpackIdMap.values())}getDependencies(){return Array.from(this._dependenciesIdMap.values())}getEntryModules(){return this.getModules().filter(e=>e.isEntry&&e.kind!==R.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),s=0;s<e;s++)t[s]=arguments[s];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),s=0;s<e;s++)t[s]=arguments[s];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){return{dependencies:this.getDependencies().map(e=>e.toData()),modules:this.getModules().map(t=>t.toData(null==e?void 0:e.contextPath)),moduleGraphModules:Array.from(this._moduleGraphModules.values()).map(e=>e.toData()),exports:Array.from(this._exportIdMap.values()).map(e=>e.toData()),sideEffects:Array.from(this._sideEffectIdMap.values()).map(e=>e.toData()),variables: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]:R.SDK.ToDataType.Normal,t={};return this.getModules().forEach(s=>{t[s.id]=s.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}}s(76174);let t5={locale:N(),theme:I("THEME")||Z.Light,pageState:S.Pending,viewMode:function(){let e={bundleAlerts:w.List,compileAlerts:w.List};try{let t=I("VIEWMODE");if(t)return JSON.parse(t)||e;return e}catch(t){return e}}(),json:{},setTheme(){},setManifest(){},setPageState(e){},setViewMode(){}},t2=(0,T.createContext)({...t5});function t4(){let{theme:e,setTheme:t}=(0,T.useContext)(t2),s=e===Z.Dark;return{theme:e,setTheme:t,isDark:s,isLight:!s}}function t6(){let{viewMode:e,setViewMode:t}=(0,T.useContext)(t2),{bundleAlerts:s,compileAlerts:r}=e;return{viewMode:e,setViewMode:t,setCompileAlertsViewMode(e){t({compileAlerts:e})},setBundleAlertsViewMode(e){t({bundleAlerts:e})},isCompileList:r===w.List,isBundleList:s===w.List}}function t3(e){return e>=1e9?`${(e/1e9).toFixed(2)} GB`:e>=1e6?`${(e/1e6).toFixed(2)} MB`:e>=1e3?`${(e/1e3).toFixed(2)} KB`:e>1?`${e} bytes`:1===e?`${e} byte`:"0 bytes"}function t7(e){return`${+e.toFixed(2)}%`}let{CC:t9,Wy:t8,au:se}=j;class st{setup(){this.worker.onmessage=e=>{let{data:t}=e;if(this.callbacks.has(t.id)){let e=this.callbacks.get(t.id);this.callbacks.delete(t.id),e(t.data)}}}createEventId(){return`${Date.now()}_${++this.timer}`}emit(e,t){var s;let r=this.createEventId();return this.callbacks.set(r,t),s={id:r,data:e},this.worker.postMessage(s),{abort:()=>this.callbacks.delete(r)}}dispose(){this.worker.terminate()}constructor(e){this.worker=e,this.timer=0,this.callbacks=new Map,this.setup()}}new class{detectWorker(e){if(this._workerMap.has(e))return this._workerMap.get(e);let t=new st(e());return this._workerMap.set(e,t),t}constructor(){this._workerMap=new WeakMap}};var ss=s(34064),sr=s(40438),sl=s(67588),sn=s(45816),si=s(80666),sa=s(81733),so=s(32268),sd=s(49274),sc=s(74701),su=s(78434);let sh=e=>{let{title:t,value:s,statisticProps:r,boxProps:l}=e;return(0,y.jsx)("div",{className:"statistic-card",...l,children:(0,y.jsx)(su.Z,{title:(0,y.jsx)("div",{className:"statistic-card-title",children:t}),valueRender:()=>s,valueStyle:{fontSize:24},...r})})},sp=e=>{let{baseline:t,current:s,...r}=e,l=eD(t,s);return(0,y.jsx)(sm,{...r,...l})},sm=e=>{let{percent:t,state:s,fontSize:r=14}=e,l=+t.toFixed(2);if(l>0){let e=`${l}`;if(s===R.Client.RsdoctorClientDiffState.Up)return(0,y.jsxs)(so.Z.Text,{strong:!0,style:{fontSize:r,color:P.Red},children:["+",e,"%"]});if(s===R.Client.RsdoctorClientDiffState.Down)return(0,y.jsxs)(so.Z.Text,{strong:!0,style:{fontSize:r,color:P.Green},children:["-",e,"%"]})}return null},sx=e=>{let{data:t,formatter:s}=e,{percent:r,state:l,size:n}=t,{baseline:i,current:a}=n,o=s?s(i,"baseline"):t3(i),d=s?s(a,"current"):t3(a);return(0,y.jsx)(e9.Z,{align:"start",children:(0,y.jsxs)(e9.Z,{direction:"vertical",style:{textAlign:"left"},children:[(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{style:{fontSize:10,color:"inherit"},keyboard:!0,children:"Current"}),(0,y.jsx)(sd.Z,{title:"number"==typeof d||"string"==typeof d?`Value of Current is ${d}`:void 0,children:(0,y.jsx)(so.Z.Text,{style:{fontSize:16,color:"inherit"},strong:!0,children:d})}),(0,y.jsx)(sm,{percent:r,state:l})]}),(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{style:{fontSize:10,color:"inherit"},keyboard:!0,children:"Baseline"}),(0,y.jsx)(sd.Z,{title:"number"==typeof o||"string"==typeof o?`Value of Baseline is ${o}`:void 0,children:(0,y.jsx)(so.Z.Text,{style:{fontSize:14},type:"secondary",children:o})})]})]})})},sf=e=>{let{titles:t,datas:s,formatter:r,showPercentInTitle:l}=e,[n,i]=(0,T.useState)(0);return(0,y.jsx)(sh,{title:t.length>1?(0,y.jsx)(sc.Z,{defaultValue:t[n],options:l?t.map((e,t)=>{let r=s[t];return{label:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:e}),(0,y.jsx)(sm,{percent:r.percent,state:r.state})]}),value:e}}):t,onChange:e=>{i(t.indexOf(e))},size:"small",style:{transition:"transform 0.3s ease"},value:t[n]||t[0]}):t[n],value:(0,y.jsx)(sx,{data:s[n],formatter:r}),statisticProps:{style:{textAlign:"left"}}})},sg=e=>{let{collapsable:t=!1,children:s,title:r,dividerStyle:l,defaultCollapsed:n=!1,...i}=e,[a,o]=(0,T.useState)(n);return r&&t?(0,y.jsx)(sa.Z,{style:{borderRadius:"12px"},...i,title:(0,y.jsxs)(e9.Z,{style:{fontSize:"inherit"},children:[(0,y.jsx)("div",{style:{cursor:"pointer"},onClick:()=>o(!a),children:a?(0,y.jsx)(sn.Z,{}):(0,y.jsx)(si.Z,{})}),r]}),children:a?null:s}):(0,y.jsx)(sa.Z,{style:{borderRadius:"12px"},title:r,...i,children:s})};var sj=s(85794),sy=s(27821),sv=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,y.jsx)("rect",{width:16,height:16,fill:"#FFF2E8",rx:2}),(0,y.jsx)("path",{fill:"#FA541C",d:"M13.21 4.026a.5.5 0 0 0-.5-.5H3.29a.5.5 0 0 0-.5.5v1.316a.5.5 0 0 0 .5.5h9.42a.5.5 0 0 0 .5-.5V4.026ZM13.21 7.342a.5.5 0 0 0-.5-.5H3.29a.5.5 0 0 0-.5.5v1.316a.5.5 0 0 0 .5.5h9.42a.5.5 0 0 0 .5-.5V7.342ZM13.21 10.658a.5.5 0 0 0-.5-.5H3.29a.5.5 0 0 0-.5.5v1.316a.5.5 0 0 0 .5.5h9.42a.5.5 0 0 0 .5-.5v-1.316Z"})]}),sb=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,y.jsx)("rect",{width:16,height:16,fill:"#F6FFED",rx:2}),(0,y.jsx)("path",{fill:"#52C41A",fillRule:"evenodd",d:"M4.586 6.172a.853.853 0 0 0-.853.854v5.12c0 .472.382.854.853.854h6.828a.853.853 0 0 0 .853-.854v-5.12a.853.853 0 0 0-.853-.854H9.707V7.88a1.707 1.707 0 1 1-3.414 0V6.172H4.586Z",clipRule:"evenodd"}),(0,y.jsx)("path",{fill:"#52C41A",d:"M7.147 4.466a.853.853 0 1 1 1.707 0v3.413a.853.853 0 0 1-1.707 0V4.467Z"}),(0,y.jsx)("path",{fill:"#52C41A",d:"m8 3 2.217 2.304H5.783L8 3Z"})]}),sZ=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,y.jsx)("rect",{width:16,height:16,fill:"#FFF1F0",rx:2}),(0,y.jsx)("path",{fill:"#FF5658",fillRule:"evenodd",d:"M13 8A5 5 0 1 1 3 8a5 5 0 0 1 10 0ZM9.768 6.232a.5.5 0 0 1 0 .707L8.708 8l1.06 1.06a.5.5 0 0 1-.707.708L8 8.708l-1.062 1.06a.5.5 0 0 1-.707-.707L7.293 8l-1.06-1.062a.5.5 0 0 1 .706-.707L8 7.293l1.06-1.06a.5.5 0 0 1 .708 0Z",clipRule:"evenodd"})]}),sS="box_e4dfa",sC="title_e4dfa",sw="content_e4dfa";let{Text:sM}=so.Z,sk=e=>{let{data:t}=e;return t.map(e=>{let{code:t,link:s,error:r}=e,{source:l,output:n}=r||{},i=(null==l?void 0:l.path)?`${null==l?void 0:l.path}:${null==l?void 0:l.line}:${null==l?void 0:l.column}`:null,a=(null==n?void 0:n.path)?`${null==n?void 0:n.path}:${null==n?void 0:n.line}:${null==n?void 0:n.column}`:`There's no source map for this error. Possible reasons are as follows:
|
|
2
|
-
1. It might come from a third-party library without source map.
|
|
3
|
-
2. If this is your business source code, source map should be enabled in your build config.
|
|
4
|
-
`,o=tk(t,s);return(0,y.jsxs)("div",{className:"container_e4dfa",children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{className:sC,children:"Source"}),(0,y.jsxs)("div",{className:sS,children:[(0,y.jsx)(sy.Z,{component:sv}),(0,y.jsx)(sM,{ellipsis:{tooltip:i},className:`${sw} e2e-ecma-source`,children:i})]})]}),(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{className:sC,children:"Output"}),(0,y.jsxs)("div",{className:sS,children:[(0,y.jsx)(sy.Z,{component:sb}),(0,y.jsx)(sM,{ellipsis:{tooltip:a},className:`${sw} e2e-ecma-output`,children:a})]})]}),(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{className:sC,children:"Error"}),(0,y.jsxs)("div",{className:sS,children:[(0,y.jsx)(sy.Z,{component:sZ}),(0,y.jsx)(sM,{ellipsis:{tooltip:e.description},className:`${sw} e2e-ecma-error`,children:e.description})]})]}),(0,y.jsx)(sj.ZP,{onClick:o,type:"link",children:"more"})]})})},sP=e=>{let{title:t,description:s,icon:r,style:l}=e;return(0,y.jsxs)("div",{className:"container_ec279",style:l,children:[(0,y.jsxs)("div",{className:"content_ec279",children:[(0,y.jsx)("div",{className:"title_ec279",children:t}),(0,y.jsx)("div",{className:"description_ec279",children:s})]}),r]})};var sD=s(75648),s_=s(74816),sI=s(53395),sA=s(49168),sN=s(18737),sE=s(49407),sT=s(39505),sR=s(27464),sz=s(74327),sL=s(441),sB=s(53253),sO=s(16763),sF=s(63770),s$=s(28081),sG=s(30664);let sK=e=>{let{upperFirst:t=!0,fontSize:s=16,text:r,hash:l}=e,n="string"==typeof r&&t?(0,sG.Z)(r):r;return(0,y.jsx)(so.Z.Text,{style:{fontSize:s},strong:!0,children:l?(0,y.jsx)("a",{href:l,id:l.replace(/^#/,""),style:{color:"inherit"},children:n}):n})},sW={default:"linear-gradient(to bottom, #3ea2ff 0%, #0072db 100%)",success:"linear-gradient(to bottom, #6cf42a 0%, #52C41A 100%)",warn:"linear-gradient(to bottom, #ffc100 0%, #f59025 100%)",error:"linear-gradient(to bottom, rgb(250 127 22), #FF4D4F 100%)"},sH=e=>{let{label:t,value:s,type:r="default",tooltip:l}=e,n={height:"100%",lineHeight:"22px",width:"auto",display:"inline-block",boxSizing:"border-box",padding:"0 6px",color:"#fff",fontSize:12,textAlign:"center",verticalAlign:"middle"},i=(0,y.jsxs)("div",{style:{height:22,margin:0,padding:0,boxSizing:"border-box",borderRadius:4,fontSize:0,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",display:"flex",justifyContent:"flex-start",alignItems:"center"},children:[(0,y.jsx)("div",{style:{...n,borderTopLeftRadius:4,borderBottomLeftRadius:4,background:"linear-gradient(to bottom, #525252a3 0%, #1F1F1F 100%)"},children:t}),(0,y.jsx)("div",{style:{...n,borderTopRightRadius:4,borderBottomRightRadius:4,overflow:"hidden",textOverflow:"ellipsis",background:sW[r]||sW.default},children:s})]});return l?(0,y.jsx)(sd.Z,{title:!0===l?s:l,placement:"topLeft",children:i}):i};var sV=s(64617);let sU=T.memo(e=>{let{title:t="Load data failed, please try again",buttonText:s="retry",retry:r}=e;return(0,y.jsx)(sr.Z,{description:(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsx)(so.Z.Text,{children:t}),(0,y.jsx)(sj.ZP,{type:"primary",onClick:()=>{r()},children:s})]})})});var sq=s(36906),sY=s(83053),sJ=s(83911),sQ=s(12496);let sX=e=>{let{manifestLoader:t=e1,api:s,children:r,body:l=null,showSkeleton:n=!0,fallbackComponent:i}=e,[a,o]=(0,T.useState)(),[d,c]=(0,T.useState)(C.Pending),[u,h]=(0,T.useState)({}),{loader:p}=e3(a);function m(e){window[R.Constants.WINDOW_RSDOCTOR_TAG]?f(e):t().then(e=>{o(e)}).catch(e=>{throw c(C.Fail),e}).then(()=>{f(e)})}let x=(0,T.useCallback)(e=>{let{req:t,res:r}=e;t.api===s&&((0,sY.Z)(t.body,l)||(0,sJ.Z)(t.body)&&(0,sJ.Z)(l))&&!(0,sY.Z)(u,r)&&h(r),c(C.Success)},[u,s,l]);function f(e){if(!e)return;let t=(0,sQ.Z)(R.SDK.ServerAPI.APIExtends);if((0,tA.Z)(t,s))return void c(C.Success);e.loadAPI(s,l).then(e=>{(0,sJ.Z)(e)||(h(e),c(C.Success))}).catch(e=>{console.error(e),c(C.Fail)})}return((0,T.useEffect)(()=>{m(p)},[p,s,l]),(0,T.useEffect)(()=>{if(p)return p.onDataUpdate(s,x),()=>{p.removeOnDataUpdate(s,x)}},[p,s,l]),d===C.Pending)?n?(0,y.jsx)(sV.Z,{active:!0}):null:d===C.Fail?i||(0,y.jsx)(sU,{retry:()=>{c(C.Pending),t(),m()}}):d===C.Updating?(0,y.jsx)(sq.Z,{spinning:!0,children:r(u)}):r(u)};function s0(e){let{Component:t,api:s,responsePropName:r,body:l,fallbackComponent:n,showSkeleton:i}=e;return function(e){let{body:a=l,...o}=e;return(0,y.jsx)(sX,{api:s,body:a,showSkeleton:i,fallbackComponent:n,children:e=>{let s={...o,[r]:e};return(0,y.jsx)(t,{...s})}})}}var s1={filePath:"filePath_2bb66",arrow:"arrow_2bb66"};let s5=e=>{let{data:t}=e;return(0,y.jsx)(sE.Z,{gutter:k.BasePadding,wrap:!1,align:"top",children:(0,y.jsx)(sT.Z,{style:{height:"100%",width:"100%"},children:t.length?(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(sz.Z,{style:{marginTop:"20px"},children:t.map((e,s)=>{var r;let{dependency:l,module:n,relativePath:i}=e,{statements:a}=l,{start:o}=(null==a||null==(r=a[0])?void 0:r.position)?n.isPreferSource?a[0].position.source:a[0].position.transformed:{start:{line:0,column:0}},d=`${i}:${o.line}:${o.column||1}`;return(0,y.jsx)(sz.Z.Item,{style:{cursor:"default"},children:(0,y.jsxs)(so.Z.Text,{children:[(0,y.jsxs)("div",{className:s1.filePath,children:[d,(0,y.jsx)(so.Z.Paragraph,{copyable:{text:i},style:{position:"relative",top:"7px"}})]}),s!==t.length-1?(0,y.jsx)(sO.Z,{className:s1.arrow}):null]})},d)})})}):(0,y.jsx)(sr.Z,{description:"This package no dependencies"})})})},s2=s0({Component:s5,api:R.SDK.ServerAPI.API.GetPackageRelationAlertDetails,responsePropName:"data"}),s4=e=>{var t;let{data:s,getPackageRelationContentComponent:r}=e,{level:l,code:n,packages:i}=s,a=tk(n,s.link),o=t3((0,sI.Z)(i,e=>e.targetSize.sourceSize)),{xs:d,lg:c,xxl:u}=sL.ZP.useBreakpoint(),{name:h}=i.find(e=>!!e.target.name).target,p=i.map(e=>e.target.version);return(0,y.jsx)(sB.Z,{showIcon:!d,message:(0,y.jsxs)(e9.Z,{wrap:!0,split:d?null:(0,y.jsx)(sD.Z,{type:"vertical"}),align:"center",children:[(0,y.jsxs)(e9.Z,{wrap:!1,children:[(0,y.jsx)(so.Z.Text,{code:!0,strong:!0,onClick:a,style:{cursor:"pointer"},children:(0,y.jsx)("a",{children:n})}),(0,y.jsx)(so.Z.Text,{strong:!0,children:(null==(t=R.Rule.RuleErrorMap[n])?void 0:t.title)||s.title})]}),(0,y.jsxs)(so.Z.Paragraph,{ellipsis:{rows:1},style:{marginBottom:0},children:[(0,y.jsx)(so.Z.Text,{strong:!0,code:!0,children:h}),(0,y.jsxs)(so.Z.Text,{strong:!0,children:[" ",s.packages.length]}),(0,y.jsx)(so.Z.Text,{children:" versions was found"})]}),(0,y.jsx)(sH,{label:"total size",value:o,type:"error",tooltip:`total size of ${s.packages.length} versions is ${o}`})]}),description:(0,y.jsx)(e9.Z,{direction:"vertical",wrap:!1,children:s.packages.map(e=>{let{target:t,targetSize:s}=e,r=t3(s.sourceSize),l=s.parsedSize?t3(s.parsedSize):null,n=`${t.name}@${t.version}`;return(0,y.jsxs)(e9.Z,{style:{wordBreak:"break-all"},align:"center",split:d?null:(0,y.jsx)(sD.Z,{type:"vertical"}),wrap:!0,children:[(0,y.jsxs)(e9.Z,{wrap:!1,children:[(0,y.jsx)(so.Z.Text,{style:{marginLeft:4},children:"└"}),(0,y.jsx)(sH,{label:t.name,value:`v${t.version}`,tooltip:n})]}),(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(sH,{label:(0,y.jsxs)("div",{color:"rgb(255, 255, 255)",children:["Source Size ",(0,y.jsx)(sF.Z,{})]}),value:r,tooltip:`The bundle size of "${n}" is ${r}, this is source size.`,type:"error"}),(0,y.jsx)(sH,{label:"Bundled size",value:l||"CONCATENATED",tooltip:`The bundle size of "${n}" is ${r}, this is after bundled, concatenated module cannot get bundled size. `,type:"error"})]}),(0,y.jsx)(so.Z.Paragraph,{style:{marginBottom:0,width:u?"40rem":c?"30rem":"20rem"},copyable:{text:t.root},ellipsis:{rows:1,expandable:!0,symbol:(0,y.jsx)(s$.Z,{}),tooltip:t.root},code:!0,children:t.root})]},t.version)})}),type:"warn"===l?"info":l,action:(0,y.jsxs)(y.Fragment,{children:[i&&i.length>0?(0,y.jsx)(s7,{text:"Show Relations",buttonProps:{size:"small"},drawerProps:{title:s.title,width:"60%"},children:(0,y.jsxs)(e9.Z,{direction:"vertical",className:"alert-space",children:[(0,y.jsxs)(e9.Z,{style:{marginBottom:k.BasePadding/2},children:[(0,y.jsx)(sK,{text:h,upperFirst:!1}),(0,y.jsx)(so.Z.Text,{strong:!0,children:p.length}),(0,y.jsx)(so.Z.Text,{children:" versions was found: "}),p.map(e=>(0,y.jsx)(so.Z.Text,{strong:!0,code:!0,children:e},e))]}),(0,y.jsx)(sl.Z,{type:"card",size:"middle",className:"tabs-space",defaultActiveKey:p[0],items:i.map(e=>{let{target:t,targetSize:l}=e;return{label:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:`${h}@${t.version}`}),(0,y.jsx)(ss.Z,{color:P.Red,children:t3(l.sourceSize)})]}),key:`${t.root}${t.name}${t.version}`,children:r({data:s,package:e})}})})]})}):null,(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(sj.ZP,{type:"link",onClick:a,size:"small",icon:(0,y.jsx)(sF.Z,{})})]})})},s6=e=>{let{duplicatePackages:t=[],cwd:s,children:r,...l}=e;return(0,y.jsx)(s7,{...l,buttonStyle:{fontSize:"inherit",...l.buttonStyle},buttonProps:{type:"text",...l.buttonProps},text:(0,y.jsx)(sd.Z,{title:"Click to show the details of duplicate packages",children:(0,y.jsxs)(e9.Z,{style:{fontSize:"inherit"},children:[(0,y.jsx)(so.Z.Text,{strong:!0,style:{fontSize:"inherit",color:"inherit",...l.textStyle},children:t.length}),(0,y.jsx)(sR.Z,{})]})}),drawerProps:{title:"Duplicate Packages Viewer",...l.drawerProps},children:(0,y.jsx)(sE.Z,{gutter:[k.BasePadding,k.BasePadding],children:t.map((e,t)=>(0,y.jsx)(sT.Z,{span:24,children:(0,y.jsx)(s4,{data:e,cwd:s,getPackageRelationContentComponent:r})},t))})})},s3=e=>{let{moduleGraph:t,...s}=e;return(0,y.jsx)(s6,{...s,children:e=>(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetModuleCodeByModuleIds,body:{moduleIds:t.modules.map(e=>e.id)},children:r=>(0,y.jsx)(s5,{data:eN(t.modules,t.dependencies,s.cwd,e.package.dependencies,r),cwd:s.cwd})})})},s7=e=>{let[t,s]=(0,T.useState)(!1);return(0,y.jsxs)("div",{onClick:e=>e.stopPropagation(),...e.containerProps,children:[e.button?(0,y.jsx)("div",{onClick:()=>s(!t),children:e.button}):e.text?(0,y.jsx)(sj.ZP,{type:"link",...e.buttonProps,onClick:()=>s(!t),style:{padding:0,...e.buttonStyle},children:e.text}):(0,y.jsx)(sA.Z,{style:{fontSize:14,padding:0},onClick:()=>s(!t)}),(0,y.jsx)(sN.Z,{maskClosable:!0,zIndex:999,width:"60%",...e.drawerProps,open:t,onClose:()=>s(!1),destroyOnClose:!0,children:e.children})]})};var s9=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,y.jsx)("rect",{width:16,height:16,fill:"#FFF7E6",rx:2}),(0,y.jsx)("path",{fill:"#F2793D",fillRule:"evenodd",d:"M11.377 5.186h1.488L10.973 3H5.027L3.135 5.186h1.488l.87-1.005h5.015l.869 1.005Z",clipRule:"evenodd"}),(0,y.jsx)("path",{fill:"#F2793D",fillRule:"evenodd",d:"M3.676 4.82h8.648c.299 0 .54.243.54.545v7.09a.543.543 0 0 1-.54.545H3.676a.543.543 0 0 1-.54-.545v-7.09c0-.302.241-.546.54-.546Zm2.702 1.77a.54.54 0 0 0 0 1.082h3.244a.54.54 0 1 0 0-1.081H6.378Z",clipRule:"evenodd"})]}),s8=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,y.jsx)("rect",{width:16,height:16,fill:"#FFF7E6",rx:2}),(0,y.jsx)("path",{fill:"#F2793D",d:"M3 7V5c0-1.105 2.239-2 5-2s5 .895 5 2v2c0 1.105-2.239 2-5 2s-5-.895-5-2Z"}),(0,y.jsx)("path",{fill:"#F2793D",d:"M8 10c2.761 0 5-.895 5-2v1c0 1.105-2.239 2-5 2s-5-.895-5-2V8c0 1.105 2.239 2 5 2Z"}),(0,y.jsx)("path",{fill:"#F2793D",d:"M8 12c2.761 0 5-.895 5-2v1c0 1.105-2.239 2-5 2s-5-.895-5-2v-1c0 1.105 2.239 2 5 2Z"})]}),re=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,y.jsx)("rect",{width:16,height:16,fill:"#FFF7E6",rx:2}),(0,y.jsx)("g",{clipPath:"url(#total-size_svg__a)",children:(0,y.jsx)("path",{fill:"#F2793D",d:"m2.5 5.77 5.026 2.534V13.5L2.5 11.011v-5.24Zm11-.016v5.23l-1.775.881-1.508.747-1.685.854V8.254l4.968-2.5ZM8 2.5l4.902 2.472L7.999 7.45 3.04 4.961 7.998 2.5Z"})}),(0,y.jsx)("defs",{children:(0,y.jsx)("clipPath",{id:"total-size_svg__a",children:(0,y.jsx)("path",{fill:"#fff",d:"M2 2h12v12H2z"})})})]}),rt=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,y.jsx)("rect",{width:16,height:16,fill:"#E6F7FF",rx:2}),(0,y.jsx)("g",{clipPath:"url(#version_svg__a)",children:(0,y.jsx)("path",{fill:"#3874F6",d:"M13.438 9.875a.563.563 0 0 0-.216.043h-.002l-.002.002L8 12.079l-5.217-2.16H2.78l-.002-.001a.562.562 0 0 0-.43 1.039l5.432 2.248.002.001.003.001a.559.559 0 0 0 .43 0h.003l.002-.002 5.433-2.248a.563.563 0 0 0-.216-1.082ZM2.348 6.082 7.78 8.33l.003.001.002.001a.556.556 0 0 0 .43 0h.003l.002-.002 5.433-2.248a.563.563 0 0 0 0-1.04L8.22 2.796l-.002-.001-.003-.001a.56.56 0 0 0-.43 0h-.003l-.002.002-5.433 2.248a.563.563 0 0 0 0 1.039Zm11.09 1.355a.563.563 0 0 0-.216.043l-.002.001-.002.001L8 9.642l-5.217-2.16H2.78l-.002-.002a.563.563 0 0 0-.43 1.04l5.432 2.248h.002l.003.002a.559.559 0 0 0 .43 0l.003-.001.002-.001 5.433-2.248a.563.563 0 0 0-.216-1.083Z"})}),(0,y.jsx)("defs",{children:(0,y.jsx)("clipPath",{id:"version_svg__a",children:(0,y.jsx)("path",{fill:"#fff",d:"M2 2h12v12H2z"})})})]}),rs={label:"label_621e4",labelContent:"labelContent_621e4",collapseContainer:"collapseContainer_621e4",collapseChild:"collapseChild_621e4",attribute:"attribute_621e4",drawerLabelTitle:"drawerLabelTitle_621e4",drawerLabelSize:"drawerLabelSize_621e4",extraContainer:"extraContainer_621e4",iconContainer:"iconContainer_621e4",data:"data_621e4",pkgName:"pkgName_621e4"};let{Paragraph:rr,Text:rl}=so.Z,{innerWidth:rn}=window,ri=e=>{let{title:t,description:s,extra:r}=e;return(0,y.jsxs)("div",{className:rs.label,children:[(0,y.jsxs)("div",{className:rs.labelContent,children:[(0,y.jsx)("div",{children:t}),(0,y.jsx)("div",{children:s})]}),(0,y.jsx)("div",{children:r})]})},ra=e=>{let{data:t,extraData:s}=e,r=t.map(e=>{let{packages:t}=e,r=t3((0,sI.Z)(t,e=>e.targetSize.sourceSize)),{name:l}=t.find(e=>!!e.target.name).target,n=t.map(e=>e.target.version);return{key:e.code,label:(0,y.jsx)(ri,{title:(0,y.jsx)(ss.Z,{style:{backgroundColor:"#EAEDF1",borderRadius:"2px"},children:(0,y.jsx)("span",{className:rs.pkgName,children:l})}),description:`${t.length} versions was found`,extra:(0,y.jsxs)("div",{className:rs.extraContainer,children:[(0,y.jsxs)("div",{className:rs.iconContainer,children:[(0,y.jsx)(sy.Z,{style:{fontSize:"18px"},component:re}),(0,y.jsx)("span",{className:rs.data,children:r})]}),t&&t.length>0?(0,y.jsx)(s7,{text:"Show Relations",buttonProps:{size:"small"},drawerProps:{title:e.title,width:"60%"},children:(0,y.jsxs)(e9.Z,{direction:"vertical",className:"alert-space",style:{width:"100%"},children:[(0,y.jsxs)(e9.Z,{style:{marginBottom:k.BasePadding/2,width:"100%"},children:[(0,y.jsx)(sK,{text:(0,y.jsx)(ss.Z,{style:{backgroundColor:"#EAEDF1"},children:l}),upperFirst:!1}),(0,y.jsx)(so.Z.Text,{strong:!0,children:n.length}),(0,y.jsx)(so.Z.Text,{children:" versions found"})]}),(0,y.jsx)(sl.Z,{size:"middle",items:t.map(t=>{let{target:r,targetSize:l}=t;return{label:(0,y.jsxs)(e9.Z,{className:rs.drawerLabelTitle,children:[(0,y.jsxs)("div",{children:["v",r.version]}),(0,y.jsx)(ss.Z,{className:rs.drawerLabelSize,children:t3(l.sourceSize)})]}),key:`${r.root}${r.name}${r.version}`,children:s.getPackageRelationContentComponent({data:e,package:t})}})})]})}):null]})}),children:(0,y.jsx)(()=>t.map((e,s)=>{let r=e.target.version,n=e.target.root,i=t3(e.targetSize.sourceSize),a=e.targetSize.parsedSize?t3(e.targetSize.parsedSize):null;return(0,y.jsxs)("div",{className:rs.collapseContainer,children:[(0,y.jsx)(sP,{style:{backgroundColor:"#fff"},title:(0,y.jsx)(rl,{style:{width:rn>1500?900:700},ellipsis:{tooltip:n},children:n}),description:(0,y.jsxs)("div",{className:rs.collapseChild,children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{className:rs.attribute,children:"Version"}),(0,y.jsxs)("div",{className:rs.iconContainer,children:[(0,y.jsx)(sy.Z,{style:{fontSize:"18px"},component:rt}),(0,y.jsxs)("span",{className:rs.data,children:["v",r]})]})]}),(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{className:rs.attribute,children:"Source size"}),(0,y.jsxs)("div",{className:rs.iconContainer,children:[(0,y.jsx)(sy.Z,{style:{fontSize:"18px"},component:s8}),(0,y.jsx)("span",{className:rs.data,children:i})]})]}),(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{className:rs.attribute,children:"Bundle size"}),(0,y.jsxs)("div",{className:rs.iconContainer,children:[(0,y.jsx)(sy.Z,{style:{fontSize:"18px"},component:s9}),(0,y.jsx)(sd.Z,{title:`The bundle size of "${l}" is ${i}, this is after bundled, concatenated module cannot get bundled size. `,children:(0,y.jsx)("span",{className:rs.data,children:a||"CONCATENATED"})})]})]})]}),icon:(0,y.jsx)(rr,{style:{position:"relative",top:"-10px"},copyable:{text:n}})}),s!==t.length-1?(0,y.jsx)(sD.Z,{style:{margin:"10px 0"}}):null]})}),{})}});return(0,y.jsx)(s_.Z,{style:{width:"100%"},defaultActiveKey:["E1001"],items:r})},ro=e=>{let{data:t}=e;return t.map(e=>{let{code:t,link:s,description:r}=e,l=tk(t,s);return(0,y.jsx)(sP,{style:{background:"#fff"},description:(0,y.jsx)("div",{className:"description_6eb4f",dangerouslySetInnerHTML:{__html:r||""}}),icon:(0,y.jsx)(sj.ZP,{onClick:()=>l,type:"link",children:"more"})})})};var rd={card:"card_f9725",container:"container_f9725",title:"title_f9725",labelTitle:"labelTitle_f9725",labelDescription:"labelDescription_f9725"};let{Text:rc}=so.Z,{innerWidth:ru}=window,rh=e=>{let{title:t,description:s,extra:r}=e;return(0,y.jsxs)("div",{className:rs.label,children:[(0,y.jsxs)("div",{className:rs.labelContent,children:[(0,y.jsx)("div",{children:t}),(0,y.jsx)("div",{children:s})]}),(0,y.jsx)("div",{children:r})]})},rp=e=>{let{data:t}=e,s=t.map(e=>{let{package:t,chunks:s}=e;return{key:e.code,label:(0,y.jsx)(rh,{title:(0,y.jsx)(ss.Z,{style:{backgroundColor:"#EAEDF1",borderRadius:"2px"},children:(0,y.jsx)("span",{className:rs.pkgName,children:`${t.name}@${t.version}`})}),description:"has duplicates bundled into multiple chunks."}),children:(0,y.jsx)(()=>s.map(e=>{let{chunks:t,module:s}=e;return(0,y.jsx)("div",{className:rs.collapseContainer,children:(0,y.jsx)(sP,{style:{backgroundColor:"#fff"},title:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(sy.Z,{style:{fontSize:"18px"},component:re}),(0,y.jsxs)(rc,{style:{width:ru>1500?900:700},children:["Module:"," ",(0,y.jsx)(rc,{style:{fontSize:12,color:"rgba(28, 31, 35, 0.6)",fontWeight:300},children:s.path})]})]}),description:(0,y.jsx)("div",{className:rs.collapseChild,children:t.map(e=>(0,y.jsxs)("div",{style:{display:"flex"},children:[(0,y.jsx)("div",{className:rs.attribute,children:"Chunk"}),(0,y.jsx)("div",{className:rs.iconContainer,children:(0,y.jsx)("span",{className:rs.data,children:e.name})})]}))})})})}),{})}});return(0,y.jsx)(s_.Z,{style:{width:"100%"},defaultActiveKey:["E1005"],items:s})},rm=e=>{let{title:t,dataSource:s,extraData:r}=e,[l,n]=(0,T.useState)("E1001"),i=[{key:"E1001",label:"Duplicate Packages",data:[]},{key:"E1002",label:"Cross Chunks Package",data:[]},{key:"E1003",label:"Loader Performance Optimization",data:[]},{key:"E1004",label:"ECMA Version Check",data:[]},{key:"E1005",label:"Default Import Check",data:[]}];s.forEach(e=>{var t;let s=null==(t=i.find(t=>t.key===e.code))?void 0:t.data;null==s||s.push(e)});let a=i.map(e=>{let t,s,n=l===e.key?{border:"1px solid #91D5FF",backgroundColor:"#E6F7FF"}:{},i=l===e.key?{color:"#1890FF"}:{};switch(e.key){case"E1001":t=(0,y.jsx)(ra,{data:e.data,extraData:r});break;case"E1002":t=(0,y.jsx)(rp,{data:e.data,extraData:r});break;case"E1003":case"E1005":t=(0,y.jsx)(ro,{data:e.data});break;case"E1004":s=(0,y.jsx)("span",{children:"No ECMA Version Check Rules were found. Please refer to 「https://rsdoctor.rs/guide/usage/rule-config」."}),t=(0,y.jsx)(sk,{data:e.data});break;default:t=null}return e.data.length||(t=(0,y.jsx)(sr.Z,{description:s,image:sr.Z.PRESENTED_IMAGE_SIMPLE})),{key:e.key,label:(0,y.jsx)(()=>(0,y.jsx)(sP,{style:{backgroundColor:"transparent",paddingLeft:0,paddingRight:0,width:"100%"},title:(0,y.jsx)("span",{className:rd.labelTitle,children:e.label}),description:(0,y.jsxs)("div",{className:rd.labelDescription,children:[(0,y.jsx)("span",{children:e.data.length}),(0,y.jsx)(ss.Z,{style:{fontFamily:"Menlo",borderRadius:"2px",...n},children:(0,y.jsx)("span",{style:{...i},children:e.key})})]})}),{}),children:(0,y.jsx)(sg,{className:rd.card,type:"inner",title:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(ss.Z,{style:{fontFamily:"Menlo",fontWeight:"700",fontSize:"13px",backgroundColor:"#EAEDF1",borderRadius:"2px"},children:e.key}),(0,y.jsx)("span",{children:e.label})]}),children:t})}});return(0,y.jsx)(sg,{style:{width:"100%",borderRadius:"12px"},children:(0,y.jsxs)("div",{className:rd.container,children:[(0,y.jsx)("div",{className:rd.title,children:t}),s.length?(0,y.jsx)(sl.Z,{onChange:n,tabBarGutter:10,type:"card",defaultActiveKey:"E1001",items:a}):(0,y.jsx)("div",{style:{minHeight:"480px",display:"flex",justifyContent:"center",alignItems:"center"},children:(0,y.jsx)(sr.Z,{description:"No Bundle Alerts Data",image:sr.Z.PRESENTED_IMAGE_SIMPLE})})]})})};var rx=s(35102);let rf=s0({api:R.SDK.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{filter:t,project:s}=e,{errors:r,root:l}=s,{setBundleAlertsViewMode:n,viewMode:i,setViewMode:a}=t6(),{t:o}=tM(),d=t?r.filter(t):r;return(0,T.useEffect)(()=>{E()||a({bundleAlerts:r.length>=5?w.Group:w.List},!1)},[]),(0,y.jsx)(rx.ZP,{theme:{components:{Alert:{colorInfoBg:"#e6f4ff57",colorInfoBorder:"none"}},token:{padding:16,colorText:"rgba(0, 0, 0, 0.85)"}},children:(0,y.jsx)(rm,{title:o("Bundle Alerts"),dataSource:d,extraData:{cwd:l,getPackageRelationContentComponent:e=>(0,y.jsx)(s2,{body:{id:e.data.id,target:e.package.target},cwd:l})},viewMode:i.bundleAlerts,setViewMode:n,cwd:l})})}});s0({api:R.SDK.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{filter:t,project:s}=e,{root:r,errors:l}=s,n=(0,tv.Z)(l)?l.filter(e=>e.category===R.Rule.RuleMessageCategory.Compile&&e.code!==R.Rule.RuleMessageCodeEnumerated.Overlay):[],{setCompileAlertsViewMode:i,viewMode:a,setViewMode:o}=t6(),d=t?n.filter(t):n;return(0,T.useEffect)(()=>{E()||o({compileAlerts:n.length>=5?w.Group:w.List},!1)},[]),(0,y.jsx)(rm,{title:"Compile Alerts",dataSource:d,extraData:{cwd:r,getPackageRelationContentComponent:e=>(0,y.jsx)(s2,{body:{id:e.data.id,target:e.package.target},cwd:r})},viewMode:a.compileAlerts,setViewMode:i,cwd:r})}});var rg=s(63642),rj=s(92503),ry=s(3613),rv=s(72744),rb=s(39986),rZ=s(25578),rS=s.n(rZ),rC={container:"container_83cff",badgeContainer:"badgeContainer_83cff"};function rw(e){let t=0,s=0;e.forEach(e=>{"warn"===e.level?t++:s++});let r=0!==t&&0!==s?"problems":0===t?"errors":"warns";return{title:`${e.length} compiled ${r}`,detail:(0,y.jsxs)(so.Z.Text,{strong:!0,style:{color:"#fff",marginBottom:0},children:[(0,y.jsx)(so.Z.Text,{style:{color:"inherit",fontSize:16},children:"Compiled with"}),(0,y.jsxs)(so.Z.Text,{strong:!0,style:{color:P.Red,fontSize:16},children:[" ",s," ",1===s?"error":"errors"," "]}),(0,y.jsx)(so.Z.Text,{style:{color:"inherit",fontSize:16},children:"and"}),(0,y.jsxs)(so.Z.Text,{strong:!0,style:{color:P.Yellow,fontSize:16},children:[" ",t," ",1===t?"warning":"warnings"]})]}),warns:t,errors:s}}s(62294);let rM=e=>{let{alerts:t=[],open:s,onClose:r}=e;return t.length?(0,y.jsxs)(rb.default,{visible:s,onClose:()=>r(),style:{width:"100%",height:"100%",margin:0,zIndex:1e3},closable:!1,modalRender:e=>T.cloneElement(e,{style:{background:"rgba(0, 0, 0, 0.7)",color:"#fff",height:"100%",overflow:"scroll",borderRadius:0}}),children:[(0,y.jsxs)(sE.Z,{justify:"space-between",align:"middle",children:[rw(t).detail,(0,y.jsx)(sj.ZP,{onClick:()=>r(),type:"text",style:{color:"#fff"},size:"large",icon:(0,y.jsx)(rj.Z,{})})]}),(0,y.jsx)(sE.Z,{gutter:[0,k.BasePadding],children:t.map(e=>(0,y.jsx)(sT.Z,{span:24,style:{whiteSpace:"pre-wrap",lineHeight:"16px",fontSize:14},children:(0,y.jsx)(s_.Z,{ghost:!0,style:{background:"#000"},defaultActiveKey:[e.id],expandIcon:e=>e.isActive?(0,y.jsx)(ry.Z,{style:{color:"#fff"}}):(0,y.jsx)(e8.Z,{style:{color:"#fff"}}),children:(0,y.jsx)(s_.Z.Panel,{header:(0,y.jsxs)("div",{style:{color:"#fff"},children:["warn"===e.level?(0,y.jsx)(ss.Z,{color:P.Yellow,children:"WARNING"}):(0,y.jsx)(ss.Z,{color:P.Red,children:"ERROR"}),(0,y.jsx)(rS(),{children:e.description||e.title})]}),children:(0,y.jsx)("div",{style:{color:"#fff"},children:(0,y.jsx)(rS(),{children:e.stack})})},e.id)})},e.id))})]}):null},rk=s0({api:R.SDK.ServerAPI.API.GetOverlayAlerts,Component:e=>{let{alerts:t=[]}=e;if(!t.length)return null;let[s,r]=(0,T.useState)(!1);return(0,y.jsxs)("div",{className:rC.container,children:[(0,y.jsx)("div",{onClick:()=>r(!s),className:rC.badgeContainer,children:(0,y.jsx)(rg.Z,{count:t.length,size:"small",children:(0,y.jsx)(rv.Z,{style:{fontSize:15}})})}),(0,y.jsx)(rM,{alerts:t,open:s,onClose:()=>r(!1)})]})},responsePropName:"alerts",fallbackComponent:()=>null});s0({api:R.SDK.ServerAPI.API.GetOverlayAlerts,Component:e=>{let{alerts:t=[],defaultOpen:s=t.length>0}=e;if(!t.length)return null;let[r,l]=(0,T.useState)(s);return(0,y.jsxs)(T.Fragment,{children:[(0,y.jsx)(sB.Z,{banner:!0,message:T.cloneElement(rw(t).detail,{style:{color:"#000"}}),icon:(0,y.jsx)(rv.Z,{}),action:(0,y.jsx)(sj.ZP,{onClick:()=>l(!0),size:"small",children:"More"})}),(0,y.jsx)(rM,{alerts:t,open:r,onClose:()=>l(!1)})]})},responsePropName:"alerts",fallbackComponent:()=>null});var rP=s(35611),rD=s(10976),r_=s(77590);function rI(e){if(!e)return"";let t=function(e){if(!e)return"";try{if(!e.startsWith("data:"))return"";let{mimeType:t}=function(e){if(!e.startsWith("data:"))throw Error("输入不是有效的 Data URL");let t=e.substring(5),s=t.indexOf(",");if(-1===s)throw Error("无效的 Data URL 格式: 缺少数据分隔符");let r=t.substring(0,s),l=t.substring(s+1),n="",i="",a=!1,o=r.split(";");o.length>0&&(n=o[0]||"text/plain");for(let e=1;e<o.length;e++){let t=o[e];"base64"===t?a=!0:t.startsWith("charset=")&&(i=t.substring(8))}return{mimeType:n,charset:i,isBase64:a,data:l}}(e);switch(t){case"text/javascript":return"javascript";case"text/html":return"html";case"text/css":return"css";case"text/plain":return"text";case"application/json":return"json";default:return""}}catch(e){return console.error("解析 data 协议文件格式失败:",e),""}}(e);if(t)return t;try{let t=(0,V.extname)(e).slice(1);switch(t){case"js":case"cjs":case"mjs":case"jsx":return"javascript";case"ts":case"tsx":return"typescript";case"md":return"markdown";default:return t}}catch(e){return""}}let rA={readOnly:!0,domReadOnly:!0,fontSize:14,tabSize:2,lineHeight:24,renderValidationDecorations:"off",hideCursorInOverviewRuler:!0,smoothScrolling:!0,wordWrap:"on",colorDecorators:!0,codeLens:!1,cursorWidth:0,minimap:{enabled:!1},contextmenu:!1,gotoLocation:{multiple:"goto",multipleDefinitions:"goto",multipleTypeDefinitions:"goto",multipleDeclarations:"goto",multipleImplementations:"goto",multipleReferences:"goto"},hover:{enabled:!1},links:!1};function rN(e){return{...structuredClone(rA),...e}}function rE(e){return e?e.startsWith("data:")?"data":e.split("/").at(-1)||"":""}function rT(e,t){let{start:s,end:r}=e,{line:l=1,column:n=0}=s;return new t(l,n+1,(null==r?void 0:r.line)??l,((null==r?void 0:r.column)??9999)+1)}var rR=s(66926),rz={"code-viewer":"code-viewer_14282",embed:"embed_14282",header:"header_14282",text:"text_14282",content:"content_14282"};function rL(e){let{className:t,style:s,code:r="",lang:l,filePath:n="",defaultLine:i,ranges:a,isEmbed:o=!1,headerVisible:d=!0,isLightTheme:c=!0}=e,u=(0,T.useRef)(),h=(0,T.useRef)(),p=(0,T.useMemo)(()=>l||rI(n)||"plaintext",[l,n]),[m,x]=(0,T.useState)(!0),f=(0,T.useMemo)(()=>rN({wordWrap:m?"on":"off"}),[m]),g=(0,T.useCallback)((e,t)=>{u.current=e,h.current=t,function(e,t,s){if(!s||0===s.length)return;let r=s.map(e=>({range:rT(e,t.Range),options:{inlineClassName:"file-inline-decoration"}}));e.deltaDecorations([],r),setTimeout(()=>{e.revealLine(r[0].range.startLineNumber)})}(e,t,a),(0,r_.Z)(i)&&setTimeout(()=>{e.revealLine(i)})},[]);return(0,T.useEffect)(()=>()=>{var e;null==(e=u.current)||e.setModel(null)},[]),(0,y.jsxs)("div",{className:(0,rD.Z)("monaco-component","code-viewer",rz["code-viewer"],o&&rz.embed,t),style:s,children:[d&&!!n&&(0,y.jsxs)("div",{className:rz.header,children:[(0,y.jsx)("div",{children:rE(n)}),(0,y.jsx)("div",{style:{flex:1}}),(0,y.jsx)("div",{children:(0,y.jsx)(rR.Z,{className:rz.text,title:"side-by-side",checked:m,onChange:e=>{x(e.target.checked)},children:"word-wrap"})})]}),(0,y.jsx)("div",{className:(0,rD.Z)(rz.content,"editor-wrap"),children:(0,y.jsx)(rP.ML,{theme:c?"vs-light":"vs-dark",language:p,value:r,options:f,onMount:g})})]})}var rB={"diff-viewer":"diff-viewer_cb123",embed:"embed_cb123",header:"header_cb123",text:"text_cb123",content:"content_cb123"};let rO={...structuredClone(rA),readOnly:!0,originalEditable:!1,renderSideBySide:!0,renderSideBySideInlineBreakpoint:1,renderIndicators:!0,definitionLinkOpensInPeek:!1,domReadOnly:!0,minimap:{enabled:!1},diffWordWrap:"on",folding:!1,lineNumbersMinChars:3,renderLineHighlight:"none",matchBrackets:"never",diffAlgorithm:"advanced",ignoreTrimWhitespace:!0,renderOverviewRuler:!0,renderLineHighlightOnlyWhenFocus:!0,smoothScrolling:!0,letterSpacing:.5};function rF(e){let{className:t,style:s,original:r="",modified:l="",originalFilePath:n="",modifiedFilePath:i="",originalLang:a,modifiedLang:o,isEmbed:d=!1,isLightTheme:c=!0,headerVisible:u=!0}=e,[h,p]=(0,T.useState)(!0),m=(0,T.useRef)(),x=(0,T.useMemo)(()=>a||rI(n)||"plaintext",[a,n]),f=(0,T.useMemo)(()=>o||rI(i)||"plaintext",[o,i]),g=(0,T.useMemo)(()=>{var e;return e={renderSideBySide:h},{...structuredClone(rO),...e}},[h]),j=(0,T.useCallback)(e=>{m.current=e},[]);return(0,T.useEffect)(()=>()=>{var e;null==(e=m.current)||e.setModel(null)},[]),(0,y.jsxs)("div",{className:(0,rD.Z)("monaco-component","diff-viewer",rB["diff-viewer"],d&&rB.embed,t),style:s,children:[u&&(0,y.jsxs)("div",{className:rB.header,children:[(0,y.jsx)("div",{children:rE(n)}),(0,y.jsx)("div",{style:{flex:1}}),(0,y.jsx)("div",{children:(0,y.jsx)(rR.Z,{className:rB.text,title:"side-by-side",checked:h,onChange:e=>{p(e.target.checked)},children:"side-by-side"})})]}),(0,y.jsx)("div",{className:(0,rD.Z)(rB.content,"editor-wrap"),children:(0,y.jsx)(rP.SV,{theme:c?"vs-light":"vs-dark",originalLanguage:x,modifiedLanguage:f,original:r,modified:l,width:"100%",options:g,onMount:j})})]})}var r$=s(739),rG=s(65334),rK=s(79629),rW=s(75726),rH=s(47778),rV=s(97304),rU=s(16770),rq=s(53018),rY=s(13335),rJ=s(28977),rQ=s.n(rJ),rX=s(16633);let r0=["#F2793D","#F28B24","#F2A200","#F5CC00","#F5E000","#A3D900","#66CC00","#0AC419","#0AC496","#0AC7D1","#00A8E0","#1471F5","#4060FF","#7559FF","#884DFF","#A526FF","#BA39E5","#C700D9","#D900B5","#E50099","#E52E6B","#F24957","#30B2F2","#00BF70","#5959FF","#9F40FF","#528BFF"];var r1=((u=r1||{})[u.Bootstrap=0]="Bootstrap",u[u.Compile=1]="Compile",u[u.Done=2]="Done",u[u.Minify=3]="Minify",u[u.Loader=4]="Loader",u[u.Normal=5]="Normal",u);let r5={green:[r2("#32b26a",.6),r2("#5fcf92",.6),r2("#8ee2b6",.8),r2("#b7e1cd",1),r2("#cdeee0",1),r2("#e0f7ef",1),r2("#c8e6d6",1)],blue:[r2("#3498f7",.6),r2("#5eb3fa",.6),r2("#8ccafc",.8),r2("#b3d8f8",1),r2("#cde6fa",1),r2("#e0f2fd",1),r2("#c8e0ef",1)],purple:[r2("#a04ddb",.6),r2("#b26ef0",.6),r2("#c49ff5",.8),r2("#d1b3e6",1),r2("#e0c8f2",1),r2("#f0e6fa",1),r2("#d6c8e6",1)],yellow:[r2("#ffe066",.6),r2("#ffec80",.6),r2("#fff599",.8),r2("#fff9c4",1),r2("#fffbe0",1),r2("#fffde7",1),r2("#f5f2c8",1)],grey:[r2("#7a7a7a",.7),r2("#969696",.7),r2("#b0b0b0",.8),r2("#c8c8c8",1),r2("#dcdcdc",1),r2("#ededed",1),r2("#f7f7f7",1)]};function r2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,s=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),l=parseInt(e.slice(5,7),16);return`rgba(${s}, ${r}, ${l}, ${t})`}let r4=["blue","purple","yellow","grey","green"],r6=(0,T.memo)(e=>{let{loaderData:t,pluginsData:s,formatterFn:r,chartType:l=r1.Normal,exts:n=null}=e,i=[],a=[],[o,d]=(0,T.useState)({});return rG.D([rH.N,rV.N,rU.N,rq.N,rY.N]),(0,T.useEffect)(()=>{if(!t)return;let e=[];t.forEach(t=>{e.unshift(t.n+" total"),e.unshift(t.n)}),t.forEach(function(t,s){var r;if(i.push({name:t.n+" total",value:[e.indexOf(t.n+" total"),t.s,t.e,t.e-t.s],itemStyle:{normal:{color:r0[Math.floor(27*Math.random())],opacity:.25}}}),null==t?void 0:t.c)for(let s=0;s<(null==t||null==(r=t.c)?void 0:r.length);s++)i.push({name:t.n,value:[e.indexOf(t.n),t.c[s].s,t.c[s].e,t.c[s].e-t.c[s].s],itemStyle:{normal:{color:r0[Math.floor(27*Math.random())],opacity:.25}},ext:t.c[s].ext})}),a=e.map((e,t)=>t%2!=0?e.replace(" total",""):"")},[t]),(0,T.useEffect)(()=>{if(!s)return;let e=(0,rX.Z)(s,e=>e.pid);Object.keys(e).reverse().forEach(function(t,s){e[t].forEach((e,t)=>{i.push({name:String(e.pid),value:[s,e.args.s,e.args.e,e.args.e-e.args.s],itemStyle:{normal:{color:r0[Math.floor(27*Math.random())],opacity:.25}},ext:e})}),a.push(String(t.charAt(0).toUpperCase()+t.slice(1)))})},[s]),(0,T.useEffect)(()=>{d({tooltip:{formatter:e=>r(e)},dataZoom:[{type:"slider",filterMode:"weakFilter",showDataShadow:!1,top:-10},{type:"inside",filterMode:"weakFilter"}],grid:{top:10,left:0,bottom:10,right:0,height:a.length>(l===r1.Loader?6:3)?"auto":60*a.length,containLabel:!0},xAxis:{interval:(null==n?void 0:n.endTimestamp)&&(null==n?void 0:n.startTimestamp)?Math.floor((n.endTimestamp-n.startTimestamp)/8):null,position:"top",splitLine:{show:!0},scale:!0,axisLine:{show:!1},axisLabel:{formatter:e=>rQ()(e).format("HH:mm:ss:SSS")}},yAxis:{type:"category",splitLine:{show:!1},axisLabel:{inside:!0,lineHeight:20,width:100,fontSize:12,color:"#000",verticalAlign:"bottom"},axisLine:{show:!1},axisTick:{show:!1},data:a},series:[{type:"custom",renderItem:function(e,t){let s=t.value(0),r=t.coord([t.value(1),s]),n=t.coord([t.value(2),s]),i=.3*t.size([0,1])[1],a=rK.clipRectByRect({x:r[0],y:l===r1.Loader?r[1]-(s%2!=0?0:2*i):r[1],width:n[0]-r[0]||5,height:i},{x:e.coordSys.x,y:e.coordSys.y,width:e.coordSys.width,height:e.coordSys.height});return a&&{type:"rect",transition:["shape"],shape:a,style:t.style(),enterFrom:{style:{opacity:0},x:0}}},itemStyle:{opacity:.8},encode:{x:[1,2],y:0},data:i}]})},[t,s,n]),(0,y.jsx)(r$.default,{option:o,echarts:rW,style:{width:"100%",minHeight:l===r1.Loader?"500px":l===r1.Minify?"100px":"200px",maxHeight:l===r1.Minify?"100px":"1000px",border:"1px solid #eee",borderRadius:"10px"}})});var r3=s(32620);let r7=e=>{let t,{icon:s,label:r,labelStyle:l={},placeholder:n,onChange:i,style:a,className:o,width:d,delay:c=300}=e,[u,h]=(0,T.useState)(""),p={width:120,...l},m=(0,T.useRef)(null);return(0,T.useEffect)(()=>{i(u)},[u]),(0,y.jsxs)(r3.Z.Group,{compact:!0,style:a,className:o,children:[r||s?(0,y.jsxs)(sj.ZP,{style:p,onClick:()=>{m&&m.current&&m.current.focus()},children:[s||null,(0,y.jsx)(so.Z.Text,{children:r})]}):null,(0,y.jsx)(r3.Z,{ref:m,allowClear:!0,defaultValue:u,style:{width:d?d-120:250},placeholder:n,onChange:e=>{t&&clearTimeout(t);let s=e.target.value.trim();t=setTimeout(()=>{h(s)},c)}})]})};var r9=s(75420),r8=s(73609),le=s(71818),lt=s(71204),ls=s(29667);let lr=()=>{let[e,t]=(0,T.useState)(""),[s,r]=(0,T.useState)([]);return((0,T.useEffect)(()=>{e1().then(e=>{let{name:s,series:l}=e;s&&t(s),l&&l.length>0&&r(l)})},[]),e.length<=0||s.length<=0)?(0,y.jsx)(y.Fragment,{}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(sD.Z,{type:"vertical",style:{margin:"0 24px"}}),(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(sy.Z,{style:{fontSize:"18px"},component:re}),(0,y.jsx)(so.Z,{children:"Compiler"}),(0,y.jsx)(ls.Z,{className:"builder-selector",defaultValue:e,bordered:!1,style:{minWidth:100},onChange:e=>{let t=s.find(t=>t.name===e);t&&(t.origin?location.href=function(e){let t=eU()(location.href,!0),s=eU()(e,!0);return(0,eq.Z)(t.hash,R.Client.RsdoctorClientRoutes.Uploader)&&t.set("hash",R.Client.RsdoctorClientRoutes.Overall),t.set("origin",e),t.set("protocol",s.protocol),t.set("host",s.host),t.set("port",s.port),t.toString()}(t.origin):console.error("No RsdoctorManifestSeriesData.origin"))},children:s.map((e,t)=>(0,y.jsx)(ls.Z.Option,{value:e.name,className:"builder-selector-option-item",children:e.name},t))})]})]})};var ll=s(67969),ln=s(66862),li=s(42444),la=s(62814),lo=s(45447),ld=s(88012);let lc=R.Client.RsdoctorClientRoutes.Overall;var lu=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,y.jsx)("rect",{width:12,height:9.333,x:.396,y:.167,fill:"#0079FF",rx:1}),(0,y.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M3.563 3.5c.276 0 .5.214.5.478v3.044a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478V3.978a.49.49 0 0 1 .5-.478ZM6.396 1.833c.276 0 .5.214.5.479v4.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-4.71a.49.49 0 0 1 .5-.479ZM9.23 4.833c.275 0 .5.214.5.479v1.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-1.71a.49.49 0 0 1 .5-.479Z",clipRule:"evenodd"}),(0,y.jsx)("rect",{width:6,height:1.333,x:3.396,y:10.5,fill:"#0079FF",fillOpacity:.5,rx:.667})]}),lh=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,y.jsx)("rect",{width:12,height:9.333,x:.396,y:.167,fill:"#0079FF",rx:1}),(0,y.jsx)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M4.023 6.212 2.676 5.014l1.347-1.199M8.752 6.212l1.347-1.198-1.347-1.199M5.742 7.014l1.362-4"}),(0,y.jsx)("rect",{width:6,height:1.333,x:3.396,y:10.5,fill:"#0079FF",fillOpacity:.5,rx:.667})]}),lp=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,y.jsx)("path",{fill:"#0079FF",fillRule:"evenodd",d:"M6.329.788A1 1 0 0 0 5.35.8L.466 3.62l5.36 2.83 5.327-3.044L6.329.787Zm-.993 12.777V7.322L.063 4.54v5.404a1 1 0 0 0 .5.866l4.773 2.756Z",clipRule:"evenodd"}),(0,y.jsx)("path",{fill:"#0079FF",fillOpacity:.5,fillRule:"evenodd",d:"M5.354.8H5.35L.546 3.576a1.01 1.01 0 0 1 .017-.01L5.336.81 5.354.8Zm-.018 12.765V7.322L.063 4.54l5.273 2.783v6.243Zm1-6.254 5.265-3.009c.006.043.009.086.009.13v5.511a1 1 0 0 1-.5.866l-4.774 2.756V7.311Z",clipRule:"evenodd"})]}),lm=s(8804);let lx=[{title:"FAQ",link:"https://rsdoctor.rs/guide/more/faq"},{title:"Introduction",link:"https://rsdoctor.rs/guide/start/intro"},{title:"Bundle Alerts",link:"https://rsdoctor.rs/guide/usage/bundle-alerts"},{title:"Bundle Overall",link:"https://rsdoctor.rs/guide/usage/bundle-overall"},{title:"Bundle Analysis",link:"https://rsdoctor.rs/guide/usage/bundle-size"},{title:"Compilation Alerts",link:"https://rsdoctor.rs/guide/usage/compile-alerts"},{title:"Compile Overall",link:"https://rsdoctor.rs/guide/usage/compile-overall"},{title:"Loaders Analysis",link:"https://rsdoctor.rs/guide/usage/loaders-analysis"},{title:"Loaders Timeline",link:"https://rsdoctor.rs/guide/usage/loaders-timeline"},{title:"Plugin Analysis",link:"https://rsdoctor.rs/guide/usage/plugins-analysis"}],lf=()=>{let{t:e}=tM();return(0,y.jsx)(sg,{style:{width:"100%",borderRadius:"12px"},children:(0,y.jsxs)("div",{children:[(0,y.jsxs)("div",{className:"title_a3408",children:[(0,y.jsx)("span",{children:e("Help Center")}),(0,y.jsxs)(sj.ZP,{style:{display:"flex",alignItems:"center",padding:0},type:"link",onClick:()=>{window.open("https://rsdoctor.rs/index","_blank")},children:[(0,y.jsx)("span",{style:{marginRight:"3px"},children:"More"}),(0,y.jsx)(e8.Z,{style:{fontSize:"10px"}})]})]}),(0,y.jsx)("div",{className:"container_a3408",children:lx.map((t,s)=>{let{title:r,link:l}=t;return(0,y.jsx)("div",{className:"content_a3408",style:{marginBottom:s<lx.length-2?"16px":0},onClick:()=>window.open(l,"_blank"),children:e(r)},s)})})]})})};var lg=s(47467),lj=s(61710),ly={card:"card_3bba1"},lv=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,y.jsx)("rect",{width:16,height:16,fill:"#E6F7FF",rx:2}),(0,y.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.147l3.362 3.364Zm-1.006.584-2.94-2.94v2.94h2.94Z"})]}),lb={errorNumber:"errorNumber_14ee6",warningNumber:"warningNumber_14ee6",successNumber:"successNumber_14ee6",errorText:"errorText_14ee6",warningText:"warningText_14ee6",successText:"successText_14ee6",errorButton:"errorButton_14ee6",warningButton:"warningButton_14ee6",successButton:"successButton_14ee6",container:"container_14ee6",icon:"icon_14ee6",description:"description_14ee6",data:"data_14ee6",common:"common_14ee6",warning:"warning_14ee6"};let lZ=e=>{let{theme:t,number:s,description:r}=e;return(0,y.jsxs)("div",{className:`${lb.container} ${lb[t]}`,children:[(0,y.jsx)(sy.Z,{style:{fontSize:"18px",margin:"0 5px"},component:"common"===t?lv:re}),(0,y.jsx)("span",{className:lb.description,children:r}),(0,y.jsx)("span",{className:lb.data,children:s})]})};var lS={title:"title_74282",column:"column_74282",description:"description_74282",unit:"unit_74282",treeContainer:"treeContainer_74282",line:"line_74282",treeTitle:"treeTitle_74282",tag:"tag_74282",label:"label_74282"};let{DirectoryTree:lC}=lg.Z,lw=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 s=[];return t.forEach(e=>{let t=s.find(t=>t.title===e.defaultDir),r=t||{title:e.defaultDir,key:e.defaultDir,icon:(0,y.jsx)(te.Z,{}),children:[]},l=tu(e.fileName);t||s.push(r),r.children.push({title:(0,y.jsxs)("div",{className:lS.treeContainer,children:[(0,y.jsx)("div",{className:lS.treeTitle,children:e.fileName}),(0,y.jsx)("div",{className:lS.line}),(0,y.jsx)(ss.Z,{className:lS.tag,color:"green",children:t3(e.size)}),e.initial?(0,y.jsx)(ss.Z,{className:lS.tag,color:"cyan",children:"initial"}):null]}),key:e.fileName,isLeaf:!0,icon:l})}),{treeData:s}},lM=e=>{let{treeData:t}=lw(e);return(0,y.jsx)(y.Fragment,{children:e.files.length?(0,y.jsx)(s7,{buttonProps:{size:"small"},buttonStyle:{fontSize:"inherit"},drawerProps:{title:"Files"},text:(0,y.jsx)("span",{children:e.count}),children:(0,y.jsx)(lC,{defaultExpandAll:!0,selectable:!1,treeData:t,rootStyle:{minHeight:"800px",border:"1px solid rgba(235, 237, 241)"}})}):e.count})},lk=e=>{let{res:t,view:s}=e,r=[{key:"js-files-count",label:"JS files",children:(0,y.jsx)("span",{className:`${lS.description} ${lS.column}`,children:lM(t.js.total)})},{key:"css-files-count",label:"CSS files",children:(0,y.jsx)("span",{className:`${lS.description} ${lS.column}`,children:lM(t.css.total)})},{key:"font-files-count",label:"Font files",children:(0,y.jsx)("span",{className:`${lS.description} ${lS.column}`,children:lM(t.fonts.total)})},{key:"html-files-count",label:"HTML files",children:(0,y.jsx)("span",{className:lS.description,children:lM(t.html.total)})},{key:"image-files-count",label:"Image files",children:(0,y.jsx)("span",{className:lS.description,children:lM(t.imgs.total)})},{key:"media-files-count",label:"Media files",children:(0,y.jsx)("span",{className:lS.description,children:lM(t.media.total)})}],[l,n]=t3(t.js.total.size).split(" "),[i,a]=t3(t.css.total.size).split(" "),[o,d]=t3(t.fonts.total.size).split(" "),[c,u]=t3(t.html.total.size).split(" "),[h,p]=t3(t.imgs.total.size).split(" "),[m,x]=t3(t.media.total.size).split(" "),f=[{key:"js-files-size",label:(0,y.jsx)("span",{className:lS.label,children:"JS size"}),children:(0,y.jsxs)("div",{className:lS.column,children:[(0,y.jsx)("span",{className:lS.description,children:l}),(0,y.jsx)("span",{className:lS.unit,children:n})]})},{key:"css-files-size",label:(0,y.jsx)("span",{className:lS.label,children:"CSS size"}),children:(0,y.jsxs)("div",{className:lS.column,children:[(0,y.jsx)("span",{className:lS.description,children:i}),(0,y.jsx)("span",{className:lS.unit,children:a})]})},{key:"font-files-size",label:(0,y.jsx)("span",{className:lS.label,children:"Font size"}),children:(0,y.jsxs)("div",{className:lS.column,children:[(0,y.jsx)("span",{className:lS.description,children:o}),(0,y.jsx)("span",{className:lS.unit,children:d})]})},{key:"html-files-size",label:(0,y.jsx)("span",{className:lS.label,children:"HTML size"}),children:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("span",{className:lS.description,children:c}),(0,y.jsx)("span",{className:lS.unit,children:u})]})},{key:"image-files-size",label:(0,y.jsx)("span",{className:lS.label,children:"Image size"}),children:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("span",{className:lS.description,children:h}),(0,y.jsx)("span",{className:lS.unit,children:p})]})},{key:"media-files-size",label:(0,y.jsx)("span",{className:lS.label,children:"Media size"}),children:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("span",{className:lS.description,children:m}),(0,y.jsx)("span",{className:lS.unit,children:x})]})}];return(0,y.jsx)(lj.Z,{layout:"vertical",className:"bundleOverall_17e15",size:"small",column:3,colon:!1,items:"files"===s?r:f})},lP=()=>{let[e,t]=(0,T.useState)("size"),s=(0,tC.s0)(),{t:r}=tM();return(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:l=>{let n=t3(l.all.total.size);return(0,y.jsx)(sg,{className:ly.card,style:{height:"316px"},children:(0,y.jsxs)("div",{children:[(0,y.jsxs)("div",{className:lS.title,children:[(0,y.jsx)("span",{children:r("Bundle Overall")}),(0,y.jsx)(sj.ZP,{type:"link",style:{padding:"0px"},onClick:()=>{s(R.Client.RsdoctorClientRoutes.BundleSize)},children:(0,y.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,y.jsx)("span",{style:{marginRight:"8px",fontSize:"13px"},children:"View Bundler Size"}),(0,y.jsx)(e8.Z,{style:{fontSize:"10px"}})]})})]}),(0,y.jsx)(sc.Z,{options:["Size","Files"],onChange:e=>{t(e.toLocaleLowerCase())},size:"small",style:{marginBottom:8,fontSize:"14px"}}),(0,y.jsx)(lZ,{theme:"files"===e?"common":"warning",number:"files"===e?l.all.total.count:n,description:`Total ${e}`}),(0,y.jsx)(lk,{view:e,res:l})]})})}})};var lD=s(43483),l_=s(39481),lI=s(12533),lA=((h=lA||{}).BEGIN="B",h.END="E",h.COMPLETE="X",h.INSTANT="I",h.MARK="R",h);function lN(e){return function e(t){return t.reduce((t,s)=>{if(s.c){let r=e(s.c);t.push({name:s.n,ph:lA.BEGIN,pid:s.p,ts:s.s,args:s},...r,{name:s.n,ph:lA.END,pid:s.p,ts:s.e,args:s})}else t.push({name:s.n,ph:lA.BEGIN,pid:s.p,ts:s.s,args:s}),t.push({name:s.n,ph:lA.END,pid:s.p,ts:s.e,args:s});return t},[])}(Object.entries(e.sort((e,t)=>e.s-t.s).reduce((e,t)=>{let s=e[t.p];return s?function(e,t){let s=[e];for(;s.length>0;){let e,r=s.shift()||[];if(0===r.length)return;let l=r[r.length-1];if(l.e<=t.s)return r.push(t);for(let t=r.length-1;t>=0;t--){let{c:s}=r[t];s&&(e=s)}e?s.push(e):l.c=[t]}}(s,t):e[t.p]=[t],e},{})).reduce((e,t)=>{let[s,r]=t;return e.push(...r),e},[]))}function lE(e){let{ext:t}=e.data;return`
|
|
5
|
-
<div class="loader-tooltip-container">
|
|
6
|
-
<div class="loader-tooltip-title">[${t.args.p}] ${t.args.n}</div>
|
|
7
|
-
<li class="loader-tooltip-item">
|
|
8
|
-
<span>hook</span>
|
|
9
|
-
<span>${t.args.p}</span>
|
|
10
|
-
</li>
|
|
11
|
-
<li class="loader-tooltip-item">
|
|
12
|
-
<span>tap name</span>
|
|
13
|
-
<span>${t.args.n}</span>
|
|
14
|
-
</li>
|
|
15
|
-
<li class="loader-tooltip-item">
|
|
16
|
-
<span>start</span>
|
|
17
|
-
<span>${rQ()(t.args.s).format("YYYY/MM/DD HH:mm:ss")}</span>
|
|
18
|
-
</li>
|
|
19
|
-
<li class="loader-tooltip-item">
|
|
20
|
-
<span>end</span>
|
|
21
|
-
<span>${rQ()(t.args.e).format("YYYY/MM/DD HH:mm:ss")}</span>
|
|
22
|
-
</li>
|
|
23
|
-
<li class="loader-tooltip-item">
|
|
24
|
-
<span>duration</span>
|
|
25
|
-
<span>${se(t.args.e-t.args.s)}</span>
|
|
26
|
-
</li>
|
|
27
|
-
</div>
|
|
28
|
-
`.trim()}let lT=e=>{let{plugins:t,defaultDatas:s=[],type:r}=e,{isDark:l}=t4(),n=(0,T.useRef)(null),[i,a]=(0,T.useState)([]);return(0,T.useEffect)(()=>{let e=[];t.forEach(t=>{t.data.forEach(s=>{e.push({p:t.hook,n:`${t.tapName}`,s:s.startAt,e:s.endAt})})}),a([...lN(s),...lN(e)])},[]),(0,y.jsx)("div",{className:["loader-chart-container",l?"loader-chart-container_dark":""].join(" ").trim(),ref:n,style:{width:"100%"},children:(0,y.jsx)(r6,{pluginsData:i,formatterFn:lE,chartType:r})})},lR=()=>(0,y.jsx)(sB.Z,{message:(0,y.jsxs)(so.Z.Text,{children:[(0,y.jsx)(so.Z.Text,{children:"make sure that you have turn on "}),(0,y.jsxs)(so.Z.Text,{children:[" ","in configuration for the Rsdoctor plugin."]})]}),type:"info",showIcon:!0}),lz=e=>{let{summary:t}=e,{costs:s=[]}=t||{};return s.find(e=>e.name===z.Bootstrap)?(0,y.jsx)(s7,{containerProps:{style:{display:"inline"}},drawerProps:{title:'Chart of the "Bootstrap -> BeforeCompile" stage'},text:(0,y.jsx)(e9.Z,{children:"detail"}),children:(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetPluginData,body:{hooks:["environment","afterEnvironment","entryOption","afterPlugins","afterResolvers","initialize","beforeRun","run","watchRun","normalModuleFactory","contextModuleFactory","beforeCompile"]},children:e=>e&&e.length?(0,y.jsx)(lT,{plugins:e,type:r1.Bootstrap}):(0,y.jsx)(lR,{})})}):null};var lL=s(87143);let lB=e=>{let{dataSource:t}=e;return(0,y.jsx)(lL.Z,{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,y.jsx)(sd.Z,{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)=>se((0,sI.Z)(t.data,e=>e.costs)),sorter:(e,t)=>(0,sI.Z)(e.data,e=>e.costs)-(0,sI.Z)(t.data,e=>e.costs),defaultSortOrder:"descend"}]})},lO=e=>{let{summary:t}=e,{costs:s=[]}=t||{},r=s.find(e=>e.name===z.Done),l='of the "AfterCompile -> Done" stage';return r?(0,y.jsx)(s7,{containerProps:{style:{display:"inline"}},drawerProps:{title:`Details ${l}`},text:(0,y.jsx)(e9.Z,{children:"detail"}),children:(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetPluginData,body:{hooks:["afterCompile","shouldEmit","emit","afterEmit","assetEmitted","done"]},children:e=>e&&e.length?(0,y.jsxs)(e9.Z,{direction:"vertical",style:{width:"100%"},children:[(0,y.jsx)(sg,{title:`Plugin DataSource of ${l}`,collapsable:!0,children:(0,y.jsx)(lB,{dataSource:e})}),(0,y.jsx)(sD.Z,{}),(0,y.jsx)(sg,{title:`Chart ${l}`,children:(0,y.jsx)(lT,{plugins:e,type:r1.Done})})]}):(0,y.jsx)(lR,{})})}):null},lF=e=>{let{summary:t}=e,{costs:s=[]}=t||{};return s.find(e=>e.name===z.Minify)?(0,y.jsx)(s7,{containerProps:{style:{display:"inline"}},drawerProps:{title:'Details of the "Minify" stage'},text:(0,y.jsx)(e9.Z,{children:"detail"}),children:(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetPluginData,body:{hooks:["processAssets","optimizeChunkAssets"]},children:e=>e&&e.length?(0,y.jsxs)(e9.Z,{direction:"vertical",style:{width:"100%"},children:[(0,y.jsx)(sg,{title:'Plugin DataSource of the "Minify"',collapsable:!0,children:(0,y.jsx)(lB,{dataSource:e})}),(0,y.jsx)(sD.Z,{}),(0,y.jsx)(sg,{title:'Chart of the "Minify"',children:(0,y.jsx)(lT,{plugins:e,type:r1.Minify})})]}):(0,y.jsx)(lR,{})})}):null};var l$={progress:"progress_61324",title:"title_61324"};let lG=e=>{let{children:t,name:s,showDivider:r=!0}=e;return(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:[(0,y.jsx)(so.Z.Text,{style:{color:"inherit"},children:s}),r?(0,y.jsx)(sD.Z,{type:"vertical"}):null,t]})},lK=e=>{var t;let{summary:s}=e,{t:r}=tM();if(!(null==s||null==(t=s.costs)?void 0:t.length))return null;let l=Math.max(...s.costs.map(e=>e.costs));return(0,y.jsx)(sg,{className:ly.card,children:(0,y.jsx)("div",{children:(0,y.jsxs)(e9.Z,{style:{wordBreak:"break-all",width:"100%",marginTop:"0"},size:20,direction:"vertical",children:[(0,y.jsx)("div",{className:l$.title,children:r("Compile Overall")}),s.costs.map(e=>{let{name:t,costs:r}=e,n=(0,y.jsx)(lD.Z,{className:l$.progress,percent:100*r/l,status:"normal",format:()=>se(r)});switch(t){case z.Bootstrap:return(0,y.jsxs)(lG,{name:"Bootstrap ~ BeforeCompile",children:[(0,y.jsx)(lz,{summary:s}),n]},t);case z.Compile:return(0,y.jsx)(lG,{name:"Compile",showDivider:!1,children:n},t);case z.Done:return(0,y.jsxs)(lG,{name:"AfterCompile ~ Done",children:[(0,y.jsx)(lO,{summary:s}),n]},t);case z.Minify:return(0,y.jsxs)(lG,{name:"Minify",children:[(0,y.jsx)(lF,{summary:s}),n]},t);default:return null}})]})})})};var lW=s(70655),lH=s(55297),lV=s(92960),lU=s(40026),lq=s(76884),lY=s(4775),lJ=s(15778),lQ=s(37804),lX=s.n(lQ),l0={title:"title_78c11"};let l1=s0({Component:e=>{let{defaultKeys:t,configs:s}=e,r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,tv.Z)(e)?e.find(e=>"webpack"===e.name||"rspack"===e.name):null}(s||[]);if(!r)return null;let{config:l,version:n,name:i}=r,a=Object.keys(l),[o,d]=(0,T.useState)(t||a);return(0,y.jsxs)(s7,{text:(0,y.jsxs)("div",{className:l0.title,children:[(0,y.jsx)("span",{style:{marginRight:"8px",fontSize:"13px"},children:"View Bundler Config"}),(0,y.jsx)(e8.Z,{style:{fontSize:"10px"}})]}),children:[(0,y.jsxs)(sE.Z,{children:[(0,y.jsx)(sK,{text:"Bundler Config Viewer"}),(0,y.jsx)(sD.Z,{}),(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:"Properties: "}),(0,y.jsx)(ls.Z,{dropdownStyle:{zIndex:999},mode:"multiple",allowClear:!0,value:o.length===a.length?[]:o,style:{width:350},popupMatchSelectWidth:!0,placeholder:"Show Selected Properties Only.",onChange:e=>{d(e)},children:a.map(e=>(0,y.jsx)(ls.Z.Option,{label:e,value:e,children:e},e))})]}),(0,y.jsx)(sD.Z,{})]}),(0,y.jsx)(lX(),{name:n&&"unknown"!==n?`${i}@${n}`:"webpack.config",theme:"monokai",src:0===o.length?l:(0,lJ.Z)(l,o),displayDataTypes:!1,displayObjectSize:!1,style:{overflowX:"auto"}})]})},api:R.SDK.ServerAPI.API.LoadDataByKey,responsePropName:"configs",body:{key:"configs"},showSkeleton:!1}),l5=e=>{let{configs:t=[],cwd:s,envinfo:r,alerts:l=[]}=e,{t:n}=tM(),i=(0,lY.Z)(l,e=>"warn"===e.level).length,a=l.length-i,o=[...Object.keys(r).map(e=>{let t=/Version$/,s=t.test(e);return{key:e,label:s?e.replace(t,""):e,children:r?r[e]:void 0}}),...t.filter(e=>!!e.version).map(e=>{let{name:t,version:s}=e;return{key:t,label:t,children:s}}),{key:"cwd",label:"cwd",children:s}];return(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:e=>{let t=t3(e.all.total.size),s=e.all.total.count,[r,l]=t.split(" "),d=[{title:"Errors",description:(0,y.jsx)("span",{style:{color:"#FF4D4F"},children:a}),icon:(0,y.jsx)(lW.C,{style:{background:"#FF4D4F"},shape:"circle",icon:(0,y.jsx)(lH.Z,{style:{fontSize:"18px"}})})},{title:"Warnings",description:(0,y.jsx)("span",{style:{color:"#FAAD14"},children:i}),icon:(0,y.jsx)(lW.C,{style:{background:"#FAAD14"},shape:"circle",icon:(0,y.jsx)(lV.Z,{style:{fontSize:"18px"}})})},{title:"Total Files",description:(0,y.jsx)("span",{children:s}),icon:(0,y.jsx)(lW.C,{style:{background:"#3874F6"},shape:"circle",icon:(0,y.jsx)(lU.Z,{style:{fontSize:"18px"}})})},{title:"Total Size",description:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("span",{style:{fontSize:"20px"},children:r}),(0,y.jsx)("span",{style:{fontSize:"13px",marginLeft:"5px"},children:l})]}),icon:(0,y.jsx)(lW.C,{style:{background:"rgba(226, 129, 73)"},shape:"circle",icon:(0,y.jsx)(lq.Z,{style:{fontSize:"18px"}})})}];return(0,y.jsx)(sg,{className:ly.card,children:(0,y.jsxs)("div",{children:[(0,y.jsxs)("div",{className:"title_57654",children:[(0,y.jsx)("span",{className:"left_57654",children:n("Project Overall")}),(0,y.jsx)(l1,{})]}),(0,y.jsx)("div",{className:"overview_57654",children:d.map((e,t)=>(0,y.jsx)(sP,{title:e.title,description:(0,y.jsx)("span",{children:e.description}),icon:e.icon},t))}),(0,y.jsx)(lj.Z,{className:"projectOverall_17e15",items:o})]})})}})},l2=e=>{let{children:t}=e;return(0,y.jsx)(lm.Z,{vertical:!0,className:"layout_43377",children:t.map(e=>(0,y.jsx)("div",{className:"row_43377",children:e}))})},l4=s0({api:R.SDK.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{project:t}=e,{summary:s,configs:r,root:l,envinfo:n,errors:i}=t;return(0,y.jsx)("div",{className:"overall_43377",children:(0,y.jsxs)(lm.Z,{style:{width:"100%"},children:[(0,y.jsx)("div",{style:{flex:3,marginRight:"16px",maxWidth:"75%"},children:(0,y.jsxs)(l2,{children:[(0,y.jsx)(l5,{configs:r,cwd:l,envinfo:n,alerts:i}),(0,y.jsx)(rf,{})]})}),(0,y.jsx)("div",{style:{flex:1},children:(0,y.jsxs)(l2,{children:[(0,y.jsx)(lP,{errors:i,cwd:l}),(0,y.jsx)(lK,{summary:s}),(0,y.jsx)(lf,{})]})})]})})}});var l6=s(23379),l3=s(1785),l7=s(92929),l9=s(76729),l8=s(83287),ne={text:"text_76ee0"};let nt=e=>{let{text:t,keyword:s,...r}=e;if(!s||-1===t.indexOf(s))return ns({text:t,rest:r});let l=[],n=t;for(;n.length>0;){let e=n.indexOf(s);if(e>-1)0!==e&&l.push(ns({text:n,els:l})),l.push(ns({text:n,els:l,marked:!0})),n=n.slice(e+s.length);else{l.push(ns({text:n,els:l,marked:!0}));break}}return(0,y.jsx)(so.Z.Text,{className:ne.text,...r,children:l})},ns=e=>{let{text:t,els:s,marked:r=!1,rest:l}=e;if(!t)return null;let n=t.length;if(n>40){let e=Math.floor(18.5),s=Math.ceil(18.5);return(0,y.jsx)(l8.Z,{content:t,placement:"left",children:(0,y.jsx)("div",{children:(0,y.jsxs)(so.Z.Text,{className:ne.text,mark:!!r,...l,children:[t.slice(0,e),"...",t.slice(n-s)]})})})}return(0,y.jsx)(l8.Z,{content:t,children:(0,y.jsx)("div",{children:(0,y.jsx)(so.Z.Text,{className:ne.text,...l,children:t},s?s.length:0)})})};var nr=s(4166),nl=s(47241);let nn=(0,T.createContext)({setModuleJumpList(e){},moduleJumpList:[]});var ni=s(92382),na=s(91668),no=s(34738),nd=s(56434);let nc="file-tree-com",nu=e=>{let{treeData:t,needJumpto:s=!1,defaultOpened:r=!1,defaultOpenFather:l=0}=e,{required:n,handlers:i}=(0,nd.Du)({id:`${nc}-tree`,data:t||[],defaultOpened:r,multipleSelect:!1,refreshAsyncNodes:!0}),a=(0,T.useCallback)(e=>{var t;let{node:r,onToggle:n}=e;l&&r.data.level<l&&r.setOpened(!0);let i=tu(r.data.name);return(0,y.jsx)("div",{className:`${nc}-titles-box`,children:(0,y.jsx)("div",{className:`${nc}-titles`,children:(0,y.jsx)(e9.Z,{direction:"vertical",children:(0,y.jsx)("div",{className:`${nc}-node-title`,children:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)("div",{onClick:n,children:(0,y.jsxs)(e9.Z,{children:[!r.options.opened&&(null==(t=r.data.children)?void 0:t.length)?(0,y.jsx)(ni.Z,{style:{color:"lightblue"}}):(0,y.jsx)(na.Z,{style:{color:"lightblue"}}),i,(0,y.jsx)(l8.Z,{content:(0,y.jsx)(y.Fragment,{children:r.data.__RESOURCEPATH__?(0,y.jsx)(so.Z.Text,{code:!0,children:r.data.__RESOURCEPATH__},`${r.data.name}-popover-path`):(0,y.jsx)(y.Fragment,{})}),title:"INFO",trigger:"hover",children:(0,y.jsx)(so.Z.Text,{children:r.data.name})},`${r.data.name}popover`)]})}),(0,y.jsx)(e9.Z,{children:s&&(0,y.jsx)(nn.Consumer,{children:e=>{let{moduleJumpList:t,setModuleJumpList:s}=e;return(0,y.jsx)(no.Z,{onClick:()=>{let e=[...t];e.push(+r.id),s(e)}})}})})]})})})})},r.data.name)},[]);return(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(nd.ZP,{...n,...i,horizontalLineStyles:{stroke:"#c4c4c4",strokeWidth:2,strokeDasharray:"1 1"},verticalLineStyles:{stroke:"#c4c4c4",strokeWidth:2,strokeDasharray:"1 1"},draggable:!1,depthGap:14,gapMode:"padding",disableLines:!1,disableTransitions:!0,disableHorizontalLines:!1,disableVerticalLines:!1,verticalLineTopOffset:0,verticalLineOffset:5,renderNode:a})})};R.Client.RsdoctorClientRoutes.ModuleAnalyze;let nh="module-analyze";var np=s(95698),nm=s(86938),nx=(0,T.memo)(e=>{let{dependencies:t,cwd:s,module:r}=e,l=(0,T.useMemo)(()=>{let e=r.dependencies.map(e=>{let s=(0,np.Z)(t,t=>t.id===e);if(s)return{__RESOURCEPATH__:s.resolvedRequest||"",id:s.dependency,key:s.resolvedRequest,name:eY(s.resolvedRequest)||"",level:1,kind:s.kind,concatModules:void 0}});return(0,nm.Z)(e)},[r]);return(0,y.jsx)(sE.Z,{justify:"start",align:"middle",children:(0,y.jsx)(sT.Z,{span:24,children:l.length?(0,y.jsx)(nu,{treeData:l,needJumpto:!0,cwd:s}):(0,y.jsx)(sr.Z,{})})})});let nf=(e,t)=>{var s;if(null==e||null==(s=e.imported)?void 0:s.length){let s=e.imported.map(e=>(0,np.Z)(t,t=>t.id===Number(e)));return(0,nm.Z)(s)}return[]},ng=e=>{var t;let{curModule:s,modules:r,dependencies:l,cwd:n,activeTabKey:i,selectedChunk:a=""}=e,[o,d]=(0,T.useState)([]),{data:c}=(0,T.useMemo)(()=>o&&(null==o?void 0:o.length)?{data:(0,nm.Z)(null==o?void 0:o.map((e,t)=>({key:`0-${t}`,name:eY(e.path),__RESOURCEPATH__:e.path,id:e.id,level:1,chunks:e.chunks,size:t3(e.size.parsedSize),kind:e.kind,concatModules:e.concatenationModules,fatherPath:eY(s.path),dependencies:e.dependencies,getChildren:()=>(function e(t,s,r){let l=nf(t,s);return null==l?void 0:l.map((l,n)=>({key:`0-${n}`,name:eY(l.path),__RESOURCEPATH__:l.path,id:l.id,level:1,size:t3(l.size.parsedSize),kind:l.kind,chunks:l.chunks,concatModules:l.concatenationModules,fatherPath:eY(r.path),dependencies:l.dependencies,getChildren:()=>e(l,s,t),children:l.imported}))})(e,r,s),children:e.imported})))}:{filterData:[],data:[]},[o,s]);return(0,T.useEffect)(()=>{d(nf(s,r))},[s,r]),(0,y.jsx)(y.Fragment,{children:i===nb[nb.Reasons]?(0,y.jsx)(y.Fragment,{children:o?(0,y.jsx)(nu,{cwd:n,treeData:c,needCode:!0,needShowAllTree:!0,needJumpto:!0,selectedChunk:a}):(0,y.jsx)(sr.Z,{className:`${nh}-empty`})}):i===nb[nb.Dependencies]?(0,y.jsx)("div",{className:`${nh}-file-tree`,style:{padding:k.BasePadding/2},children:(0,y.jsx)(sT.Z,{span:24,style:{marginTop:k.BasePadding/2},children:s?(0,y.jsx)(nx,{module:s,dependencies:l,cwd:n}):(0,y.jsx)(sr.Z,{className:`${nh}-empty`})})}):(0,y.jsx)("div",{children:null==(t=s.bailoutReason)?void 0:t.map(e=>(0,y.jsx)("div",{style:{marginBottom:10},children:(0,y.jsx)(ss.Z,{children:(0,y.jsx)(l8.Z,{content:e,children:(0,y.jsx)("span",{style:{display:"inline-block"},children:e.length>120?`${e.slice(0,120)}...`:e})})},e)}))})})};var nj=s(3255),ny=s(50417),nv=s(19892),nb=((p=nb||{})[p.Reasons=0]="Reasons",p[p.Dependencies=1]="Dependencies",p[p.BailoutReason=2]="BailoutReason",p);let nZ=[{key:nb[0],label:nb[0]},{key:nb[1],label:nb[1]},{key:nb[2],label:nb[2]}],nS=e=>{let{modules:t,cwd:s,moduleId:r,show:l,setShow:n}=e,[i,a]=(0,T.useState)(""),[o,d]=(0,T.useState)(nb[0]);return(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetModuleDetails,body:{moduleId:+r},children:e=>{let{module:r,dependencies:a}=e;return(0,y.jsx)(sN.Z,{title:(0,y.jsxs)("div",{className:"module-analyze-box",children:[(0,y.jsx)(so.Z.Text,{children:eY(r.path)}),(0,y.jsx)(so.Z.Text,{style:{fontSize:12,color:"rgba(0, 0, 0, 0.45)"},children:`Current Module: ${r.path}`})]}),open:l,maskClosable:!0,width:.8*D,onClose:()=>n(!1),children:(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetAllChunkGraph,body:{},children:e=>(0,y.jsx)(nn.Consumer,{children:e=>{let{moduleJumpList:l,setModuleJumpList:n}=e;return(0,y.jsx)(sa.Z,{style:{minHeight:400},tabList:nZ,activeTabKey:o,tabProps:{size:"small",style:{fontSize:12}},onTabChange:e=>d(e),styles:{title:{paddingTop:0}},title:(0,y.jsxs)(e9.Z,{style:{padding:"10px 0px"},children:[(0,y.jsx)(nj.Z,{onClick:()=>{n([...l.slice(0,-1)])}}),(0,y.jsx)(so.Z.Text,{children:"Current Module Imported Reasons Tree"}),(0,y.jsx)(l8.Z,{content:(0,y.jsx)("div",{children:(0,y.jsxs)("div",{children:[(0,y.jsx)(rg.Z,{status:"success",text:" "}),(0,y.jsx)(ny.Z,{}),(0,y.jsx)(so.Z.Text,{children:": Jump button, click to jump to the Module dependency analysis page of this module."})]})}),title:"Usage",children:(0,y.jsx)(nv.Z,{})})]}),children:(0,y.jsx)(sE.Z,{justify:"start",align:"middle",children:(0,y.jsx)(sT.Z,{span:24,children:(0,y.jsx)(ng,{curModule:r,modules:t,dependencies:a,cwd:s,selectedChunk:i,activeTabKey:o})})})})}})})})}})};var nC={assets:"assets_0b14c",assetBox:"assetBox_0b14c",fileText:"fileText_0b14c","bundle-tree":"bundle-tree_0b14c",box:"box_0b14c",keyword:"keyword_0b14c",divider:"divider_0b14c",dividerDiv:"dividerDiv_0b14c",assetsTag:"assetsTag_0b14c",bundle:"bundle_0b14c","bundle-size-card":"bundle-size-card_0b14c","ant-tabs-tab":"ant-tabs-tab_0b14c",modal:"modal_0b14c","search-btn":"search-btn_0b14c","search-modal-list":"search-modal-list_0b14c"};let{DirectoryTree:nw}=lg.Z,nM=[],nk={source:"source code",transformed:"Transformed Code (After compile)",parsedSource:"Bundled Code (After bundle and tree-shaking)"},nP={margin:"none",marginInlineEnd:0},nD=()=>(0,y.jsx)(sr.Z,{description:`Do not have the module code.
|
|
29
|
-
(1) If you use the brief mode, there will not have any codes to show.
|
|
30
|
-
(2) If you use lite mode, there will not have source codes.`}),n_=e=>{let{data:t}=e,[s,r]=(0,T.useState)(""),{t:l}=tM(),n={source:"Source Code",transformed:`Transformed Code(${l("After Compile")})`,parsedSource:`Bundled Code(${l("After Bundled")})`};if(!t)return null;let{path:i}=t;return(0,y.jsx)(s7,{text:"",buttonProps:{size:"small",icon:(0,y.jsx)(l8.Z,{content:"Open the Codes Box",children:(0,y.jsx)(l6.Z,{})}),type:"default"},buttonStyle:{padding:"0 4px"},drawerProps:{destroyOnClose:!0,title:`Code of "${i}"`},children:(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetModuleCodeByModuleId,body:{moduleId:t.id},children:e=>(0,y.jsx)(y.Fragment,{children:e.source||e.parsedSource||e.transformed?(0,y.jsx)(sa.Z,{className:"code-size-card",style:{width:"100%"},tabList:Object.keys((0,nl.Z)(e,e=>!e)).map(e=>({tab:e})).map(e=>({...e,tab:n[e.tab],key:e.tab})),defaultActiveTabKey:e.parsedSource?"parsedSource":"source",onTabChange:e=>r(e),tabBarExtraContent:(0,y.jsx)(l8.Z,{placement:"bottom",title:(0,y.jsx)(so.Z.Title,{level:5,children:"Explain"}),content:(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginBottom:30},children:[(0,y.jsxs)("div",{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Source: "}),(0,y.jsx)(so.Z.Text,{children:nk.source})]}),(0,y.jsxs)("div",{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Transformed:"}),(0,y.jsx)(so.Z.Text,{children:nk.transformed})]}),(0,y.jsxs)("div",{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Bundled Source:"}),(0,y.jsx)(so.Z.Text,{children:nk.parsedSource})]}),(0,y.jsx)("br",{}),(0,y.jsx)(so.Z.Text,{strong:!0,children:"More"}),(0,y.jsx)(so.Z.Text,{children:l("CodeModeExplain")})]})}),trigger:"hover",children:(0,y.jsx)("a",{href:"#",children:"Explain"})}),styles:{body:{padding:0,overflow:"hidden"}},children:e.parsedSource||e.source||e.transformed?(0,y.jsx)(rL,{isEmbed:!0,code:s?e[s]:e.parsedSource?e.parsedSource:e.source,filePath:i}):(0,y.jsx)(nD,{})}):(0,y.jsx)(nD,{})})})})},nI=e=>{let{id:t,show:s,setShow:r,cwd:l}=e;return t?(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetAllModuleGraph,body:{},children:e=>(0,y.jsx)(nS,{cwd:l,moduleId:t,modules:e,show:s,setShow:r})}):null},nA="__RESOURCEPATH__",nN=e=>{let{modules:t,chunks:s,filteredModules:r}=e,{sourceSize:l,parsedSize:n,filteredParsedSize:i,filteredSourceSize:a}=(0,T.useMemo)(()=>({sourceSize:(0,sI.Z)(t,e=>e.size.sourceSize),parsedSize:(0,sI.Z)(t,e=>e.size.parsedSize),filteredSourceSize:(0,sI.Z)(r,e=>e.size.sourceSize),filteredParsedSize:(0,sI.Z)(r,e=>e.size.parsedSize)}),[t,r]);return(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(sd.Z,{title:`total modules count is ${t.length}, the filtered modules count is ${r.length}`,children:(0,y.jsxs)(e9.Z,{children:[(0,y.jsxs)(so.Z.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:["Modules: ",r.length," / ",t.length]}),(0,y.jsx)(sF.Z,{})]})}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(sd.Z,{title:(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["Total modules bundled size: ",t3(n)]}),(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["Total modules source size: ",t3(l)]}),(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["Filtered modules bundled size: ",t3(i)]}),(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["Filtered modules source size: ",t3(a)]})]}),children:(0,y.jsxs)(e9.Z,{children:[(0,y.jsxs)(so.Z.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:["Modules Size:",i===n?t3(n):`${t3(i)} / ${t3(n)}`]}),(0,y.jsx)(sF.Z,{})]})}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(sd.Z,{title:(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["this asset includes ",s.length," chunks:"]}),s.map(e=>(0,y.jsx)(sH,{label:"chunk",value:e.name},e.name))]}),children:(0,y.jsxs)(e9.Z,{children:[(0,y.jsxs)(so.Z.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:["Chunks: ",s.length]}),(0,y.jsx)(sF.Z,{})]})})]})},nE=e=>{let{moduleCount:t}=e;return(0,y.jsx)(sd.Z,{title:(0,y.jsx)(e9.Z,{children:(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["This is a concatenated container module that includes ",t," ","modules"]})}),children:(0,y.jsx)(ss.Z,{color:"blue",style:nP,children:"concatenated container"})})},nT=e=>{let{size:t}=e;return(0,y.jsx)(sd.Z,{title:(0,y.jsx)(e9.Z,{children:(0,y.jsx)(so.Z.Text,{style:{color:"inherit"},children:"The total output size of all the files in this folder. If you enabled minification, this value shows the minified size."})}),children:(0,y.jsx)(ss.Z,{style:nP,color:"geekblue",children:`bundled size: ${t3(t)}`})})},nR=e=>{let{size:t}=e;return(0,y.jsx)(sd.Z,{title:(0,y.jsx)(e9.Z,{children:(0,y.jsx)(so.Z.Text,{style:{color:"inherit"},children:"The final output size of this file. If you enabled minification, this value shows the minified size."})}),children:(0,y.jsx)(ss.Z,{color:"geekblue",children:`bundled size: ${t3(t)}`})})},nz=e=>{let{size:t}=e;return(0,y.jsx)(sd.Z,{title:(0,y.jsx)(e9.Z,{children:(0,y.jsx)(so.Z.Text,{style:{color:"inherit"},children:"The total original size of all the files in this folder, before any transformations and minification."})}),children:(0,y.jsx)(ss.Z,{style:nP,color:"cyan",children:`source size: ${t3(t)}`})})},nL=e=>{let{size:t}=e;return(0,y.jsx)(sd.Z,{title:(0,y.jsx)(e9.Z,{children:(0,y.jsx)(so.Z.Text,{style:{color:"inherit"},children:"The original size of this file, before any transformations and minification."})}),children:(0,y.jsx)(ss.Z,{color:"cyan",children:`source size: ${t3(t)}`})})},nB=e=>{let{asset:t,chunks:s,modules:r,moduleSizeLimit:l,height:n,root:i}=e,[a,o]=(0,T.useState)(""),[d,c]=(0,T.useState)(!1),[u,h]=(0,T.useState)([]),[p,m]=(0,T.useState)(!1),x=(0,T.useMemo)(()=>{let e=r.slice();if(a){let t=RegExp(a,"i");e=e.filter(e=>t.test(e.path))}return l&&(e=e.filter(e=>e.size.parsedSize>=l)),e},[r,a,l]),f=(0,T.useMemo)(()=>tf({files:x.map(e=>e.path).filter(Boolean),inlinedResourcePathKey:nA,fileTitle(e,t){var s;let l=x.find(t=>t.path===e);if(!l)return t;let{parsedSize:n=0,sourceSize:i=0}=l.size,a=l.kind===R.SDK.ModuleKind.Concatenation,o=!a&&0===n&&r.filter(e=>e!==l&&e.modules&&e.modules.indexOf(l.id)>-1);return(0,y.jsxs)("div",{className:nC["bundle-tree"],children:[(0,y.jsx)(l8.Z,{content:`Open the ${t}\u{2019}s module reasons tree.`,placement:"bottom",children:(0,y.jsxs)("div",{className:nC.box,onClick:()=>{h([l.id]),m(!0)},children:[(0,y.jsx)("div",{className:nC.keywords,children:(0,y.jsx)(nt,{ellipsis:!0,text:t,keyword:""})}),(0,y.jsx)("div",{className:nC.dividerDiv,children:(0,y.jsx)(sD.Z,{className:nC.divider,dashed:!0})})]})}),(0,y.jsxs)(e9.Z,{children:[0!==n?(0,y.jsx)(sd.Z,{title:(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsx)(nR,{size:n}),(0,y.jsx)(nL,{size:i})]}),color:"white",children:(0,y.jsx)(nR,{size:n})}):0!==i?(0,y.jsx)(nL,{size:i}):null,a?(0,y.jsx)(nE,{moduleCount:(null==(s=l.modules)?void 0:s.length)||0}):null,o&&o.length?(0,y.jsx)(sd.Z,{title:(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsx)(so.Z.Text,{style:{color:"inherit"},children:"This module is concatenated into another container module:"}),o.map(e=>{let{id:t,path:s}=e;if(s.startsWith("data:text/javascript;"))return(0,y.jsx)(so.Z.Paragraph,{ellipsis:{rows:4},style:{color:"inherit",maxWidth:"100%"},code:!0,children:s},t);let r=(0,V.relative)((0,V.dirname)(l.path),s);return r.startsWith("javascript;charset=utf-8;base64,")?(0,y.jsx)(so.Z.Text,{style:{color:"inherit",maxWidth:"100%"},code:!0,children:"."===r[0]?r:`./${r}`},t):(0,y.jsx)(so.Z.Text,{style:{color:"inherit"},code:!0,children:"."===r[0]?r:`./${r}`},t)})]}),children:(0,y.jsx)(ss.Z,{color:"green",children:"concatenated"})}):null,(0,y.jsx)(n_,{data:l})]})]})},dirTitle(e,t){let s=function e(t,s){return t.children&&t.children.forEach(t=>{t.isLeaf?s.push(t[nA]):e(t,s)}),s}(e,[]);if(s.length){let e=s.map(e=>r.find(t=>t.path===e)),l=(0,sI.Z)(e,e=>{var t;return(null==(t=e.size)?void 0:t.parsedSize)||0}),n=(0,sI.Z)(e,e=>{var t;return(null==(t=e.size)?void 0:t.sourceSize)||0});return(0,y.jsxs)("div",{className:nC["bundle-tree"],children:[(0,y.jsxs)("div",{className:nC.box,children:[(0,y.jsx)("div",{className:nC.keywords,children:(0,y.jsx)(nt,{ellipsis:!0,text:t,keyword:""})}),(0,y.jsx)("div",{className:nC.dividerDiv,children:(0,y.jsx)(sD.Z,{className:nC.divider,dashed:!0})})]}),(0,y.jsx)(e9.Z,{children:l>0?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(nT,{size:l}),(0,y.jsx)(nz,{size:n})]}):(0,y.jsx)(nz,{size:n})})]})}return t},page:"bundle"}),[x]);return(0,T.useEffect)(()=>{o(""),c(!1)},[t]),(0,T.useEffect)(()=>{c(!1)},[a]),(0,y.jsx)(nn.Provider,{value:{moduleJumpList:u,setModuleJumpList:h},children:(0,y.jsxs)(sa.Z,{className:nC.bundle,title:`Modules of "${t.path}"`,bodyStyle:{minHeight:n},size:"small",children:[r.length?(0,y.jsxs)(sE.Z,{children:[(0,y.jsx)(sT.Z,{span:24,children:(0,y.jsx)(nN,{modules:r,chunks:s,filteredModules:x})}),(0,y.jsx)(sT.Z,{span:24,children:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(r7,{placeholder:"search module by keyword",onChange:e=>o(e)},t.path),(0,y.jsx)(sj.ZP,{onClick:()=>c(!0),size:"small",icon:(0,y.jsx)(nr.Z,{})})]})}),(0,y.jsx)(sT.Z,{span:24,style:{marginTop:k.BasePadding},children:x.length?(0,y.jsx)(nw,{selectable:!1,defaultExpandAll:d||x.length<=20,onExpand:e=>{nM=e},defaultExpandParent:!0,defaultExpandedKeys:(null==nM?void 0:nM.length)?nM:1===f.length?[f[0].key]:[],treeData:f,rootStyle:{maxHeight:"500px",overflow:"auto",border:"1px solid rgba(235, 237, 241)",padding:"14px 20px"}},`tree_${a}_${d}_${t.path}`):(0,y.jsx)(sr.Z,{description:(0,y.jsx)(so.Z.Text,{strong:!0,children:`"${a}" can't match any modules`})})})]}):(0,y.jsx)(sr.Z,{description:(0,y.jsx)(so.Z.Text,{strong:!0,children:`"${t.path}" doesn't have any modules`})}),(0,y.jsx)(nI,{id:(null==u?void 0:u.length)?u[u.length-1]:"",show:p,setShow:m,cwd:i})]})})};var nO=s(34136),nF="dataContainer_8372e",n$="title_8372e",nG="description_8372e";let{DirectoryTree:nK}=lg.Z,nW=e=>{let{files:t,total:s,showProgress:r=!1,type:l}=e,n=l.toLocaleLowerCase(),i=(0,T.useMemo)(()=>(0,sI.Z)(t,e=>e.size),[t]);return(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:e=>{let l=n.includes("image")?"imgs":n,{treeData:a}=lw(e[l].total);return(0,y.jsxs)(e9.Z,{style:{height:100},align:"center",children:[(0,y.jsx)(lD.Z,{type:"circle",percent:+(i/s*100).toFixed(2),strokeColor:{"0%":"#108ee9","100%":"#108ee9"},strokeWidth:12,format:e=>(0,y.jsxs)("div",{className:"percentContainer_8372e",children:[(0,y.jsxs)("span",{style:{marginTop:"10px"},children:[e,"%"]}),(0,y.jsxs)("span",{className:"percentDescription_8372e",children:["total ",l]})]})}),(0,y.jsxs)("div",{style:{marginLeft:"10px"},children:[(0,y.jsxs)("div",{className:nF,children:[(0,y.jsx)("div",{className:n$,children:"Size"}),(0,y.jsx)("div",{className:nG,children:t3(i)})]}),(0,y.jsx)(s7,{buttonProps:{size:"small"},buttonStyle:{fontSize:"inherit"},drawerProps:{title:"Files"},text:(0,y.jsx)(e9.Z,{style:{textAlign:r?"left":"center"},align:"end",children:(0,y.jsx)(e9.Z,{direction:"vertical",children:(0,y.jsx)("div",{className:nF,children:(0,y.jsxs)("div",{className:n$,children:[(0,y.jsx)("span",{style:{marginRight:"5px"},children:"Files"}),(0,y.jsx)(e8.Z,{})]})})})}),children:a.length?(0,y.jsx)(nK,{defaultExpandAll:!0,selectable:!1,treeData:a,rootStyle:{minHeight:"800px",border:"1px solid rgba(235, 237, 241)"}}):(0,y.jsx)("div",{style:{position:"relative",top:"50%",transform:"translateY(-50%)"},children:(0,y.jsx)(sr.Z,{style:{height:"100%"}})})}),(0,y.jsx)("div",{className:nG,children:t.length})]})]})}})},{DirectoryTree:nH}=lg.Z,{useToken:nV}=tr.Z,{innerWidth:nU}=window,nq=e=>{let{showProgress:t=!1,data:s,total:r,tagBgColor:l,type:n}=e,{token:i}=nV(),a=l||i.colorPrimaryBorderHover;return(0,y.jsx)(nW,{type:n,files:s.files,total:r,showProgress:t,tagBgColor:a})},nY=e=>{let{titles:t,datas:s,bgColor:r,type:l}=e,[n,i]=(0,T.useState)(0),a=l||t[n]||t[0];return(0,y.jsx)(sh,{title:(0,y.jsxs)("div",{className:"cardTitle_5cd6a",children:[(0,y.jsx)("div",{className:"title_5cd6a",children:a}),t.length>1?(0,y.jsx)(sc.Z,{defaultValue:t[n],options:t,onChange:e=>{i(t.indexOf(e))},size:"small",style:{transition:"transform 0.3s ease"},value:t[n]||t[0]}):null]}),value:s.map((e,t)=>(0,T.createElement)(nq,{type:a,...e,key:t,tagBgColor:null==r?void 0:r.tagBgColor}))[n],boxProps:{style:{background:null==r?void 0:r.bgColor,width:nU>1300?"80%":"95%"}}})},nJ=e=>{let{errors:t,summary:s}=e,r=tI(t),[l,n]=t3(s.all.total.size).split(" "),i=[(0,y.jsx)(nY,{type:"JS",titles:["Total","Initial"],datas:[{data:s.js.total,total:s.all.total.size,showProgress:!0},{data:s.js.initial,total:s.all.total.size,showProgress:!0}]}),(0,y.jsx)(nY,{type:"CSS",titles:["Total","Initial"],datas:[{data:s.css.total,total:s.all.total.size,showProgress:!0},{data:s.css.initial,total:s.all.total.size,showProgress:!0}]}),(0,y.jsx)(nY,{titles:["Images","Fonts","Media"],datas:[{data:s.imgs.total,total:s.all.total.size,showProgress:!0},{data:s.fonts.total,total:s.all.total.size,showProgress:!0},{data:s.media.total,total:s.all.total.size,showProgress:!0}]}),(0,y.jsx)(nY,{type:"HTML",titles:["HTML Files"],datas:[{data:s.html.total,total:s.all.total.size,showProgress:!0}]})];return(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:e=>{let{treeData:t}=lw(e.all.total);return(0,y.jsxs)("div",{className:"container_5cd6a",children:[(0,y.jsxs)("div",{className:"summary_5cd6a",children:[(0,y.jsx)(sP,{title:(0,y.jsx)(s7,{buttonProps:{size:"small"},buttonStyle:{fontSize:"inherit"},drawerProps:{title:"Files"},text:(0,y.jsxs)("div",{style:{color:"#000000a6"},children:[(0,y.jsx)("span",{style:{marginRight:"5px"},children:"Total Files"}),(0,y.jsx)(e8.Z,{})]}),children:(0,y.jsx)(nH,{defaultExpandAll:!0,selectable:!1,treeData:t,rootStyle:{minHeight:"800px",border:"1px solid rgba(235, 237, 241)"}})}),description:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("span",{className:"description_5cd6a",children:l}),(0,y.jsx)("span",{className:"unit_5cd6a",children:n}),(0,y.jsxs)("div",{className:"totalNumber_5cd6a",children:[(0,y.jsx)("span",{style:{marginRight:"7px"},children:"Number of files"}),(0,y.jsx)("span",{style:{fontWeight:500},children:s.all.total.count})]})]}),icon:(0,y.jsx)(lW.C,{style:{background:"#3874F6"},shape:"circle",icon:(0,y.jsx)(lU.Z,{style:{fontSize:"18px"}})}),style:{marginBottom:"12px",minWidth:"210px"}}),(0,y.jsx)(sP,{style:{minWidth:"210px"},title:(0,y.jsx)("div",{style:{margin:"4px 0"},children:(0,y.jsx)("span",{style:{marginRight:"5px"},children:"Duplicate Packages"})}),description:r.length,icon:(0,y.jsx)(lW.C,{style:{background:"#13C2C2"},shape:"circle",icon:(0,y.jsx)(nO.Z,{style:{fontSize:"18px"}})})})]}),(0,y.jsx)(sD.Z,{style:{height:"200px"},type:"vertical"}),(0,y.jsx)("div",{className:"chartsContainer_5cd6a",children:i.map((e,t)=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{className:"chart_5cd6a",children:e},t),t!==i.length-1?(0,y.jsx)(sD.Z,{style:{height:"200px"},type:"vertical"},`${t}-divider`):null]}))})]})}})};var nQ=s(82708),nX=s(63457),n0=s(94788);let{Search:n1}=r3.Z,n5=e=>{let{onModuleClick:t,onClose:s,open:r,setOpen:l,isIcon:n=!1}=e,[i,a]=(0,T.useState)(!1),[o,d]=(0,T.useState)(""),[c,u]=(0,T.useState)(""),h=void 0!==r?r:i,p=l||a,m=(0,T.useCallback)(function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];let[r,l]=t;d(r)},[]),x=()=>{p(!0)},f=()=>{p(!1),null==s||s()},g=()=>{p(!1),null==s||s()};return(0,y.jsxs)(y.Fragment,{children:[n?(0,y.jsx)(n0.Z,{onClick:x}):(0,y.jsx)(sj.ZP,{className:nC["search-btn"],color:"cyan",onClick:x,children:"Search Module"}),(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetSearchModules,body:{moduleName:String(o)},children:e=>{let r=Object.keys(e)[0];return(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)(nQ.Z,{className:nC.modal,title:"Search Modules",onOk:f,onCancel:g,open:h,width:"65rem",footer:"",children:[(0,y.jsx)(n1,{placeholder:"input search module name",allowClear:!0,onSearch:m,style:{width:500}}),r?(0,y.jsx)(sl.Z,{defaultActiveKey:r,tabPosition:"top",onChange:e=>u(e),items:Object.keys(e).map((l,n)=>({label:e[l],key:l,children:n2(o,c||r,e=>{null==t||t(e),p(!1),null==s||s()})}))}):(0,y.jsx)(sr.Z,{description:"No modules found."})]})})}})]})},n2=(e,t,s)=>(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetSearchModuleInChunk,body:{moduleName:String(e),chunk:t},children:t=>(0,y.jsx)(y.Fragment,{children:(null==t?void 0:t.length)!==0?(0,y.jsx)(nX.Z,{className:nC["search-modal-list"],loading:!t.length,itemLayout:"horizontal",pagination:{position:"bottom",align:"center"},dataSource:t,renderItem:t=>{let r=t.relativePath.split(e);return(0,y.jsx)(nX.Z.Item,{className:s?"search-list-item clickable":"search-list-item",onClick:s?()=>s(t):void 0,children:(0,y.jsx)(sV.Z,{avatar:!0,title:!1,loading:!t.path,active:!0,children:(0,y.jsx)(nX.Z.Item.Meta,{description:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(so.Z.Text,{code:!0,children:"Module:"}),r.map((t,s)=>s<r.length-1?(0,y.jsxs)(so.Z.Text,{style:{fontWeight:200},children:[t,(0,y.jsx)(so.Z.Text,{strong:!0,style:{fontWeight:600},children:e},`${t}-${s}-strong`)]},`${t}-${s}`):(0,y.jsx)(so.Z.Text,{style:{fontWeight:200},children:t}))]})},`${t.path}-${t.relativePath}-meta`)})},`${t.path}-${t.relativePath}`)}}):(0,y.jsx)(sr.Z,{})})});var n4=s(26199),n6=s(81008),n3=s(71992),n7=s(96366);function n9(e){let t=5381;for(let s=0;s<e.length;s++)t=(t<<5)+t+e.charCodeAt(s);return t>>>0}let n8=(0,T.memo)(e=>{let{treeData:t,valueKey:s="sourceSize",style:r,onChartClick:l,forwardedRef:n}=e,[i,a]=(0,T.useState)(null),o=T.useRef(null);return(0,T.useEffect)(()=>{n&&o.current&&("function"==typeof n?n(o.current):n.current=o.current)},[n,o.current]),(0,T.useEffect)(()=>{rG.D([n6.N,rV.N,rY.N])},[]),(0,T.useEffect)(()=>{t&&a({title:{text:"Bundle Tree Map",left:"center"},tooltip:{position:"top",formatter:function(e){for(var t=e.treePathInfo,s=[],r=1;r<t.length;r++)s.push(t[r].name);var l=e.data||{},n=l.path||s.join("/"),i=l.sourceSize,a=l.bundledSize;return['<div class="tooltip-title">'+n4.F1(n)+"</div>","<div><b>Source Size:</b> <b>"+(void 0!==i?t3(i):"-")+"</b></div>","<div><b>Bundled Size:</b> <b>"+(void 0!==a?t3(a):"-")+"</b></div>"].join("")}},series:[{name:"Bundle Tree Map",id:"bundle-treemap",type:"treemap",visibleMin:300,left:10,right:10,top:10,bottom:10,label:{show:!0,formatter:"{b}",color:"#000"},upperLabel:{show:!0,height:30},levels:[{itemStyle:{color:"white",borderColor:"#eee",borderWidth:5,gapWidth:5},emphasis:{itemStyle:{borderColor:"#a29f9f"}}},{colorSaturation:[.25,.5],itemStyle:{borderWidth:5,gapWidth:5,borderColorSaturation:.5,borderColor:"#eee"}}],data:t.map((e,t)=>(function e(t,r){var l;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=r5[r],a=null==(l=t.children)?void 0:l.map((t,s)=>e(t,r,n+1));return{id:t.path?n9(t.path):void 0,name:t.name,value:t[s]??t.value??0,path:t.path,sourceSize:t.sourceSize??t.value,bundledSize:t.bundledSize,children:a&&a.length>0?a:void 0,itemStyle:{borderWidth:2,gapWidth:2,borderColorSaturation:.2,colorSaturation:.2,color:i[n%i.length],borderColor:i[n%i.length]},level:n}})(e,r4[t%r4.length],0))}]})},[t,s]),i?(0,y.jsx)("div",{children:(0,y.jsx)(r$.default,{ref:o,option:i,echarts:rW,onEvents:l?{click:l}:void 0,style:{width:"100%",minHeight:"500px",maxHeight:"1000px",border:"5px solid white",borderRadius:"10px",...r}})}):null}),ie=T.forwardRef((e,t)=>(0,y.jsx)(n8,{...e,forwardedRef:t})),it=e=>{let{treeData:t,onChartClick:s}=e,r=(0,T.useMemo)(()=>t.map(e=>e.name),[t]),[l,n]=(0,T.useState)(r),[i,a]=(0,T.useState)(!1),[o,d]=(0,T.useState)(!1),c=T.useRef(null),{t:u}=tM(),h=(0,T.useMemo)(()=>t.filter(e=>l.includes(e.name)),[t,l]);return(0,y.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:(0,y.jsxs)(e9.Z,{direction:"vertical",style:{width:"100%"},children:[(0,y.jsx)(sa.Z,{title:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:u("Output Assets List")}),(0,y.jsx)(n5,{onModuleClick:e=>{if(!(null==e?void 0:e.path))return;let t=n9(e.path);c.current&&c.current.getEchartsInstance().dispatchAction({type:"treemapZoomToNode",seriesId:"bundle-treemap",targetNodeId:t.toString()}),d(!1)},open:o,setOpen:d,isIcon:!0})]}),extra:(0,y.jsx)("span",{style:{cursor:"pointer",marginLeft:8},onClick:()=>a(e=>!e),"aria-label":u(i?"Expand":"Collapse"),children:i?(0,y.jsx)(n3.Z,{}):(0,y.jsx)(n7.Z,{})}),size:"small",bodyStyle:{overflow:"hidden",height:i?0:void 0,padding:i?0:void 0,transition:"height 0.3s cubic-bezier(.4,0,.2,1), padding 0.3s"},children:(0,y.jsxs)("div",{style:{opacity:+!i,transition:"opacity 0.3s",gap:8},children:[(0,y.jsx)(rR.Z,{indeterminate:l.length>0&&l.length<r.length,checked:l.length===r.length,onChange:e=>n(e.target.checked?r:[]),style:{marginBottom:4},children:"ALL / NONE"},"all-none-checkbox"),(0,y.jsx)(rR.Z.Group,{options:r,value:l,onChange:n,style:{display:"flex",gap:8,fontWeight:500}},"asset-checkbox-group")]})}),(0,y.jsx)("div",{style:{flex:1},children:(0,y.jsx)(ie,{ref:c,treeData:h,onChartClick:s})})]})})},{Option:is}=ls.Z,ir=[{key:"tree",label:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:"Tree Graph"}),(0,y.jsx)(sd.Z,{overlayStyle:{maxWidth:380},overlayInnerStyle:{marginLeft:16,padding:10},color:"white",title:(0,y.jsxs)(e9.Z,{direction:"vertical",color:"white",size:"middle",children:[(0,y.jsx)(sE.Z,{children:(0,y.jsxs)(sT.Z,{children:[(0,y.jsx)(ss.Z,{color:"cyan",style:{margin:0},children:"initial"}),(0,y.jsx)(so.Z.Text,{style:{marginLeft:4},children:"Identify whether the chunk is an initial chunk."})]})}),(0,y.jsx)(sE.Z,{children:(0,y.jsxs)(sT.Z,{children:[(0,y.jsx)(ss.Z,{color:"green",style:{margin:0},children:"concatenated"}),(0,y.jsx)(so.Z.Text,{style:{marginLeft:4},children:"Identify whether the module is a concatenated module"}),(0,y.jsx)(sd.Z,{overlayStyle:{maxWidth:408},placement:"bottom",color:"white",title:(0,y.jsx)(e9.Z,{direction:"vertical",color:"white",children:(0,y.jsx)(sE.Z,{children:(0,y.jsxs)(sT.Z,{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Concatenated Module"}),(0,y.jsx)(so.Z.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,y.jsx)(sF.Z,{style:{color:"rgba(0,0,0,.45)",marginLeft:4}})}),(0,y.jsx)(so.Z.Text,{children:"."})]})}),(0,y.jsx)(sE.Z,{children:(0,y.jsxs)(sT.Z,{children:[(0,y.jsx)(sj.ZP,{size:"small",icon:(0,y.jsx)(l6.Z,{})}),(0,y.jsx)(so.Z.Text,{style:{marginLeft:4},children:"Open the code."})]})}),(0,y.jsx)(sE.Z,{children:(0,y.jsxs)(sT.Z,{children:[(0,y.jsx)(sj.ZP,{size:"small",icon:(0,y.jsx)(l3.Z,{})}),(0,y.jsx)(so.Z.Text,{style:{marginLeft:4},children:"View the module dependency, that is, module reasons in stats.json."})]})}),(0,y.jsx)(sE.Z,{children:(0,y.jsxs)(sT.Z,{children:[(0,y.jsx)(ss.Z,{color:"purple",children:"Bundled: 15.77 KB"}),(0,y.jsx)(so.Z.Text,{children:"The final size of the output files after processing, bundling, and optimization. This is what is delivered to the browser."})]})}),(0,y.jsx)(sE.Z,{children:(0,y.jsxs)(sT.Z,{children:[(0,y.jsx)(ss.Z,{color:"orange",children:"Source: 60.46 KB"}),(0,y.jsx)(so.Z.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,y.jsx)(sF.Z,{style:{color:"rgba(0,0,0,.45)"}})})]})},{key:"tile",label:"Tile Graph"}],il=e=>{let{errors:t,cwd:s,summary:r,entryPoints:l}=e,[n,i]=(0,T.useState)([]),[a,o]=(0,T.useState)(0),[d,c]=(0,T.useState)(""),[u,h]=(0,T.useState)(0),[p,m]=(0,T.useState)(!1),[x,f]=(0,T.useState)(""),[g,j]=(0,T.useState)(""),[v,b]=(0,T.useState)(null),[Z,S]=(0,T.useState)("tree"),{showCode:C,codeDrawerComponent:w}=function(e){let[t,s]=(0,T.useState)(""),[r,l]=(0,T.useState)(""),[n,i]=(0,T.useState)(""),[a,o]=(0,T.useState)(!1),[d,c]=(0,T.useState)(),[u,h]=(0,T.useState)();return{showCode(e){s(e.code||""),l(e.lang||""),i(e.filePath||""),c(e.defaultLine),h(e.ranges),o(!0)},codeDrawerComponent:(0,y.jsx)(sN.Z,{maskClosable:!0,zIndex:999,width:"70%",destroyOnClose:!0,title:`Code of "${n}"`,open:a,onClose:()=>o(!1),children:t?(0,y.jsx)(rL,{code:t,lang:r,filePath:n,defaultLine:d,ranges:u}):(0,y.jsx)(sr.Z,{description:e||"No Code"})})}}("Do not have the codes of assets. If you use the lite or brief mode, there will have codes."),{t:M}=tM(),P=r.all.total.files,D=(0,T.useCallback)(e=>t=>{"module"===e?f(t):"chunk"===e&&j(t)},[]),_=e=>(0,y.jsxs)(ls.Z,{defaultValue:"kb",onChange:D(e),children:[(0,y.jsx)(is,{value:"kb",children:"KB"}),(0,y.jsx)(is,{value:"mb",children:"MB"})]}),I=(0,T.useCallback)((0,l9.Z)(e=>{o("mb"===x?1024*e*1024:1024*e)},300),[]),A=(0,T.useCallback)((0,l9.Z)(e=>{h("mb"===g?1024*e*1024:1024*e)},300),[]),N=(0,T.useMemo)(()=>{let e=P.slice();return d&&(e=e.filter(e=>e.path.indexOf(d)>-1)),u>0&&(e=e.filter(e=>e.size>=u)),n.length&&(e=e.filter(e=>!!n.some(t=>(0,tA.Z)(t.assets,e.path)))),e.sort((e,t)=>{let s=+(e.path.indexOf("/")>-1);return(t.path.indexOf("/")>-1)-s})},[P,n,d,u]);(0,T.useEffect)(()=>{r.all.total.files.forEach(e=>{"js"===function(e){let t=e.split(".");return t.length>1?t.pop():""}(e.path)&&b(e.path)})},[r.all.total.files]);let E=(0,T.useMemo)(()=>tf({files:N.map(e=>e.path).filter(Boolean),fileTitle(e,t){let{size:s,initial:r,path:l,content:n}=N.find(t=>t.path===e);return(0,y.jsxs)("div",{className:nC.assetBox,onClick:()=>{b(l)},children:[(0,y.jsx)(nt,{text:t,keyword:"",className:nC.fileText}),(0,y.jsxs)(e9.Z,{size:"small",className:nC.assetsTag,children:[(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(so.Z.Text,{style:{color:"#4FD233"},children:t3(s)}),(0,y.jsx)(sD.Z,{type:"vertical"}),r?(0,y.jsx)(so.Z.Text,{style:{color:"#009A9E"},children:"initial"}):null,(0,y.jsx)(sA.Z,{style:{fontSize:14,padding:0},onClick:()=>C({code:n,filePath:l})})]})]})}}),[N]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{className:"bundle-size-card",children:[(0,y.jsx)(nJ,{cwd:s,errors:t,summary:r}),(0,y.jsx)(sa.Z,{className:"bundle-size=card",tabList:ir,activeTabKey:Z,onTabChange:e=>S(e),hidden:"tree"===Z,tabProps:{size:"middle"},children:(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetSummaryBundles,children:e=>{let t=e.map(e=>{let t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dist",s=function e(t){if(!t.children||0===t.children.length)return t;let s=t;for(;s.children&&1===s.children.length&&!s.children[0].sourceSize;)s={name:s.name+"/"+s.children[0].name,children:s.children[0].children};return s.children&&(s.children=s.children.map(e)),s}(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dist",s={name:t,children:[],_map:new Map};for(let t of e){let e=t.path.split(/[\\/]/).filter(Boolean),n=s;for(let s=0;s<e.length;s++){let i=e[s];if(s===e.length-1){var r,l;n.children||(n.children=[]),n.children.push({name:i,path:t.path,sourceSize:(null==(r=t.size)?void 0:r.sourceSize)??0,bundledSize:(null==(l=t.size)?void 0:l.parsedSize)??0})}else{n._map||(n._map=new Map);let e=n._map.get(i);e||(e={name:i,children:[],_map:new Map},n.children.push(e),n._map.set(i,e)),n=e}}}return!function e(t){delete t._map,t.children&&t.children.forEach(e)}(s),s}(e,t));return!function e(t){if(!t.children||0===t.children.length)return{sourceSize:t.sourceSize??0,bundledSize:t.bundledSize??0};let s=0,r=0;for(let l of t.children){let{sourceSize:t,bundledSize:n}=e(l);s+=t,r+=n}return t.sourceSize=s,t.bundledSize=r,{sourceSize:s,bundledSize:r}}(s),s}(e.modules);return{name:e.asset.path,value:e.asset.size,children:t.children}});return(0,y.jsx)(it,{treeData:t,onChartClick:e=>{console.log("onChartClick",e)}})}})}),(0,y.jsx)(sa.Z,{hidden:"tile"===Z,tabList:ir,activeTabKey:Z,onTabChange:e=>S(e),tabProps:{size:"middle"},children:(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsxs)(sE.Z,{align:"middle",gutter:[k.BasePadding,k.BasePadding],children:[l&&l.length?(0,y.jsx)(sT.Z,{children:(0,y.jsx)(ls.Z,{mode:"multiple",value:n.map(e=>e.name),style:{minWidth:230,width:"auto",maxWidth:300},placeholder:"filter assets by entry point",onChange:e=>{i(e.map(e=>l.find(t=>t.name===e)).filter(Boolean))},allowClear:!0,onClear:()=>{i([])},children:l.map(e=>(0,y.jsx)(ls.Z.Option,{value:e.name,children:(0,y.jsx)(e9.Z,{children:(0,y.jsx)(sH,{label:e.name,value:t3(e.size),tooltip:e.name})})},e.name))})}):null,(0,y.jsx)(sT.Z,{children:(0,y.jsx)(r7,{placeholder:"search asset by keyword",onChange:e=>{c(e),m(!1)}})}),(0,y.jsx)(sT.Z,{span:6,children:(0,y.jsx)(l7.Z,{min:0,style:{width:"95%"},addonBefore:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{style:{fontSize:14,color:"inherit"},children:"Asset Size"}),(0,y.jsx)(sd.Z,{title:M("filter the output assets which size is greater than the input value"),style:{marginLeft:3},children:(0,y.jsx)(sF.Z,{style:{color:"rgba(0,0,0,.45)"}})})]}),onChange:e=>A(Number(e)),addonAfter:_("chunk")})}),(0,y.jsx)(sT.Z,{span:6,children:(0,y.jsx)(l7.Z,{min:0,style:{width:"95%"},addonBefore:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{style:{fontSize:14,color:"inherit"},children:"Module Size"}),(0,y.jsx)(sd.Z,{title:M("filter the modules which size is greater than the input value"),style:{marginLeft:3},children:(0,y.jsx)(sF.Z,{style:{color:"rgba(0,0,0,.45)"}})})]}),onChange:e=>{I(Number(e))},addonAfter:_("module")})})]}),(0,y.jsx)(sE.Z,{children:(0,y.jsx)(n5,{})}),(0,y.jsx)(sE.Z,{align:"middle",gutter:[k.BasePadding,k.BasePadding],children:(0,y.jsx)(sT.Z,{span:24,children:N.length?(0,y.jsxs)(sE.Z,{gutter:k.BasePadding,children:[(0,y.jsx)(sT.Z,{span:6,children:(0,y.jsx)(sa.Z,{title:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:M("Output Assets List")}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(sd.Z,{title:`total assets count is ${P.length}, the filtered assets count is ${N.length}`,children:(0,y.jsxs)(so.Z.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:[N.length," / ",P.length]})}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(so.Z.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:t3((0,sI.Z)(N,e=>e.size))})]}),size:"small",bodyStyle:{overflow:"scroll",height:600},children:(0,y.jsx)(th,{className:nC.assets,treeData:E,autoExpandParent:!0,defaultExpandAll:p||N.length<=20},`tree_${d}_${p}`)})}),(0,y.jsx)(sT.Z,{span:18,children:v?(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetAssetDetails,body:{assetPath:v},children:e=>(0,y.jsx)(nB,{asset:e.asset,chunks:e.chunks,modules:e.modules,height:600,moduleSizeLimit:a,root:s})}):(0,y.jsx)(sa.Z,{bodyStyle:{height:600},children:(0,y.jsx)(sr.Z,{description:(0,y.jsx)(so.Z.Text,{strong:!0,children:"Click the file path on the left to show the modules of the asset"})})})})]}):(0,y.jsx)(sr.Z,{})})})]})})]}),w]})},ii=s0({api:R.SDK.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{root:t,errors:s}=e.project;return(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!0},children:e=>(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetEntryPoints,children:r=>(0,y.jsx)(il,{cwd:t,errors:s,summary:e,entryPoints:r})})})}}),ia="BundleSize",io=R.Client.RsdoctorClientRoutes.BundleSize,id=()=>(0,y.jsx)(sE.Z,{children:(0,y.jsx)(sT.Z,{span:24,style:{marginBottom:k.BasePadding},children:(0,y.jsx)(ii,{})})});var ic=s(29997),iu=s(80160);let ih=e=>{let{style:t,onChange:s,loaderNames:r}=e,[l,n]=(0,T.useState)([]);return(0,y.jsxs)(r3.Z.Group,{compact:!0,style:t,children:[(0,y.jsxs)(sj.ZP,{style:{width:120},children:[(0,y.jsx)(ic.Z,{}),(0,y.jsx)(so.Z.Text,{children:"Loaders"})]}),(0,y.jsx)(ls.Z,{mode:"multiple",allowClear:!0,defaultValue:l,className:"loader-select",style:{width:300},popupMatchSelectWidth:300,placeholder:"select loaders",onChange:e=>{n(e),s(e)},children:r.map(e=>(0,y.jsx)(ls.Z.Option,{label:e,value:e,children:e},e))})]})},ip=e=>{let{onChange:t,layers:s}=e,[r,l]=(0,T.useState)("");return(0,y.jsxs)(r3.Z.Group,{compact:!0,children:[(0,y.jsxs)(sj.ZP,{style:{width:120},children:[(0,y.jsx)(ic.Z,{}),(0,y.jsx)(so.Z.Text,{children:"Layers"})]}),(0,y.jsx)(ls.Z,{allowClear:!0,className:"layer-select",style:{width:150},defaultValue:r,placeholder:"select layer",onChange:e=>{l(e),t(e)},children:(null==s?void 0:s.length)?null==s?void 0:s.map(e=>(0,y.jsx)(ls.Z.Option,{label:e,value:e,children:e},e)):(0,y.jsx)(y.Fragment,{})})]})},im=e=>{let{onChange:t,loaderNames:s}=e,[r,l]=(0,T.useState)([]),[n,i]=(0,T.useState)(""),[a,o]=(0,T.useState)("");return(0,T.useEffect)(()=>{t({loaders:r,filename:n,layer:a})},[r,n,a]),(0,y.jsxs)(sE.Z,{style:{marginBottom:k.BasePadding,marginLeft:10},children:[(0,y.jsx)(sT.Z,{children:(0,y.jsx)(ih,{loaderNames:s,style:{marginRight:k.BasePadding},onChange:e=>{l(e)}})}),(0,y.jsx)(sT.Z,{children:(0,y.jsx)(r7,{icon:(0,y.jsx)(iu.Z,{}),style:{marginRight:k.BasePadding},label:"Filename",placeholder:"search filename by keyword",onChange:e=>{i(e)}})}),(0,y.jsx)(sT.Z,{children:(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetLayers,children:e=>e.length?(0,y.jsx)(ip,{layers:e,onChange:e=>{o(e)}}):(0,y.jsx)(y.Fragment,{})})})]})},ix=0,ig=0,ij=e=>{let{loaders:t,cwd:s}=e,{isDark:r}=t4(),l=(0,T.useRef)(null),[n,i]=(0,T.useState)([]),a=function(e,t){let[s,r]=(0,T.useState)(e);return(0,T.useEffect)(()=>{let t=setTimeout(()=>r(e),200);return()=>clearTimeout(t)},[e,200]),s}(n,200),o=(0,T.useMemo)(()=>(0,rX.Z)(t,e=>e.loader),[t]),d=(0,T.useCallback)(e=>{let{name:r,data:l}=e,n=r.replace(" total","");if(null==l?void 0:l.ext){var i;return i=l.ext,`
|
|
31
|
-
<div class="loader-tooltip-container">
|
|
32
|
-
<div class="loader-tooltip-title">${i.loader}</div>
|
|
33
|
-
<li class="loader-tooltip-item">
|
|
34
|
-
<span>isPitch</span>
|
|
35
|
-
<span>${i.isPitch}</span>
|
|
36
|
-
</li>
|
|
37
|
-
${i.layer&&"undefined"!==i.layer?`<li class="loader-tooltip-item">
|
|
38
|
-
<span>layer</span>
|
|
39
|
-
<span>${i.layer}</span>
|
|
40
|
-
</li>`:""}
|
|
41
|
-
<li class="loader-tooltip-item">
|
|
42
|
-
<span>duration</span>
|
|
43
|
-
<span class="loader-tooltip-text-bold">${se(i.costs)}</span>
|
|
44
|
-
</li>
|
|
45
|
-
<li class="loader-tooltip-item">
|
|
46
|
-
<span>filepath</span>
|
|
47
|
-
<span>${i.resource}</span>
|
|
48
|
-
</li>
|
|
49
|
-
<li class="loader-tooltip-item">
|
|
50
|
-
<span>start</span>
|
|
51
|
-
<span class="loader-tooltip-text-bold">${rQ()(i.startAt).format("YYYY/MM/DD HH:mm:ss")}</span>
|
|
52
|
-
</li>
|
|
53
|
-
<li class="loader-tooltip-item">
|
|
54
|
-
<span>end</span>
|
|
55
|
-
<span class="loader-tooltip-text-bold">${rQ()(i.endAt).format("YYYY/MM/DD HH:mm:ss")}</span>
|
|
56
|
-
</li>
|
|
57
|
-
</div>
|
|
58
|
-
`.trim()}return function(e,t,s){let r=t=>t.loader===e,l=t.filter(r),n=l.map(e=>e.resource),i=n.filter(e=>e.includes("/node_modules/")),a=n.filter(e=>!e.startsWith(s)),o=(0,l_.Z)(l,e=>e.startAt).startAt,d=(0,lI.Z)(l,e=>e.endAt).endAt,c=ee(r,t);return`
|
|
59
|
-
<div class="loader-tooltip-container">
|
|
60
|
-
<div class="loader-tooltip-title">${e}</div>
|
|
61
|
-
<li class="loader-tooltip-item">
|
|
62
|
-
<span>files</span>
|
|
63
|
-
<span class="loader-tooltip-text-bold">${n.length}</span>
|
|
64
|
-
</li>
|
|
65
|
-
<li class="loader-tooltip-item">
|
|
66
|
-
<span>files(node_modules)</span>
|
|
67
|
-
<span class="loader-tooltip-text-bold">${i.length}</span>
|
|
68
|
-
</li>
|
|
69
|
-
<li class="loader-tooltip-item">
|
|
70
|
-
<span>files(outside the cwd)</span>
|
|
71
|
-
<span class="loader-tooltip-text-bold">${a.length}</span>
|
|
72
|
-
</li>
|
|
73
|
-
<li class="loader-tooltip-item">
|
|
74
|
-
<span>duration(estimated)</span>
|
|
75
|
-
<span class="loader-tooltip-text-bold">${se(c)}</span>
|
|
76
|
-
</li>
|
|
77
|
-
<li class="loader-tooltip-item">
|
|
78
|
-
<span>start(min)</span>
|
|
79
|
-
<span>${rQ()(o).format("YYYY/MM/DD HH:mm:ss")}</span>
|
|
80
|
-
</li>
|
|
81
|
-
<li class="loader-tooltip-item">
|
|
82
|
-
<span>end(max)</span>
|
|
83
|
-
<span>${rQ()(d).format("YYYY/MM/DD HH:mm:ss")}</span>
|
|
84
|
-
</li>
|
|
85
|
-
</div>
|
|
86
|
-
`.trim()}(n,t,s)},[]);return(0,T.useEffect)(()=>{i(Object.keys(o).map(e=>{let t=o[e]||[],{start:r,end:l}=tN(t);return(r<ix||0===ix)&&(ix=r),(l>ig||0===ig)&&(ig=l),{p:e,n:e,s:r,e:l,c:t.map(t=>({p:e,n:tg(t.resource,s),s:t.startAt,e:t.endAt,ext:t}))}}))},[o]),(0,y.jsx)(y.Fragment,{children:(null==n?void 0:n.length)?(0,y.jsx)("div",{className:["loader-chart-container",r?"loader-chart-container_dark":""].join(" ").trim(),ref:l,style:{width:"100%"},children:(0,y.jsx)(r6,{loaderData:a,formatterFn:d,chartType:r1.Loader,exts:{startTimestamp:ix,endTimestamp:ig}})}):(0,y.jsx)(sr.Z,{})})},iy=s0({api:R.SDK.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{project:t}=e,{root:s}=t,[r,l]=(0,T.useState)({filename:"",loaders:[],layer:""}),[n,i]=(0,T.useState)(0);return(0,y.jsxs)(e9.Z,{direction:"vertical",style:{width:"100%"},children:[(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetLoaderNames,children:e=>(0,y.jsx)(im,{onChange:l,loaderNames:e})}),(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetLoaderChartData,children:e=>{let t=e.filter(e=>tT(e.resource,e.loader,r.filename,r.loaders,e.layer,null==r?void 0:r.layer));return 0===n?(0,y.jsx)(ij,{loaders:t,cwd:s}):(0,y.jsx)(y.Fragment,{})}})]})}});var iv=s(15522),ib=s(77620);let iZ=R.Client.RsdoctorClientRoutes.WebpackLoaderOverall,iS=()=>{let{t:e}=(0,tS.$)();return(0,y.jsx)(sg,{title:(0,y.jsxs)(iv.Space,{align:"baseline",children:[(0,y.jsx)(iv.Typography.Title,{level:5,style:{margin:0},children:"Loader Timeline"}),(0,y.jsx)(iv.Popover,{content:(0,y.jsxs)("div",{children:[e("AsyncLoaderInfo"),(0,y.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,y.jsx)(iv.Tag,{icon:(0,y.jsx)(ib.Z,{}),color:"warning",children:"Info"})})]}),extra:(0,y.jsx)(l1,{defaultKeys:["module"]}),children:(0,y.jsx)(iy,{})})};var iC=s(1613),iw=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:12,fill:"none",viewBox:"0 0 10 12",...e,children:[(0,y.jsx)("path",{fill:"#FAAD14",fillRule:"evenodd",d:"M3.151 7.98h-1.85a.925.925 0 0 1-.924-.925V1.508c0-.511.414-.925.925-.925h7.396c.511 0 .925.414.925.925v5.547c0 .51-.414.924-.925.924H6.85V6.13a1.85 1.85 0 0 0-3.698 0v1.85Z",clipRule:"evenodd"}),(0,y.jsx)("path",{fill:"#FAAD14",d:"M4.076 9.829a.925.925 0 0 0 1.849 0V6.13a.925.925 0 0 0-1.85 0V9.83Z"}),(0,y.jsx)("path",{fill:"#FAAD14",d:"M5 11.416 7.402 8.92H2.598L5 11.416Z"})]}),iM=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,y.jsx)("rect",{width:16,height:16,fill:"#F6FFED",rx:2}),(0,y.jsx)("path",{fill:"#52C41A",fillRule:"evenodd",d:"M4.302 6.02a.925.925 0 0 0-.925.925v5.547c0 .51.414.925.925.925h7.396c.511 0 .925-.414.925-.925V6.945a.925.925 0 0 0-.925-.925H4.302Zm5.547 0H6.151v1.85a1.85 1.85 0 0 0 3.698 0V6.02Z",clipRule:"evenodd"}),(0,y.jsx)("path",{fill:"#52C41A",d:"M7.076 4.171a.925.925 0 0 1 1.849 0V7.87a.925.925 0 0 1-1.85 0V4.171Z"}),(0,y.jsx)("path",{fill:"#52C41A",d:"m8 2.583 2.402 2.497H5.598L8 2.583Z"})]}),ik=e=>(0,y.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none",viewBox:"0 0 14 14",...e,children:(0,y.jsx)("path",{fill:"#2994FF",d:"M7 10.736 1.7 6.589a.125.125 0 0 0-.201.098v1.208c0 .077.036.15.095.197l5.097 3.989a.5.5 0 0 0 .617 0l5.095-3.99a.248.248 0 0 0 .096-.196V6.687a.125.125 0 0 0-.202-.098L7 10.736Zm0-4.75L1.7 1.839a.125.125 0 0 0-.201.098v1.208c0 .077.036.15.095.197L6.692 7.33a.5.5 0 0 0 .617 0l5.095-3.99a.248.248 0 0 0 .096-.196V1.937a.125.125 0 0 0-.202-.098L7 5.986Z"})});let iP=+Date.now().toString().slice(-4)+1e3,iD=e=>{let{cwd:t,url:s,loc:r,windowId:l=iP,label:n,disabled:i,code:a=!1}=e,o=U().resolve(t,function(e){let t=e.split(" "),s="";return 1===t.length?[s]=t:[s]=t.filter(e=>U().isAbsolute(e)||(0,e7.Z)(e,"./")),s||e}(s)),{line:d,columnStart:c}=function(e){if(!e)return{line:1,column:1};let[t,s=""]=e.split(":"),[r=1,l]=s.split("-");return{line:t,columnStart:r,columnEnd:l||r}}(r);return(0,y.jsxs)("span",{style:{wordBreak:"break-all"},children:[(0,y.jsx)(so.Z.Text,{copyable:{text:o},children:(0,y.jsxs)(so.Z.Text,{code:a,onClick:()=>{i||function(e){let{file:t,line:s=1,column:r=1,windowId:l}=e,n={windowId:l},i=Object.keys(n).map(e=>{let t=n[e];return(0,sJ.Z)(t)||""===t?null:`${e}=${t}`}).filter(Boolean).join("&"),a=`vscode://file/${t}:${s}:${r}`;i&&(a+=`?${i}`),window.open(a)}({file:o,line:d,column:c,windowId:l})},style:{cursor:i?"revert":"pointer"},children:[n||eY(s),r?`:${r}`:""]})}),(0,y.jsx)("div",{style:{display:"inline-block"}})]})};var i_={loaderAnalysis:"loaderAnalysis_85b73",dividerDiv:"dividerDiv_85b73",divider:"divider_85b73",box:"box_85b73",keyword:"keyword_85b73",textBox:"textBox_85b73",text:"text_85b73",space:"space_85b73",executions:"executions_85b73",timeline:"timeline_85b73",loader:"loader_85b73",selected:"selected_85b73"};let iI=e=>{let{loader:t,resource:s,cwd:r}=e;return(0,y.jsx)(sg,{title:"Loader Details",style:{border:"none"},extra:(0,y.jsx)(ss.Z,{icon:(0,y.jsx)(iC.Z,{}),color:"default",children:rQ()(t.startAt).format("YYYY-MM-DD HH:mm:ss")}),children:(0,y.jsxs)(e9.Z,{direction:"vertical",style:{width:"100%"},children:[t.isPitch?(0,y.jsx)(so.Z.Text,{code:!0,children:"pitch"}):null,(0,y.jsxs)(nX.Z,{size:"large",bordered:!0,children:[(0,y.jsxs)(nX.Z.Item,{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"File Path"}),(0,y.jsx)("div",{children:tg(s.path,r)})]}),(0,y.jsxs)(nX.Z.Item,{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Resource Path"}),(0,y.jsx)(iD,{cwd:r,url:s.path,loc:"",disabled:!0})]}),(0,y.jsxs)(nX.Z.Item,{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Resource Query"}),(0,y.jsx)("div",{children:s.queryRaw||"-"})]}),(0,y.jsxs)(nX.Z.Item,{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Duration"}),(0,y.jsx)("div",{children:se(t.costs)})]}),(0,y.jsxs)(nX.Z.Item,{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Loader"}),(0,y.jsx)("div",{children:(0,y.jsx)(so.Z.Text,{code:!0,children:t.loader})})]}),(0,y.jsxs)(nX.Z.Item,{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Loader Index"}),(0,y.jsx)("div",{children:`${t.loaderIndex}`})]}),(0,y.jsxs)(nX.Z.Item,{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Loader Path"}),(0,y.jsx)(iD,{cwd:r,url:t.path,loc:"",disabled:!0})]}),(0,y.jsxs)(nX.Z.Item,{children:[(0,y.jsx)("div",{style:{width:180},children:(0,y.jsx)(so.Z.Text,{strong:!0,children:"Options"})}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(so.Z.Paragraph,{ellipsis:{rows:2,expandable:!0,symbol:"more"},copyable:!0,children:JSON.stringify(t.options||"-")})]})]})]})})},iA=e=>{let{data:t,cwd:s,index:r}=e,{loaders:l,resource:n}=t,[i,a]=(0,T.useState)(r||0),{theme:o}=t4(),d="light"===o,c=l[i],u=c.input||"",h=c.errors&&c.errors.length,[p,m]=(0,T.useState)("loaderDetails"),x=(0,T.useCallback)(e=>{m(e)},[]);return(0,y.jsxs)(sE.Z,{className:i_.executions,style:{height:"100%"},children:[(0,y.jsx)(sT.Z,{span:5,style:{borderRight:d?"1px solid #f0f0f0":void 0,padding:k.BasePadding},children:(0,y.jsxs)(e9.Z,{direction:"vertical",style:{width:"100%"},children:[(0,y.jsx)(sK,{text:"Executions"}),(0,y.jsx)(sz.Z,{mode:"left",style:{marginTop:k.BasePadding},children:l.map((e,t,s)=>{var r;let{loader:l,isPitch:n}=e,o=se(e.costs);return(0,y.jsxs)(sz.Z.Item,{dot:n?(0,y.jsx)(ss.Z,{style:{marginLeft:1,fontWeight:500},children:"pitch"}):(0,y.jsx)(iC.Z,{}),style:{paddingBottom:10,textAlign:"center"},children:[(0,y.jsx)(sE.Z,{align:"middle",justify:"space-between",gutter:[0,10],children:(0,y.jsx)(sT.Z,{span:24,className:i_.timeline,children:(0,y.jsx)(sd.Z,{title:l,trigger:"hover",children:(0,y.jsxs)("div",{className:`${i_.box} ${i===t?i_.selected:""}`,onClick:()=>{a(t)},style:{textAlign:"left"},children:[(0,y.jsxs)("div",{children:[(0,y.jsx)(so.Z.Text,{style:{color:"#000"},children:null==(r=o.match(/[0-9]*\.?[0-9]+/g))?void 0:r[0]})," ",(0,y.jsx)(so.Z.Text,{style:{color:"rgba(0,0,0,0.45)"},children:o.match(/[a-zA-Z]+/g)})]}),(0,y.jsx)(so.Z.Text,{style:{color:"rgba(0,0,0,0.65)"},className:i_.loader,children:l})]})})})}),t===s.length-1?null:(0,y.jsx)("div",{style:{paddingTop:10},children:(0,y.jsx)(ik,{})})]},t)})})]})}),(0,y.jsx)(sT.Z,{span:19,style:{height:"100%"},children:(0,y.jsx)(sl.Z,{type:"card",defaultActiveKey:"loaderDetails",activeKey:p,items:[{label:"Loader Props",key:"loaderProps",children:(0,y.jsx)(iI,{loader:c,resource:n,cwd:s})},{label:"Loader Details",key:"loaderDetails",children:(0,y.jsx)("div",{style:{height:"100%"},children:h?(0,y.jsxs)(sT.Z,{span:24,style:{height:"53%",minHeight:400},children:[(0,y.jsx)("div",{style:{padding:k.BasePadding,borderTop:`1px solid ${d?"#f0f0f0":"rgba(253, 253, 253, 0.12)"}`,borderBottom:`1px solid ${d?"#f0f0f0":"rgba(253, 253, 253, 0.12)"}`},children:(0,y.jsx)(sK,{text:`the error stack of [${c.loader}] ${c.isPitch?"pitch":""}`})}),(0,y.jsx)("div",{style:{height:"90%"},children:(0,y.jsx)(rL,{code:c.errors[0].message,lang:"javascript"})})]}):(0,y.jsxs)(sT.Z,{span:24,style:{height:"53%",minHeight:400},children:[(0,y.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:k.BasePadding,borderBottom:`1px solid ${d?"#f0f0f0":"rgba(253, 253, 253, 0.12)"}`},children:[(0,y.jsx)(sK,{text:(0,y.jsxs)(y.Fragment,{children:[`the result of [${c.loader}] ${c.isPitch?"pitch":""}`,!c.isPitch&&(0,y.jsxs)("span",{style:{fontWeight:400},children:["(",(0,y.jsx)(iw,{style:{verticalAlign:"middle",margin:"0 2px"}}),"Input ⟷",(0,y.jsx)(iM,{style:{verticalAlign:"middle",position:"relative",top:-2}}),"Output)"]})]})}),(0,y.jsx)("div",{style:{flex:1}})]}),c.isPitch?c.result?(0,y.jsx)("div",{style:{height:"90%"},children:(0,y.jsx)(rL,{isEmbed:!0,code:c.result,filePath:n.path})}):(0,y.jsx)(sr.Z,{description:"No loader result. If you use the Brief Mode, there will not have loader results."}):(0,y.jsx)("div",{style:{minHeight:"700px"},children:(0,y.jsx)("div",{style:{height:"40rem",overflow:"hidden"},children:c.result||u?(0,y.jsx)(rF,{isEmbed:!0,original:u,modified:c.result||"",originalFilePath:n.path,modifiedFilePath:n.path}):(0,y.jsx)(sr.Z,{description:"No loader result. If you use the Brief Mode, there will not have loader results."})})})]})})}],onChange:x})})]})},iN=e=>{let{cwd:t,filetree:s}=e,[r,l]=(0,T.useState)(!1),[n,i]=(0,T.useState)(""),[a,o]=(0,T.useState)(0),[d,c]=(0,T.useState)(null),u=(0,T.useMemo)(()=>s.filter(t=>t.loaders.some(s=>tT(t.path,s.loader,e.filename,e.loaders,t.layer,null==e?void 0:e.layer))),[e.filename,e.loaders,e.layer]),h="__RESOURCEPATH__",p=(0,T.useMemo)(()=>tf({files:u.map(e=>e.path),cwd:t,fileTitle(e,t){let{loaders:r,layer:n}=s.find(t=>t.path===e),a=[];return r.forEach((e,t)=>t>3&&a.push(e)),(0,y.jsxs)("div",{style:{wordBreak:"break-all",display:"flex",cursor:"pointer"},onClick:()=>{o(0),i(e),l(!0)},children:[(0,y.jsx)("div",{className:i_.box,children:(0,y.jsx)("div",{className:i_.keywords,children:(0,y.jsx)(nt,{text:t.replace(/\[.*?\]/g,""),keyword:""})})}),(0,y.jsx)("div",{className:i_.dividerDiv,style:{flex:1},children:(0,y.jsx)(sD.Z,{className:i_.divider,dashed:!0})}),n&&(0,y.jsx)(ss.Z,{color:"cyan",bordered:!1,children:n}),(0,y.jsxs)(e9.Z,{children:[r.slice(0,3).map((t,s)=>{let r=t.errors&&t.errors.length,n=`${e}_${t.loader}_${s}`;if(s<=3){var a;return(0,y.jsx)(sd.Z,{title:t.path,children:(0,y.jsxs)(so.Z.Text,{className:i_.textBox,style:{color:r?"#f50":"inherit"},onClick:t=>{t.stopPropagation(),i(e),o(s),l(!0)},children:[(0,y.jsx)(so.Z.Text,{className:i_.text,ellipsis:!0,children:(null==(a=t.loader.match(/([^/]+-loader)/g))?void 0:a[0])||t.loader}),(0,y.jsx)(sD.Z,{type:"vertical"}),r?(0,y.jsx)(rj.Z,{}):(0,y.jsx)(so.Z.Text,{className:i_.text,children:se(t.costs)})]})},n)}}),(null==a?void 0:a.length)?(0,y.jsx)(l8.Z,{content:(0,y.jsx)(nX.Z,{dataSource:a,renderItem:(t,s)=>{var r;let n=t.errors&&t.errors.length,a=`${e}_${t.loader}_${s+3}`;return(0,y.jsx)(nX.Z.Item,{children:(0,y.jsx)(sd.Z,{title:t.path,children:(0,y.jsx)("div",{style:{paddingBottom:5},children:(0,y.jsxs)(so.Z.Text,{className:i_.textBox,style:{color:n?"#f50":"inherit"},onClick:t=>{t.stopPropagation(),i(e),o(s),l(!0)},children:[(0,y.jsx)(so.Z.Text,{className:i_.text,ellipsis:!0,children:(null==(r=t.loader.match(/([^/]+-loader)/g))?void 0:r[0])||t.loader}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(so.Z.Text,{className:i_.text,children:se(t.costs)})]})})},a)})}}),children:(0,y.jsx)("div",{className:i_.textBox,children:(0,y.jsx)(so.Z.Text,{children:"\xb7\xb7\xb7"})})}):(0,y.jsx)(y.Fragment,{})]})]})},dirTitle:(e,t)=>(0,y.jsx)("div",{style:{display:"flex",cursor:"pointer"},children:(0,y.jsx)(nt,{text:t,keyword:""})})}),[u]);return(0,y.jsxs)(sE.Z,{style:{width:"100%",marginLeft:0},gutter:k.BasePadding,children:[(0,y.jsx)(sT.Z,{span:24,children:(0,y.jsxs)(sa.Z,{title:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Files"}),(0,y.jsxs)(so.Z.Text,{style:{fontSize:12,fontWeight:400,color:"#1C1F2399",opacity:.6},children:["Total Files: ",u.length]})]}),bodyStyle:{overflow:"auto",maxHeight:800,minHeight:"40rem",padding:14},children:[(0,y.jsx)(th,{defaultExpandedKeys:tm(p,u.length>=100?3:4,e=>!((0,ez.Z)(e,h).indexOf("/node_modules/")>-1)),treeData:p,onSelect:(e,t)=>{t.node.isLeaf||c(t.node)},selectedKeys:d?[d.key]:void 0,expandAction:"click"},`${e.loaders.join("|")}_${e.filename}`),(0,y.jsx)(sN.Z,{open:r,onClose:()=>l(!1),maskClosable:!0,width:D,zIndex:999,bodyStyle:{padding:0},children:r?(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetLoaderFileDetails,body:{path:n},children:e=>(0,y.jsx)(iA,{data:e,cwd:t,index:a})}):null})]})}),(0,y.jsx)(sN.Z,{open:!!d,onClose:()=>c(null),maskClosable:!0,width:D,zIndex:999,bodyStyle:{padding:0},children:d&&(0,y.jsx)(sE.Z,{children:(0,y.jsx)(sT.Z,{span:24,children:(0,y.jsx)(sa.Z,{title:(0,y.jsx)(sd.Z,{title:T.cloneElement(d.title,{style:{color:"#fff"}}),children:(0,y.jsxs)(so.Z.Text,{children:["Statistics of",d.title]})}),children:(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetLoaderFolderStatistics,body:{folder:d[h]},children:e=>(0,y.jsx)(lL.Z,{style:{width:"100%",maxHeight:800,height:"40rem",overflowY:"scroll",wordBreak:"break-all"},pagination:!1,bordered:!0,rowKey:e=>e.loader,columns:[{title:"Loader Name",dataIndex:"loader"},{title:"Files",dataIndex:"files"},{title:"Total Duration",dataIndex:"costs",render:e=>(0,y.jsx)(so.Z.Text,{strong:!0,children:se(e)}),sorter:(e,t)=>e.costs-t.costs,defaultSortOrder:"descend",sortDirections:["descend","ascend"]}],dataSource:e})})})})})})]})},iE=s0({api:R.SDK.ServerAPI.API.LoadDataByKey,body:{key:"root"},responsePropName:"cwd",Component:e=>{let{cwd:t}=e,[s,r]=(0,T.useState)({filename:"",loaders:[],layer:""});return(0,y.jsx)(t2.Consumer,{children:e=>(0,y.jsx)(rx.ZP,{locale:tL(e.locale),theme:{token:{padding:16,fontSize:14}},children:(0,y.jsxs)("div",{className:i_.loaderAnalysis,children:[(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetLoaderNames,children:e=>(0,y.jsx)(im,{onChange:e=>r(e),loaderNames:e})}),(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetLoaderFileTree,children:e=>(0,y.jsx)(iN,{filename:s.filename,filetree:e,loaders:s.loaders,layer:s.layer,cwd:t})})]})})})}}),iT=R.Client.RsdoctorClientRoutes.WebpackLoaderAnalysis,{useToken:iR}=tr.Z,iz=()=>{let{token:e}=iR();return(0,y.jsx)(sg,{title:(0,y.jsxs)(e9.Z,{align:"baseline",children:[(0,y.jsx)(so.Z.Title,{level:5,style:{margin:0},children:"Loader Analysis"}),(0,y.jsx)(l8.Z,{content:(0,y.jsxs)("div",{children:[(0,v.t)("AsyncLoaderInfo"),(0,y.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,v.t)("Details")})]}),title:"Info",children:(0,y.jsx)(ss.Z,{icon:(0,y.jsx)(ib.Z,{}),color:"warning",children:"Info"})})]}),extra:(0,y.jsx)(l1,{defaultKeys:["module","resolve"]}),bodyStyle:{paddingTop:e.padding,height:800},children:(0,y.jsx)(iE,{})})};var iL=s(75589),iB=s(64935);let iO=R.Client.RsdoctorClientRoutes.WebpackPlugins,iF=()=>{let[e,t]=(0,T.useState)([]),[s,r]=(0,T.useState)([]);return(0,y.jsx)("div",{children:(0,y.jsx)(sa.Z,{title:"Plugins Overall",bodyStyle:{paddingTop:k.BasePadding/3},extra:(0,y.jsx)(l1,{defaultKeys:["plugins"]}),children:(0,y.jsxs)(e9.Z,{direction:"vertical",style:{width:"100%",padding:"0 30px"},children:[(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetPluginSummary,children:e=>{let{hooks:s,tapNames:l}=e;return(0,y.jsxs)(e9.Z,{style:{marginBottom:k.BasePadding/2},children:[(0,y.jsxs)(r3.Z.Group,{compact:!0,children:[(0,y.jsxs)(sj.ZP,{children:[(0,y.jsx)(iL.Z,{}),(0,y.jsx)(so.Z.Text,{children:"Plugin Tap Names"})]}),(0,y.jsx)(ls.Z,{mode:"multiple",allowClear:!0,className:"plugin-select",style:{width:300},popupMatchSelectWidth:!0,onChange:e=>{t(e)},children:l.map(e=>(0,y.jsx)(ls.Z.Option,{label:e,value:e,children:e},e))})]}),(0,y.jsxs)(r3.Z.Group,{compact:!0,children:[(0,y.jsxs)(sj.ZP,{children:[(0,y.jsx)(iB.Z,{}),(0,y.jsx)(so.Z.Text,{children:"Hooks"})]}),(0,y.jsx)(ls.Z,{mode:"multiple",allowClear:!0,className:"plugin-select",style:{width:300},popupMatchSelectWidth:!0,onChange:e=>{r(e)},children:s.map(e=>(0,y.jsx)(ls.Z.Option,{label:e,value:e,children:e},e))})]})]})}}),(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetPluginData,body:{hooks:s,tapNames:e},children:e=>(0,y.jsx)(lB,{dataSource:e})})]})})})};var i$=s(12993),iG=s(87541),iK=s(32719);let iW=e=>{let{filepath:t,before:s,after:r,resolvers:l}=e,[n,i]=(0,T.useState)(!1);return(0,y.jsxs)(T.Fragment,{children:[(0,y.jsx)(sT.Z,{flex:1,children:(0,y.jsx)(sa.Z,{title:"Resolve Diff Viewer",styles:{body:{padding:0,overflow:"hidden"}},children:(0,y.jsx)(rF,{style:{height:785},isEmbed:!0,originalFilePath:t,modifiedFilePath:t,original:s,modified:r})})}),(0,y.jsx)(sT.Z,{span:n?2:7,children:(0,y.jsx)(sa.Z,{title:n?"...":"Resolve Details",extra:(0,y.jsx)(sj.ZP,{onClick:()=>i(!n),size:"small",icon:n?(0,y.jsx)(i$.Z,{}):(0,y.jsx)(iG.Z,{})}),style:n?{width:80}:void 0,children:n?null:(0,y.jsx)(lL.Z,{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,y.jsx)(so.Z.Text,{copyable:!0,children:(0,y.jsx)(so.Z.Text,{code:!0,strong:!0,children:t.request})})},{title:"Duration",width:80,render:(e,t)=>(0,y.jsx)(so.Z.Text,{strong:!0,children:se(t.costs)}),sorter:(e,t)=>e.costs-t.costs,sortDirections:["descend","ascend"]},{title:"Resolve Result",render:(e,t)=>t.result?(0,y.jsx)(so.Z.Text,{copyable:!0,children:t.result}):(0,y.jsx)(rj.Z,{style:{color:"#f50"}})}],dataSource:l})})})]})},iH=e=>{let{resolver:t,cwd:s}=e,[r,l]=(0,T.useState)(""),n="/node_modules/",i=(0,T.useMemo)(()=>(0,iK.Z)(t,e=>e.issuerPath).filter(Boolean),[t]),a=(0,T.useMemo)(()=>i.filter(t=>!e.filename||t.indexOf(e.filename)>-1),[e.filename,i]),o=a.length&&a.every(e=>e.indexOf(n)>-1),d=(0,T.useMemo)(()=>tf({files:a.length?a:i,cwd:s,fileTitle:(e,t)=>(0,y.jsx)("div",{onClick:()=>l(e),children:t})}),[e.filename]);return(0,y.jsxs)(sE.Z,{justify:"start",align:"top",wrap:!1,gutter:k.BasePadding,children:[(0,y.jsx)(sT.Z,{span:7,children:(0,y.jsx)(sa.Z,{title:"Files",children:(0,y.jsx)(th,{style:{width:"100%",height:735,overflow:"scroll"},treeData:d,defaultExpandedKeys:tm(d,o?1:4,o?void 0:e=>{let t=(0,ez.Z)(e,"__RESOURCEPATH__").indexOf(n)>-1;return!!(a.length&&a.every(e=>e.indexOf(n)>-1))||!t})},`tree_${e.filename}`)})}),r&&(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetResolverFileDetails,body:{filepath:r},children:e=>(0,y.jsx)(iW,{...e})})]})},iV=s0({api:R.SDK.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{project:t}=e,{root:s}=t,[r,l]=(0,T.useState)("");return(0,y.jsxs)("div",{style:{width:"100%"},children:[(0,y.jsx)(e9.Z,{style:{marginTop:k.BasePadding,marginBottom:k.BasePadding},children:(0,y.jsx)(r7,{icon:(0,y.jsx)(iu.Z,{}),label:"Filename",placeholder:"search filename by keyword",onChange:e=>l(e)})}),(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetResolverFileTree,children:e=>(0,y.jsx)(iH,{filename:r,resolver:e,cwd:s})})]})}}),iU=R.Client.RsdoctorClientRoutes.ModuleResolve,iq=()=>(0,y.jsx)("div",{children:(0,y.jsx)(sa.Z,{title:"Webpack Resolver Analysis",extra:(0,y.jsx)(l1,{defaultKeys:["resolve","resolveLoader"]}),bodyStyle:{paddingTop:0},children:(0,y.jsx)(iV,{})})});var iY=s(28602);let iJ=R.Client.RsdoctorClientRoutes.RuleIndex,iQ=()=>{let e=tP()[R.Rule.RsdoctorRuleClientConstant.UrlQueryForErrorCode]||"",[t,s]=(0,T.useState)(R.Rule.RuleErrorMap[e]),r=(0,sQ.Z)(R.Rule.RuleErrorMap);return(0,T.useEffect)(()=>{window.scrollTo({top:0})},[]),(0,y.jsxs)(sE.Z,{gutter:k.BasePadding/2,children:[(0,y.jsx)(sT.Z,{span:8,children:(0,y.jsx)(sa.Z,{title:(0,y.jsx)(sK,{text:"list of the error codes."}),bordered:!0,children:(0,y.jsx)(e9.Z,{direction:"vertical",children:r.map((e,r)=>(0,y.jsxs)(e9.Z,{style:{marginTop:0===r?0:k.BasePadding/2,cursor:"pointer"},onClick:()=>s(e),align:"center",children:[(0,y.jsx)(rg.Z,{status:"default"}),(0,y.jsx)(so.Z.Text,{code:!0,children:(0,y.jsx)("a",{children:e.code})}),(0,y.jsx)(so.Z.Text,{style:{color:t&&t.code===e.code?"#1890ff":void 0},children:e.title})]},e.code))})})}),(0,y.jsx)(sT.Z,{span:16,children:t?(0,y.jsx)(sa.Z,{title:(0,y.jsxs)(sE.Z,{justify:"space-between",children:[(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{code:!0,children:t.code}),(0,y.jsx)(so.Z.Text,{children:t.title})]}),(0,y.jsx)("div",{children:(0,y.jsx)(ss.Z,{children:t.category})})]}),bodyStyle:{paddingTop:0},bordered:!0,children:(0,y.jsx)(so.Z.Paragraph,{children:"markdown"===t.type?(0,y.jsx)(iY.UG,{children:t.description}):(0,y.jsx)(so.Z.Text,{children:t.description})})}):(0,y.jsx)(sa.Z,{title:"This page lists all the error codes emitted by the Rsdoctor.",bordered:!0,children:(0,y.jsx)(so.Z.Text,{children:"click the error code in left bar to show more details."})})})]})};var iX=s(81678),i0=s(25516);class i1{isEmpty(){return i1.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return i1.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber)&&!(t.lineNumber>e.endLineNumber)&&(t.lineNumber!==e.startLineNumber||!(t.column<e.startColumn))&&(t.lineNumber!==e.endLineNumber||!(t.column>e.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumber<e.startLineNumber)&&!(t.lineNumber>e.endLineNumber)&&(t.lineNumber!==e.startLineNumber||!(t.column<=e.startColumn))&&(t.lineNumber!==e.endLineNumber||!(t.column>=e.endColumn))}containsRange(e){return i1.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber)&&!(t.endLineNumber<e.startLineNumber)&&!(t.startLineNumber>e.endLineNumber)&&!(t.endLineNumber>e.endLineNumber)&&(t.startLineNumber!==e.startLineNumber||!(t.startColumn<e.startColumn))&&(t.endLineNumber!==e.endLineNumber||!(t.endColumn>e.endColumn))}strictContainsRange(e){return i1.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber)&&!(t.endLineNumber<e.startLineNumber)&&!(t.startLineNumber>e.endLineNumber)&&!(t.endLineNumber>e.endLineNumber)&&(t.startLineNumber!==e.startLineNumber||!(t.startColumn<=e.startColumn))&&(t.endLineNumber!==e.endLineNumber||!(t.endColumn>=e.endColumn))}plusRange(e){return i1.plusRange(this,e)}static plusRange(e,t){let s,r,l,n;return t.startLineNumber<e.startLineNumber?(s=t.startLineNumber,r=t.startColumn):t.startLineNumber===e.startLineNumber?(s=t.startLineNumber,r=Math.min(t.startColumn,e.startColumn)):(s=e.startLineNumber,r=e.startColumn),t.endLineNumber>e.endLineNumber?(l=t.endLineNumber,n=t.endColumn):t.endLineNumber===e.endLineNumber?(l=t.endLineNumber,n=Math.max(t.endColumn,e.endColumn)):(l=e.endLineNumber,n=e.endColumn),new i1(s,r,l,n)}intersectRanges(e){return i1.intersectRanges(this,e)}static intersectRanges(e,t){let s=e.startLineNumber,r=e.startColumn,l=e.endLineNumber,n=e.endColumn,i=t.startLineNumber,a=t.startColumn,o=t.endLineNumber,d=t.endColumn;return(s<i?(s=i,r=a):s===i&&(r=Math.max(r,a)),l>o?(l=o,n=d):l===o&&(n=Math.min(n,d)),s>l||s===l&&r>n)?null:new i1(s,r,l,n)}equalsRange(e){return i1.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return i1.getEndPosition(this)}static getEndPosition(e){return new i5(e.endLineNumber,e.endColumn)}getStartPosition(){return i1.getStartPosition(this)}static getStartPosition(e){return new i5(e.startLineNumber,e.startColumn)}toString(){return`[${this.startLineNumber},${this.startColumn} -> ${this.endLineNumber},${this.endColumn}]`}setEndPosition(e,t){return new i1(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new i1(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return i1.collapseToStart(this)}static collapseToStart(e){return new i1(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return i1.collapseToEnd(this)}static collapseToEnd(e){return new i1(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new i1(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return new i1(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new i1(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber)&&(e.endLineNumber!==t.startLineNumber||!(e.endColumn<t.startColumn))&&!(t.endLineNumber<e.startLineNumber)&&(t.endLineNumber!==e.startLineNumber||!(t.endColumn<e.startColumn))}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber)&&(e.endLineNumber!==t.startLineNumber||!(e.endColumn<=t.startColumn))&&!(t.endLineNumber<e.startLineNumber)&&(t.endLineNumber!==e.startLineNumber||!(t.endColumn<=e.startColumn))}static compareRangesUsingStarts(e,t){if(e&&t){let s=0|e.startLineNumber,r=0|t.startLineNumber;if(s===r){let s=0|e.startColumn,r=0|t.startColumn;if(s===r){let s=0|e.endLineNumber,r=0|t.endLineNumber;return s===r?(0|e.endColumn)-(0|t.endColumn):s-r}return s-r}return s-r}return!!e-!!t}static compareRangesUsingEnds(e,t){if(e.endLineNumber===t.endLineNumber)return e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn;return e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}toJSON(){return this}constructor(e,t,s,r){e>s||e===s&&t>r?(this.startLineNumber=s,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=s,this.endColumn=r)}}class i5{with(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lineNumber,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.column;return e===this.lineNumber&&t===this.column?this:new i5(e,t)}delta(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.with(this.lineNumber+e,this.column+t)}equals(e){return i5.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return i5.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column}isBeforeOrEqual(e){return i5.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column}static compare(e,t){let s=0|e.lineNumber,r=0|t.lineNumber;return s===r?(0|e.column)-(0|t.column):s-r}clone(){return new i5(this.lineNumber,this.column)}toString(){return`(${this.lineNumber},${this.column})`}static lift(e){return new i5(e.lineNumber,e.column)}static isIPosition(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column}toJSON(){return{lineNumber:this.lineNumber,column:this.column}}constructor(e,t){this.lineNumber=e,this.column=t}}var i2=s(55755);let i4=rN();function i6(e){let{module:t,moduleGraph:s,ranges:r,toLine:l,setEditorData:n,source:i}=e,a=(0,T.useRef)(),o=(0,T.useRef)([]),d=(0,T.useRef)([]),c=(0,T.useRef)(),u=(0,T.useRef)(!1),[h,p]=(0,T.useState)("");return((0,T.useEffect)(()=>{let{isPreferSource:e}=t;u.current=!0,p(i.source||e?i.source:i.transformed),setTimeout(()=>{var e,r;d.current=(null==(r=a.current)||null==(e=r.getModel())?void 0:e.deltaDecorations(d.current,function(e,t){let s=t.getModuleGraphModule(e).getOwnExports(),r=s.map(e=>e.variable).filter(e=>!!e);if(0===s.length&&0===r.length)return[];let{isPreferSource:l}=e;return r.map(e=>{let t=l?e.identifier.position.source:e.identifier.position.transformed,s=t&&rT(t,i1);if(t&&s)return{range:s,options:{stickiness:1,inlineClassName:"tree-shaking-statement-declaration-identifier",isWholeLine:!1,showIfCollapsed:!0,hoverMessage:{supportHtml:!0,supportThemeIcons:!0,isTrusted:!0,value:function(e){let t=e.getExportInfo();if(!t)return"Can not find SideEffect info.";let s=t.getSideEffects();if(0===s.length)return"Have no sideEffect.";let r=`Used **${s.length}** times:
|
|
87
|
-
|
|
88
|
-
<div data-code="tree-shaking-hover">
|
|
89
|
-
<li>`;for(let e of s){var l,n;if(!e)continue;let{identifier:t,module:s}=e;if(!s)continue;let{id:i,isPreferSource:a}=s,o=t.getLineCode();r+=`
|
|
90
|
-
<ol>
|
|
91
|
-
${l=a?t.position.source:t.position.transformed,n=function(e,t){let{path:s,isPreferSource:r}=t,l=r?e.position.source.start:e.position.transformed.start,n=`:${l.line??1}:${l.column??0}`;return s.length<=30?`${s}${n}`:`...${s.substring(s.length-30)}${n}`}(t,s),`<a data-href="data-module=${i}&data-range=${encodeURIComponent(JSON.stringify(l))}">${n}</a>`}
|
|
92
|
-
${o?`<pre>${(0,i0.Z)(o)}</pre>`:""}
|
|
93
|
-
</ol>`}return r+"\n</li></div>"}(e)}}}}).filter(e=>!!e)}(t,s)))??[]},200)},[t,i]),(0,T.useEffect)(()=>{function e(){var e;let t=null==(e=a.current)?void 0:e.getModel();t&&(o.current=t.deltaDecorations(o.current,r.map(e=>({range:rT(e,i1),options:{stickiness:1,inlineClassName:"tree-shaking-statement-side-effect",isWholeLine:!1,showIfCollapsed:!0}}))),a.current&&"number"==typeof l&&c.current!==l&&(c.current=l,a.current.revealLine(l,0)))}u?setTimeout(e,300):e(),u.current=!1},[r,l]),(0,T.useEffect)(()=>{let e=e=>{let t=function(e){if("a"!==e.tagName.toLocaleLowerCase())return;let t=e.getAttribute("data-href")??"",s={module:-1,range:{start:{line:1,column:0},end:{line:1,column:0}}};for(let e of t.split("&")){let[t,r]=e.split("=");if("data-module"===t){s.module=Number.parseInt(r,10);continue}"data-range"===t&&(s.range=JSON.parse(decodeURIComponent(r)))}return s}(e.target);if(t){let e=s.getModuleById(t.module);e&&n(e,[t.range],t.range.start.line)}};return document.body.addEventListener("click",e),()=>{document.body.removeEventListener("click",e)}},[]),t)?(0,y.jsx)(sa.Z,{title:(0,y.jsx)(sd.Z,{title:t.path,children:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:U().basename(t.path)}),(0,y.jsx)(sF.Z,{})]})}),className:"tree-shaking-editor",children:(0,y.jsx)(rP.ZP,{theme:"vs-dark",language:rI(t.path),value:h,loading:(0,y.jsx)(i2.Z,{style:{fontSize:30}}),options:i4,onMount:e=>{a.current=e}})}):(0,y.jsx)("div",{children:"请选择要查看的模块"})}function i3(){return(0,y.jsx)(sa.Z,{title:"Tree Shaking Analysis",bodyStyle:{paddingTop:0},className:"tree-shaking-page",children:(0,y.jsx)(sr.Z,{style:{marginTop:30}})})}var i7=s(41857),i9=s.n(i7);function i8(e,t){if(!e)return(0,y.jsx)("div",{children:"Can not find declaration."});let{module:s}=e,r=s.isPreferSource?e.position.source:e.position.transformed;return(0,y.jsx)(sd.Z,{title:`${s.path}, line ${r.start.line}`,children:(0,y.jsx)(sj.ZP,{type:"link",onClick:()=>t(s,[r],r.start.line),children:"Move To"})})}function ae(e){let[t,s]=(0,T.useState)(""),[r,l]=(0,T.useState)(""),n=(0,T.useRef)(null),i=(e,t,r)=>{t(),s(e[0]),l(r)};return{filterDropdown:t=>{let{setSelectedKeys:r,selectedKeys:l,confirm:a,clearFilters:o,close:d}=t;return(0,y.jsxs)("div",{style:{padding:8},onKeyDown:e=>e.stopPropagation(),children:[(0,y.jsx)(r3.Z,{ref:n,placeholder:`Search ${e}`,value:l[0],onChange:e=>r(e.target.value?[e.target.value]:[]),onPressEnter:()=>i(l,a,e),style:{marginBottom:8,display:"block"}}),(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(sj.ZP,{type:"primary",onClick:()=>i(l,a,e),icon:(0,y.jsx)(n0.Z,{}),size:"small",style:{width:90},children:"Search"}),(0,y.jsx)(sj.ZP,{onClick:()=>o&&void(o(),s("")),size:"small",style:{width:90},children:"Reset"}),(0,y.jsx)(sj.ZP,{type:"link",size:"small",onClick:d,children:"close"})]})]})},filterIcon:e=>(0,y.jsx)(n0.Z,{style:{color:e?"#1890ff":void 0}}),onFilter:(t,s)=>s[e].toString().toLowerCase().includes(t.toLowerCase()),render:s=>r===e?(0,y.jsx)(i9(),{highlightStyle:{backgroundColor:"#ffc069",padding:0},searchWords:[t],autoEscape:!0,textToHighlight:s?s.toString():""}):s}}let at=e=>{let{module:t,moduleGraph:s,setEditorData:r}=e,l=(0,T.useMemo)(()=>s.getModuleGraphModule(t).getSideEffects(),[t]),n=l.map((e,s)=>{let{variable:r,name:l,identifier:n}=e;return{key:s,name:l,identifier:t.isPreferSource?n.position.source:n.position.transformed,declaration:null==r?void 0:r.identifier}}).sort((e,t)=>e.name===t.name?e.identifier.start.line>t.identifier.start.line?1:-1:e.name>t.name?1:-1).reduce((e,t)=>{let s=e[e.length-1];return s&&s.name===t.name?(s.children||(s.children=[]),s.children.push(t)):e.push(t),e},[]),i=[{title:"Name",dataIndex:"name",key:"name",align:"center",...ae("name")},{title:"SideEffect",dataIndex:"identifier",key:"identifier",align:"center",render:e=>(0,y.jsx)(sd.Z,{title:`Current File line ${e.start.line}`,children:(0,y.jsx)(sj.ZP,{type:"link",onClick:()=>r(t,[e],e.start.line),children:"Move To"})})},{title:"Declaration",dataIndex:"declaration",key:"declaration",align:"center",render:e=>i8(e,r)}],a=(0,y.jsx)(T.Fragment,{children:(0,y.jsxs)(e9.Z,{style:{fontWeight:400},children:["Import",(0,y.jsx)(so.Z.Text,{strong:!0,children:n.length}),"variables",(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(so.Z.Text,{strong:!0,children:l.length}),"sideEffects"]})});return(0,y.jsx)(sg,{style:{marginBottom:10},title:a,className:"tree-shaking-export-table",children:(0,y.jsx)(lL.Z,{size:"small",dataSource:n,columns:i,pagination:!1,scroll:{y:600}})})},as=e=>{let{module:t,moduleGraph:s,setEditorData:r}=e,l=(0,T.useMemo)(()=>s.getModuleGraphModule(t).getExports(),[t]),n=l.filter(e=>0===e.getSideEffects().length),i=(0,y.jsxs)(T.Fragment,{children:[(0,y.jsxs)(e9.Z,{style:{fontWeight:400},children:["Export",(0,y.jsx)(so.Z.Text,{strong:!0,children:l.length})]}),l.length>0?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsxs)(so.Z.Text,{style:{fontWeight:400},code:!0,children:[(0,y.jsx)(so.Z.Text,{children:"Unused"}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(so.Z.Text,{strong:!0,children:n.length})]}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsxs)(so.Z.Text,{style:{fontWeight:400},code:!0,children:[(0,y.jsx)(so.Z.Text,{children:"Used"}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(so.Z.Text,{strong:!0,children:l.length-n.length})]})]}):""]}),a=l.map((e,t)=>{let{variable:s}=e;return{key:t,name:e.name,declaration:null==s?void 0:s.identifier,used:e.getSideEffects().map(e=>{let{module:t,identifier:s}=e,r=(null==t?void 0:t.isPreferSource)?s.position.source:s.position.transformed;if(t&&r)return{module:t,range:r}}).filter(eJ)}}),o=[{title:"Name",dataIndex:"name",key:"name",align:"center",...ae("name")},{title:"Declaration",dataIndex:"declaration",key:"declaration",align:"center",render:e=>i8(e,r)},{title:"Info",dataIndex:"used",key:"used",align:"center",sorter:(e,t)=>e.used.length-t.used.length,sortDirections:["descend","ascend"],render:e=>(0,y.jsxs)("span",{children:["Used ",e.length," times"]})}];return(0,y.jsx)(sg,{title:i,className:"tree-shaking-export-table",children:(0,y.jsx)(lL.Z,{size:"small",dataSource:a,columns:o,pagination:!1,scroll:{y:600},expandable:{expandedRowRender:e=>(0,y.jsxs)("div",{className:"tree-shaking-side-effect-list",children:[(0,y.jsx)(so.Z.Text,{children:"List of SideEffect:"}),e.used.map(e=>{let{module:t,range:s}=e;return(0,y.jsx)(sd.Z,{title:`${t.path}:${s.start.line}`,children:(0,y.jsx)(sj.ZP,{className:"tree-shaking-side-effect-list-item",type:"link",onClick:()=>{r(t,[s],s.start.line)},children:`${function(e){let t="",s=e;for(let e=0;e<3;e++)t=t?`${U().basename(s)}/${t}`:U().basename(s),s=U().dirname(s);return`...${t}`}(t.path)}:${s.start.line}`})},t.id)})]}),rowExpandable:e=>e.used.length>0}})})},ar=e=>"side-effect"===e.kind?(0,y.jsx)(at,{...e}):(0,y.jsx)(as,{...e}),al=R.Client.RsdoctorClientRoutes.TreeShaking,an=function(e,t,s){let r=e();return function(){let[l,n]=(0,T.useState)(),[i,a]=(0,T.useState)(S.Pending),[o,d]=(0,T.useState)({}),{loader:c}=e3(l);function u(e){return e.then(e=>{n(e)}).catch(()=>{a(S.Fail)})}function h(e){e&&Promise.all(t.map(t=>{let[s]=t;return e.loadData(s)})).then(e=>{d(e.reduce((e,s,r)=>{let[l,n]=t[r];return e[n]=s,e},{})),a(S.Success)}).catch(e=>{console.error(e),a(S.Fail)})}return((0,T.useEffect)(()=>{u(r).then(()=>{h(c)})},[c]),i===S.Pending)?(0,y.jsx)(sV.Z,{active:!0}):i===S.Fail?(0,y.jsx)(sU,{retry:()=>{a(S.Pending),r.then(()=>{h(c)}).catch(()=>{u(e())})}}):(0,y.jsx)(s,{...o})}}(e1,[["moduleGraph","data"],["root","cwd"]],e=>{var t;let{data:s,cwd:r}=e,l=(0,T.useMemo)(()=>t1.fromData(s),[s]);if(0===l.size())return(0,y.jsx)(i3,{});let[n,i]=(0,T.useState)(""),[a,o]=(0,T.useState)(1),[d,c]=(0,T.useState)([]),[u,h]=(0,T.useState)("side-effect"),p=(0,T.useMemo)(()=>l.getModules().filter(e=>e.kind===R.SDK.ModuleKind.Normal&&U().basename(e.path).includes(n)),[n]),m=(0,T.useMemo)(()=>p.find(e=>e.isEntry),[]),[x,f]=(0,T.useState)(m||(null==p?void 0:p.length)&&(null==p?void 0:p[0])),g=(t=e=>{j(p.find(t=>t.path===e),[])},(0,T.useMemo)(()=>tf({files:p.map(e=>e.path),cwd:r,fileTitle(e,s){let r=l.getModules().find(t=>t.path===e&&t.kind===tV.kind.Normal),n=l.getModuleGraphModule(r),i=n.getExports().filter(e=>0===e.getSideEffects().length);return(0,y.jsxs)(e9.Z,{style:{wordBreak:"break-all"},children:[(0,y.jsx)(nt,{text:s,keyword:e,onClick:()=>t(e)}),n.dynamic?(0,y.jsx)(ss.Z,{color:"cyan",children:"dynamic"}):"",i.length>0?(0,y.jsxs)(ss.Z,{color:"green",children:[i.length," Unused"]}):""]})}}),[n,x])),j=(e,t,s)=>{f(e),c(t.slice()),eR(s)&&o(s)};return(0,y.jsxs)(sa.Z,{title:"Tree Shaking Analysis",bodyStyle:{paddingTop:0},className:"tree-shaking-page",children:[(0,y.jsxs)(sE.Z,{justify:"space-between",align:"middle",style:{marginBottom:k.BasePadding,marginTop:k.BasePadding},children:[(0,y.jsx)(r7,{icon:(0,y.jsx)(iu.Z,{}),width:400,label:"FileName",placeholder:"search filename by keyword",style:{width:"auto"},onChange:e=>i(e)}),(0,y.jsxs)(iX.ZP.Group,{value:u,onChange:e=>{let{target:t}=e;return h(t.value)},children:[(0,y.jsx)(iX.ZP.Button,{value:"side-effect",children:"SideEffects"}),(0,y.jsx)(iX.ZP.Button,{value:"export",children:"Export Variables"})]})]}),(0,y.jsxs)(sE.Z,{justify:"space-between",align:"top",wrap:!1,gutter:[k.BasePadding,k.BasePadding],children:[(0,y.jsx)(sT.Z,{span:7,children:(0,y.jsx)(sa.Z,{title:`Total Files: ${p.length}`,className:"tree-shaking-files-box",children:(0,y.jsx)(th,{style:{height:"80%"},className:"tree-shaking-files",selectedKeys:x?[x.path]:[],defaultExpandedKeys:tm(g,3,e=>!((0,ez.Z)(e,"__RESOURCEPATH__").indexOf("/node_modules/")>-1)),treeData:g,expandAction:"click"})})}),(0,y.jsx)(sT.Z,{span:9,children:(0,y.jsx)(sX,{api:R.SDK.ServerAPI.API.GetModuleCodeByModuleId,body:{moduleId:x.id},children:e=>(0,y.jsx)(i6,{module:x,moduleGraph:l,ranges:d,toLine:a,setEditorData:j,source:e})})}),(0,y.jsx)(sT.Z,{flex:1,children:(0,y.jsx)(ar,{kind:u,setEditorData:j,module:x,moduleGraph:l})})]})]})});var ai=s(46623),aa=s(54556),ao=s(23813),ad=s(17115);let ac=e=>{let{file:t,data:s}=e,[r,l]=(0,T.useState)(s[0].group),n=s.find(e=>e.group===r);return(0,y.jsxs)(sE.Z,{wrap:!0,gutter:[k.BasePadding,k.BasePadding],style:{height:"100%",alignContent:"flex-start"},children:[s.length>1?(0,y.jsx)(sT.Z,{span:24,children:(0,y.jsx)(sc.Z,{value:r,options:s.map(e=>e.group),onChange:e=>l(e)})}):null,n?(0,y.jsxs)(T.Fragment,{children:[(0,y.jsx)(sT.Z,{span:24,children:(0,y.jsxs)(so.Z.Text,{strong:!0,children:[n.baselineTitle||"Baseline"," ⟷"," ",n.currentTitle||"Current"]})}),(0,y.jsx)(sT.Z,{span:24,children:(0,y.jsx)(rF,{originalFilePath:t,modifiedFilePath:t,original:n.baseline||"",modified:n.current||""})})]},r):null]})},au=e=>{let{text:t="View Changes",...s}=e;return(0,y.jsx)(s7,{text:t,buttonProps:{size:"small",icon:(0,y.jsx)(ad.Z,{})},drawerProps:{destroyOnClose:!0,title:`Content diff for "${s.file}"`},children:(0,y.jsx)(ac,{...s})})};var ah=((m=ah||{}).New="New",m.Changed="Changed",m.Deleted="Deleted",m.NotChanged="Not Changed",m),ap=((x=ap||{}).Name="Sorted by Name",x.Size="Sorted by Size",x.Delta="Sorted by Delta",x);let am=(e,t,s,r)=>(0,y.jsx)(y.Fragment,{children:t-e==0?(0,y.jsx)(y.Fragment,{}):(0,y.jsxs)(so.Z.Text,{strong:!0,style:{color:s===R.Client.RsdoctorClientDiffState.Up?P.Red:P.Green,...r},children:[s===R.Client.RsdoctorClientDiffState.Up?"+":"-",t3(Math.abs(t-e))]})}),ax=/[a-fA-F0-9]{20,}/,af=(e,t,s)=>{let r=s?(e,s)=>{var r,l,n,i;return((null==(r=e.current)?void 0:r.size[t])||0)-((null==(l=e.baseline)?void 0:l.size[t])||0)-((null==(n=s.current)?void 0:n.size[t])||0)+((null==(i=s.baseline)?void 0:i.size[t])||0)}:(s,r)=>{var l,n;return((null==(l=s[e])?void 0:l.size[t])||0)-((null==(n=r[e])?void 0:n.size[t])||0)};return{width:200,sorter:(e,t)=>r(e,t),render:(s,r)=>{var l,n;if(!r[e])return"-";let i=r[e].size[t];return(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:t3(i)}),"current"===e?am((null==(l=r.baseline)?void 0:l.size[t])||0,i,((null==(n=r.baseline)?void 0:n.size[t])||0)>i?R.Client.RsdoctorClientDiffState.Down:R.Client.RsdoctorClientDiffState.Up):null]})}}},ag=(e,t,s)=>{let[r,l]=(0,T.useState)(!1),n="baseline"===e;return{title:()=>{let r=n?t:s,l=(0,sG.Z)(e),i=eD(t,s);return(0,y.jsxs)("div",{children:[(0,y.jsx)(so.Z.Text,{children:l}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(sd.Z,{title:(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:[l," modules is ",r]}),n?null:(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["Percent is ",t7(i.percent)]})]}),children:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{type:"secondary",style:{fontSize:10,fontWeight:400},children:r}),(0,y.jsx)(sF.Z,{})]})})]})},children:[{title:"Source Size",...af(e,"sourceSize",r)},{title:"Parsed Size",defaultSortOrder:n?void 0:"descend",...af(e,"parsedSize",r)}],filterSearch:!0,filters:[{text:"Show Changed",value:ah.NotChanged},{text:"Show All",value:"All"}],onFilter:(e,t)=>(e===ah.NotChanged?l(!0):l(!1),e!==ah.NotChanged||ay(t)!==e)}},aj=e=>{let{data:t,baseline:s,current:r}=e,{modules:l}=s.moduleGraph,{modules:n}=r.moduleGraph,{chunks:i}=s.chunkGraph,{chunks:a}=r.chunkGraph,o=s.root,d=r.root,[c,u]=(0,T.useState)(""),h=(0,T.useRef)(null),p=(e,t)=>{t(),u(e[0])},m="__is_baseline__",x=(0,T.useMemo)(()=>t.baseline?ev(t.baseline,i,l).map(e=>({...e,[m]:!0})).filter(e=>{var t;return!(null==(t=e.concatenationModules)?void 0:t.length)}):[],[t,s]),f=(0,T.useMemo)(()=>t.current?ev(t.current,a,n).map(e=>({...e,[m]:!1})).filter(e=>{var t;return!(null==(t=e.concatenationModules)?void 0:t.length)}):[],[t,r]),g=e=>tj(e.path,e.__is_baseline__?o:d),j=(0,T.useMemo)(()=>{let e=[...x,...f],t=new Map;return e.forEach(e=>{var s,r;let l=(null==(s=e.webpackId)?void 0:s.replace(ax,""))||(null==(r=e.path)?void 0:r.replace(ax,"")),n=t.get(l);n||(n={path:l}),e[m]?n.baseline=e:n.current=e,t.set(l,n)}),[...t.values()]},[x,f,c]),{bModulesCount:v,cModulesCount:b,totalCount:Z}=(0,T.useMemo)(()=>{let e=e=>g(e).alias.indexOf(c)>-1,t=j.filter(e=>e.baseline),s=j.filter(e=>e.current),r=j.length;return c&&(t=t.filter(e),s=s.filter(e),r=j.filter(e).length),{bModulesCount:t.length,cModulesCount:s.length,totalCount:r}},[j,c]);return(0,y.jsx)(lL.Z,{dataSource:j,rowKey:e=>e.path,size:"small",pagination:{size:"small"},bordered:!0,scroll:{x:1500},columns:[{fixed:"left",title:()=>(0,y.jsxs)("div",{children:[(0,y.jsxs)(so.Z.Text,{children:["Modules of ",`"${t.alias}"`]}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsxs)(sd.Z,{title:(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["filtered modules: ",Z]}),(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["total modules: ",j.length]})]}),children:[(0,y.jsxs)(so.Z.Text,{type:"secondary",style:{fontSize:10,fontWeight:400,marginRight:4},children:[Z,"/",j.length]}),(0,y.jsx)(sF.Z,{})]})]}),filterDropdown(e){let{setSelectedKeys:t,selectedKeys:s,confirm:r,clearFilters:l}=e;return(0,y.jsxs)("div",{style:{padding:8},onKeyDown:e=>e.stopPropagation(),children:[(0,y.jsx)(r3.Z,{ref:h,placeholder:"Search by file name",value:s[0],onChange:e=>t(e.target.value?[e.target.value]:[]),onPressEnter:()=>p(s,r),style:{marginBottom:8,display:"block"}}),(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(sj.ZP,{type:"primary",onClick:()=>p(s,r),icon:(0,y.jsx)(n0.Z,{}),size:"small",style:{width:90},children:"Search"}),(0,y.jsx)(sj.ZP,{onClick:()=>{l&&(l(),u("")),t([]),p([],r)},size:"small",style:{width:90},children:"Reset"})]})]})},filterSearch:!0,filterIcon:e=>(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{type:c?void 0:"secondary",style:{fontWeight:400},children:c||"Search by file name"}),(0,y.jsx)(n0.Z,{style:{color:e?P.Blue:void 0}})]}),onFilterDropdownOpenChange:e=>{e&&setTimeout(()=>{var e;return null==(e=h.current)?void 0:e.focus()},100)},onFilter:(e,t)=>g(t).alias.indexOf(e)>-1,render:(e,t)=>{let{alias:s,inNodeModules:r}=g(t);return(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(sd.Z,{title:t.path,children:(0,y.jsx)(so.Z.Text,{copyable:{text:t.path},children:s})}),r?(0,y.jsx)(ss.Z,{color:"warning",children:"node_modules"}):null,(0,y.jsx)(av,{type:ay(t)})]})}},ag("current",v,b),ag("baseline",v,b),{title:"Actions",width:200,render:(e,t)=>{var l,n,i,a,o,d,c,u,h,p,m,x;return(0,y.jsx)(e9.Z,{direction:"vertical",style:{maxWidth:170},children:(0,y.jsx)(au,{text:"View Changes",file:t.path,data:[{baseline:null==(l=s.moduleCodeMap[null==(n=t.baseline)?void 0:n.id])?void 0:l.source,current:null==(i=r.moduleCodeMap[null==(a=t.current)?void 0:a.id])?void 0:i.source,group:"Source"},{baseline:null==(o=s.moduleCodeMap[null==(d=t.baseline)?void 0:d.id])?void 0:o.transformed,current:null==(c=r.moduleCodeMap[null==(u=t.current)?void 0:u.id])?void 0:c.transformed,group:"Transformed Source"},{baseline:null==(h=s.moduleCodeMap[null==(p=t.baseline)?void 0:p.id])?void 0:h.parsedSource,current:null==(m=r.moduleCodeMap[null==(x=t.current)?void 0:x.id])?void 0:m.parsedSource,group:"Parsed Source"}]})})}}]})};function ay(e){if(e.baseline&&!e.current)return ah.Deleted;if(!e.baseline&&e.current)return ah.New;if(e.baseline&&e.current)return e.baseline.size.sourceSize===e.current.size.sourceSize&&e.baseline.size.parsedSize===e.current.size.parsedSize?ah.NotChanged:ah.Changed;throw Error("Update Type not match")}let av=e=>{let{type:t}=e;return t===ah.NotChanged?(0,y.jsx)(sd.Z,{title:"It hasn't changed between Baseline and Current",children:(0,y.jsx)(ss.Z,{color:"success",children:"Not Changed"})}):t===ah.Changed?(0,y.jsx)(sd.Z,{title:"It has been changed between Baseline and Current",children:(0,y.jsx)(ss.Z,{color:"warning",children:"Changed"})}):t===ah.New?(0,y.jsx)(sd.Z,{title:"It is created in Current",children:(0,y.jsx)(ss.Z,{color:"error",children:"New"})}):t===ah.Deleted?(0,y.jsx)(sd.Z,{title:"It has been deleted in Current",children:(0,y.jsx)(ss.Z,{color:"error",children:"Deleted"})}):null},ab=e=>{let{baseline:t,current:s}=e,r=(0,T.useMemo)(()=>t_(t.moduleGraph.modules),[t]),l=(0,T.useMemo)(()=>t_(s.moduleGraph.modules),[s]),n=t.chunkGraph.chunks,i=s.chunkGraph.chunks,a=t.root,o=s.root,[d,c]=(0,T.useState)(),[u,h]=(0,T.useState)([]),p=(0,T.useMemo)(()=>{let e={};return r.forEach(t=>{var s,r;let l=(null==(s=t.webpackId)?void 0:s.replace(ax,""))||(null==(r=t.path)?void 0:r.replace(ax,""));e[l]?console.warn("[Baseline Module Exists]: ",t,e):e[l]={path:l,baseline:t}}),l.forEach(t=>{var s,r;let l=(null==(s=t.webpackId)?void 0:s.replace(ax,""))||(null==(r=t.path)?void 0:r.replace(ax,""));e[l]||(e[l]={path:l}),e[l].current=t}),(0,sQ.Z)(e)},[r,l]),m=(0,T.useMemo)(()=>{let e=p.slice();return d&&(e=e.filter(e=>e.path.indexOf(d)>-1)),u.length&&(e=e.filter(e=>(0,tA.Z)(u,ay(e)))),e},[p,d,u]),{bFilteredModulesLength:x,cFilteredModulesLength:f}=(0,T.useMemo)(()=>({bFilteredModulesLength:m.filter(e=>e.baseline).length,cFilteredModulesLength:m.filter(e=>e.current).length}),[m]);return(0,y.jsxs)(sE.Z,{gutter:[k.BasePadding,k.BasePadding],children:[(0,y.jsx)(sT.Z,{span:24,children:(0,y.jsxs)(e9.Z,{wrap:!0,children:[(0,y.jsx)(r7,{icon:(0,y.jsx)(iu.Z,{}),label:"",labelStyle:{width:45},placeholder:"Search by name",onChange:e=>{c(e)}}),(0,y.jsx)(ls.Z,{mode:"multiple",placeholder:"Filter by changed type",style:{width:200},options:(0,sQ.Z)(ah).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{h(e)}})]})}),(0,y.jsx)(sT.Z,{span:24,children:(0,y.jsx)(lL.Z,{bordered:!0,sticky:{offsetHeader:54},pagination:{pageSize:20,size:"small"},scroll:{x:1700},dataSource:m,rowKey:e=>e.path,columns:[{fixed:"left",title:(0,y.jsxs)(sd.Z,{title:(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["filtered modules is ",m.length," (Current & Baseline)"]}),(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["total modules is ",p.length," (Current & Baseline)"]})]}),children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Modules"}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsxs)(so.Z.Text,{type:"secondary",style:{fontSize:10,fontWeight:400,marginRight:4},children:[m.length,"/",p.length]}),(0,y.jsx)(sF.Z,{})]}),render:(e,t)=>{let{alias:s,inNodeModules:r}=tj(t.path,t.baseline?a:o);return(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(sd.Z,{title:t.path,children:(0,y.jsx)(so.Z.Text,{copyable:{text:t.path},children:s})}),(0,y.jsx)(av,{type:ay(t)}),r?(0,y.jsx)(ss.Z,{color:"warning",children:"node_modules"}):null]})}},ag("current",x,f),ag("baseline",x,f),{title:"in Assets",render:(e,t)=>{let s=[],r=[];return(t.current&&ej(t.current,i).forEach(e=>e.assets.forEach(e=>r.push(e))),t.baseline&&ej(t.baseline,n).forEach(e=>e.assets.forEach(e=>s.push(e))),s.length||r.length)?(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,ao.Z)(r).filter(Boolean).map(e=>(0,y.jsx)(sH,{label:"Current",value:e},`c_${e}`)),(0,ao.Z)(s).filter(Boolean).map(e=>(0,y.jsx)(sH,{label:"Baseline",value:e},`b_${e}`))]}):null}},{title:"Actions",width:200,render:(e,r)=>{var l,n,i,a,o,d,c,u,h,p,m,x,f,g,j,v;let b=ay(r)===ah.Changed;return(0,y.jsxs)(e9.Z,{direction:"vertical",style:{maxWidth:170},children:[b?(0,y.jsx)(au,{text:"View Changes",file:r.path,data:[{baseline:null==(l=t.moduleCodeMap[null==(n=r.baseline)?void 0:n.id])?void 0:l.source,current:null==(i=s.moduleCodeMap[null==(a=r.current)?void 0:a.id])?void 0:i.source,group:"Source"},{baseline:null==(o=t.moduleCodeMap[null==(d=r.baseline)?void 0:d.id])?void 0:o.transformed,current:null==(c=s.moduleCodeMap[null==(u=r.current)?void 0:u.id])?void 0:c.transformed,group:"Transformed Source"},{baseline:null==(h=t.moduleCodeMap[null==(p=r.baseline)?void 0:p.id])?void 0:h.parsedSource,current:null==(m=s.moduleCodeMap[null==(x=r.current)?void 0:x.id])?void 0:m.parsedSource,group:"Parsed Source"}]}):null,(0,y.jsx)(au,{text:"Current Result Viewer",file:r.path,data:[{baseline:null==(f=s.moduleCodeMap[r.current.id])?void 0:f.source,current:null==(g=s.moduleCodeMap[r.current.id])?void 0:g.transformed,baselineTitle:"Current Source",currentTitle:"Current Transformed Source",group:"Transformed Source"},{baseline:null==(j=s.moduleCodeMap[r.current.id])?void 0:j.source,current:null==(v=s.moduleCodeMap[r.current.id])?void 0:v.parsedSource,baselineTitle:"Current Source",currentTitle:"Current Parsed Source",group:"Parsed Source"}]})]})}}]})})]})},aZ=e=>e.baseline&&e.current?e.baseline.map(e=>e.version).sort().join()===e.current.map(e=>e.version).sort().join()?ah.NotChanged:ah.Changed:e.baseline||e.current?e.baseline&&!e.current?ah.Deleted:ah.New:ah.NotChanged,aS=e=>aZ(e)!==ah.NotChanged,aC=e=>{let{dataSource:t}=e,{newCount:s,deleteCount:r,changedCount:l}=(0,T.useMemo)(()=>({newCount:t.filter(e=>e.updateType===ah.New).length,deleteCount:t.filter(e=>e.updateType===ah.Deleted).length,changedCount:t.filter(e=>e.updateType===ah.Changed).length}),[t]);return(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(sH,{label:"New",value:s,type:s>0?"error":"default",tooltip:`Current has ${s} packages which not found in Baseline`}),(0,y.jsx)(sH,{label:"Deleted",value:r,type:r>0?"error":"default",tooltip:`Current delete ${r} packages than Baseline`}),(0,y.jsx)(sH,{label:"Changed",value:l,type:l>0?"error":"default",tooltip:`Current has ${l} changed packages than Baseline`})]})},aw=e=>{let{baseline:t,current:s}=e,{packages:r=[]}=t||{},{packages:l=[]}=s||{},n={},i=(e,t)=>{n[e.name]||(n[e.name]={name:e.name,updateType:ah.NotChanged}),n[e.name][t]||(n[e.name][t]=[]),n[e.name][t].push(e)};r.forEach(e=>i(e,"baseline")),l.forEach(e=>i(e,"current"));let a=[],o=[];return(0,sQ.Z)(n).forEach(e=>{aS(e)?a.push(e):o.push(e)}),a.concat(o).map(e=>({...e,updateType:aZ(e)}))},aM=e=>{let{baseline:t,current:s}=e,{packages:r=[]}=t||{},{packages:l=[]}=s||{};if(!r.length&&!l.length)return(0,y.jsx)(sr.Z,{});let n=(0,T.useMemo)(()=>(0,ao.Z)(r.concat(l).map(e=>e.name)),[r,l]),[i,a]=(0,T.useState)([]),[o,d]=(0,T.useState)([]),c=(0,T.useMemo)(()=>aw({baseline:t,current:s}),[t,s]),u=(0,T.useMemo)(()=>c.filter(e=>o.length?o.indexOf(e.updateType)>-1:!i.length||i.indexOf(e.name)>-1),[c,i,o]);return(0,y.jsxs)(sE.Z,{gutter:[k.BasePadding,k.BasePadding],children:[(0,y.jsx)(sT.Z,{span:24,style:{marginTop:16},children:(0,y.jsxs)(e9.Z,{wrap:!0,children:[(0,y.jsx)(ls.Z,{mode:"multiple",placeholder:"Filter by package names",style:{width:400},options:n.map(e=>{let t=c.find(t=>t.name===e);return t&&aS(t)?{label:(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:e}),(0,y.jsx)(av,{type:aZ(t)})]}),value:e}:{label:e,value:e}}),allowClear:!0,onChange:e=>{a(e)}}),(0,y.jsx)(ls.Z,{mode:"multiple",placeholder:"Filter by changed type",style:{width:200},options:(0,sQ.Z)(ah).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{d(e)}})]})}),(0,y.jsx)(sT.Z,{span:24,children:(0,y.jsx)(lL.Z,{bordered:!0,sticky:{offsetHeader:54},pagination:{pageSize:20,size:"small"},dataSource:u,rowKey:e=>e.name,columns:[{title:()=>(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:"Package Name"}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(sd.Z,{title:`Filtered Package Count is ${u.length}, Total Package Count is ${c.length}`,children:(0,y.jsxs)(so.Z.Text,{type:"secondary",style:{fontSize:10,fontWeight:400},children:[u.length," / ",c.length]})})]}),render:(e,t)=>t.updateType!==ah.NotChanged?(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:t.name}),(0,y.jsx)(av,{type:t.updateType})]}):t.name},{title:()=>(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:"Current"}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(aC,{dataSource:c})]}),children:[{title:"Version",render:(e,t)=>t.current?(0,y.jsx)(e9.Z,{direction:"vertical",children:t.current.map(e=>(0,y.jsx)(sH,{label:"version",value:e.version,tooltip:e.root,type:t.updateType===ah.Deleted?"error":t.updateType===ah.Changed?"warn":"default"},e.version))}):null},{title:"Parsed Size",render:(e,t)=>{let s=(0,sI.Z)(t.current,e=>e.size.parsedSize),r=()=>(0,y.jsx)(sp,{baseline:(0,sI.Z)(t.baseline,e=>e.size.parsedSize),current:s});return t.current?(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{strong:t.updateType!==ah.NotChanged,children:t3(s)}),(0,y.jsx)(r,{})]}):(0,y.jsx)(r,{})}}]},{title:"Baseline",children:[{title:"Version",render:(e,t)=>t.baseline?(0,y.jsx)(e9.Z,{direction:"vertical",children:t.baseline.map(e=>(0,y.jsx)(sH,{label:"version",value:e.version,tooltip:e.root,type:t.updateType===ah.Deleted?"error":t.updateType===ah.Changed?"warn":"default"},e.version))}):null},{title:"Parsed Size",render:(e,t)=>{if(t.baseline){let e=(0,sI.Z)(t.baseline,e=>e.size.parsedSize);return(0,y.jsx)(so.Z.Text,{children:t3(e)})}return null}}]}]})})]})},ak=e=>{let{baseline:t,current:s,assetsDiffResult:r}=e,l=t_(t.moduleGraph.modules),n=t_(s.moduleGraph.modules),i=tI(t.errors),a=tI(s.errors),o=tD(t.moduleGraph),d=tD(s.moduleGraph),c=t.root,u=s.root,h=aw({baseline:t.packageGraph,current:s.packageGraph}),p=[{title:["Bundle Size"],value:[r.all.total]},{title:["Total JS","Initial JS"],value:[r.js.total,r.js.initial]},{title:["Total CSS","Initial CSS"],value:[r.css.total,r.css.initial]},{title:["Images","Fonts","Media"],value:[r.imgs.total,r.fonts.total,r.media.total]},{title:["HTML"],value:[r.html.total]},{title:["Others"],value:[r.others.total]}];return(0,y.jsxs)(sE.Z,{gutter:[k.BasePadding,k.BasePadding],wrap:!0,style:{marginBottom:k.BasePadding},children:[p.map(e=>(0,y.jsx)(sT.Z,{style:{minWidth:335},children:(0,y.jsx)(sf,{titles:e.title,datas:e.value,showPercentInTitle:!0})},e.title.join(","))),(0,y.jsx)(sT.Z,{style:{minWidth:335},children:(0,y.jsx)(sf,{titles:["Duplicate Packages"],datas:[{size:{baseline:i.length,current:a.length},count:{baseline:i.length,current:a.length},percent:0,state:R.Client.RsdoctorClientDiffState.Equal}],formatter:(e,r)=>(0,y.jsx)(s3,{duplicatePackages:"baseline"===r?i:a,moduleGraph:"baseline"===r?o:d,cwd:"baseline"===r?c:u,buttonProps:{size:"small"},moduleCodeMap:"baseline"===r?t.moduleCodeMap:s.moduleCodeMap})})}),(0,y.jsx)(sT.Z,{style:{minWidth:335},children:(0,y.jsx)(sf,{titles:["Modules"],datas:[{size:{baseline:l.length,current:n.length},count:{baseline:l.length,current:n.length},percent:0,state:R.Client.RsdoctorClientDiffState.Equal}],formatter:(e,t)=>{if("baseline"===t)return e;let s=eD(l.length,n.length);return(0,y.jsxs)(e9.Z,{style:{fontSize:"inherit"},children:[(0,y.jsx)(so.Z.Text,{style:{fontSize:"inherit"},children:e}),(0,y.jsx)(sm,{...s})]})}})}),(0,y.jsx)(sT.Z,{style:{minWidth:335},children:(0,y.jsx)(sf,{titles:[(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{style:{color:"inherit"},children:"Packages"}),(0,y.jsx)(aC,{dataSource:h})]},"0")],datas:[{size:{baseline:h.filter(e=>e.baseline).length,current:h.filter(e=>e.current).length},count:{baseline:h.filter(e=>e.baseline).length,current:h.filter(e=>e.current).length},percent:0,state:R.Client.RsdoctorClientDiffState.Equal}],formatter:(e,t)=>"baseline"===t?e:(0,y.jsx)(e9.Z,{children:e})})})]})},aP=e=>{let{assetsDiffResult:t}=e,s=[{type:"JS",data:t.js},{type:"CSS",data:t.css},{type:"Imgs",data:t.imgs},{type:"Fonts",data:t.fonts},{type:"Media",data:t.media},{type:"HTML",data:t.html},{type:"Others",data:t.others}];return(0,y.jsx)(lL.Z,{bordered:!0,pagination:!1,dataSource:s,rowKey:e=>e.type,style:{marginTop:k.BasePadding-k.BasePadding/4},columns:[{title:"File Type",dataIndex:"type",key:"type",render:e=>(0,y.jsx)(so.Z.Text,{strong:!0,children:e})},{title:"Size",dataIndex:"data",key:"size",children:[{title:"Current",dataIndex:"data",key:"csize",render:e=>{let t=(0,y.jsxs)(T.Fragment,{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:t3(e.total.size.current)}),(0,y.jsx)(sm,{percent:e.total.percent,state:e.total.state}),am(e.total.size.baseline,e.total.size.current,e.total.state)]});return e.initial?(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(ss.Z,{color:P.Blue,children:"Total"}),t]}),(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(ss.Z,{color:P.Blue,children:"Initial"}),(0,y.jsx)(so.Z.Text,{strong:!0,children:t3(e.initial.size.current)}),(0,y.jsx)(sm,{percent:e.initial.percent,state:e.initial.state}),am(e.initial.size.baseline,e.initial.size.current,e.initial.state)]})]}):(0,y.jsx)(e9.Z,{children:t})}},{title:"Baseline",dataIndex:"data",key:"bsize",render:e=>{let t=(0,y.jsx)(so.Z.Text,{children:t3(e.total.size.baseline)});return e.initial?(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(ss.Z,{color:P.Blue,children:"Total"}),t]}),(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(ss.Z,{color:P.Blue,children:"Initial"}),(0,y.jsx)(so.Z.Text,{children:t3(e.initial.size.baseline)})]})]}):t}}]},{title:"Count",dataIndex:"data",key:"count",children:[{title:"Current",dataIndex:"data",key:"ccount",render:e=>{let t=(0,y.jsx)(so.Z.Text,{strong:!0,children:e.total.count.current});return e.initial?(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(ss.Z,{color:P.Blue,children:"Total"}),t]}),(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(ss.Z,{color:P.Blue,children:"Initial"}),(0,y.jsx)(so.Z.Text,{strong:!0,children:e.initial.count.current})]})]}):(0,y.jsx)(e9.Z,{children:t})}},{title:"Baseline",dataIndex:"data",key:"bcount",render:e=>{let t=(0,y.jsx)(so.Z.Text,{children:e.total.count.baseline});return e.initial?(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(ss.Z,{color:P.Blue,children:"Total"}),t]}),(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(ss.Z,{color:P.Blue,children:"Initial"}),(0,y.jsx)(so.Z.Text,{children:e.initial.count.baseline})]})]}):(0,y.jsx)(e9.Z,{children:t})}}]}]})};var aD=s(74814),a_=s(34069),aI=s(65190),aA=s(50193),aN=s(89387),aE=s(97544),aT=s(30697);let aR={JS:[R.Constants.JSExtension],CSS:[R.Constants.CSSExtension],HTML:[R.Constants.HtmlExtension],Imgs:R.Constants.ImgExtensions,Fonts:R.Constants.FontExtensions,Media:R.Constants.MediaExtensions,Others:[]},az=(0,aD.Z)((0,sQ.Z)(aR)),aL=e=>{let{data:t}=e,s=(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:t.alias}),(0,y.jsx)(sd.Z,{title:(0,y.jsxs)(e9.Z,{style:{color:"inherit"},direction:"vertical",children:[t.current?(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["Current realpath: ",t.current.path]}):null,t.baseline?(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["Baseline realpath: ",t.baseline.path]}):null]}),children:(0,y.jsx)(sF.Z,{})})]});return t.baseline&&!t.current?(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(aI.Z,{style:{color:P.Red}}),s]}):!t.baseline&&t.current?(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(aA.Z,{style:{color:P.Green}}),s]}):t.baseline&&t.current?(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(aN.Z,{style:{color:P.Yellow}}),s]}):s},aB=e=>{let{baseline:t,current:s,outputFilename:r}=e,[l,n]=(0,T.useState)(),[i,a]=(0,T.useState)([]),[o,d]=(0,T.useState)([]),[c,u]=(0,T.useState)(ap.Size),[h,p]=(0,T.useState)(null),[m,x]=(0,T.useState)(null),{assets:f}=t.chunkGraph,{assets:g}=s.chunkGraph,j=(0,T.useMemo)(()=>{let e={};return h&&m?e.choose={alias:`${h}
|
|
94
|
-
${m}`,current:g.find(e=>e.path===m),baseline:f.find(e=>e.path===h)}:(f.forEach(t=>{let s=eZ(t.path,r);e[s]?console.warn("[Baseline Asset Exists]: ",t,e):e[s]={alias:s,baseline:t}}),g.forEach(t=>{let s=eZ(t.path,r);e[s]||(e[s]={alias:s}),e[s].current=t})),(0,sQ.Z)(e)},[f,g,h,m]),v=(0,T.useMemo)(()=>{let e=j.slice();if(l&&(e=e.filter(e=>e.alias.indexOf(l)>-1)),i.length){let t=(0,aD.Z)(i.map(e=>aR[e])),s=i.indexOf("Others")>-1;e=e.filter(e=>{let r=e.baseline||e.current;return!!eC(r,t)||!!s&&!eC(r,az)})}if(o.length&&(e=e.filter(e=>e.baseline&&!e.current?(0,tA.Z)(o,ah.Deleted):!e.baseline&&e.current?(0,tA.Z)(o,ah.New):!!e.baseline&&!!e.current&&(e.baseline.size===e.current.size?(0,tA.Z)(o,ah.NotChanged):(0,tA.Z)(o,ah.Changed)))),c)if(c===ap.Name)e.sort((e,t)=>e.alias.localeCompare(t.alias));else{let{prev:l,others:n}=e.reduce((e,t)=>(t.current?t.baseline?e.prev.unshift(t):e.prev.push(t):e.others.push(t),e),{prev:[],others:[]});e=[...l.sort((e,l)=>{if(l.current&&e.current){if(c===ap.Delta){let{percent:n}=e_(t.chunkGraph,s.chunkGraph,t=>eZ(t.path,r)===e.alias),{percent:i}=e_(t.chunkGraph,s.chunkGraph,e=>eZ(e.path,r)===l.alias);return i-n}return l.current.size-e.current.size}return -1}),...n]}return e},[j,l,i,o,c]),b=(0,T.useMemo)(()=>(0,sI.Z)(v,e=>e.current?e.current.size:0)||0,[v]),Z=(0,T.useMemo)(()=>(0,sI.Z)(v,e=>e.baseline?e.baseline.size:0)||0,[v]);return(0,y.jsxs)(sE.Z,{gutter:[k.BasePadding,k.BasePadding],children:[(0,y.jsxs)(sT.Z,{span:24,children:[(0,y.jsxs)(e9.Z,{wrap:!0,children:[(0,y.jsx)(r7,{icon:(0,y.jsx)(iu.Z,{}),label:"",labelStyle:{width:45},placeholder:"Search by file name",onChange:e=>{n(e)}}),(0,y.jsx)(ls.Z,{mode:"multiple",placeholder:"Filter by file type",style:{width:250},options:(0,a_.Z)(aR).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{a(e)}}),(0,y.jsx)(ls.Z,{mode:"multiple",placeholder:"Filter by file changed type",style:{width:200},options:(0,sQ.Z)(ah).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{d(e)}}),(0,y.jsx)(ls.Z,{suffixIcon:(0,y.jsx)(aE.Z,{}),options:(0,sQ.Z)(ap).map(e=>({label:e,value:e})),value:c,onChange:e=>{u(e)}})]}),(0,y.jsxs)(sE.Z,{style:{marginTop:10},gutter:[6,6],children:[(0,y.jsx)(sT.Z,{children:(0,y.jsx)(sj.ZP,{children:"Select Baseline Asset and Current Asset to Diff "})}),(0,y.jsx)(sT.Z,{children:(0,y.jsx)(ls.Z,{allowClear:!0,placeholder:"select baseline assets",showSearch:!0,style:{width:300},options:(0,sQ.Z)(t.chunkGraph.assets).map(e=>({label:e.path,value:e.path})),onChange:e=>p(e)})}),(0,y.jsx)(sT.Z,{children:(0,y.jsx)(ls.Z,{allowClear:!0,placeholder:"select current assets",showSearch:!0,style:{width:300},options:(0,sQ.Z)(s.chunkGraph.assets).map(e=>({label:e.path,value:e.path})),onChange:e=>x(e)})})]})]}),(0,y.jsx)(sT.Z,{span:24,children:(0,y.jsx)(lL.Z,{bordered:!0,sticky:{offsetHeader:54},pagination:{pageSize:20,size:"small"},dataSource:v,rowKey:e=>e.alias,expandable:{expandedRowRender:e=>(0,y.jsx)("div",{style:{margin:k.BasePadding/3},children:(0,y.jsx)(aj,{data:e,baseline:t,current:s})}),columnTitle:(0,y.jsx)(sd.Z,{title:"Click to expand row to see the modules which the chunk contains",placement:"left",children:(0,y.jsx)(aT.Z,{style:{cursor:"pointer"}})})},columns:[{title:(0,y.jsxs)(sd.Z,{title:(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["filtered assets is ",v.length]}),(0,y.jsxs)(so.Z.Text,{style:{color:"inherit"},children:["total assets is ",j.length]})]}),children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Assets"}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsxs)(so.Z.Text,{type:"secondary",style:{fontSize:10,fontWeight:400,marginRight:4},children:[v.length,"/",j.length]}),(0,y.jsx)(sF.Z,{})]}),render:(e,t)=>(0,y.jsx)(aL,{data:t})},{title:()=>{let e=t3(b),t=eD(Z,b);return(0,y.jsxs)(sd.Z,{title:`Current size is ${e}, Delta is ${t7(t.percent)}`,children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Current"}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsxs)(so.Z.Text,{style:{fontSize:10,fontWeight:400,marginRight:4},children:[(0,y.jsx)(so.Z.Text,{style:{fontSize:"inherit",marginRight:8},children:e}),(0,y.jsx)(sp,{fontSize:"inherit",baseline:Z,current:b}),am(Z,b,Z>b?R.Client.RsdoctorClientDiffState.Down:R.Client.RsdoctorClientDiffState.Up,{fontSize:10,fontWeight:400,marginLeft:4})]}),(0,y.jsx)(sF.Z,{})]})},render:(e,l)=>{if(l.current){let{percent:e,state:n}=e_(t.chunkGraph,s.chunkGraph,e=>eZ(e.path,r)===l.alias),i=ek(l.current,s.chunkGraph.chunks);return(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:t3(l.current.size)}),(0,y.jsx)(sm,{percent:e,state:n}),i?(0,y.jsx)(ss.Z,{color:P.Blue,children:"initial"}):null]})}return"-"}},{title:()=>{let e=t3(Z);return(0,y.jsxs)(sd.Z,{title:`Baseline size is ${e}`,children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:"Baseline"}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(so.Z.Text,{style:{fontSize:10,fontWeight:400,marginRight:4},children:e}),(0,y.jsx)(sF.Z,{})]})},render:(e,s)=>{if(s.baseline){let e=ek(s.baseline,t.chunkGraph.chunks);return(0,y.jsxs)(e9.Z,{children:[(0,y.jsx)(so.Z.Text,{children:t3(s.baseline.size)}),e?(0,y.jsx)(ss.Z,{color:P.Blue,children:"initial"}):null]})}return"-"}},{title:"Actions",key:"actions",render:(e,t)=>{var s,r;return(0,y.jsx)(au,{file:t.alias,data:[{baseline:null==(s=t.baseline)?void 0:s.content,current:null==(r=t.current)?void 0:r.content,group:"assets"}]})}}]})})]})},aO=e=>{var t;let{api:s,body:r,children:l,manifests:n}=e,[i,a]=(null==(t=tP()[R.Client.RsdoctorClientUrlQuery.BundleDiffFiles])?void 0:t.split(","))||[];return(null==n?void 0:n.length)?(0,y.jsx)(y.Fragment,{children:l(n[0].data,n[1].data)}):(0,y.jsx)(sX,{api:s,body:r,manifestLoader:i?()=>e1(i):void 0,children:e=>(0,y.jsx)(sX,{api:s,body:r,manifestLoader:a?()=>e1(a):void 0,children:t=>l(e,t)})})},aF=e=>{let{manifests:t}=e;return(0,T.useEffect)(()=>{console.log("BundleDiff Manifests: ",t)},[t]),(0,y.jsx)(aO,{api:R.SDK.ServerAPI.API.GetBundleDiffSummary,manifests:t,children:(e,t)=>{let s=e.chunkGraph===t.chunkGraph,r=e.chunkGraph,l=s?r:t.chunkGraph,n={all:{total:e_(r,l)},js:{total:e_(r,l,R.Constants.JSExtension),initial:e_(r,l,R.Constants.JSExtension,!0)},css:{total:e_(r,l,R.Constants.CSSExtension),initial:e_(r,l,R.Constants.CSSExtension,!0)},imgs:{total:e_(r,l,R.Constants.ImgExtensions)},html:{total:e_(r,l,R.Constants.HtmlExtension)},media:{total:e_(r,l,R.Constants.MediaExtensions)},fonts:{total:e_(r,l,R.Constants.FontExtensions)},others:{total:e_(r,l,e=>!eC(e,[R.Constants.JSExtension,R.Constants.CSSExtension,R.Constants.HtmlExtension].concat(R.Constants.ImgExtensions,R.Constants.MediaExtensions,R.Constants.FontExtensions,R.Constants.MapExtensions)))}};return(0,y.jsxs)("div",{children:[(0,y.jsxs)(r8.Z.Group,{children:[(0,y.jsx)(sd.Z,{placement:"leftBottom",title:(0,y.jsx)(e9.Z,{direction:"vertical",children:[{title:"Baseline",data:e},{title:"Current",data:t}].map(e=>{let{title:t,data:s}=e;return(0,y.jsx)(sa.Z,{size:"small",children:(0,y.jsxs)(e9.Z,{direction:"vertical",children:[(0,y.jsx)(so.Z.Text,{strong:!0,children:t}),(0,y.jsxs)(e9.Z,{style:{fontSize:10},children:[(0,y.jsx)(so.Z.Text,{style:{fontSize:"inherit",width:30,display:"inline-block"},children:"Hash"}),(0,y.jsx)(sD.Z,{type:"vertical"}),(0,y.jsx)(so.Z.Text,{type:"secondary",style:{fontSize:"inherit"},children:s.hash||"-"})]}),s.cloudManifestUrl?(0,y.jsx)(sj.ZP,{type:"link",size:"small",style:{padding:0,fontSize:10},onClick:()=>window.open(s.cloudManifestUrl),children:"Open File"}):null]})},t)})}),children:(0,y.jsx)(r8.Z,{icon:(0,y.jsx)(sF.Z,{})})}),(0,y.jsx)(ai.Z,{title:(0,y.jsxs)(so.Z.Text,{children:["Are you sure to",(0,y.jsx)(so.Z.Text,{strong:!0,children:" re-upload "}),"json files for bundle diff?"]}),onConfirm:()=>{},okText:"Yes",cancelText:"Cancel",placement:"topLeft",trigger:"hover",children:(0,y.jsx)(r8.Z,{icon:(0,y.jsx)(aa.Z,{})})}),(0,y.jsx)(r8.Z.BackTop,{})]}),(0,y.jsx)(ak,{baseline:e,current:t,onlyBaseline:s,assetsDiffResult:n}),(0,y.jsx)(sl.Z,{defaultActiveKey:"Overview",tabBarStyle:{marginBottom:k.BasePadding/3},items:[{label:"Overview",key:"Overview",children:(0,y.jsx)(aP,{assetsDiffResult:n})},{label:"Assets",key:"Assets",children:(0,y.jsx)(aB,{outputFilename:e.outputFilename,baseline:e,current:t})},{label:"Modules",key:"Modules",children:(0,y.jsx)(ab,{baseline:e,current:t,onlyBaseline:s,assetsDiffResult:n})},{label:"Packages",key:"Packages",children:(0,y.jsx)(aM,{baseline:e.packageGraph,current:t.packageGraph})}].map(e=>({...e,label:(0,y.jsx)(so.Z.Text,{strong:!0,children:e.label})}))})]})}})},a$=R.Client.RsdoctorClientRoutes.BundleDiff,aG=()=>(0,y.jsx)(aF,{manifests:[]}),aK="Compile Analysis",aW={overall:(0,y.jsx)(e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,y.jsx)("rect",{width:12,height:9.333,x:.615,y:.167,fill:"#5E6673",rx:1}),(0,y.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M3.781 3.5c.277 0 .5.214.5.478v3.044a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478V3.978a.49.49 0 0 1 .5-.478ZM6.615 1.833c.276 0 .5.214.5.479v4.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-4.71a.49.49 0 0 1 .5-.479ZM9.448 4.833c.276 0 .5.214.5.479v1.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-1.71a.49.49 0 0 1 .5-.479Z",clipRule:"evenodd"}),(0,y.jsx)("rect",{width:6,height:1.333,x:3.615,y:10.5,fill:"#5E6673",fillOpacity:.5,rx:.667})]}),{}),webpack:(0,y.jsx)(e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,y.jsx)("rect",{width:12,height:9.333,x:.615,y:.167,fill:"#5E6673",rx:1}),(0,y.jsx)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M4.241 6.212 2.895 5.014 4.24 3.815M8.97 6.212l1.347-1.198-1.346-1.199M5.96 7.014l1.363-4"}),(0,y.jsx)("rect",{width:6,height:1.333,x:3.615,y:10.5,fill:"#5E6673",fillOpacity:.5,rx:.667})]}),{}),bundle:(0,y.jsx)(e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,y.jsx)("path",{fill:"#5E6673",fillRule:"evenodd",d:"M6.44.672a1 1 0 0 0-.977.013L.578 3.505l5.36 2.83 5.327-3.044L6.44.67Zm-.992 12.777V7.206L.175 4.423v5.404a1 1 0 0 0 .5.866l4.773 2.756Z",clipRule:"evenodd"}),(0,y.jsx)("path",{fill:"#5E6673",fillOpacity:.5,fillRule:"evenodd",d:"m5.465.683-.002.002L.658 3.459l.017-.01L5.448.693a1 1 0 0 1 .017-.01ZM5.448 13.45V7.206L.175 4.423l5.273 2.783v6.243Zm1-6.254 5.265-3.009c.006.043.009.086.009.13v5.511a1 1 0 0 1-.5.866L6.448 13.45V7.195Z",clipRule:"evenodd"})]}),{})},aH=s0({api:R.SDK.ServerAPI.API.GetClientRoutes,responsePropName:"routes",Component:e=>{let{t}=tM(),{pathname:s}=(0,tC.TH)(),r=(0,tC.s0)(),[l,n]=(0,T.useState)(aW),{routes:i}=e;(0,T.useEffect)(()=>{s.includes("webpack")?n({...aW,webpack:(0,y.jsx)(lh,{})}):s.includes("overall")||"/"===s?n({...aW,overall:(0,y.jsx)(lu,{})}):s.includes("bundle")&&n({...aW,bundle:(0,y.jsx)(lp,{})})},[s]);let a={color:"rgba(96, 102, 114)"},o=[];(0,tA.Z)(i,R.Manifest.RsdoctorManifestClientRoutes.Overall)&&o.push({label:t("Overall"),key:lc,icon:l.overall,children:[],onTitleClick(e){r(e.key)}}),((0,tA.Z)(i,R.Manifest.RsdoctorManifestClientRoutes.WebpackLoaders)||(0,tA.Z)(i,R.Manifest.RsdoctorManifestClientRoutes.ModuleResolve)||(0,tA.Z)(i,R.Manifest.RsdoctorManifestClientRoutes.WebpackPlugins))&&o.push({label:t(aK),key:aK,icon:l.webpack,children:[(0,tA.Z)(i,R.Manifest.RsdoctorManifestClientRoutes.WebpackLoaders)&&{label:t("Loaders Timeline"),key:iZ,icon:(0,y.jsx)(ll.Z,{style:a})},(0,tA.Z)(i,R.Manifest.RsdoctorManifestClientRoutes.WebpackLoaders)&&{label:t("Loaders Analysis"),key:iT,icon:(0,y.jsx)(ln.Z,{style:a})},(0,tA.Z)(i,R.Manifest.RsdoctorManifestClientRoutes.ModuleResolve)&&{label:t("ModuleResolve"),key:iU,icon:(0,y.jsx)(li.Z,{style:a})},(0,tA.Z)(i,R.Manifest.RsdoctorManifestClientRoutes.WebpackPlugins)&&{label:t("Plugins Analysis"),key:iO,icon:(0,y.jsx)(la.Z,{style:a})}].filter(e=>!!e)}),((0,tA.Z)(i,R.Manifest.RsdoctorManifestClientRoutes.BundleSize)||(0,tA.Z)(i,R.Manifest.RsdoctorManifestClientRoutes.ModuleGraph)||(0,tA.Z)(i,R.Manifest.RsdoctorManifestClientRoutes.TreeShaking))&&o.push({label:t(ia),key:ia,icon:l.bundle,children:[],onTitleClick(){r(io)}});let d=(0,y.jsx)(ld.Z,{items:o,mode:"horizontal",onClick:e=>{e.keyPath.includes("builder-switcher")||r(e.key)},overflowedIndicator:(0,y.jsx)(lo.Z,{}),style:{height:k.NavBarHeight,lineHeight:`${k.NavBarHeight}px`,minWidth:0,justifyContent:"flex-end",...e.style},selectedKeys:["/"===s?lc:s]},i.join(""));return(0,y.jsx)("div",{style:{marginLeft:"30px"},children:d})},fallbackComponent:()=>null,showSkeleton:!1}),aV=()=>{let{i18n:e}=tM(),t=(0,tC.s0)(),{isLight:s}=t4(),r=[{value:M.Cn,label:"中文"},{value:M.En,label:"English"}];return(0,y.jsx)(r9.Z.Header,{style:{height:k.NavBarHeight,padding:0,paddingLeft:k.BasePadding,paddingRight:k.BasePadding,position:"fixed",zIndex:999,width:"100%",backgroundColor:s?"#fff":"#141414",transition:"none"},children:(0,y.jsxs)(sE.Z,{justify:"space-between",align:"middle",style:{height:k.NavBarHeight},wrap:!1,children:[(0,y.jsx)(sT.Z,{style:{height:k.NavBarHeight,lineHeight:`${k.NavBarHeight+2}px`},children:(0,y.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"100%"},children:[(0,y.jsx)("img",{src:"https://assets.rspack.rs/rsdoctor/rsdoctor-title-logo.png",className:"rsdoctor-logo",alt:"logo",onClick:()=>{t(R.Client.RsdoctorClientRoutes.Home)}}),(0,y.jsx)(lr,{})]})}),(0,y.jsx)(aH,{style:{transition:"none"}}),(0,y.jsx)(sT.Z,{flex:1,children:(0,y.jsxs)(sE.Z,{align:"middle",justify:"end",style:{height:k.NavBarHeight},wrap:!1,gutter:[k.BasePadding/3,0],children:[(0,y.jsx)(sT.Z,{children:(0,y.jsx)(rk,{})}),(0,y.jsx)(sT.Z,{children:(0,y.jsx)(lt.Z,{overlayStyle:{zIndex:1e3},menu:{items:r.map(t=>({label:t.label,key:t.value,onClick(){e.changeLanguage(t.value)}})),selectedKeys:[e.language]},children:(0,y.jsx)(le.Z,{className:"header-icon",style:{display:"inline-block",fontSize:20,textAlign:"center",verticalAlign:"middle",cursor:"pointer",width:30,transition:"all 0.3s ease"}})})})]})})]})})},aU=s0({api:R.SDK.ServerAPI.APIExtends.GetCompileProgress,responsePropName:"progress",Component:e=>{let{progress:t}=e;if(!t)return null;let{percentage:s=1,message:r}=t;if(s>=1)return null;let l=+(100*s).toFixed(1);return(0,y.jsx)(sE.Z,{wrap:!0,style:{width:"100%",position:"fixed",top:k.NavBarHeight,left:1,zIndex:99},children:(0,y.jsx)(sT.Z,{span:Math.min(Math.floor(24*s),24),children:(0,y.jsx)(lD.Z,{percent:100,status:"active",size:"small",format:()=>(0,y.jsx)(so.Z.Text,{style:{fontSize:12},type:"secondary",children:`${l}% ${r}`})})})})},fallbackComponent:()=>null,showSkeleton:!1}),aq=e=>{let t=(0,T.useContext)(t2).locale,{i18n:s}=tM(),{children:r}=e;(0,T.useEffect)(()=>{let e=t;if(!I("FIRST_VISIT")){var r;A("FIRST_VISIT","1");let t="cn"===(r=window.navigator.language.split("-")[0])||"zh"===r?M.Cn:M.En;Object.values(M).includes(t)&&(e=t)}s.language!==e&&s.changeLanguage(e)},[t]);let l=(0,T.useContext)(t2);return(0,y.jsxs)(r9.Z,{children:[l.embedded?null:(0,y.jsx)(aV,{}),(0,y.jsx)(aU,{}),(0,y.jsxs)(r9.Z.Content,{style:{height:"100%",minHeight:"100vh",padding:k.BasePadding,marginTop:l.embedded?0:k.NavBarHeight,background:_},children:[r,(0,y.jsx)(r8.Z.BackTop,{})]})]})};var aY=s(32074),aJ=s(66428),aQ=s(35061);function aX(){let e=[{path:io,element:(0,y.jsx)(id,{})},{path:iT,element:(0,y.jsx)(iz,{})},{path:iO,element:(0,y.jsx)(iF,{})},{path:iU,element:(0,y.jsx)(iq,{})},{path:iZ,element:(0,y.jsx)(iS,{})},{path:iJ,element:(0,y.jsx)(iQ,{})},{path:al,element:(0,y.jsx)(an,{})}].filter(e=>!!e);return(0,y.jsxs)(tC.Z5,{children:[(0,y.jsx)(tC.AW,{path:"/",element:(0,y.jsx)(l4,{})}),(0,y.jsx)(tC.AW,{path:lc,element:(0,y.jsx)(l4,{})}),e.map(e=>(0,y.jsx)(tC.AW,{path:e.path,element:e.element},e.path)),(0,y.jsx)(tC.AW,{path:a$,element:(0,y.jsx)(aG,{})})]})}let{U7:a0,Q2:a1}=f;var a5=s(8082);let a2=document.getElementById("root");a5.createRoot(a2).render((0,y.jsx)(()=>{let e=!!("https:"===window.location.protocol&&window.location.href.indexOf("ide-proxy")>0),[t,s]=(0,T.useState)(a0.Success),[r,l]=(0,T.useState)({...t5.viewMode}),[n,i]=(0,T.useState)(),[a,o]=(0,T.useState)(t5.theme);return t===S.Fail?(0,y.jsxs)(e9.Z,{direction:"vertical",style:{padding:14},children:[(0,y.jsx)(so.Z.Text,{strong:!0,style:{fontSize:16},children:"load json file of Rsdoctor failed."}),(0,y.jsxs)(so.Z.Text,{children:["try to use ",(0,y.jsx)(so.Z.Text,{keyboard:!0,children:"command + r"})," to refresh page."]}),null,(0,y.jsx)(sD.Z,{}),(0,y.jsx)(e9.Z,{direction:"vertical",style:{width:"100%"},children:(0,y.jsxs)(so.Z.Text,{style:{fontSize:16},children:["you can",(0,y.jsx)(so.Z.Text,{strong:!0,style:{fontSize:"inherit"},children:"upload a file"}),"in the area below to analyze your project."]})}),(0,y.jsx)(sD.Z,{}),null]}):(0,y.jsx)(aQ.UT,{children:(0,y.jsx)(t2.Provider,{value:{...t5,theme:a,setTheme:e=>{o(e),A("THEME",e)},pageState:t,json:n,viewMode:r,setManifest:i,setPageState:s,setViewMode(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],s={...r,...e};l(s),t&&A("VIEWMODE",JSON.stringify(s))}},children:(0,y.jsx)(t2.Consumer,{children:s=>(0,y.jsx)(rx.ZP,{locale:tL(s.locale),theme:{algorithm:a===a1.Dark?tr.Z.darkAlgorithm:tr.Z.defaultAlgorithm,token:{padding:16,colorText:"rgba(0, 0, 0, 0.85)",fontFamily:"var(--font-family-code)"}},children:(0,y.jsx)(aq,{children:(0,y.jsxs)(y.Fragment,{children:[e&&(0,y.jsx)(sB.Z,{message:"Warning",description:(0,y.jsx)("a",{href:window.location.href.replace(/https/,"http"),children:`Please jump to\u{FF1A}${window.location.href.replace(/https/,"http")}`}),type:"warning",showIcon:!0,closable:!0}),(0,y.jsx)(aJ.SV,{FallbackComponent:e=>{let{error:s,resetErrorBoundary:r}=e;return(0,y.jsx)(aY.ZP,{status:"error",title:"Sorry, something went wrong.",extra:(0,y.jsx)(sj.ZP,{type:"primary",onClick:r,loading:t===a0.Pending,children:"Reload"}),children:(0,y.jsxs)(so.Z.Paragraph,{children:[(0,y.jsx)(so.Z.Title,{level:3,children:"Error Stack"}),(0,y.jsx)("pre",{children:s.stack||s.message})]})})},onReset:()=>{window.location.reload()},children:(0,y.jsx)(aX,{})})]})})})})})})},{}));let a4=document.createElement("link");a4.setAttribute("type","image/x-icon"),a4.setAttribute("rel","icon"),a4.setAttribute("href","https://assets.rspack.rs/rsdoctor/rsdoctor-logo-960x960.png"),document.head.appendChild(a4)},40305:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},27221:function(e,t){var s,r,l,n,i,a;Object.defineProperty(t,"__esModule",{value:!0}),t.RsdoctorClientDiffState=t.RsdoctorClientRoutes=t.RsdoctorClientUrlQuery=void 0,(n=s||(t.RsdoctorClientUrlQuery=s={})).BundleDiffFiles="__bundle_files__",n.ManifestFile="manifest",(i=r||(t.RsdoctorClientRoutes=r={})).Home="/",i.Overall="/overall",i.WebpackLoaderOverall="/webpack/loaders/overall",i.WebpackLoaderAnalysis="/webpack/loaders/analysis",i.ModuleResolve="/module/resolve",i.WebpackPlugins="/webpack/plugins",i.BundleSize="/bundle/size",i.ModuleAnalyze="/module/analyze",i.TreeShaking="/treeshaking",i.BundleDiff="/resources/bundle/diff",i.RuleIndex="/resources/rules",i.Uploader="/resources/uploader",i.EmoCheck="/emo/check",(a=l||(t.RsdoctorClientDiffState=l={})).Equal="-",a.Up="UP",a.Down="DOWN"},18743:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},18150:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WINDOW_RSDOCTOR_TAG=t.RsdoctorClientUrl=t.RsdoctorProcessEnvDebugKey=t.RsdoctorMonitorDocBId=t.RsdoctorMonitorWebBId=t.RsdoctorMonitorNodeBId=t.StatsFilePath=t.RsdoctorOutputManifestPath=t.RsdoctorOutputManifest=t.RsdoctorOutputFolder=t.MapExtensions=t.FontExtensions=t.MediaExtensions=t.ImgExtensions=t.HtmlExtension=t.CSSExtension=t.JSExtension=void 0,t.JSExtension=".js",t.CSSExtension=".css",t.HtmlExtension=".html",t.ImgExtensions=[".png",".jpg",".svg",".webp",".jpeg",".gif",".bmp"],t.MediaExtensions=[".mp3",".mp4",".avi",".wav",".flv",".mov",".mpg",".mpeg"],t.FontExtensions=[".ttf",".fnt",".fon",".otf",".woff",".woff2"],t.MapExtensions=[".js.map",".css.map",".ts.map",".LICENSE.txt"],t.RsdoctorOutputFolder=".rsdoctor",t.RsdoctorOutputManifest="manifest.json",t.RsdoctorOutputManifestPath=`${t.RsdoctorOutputFolder}/${t.RsdoctorOutputManifest}`,t.StatsFilePath="dist/stats.json",t.RsdoctorMonitorNodeBId="Rsdoctor",t.RsdoctorMonitorWebBId="Rsdoctor-Client",t.RsdoctorMonitorDocBId="Rsdoctor-Doc",t.RsdoctorProcessEnvDebugKey="RSDOCTOR_DEBUG",t.RsdoctorClientUrl="",t.WINDOW_RSDOCTOR_TAG="__RSDOCTOR__"},40777:function(e,t){var s,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorLevel=void 0,(r=s||(t.ErrorLevel=s={}))[r.Ignore=0]="Ignore",r[r.Warn=1]="Warn",r[r.Error=2]="Error"},83247:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},76424:function(e,t,s){var r,l=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var l=Object.getOwnPropertyDescriptor(t,s);(!l||("get"in l?!t.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,l)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||(r=function(e){return(r=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[t.length]=s);return t})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s=r(e),i=0;i<s.length;i++)"default"!==s[i]&&l(t,e,s[i]);return n(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.Plugin=t.Constants=t.Client=t.Thirdparty=t.Rule=t.Linter=t.Modules=t.SDK=t.Logger=t.Err=t.Common=t.Babel=t.Esbuild=t.Manifest=void 0,t.Manifest=i(s(54911)),t.Esbuild=i(s(83247)),t.Babel=i(s(40305)),t.Common=i(s(18743)),t.Err=i(s(40777)),t.Logger=i(s(90724)),t.SDK=i(s(40911)),t.Modules=i(s(55071)),t.Linter=i(s(99192)),t.Rule=i(s(75952)),t.Thirdparty=i(s(14982)),t.Client=i(s(27221)),t.Constants=i(s(18150)),t.Plugin=i(s(88451))},29566:function(e,t,s){Object.defineProperty(t,"__esModule",{value:!0}),t.Severity=void 0;var r=s(40777);Object.defineProperty(t,"Severity",{enumerable:!0,get:function(){return r.ErrorLevel}})},99192:function(e,t,s){var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var l=Object.getOwnPropertyDescriptor(t,s);(!l||("get"in l?!t.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,l)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),l=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||r(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),l(s(29566),t),l(s(32950),t)},32950:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},90724:function(e,t){var s,r;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(r=s||(t.LogLevel=s={}))[r.Silent=0]="Silent",r[r.Error=1]="Error",r[r.Warning=2]="Warning",r[r.Info=3]="Info",r[r.Debug=4]="Debug",r[r.Verbose=5]="Verbose"},54911:function(e,t){var s,r,l;Object.defineProperty(t,"__esModule",{value:!0}),t.RsdoctorManifestClientConstant=t.RsdoctorManifestClientRoutes=void 0,(l=s||(t.RsdoctorManifestClientRoutes=s={})).Overall="Overall",l.WebpackLoaders="Compile.WebpackLoaders",l.ModuleResolve="Compile.ModuleResolve",l.WebpackPlugins="Compile.WebpackPlugins",l.BundleSize="Bundle.BundleSize",l.ModuleGraph="Bundle.ModuleGraph",l.TreeShaking="Bundle.TreeShaking",(r||(t.RsdoctorManifestClientConstant=r={})).WindowPropertyForManifestUrl="__DEVTOOLS_MANIFEST_URL__"},55071:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},35991:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},258:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},88262:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},88451:function(e,t,s){var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var l=Object.getOwnPropertyDescriptor(t,s);(!l||("get"in l?!t.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,l)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),l=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||r(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),l(s(35991),t),l(s(88262),t),l(s(48282),t),l(s(258),t),l(s(50955),t)},48282:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},50955:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},31037:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.message=t.code=void 0,t.code="E1001",t.message={code:t.code,title:"Duplicate Packages",type:"markdown",category:"bundle",description:`
|
|
95
|
-
#### Description
|
|
96
|
-
|
|
97
|
-
There is a same name package which is bundled in multiple versions in your application.
|
|
98
|
-
|
|
99
|
-
This negatively impacts the bundle size of your application.
|
|
100
|
-
|
|
101
|
-
#### General Solution
|
|
102
|
-
|
|
103
|
-
Add an entry in \`resolve.alias\` to configure Webpack to route any package references to a single specified path.
|
|
104
|
-
|
|
105
|
-
For example, if \`lodash\` is duplicated in your bundle, the following configuration would make all Lodash imports refer to the \`lodash\` instance found at \`./node_modules/lodash\`:
|
|
106
|
-
|
|
107
|
-
\`\`\`js
|
|
108
|
-
{
|
|
109
|
-
alias: {
|
|
110
|
-
lodash: path.resolve(__dirname, 'node_modules/lodash')
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
\`\`\`
|
|
114
|
-
`}},62999:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.message=t.code=void 0,t.code="E1002",t.message={code:t.code,title:"Cross Chunks Packages",type:"markdown",category:"bundle",description:`
|
|
115
|
-
#### Description
|
|
116
|
-
|
|
117
|
-
There is a package with the same version that is duplicated across different chunks in your application. This redundancy increases the overall bundle size, which is not optimal for performance.
|
|
118
|
-
|
|
119
|
-
#### General Solution
|
|
120
|
-
|
|
121
|
-
To address this issue, you can use Rspack's **SplitChunksPlugin** to extract common dependencies into a separate chunk. This ensures that the same package is not duplicated across multiple chunks, thereby reducing the bundle size.
|
|
122
|
-
|
|
123
|
-
For example, if **lodash** is being duplicated across different chunks, you can configure the **optimization.splitChunks** option in your Webpack configuration to extract **lodash** into a separate chunk:
|
|
124
|
-
|
|
125
|
-
\`\`\`
|
|
126
|
-
module.exports = {
|
|
127
|
-
optimization: {
|
|
128
|
-
splitChunks: {
|
|
129
|
-
cacheGroups: {
|
|
130
|
-
commons: {
|
|
131
|
-
test: /[\\/]node_modules[\\/]lodash[\\/]/,
|
|
132
|
-
name: 'lodash',
|
|
133
|
-
chunks: 'all',
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
};
|
|
139
|
-
\`\`\`
|
|
140
|
-
|
|
141
|
-
This configuration will automatically split out common dependencies (including those from \`node_modules\`) into separate chunks, ensuring that no package is duplicated across different chunks.
|
|
142
|
-
`}},11377:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.message=t.code=void 0,t.code="E1003",t.message={code:t.code,title:"Loader Performance Optimization",type:"markdown",category:"compile",description:`
|
|
143
|
-
#### Description
|
|
144
|
-
|
|
145
|
-
Usually the slow compile of most projects is due to the slow execution of the loaders.
|
|
146
|
-
|
|
147
|
-
And the loaders always pre-process many unnecessary files, such as \`node_modules files\` and \`already compiled files\`.
|
|
148
|
-
|
|
149
|
-
#### General Solution
|
|
150
|
-
|
|
151
|
-
Set \`exclude\` to the \`module.rules\` of webpack configuration for target loader.
|
|
152
|
-
|
|
153
|
-
For example, if \`node_modules/lodash\` is processed by the \`babel-loader\` that make the compile slowly:
|
|
154
|
-
|
|
155
|
-
\`\`\`
|
|
156
|
-
{
|
|
157
|
-
module: {
|
|
158
|
-
rules: [
|
|
159
|
-
{
|
|
160
|
-
test: /\\.js$/,
|
|
161
|
-
use: 'babel-loader',
|
|
162
|
-
exclude: [
|
|
163
|
-
/node_modules\\/lodash/
|
|
164
|
-
]
|
|
165
|
-
}
|
|
166
|
-
]
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
\`\`\`
|
|
170
|
-
`}},7490:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.message=t.code=void 0,t.code="E1004",t.message={code:t.code,title:"ECMA Version Check",type:"markdown",category:"bundle",description:`
|
|
171
|
-
#### Description
|
|
172
|
-
|
|
173
|
-
Detect if there is a newer version of ECMA syntax in the js bundle file
|
|
174
|
-
`}},24502:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.message=t.code=void 0,t.code="E1005",t.message={code:t.code,title:"Default Import Check",type:"markdown",category:"compile",description:`
|
|
175
|
-
#### Description
|
|
176
|
-
|
|
177
|
-
Usually webpack will automatically compatible different modules that has different types, but in a special case, the operation of compatibility will fail.
|
|
178
|
-
That is, when you use \`Default Import\` to import a cjs module, and this cjs module do not have the compatible statement, such as \`exports.default = \`.
|
|
179
|
-
|
|
180
|
-
#### General Solution
|
|
181
|
-
|
|
182
|
-
1. for cjs module, write a \`exports.default = \` statement for default export.
|
|
183
|
-
2. use \`Namespace Import\` for import the cjs module.
|
|
184
|
-
|
|
185
|
-
For example, for the package \`htmlparser2@7.2.0\`:
|
|
186
|
-
|
|
187
|
-
\`\`\`ts
|
|
188
|
-
// you should use this
|
|
189
|
-
import * as Parser from 'htmlparser2';
|
|
190
|
-
|
|
191
|
-
// can not use this
|
|
192
|
-
import Parser from 'htmlparser2';
|
|
193
|
-
\`\`\`
|
|
194
|
-
`}},14463:function(e,t,s){var r,l,n=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var l=Object.getOwnPropertyDescriptor(t,s);(!l||("get"in l?!t.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,l)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(r=function(e){return(r=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[t.length]=s);return t})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s=r(e),l=0;l<s.length;l++)"default"!==s[l]&&n(t,e,s[l]);return i(t,e),t}),o=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||n(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),t.RsdoctorRuleClientConstant=t.RuleErrorMap=void 0;let d=a(s(31037)),c=a(s(62999)),u=a(s(11377)),h=a(s(7490)),p=a(s(24502));t.RuleErrorMap={[d.code]:d.message,[c.code]:c.message,[u.code]:u.message,[h.code]:h.message,[p.code]:p.message},(l||(t.RsdoctorRuleClientConstant=l={})).UrlQueryForErrorCode="code",o(s(82932),t)},82932:function(e,t){var s,r,l,n;Object.defineProperty(t,"__esModule",{value:!0}),t.RuleMessageCategory=t.RuleMessageCodeEnumerated=void 0,(l=s||(t.RuleMessageCodeEnumerated=s={})).Extend="EXTEND",l.Overlay="OVERLAY",(n=r||(t.RuleMessageCategory=r={})).Compile="compile",n.Bundle="bundle",n.EMO="emo"},12722:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},75952:function(e,t,s){var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var l=Object.getOwnPropertyDescriptor(t,s);(!l||("get"in l?!t.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,l)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),l=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||r(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),l(s(14463),t),l(s(12722),t)},678:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},95752:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},86705:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},21952:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},28294:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},40911:function(e,t,s){var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var l=Object.getOwnPropertyDescriptor(t,s);(!l||("get"in l?!t.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,l)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),l=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||r(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),l(s(8660),t),l(s(79945),t),l(s(92780),t),l(s(2205),t),l(s(678),t),l(s(63266),t),l(s(49642),t),l(s(78327),t),l(s(86705),t),l(s(95752),t),l(s(10817),t),l(s(4444),t),l(s(39288),t),l(s(21952),t),l(s(64216),t),l(s(28294),t)},64216:function(e,t){var s,r;Object.defineProperty(t,"__esModule",{value:!0}),t.IMode=void 0,(r=s||(t.IMode=s={}))[r.brief=0]="brief",r[r.lite=1]="lite",r[r.normal=2]="normal"},8660:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},2205:function(e,t){var s,r,l,n,i,a;Object.defineProperty(t,"__esModule",{value:!0}),t.ToDataType=t.ModuleKind=t.DependencyKind=void 0,(n=s||(t.DependencyKind=s={}))[n.Unknown=0]="Unknown",n[n.ImportStatement=1]="ImportStatement",n[n.DynamicImport=2]="DynamicImport",n[n.RequireCall=3]="RequireCall",n[n.AMDRequire=4]="AMDRequire",(i=r||(t.ModuleKind=r={}))[i.Normal=0]="Normal",i[i.Concatenation=1]="Concatenation",(a=l||(t.ToDataType=l={}))[a.NoCode=0]="NoCode",a[a.Normal=1]="Normal",a[a.NoSource=2]="NoSource",a[a.NoSourceAndAssets=3]="NoSourceAndAssets",a[a.All=4]="All"},78327:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},92780:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},79945:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},63266:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},77847:function(e,t,s){var r,l,n,i=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var l=Object.getOwnPropertyDescriptor(t,s);(!l||("get"in l?!t.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,l)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),a=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||i(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),t.APIExtends=t.API=void 0,a(s(7321),t),(r=l||(t.API=l={})).ApplyErrorFix="/api/apply/error/fix",r.Env="/api/env",r.EntryHtml="/index.html",r.Manifest="/api/manifest.json",r.LoadDataByKey="/api/data/key",r.SendAPIDataToClient="/api/socket/send",r.GetProjectInfo="/api/project/info",r.GetClientRoutes="/api/routes",r.ReportLoader="/api/loader/report",r.GetLoaderNames="/api/loader/names",r.GetLoaderChartData="/api/loader/chart/data",r.GetLoaderFileTree="/api/loader/filetree",r.GetLoaderFileDetails="/api/loader/file",r.GetLoaderFolderStatistics="/api/loader/folder/statics",r.GetLoaderFileFirstInput="/api/loader/input",r.GetLoaderFileInputAndOutput="/api/loader/inputandoutput",r.GetDirectoriesLoaders="/api/loader/directories",r.ReportSourceMap="/api/sourcemap/report",r.GetResolverFileTree="/api/resolver/filetree",r.GetResolverFileDetails="/api/resolver/file",r.GetPluginSummary="/api/plugins/summary",r.GetPluginData="/api/plugins/data",r.GetSummaryBundles="/api/graph/bundles/summary",r.GetChunkGraph="/api/graph/chunks/graph",r.GetAssetsSummary="/api/graph/assets/summary",r.GetAssetDetails="/api/graph/asset/details",r.GetChunksByModuleId="/api/graph/chunk/module",r.GetModuleDetails="/api/graph/module/details",r.GetModulesByModuleIds="/api/graph/modules/ids",r.GetEntryPoints="/api/graph/entrypoints",r.GetModuleCodeByModuleId="/api/graph/module/code",r.GetModuleCodeByModuleIds="/api/graph/module/codes",r.GetAllModuleGraph="/api/graph/module/all",r.GetAllChunkGraph="/api/graph/chunk/all",r.GetLayers="/api/graph/layers",r.GetSearchModules="/api/search/modules",r.GetSearchModuleInChunk="/api/search/chunk/modules",r.GetAllModuleGraphFilter="/api/graph/module/filter",r.GetModuleByName="/api/graph/module/name",r.GetModuleIssuerPath="/api/graph/module/issuer_path",r.GetPackageInfo="/api/package/info",r.GetPackageDependency="/api/package/dependency",r.GetPackageRelationAlertDetails="/api/alerts/details/package/relation",r.GetOverlayAlerts="/api/alerts/overlay",r.BundleDiffManifest="/api/bundle_diff/manifest.json",r.GetBundleDiffSummary="/api/bundle_diff/summary",r.GetTileReportHtml="/api/tile/report",r.GetChunkGraphAI="/api/graph/chunks/graph/ai",r.GetChunkByIdAI="/api/graph/chunk/id/ai",(n||(t.APIExtends=n={})).GetCompileProgress="/api/progress"},7321:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},10817:function(e,t,s){var r,l=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var l=Object.getOwnPropertyDescriptor(t,s);(!l||("get"in l?!t.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,l)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||(r=function(e){return(r=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[t.length]=s);return t})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s=r(e),i=0;i<s.length;i++)"default"!==s[i]&&l(t,e,s[i]);return n(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ServerAPI=void 0,t.ServerAPI=i(s(77847))},4444:function(e,t){var s,r;Object.defineProperty(t,"__esModule",{value:!0}),t.StatementKind=void 0,(r=s||(t.StatementKind=s={}))[r.ImportDefault=100]="ImportDefault",r[r.ImportNamed=101]="ImportNamed",r[r.ImportDefaultWithNamed=102]="ImportDefaultWithNamed",r[r.ImportDefaultWithNamespace=103]="ImportDefaultWithNamespace",r[r.ImportNamespace=104]="ImportNamespace",r[r.ImportSideEffect=105]="ImportSideEffect",r[r.ImportDynamic=106]="ImportDynamic",r[r.ExportDeclaration=200]="ExportDeclaration",r[r.ExportList=201]="ExportList",r[r.ExportDefault=202]="ExportDefault",r[r.ExportAggregating=203]="ExportAggregating",r[r.ExportNamespace=204]="ExportNamespace",r[r.RequireCall=300]="RequireCall",r[r.RequireName=301]="RequireName",r[r.RequireExports=302]="RequireExports",r[r.RequireExportAggregating=303]="RequireExportAggregating",r[r.RequireExportName=304]="RequireExportName",r[r.Unknown=999]="Unknown"},49642:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},39288:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},14982:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})}}]);
|