@vitejs/devtools-rolldown 0.1.18 → 0.1.20
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.mjs +14 -0
- package/dist/nitro.json +1 -1
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/20hUiP46.js +1 -0
- package/dist/public/_nuxt/{D8Se1EWj.js → B8fJ7G-T.js} +1 -1
- package/dist/public/_nuxt/BAyxWnhM2.js +1 -0
- package/dist/public/_nuxt/BOT9W_ZD.js +1 -0
- package/dist/public/_nuxt/BP8IEXpL.js +1 -0
- package/dist/public/_nuxt/{DCPELPdh.js → BQIt7f6-2.js} +1 -1
- package/dist/public/_nuxt/BTfiKBAm.js +1 -0
- package/dist/public/_nuxt/BTkQJesx.js +1 -0
- package/dist/public/_nuxt/BWeJkag7.js +1 -0
- package/dist/public/_nuxt/BYiuS205.js +4 -0
- package/dist/public/_nuxt/{COiP6LWy.js → BdFYEjeH.js} +1 -1
- package/dist/public/_nuxt/BdMtzkAy2.js +1 -0
- package/dist/public/_nuxt/{CnkQlf-T.js → BqiFImA_.js} +1 -1
- package/dist/public/_nuxt/{D-KdwVBL.js → C5iGLYf8.js} +1 -1
- package/dist/public/_nuxt/CBfhMqaX.js +1 -0
- package/dist/public/_nuxt/CHmEnixh2.js +1 -0
- package/dist/public/_nuxt/CJdYjM__.js +1 -0
- package/dist/public/_nuxt/CK6Xn-O82.js +1 -0
- package/dist/public/_nuxt/{BhOKQpS-.js → CKlr0Tan.js} +1 -1
- package/dist/public/_nuxt/CUBdwZVs.js +3 -0
- package/dist/public/_nuxt/CWusIlaG.js +1 -0
- package/dist/public/_nuxt/CavyT85L2.js +1 -0
- package/dist/public/_nuxt/CbQbsbZd.js +1 -0
- package/dist/public/_nuxt/CcXFxXMQ.js +2 -0
- package/dist/public/_nuxt/CgIVM_ZA.js +1 -0
- package/dist/public/_nuxt/{BQl8ArzK.js → CvnFxGBE.js} +1 -1
- package/dist/public/_nuxt/CxYeQaBW.js +1 -0
- package/dist/public/_nuxt/Cz_QngRP.js +1 -0
- package/dist/public/_nuxt/{D_zbH50i.js → D00v5GDJ.js} +1 -1
- package/dist/public/_nuxt/D8ugdtv-.js +1 -0
- package/dist/public/_nuxt/DEiLiWhM2.js +1 -0
- package/dist/public/_nuxt/DKJ20h2B.js +12 -0
- package/dist/public/_nuxt/{DeejVvnS.js → DU7iNs37.js} +1 -1
- package/dist/public/_nuxt/{XfS7e3PM.js → ENNcF9U5.js} +1 -1
- package/dist/public/_nuxt/{3TymDptH.js → P_nXTQEe.js} +1 -1
- package/dist/public/_nuxt/{erfZtSN7.js → bqLEejUC.js} +1 -1
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/6ec89d4d-a88a-4396-9292-3f2655baa827.json +1 -0
- package/dist/public/_nuxt/{entry.MyI9ZDYQ.css → entry.DguO3VpB.css} +1 -1
- package/dist/public/_nuxt/error-404.D0uDCatO.css +1 -0
- package/dist/public/_nuxt/error-500.DSBLz6Ry.css +1 -0
- package/dist/public/_nuxt/qpeZMqnF.js +1 -0
- package/dist/public/_nuxt/{D2AP-caS.js → x1vnwfQM.js} +1 -1
- package/dist/public/_nuxt/zt8ARaaw.js +1 -0
- package/dist/public/index.html +1 -1
- package/package.json +11 -11
- package/dist/public/_nuxt/-w-An_zz.js +0 -1
- package/dist/public/_nuxt/8kHoufi2.js +0 -1
- package/dist/public/_nuxt/A14j6IXQ.js +0 -12
- package/dist/public/_nuxt/B2NMBmj_.js +0 -1
- package/dist/public/_nuxt/BE1TLHgg.js +0 -1
- package/dist/public/_nuxt/BSjCyhkj2.js +0 -1
- package/dist/public/_nuxt/BYXvfkhc.js +0 -1
- package/dist/public/_nuxt/Bc5RWlzj.js +0 -1
- package/dist/public/_nuxt/BtpeuWVj2.js +0 -1
- package/dist/public/_nuxt/C--RKQDq.js +0 -3
- package/dist/public/_nuxt/C8iXMxN52.js +0 -1
- package/dist/public/_nuxt/CA0N7And.js +0 -1
- package/dist/public/_nuxt/CAonW3eZ.js +0 -1
- package/dist/public/_nuxt/CFOnv7GG2.js +0 -1
- package/dist/public/_nuxt/CPRbmyEw.js +0 -2
- package/dist/public/_nuxt/CXhLP-Vi2.js +0 -1
- package/dist/public/_nuxt/Cdb7S98v.js +0 -1
- package/dist/public/_nuxt/DCcvbzkD.js +0 -1
- package/dist/public/_nuxt/DGOkTiBT.js +0 -1
- package/dist/public/_nuxt/D_gteVIt.js +0 -1
- package/dist/public/_nuxt/Dg9zMuGl2.js +0 -1
- package/dist/public/_nuxt/Dlysmnsb.js +0 -1
- package/dist/public/_nuxt/DpW0qpWn.js +0 -4
- package/dist/public/_nuxt/DvZ2T9qR.js +0 -1
- package/dist/public/_nuxt/builds/meta/69c2ed4b-4f34-4221-8292-fc8e40a986a8.json +0 -1
- package/dist/public/_nuxt/error-404.DkiWPM7Q.css +0 -1
- package/dist/public/_nuxt/error-500.Wfu13SYC.css +0 -1
- package/dist/public/_nuxt/jJY8e3xp.js +0 -1
- /package/dist/public/_nuxt/{qIAw3Eg02.js → D1iwru-F2.js} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{M as e,O as t,a as n,b as r,q as i,w as a,wt as o,x as s,yt as c}from"./CUBdwZVs.js";import{t as l}from"./CxYeQaBW.js";var u=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),d={class:`flex gap-2 group`,w140:``,p4:``,relative:``},f={width:`1123`,height:`47`,viewBox:`0 0 1123 47`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},p={"clip-path":`url(#clip0_12_249)`},m=[`fill`],h=[`fill`],g=[`fill`],_=Object.assign(e({__name:`LogoBanner`,setup(e){let n=r(()=>l.value?`white`:`#08060E`);return(e,r)=>(i(),a(`div`,d,[r[2]||=s(`div`,{op10:``,"group-hover":`op100`,transition:``,"duration-800":``,class:`absolute -bottom-[10px] -left-[20px] w-[80px] h-[80px] bg-linear-to-b from-[#ff4100] to-transparent blur-[30px]`},null,-1),r[3]||=s(`div`,{op10:``,"group-hover":`op100`,transition:``,"duration-800":``,class:`absolute -top-[10px] left-300px w-[80px] h-[80px] bg-[linear-gradient(270deg,_#ff00b3,_#ff00b3cc_60%,_#ff4100cc,_#ff410000)] blur-[30px]`},null,-1),(i(),a(`svg`,f,[s(`g`,p,[s(`path`,{d:`M84.875 0C103.939 0 113.956 8.014 113.956 23.395C113.956 38.776 103.939 46.789 84.875 46.789C65.811 46.789 55.859 38.775 55.858 23.395C55.858 8.014 65.811 0 84.875 0ZM304.339 0C323.403 0 333.42 8.014 333.42 23.395C333.42 38.776 323.403 46.789 304.339 46.789C285.275 46.789 275.322 38.775 275.322 23.395C275.322 8.014 285.274 0 304.339 0ZM35.349 0.775C45.689 0.775 51.571 6.139 51.571 15.575C51.571 21.003 48.986 25.01 44.98 27.337L51.765 46.013H35.285L30.567 31.343H15.51V46.013H0V0.775H35.349ZM135.411 34.705H162.488V46.013H119.9V0.775H135.411V34.705ZM183.791 34.705H210.869V46.013H168.281V0.775H183.791V34.705ZM245.53 0.774C261.234 0.774 270.217 7.884 270.217 23.394C270.217 38.904 261.169 46.012 245.465 46.012H217.095V0.775L245.53 0.774ZM356.661 31.86L363.253 8.854H380.637L387.616 32.764L393.109 0.776H408.232L398.926 46.014H379.345L371.849 20.423L364.546 46.013H344.899L335.594 0.776H350.975L356.661 31.86ZM432.876 0.775L451.553 30.18H451.682V0.775H466.417V46.013H447.805L428.999 16.48H428.805V46.013H414.135V0.775H432.876ZM84.875 11.115C75.892 11.115 71.691 14.993 71.691 23.395C71.691 31.795 75.892 35.608 84.875 35.608C93.858 35.608 98.058 31.86 98.058 23.395C98.058 14.93 93.858 11.115 84.875 11.115ZM304.339 11.115C295.356 11.115 291.155 14.993 291.155 23.395C291.155 31.795 295.356 35.608 304.339 35.608C313.322 35.608 317.522 31.86 317.522 23.395C317.522 14.93 313.322 11.115 304.339 11.115ZM232.604 35.026H243.333C250.7 35.026 254.318 31.86 254.318 23.394C254.318 14.928 250.7 11.762 243.333 11.762H232.604V35.026ZM15.51 20.68H30.955C34.122 20.68 35.673 19 35.673 16.027C35.673 13.054 34.122 11.438 30.955 11.438H15.51V20.68Z`,fill:n.value},null,8,m),r[0]||=t(`<path d="M530.998 0.773438C531.957 0.773438 532.48 1.89144 531.866 2.62844L521.423 15.1604C520.195 16.6334 521.242 18.8714 523.161 18.8714H533.262C534.221 18.8714 534.744 19.9894 534.13 20.7264L513.922 44.9804C513.816 45.108 513.683 45.2107 513.533 45.2811C513.383 45.3516 513.219 45.3881 513.053 45.3881C512.887 45.3881 512.723 45.3516 512.573 45.2811C512.423 45.2107 512.29 45.108 512.184 44.9804L491.975 20.7284C491.361 19.9914 491.885 18.8734 492.844 18.8734H502.942C504.859 18.8734 505.909 16.6354 504.681 15.1624L494.237 2.62844C493.623 1.89144 494.147 0.773438 495.105 0.773438H530.998Z" fill="#FF4100"></path><mask id="mask0_12_249" style="mask-type:alpha;" maskUnits="userSpaceOnUse" x="491" y="0" width="44" height="46"><path d="M530.998 0.773438C531.957 0.773438 532.48 1.89144 531.866 2.62844L521.423 15.1604C520.195 16.6334 521.242 18.8714 523.161 18.8714H533.262C534.221 18.8714 534.744 19.9904 534.13 20.7264L513.922 44.9804C513.816 45.108 513.683 45.2107 513.533 45.2811C513.383 45.3516 513.219 45.3881 513.053 45.3881C512.887 45.3881 512.723 45.3516 512.573 45.2811C512.423 45.2107 512.29 45.108 512.184 44.9804L491.975 20.7284C491.361 19.9924 491.885 18.8734 492.844 18.8734H502.942C504.859 18.8734 505.909 16.6354 504.681 15.1624L494.237 2.62844C493.623 1.89144 494.147 0.773438 495.105 0.773438H530.998Z" fill="black"></path></mask><g mask="url(#mask0_12_249)"><g filter="url(#filter0_f_12_249)"><path d="M522.914 21.3028C520.339 19.8011 523.571 9.4636 530.133 -1.78663C536.695 -13.0369 544.101 -20.9396 546.676 -19.4379C549.251 -17.9361 546.019 -7.59863 539.457 3.6516C532.895 14.9018 525.489 22.8046 522.914 21.3028Z" fill="#FFE6E4"></path></g><g filter="url(#filter1_f_12_249)"><path d="M521.765 44.2794C519.191 42.7777 522.423 32.4402 528.984 21.1899C535.546 9.9397 542.953 2.03698 545.527 3.5387C548.102 5.04042 544.87 15.3779 538.308 26.6282C531.747 37.8784 524.34 45.7811 521.765 44.2794Z" fill="#FFE6E4"></path></g><g filter="url(#filter2_f_12_249)"><path d="M505.243 19.0907C506.903 17.8808 502.491 9.00184 495.388 -0.740904C488.285 -10.4836 481.182 -17.4008 479.522 -16.1909C477.863 -14.9809 482.275 -6.10195 489.378 3.6408C496.48 13.3835 503.584 20.3007 505.243 19.0907Z" fill="#FF00B3"></path></g><g filter="url(#filter3_f_12_249)"><path d="M510.988 51.7548C512.647 50.5448 508.235 41.6659 501.132 31.9231C494.029 22.1804 486.926 15.2632 485.266 16.4732C483.607 17.6832 488.019 26.5621 495.122 36.3049C502.225 46.0476 509.328 52.9648 510.988 51.7548Z" fill="#FF00B3"></path></g><g filter="url(#filter4_f_12_249)"><path d="M520.885 19.0986C519.225 17.8886 523.638 9.00965 530.74 -0.733098C537.843 -10.4758 544.946 -17.393 546.606 -16.183C548.266 -14.9731 543.853 -6.09413 536.751 3.64861C529.648 13.3914 522.545 20.3085 520.885 19.0986Z" fill="#FF00B3"></path></g><g filter="url(#filter5_f_12_249)"><path d="M513.991 51.7548C512.332 50.5448 516.744 41.6659 523.847 31.9232C530.95 22.1804 538.053 15.2632 539.713 16.4732C541.372 17.6832 536.96 26.5621 529.857 36.3049C522.754 46.0476 515.651 52.9648 513.991 51.7548Z" fill="#FF00B3"></path></g><g filter="url(#filter6_f_12_249)"><path d="M517.438 19.0986C515.778 17.8886 520.191 9.00965 527.294 -0.733098C534.396 -10.4758 541.5 -17.393 543.159 -16.183C544.819 -14.9731 540.407 -6.09413 533.304 3.64861C526.201 13.3914 519.098 20.3085 517.438 19.0986Z" fill="#FF00B3"></path></g><g filter="url(#filter7_f_12_249)"><path d="M511.695 51.7548C510.035 50.5448 514.447 41.6659 521.55 31.9232C528.653 22.1804 535.756 15.2632 537.416 16.4732C539.075 17.6832 534.663 26.5621 527.56 36.3049C520.458 46.0476 513.354 52.9648 511.695 51.7548Z" fill="#FF00B3"></path></g><g filter="url(#filter8_f_12_249)"><path d="M509.95 20.8515C512.203 18.8996 507.115 9.33806 498.586 -0.50467C490.056 -10.3474 481.316 -16.7441 479.064 -14.7922C476.811 -12.8402 481.899 -3.2787 490.428 6.56403C498.957 16.4068 507.697 22.8035 509.95 20.8515Z" fill="#E23D14"></path></g><g filter="url(#filter9_f_12_249)"><path d="M512.003 47.6172C514.417 45.8699 510.186 35.8997 502.551 25.3482C494.916 14.7966 486.77 7.65931 484.355 9.40659C481.94 11.1539 486.172 21.124 493.806 31.6756C501.441 42.2272 509.588 49.3645 512.003 47.6172Z" fill="#E23D14"></path></g></g>`,3),s(`path`,{d:`M481.842 0C472.643 13.166 472.59 33.575 481.842 46.789H488.057C478.807 33.575 478.86 13.166 488.057 0H481.842ZM544.263 0H538.048C547.247 13.166 547.3 33.575 538.048 46.789H544.263C553.513 33.575 553.459 13.166 544.263 0Z`,fill:n.value},null,8,h)]),s(`path`,{d:`M570 46.221V0.779005H605.216C624.665 0.779005 635.79 7.98481 635.79 23.5C635.79 39.0801 624.585 46.221 605.136 46.221H570ZM616.101 23.5C616.101 14.9959 611.619 11.8149 602.495 11.8149H589.209V35.1851H602.495C611.619 35.1851 616.101 32.0041 616.101 23.5ZM645.582 46.221V0.779005H700.887V11.8149H664.791V17.9171H700.327V28.6285H664.791V35.1851H701.928V46.221H645.582ZM726.183 0.779005L740.99 33.4972L755.556 0.779005H775.485L753.395 46.221H727.783L705.693 0.779005H726.183ZM799.702 46.221V11.9447H778.172V0.779005H840.44V11.9447H818.91V46.221H799.702ZM878.247 47C854.636 47 842.31 38.9503 842.31 23.5C842.31 8.04972 854.636 0 878.247 0C901.857 0 914.263 8.04972 914.263 23.5C914.263 38.9503 901.857 47 878.247 47ZM878.247 35.7693C889.372 35.7693 894.574 31.9392 894.574 23.5C894.574 14.9959 889.372 11.1657 878.247 11.1657C867.121 11.1657 861.919 14.9959 861.919 23.5C861.919 31.9392 867.121 35.7693 878.247 35.7693ZM956.486 47C932.875 47 920.549 38.9503 920.549 23.5C920.549 8.04972 932.875 0 956.486 0C980.096 0 992.502 8.04972 992.502 23.5C992.502 38.9503 980.096 47 956.486 47ZM956.486 35.7693C967.611 35.7693 972.813 31.9392 972.813 23.5C972.813 14.9959 967.611 11.1657 956.486 11.1657C945.36 11.1657 940.158 14.9959 940.158 23.5C940.158 31.9392 945.36 35.7693 956.486 35.7693ZM1002.23 46.221V0.779005H1021.44V34.8605H1054.97V46.221H1002.23ZM1090.83 47C1067.93 47 1058.25 42.1961 1058.25 31.0304V30.9655H1077.7V31.0304C1077.7 34.7956 1080.82 36.808 1090.83 36.808C1101.15 36.808 1103.55 35.25 1103.55 32.8481C1103.55 30.7058 1101.79 29.732 1097.95 29.4724L1081.62 28.4337C1064.33 27.3301 1059.05 23.0456 1059.05 14.866C1059.05 4.99862 1069.62 0 1091.15 0C1113.16 0 1122.04 4.60912 1122.04 15.2555V15.3854H1102.91V15.2555C1102.91 11.4903 1100.03 10.0622 1090.83 10.0622C1081.14 10.0622 1078.18 11.4903 1078.18 14.0221C1078.18 16.2293 1080.34 17.0732 1085.38 17.3978L1101.55 18.3715C1116.76 19.2804 1123 23.2403 1123 31.7445C1123 41.547 1113.96 47 1090.83 47Z`,fill:n.value},null,8,g),r[1]||=t(`<defs><filter id="filter0_f_12_249" x="515.134" y="-26.5112" width="39.3207" height="54.8896" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="3.447" result="effect1_foregroundBlur_12_249"></feGaussianBlur></filter><filter id="filter1_f_12_249" x="513.986" y="-3.53463" width="39.3207" height="54.8896" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="3.447" result="effect1_foregroundBlur_12_249"></feGaussianBlur></filter><filter id="filter2_f_12_249" x="472.279" y="-23.2221" width="40.2079" height="49.3427" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="3.447" result="effect1_foregroundBlur_12_249"></feGaussianBlur></filter><filter id="filter3_f_12_249" x="478.023" y="9.44194" width="40.2079" height="49.3427" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="3.447" result="effect1_foregroundBlur_12_249"></feGaussianBlur></filter><filter id="filter4_f_12_249" x="513.642" y="-23.2143" width="40.2079" height="49.3427" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="3.447" result="effect1_foregroundBlur_12_249"></feGaussianBlur></filter><filter id="filter5_f_12_249" x="506.748" y="9.44194" width="40.2079" height="49.3427" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="3.447" result="effect1_foregroundBlur_12_249"></feGaussianBlur></filter><filter id="filter6_f_12_249" x="510.195" y="-23.2143" width="40.2079" height="49.3427" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="3.447" result="effect1_foregroundBlur_12_249"></feGaussianBlur></filter><filter id="filter7_f_12_249" x="504.451" y="9.44194" width="40.2079" height="49.3427" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="3.447" result="effect1_foregroundBlur_12_249"></feGaussianBlur></filter><filter id="filter8_f_12_249" x="471.636" y="-22.0346" width="45.7411" height="50.1318" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="3.447" result="effect1_foregroundBlur_12_249"></feGaussianBlur></filter><filter id="filter9_f_12_249" x="476.782" y="2.24662" width="42.7939" height="52.5302" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="3.447" result="effect1_foregroundBlur_12_249"></feGaussianBlur></filter><clipPath id="clip0_12_249"><rect width="552" height="47" fill="white"></rect></clipPath></defs>`,1)]))]))}}),{__name:`VisualLogoBanner`}),v=`/.devtools/`,ee=`.connection.json`,te=`.rpc-dump/index.json`;function ne(e){return typeof e==`string`?`'${e}'`:new re().serialize(e)}var re=function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?e.localeCompare(t):n===`number`&&r===`number`?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(r,Object.entries(e))}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t?.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e}(),ie=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],ae=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],oe=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,y=[],se=class{_data=new ce;_hash=new ce([...ie]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)y[n]=e[t+n]|0;else{let e=y[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=y[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;y[n]=t+y[n-7]+i+y[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+ae[n]+y[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=ce.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new ce(t,i)}},ce=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(oe.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function le(e){return new se().finalize(e).toBase64()}function ue(e){return le(ne(e))}var de=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>ue(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}};function fe(e){return`[${e.code}]`}function pe(e){let t=`${fe(e)} ${e.message}`,n=[];return e.why&&n.push(`why: ${e.why}`),e.fix&&n.push(`fix: ${e.fix}`),e.hint&&n.push(`hint: ${e.hint}`),e.docs&&n.push(`see: ${e.docs}`),n.length===0?t:[t,...n.map((e,t)=>`${t<n.length-1?`├▶`:`╰▶`} ${e}`)].join(`
|
|
2
|
+
`)}var me=pe;function b(e,t){if(e!=null)return typeof e==`function`?e(t):e}function he(e){let{docsBase:t,codes:n}=e,r={},i=Object.keys(n);for(let e of i){let i=n[e];r[e]=(n,r)=>{let a=typeof i.message==`function`||typeof i.fix==`function`||typeof i.why==`function`||typeof i.hint==`function`,o=a?n:void 0,s=a?r:n,c=typeof t==`function`?t(e):t==null?void 0:`${t}/${e.toLowerCase()}`;return{code:e,level:i.level??`error`,message:b(i.message,o),...c!=null&&{docs:c},...b(i.fix,o)!=null&&{fix:b(i.fix,o)},...b(i.why,o)!=null&&{why:b(i.why,o)},...b(i.hint,o)!=null&&{hint:b(i.hint,o)},...s}}}return Object.defineProperties(r,{codes:{value:()=>i,enumerable:!1},has:{value:e=>e in n,enumerable:!1},get:{value:e=>n[e],enumerable:!1},extend:{value:t=>he({...e,codes:{...n,...t}}),enumerable:!1}}),r}var ge=class extends Error{diagnostic;constructor(e){super(`[${e.code}] ${e.message}`),this.name=`CodedError`,this.diagnostic=e,e.cause!=null&&(this.cause=e.cause)}},_e=(e,t)=>{e.level===`error`?console.error(t):console.warn(t)};function x(){let e={};if(typeof Error.captureStackTrace==`function`?Error.captureStackTrace(e,x):e.stack=Error().stack,!e.stack)return;let t=e.stack.split(`
|
|
3
|
+
`),n=0;for(;n<t.length&&!t[n].trimStart().startsWith(`at `);)n++;let r=typeof Error.captureStackTrace==`function`?1:2,i=t.slice(n+r).filter(e=>!e.includes(`/node_modules/`)&&!e.includes(`(node:`)).map(e=>e.trim());return i.length>0?i.join(`
|
|
4
|
+
`):void 0}function S(e,t,n){let r=e(n);for(let e of t)e(n,r);return r}function ve(e,t,n,r){return Object.assign({},e,{throw(){let i=r?x():void 0,a=i?{...e,stack:i}:e;throw S(t,n,a),new ge(a)},warn(){let i=r?x():void 0;S(t,n,{...e,level:`warn`,...i&&{stack:i}})},error(){let i=r?x():void 0;S(t,n,{...e,level:`error`,...i&&{stack:i}})},log(){let i=r?x():void 0;S(t,n,i?{...e,stack:i}:e)},format(){return t(e)}})}function ye(e){let t=e.formatter??me,n=Array.isArray(e.reporters)?e.reporters:[e.reporters??_e],r=e.captureStack!==!1,i={};for(let a of e.diagnostics){let e=typeof a.codes==`function`?a.codes():Object.keys(a);for(let o of e)typeof a[o]==`function`&&(i[o]=(...e)=>ve(a[o](...e),t,n,r))}return i.throw=e=>{let i=r?x():void 0,a=i?{...e,stack:i}:e;throw S(t,n,a),new ge(a)},i.warn=e=>{let i=r?x():void 0;S(t,n,{...e,level:`warn`,...i&&{stack:i}})},i.error=e=>{let i=r?x():void 0;S(t,n,{...e,level:`error`,...i&&{stack:i}})},i.log=e=>{let i=r?x():void 0;S(t,n,i?{...e,stack:i}:e)},i.format=e=>t(e),i}var C=ye({diagnostics:[he({docsBase:`https://devfra.me/errors`,codes:{DF0019:{message:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is not \`true\` — MCP requires JSON-serializable data.`,hint:"Set `jsonSerializable: true` if the payload is JSON-safe, or remove `agent` to keep it RPC-only."},DF0020:{message:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,hint:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{message:e=>`RPC function "${e.name}" is already registered`,hint:"Use the `force` parameter to overwrite an existing registration."},DF0022:{message:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{message:e=>`RPC function "${e.name}" is not registered`},DF0024:{message:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{message:e=>`Function "${e.name}" not found in dump store`},DF0026:{message:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{message:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{message:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,hint:"Remove `snapshot: true`, or change the function type to `query`."}}})],formatter:me,reporters:_e});async function be(e,t){return e.__resolved?e.__resolved:e.setup?(e.__promise??=Promise.resolve(e.setup(t)).then(t=>(e.__resolved=t,e.__promise=void 0,t)),e.__resolved??=await e.__promise):{}}async function xe(e,t){if(e.handler)return e.handler;let n=await be(e,t);if(!n.handler)throw C.DF0024({name:e.name}).throw();return n.handler}var Se=class{definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return xe(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw C.DF0021({name:e.name}).throw();Ce(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw C.DF0022({name:e.name}).throw();Ce(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await xe(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw C.DF0023({name:String(e)}).throw();return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function Ce(e){if(e.agent&&e.jsonSerializable!==!0)throw C.DF0019({name:e.name}).throw()}var we=typeof self==`object`?self:globalThis;function Te(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new we[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new we[a](o),i)};return r}function Ee(e){return Te(new Map,e)(0)}var w=``,{toString:De}={},{keys:Oe}=Object;function ke(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=De.call(e).slice(8,-1);switch(n){case`Array`:return[1,w];case`Object`:return[2,w];case`Date`:return[3,w];case`RegExp`:return[4,w];case`Map`:return[5,w];case`Set`:return[6,w];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function Ae([e,t]){return e===0&&(t===`function`||t===`symbol`)}function je(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=ke(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Oe(r))(e||!Ae(ke(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Ae(ke(n))||Ae(ke(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Ae(ke(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function Me(e,t={}){let n=[];return je(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:Ne,stringify:Pe}=JSON,Fe={json:!0,lossy:!0};function Ie(e){return Ee(Ne(e))}function Le(e){return Pe(Me(e,Fe))}function Re(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw T(t,`undefined`,r,e);return n}if(i===null)return n;if(typeof i==`bigint`)throw T(t,`BigInt`,r,e);if(typeof i==`object`){if(i instanceof Map)throw T(t,`Map`,r,e);if(i instanceof Set)throw T(t,`Set`,r,e);if(i instanceof Date)throw T(t,`Date`,r,e);if(Array.isArray(i))return n;let a=Object.getPrototypeOf(i);if(a!==null&&a!==Object.prototype)throw T(t,i.constructor?.name??`class instance`,r,e)}return n})}function T(e,t,n,r){let i=ze(n,r);return C.DF0020({name:e||`<anonymous>`,type:t,path:i}).throw()}function ze(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}function Be(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e<t;e++){let t=r[e];t&&t(...n)}}function n(n,...r){t(n,...r),delete e[n]}function r(t,n){return(e[t]||=[]).push(n),()=>{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var Ve=u((e=>{var t=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,`__esModule`,{value:!0}),e.minLength=e.maxLength=e.poolSize=e.humanId=e.adverbs=e.verbs=e.nouns=e.adjectives=void 0,e.adjectives=`afraid.all.beige.better.big.blue.bold.brave.breezy.bright.brown.bumpy.busy.calm.chatty.chilly.chubby.clean.clear.clever.cold.common.cool.cozy.crisp.cuddly.curly.curvy.cute.cyan.dark.deep.dirty.dry.dull.eager.early.easy.eight.eighty.eleven.empty.every.fair.famous.fancy.fast.few.fiery.fifty.fine.five.flat.floppy.fluffy.forty.four.frank.free.fresh.fruity.full.funky.funny.fuzzy.gentle.giant.gold.good.goofy.great.green.grumpy.happy.heavy.hip.honest.hot.huge.humble.hungry.icy.itchy.jolly.khaki.kind.large.late.lazy.legal.lemon.light.little.long.loose.loud.lovely.lucky.major.many.metal.mighty.modern.moody.neat.new.nice.nine.ninety.odd.old.olive.open.orange.perky.petite.pink.plain.plenty.polite.pretty.proud.public.puny.purple.quick.quiet.rare.ready.real.red.rich.ripe.salty.seven.shaggy.shaky.sharp.shiny.short.shy.silent.silly.silver.six.sixty.slick.slimy.slow.small.smart.smooth.social.soft.solid.some.sour.sparkly.spicy.spotty.stale.strict.strong.sunny.sweet.swift.tall.tame.tangy.tasty.ten.tender.thick.thin.thirty.three.tidy.tiny.tired.tough.tricky.true.twelve.twenty.two.upset.vast.violet.wacky.warm.wet.whole.wicked.wide.wild.wise.witty.yellow.young.yummy`.split(`.`),e.nouns=`actors.ads.adults.aliens.animals.ants.apes.apples.areas.baboons.badgers.bags.balloons.bananas.banks.bars.baths.bats.beans.bears.beds.beers.bees.berries.bikes.birds.boats.bobcats.books.bottles.boxes.breads.brooms.buckets.bugs.buses.bushes.buttons.camels.cameras.candies.candles.canyons.carpets.carrots.cars.cases.cats.chairs.chefs.chicken.cities.clocks.cloths.clouds.clowns.clubs.coats.cobras.coins.colts.comics.cooks.corners.cougars.cows.crabs.crews.cups.cycles.dancers.days.deer.deserts.dingos.dodos.dogs.dolls.donkeys.donuts.doodles.doors.dots.dragons.drinks.dryers.ducks.eagles.ears.eels.eggs.emus.ends.experts.eyes.facts.falcons.fans.feet.files.flies.flowers.forks.foxes.friends.frogs.games.garlics.geckos.geese.ghosts.gifts.glasses.goats.grapes.groups.guests.hairs.hands.hats.heads.hoops.hornets.horses.hotels.hounds.houses.humans.icons.ideas.impalas.insects.islands.items.jars.jeans.jobs.jokes.keys.kids.kings.kiwis.knives.lamps.lands.laws.lemons.lies.lights.lilies.lines.lions.lizards.llamas.loops.mails.mammals.mangos.maps.masks.meals.melons.memes.meteors.mice.mirrors.moles.moments.monkeys.months.moons.moose.mugs.nails.needles.news.nights.numbers.olives.onions.oranges.otters.owls.pandas.pans.pants.papayas.papers.parents.parks.parrots.parts.paths.paws.peaches.pears.peas.pens.pets.phones.pianos.pigs.pillows.places.planes.planets.plants.plums.poems.poets.points.pots.pugs.pumas.queens.rabbits.radios.rats.ravens.readers.regions.results.rice.rings.rivers.rockets.rocks.rooms.roses.rules.sails.schools.seals.seas.sheep.shirts.shoes.showers.shrimps.sides.signs.singers.sites.sloths.snails.snakes.socks.spiders.spies.spoons.squids.stamps.stars.states.steaks.streets.suits.suns.swans.symbols.tables.taxes.taxis.teams.teeth.terms.things.ties.tigers.times.tips.tires.toes.tools.towns.toys.trains.trams.trees.turkeys.turtles.vans.views.walls.wasps.waves.ways.webs.weeks.windows.wings.wolves.wombats.words.worlds.worms.yaks.years.zebras.zoos`.split(`.`),e.verbs=`accept.act.add.admire.agree.allow.appear.argue.arrive.ask.attack.attend.bake.bathe.battle.beam.beg.begin.behave.bet.boil.bow.brake.brush.build.burn.buy.call.camp.care.carry.change.cheat.check.cheer.chew.clap.clean.cough.count.cover.crash.create.cross.cry.cut.dance.decide.deny.design.dig.divide.do.double.doubt.draw.dream.dress.drive.drop.drum.eat.end.enjoy.enter.exist.fail.fall.feel.fetch.film.find.fix.flash.float.flow.fly.fold.follow.fry.give.glow.go.grab.greet.grin.grow.guess.hammer.hang.happen.heal.hear.help.hide.hope.hug.hunt.invent.invite.itch.jam.jog.join.joke.judge.juggle.jump.kick.kiss.kneel.knock.know.laugh.lay.lead.learn.leave.lick.lie.like.listen.live.look.lose.love.make.march.marry.mate.matter.melt.mix.move.nail.notice.obey.occur.open.own.pay.peel.pick.play.poke.post.press.prove.pull.pump.punch.push.raise.read.refuse.relate.relax.remain.repair.repeat.reply.report.rescue.rest.retire.return.rhyme.ring.roll.rule.run.rush.say.scream.search.see.sell.send.serve.shake.share.shave.shine.shop.shout.show.sin.sing.sink.sip.sit.sleep.slide.smash.smell.smile.smoke.sneeze.sniff.sort.speak.spend.stand.stare.start.stay.stick.stop.strive.study.swim.switch.take.talk.tan.tap.taste.teach.tease.tell.thank.think.throw.tickle.tie.trade.train.travel.try.turn.type.unite.vanish.visit.wait.walk.warn.wash.watch.wave.wear.win.wink.wish.wonder.work.worry.write.yawn.yell`.split(`.`),e.adverbs=[`bravely`,`brightly`,`busily`,`daily`,`freely`,`hungrily`,`joyously`,`knowingly`,`lazily`,`noisily`,`oddly`,`politely`,`quickly`,`quietly`,`rapidly`,`safely`,`sleepily`,`slowly`,`truly`,`yearly`];function n(e){return e[Math.floor(Math.random()*e.length)]}function r(e){return e.reduce(function(e,t){return e.length>t.length?e:t})}function i(e){return e.reduce(function(e,t){return e.length<t.length?e:t})}function a(r){r===void 0&&(r={}),typeof r==`string`&&(r={separator:r}),typeof r==`boolean`&&(r={capitalize:r});var i=r.separator,a=i===void 0?``:i,o=r.capitalize,s=o===void 0?!0:o,c=r.adjectiveCount,l=c===void 0?1:c,u=r.addAdverb,d=u===void 0?!1:u,f=t(t(t([],t([],Array(l),!0).map(function(t){return n(e.adjectives)}),!0),[n(e.nouns),n(e.verbs)],!1),d?[n(e.adverbs)]:[],!0);return s&&(f=f.map(function(e){return e.charAt(0).toUpperCase()+e.substr(1)})),f.join(a)}e.humanId=a;function o(t){t===void 0&&(t={});var n=t.adjectiveCount,r=n===void 0?1:n,i=t.addAdverb,a=i===void 0?!1:i;return e.adjectives.length*r*e.nouns.length*e.verbs.length*(a?e.adverbs.length:1)}e.poolSize=o;function s(t){t===void 0&&(t={});var n=t.adjectiveCount,i=n===void 0?1:n,a=t.addAdverb,o=a===void 0?!1:a,s=t.separator,c=s===void 0?``:s;return r(e.adjectives).length*i+i*c.length+r(e.nouns).length+c.length+r(e.verbs).length+(o?r(e.adverbs).length+c.length:0)}e.maxLength=s;function c(t){t===void 0&&(t={});var n=t.adjectiveCount,r=n===void 0?1:n,a=t.addAdverb,o=a===void 0?!1:a,s=t.separator,c=s===void 0?``:s;return i(e.adjectives).length*r+r*c.length+i(e.nouns).length+c.length+i(e.verbs).length+(o?i(e.adverbs).length+c.length:0)}e.minLength=c,e.default=a}))(),He=Symbol.for(`immer-nothing`),Ue=Symbol.for(`immer-draftable`),E=Symbol.for(`immer-state`);function D(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var O=Object,k=O.getPrototypeOf,We=`constructor`,A=`prototype`,Ge=`configurable`,Ke=`enumerable`,qe=`writable`,Je=`value`,j=e=>!!e&&!!e[E];function M(e){return e?Ze(e)||nt(e)||!!e[Ue]||!!e[We]?.[Ue]||rt(e)||it(e):!1}var Ye=O[A][We].toString(),Xe=new WeakMap;function Ze(e){if(!e||!F(e))return!1;let t=k(e);if(t===null||t===O[A])return!0;let n=O.hasOwnProperty.call(t,We)&&t[We];if(n===Object)return!0;if(!I(n))return!1;let r=Xe.get(n);return r===void 0&&(r=Function.toString.call(n),Xe.set(n,r)),r===Ye}function Qe(e,t,n=!0){N(e)===0?(n?Reflect.ownKeys(e):O.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function N(e){let t=e[E];return t?t.type_:nt(e)?1:rt(e)?2:it(e)?3:0}var $e=(e,t,n=N(e))=>n===2?e.has(t):O[A].hasOwnProperty.call(e,t),P=(e,t,n=N(e))=>n===2?e.get(t):e[t],et=(e,t,n,r=N(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function tt(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var nt=Array.isArray,rt=e=>e instanceof Map,it=e=>e instanceof Set,F=e=>typeof e==`object`,I=e=>typeof e==`function`,at=e=>typeof e==`boolean`;function ot(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var st=e=>F(e)?e?.[E]:null,L=e=>e.copy_||e.base_,ct=e=>e.modified_?e.copy_:e.base_;function lt(e,t){if(rt(e))return new Map(e);if(it(e))return new Set(e);if(nt(e))return Array[A].slice.call(e);let n=Ze(e);if(t===!0||t===`class_only`&&!n){let t=O.getOwnPropertyDescriptors(e);delete t[E];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[qe]===!1&&(a[qe]=!0,a[Ge]=!0),(a.get||a.set)&&(t[i]={[Ge]:!0,[qe]:!0,[Ke]:a[Ke],[Je]:e[i]})}return O.create(k(e),t)}else{let t=k(e);if(t!==null&&n)return{...e};let r=O.create(t);return O.assign(r,e)}}function ut(e,t=!1){return pt(e)||j(e)||!M(e)?e:(N(e)>1&&O.defineProperties(e,{set:ft,add:ft,clear:ft,delete:ft}),O.freeze(e),t&&Qe(e,(e,t)=>{ut(t,!0)},!1),e)}function dt(){D(2)}var ft={[Je]:dt};function pt(e){return e===null||!F(e)?!0:O.isFrozen(e)}var mt=`MapSet`,ht=`Patches`,gt=`ArrayMethods`,_t={};function R(e){let t=_t[e];return t||D(0,e),t}var vt=e=>!!_t[e];function yt(e,t){_t[e]||(_t[e]=t)}var z,bt=()=>z,xt=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:vt(mt)?R(mt):void 0,arrayMethodsPlugin_:vt(gt)?R(gt):void 0});function St(e,t){t&&(e.patchPlugin_=R(ht),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ct(e){wt(e),e.drafts_.forEach(Et),e.drafts_=null}function wt(e){e===z&&(z=e.parent_)}var Tt=e=>z=xt(z,e);function Et(e){let t=e[E];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Dt(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[E].modified_&&(Ct(t),D(4)),M(e)&&(e=Ot(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[E].base_,e,t)}else e=Ot(t,n);return kt(t,e,!0),Ct(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===He?void 0:e}function Ot(e,t){if(pt(t))return t;let n=t[E];if(!n)return Lt(t,e.handledSet_,e);if(!jt(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Ft(n,e)}return n.copy_}function kt(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ut(t,n)}function At(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var jt=(e,t)=>e.scope_===t,Mt=[];function Nt(e,t,n,r){let i=L(e),a=e.type_;if(r!==void 0&&P(i,r,a)===t){et(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Qe(i,(e,n)=>{if(j(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Mt;for(let e of o)et(i,e,n,a)}function Pt(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!jt(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=ct(i);Nt(e,i.draft_??i,a,n),Ft(i,r)})}function Ft(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}At(e)}}function It(e,t,n){let{scope_:r}=e;if(j(n)){let i=n[E];jt(i,r)&&i.callbacks_.push(function(){Gt(e),Nt(e,n,ct(i),t)})}else M(n)&&e.callbacks_.push(function(){let i=L(e);e.type_===3?i.has(n)&&Lt(n,r.handledSet_,r):P(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Lt(P(e.copy_,t,e.type_),r.handledSet_,r)})}function Lt(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||j(e)||t.has(e)||!M(e)||pt(e)?e:(t.add(e),Qe(e,(r,i)=>{if(j(i)){let t=i[E];jt(t,n)&&(et(e,r,ct(t),e.type_),At(t))}else M(i)&&Lt(i,t,n)}),e)}function Rt(e,t){let n=nt(e),r={type_:+!!n,scope_:t?t.scope_:bt(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=zt;n&&(i=[r],a=Bt);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var zt={get(e,t){if(t===E)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=L(e);if(!$e(i,t,e.type_))return Ht(e,i,t);let a=i[t];if(e.finalized_||!M(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&ot(t))return a;if(a===Vt(e.base_,t)){Gt(e);let n=e.type_===1?+t:t,r=qt(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in L(e)},ownKeys(e){return Reflect.ownKeys(L(e))},set(e,t,n){let r=Ut(L(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Vt(L(e),t),i=r?.[E];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(tt(n,r)&&(n!==void 0||$e(e.base_,t,e.type_)))return!0;Gt(e),Wt(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),It(e,t,n),!0)},deleteProperty(e,t){return Gt(e),Vt(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Wt(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=L(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[qe]:!0,[Ge]:e.type_!==1||t!==`length`,[Ke]:r[Ke],[Je]:n[t]}},defineProperty(){D(11)},getPrototypeOf(e){return k(e.base_)},setPrototypeOf(){D(12)}},Bt={};for(let e in zt){let t=zt[e];Bt[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Bt.deleteProperty=function(e,t){return Bt.set.call(this,e,t,void 0)},Bt.set=function(e,t,n){return zt.set.call(this,e[0],t,n,e[0])};function Vt(e,t){let n=e[E];return(n?L(n):e)[t]}function Ht(e,t,n){let r=Ut(t,n);return r?Je in r?r[Je]:r.get?.call(e.draft_):void 0}function Ut(e,t){if(!(t in e))return;let n=k(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=k(n)}}function Wt(e){e.modified_||(e.modified_=!0,e.parent_&&Wt(e.parent_))}function Gt(e){e.copy_||=(e.assigned_=new Map,lt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Kt=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(I(e)&&!I(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}I(t)||D(6),n!==void 0&&!I(n)&&D(7);let r;if(M(e)){let i=Tt(this),a=qt(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Ct(i):wt(i)}return St(i,n),Dt(r,i)}else if(!e||!F(e)){if(r=t(e),r===void 0&&(r=e),r===He&&(r=void 0),this.autoFreeze_&&ut(r,!0),n){let t=[],i=[];R(ht).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else D(1,e)},this.produceWithPatches=(e,t)=>{if(I(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},at(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),at(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),at(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){M(e)||D(8),j(e)&&(e=Jt(e));let t=Tt(this),n=qt(t,e,void 0);return n[E].isManual_=!0,wt(t),n}finishDraft(e,t){let n=e&&e[E];(!n||!n.isManual_)&&D(9);let{scope_:r}=n;return St(r,t),Dt(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=R(ht).applyPatches_;return j(e)?r(e,t):this.produce(e,e=>r(e,t))}};function qt(e,t,n,r){let[i,a]=rt(t)?R(mt).proxyMap_(t,n):it(t)?R(mt).proxySet_(t,n):Rt(t,n);return(n?.scope_??bt()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Pt(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function Jt(e){return j(e)||D(10,e),Yt(e)}function Yt(e){if(!M(e)||pt(e))return e;let t=e[E],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=lt(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=lt(e,!0);return Qe(n,(e,t)=>{et(n,e,Yt(t))},r),t&&(t.finalized_=!1),n}function Xt(){function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=st(P(e,n.key_)),i=P(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||$e(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(n=P(n,r),!F(n)||n===null)throw Error(`Cannot resolve path at '${t.join(`/`)}'`)}return n}let n=`replace`,r=`remove`;function i(e,t,n){if(e.scope_.processedForPatches_.has(e))return;e.scope_.processedForPatches_.add(e);let{patches_:r,inversePatches_:i}=n;switch(e.type_){case 0:case 2:return o(e,t,r,i);case 1:return a(e,t,r,i);case 3:return s(e,t,r,i)}}function a(e,t,i,a){let{base_:o,assigned_:s}=e,c=e.copy_;c.length<o.length&&([o,c]=[c,o],[i,a]=[a,i]);let l=e.allIndicesReassigned_===!0;for(let e=0;e<o.length;e++){let r=c[e],u=o[e];if((l||s?.get(e.toString()))&&r!==u){let o=r?.[E];if(o&&o.modified_)continue;let s=t.concat([e]);i.push({op:n,path:s,value:d(r)}),a.push({op:n,path:s,value:d(u)})}}for(let e=o.length;e<c.length;e++){let n=t.concat([e]);i.push({op:`add`,path:n,value:d(c[e])})}for(let e=c.length-1;o.length<=e;--e){let n=t.concat([e]);a.push({op:r,path:n})}}function o(e,t,i,a){let{base_:o,copy_:s,type_:c}=e;Qe(e.assigned_,(e,l)=>{let u=P(o,e,c),f=P(s,e,c),p=l?$e(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===He?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e<i.length-1;e++){let t=N(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),(t===0||t===1)&&(n===`__proto__`||n===We)&&D(19),I(o)&&n===A&&D(19),o=P(o,n),F(o)||D(18,i.join(`/`))}let s=N(o),c=u(t.value),l=i[i.length-1];switch(a){case n:switch(s){case 2:return o.set(l,c);case 3:D(16);default:return o[l]=c}case`add`:switch(s){case 1:return l===`-`?o.push(c):o.splice(l,0,c);case 2:return o.set(l,c);case 3:return o.add(c);default:return o[l]=c}case r:switch(s){case 1:return o.splice(l,1);case 2:return o.delete(l);case 3:return o.delete(t.value);default:return delete o[l]}default:D(17,a)}}),e}function u(e){if(!M(e))return e;if(nt(e))return e.map(u);if(rt(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(it(e))return new Set(Array.from(e).map(u));let t=Object.create(k(e));for(let n in e)t[n]=u(e[n]);return $e(e,Ue)&&(t[Ue]=e[Ue]),t}function d(e){return j(e)?u(e):e}yt(ht,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}var Zt=new Kt,Qt=Zt.produce,$t=Zt.produceWithPatches.bind(Zt),en=Zt.applyPatches.bind(Zt),tn=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function nn(e=21){let t=``,n=e;for(;n--;)t+=tn[Math.random()*64|0];return t}function rn(e){let{enablePatches:t=!1}=e,n=Be(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=nn())=>{i.has(t)||(Xt(),r=en(r,e),i.add(t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=nn())=>{if(!i.has(a))if(i.add(a),t){let[t,i]=$t(r,e);r=t,n.emit(`updated`,r,i,a)}else r=Qt(r,e),n.emit(`updated`,r,void 0,a)},syncIds:i}}function an(e){let t=new Map,n=new Map,r=new Set,i=e.connectionMeta.backend===`static`;function a(e,t){let r=n.get(e);return r&&typeof r==`object`&&!Array.isArray(r)&&typeof t==`object`&&!Array.isArray(t)?{...r,...t}:t}e.client.register({name:`devframe:rpc:client-state:updated`,type:`event`,handler:(e,n,r)=>{let i=t.get(e);!i||i.syncIds.has(r)||i.mutate(()=>a(e,n),r)}}),e.client.register({name:`devframe:rpc:client-state:patch`,type:`event`,handler:(e,n,r)=>{let i=t.get(e);!i||i.syncIds.has(r)||i.patch(n,r)}});function o(t,n){let r=[];return r.push(n.on(`updated`,(n,r,a)=>{i||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,a):e.callEvent(`devframe:rpc:server-state:set`,t,n,a))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return r.add(e),()=>{r.delete(e)}},get:async(s,c)=>{if(c?.initialValue!==void 0&&n.set(s,c.initialValue),t.has(s))return t.get(s);let l=rn({initialValue:c?.initialValue,enablePatches:!1});async function u(){if(i||e.callEvent(`devframe:rpc:server-state:subscribe`,s),c?.initialValue!==void 0){t.set(s,l);for(let e of r)e(s);return e.call(`devframe:rpc:server-state:get`,s).then(e=>{e!==void 0&&l.mutate(()=>a(s,e))}).catch(e=>{console.error(`Error getting server state`,e)}),o(s,l),l}else{let n=await e.call(`devframe:rpc:server-state:get`,s);l.mutate(()=>a(s,n)),t.set(s,l);for(let e of r)e(s);return o(s,l),l}}return new Promise(t=>{e.isTrusted?u().then(t):(t(l),e.events.on(`rpc:is-trusted:updated`,e=>{e&&u()}))})}}}function on(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function sn(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function cn(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function ln(e){if(e.error){let t=Error(e.error.message);throw t.name=e.error.name,t}return e.output}function un(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`?Ee(e):e}async function a(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>i(t,e.serialization)));let r=await n.get(e.path);return cn(r)?ln(r):r}async function o(e,n){return r.has(e)||r.set(e,t(e).then(e=>i(e,n))),await r.get(e)}async function s(t,n){if(!(t in e))throw Error(`[devtools-rpc] Function "${t}" not found in dump store`);let r=e[t];if(on(r)){if(n.length>0)throw Error(`[devtools-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await a(r)}if(sn(r)){let e=ue(n),i=r.records[e];if(i)return ln(await o(i,r.serialization));if(r.fallback)return ln(await o(r.fallback,r.serialization));throw Error(`[devtools-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(n.length===0)return r;throw Error(`[devtools-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await s(e,t),callOptional:async(t,n)=>{if(t in e)return await s(t,n)},callEvent:async(e,t)=>{}}}async function dn(e){let t=un(await e.fetchJsonFromBases(te),e.fetchJsonFromBases);return{isTrusted:!0,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1))}}var fn=256,pn=class extends Error{name=`StreamClosedError`};function mn(e={}){let t=e.id??nn(),n=Math.max(0,e.replayWindow??0),r=Be(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new pn(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&a.splice(0,a.length-n)),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=gn(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function hn(e={}){let t=e.id??nn(),n=Math.max(1,e.highWaterMark??fn),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function gn(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var _n=``;function vn(e,t){return`${e}${_n}${t}`}function yn(e){let t=new Map,n=new Map;e.client.register({name:`devframe:streaming:chunk`,type:`event`,handler(e,n,r,i){t.get(vn(e,n))?._push(r,i)}}),e.client.register({name:`devframe:streaming:end`,type:`event`,handler(e,n,r){let i=vn(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:`devframe:streaming:upload-cancel`,type:`event`,handler(e,t){let r=vn(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(`rpc:is-trusted:updated`,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(_n);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=vn(n,r),o=t.get(a);if(o)return o;let s=hn({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(`rpc:is-trusted:updated`,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=vn(t,r),a=n.get(i);if(a)return a;let o=mn({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}var bn=`q`,xn=`s`;function Sn(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var Cn=Math.random.bind(Math),wn=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Tn(e=21){let t=``,n=e;for(;n--;)t+=wn[Cn()*64|0];return t}var En=6e4,Dn=e=>e,On=Dn,{clearTimeout:kn,setTimeout:An}=globalThis;function jn(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Dn,deserialize:s=On,resolver:c,bind:l=`rpc`,timeout:u=En,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:bn};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=Sn(),_=Tn();s.i=_;let v;async function ee(n=s){return u>=0&&(v=An(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,ee,d):await ee()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{kn(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:ee,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.prototype.hasOwnProperty.call(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(te)}function ee(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function te(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===bn){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:xn,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:xn,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(kn(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(te),h}function Mn(e,t){let{channel:n,rpcOptions:r={}}=t;return jn(e,{...n,timeout:-1,...r,proxify:!1})}function Nn(){}var Pn=new Map;function Fn(e){let t=e.url;e.authToken&&(t=`${t}?vite_devtools_auth_token=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=Nn,onError:i=Nn,onDisconnected:a=Nn,definitions:o=Pn}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{i(e instanceof Error?e:Error(e.type))}),n.addEventListener(`close`,e=>{a(e)});let s=new Map;return{on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN)n.send(e);else{function t(){n.send(e),n.removeEventListener(`open`,t)}n.addEventListener(`open`,t)}},serialize:e=>{let t;return e.t===`q`?t=e.m:(t=s.get(e.i),s.delete(e.i)),t&&o.get(t)?.jsonSerializable===!0?Re(e,t??``):`s:${Le(e)}`},deserialize:e=>{let t=e.startsWith(`s:`)?Ie(e.slice(2)):JSON.parse(e);return t.t===`q`&&t.i&&t.m&&s.set(t.i,t.m),t}}}function In(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var Ln=``,Rn=`?`,zn=`major`,B=`model`,V=`name`,H=`type`,U=`vendor`,W=`version`,G=`architecture`,Bn=`console`,K=`mobile`,q=`tablet`,J=`smarttv`,Y=`wearable`,Vn=`embedded`,Hn=500,Un=`Amazon`,Wn=`Apple`,Gn=`ASUS`,Kn=`BlackBerry`,X=`Browser`,qn=`Chrome`,Jn=`Edge`,Yn=`Firefox`,Xn=`Google`,Zn=`Huawei`,Qn=`LG`,$n=`Microsoft`,er=`Motorola`,tr=`Opera`,nr=`Samsung`,rr=`Sharp`,ir=`Sony`,ar=`Xiaomi`,or=`Zebra`,sr=`Facebook`,cr=`Chromium OS`,lr=`Mac OS`;function ur(e,t={}){let n={};for(let r of Object.keys(e)){let i=t[r];i&&i.length%2==0?n[r]=[...i,...e[r]]:n[r]=e[r]}return n}function dr(e){let t={};for(let n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}function fr(e){return e.toLowerCase()}function pr(e,t){return typeof e==`string`?fr(t).includes(fr(e)):!1}function mr(e){return typeof e==`string`?e.replace(/[^\d.]/g,Ln).split(`.`)[0]:void 0}function hr(e,t){let n=e.replace(/^\s+/,Ln);return t===void 0?n:n.substring(0,t)}function Z(e,t,n){let r=n??{};for(let n=0;n<t.length;n+=2){let i=t[n],a=t[n+1];for(let t=0;t<i.length;t++){let n=i[t];if(!n)break;let o=n.exec(e);if(o){for(let e=0;e<a.length;e++){let t=o[e+1],n=a[e];if(Array.isArray(n)){let e=n[0],i=n.length;if(i===2){let i=n[1];typeof i==`function`?r[e]=i(t,void 0,r):r[e]=i}else if(i===3){let i=n[1],a=n[2];typeof i==`function`&&!(`exec`in i)&&!(`test`in i)?r[e]=t?i(t,a,r):void 0:r[e]=t?t.replace(i,a):void 0}else i===4&&(r[e]=t?n[3](t.replace(n[1],n[2]),void 0,r):void 0)}else r[n]=t||void 0}return r}}}return r}function gr(e,t){for(let n in t){let r=t[n];if(Array.isArray(r)&&r.length>0){for(let t=0;t<r.length;t++)if(pr(r[t],e))return n===Rn?void 0:n}else if(pr(r,e))return n===Rn?void 0:n}return e}var _r={"1.0":`/8`,"1.2":`/1`,"1.3":`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`},vr={ME:`4.90`,"NT 3.11":`NT3.51`,"NT 4.0":`NT4.0`,2e3:`NT 5.0`,XP:[`NT 5.1`,`NT 5.2`],Vista:`NT 6.0`,7:`NT 6.1`,8:`NT 6.2`,"8.1":`NT 6.3`,10:[`NT 6.4`,`NT 10.0`],RT:`ARM`},yr={browser:[[/\b(?:crmo|crios)\/([\w.]+)/i],[W,[V,`Chrome`]],[/edg(?:e|ios|a)?\/([\w.]+)/i],[W,[V,`Edge`]],[/(opera mini)\/([-\w.]+)/i,/(opera [mobileta]{3,6})\b.+version\/([-\w.]+)/i,/(opera)(?:.+version\/|[/ ]+)([\w.]+)/i],[V,W],[/opios[/ ]+([\w.]+)/i],[W,[V,`${tr} Mini`]],[/\bop(?:rg)?x\/([\w.]+)/i],[W,[V,`${tr} GX`]],[/\bopr\/([\w.]+)/i],[W,[V,tr]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[/ ]?([\w.]+)/i],[W,[V,`Baidu`]],[/(kindle)\/([\w.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[/ ]?([\w.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[/ ]?([\w.]*)/i,/(?:ms|\()(ie) ([\w.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w.]+)/i,/(heytap|ovi)browser\/([\d.]+)/i,/(weibo)__([\d.]+)/i],[V,W],[/\bddg\/([\w.]+)/i],[W,[V,`DuckDuckGo`]],[/(?:\buc? ?browser|juc.+ucweb)[/ ]?([\w.]+)/i],[W,[V,`UC${X}`]],[/microm.+\bqbcore\/([\w.]+)/i,/\bqbcore\/([\w.]+).+microm/i,/micromessenger\/([\w.]+)/i],[W,[V,`WeChat`]],[/konqueror\/([\w.]+)/i],[W,[V,`Konqueror`]],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i],[W,[V,`IE`]],[/ya(?:search)?browser\/([\w.]+)/i],[W,[V,`Yandex`]],[/slbrowser\/([\w.]+)/i],[W,[V,`Smart Lenovo ${X}`]],[/(avast|avg)\/([\w.]+)/i],[[V,/(.+)/,`$1 Secure ${X}`],W],[/\bfocus\/([\w.]+)/i],[W,[V,`${Yn} Focus`]],[/\bopt\/([\w.]+)/i],[W,[V,`${tr} Touch`]],[/coc_coc\w+\/([\w.]+)/i],[W,[V,`Coc Coc`]],[/dolfin\/([\w.]+)/i],[W,[V,`Dolphin`]],[/coast\/([\w.]+)/i],[W,[V,`${tr} Coast`]],[/miuibrowser\/([\w.]+)/i],[W,[V,`MIUI ${X}`]],[/fxios\/([-\w.]+)/i],[W,[V,Yn]],[/\bqihu|(qi?ho{0,2}|360)browser/i],[[V,`360 ${X}`]],[/(oculus|sailfish|huawei|vivo)browser\/([\w.]+)/i],[[V,/(.+)/,`$1 ${X}`],W],[/samsungbrowser\/([\w.]+)/i],[W,[V,`${nr} Internet`]],[/(comodo_dragon)\/([\w.]+)/i],[[V,/_/g,` `],W],[/metasr[/ ]?([\d.]+)/i],[W,[V,`Sogou Explorer`]],[/(sogou)mo\w+\/([\d.]+)/i],[[V,`Sogou Mobile`],W],[/(electron)\/([\w.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w.]+))/i,/m?(qqbrowser|2345Explorer)[/ ]?([\w.]+)/i],[V,W],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[V],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w.]+);)/i],[[V,sr],W],[/(Klarna)\/([\w.]+)/i,/(kakao(?:talk|story))[/ ]([\w.]+)/i,/(naver)\(.*?(\d+\.[\w.]+).*\)/i,/safari (line)\/([\w.]+)/i,/\b(line)\/([\w.]+)\/iab/i,/(alipay)client\/([\w.]+)/i,/(twitter)(?:and| f.+e\/([\w.]+))/i,/(chromium|instagram|snapchat)[/ ]([-\w.]+)/i],[V,W],[/\bgsa\/([\w.]+) .*safari\//i],[W,[V,`GSA`]],[/musical_ly(?:.+app_?version\/|_)([\w.]+)/i],[W,[V,`TikTok`]],[/headlesschrome(?:\/([\w.]+)| )/i],[W,[V,`${qn} Headless`]],[/ wv\).+(chrome)\/([\w.]+)/i],[[V,`${qn} WebView`],W],[/droid.+ version\/([\w.]+)\b.+(?:mobile safari|safari)/i],[W,[V,`Android ${X}`]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w.]+)/i],[V,W],[/version\/([\w.,]+) .*mobile\/\w+ (safari)/i],[W,[V,`Mobile Safari`]],[/version\/([\w(.|,)]+) .*(mobile ?safari|safari)/i],[W,V],[/webkit.+?(mobile ?safari|safari)(\/[\w.]+)/i],[V,[W,gr,_r]],[/(webkit|khtml)\/([\w.]+)/i],[V,W],[/(navigator|netscape\d?)\/([-\w.]+)/i],[[V,`Netscape`],W],[/mobile vr; rv:([\w.]+)\).+firefox/i],[W,[V,`${Yn} Reality`]],[/ekiohf.+(flow)\/([\w.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[/ ]?([\w.+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w.]+)$/i,/(firefox)\/([\w.]+)/i,/(mozilla)\/([\w.]+) .+rv:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[. ]?browser)[-/ ]?v?([\w.]+)/i,/(links) \(([\w.]+)/i,/panasonic;(viera)/i],[V,W],[/(cobalt)\/([\w.]+)/i],[V,[W,/master.|lts./,``]]],cpu:[[/(amd|x(?:(?:86|64)[-_])?|wow|win)64[;)]/i],[[G,`amd64`]],[/(ia32(?=;))/i],[[G,fr]],[/((?:i[346]|x)86)[;)]/i],[[G,`ia32`]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[G,`arm64`]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[G,`armhf`]],[/windows (ce|mobile); ppc;/i],[[G,`arm`]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[G,/ower/,Ln,fr]],[/(sun4\w)[;)]/i],[[G,`sparc`]],[/(avr32|ia64(?=;)|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[G,fr]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[B,[U,nr],[H,q]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?\d+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[B,[U,nr],[H,K]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[B,[U,Wn],[H,K]],[/\((ipad);[-\w),; ]+apple/i,/applecoremedia\/[\w.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[B,[U,Wn],[H,q]],[/(macintosh);/i],[B,[U,Wn]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[B,[U,rr],[H,K]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[B,[U,Zn],[H,q]],[/(?:huawei|honor)([-\w ]+)[;)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][0-359c][adn]?)\b(?!.+d\/s)/i],[B,[U,Zn],[H,K]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?[\w ]+)(?: bui|\))/i,/oid[^)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?\d?\w?[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[B,/_/g,` `],[U,ar],[H,K]],[/oid[^)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?pad[\w ]+)(?: bui|\))/i],[[B,/_/g,` `],[U,ar],[H,q]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[B,[U,`OPPO`],[H,K]],[/\b(opd2\d{3}a?) bui/i],[B,[U,`OPPO`],[H,q]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[B,[U,`Vivo`],[H,K]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[B,[U,`Realme`],[H,K]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w() ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[B,[U,er],[H,K]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[B,[U,er],[H,q]],[/((?=lg)?[vl]k-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[B,[U,Qn],[H,q]],[/(lm(?:-?f100[nv]?|-[\w.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?(\w+) bui/i],[B,[U,Qn],[H,K]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab[\w ]+|yt[-\w]{6}|tb[-\w]{6})/i],[B,[U,`Lenovo`],[H,q]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w.]*)/i],[[B,/_/g,` `],[U,`Nokia`],[H,K]],[/(pixel c)\b/i],[B,[U,Xn],[H,q]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[B,[U,Xn],[H,K]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]?\d\.))/i],[B,[U,ir],[H,K]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[B,`Xperia Tablet`],[U,ir],[H,q]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[B,[U,`OnePlus`],[H,K]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[B,[U,Un],[H,q]],[/((?:sd|kf)[0349hijor-uw]+)( bui|\)).+silk\//i],[[B,/(.+)/g,`Fire Phone $1`],[U,Un],[H,K]],[/(playbook);[-\w),; ]+(rim)/i],[B,U,[H,q]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[B,[U,Kn],[H,K]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[B,[U,Gn],[H,q]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[B,[U,Gn],[H,K]],[/(nexus 9)/i],[B,[U,`HTC`],[H,q]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!;|\.)|sony(?!-bra))[-_ ]?([-\w]*)/i],[U,[B,/_/g,` `],[H,K]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[B,[U,`Acer`],[H,q]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[B,[U,`Meizu`],[H,K]],[/; ((?:power )?armor[\w ]{0,8})(?: bui|\))/i],[B,[U,`Ulefone`],[H,K]],[/(blackberry|benq|palm(?=-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[U,B,[H,K]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[U,B,[H,q]],[/(surface duo)/i],[B,[U,$n],[H,q]],[/droid [\d.]+; (fp\du?)(?: b|\))/i],[B,[U,`Fairphone`],[H,K]],[/(u304aa)/i],[B,[U,`AT&T`],[H,K]],[/\bsie-(\w*)/i],[B,[U,`Siemens`],[H,K]],[/\b(rct\w+) b/i],[B,[U,`RCA`],[H,q]],[/\b(venue[\d ]{2,7}) b/i],[B,[U,`Dell`],[H,q]],[/\b(q(?:mv|ta)\w+) b/i],[B,[U,`Verizon`],[H,q]],[/\b(?:barnes[& ]+noble |bn[rt])([\w+ ]*) b/i],[B,[U,`Barnes & Noble`],[H,q]],[/\b(tm\d{3}\w+) b/i],[B,[U,`NuVision`],[H,q]],[/\b(k88) b/i],[B,[U,`ZTE`],[H,q]],[/\b(nx\d{3}j) b/i],[B,[U,`ZTE`],[H,K]],[/\b(gen\d{3}) b.+49h/i],[B,[U,`Swiss`],[H,K]],[/\b(zur\d{3}) b/i],[B,[U,`Swiss`],[H,q]],[/\b((zeki)?tb.*\b) b/i],[B,[U,`Zeki`],[H,q]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[U,`Dragon Touch`],B,[H,q]],[/\b(ns-?\w{0,9}) b/i],[B,[U,`Insignia`],[H,q]],[/\b((nxa|next)-?\w{0,9}) b/i],[B,[U,`NextBook`],[H,q]],[/\b(xtreme_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[U,`Voice`],B,[H,K]],[/\b(lvtel-)?(v1[12]) b/i],[[U,`LvTel`],B,[H,K]],[/\b(ph-1) /i],[B,[U,`Essential`],[H,K]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[B,[U,`Envizen`],[H,q]],[/\b(trio[-\w. ]+) b/i],[B,[U,`MachSpeed`],[H,q]],[/\btu_(1491) b/i],[B,[U,`Rotor`],[H,q]],[/(shield[\w ]+) b/i],[B,[U,`Nvidia`],[H,q]],[/(sprint) (\w+)/i],[U,B,[H,K]],[/(kin\.[onetw]{3})/i],[[B,/\./g,` `],[U,$n],[H,K]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[B,[U,or],[H,q]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[B,[U,or],[H,K]],[/smart-tv.+(samsung)/i],[U,[H,J]],[/hbbtv.+maple;(\d+)/i],[[B,/^/,`SmartTV`],[U,nr],[H,J]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[U,Qn],[H,J]],[/(apple) ?tv/i],[U,[B,`${Wn} TV`],[H,J]],[/crkey/i],[[B,`${qn}cast`],[U,Xn],[H,J]],[/droid.+aft(\w+)( bui|\))/i],[B,[U,Un],[H,J]],[/\(dtv[);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[B,[U,rr],[H,J]],[/(bravia[\w ]+)( bui|\))/i],[B,[U,ir],[H,J]],[/(mitv-\w{5}) bui/i],[B,[U,ar],[H,J]],[/Hbbtv.*(technisat) (.*);/i],[U,B,[H,J]],[/\b(roku)[\dx]*[)/]((?:dvp-)?[\d.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w+ ]*; *(\w[^;]*);([^;]*)/i],[[U,hr],[B,hr],[H,J]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[H,J]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[U,B,[H,Bn]],[/droid.+; (shield) bui/i],[B,[U,`Nvidia`],[H,Bn]],[/(playstation [345portablevi]+)/i],[B,[U,ir],[H,Bn]],[/\b(xbox(?: one)?(?!; xbox))[); ]/i],[B,[U,$n],[H,Bn]],[/((pebble))app/i],[U,B,[H,Y]],[/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i],[B,[U,Wn],[H,Y]],[/droid.+; (glass) \d/i],[B,[U,Xn],[H,Y]],[/droid.+; (wt63?0{2,3})\)/i],[B,[U,or],[H,Y]],[/(quest( \d| pro)?)/i],[B,[U,sr],[H,Y]],[/(tesla)(?: qtcarbrowser|\/[-\w.]+)/i],[U,[H,Vn]],[/(aeobc)\b/i],[B,[U,Un],[H,Vn]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[B,[H,K]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[B,[H,q]],[/\b((tablet|tab)[;/]|focus\/\d(?!.+mobile))/i],[[H,q]],[/(phone|mobile(?:[;/]| [ \w/.]*safari)|pda(?=.+windows ce))/i],[[H,K]],[/(android[-\w. ]{0,9});.+buil/i],[B,[U,`Generic`]]],engine:[[/windows.+ edge\/([\w.]+)/i],[W,[V,`${Jn}HTML`]],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i],[W,[V,`Blink`]],[/(presto)\/([\w.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w.]+)/i,/ekioh(flow)\/([\w.]+)/i,/(khtml|tasman|links)[/ ]\(?([\w.]+)/i,/(icab)[/ ]([23]\.[\d.]+)/i,/\b(libweb)/i],[V,W],[/rv:([\w.]{1,9})\b.+(gecko)/i],[W,V]],os:[[/microsoft (windows) (vista|xp)/i],[V,W],[/(windows (?:phone(?: os)?|mobile))[/ ]?([.\w ]*)/i],[V,[W,gr,vr]],[/windows nt 6\.2; (arm)/i,/windows[/ ]?([ntce\d. ]+\w)(?!.+xbox)/i,/(?:win(?=[39n])|win 9x )([nt\d.]+)/i],[[W,gr,vr],[V,`Windows`]],[/ip[honead]{2,4}\b(?:.*os (\w+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[/ ])([\d.]+)/i,/cfnetwork\/.+darwin/i],[[W,/_/g,`.`],[V,`iOS`]],[/(mac os x) ?([\w. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[V,lr],[W,/_/g,`.`]],[/droid ([\w.]+)\b.+(android[- ]x86|harmonyos)/i],[W,V],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-/ ]?([\w.]*)/i,/(blackberry)\w*\/([\w.]*)/i,/(tizen|kaios)[/ ]([\w.]+)/i,/\((series40);/i],[V,W],[/\(bb(10);/i],[W,[V,Kn]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-/ ]?([\w.]*)/i],[W,[V,`Symbian`]],[/mozilla\/[\d.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w.]+)/i],[W,[V,`${Yn} OS`]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w.]+)/i],[W,[V,`webOS`]],[/watch(?: ?os[,/]|\d,\d\/)([\d.]+)/i],[W,[V,`watchOS`]],[/crkey\/([\d.]+)/i],[W,[V,`${qn}cast`]],[/(cros) \w+(?:\)| ([\w.]+)\b)/i],[[V,cr],W],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w.]*)/i,/(mint)[/() ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-/ ]?(?!chrom|package)([-\w.]*)/i,/(hurd|linux) ?([\w.]*)/i,/(gnu) ?([\w.]*)/i,/\b([-e-hrntopcs]{0,5}bsd|dragonfly)[/ ]?(?!amd|[ix346]{1,2}86)([\w.]*)/i,/(haiku) (\w+)/i],[V,W],[/(sunos) ?([\w.]*)/i],[[V,`Solaris`],W],[/((?:open)?solaris)[-/ ]?([\w.]*)/i,/(aix) ((\d)(?=[.) ])[\w.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w.]*)/i],[V,W]]};function br(e){return typeof e==`object`&&!!e}Object.freeze(dr([V,W,zn])),Object.freeze(dr([G])),Object.freeze(dr([B,U,H,Bn,K,J,q,Y,Vn])),Object.freeze(dr([V,W])),Object.freeze(dr([V,W]));function xr(){if(!(typeof window>`u`||!window.navigator))return window.navigator}function Sr(e){return e.length>Hn?hr(e,Hn):e}function Cr(e){if(typeof e==`string`)return{ua:Sr(e),isSelfNavigator:!1,navigator:void 0,userAgentData:void 0,regexMap:yr};let t=xr(),n=Sr(t&&t.userAgent?t.userAgent:Ln);return{ua:n,isSelfNavigator:!!(t&&t.userAgent===n),navigator:t,userAgentData:t?.userAgentData,regexMap:yr}}function wr(e,t){if(!t&&!br(e))return Cr(e);let n=xr(),r=br(e)?void 0:e,i=br(e)?e:t,a=Sr(r||(n&&n.userAgent?n.userAgent:Ln)),o=n?.userAgentData;return{ua:a,isSelfNavigator:!!(n&&n.userAgent===a),navigator:n,userAgentData:o,regexMap:i?ur(yr,i):yr}}function Tr(e){let t={name:void 0,version:void 0,major:void 0};return Z(e.ua,e.regexMap.browser,t),t.major=mr(t.version),e.isSelfNavigator&&e.navigator?.brave&&typeof e.navigator.brave.isBrave==`function`&&(t.name=`Brave`),t}function Er(e){let t={architecture:void 0};return Z(e.ua,e.regexMap.cpu,t),t}function Dr(e){let t={vendor:void 0,model:void 0,type:void 0};return Z(e.ua,e.regexMap.device,t),e.isSelfNavigator&&!t.type&&e.userAgentData?.mobile&&(t.type=K),e.isSelfNavigator&&t.model===`Macintosh`&&e.navigator&&e.navigator.standalone!==void 0&&e.navigator.maxTouchPoints&&e.navigator.maxTouchPoints>2&&(t.model=`iPad`,t.type=q),t}function Or(e){let t={name:void 0,version:void 0};return Z(e.ua,e.regexMap.engine,t),t}function kr(e){let t={name:void 0,version:void 0};return Z(e.ua,e.regexMap.os,t),e.isSelfNavigator&&!t.name&&e.userAgentData?.platform&&e.userAgentData.platform!==`Unknown`&&(t.name=e.userAgentData.platform.replace(/chrome os/i,cr).replace(/macos/i,lr)),t}function Ar(e,t){let n,r,i,a,o,s,c=()=>n||=wr(e,t);return{get ua(){return c().ua},get browser(){return r||=Tr(c()),r},get engine(){return i||=Or(c()),i},get os(){return a||=kr(c()),a},get device(){return o||=Dr(c()),o},get cpu(){return s||=Er(c()),s}}}function jr(e){return e==null?!1:`${+e}`==`${e}`}function Mr(e){let{authToken:t,connectionMeta:n,events:r,clientRpc:i,rpcOptions:a={},wsOptions:o={}}=e,s=!1,c=In(),l=jr(n.websocket)?`${location.protocol.replace(`http`,`ws`)}//${location.hostname}:${n.websocket}`:n.websocket,u=new Map;for(let e of n.jsonSerializableMethods??[])u.set(e,{jsonSerializable:!0});let d=Mn(i.functions,{channel:Fn({url:l,authToken:t,definitions:u,...o}),rpcOptions:a});i.register({name:`devframe:auth:revoked`,type:`event`,handler:()=>{s=!1,r.emit(`rpc:is-trusted:updated`,!1)}});let f=t;async function p(e){f=e;let t=Ar(navigator.userAgent),n=[t.browser.name,t.browser.version,`|`,t.os.name,t.os.version,t.device.type].filter(e=>e).join(` `),i=await d.$call(`vite:anonymous:auth`,{authToken:e,ua:n,origin:location.origin});return s=i.isTrusted,c.resolve(s),r.emit(`rpc:is-trusted:updated`,s),i.isTrusted}async function m(){return s?!0:p(f)}async function h(e=6e4){if(s&&c.resolve(!0),e<=0)return c.promise;let t=()=>{};return await Promise.race([c.promise.then(t),new Promise((n,r)=>{let i=setTimeout(()=>{r(Error(`[Vite DevTools] Timeout waiting for rpc to be trusted`))},e);t=()=>clearTimeout(i)})]),s}return{get isTrusted(){return s},requestTrust:m,requestTrustWithToken:p,ensureTrusted:h,call:(...e)=>d.$call(...e),callEvent:(...e)=>d.$callEvent(...e),callOptional:(...e)=>d.$callOptional(...e)}}var Nr=`__VITE_DEVTOOLS_CONNECTION_META__`,Q=`__VITE_DEVTOOLS_CONNECTION_AUTH_TOKEN__`;function Pr(e){let t=[()=>e,()=>localStorage.getItem(Q),()=>window?.[Q],()=>globalThis?.[Q],()=>parent.window?.[Q]],n;for(let e of t)try{if(n=e(),n)break}catch{}return n||=(0,Ve.humanId)({separator:`-`,capitalize:!1}),localStorage.setItem(Q,n),globalThis[Q]=n,n}function Fr(){let e=[()=>window?.[Nr],()=>globalThis?.[Nr],()=>parent.window?.[Nr]];for(let t of e)try{let e=t();if(e)return e}catch{}}async function Ir(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Be(),a=Array.isArray(t)?t:[t],o=e.connectionMeta||Fr(),s=a[0]??`./`;function c(e){return e.endsWith(`/`)?e:`${e}/`}function l(e,t){return/^https?:\/\//.test(t)||t.startsWith(`/`)?t:`${c(e)}${t}`}if(!o){let e=[];for(let t of a)try{o=await fetch(l(t,ee)).then(e=>e.json()),s=t,globalThis[Nr]=o;break}catch(t){e.push(t)}if(!o)throw Error(`Failed to get connection meta from ${a.join(`, `)}`,{cause:e})}let u=new de({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),d={rpc:void 0},f=Pr(e.authToken),p=new Se(d);async function m(e){let t=[s,...a.filter(e=>e!==s)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(l(r,e)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let h=o.backend===`static`?await dn({fetchJsonFromBases:m}):Mr({authToken:f,connectionMeta:o,events:i,clientRpc:p,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&u?.validate(e.m)){let n=u.cached(e.m,e.a);if(n)return i(n);{let n=await t(e);u?.apply(e,n)}}else await t(e)}},wsOptions:e.wsOptions}),g={events:i,get isTrusted(){return h.isTrusted},connectionMeta:o,ensureTrusted:h.ensureTrusted,requestTrust:h.requestTrust,requestTrustWithToken:async e=>(localStorage.setItem(Q,e),globalThis[Q]=e,h.requestTrustWithToken(e)),call:h.call,callEvent:h.callEvent,callOptional:h.callOptional,client:p,sharedState:void 0,streaming:void 0,cacheManager:u};g.sharedState=an(g),g.streaming=yn(g),d.rpc=g,h.requestTrust();try{let e=new BroadcastChannel(`vite-devtools-auth`);e.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&g.requestTrustWithToken(e.data.authToken)}}catch{}return g}var $=c({connected:!1,error:null}),Lr=o(void 0);async function Rr(){let e=n();try{Lr.value=await Ir({baseURL:[v,e.app.baseURL],cacheOptions:!0,connectionMeta:e.app.connection,wsOptions:{onConnected:()=>{$.connected=!0},onError:e=>{$.error=e},onDisconnected:()=>{$.connected=!1}},rpcOptions:{onGeneralError:(e,t)=>{$.error=e,console.error(`[rolldown-devtools] RPC error on executing "${t}":`)},onFunctionError:(e,t)=>{$.error=e,console.error(`[rolldown-devtools] RPC error on executing "${t}":`)}}});let t=await Lr.value.call(`devtoolskit:internal:rpc:server:list`),n=Object.keys(t).filter(e=>t[e]?.cacheable);Lr.value.cacheManager.updateOptions({functions:[...n]}),$.connected=!0}catch(e){$.error=e}}function zr(){return Lr}export{_ as i,$ as n,zr as r,Rr as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,C as t,Ct as n,K as r,Kt as i,M as a,Ot as o,Q as s,S as c,Tt as l,Z as u,at as d,b as f,h as p,ot as m,q as h,qt as g,v as _,w as v,x as y,xt as ee}from"./C--RKQDq.js";import{a as b,c as x,d as S,f as C,i as te,l as w,o as ne,r as re,u as ie}from"./5tvbNeKa.js";import{t as T}from"./BE1TLHgg.js";import{t as E}from"./CqfNwh25.js";import{t as ae}from"./BYXvfkhc.js";function D(){return typeof window<`u`}function O(e){return oe(e)?(e.nodeName||``).toLowerCase():`#document`}function k(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function A(e){return((oe(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function oe(e){return D()?e instanceof Node||e instanceof k(e).Node:!1}function j(e){return D()?e instanceof Element||e instanceof k(e).Element:!1}function M(e){return D()?e instanceof HTMLElement||e instanceof k(e).HTMLElement:!1}function se(e){return!D()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof k(e).ShadowRoot}function N(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=L(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ce(e){return/^(table|td|th)$/.test(O(e))}function P(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var le=/transform|translate|scale|rotate|perspective|filter/,ue=/paint|layout|strict|content/,F=e=>!!e&&e!==`none`,de;function fe(e){let t=j(e)?L(e):e;return F(t.transform)||F(t.translate)||F(t.scale)||F(t.rotate)||F(t.perspective)||!me()&&(F(t.backdropFilter)||F(t.filter))||le.test(t.willChange||``)||ue.test(t.contain||``)}function pe(e){let t=z(e);for(;M(t)&&!I(t);){if(fe(t))return t;if(P(t))return null;t=z(t)}return null}function me(){return de??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),de}function I(e){return/^(html|body|#document)$/.test(O(e))}function L(e){return k(e).getComputedStyle(e)}function R(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function z(e){if(O(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||se(e)&&e.host||A(e);return se(t)?t.host:t}function he(e){let t=z(e);return I(t)?e.ownerDocument?e.ownerDocument.body:e.body:M(t)&&N(t)?t:he(t)}function ge(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=he(e),i=r===e.ownerDocument?.body,a=k(r);if(i){let e=_e(a);return t.concat(a,a.visualViewport||[],N(r)?r:[],e&&n?ge(e):[])}else return t.concat(r,ge(r,[],n))}function _e(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ve(e){let t=L(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=M(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=C(n)!==a||C(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ye(e){return j(e)?e:e.contextElement}function B(e){let t=ye(e);if(!M(t))return x(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ve(t),o=(a?C(n.width):n.width)/r,s=(a?C(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var be=x(0);function xe(e){let t=k(e);return!me()||!t.visualViewport?be:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Se(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==k(e)?!1:t}function V(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ye(e),o=x(1);t&&(r?j(r)&&(o=B(r)):o=B(e));let s=Se(a,n,r)?xe(a):x(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=k(a),t=r&&j(r)?k(r):r,n=e,i=_e(n);for(;i&&r&&t!==n;){let e=B(i),t=i.getBoundingClientRect(),r=L(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=k(i),i=_e(n)}}return S({width:u,height:d,x:c,y:l})}function H(e,t){let n=R(e).scrollLeft;return t?t.left+n:V(A(e)).left+n}function Ce(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-H(e,n),y:n.top+t.scrollTop}}function we(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=A(r),s=t?P(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=x(1),u=x(0),d=M(r);if((d||!d&&!a)&&((O(r)!==`body`||N(o))&&(c=R(r)),d)){let e=V(r);l=B(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ce(o,c):x(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Te(e){return Array.from(e.getClientRects())}function Ee(e){let t=A(e),n=R(e),r=e.ownerDocument.body,i=w(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=w(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+H(e),s=-n.scrollTop;return L(r).direction===`rtl`&&(o+=w(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var De=25;function Oe(e,t){let n=k(e),r=A(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=me();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=H(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=De&&(a-=o)}else l<=De&&(a+=l);return{width:a,height:o,x:s,y:c}}function ke(e,t){let n=V(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=M(e)?B(e):x(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ae(e,t,n){let r;if(t===`viewport`)r=Oe(e,n);else if(t===`document`)r=Ee(A(e));else if(j(t))r=ke(t,n);else{let n=xe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S(r)}function je(e,t){let n=z(e);return n===t||!j(n)||I(n)?!1:L(n).position===`fixed`||je(n,t)}function Me(e,t){let n=t.get(e);if(n)return n;let r=ge(e,[],!1).filter(e=>j(e)&&O(e)!==`body`),i=null,a=L(e).position===`fixed`,o=a?z(e):e;for(;j(o)&&!I(o);){let t=L(o),n=fe(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||N(o)&&!n&&je(e,o))?r=r.filter(e=>e!==o):i=t,o=z(o)}return t.set(e,r),r}function Ne(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?P(t)?[]:Me(t,this._c):[].concat(n),r],o=Ae(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ae(t,a[e],i);s=w(n.top,s),c=ie(n.right,c),l=ie(n.bottom,l),u=w(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Pe(e){let{width:t,height:n}=ve(e);return{width:t,height:n}}function Fe(e,t,n){let r=M(t),i=A(t),a=n===`fixed`,o=V(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=x(0);function l(){c.x=H(i)}if(r||!r&&!a)if((O(t)!==`body`||N(i))&&(s=R(t)),r){let e=V(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Ce(i,s):x(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function U(e){return L(e).position===`static`}function Ie(e,t){if(!M(e)||L(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return A(e)===n&&(n=n.ownerDocument.body),n}function Le(e,t){let n=k(e);if(P(e))return n;if(!M(e)){let t=z(e);for(;t&&!I(t);){if(j(t)&&!U(t))return t;t=z(t)}return n}let r=Ie(e,t);for(;r&&ce(r)&&U(r);)r=Ie(r,t);return r&&I(r)&&U(r)&&!fe(r)?n:r||pe(e)||n}var Re=async function(e){let t=this.getOffsetParent||Le,n=this.getDimensions,r=await n(e.floating);return{reference:Fe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ze(e){return L(e).direction===`rtl`}var Be={convertOffsetParentRelativeRectToViewportRelativeRect:we,getDocumentElement:A,getClippingRect:Ne,getOffsetParent:Le,getElementRects:Re,getClientRects:Te,getDimensions:Pe,getScale:B,isElement:j,isRTL:ze},Ve=b,He=ne,Ue=te,We=(e,t,n)=>{let r=new Map,i={platform:Be,...n},a={...i.platform,_c:r};return re(e,t,{...i,platform:a})},Ge=Object.assign(a({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(e){let{hoverX:t,hoverY:n}=l(e),r=d(`hoverElement`),a=ee(0),o=ee(0);return m([t,n],([e,t])=>{We({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},r.value,{placement:`right-start`,middleware:[Ue(),He(),Ve({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{a.value=e,o.value=t})}),(e,t)=>(h(),c(_,{to:`body`},[y(`div`,{ref_key:`hoverElement`,ref:r,fixed:``,"z-panel-content":``,"pointer-events-none":``,style:i({left:`${a.value}px`,top:`${o.value}px`})},[s(e.$slots,`default`)],4)]))}}),{__name:`DisplayGraphHoverView`});function Ke(e,t=1,n=1){let r=(.6+.4*Math.max(0,Math.cos(e)))*t,i=(.5+.2*Math.max(0,Math.cos(e+Math.PI*2/3)))*n;return`hsl(${e*180/Math.PI}deg, ${Math.round(100*r)}%, ${Math.round(100*i)}%)`}var qe,Je,Ye,W,G,K=1,Xe;function Ze(e,t,n,r,i){if(!Array.isArray(e))return e;let a=window.devicePixelRatio||1;if(qe!==t||Je!==a||Ye!==i){let n=Math.round(64*a)/64;K=i,K=Math.log2(K),K-=Math.floor(K);let r=K,o=Math.min(1,8*r);K=2**K;let s=8*Math.SQRT2/K;qe=t,Je=a,Ye=i,W||=document.createElement(`canvas`),G||=W.getContext(`2d`),W.width=W.height=Math.round(64*n),G.scale(n,n),G.fillStyle=e[0],G.fillRect(0,0,64,64),G.globalAlpha=.25,G.fillStyle=e[1],G.fillRect(0,0,64,64),G.globalAlpha=.67,G.strokeStyle=e[1],G.beginPath();for(let e=0;e<=64;e+=16)G.moveTo(e-32,e+32),G.lineTo(e+32,e-32);if(G.lineWidth=s*(1-(o-r)/2),G.stroke(),o+r>0){G.beginPath();for(let e=8;e<64;e+=16)G.moveTo(e-32,e+32),G.lineTo(e+32,e-32);G.lineWidth=s*(o+r)/2,G.stroke()}Xe=t.createPattern(W,`repeat`),K/=n}return n/=64*K*a,n-=Math.floor(n),n*=64*K*a,Xe.setTransform(new DOMMatrix([K,0,0,K,n,r])),Xe}function Qe(e){return Array.isArray(e)?`url('data:image/svg+xml,<svg width="26" height="26" xmlns="http://www.w3.org/2000/svg"><rect width="26" height="26" fill="${e[0]}"/><rect width="26" height="26" fill="${e[1]}" fill-opacity="25%"/><path d="M22.5 -3.5L-3.5 22.5M35.5 9.5L9.5 35.5" stroke="${e[1]}" stroke-opacity="67%" stroke-width="9.19239"/></svg>')`:e}function $e(e){return t=>t.id&&e[t.id]||t.color}function et(e,t=1,n=1){let r={};return tt(r,e,0,Math.PI*2,t,n),$e(r)}function tt(e,t,n,r,i=1,a=1){let o=t.size;e[t.id]=Ke(n+r/2,i,a);for(let s of t.children){let t=s.size/o*r;tt(e,s,n,t,i,a),n+=t}}var nt=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function rt(e=16,t=nt){let n=``,r=e,i=t.length;for(;r--;)n+=t[Math.random()*i|0];return n}function it(e,t,n=(e,t)=>t.size-e.size){if(e.__nanovis)return e;let r={...e};return r.id||=rt(),r.parent||=t,r.children||=[],r.sizeSelf==null&&r.size!=null&&r.children.length===0?r.sizeSelf=r.size:r.sizeSelf||=0,r.children=(r.children||[]).map(e=>it(e,r,n)),r.size||=r.children.reduce((e,t)=>e+t.size,0)+r.sizeSelf,n&&r.children.sort(n),Object.defineProperty(r,`__nanovis`,{enumerable:!1,value:!0}),r}function at(e){return e.children.length===0?1:Math.max(...e.children.map(e=>at(e)))+1}var ot=/\bFirefox\//.test(navigator.userAgent),st;function ct(e){return st?st.format(e):`${e}`}function q(){return(window.performance||Date).now()}function lt(e){let t=e.toFixed(1).split(`.`,2);return`${ct(+t[0])}.${t[1]}`}function ut(e){return e===1?`1 byte`:e<1024?`${ct(e)} bytes`:e<1024*1024?`${lt(e/1024)} kb`:e<1024*1024*1024?`${lt(e/(1024*1024))} mb`:`${lt(e/(1024*1024*1024))} gb`}function dt(e,t,n,r,i,a){if(ot){let o=e.lineWidth,s=o/2;e.fillStyle=t,e.fillRect(n-s,r-s,i+o,o),e.fillRect(n-s,r+s,o,a-o),e.fillRect(n-s,r+a-s,i+o,o),e.fillRect(n+i-s,r+s,o,a-o);return}e.strokeStyle=t,e.strokeRect(n,r,i,a)}function ft(e){return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)}function pt(e){return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}try{st=new Intl.NumberFormat}catch{}var mt=()=>({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r<i;r++)n[r](...t)},events:{},on(e,t){return(this.events[e]||=[]).push(t),()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}}),J={getText:e=>e.text,getSubtext:e=>e.subtext,animate:!0,animateDuration:350},ht={fallback:`#CCC`,stroke:`#0008`,text:`#222`,hover:`#fff5`,shadow:`#0008`,fg:`#fff`,bg:`#222`},gt=46,_t=`14px sans-serif`,vt=`bold ${_t}`,yt=class{el;canvas;c;width=0;height=0;ratio=1;root;maxDepth;events;options;palette;disposables;getColor;getText;getSubtext;_animationFrame=null;constructor(e,t){this.options={...J,...t};let{getColor:n=et(e),getText:r=()=>void 0,getSubtext:i=()=>void 0}=this.options;this.palette={...ht,...t.palette},this.el=document.createElement(`div`),this.canvas=document.createElement(`canvas`),this.c=this.canvas.getContext(`2d`),this.root=e,this.maxDepth=at(e),this.disposables=[],this.events=mt(),this.getColor=n,this.getText=r,this.getSubtext=i,this.setFont(_t),t.onClick&&this.events.on(`click`,t.onClick),t.onHover&&this.events.on(`hover`,t.onHover),t.onLeave&&this.events.on(`leave`,t.onLeave),t.onSelect&&this.events.on(`select`,t.onSelect),this.el.addEventListener(`mouseleave`,()=>{this.events.emit(`leave`)})}invalidate(){this._animationFrame===null&&(this._animationFrame=requestAnimationFrame(()=>{this._animationFrame=null,this.tick()}))}tick(){this.draw()}draw(){}resize(){this.ratio=window.devicePixelRatio||1,this.canvas.style.width=`${this.width}px`,this.canvas.style.height=`${this.height}px`,this.canvas.width=Math.round(this.width*this.ratio),this.canvas.height=Math.round(this.height*this.ratio),this.c.scale(this.ratio,this.ratio),this.draw()}select(e,t){this.events.emit(`select`,e)}dispose(){this.disposables.forEach(e=>e()),this.disposables.length=0,this.el.remove()}[Symbol.dispose](){this.dispose()}_font=`14px sans-serif`;_fontWidthCache=new Map;ellipsisWidth=0;getFontCache(){return this._fontWidthCache.has(this._font)||this._fontWidthCache.set(this._font,{}),this._fontWidthCache.get(this._font)}setFont(e){this._font=e,this.c.font=e,this.c.textBaseline=`middle`,this.ellipsisWidth=3*this.charCodeWidth(gt)}charCodeWidth(e){let t=this.getFontCache(),n=t[e];return n===void 0&&(n=this.c.measureText(String.fromCharCode(e)).width,t[e]=n),n}textOverflowEllipsis(e,t){if(t<this.ellipsisWidth)return[``,0];let n=0,r=e.length,i=0;for(;i<r;){let r=this.charCodeWidth(e.charCodeAt(i));if(t<n+this.ellipsisWidth+r)return[`${e.slice(0,i)}...`,n+this.ellipsisWidth];n+=r,i++}return[e,n]}},Y=24,bt=5,xt=.01,St=1e3,Ct=class extends yt{mainEl=document.createElement(`div`);totalBytes;viewportMin;viewportMax;zoomedOutMin=0;zoomedOutWidth=0;prevWheelTime=0;prevWheelWasZoom=!1;stripeScaleAdjust=1;hoveredNode=null;selectedNode=null;nodeStartBytes=new Map;animationFromMin=0;animationFromMax=0;animationToMin=0;animationToMax=0;animationStart=0;constructor(e,t={}){super(e,t),this.totalBytes=e.size,this.viewportMin=this.animationFromMin=this.animationToMin=0,this.viewportMax=this.animationFromMax=this.animationToMax=this.totalBytes,Object.assign(this.mainEl.style,{position:`relative`}),Object.assign(this.canvas.style,{position:`absolute`,left:`0`,top:`0`});let n=!1;this.canvas.onmousedown=e=>{if(n=!1,e.button!==2){let t=e.pageX,r=e=>{let r=e.pageX-t;!n&&Math.abs(r)<3||(n=!0,this.modifyViewport(-r,0,null),t=e.pageX)},i=()=>{document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i)};e.preventDefault(),document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)}},this.canvas.onmousemove=e=>{this.updateHover(e)},this.canvas.onmouseout=()=>{this.changeHoveredNode(null)},this.canvas.onclick=e=>{if(n)return;let t=this.hitTestNode(e);this.changeHoveredNode(t),this.changeSelectedNode(t),t&&this.events.emit(`click`,t,e)},this.disposables.push(ft(e=>{let t=e.deltaX,n=e.deltaY,r=q(),i=r-this.prevWheelTime<50?this.prevWheelWasZoom:e.ctrlKey||e.metaKey;this.prevWheelTime=r,this.prevWheelWasZoom=i,(i||Math.abs(t)>=Math.abs(n))&&e.preventDefault(),this.modifyViewport(t,n,i?e.pageX:null),this.updateHover(e)})),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(pt(()=>this.resize())),this.mainEl.append(this.canvas),this.el.append(this.mainEl)}tick(){let e=(q()-this.animationStart)/(this.options.animateDuration??J.animateDuration);e<0||e>1?(e=1,this.viewportMin=this.animationToMin,this.viewportMax=this.animationToMax):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.viewportMin=this.animationFromMin+(this.animationToMin-this.animationFromMin)*e,this.viewportMax=this.animationFromMax+(this.animationToMax-this.animationFromMax)*e,this.invalidate()),this.draw()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.root,0,0,-1/0,1)}changeSelectedNode(e,t=this.options.animate??J.animate){if(this.selectedNode!==e&&(this.selectedNode=e,this.events.emit(`select`,e),e&&this.nodeStartBytes.has(e.id))){let n=this.nodeStartBytes.get(e.id),r=n+e.size;n=Math.max(0,n-e.size*xt),r=Math.min(this.totalBytes,r+e.size*xt),this.setViewport(n,r,t)}}select(e,t=this.options.animate??J.animate){this.changeSelectedNode(e,t)}resize(){this.width=this.el.clientWidth,this.height=this.maxDepth*Y+1,this.zoomedOutMin=this.width-St>>1,this.zoomedOutWidth=this.zoomedOutMin+St,this.zoomedOutMin<0&&(this.zoomedOutMin=0),this.zoomedOutWidth>this.width&&(this.zoomedOutWidth=this.width),this.zoomedOutWidth-=this.zoomedOutMin,this.stripeScaleAdjust=this.totalBytes/this.zoomedOutWidth,this.mainEl.style.height=`${this.height}px`,super.resize()}drawNode(e,t,n,r,i){this.nodeStartBytes.set(e.id,n);let a=this.zoomedOutWidth/(this.viewportMax-this.viewportMin),o=this.zoomedOutMin+(n-this.viewportMin)*a,s=e.size*a,c=o+s;if(c<r+1.5)return r;if(o+s<0||o>this.width)return c;let l=s<2?2:s,u=(o>0?o:0)+bt,d=t+Y/2,f=this.getText(e)||``,p=this.getSubtext(e)||``,m,h=0,g=s+o-u,_=Ze(this.getColor(e)||this.palette.fallback,this.c,this.zoomedOutMin-this.viewportMin*a,Y,a*this.stripeScaleAdjust),v=this.palette.text,y=-1/0;i&1?(v=this.palette.fg,this.setFont(vt)):(this.c.fillStyle=_,this.c.fillRect(o,t,l,Y),(i&2||this.hoveredNode&&e.id===this.hoveredNode.id)&&(this.c.fillStyle=this.palette.hover,this.c.fillRect(o,t,l,Y),i|=2)),this.ellipsisWidth<g&&(m=this.c.measureText(f).width,m<=g?h+=m:(f=this.textOverflowEllipsis(f,g)[0],h=g),this.c.fillStyle=v,this.c.fillText(f,u,d)),i&1&&this.setFont(_t),h+this.ellipsisWidth<g&&(p&&f&&(p=` - ${p}`),m=this.c.measureText(p).width,h+m>g&&(p=this.textOverflowEllipsis(p,g-h)[0]),this.c.globalAlpha=.5,this.c.fillText(p,u+h,d),this.c.globalAlpha=1);for(let r of e.children)y=this.drawNode(r,t+Y,n,y,i&-2),n+=r.size;return i&1||dt(this.c,this.palette.stroke,o+.5,t+.5,l,Y),c}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=this.viewportMin+(this.viewportMax-this.viewportMin)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=(e,t,n)=>{if(i>=n&&i<n+e.size){if(r>=t&&r<t+Y&&e.id)return e;if(r>=t+Y)for(let r of e.children){let e=a(r,t+Y,n);if(e)return e;n+=r.size}}return null};return a(this.root,0,0)}modifyViewport(e,t,n){let r=this.viewportMin,i=this.viewportMax,a=0;if(n!==null){let e=r+(i-r)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=1.01**t;r=e+(r-e)*a,i=e+(i-e)*a}else a=e*(i-r)/this.zoomedOutWidth;r+a<0?a=-r:i+a>this.totalBytes&&(a=this.totalBytes-i),r+=a,i+=a,r<0&&(r=0),i>this.totalBytes&&(i=this.totalBytes),this.setViewport(r,i,!1)}setViewport(e,t,n){this.animationFromMin=this.viewportMin,this.animationFromMax=this.viewportMax,this.animationToMin=e,this.animationToMax=t,n?this.animationStart=q():this.animationStart=0,this.invalidate()}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),this.events.emit(`hover`,t,e)}};function wt(e,t){for(;t;){if(t===e)return!0;t=t.parent}return!1}function Tt(e,t,n){if(e===t)return;let r=t.parent,i=r.size||1,a=0;Tt(e,r,n);for(let e of r.children){if(e===t){n.startAngle_+=n.sweepAngle_*a/i,n.sweepAngle_=e.size/i*n.sweepAngle_;break}a+=e.size}n.depth_+=1}var Et={};function Dt(e){return Et[e]||(Et[e]=400*Math.log(1+Math.log(1+e/8))),Et[e]}var X=-Math.PI/2,Ot=class extends yt{currentNode;hoveredNode;centerX=0;centerY=0;animationStart=0;radiusScale=1;sourceDepth=0;sourceStartAngle=X;sourceSweepAngle=Math.PI*2;targetNode;targetDepth=this.sourceDepth;targetStartAngle=this.sourceStartAngle;targetSweepAngle=this.sourceSweepAngle;animatedNode;animatedDepth=this.sourceDepth;animatedStartAngle=this.sourceStartAngle;animatedSweepAngle=this.sourceSweepAngle;previousHoveredNode;historyStack=[];constructor(e,t={}){for(;e.children.length===1;)e=e.children[0];super(e,t),this.currentNode=e,this.targetNode=this.currentNode,this.animatedNode=this.currentNode,this.canvas.onmousemove=e=>{this.handleMouseMove(e)},this.canvas.onmouseout=e=>{this.changeHoveredNode(void 0),this.events.emit(`hover`,null,e)},this.canvas.onclick=e=>{let t=this.hitTestNode(e);if(!t)return;this.events.emit(`click`,t,e);let n=[];t===this.animatedNode.parent?this.historyStack.length>0&&(t=this.historyStack.pop(),n=this.historyStack.slice()):n=this.historyStack.concat(this.currentNode),this.events.emit(`click`,t,e),t.children.length>0?(this.select(t),this.historyStack=n):e.preventDefault()},this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(pt(()=>this.resize())),this.disposables.push(ft(e=>this.handleMouseMove(e)))}select(e,t){(this.currentNode!==e||this.root)&&(this.currentNode=e||this.root,this.updateSunburst(t),this.events.emit(`select`,e))}resize(){this.width=this.el.clientWidth,this.height=this.width,this.centerX=this.width>>1,this.centerY=this.height>>1;let e=2*Math.ceil(Dt(this.maxDepth));this.radiusScale=this.width/e,super.resize()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,3,-1/0),this.c.strokeStyle=this.palette.stroke,this.c.beginPath(),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,1,-1/0),this.c.stroke(),this.animatedDepth===0&&(this.c.fillStyle=this.palette.stroke,this.setFont(vt),this.c.textAlign=`center`,this.c.fillText(this.getSubtext(this.targetNode)??ut(this.targetNode.size),this.centerX,this.centerY))}drawNode(e,t,n,r,i,a,o){let s=this.computeRadius(t+1);if(s>this.centerY)return o;e===this.hoveredNode&&(a|=8);let c=(n+s)/2,l=r+i;if(l-o<1.5/c)return o;let u=2/c;if(i>u&&(u=i),a&2)this.c.fillStyle=Ze(this.getColor(e)||this.palette.fallback,this.c,this.centerX,this.centerY,1),this.c.beginPath(),this.c.arc(this.centerX,this.centerY,n,r,r+u,!1),this.c.arc(this.centerX,this.centerY,s,r+u,r,!0),this.c.fill(),this.hoveredNode&&(a&8||e.parent===this.hoveredNode)&&(this.c.fillStyle=this.palette.hover,this.c.fill());else{let e=u===Math.PI*2,t=a&4||e?s:n;a&1&&n>0&&this.c.arc(this.centerX,this.centerY,n,r+u,r,!0),this.c.moveTo(this.centerX+t*Math.cos(r),this.centerY+t*Math.sin(r)),this.c.arc(this.centerX,this.centerY,s,r,r+u,!1),e||this.c.lineTo(this.centerX+n*Math.cos(r+u),this.centerY+n*Math.sin(r+u))}let d=e.size,f=a&10,p=0,m=-1/0;for(let n of e.children)m=this.drawNode(n,t+1,s,r+i*p/d,n.size/d*i,f,m),p+=n.size,f|=4;return l}changeHoveredNode(e,t){this.hoveredNode!==e&&(this.hoveredNode=e,this.updateSunburst(t))}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left-this.centerX,r=e.clientY-t.top-this.centerY,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n),o=(e,t,n,r,s)=>{let c=this.computeRadius(t+1);if(c>this.centerY)return;if(i>=n&&i<c){let t=a-r;if(t/=Math.PI*2,t-=Math.floor(t),t*=Math.PI*2,t<s)return e===this.animatedNode?e.parent:e}let l=e.size,u=0;for(let n of e.children){let e=o(n,t+1,c,r+s*u/l,n.size/l*s);if(e)return e;u+=n.size}};return o(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle)}tick(){let e=(q()-this.animationStart)/(this.options.animateDuration??J.animateDuration);e<0||e>1?(e=1,this.animatedNode=this.targetNode,this.targetDepth=0,this.targetStartAngle=X,this.targetSweepAngle=Math.PI*2):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.invalidate()),this.animatedDepth=this.sourceDepth+(this.targetDepth-this.sourceDepth)*e,this.animatedStartAngle=this.sourceStartAngle+(this.targetStartAngle-this.sourceStartAngle)*e,this.animatedSweepAngle=this.sourceSweepAngle+(this.targetSweepAngle-this.sourceSweepAngle)*e,this.draw()}handleMouseMove(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),t&&t!==this.animatedNode.parent?(this.events.emit(`hover`,t,e),this.canvas.style.cursor=`pointer`):this.events.emit(`hover`,null,e)}computeRadius(e){return Dt(e)*this.radiusScale}updateSunburst(e=this.options.animate??!0){if(this.previousHoveredNode!==this.hoveredNode&&(this.previousHoveredNode=this.hoveredNode,this.hoveredNode||(this.canvas.style.cursor=`auto`,this.events.emit(`hover`,null)),this.invalidate()),this.targetNode!==this.currentNode){if(this.historyStack.length=0,this.invalidate(),e&&(this.animationStart=q()),wt(this.animatedNode,this.currentNode)){let e={depth_:this.animatedDepth,startAngle_:this.animatedStartAngle,sweepAngle_:this.animatedSweepAngle};Tt(this.animatedNode,this.currentNode,e),this.animatedDepth=e.depth_,this.animatedStartAngle=e.startAngle_,this.animatedSweepAngle=e.sweepAngle_,this.targetDepth=0,this.targetStartAngle=X,this.targetSweepAngle=Math.PI*2,this.animatedNode=this.currentNode}else if(wt(this.currentNode,this.animatedNode)){let e={depth_:0,startAngle_:X,sweepAngle_:Math.PI*2};Tt(this.currentNode,this.animatedNode,e),this.targetDepth=e.depth_,this.targetStartAngle=e.startAngle_,this.targetSweepAngle=e.sweepAngle_}else this.animationStart=-1/0,this.animatedNode=this.currentNode;this.sourceDepth=this.animatedDepth,this.sourceStartAngle=this.animatedStartAngle,this.sourceSweepAngle=this.animatedSweepAngle,this.targetNode=this.currentNode,this.events.emit(`select`,this.currentNode)}}},Z=4,Q=20,kt=2*Z,$=Q+Z;function At(e,t,n,r,i){let a=[],o=(t,n,r,i,a)=>{let o=e[t].size*a,s=e[n].size*a;return Math.max(r*r*o/(i*i),i*i/(r*r*s))};return((t,n,r,i,s)=>{for(;t<e.length;){let c=0;for(let n=t;n<e.length;n++)c+=e[n].size;let l=Math.min(i,s),u=i*s/c,d=t,f=0,p=0;for(;d<e.length;){let n=e[d].size*u,r=o(t,d,l,f+n,u);if(d>t&&p<r)break;f+=n,p=r,d++}let m=Math.round(f/l),h=0;for(let o=t;o<d;o++){let t=e[o],c=t.size*u,d=Math.round(l*h/f),p=Math.round(l*(h+c)/f),[g,_,v,y]=i>=s?[n,r+d,m,p-d]:[n+d,r,p-d,m];a.push({node:t,box:[g,_,v,y],children:v>kt&&y>$?At(t.children,g+Z,_+Q,v-kt,y-$):[]}),h+=c}t=d,i>=s?(n+=m,i-=m):(r+=m,s-=m)}})(0,t,n,r,i),a}var jt=class extends yt{hoveredNode=null;currentNode=null;bgOriginX=0;bgOriginY=0;layers={base:null};baseLayoutCache;currentOriginX=0;currentOriginY=0;animationStart=0;animationBlend=1;animationSource=null;animationTarget=null;constructor(e,t={}){super(e,t),this.canvas.addEventListener(`mousemove`,e=>{this.updateHover(e)}),this.canvas.addEventListener(`mouseout`,e=>{this.changeHoveredNode(null),this.events.emit(`hover`,null,e)}),this.el.addEventListener(`click`,e=>{let t=this.hitTestNode(e);if(t){let n=t.node;this.events.emit(`click`,n,e),n.children.length?t===this.layers.current?this.updateHover(e):(this.changeCurrentLayout(t),this.changeHoveredNode(null)):this.updateHover(e)}else this.currentNode&&(this.changeCurrentLayout(null),this.updateHover(e))}),this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(ft(e=>this.updateHover(e))),this.disposables.push(pt(()=>this.resize()))}select(e,t){let n=null;e===this.root&&(e=null),n=e?this.searchFor([this.layers.current,this.layers.base],e):null,this.changeCurrentLayout(n,t)}drawBaseLayout(){!this.width||!this.height||(this.c.clearRect(0,0,this.width,this.height),this.bgOriginX=this.bgOriginY=0,this.baseLayoutCache?this.c.putImageData(this.baseLayoutCache,0,0):(this.drawLayout(this.layers.base,0,[]),this.baseLayoutCache=this.c.getImageData(0,0,this.width*this.ratio,this.height*this.ratio)))}draw(){this.drawBaseLayout(),this.layers.current||this.drawHoverHighlight(this.layers.base);let e=this.layers.current?this.animationSource?this.animationTarget?1:1-this.animationBlend:this.animationBlend:0;if(this.layers.current){let[t,n,r,i]=this.layers.base.box;this.c.globalAlpha=.6*(!this.layers.current||!this.animationSource?1:e),this.c.fillStyle=this.palette.bg,this.c.fillRect(t,n,r,i),this.c.globalAlpha=1}if(this.layers.previous&&this.drawLayout(this.layers.previous,1,[this.layers.current]),this.layers.current){let[t,n,r,i]=this.layers.current.box,a=this.c.getTransform(),o=Math.sqrt(a.a*a.d);this.c.save(),this.c.shadowColor=this.palette.shadow,this.c.shadowBlur=30*e*o,this.c.shadowOffsetX=o*(2*this.width),this.c.shadowOffsetY=o*(2*this.height+15*e),this.c.fillRect(t-2*this.width,n-2*this.height,r,i),this.c.restore(),this.bgOriginX=this.currentOriginX,this.bgOriginY=this.currentOriginY,this.drawLayout(this.layers.current,0,[]),this.drawHoverHighlight(this.layers.current)}}tick(){let e=this.animationBlend,t=this.currentNode;this.animationBlend=(q()-this.animationStart)/(this.options.animateDuration??J.animateDuration),this.animationBlend<0||this.animationBlend>1?(this.currentNode=this.animationTarget,this.layers.previous=void 0,this.animationBlend=1):(this.animationBlend=1-this.animationBlend,this.animationBlend*=this.animationBlend*this.animationBlend,this.animationBlend=1-this.animationBlend,this.invalidate()),(this.animationBlend!==e||this.currentNode!==t)&&this.updateCurrentLayout(),this.draw()}resize(){this.baseLayoutCache=void 0;let e=this.width,t=this.height;this.width=Math.min(this.el.clientWidth,1600),this.height=Math.max(Math.round(this.width/2),innerHeight-200),(this.width!==e||this.height!==t||!this.layers.base)&&(this.layers.base=At([this.root],0,0,this.width-1,this.height-1)[0],this.updateCurrentLayout()),super.resize()}*iterateNodeToDraw(e,t,n){let r=e.node,[i,a,o,s]=e.box,c=r===this.hoveredNode|(e===this.animationTarget?2:0);if(t===1)for(let e of n){if(!e)continue;let[n,r,c,l]=e.box;if(i>=n&&a>=r&&i+o<=n+c&&a+s<=r+l){t=2;break}}for(let r of e.children)c|=yield*this.iterateNodeToDraw(r,t,n);return t!==2&&(yield e),c}drawHoverHighlight(e){let t=this.iterateNodeToDraw(e,0,[]),n=this.c.globalCompositeOperation;for(;;){let e=t.next();if(e.done){this.c.globalCompositeOperation=n;return}let r=e.value.node;if(this.hoveredNode===r){this.c.globalCompositeOperation=`overlay`;let[t,n,r,i]=e.value.box;this.c.fillStyle=this.palette.hover,this.c.fillRect(t,n,r,i)}}}drawNodeBackground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return e.value;let[t,n,i,a]=e.value.box;this.c.fillStyle=Ze(this.getColor(e.value.node)||this.palette.fallback,this.c,this.bgOriginX,this.bgOriginY,1),e.value.children.length?(this.c.fillRect(t,n,i,Q),this.c.fillRect(t,n+a-Z,i,Z),this.c.fillRect(t,n+Q,Z,a-$),this.c.fillRect(t+i-Z,n+Q,Z,a-$)):this.c.fillRect(t,n,i,a)}}drawLayout(e,t,n){this.drawNodeBackground(e,t,n),this.drawNodeForeground(e,t,n)}drawNodeForeground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return;let t=e.value.node,[n,i,a,o]=e.value.box;if(dt(this.c,this.palette.stroke,n+.5,i+.5,a,o),o>=Q){this.c.fillStyle=this.palette.text;let e=a-kt,r=i+Math.round($/2),[s,c]=this.textOverflowEllipsis(this.getText(t)||``,e),l=n+Math.round((a-c)/2),u=this.getText(t),d=this.getSubtext(t);if(s===u&&t.children.length){let t=d||``;t&&u&&(t=` - ${t}`);let[i,o]=this.textOverflowEllipsis(t,e-c);l=n+Math.round((a-c-o)/2),this.c.globalAlpha=.5,this.c.fillText(i,l+c,r),this.c.globalAlpha=1}if(this.c.fillText(s,l,r),o>$+16&&!t.children.length){let[t,r]=this.textOverflowEllipsis(d||``,e);this.c.globalAlpha=.5;let s=u?Q:Q/2+Z;this.c.fillText(t,n+Math.round((a-r)/2),i+s+Math.round(o-$)/2),this.c.globalAlpha=1}}}}updateCurrentLayout(){let e=this.options.selectedPaddingRatio??.2;if(this.currentNode){let[t,n,r,i]=this.currentNode.box,a=t+r,o=n+i,s=Math.round(this.width*e/2),c=Math.round(this.height*e/2),l=this.width-s-1,u=this.height-c-1,d=this.animationTarget?this.animationBlend:1-this.animationBlend,f=Math.round(t+(s-t)*d),p=Math.round(n+(c-n)*d),m=Math.round(a+(l-a)*d),h=Math.round(o+(u-o)*d),g=e=>e-Math.floor(e/64-.5)*64;this.layers.current=At([this.currentNode.node],f,p,m-f,h-p)[0],this.currentOriginX=g(-(t+a)/2)*(1-d)+(f+m)/2,this.currentOriginY=g(-(n+o)/2)*(1-d)+(p+h)/2}else this.layers.current=void 0,this.currentOriginX=0,this.currentOriginY=0}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=(e,t)=>{for(let a of e){let[e,o,s,c]=a.box;if(n>=e&&r>=o&&n<e+s&&r<o+c)return i(a.children,!1)||(t?null:a)}return null};return this.layers.current?i([this.layers.current],!1):i([this.layers.base],!0)}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t&&t.node),this.events.emit(`hover`,t?.node||null,e)}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}searchFor(e,t){for(let n of e){if(!n)continue;let e=n.node===t?n:this.searchFor(n.children,t);if(e)return e}return null}changeCurrentLayout(e,t=this.options.animate){this.animationTarget!==e&&(this.events.emit(`select`,e?.node||null),this.layers.previous=e?this.layers.current:void 0,t&&(this.animationBlend=0,this.animationStart=q(),this.animationSource=this.currentNode),this.animationTarget=e,this.currentNode=e||this.searchFor([this.layers.base],this.currentNode.node),this.updateCurrentLayout(),this.invalidate())}},Mt={flex:`~ gap-1 items-center wrap`},Nt={key:0,"i-ph-arrow-right-bold":``,"text-sm":``,"op-fade":``},Pt=[`onClick`],Ft=Object.assign(a({__name:`NavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:n}){let r=e,i=n,a=f(()=>{let e=[],t=r.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,n)=>(h(),v(`div`,Mt,[(h(!0),v(p,null,u(a.value,(e,n)=>(h(),v(p,{key:e.id},[n>0?(h(),v(`div`,Nt)):t(``,!0),y(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>i(`select`,e)},[y(`span`,null,g(e.text||e.id),1)],8,Pt)],64))),128))]))}}),{__name:`ChartNavBreadcrumb`});function It(t){let{data:i,nameKey:a,sizeKey:s,rootText:c,nodeType:l,graphOptions:u,onUpdate:d}=t,p=n(void 0),h=n(void 0),g=ee(void 0),_=n(void 0),v,y=f(()=>{if(t.tree)return t.tree.value;let e=o(i),n=new Map,r=0,u={id:`~root`,text:c,size:0,sizeSelf:0,children:[]};if(!e?.length)return{map:n,root:u,maxDepth:r};let d=[];d.unshift(()=>{u.size+=u.children.reduce((e,t)=>e+t.size,0),u.subtext=E(u.size).join(` `),u.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function f(e,t,i,a,o){if(n.has(t))return n.get(t);o>r&&(r=o);let s={id:t,text:i,size:0,sizeSelf:0,children:[],meta:{...e,path:i,type:`folder`},parent:a};return n.set(t,s),a.children.push(s),d.unshift(()=>{let t=s.sizeSelf;s.size+=s.children.reduce((e,t)=>e+t.size,0),s.subtext=E(s.size).join(` `),s.children.length&&t/s.size>.1&&s.children.push({id:`${s.id}-self`,text:``,size:t,sizeSelf:t,subtext:E(t).join(` `),children:[],meta:{...e,path:``,type:l},parent:s}),s.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),s}function p(e){let t=e[a].split(`/`).filter(Boolean),r=u,i=``,o=0;t.forEach((c,u)=>{if(i+=(i?`/`:``)+c,o++,u===t.length-1){let t={id:e[a],text:c,size:e[s],sizeSelf:e[s],subtext:E(e[s]).join(` `),children:[],meta:{...e,path:c,type:l}};r.children.push(t),n.set(e[a],t)}else r=f(e,i,c,r,o)})}return e.forEach(p),d.forEach(e=>e()),{map:n,root:u,maxDepth:r}}),b=f(()=>({animate:ae.value.chartAnimation,palette:{stroke:T.value?`#222`:`#555`,fg:T.value?`#fff`:`#000`,bg:T.value?`#111`:`#fff`},getColor:et(y.value.root,T.value?.8:.9,T.value?1:1.1),getSubtext:e=>e.subtext,...u}));function x(e,t){g.value=e?.meta,e?.children.length||(e=e?.parent),_.value?.select(e,t)}function S(){v?.(),h.value=y.value.root,d?.(),e(()=>{let e=g.value&&y.value.map.get(g.value[a])||null;e&&x(e,!1)}),v=()=>{_.value?.dispose(),_.value=void 0,g.value=void 0}}return e(()=>{m(()=>[y.value,b.value],()=>{S()},{deep:!0,immediate:!1}),S()}),r(()=>{v?.()}),{tree:y,graph:_,chartOptions:b,nodeHover:p,nodeSelected:h,selectedNode:g,selectNode:x,buildGraph:S}}export{jt as a,Ge as c,Ot as i,Ft as n,Qe as o,Ct as r,it as s,It as t};
|
|
1
|
+
import{B as e,C as t,Et as n,Jt as r,K as i,M as a,Q as o,S as s,Z as c,at as l,b as u,h as d,kt as f,ot as p,q as m,qt as h,v as g,w as _,wt as v,x as y,xt as ee}from"./CUBdwZVs.js";import{a as b,c as x,d as S,f as C,i as te,l as w,o as ne,r as re,u as ie}from"./5tvbNeKa.js";import{t as T}from"./CxYeQaBW.js";import{t as E}from"./CqfNwh25.js";import{t as ae}from"./CBfhMqaX.js";function D(){return typeof window<`u`}function O(e){return oe(e)?(e.nodeName||``).toLowerCase():`#document`}function k(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function A(e){return((oe(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function oe(e){return D()?e instanceof Node||e instanceof k(e).Node:!1}function j(e){return D()?e instanceof Element||e instanceof k(e).Element:!1}function M(e){return D()?e instanceof HTMLElement||e instanceof k(e).HTMLElement:!1}function se(e){return!D()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof k(e).ShadowRoot}function N(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=L(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ce(e){return/^(table|td|th)$/.test(O(e))}function P(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var le=/transform|translate|scale|rotate|perspective|filter/,ue=/paint|layout|strict|content/,F=e=>!!e&&e!==`none`,de;function fe(e){let t=j(e)?L(e):e;return F(t.transform)||F(t.translate)||F(t.scale)||F(t.rotate)||F(t.perspective)||!me()&&(F(t.backdropFilter)||F(t.filter))||le.test(t.willChange||``)||ue.test(t.contain||``)}function pe(e){let t=z(e);for(;M(t)&&!I(t);){if(fe(t))return t;if(P(t))return null;t=z(t)}return null}function me(){return de??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),de}function I(e){return/^(html|body|#document)$/.test(O(e))}function L(e){return k(e).getComputedStyle(e)}function R(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function z(e){if(O(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||se(e)&&e.host||A(e);return se(t)?t.host:t}function he(e){let t=z(e);return I(t)?e.ownerDocument?e.ownerDocument.body:e.body:M(t)&&N(t)?t:he(t)}function ge(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=he(e),i=r===e.ownerDocument?.body,a=k(r);if(i){let e=_e(a);return t.concat(a,a.visualViewport||[],N(r)?r:[],e&&n?ge(e):[])}else return t.concat(r,ge(r,[],n))}function _e(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ve(e){let t=L(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=M(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=C(n)!==a||C(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ye(e){return j(e)?e:e.contextElement}function B(e){let t=ye(e);if(!M(t))return x(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ve(t),o=(a?C(n.width):n.width)/r,s=(a?C(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var be=x(0);function xe(e){let t=k(e);return!me()||!t.visualViewport?be:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Se(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==k(e)?!1:t}function V(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ye(e),o=x(1);t&&(r?j(r)&&(o=B(r)):o=B(e));let s=Se(a,n,r)?xe(a):x(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=k(a),t=r&&j(r)?k(r):r,n=e,i=_e(n);for(;i&&r&&t!==n;){let e=B(i),t=i.getBoundingClientRect(),r=L(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=k(i),i=_e(n)}}return S({width:u,height:d,x:c,y:l})}function H(e,t){let n=R(e).scrollLeft;return t?t.left+n:V(A(e)).left+n}function Ce(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-H(e,n),y:n.top+t.scrollTop}}function we(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=A(r),s=t?P(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=x(1),u=x(0),d=M(r);if((d||!d&&!a)&&((O(r)!==`body`||N(o))&&(c=R(r)),d)){let e=V(r);l=B(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ce(o,c):x(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Te(e){return Array.from(e.getClientRects())}function Ee(e){let t=A(e),n=R(e),r=e.ownerDocument.body,i=w(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=w(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+H(e),s=-n.scrollTop;return L(r).direction===`rtl`&&(o+=w(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var De=25;function Oe(e,t){let n=k(e),r=A(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=me();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=H(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=De&&(a-=o)}else l<=De&&(a+=l);return{width:a,height:o,x:s,y:c}}function ke(e,t){let n=V(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=M(e)?B(e):x(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ae(e,t,n){let r;if(t===`viewport`)r=Oe(e,n);else if(t===`document`)r=Ee(A(e));else if(j(t))r=ke(t,n);else{let n=xe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S(r)}function je(e,t){let n=z(e);return n===t||!j(n)||I(n)?!1:L(n).position===`fixed`||je(n,t)}function Me(e,t){let n=t.get(e);if(n)return n;let r=ge(e,[],!1).filter(e=>j(e)&&O(e)!==`body`),i=null,a=L(e).position===`fixed`,o=a?z(e):e;for(;j(o)&&!I(o);){let t=L(o),n=fe(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||N(o)&&!n&&je(e,o))?r=r.filter(e=>e!==o):i=t,o=z(o)}return t.set(e,r),r}function Ne(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?P(t)?[]:Me(t,this._c):[].concat(n),r],o=Ae(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ae(t,a[e],i);s=w(n.top,s),c=ie(n.right,c),l=ie(n.bottom,l),u=w(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Pe(e){let{width:t,height:n}=ve(e);return{width:t,height:n}}function Fe(e,t,n){let r=M(t),i=A(t),a=n===`fixed`,o=V(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=x(0);function l(){c.x=H(i)}if(r||!r&&!a)if((O(t)!==`body`||N(i))&&(s=R(t)),r){let e=V(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Ce(i,s):x(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function U(e){return L(e).position===`static`}function Ie(e,t){if(!M(e)||L(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return A(e)===n&&(n=n.ownerDocument.body),n}function Le(e,t){let n=k(e);if(P(e))return n;if(!M(e)){let t=z(e);for(;t&&!I(t);){if(j(t)&&!U(t))return t;t=z(t)}return n}let r=Ie(e,t);for(;r&&ce(r)&&U(r);)r=Ie(r,t);return r&&I(r)&&U(r)&&!fe(r)?n:r||pe(e)||n}var Re=async function(e){let t=this.getOffsetParent||Le,n=this.getDimensions,r=await n(e.floating);return{reference:Fe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ze(e){return L(e).direction===`rtl`}var Be={convertOffsetParentRelativeRectToViewportRelativeRect:we,getDocumentElement:A,getClippingRect:Ne,getOffsetParent:Le,getElementRects:Re,getClientRects:Te,getDimensions:Pe,getScale:B,isElement:j,isRTL:ze},Ve=b,He=ne,Ue=te,We=(e,t,n)=>{let r=new Map,i={platform:Be,...n},a={...i.platform,_c:r};return re(e,t,{...i,platform:a})},Ge=Object.assign(a({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(e){let{hoverX:t,hoverY:r}=n(e),i=l(`hoverElement`),a=ee(0),c=ee(0);return p([t,r],([e,t])=>{We({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},i.value,{placement:`right-start`,middleware:[Ue(),He(),Ve({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{a.value=e,c.value=t})}),(e,t)=>(m(),s(g,{to:`body`},[y(`div`,{ref_key:`hoverElement`,ref:i,fixed:``,"z-panel-content":``,"pointer-events-none":``,style:h({left:`${a.value}px`,top:`${c.value}px`})},[o(e.$slots,`default`)],4)]))}}),{__name:`DisplayGraphHoverView`});function Ke(e,t=1,n=1){let r=(.6+.4*Math.max(0,Math.cos(e)))*t,i=(.5+.2*Math.max(0,Math.cos(e+Math.PI*2/3)))*n;return`hsl(${e*180/Math.PI}deg, ${Math.round(100*r)}%, ${Math.round(100*i)}%)`}var qe,Je,Ye,W,G,K=1,Xe;function Ze(e,t,n,r,i){if(!Array.isArray(e))return e;let a=window.devicePixelRatio||1;if(qe!==t||Je!==a||Ye!==i){let n=Math.round(64*a)/64;K=i,K=Math.log2(K),K-=Math.floor(K);let r=K,o=Math.min(1,8*r);K=2**K;let s=8*Math.SQRT2/K;qe=t,Je=a,Ye=i,W||=document.createElement(`canvas`),G||=W.getContext(`2d`),W.width=W.height=Math.round(64*n),G.scale(n,n),G.fillStyle=e[0],G.fillRect(0,0,64,64),G.globalAlpha=.25,G.fillStyle=e[1],G.fillRect(0,0,64,64),G.globalAlpha=.67,G.strokeStyle=e[1],G.beginPath();for(let e=0;e<=64;e+=16)G.moveTo(e-32,e+32),G.lineTo(e+32,e-32);if(G.lineWidth=s*(1-(o-r)/2),G.stroke(),o+r>0){G.beginPath();for(let e=8;e<64;e+=16)G.moveTo(e-32,e+32),G.lineTo(e+32,e-32);G.lineWidth=s*(o+r)/2,G.stroke()}Xe=t.createPattern(W,`repeat`),K/=n}return n/=64*K*a,n-=Math.floor(n),n*=64*K*a,Xe.setTransform(new DOMMatrix([K,0,0,K,n,r])),Xe}function Qe(e){return Array.isArray(e)?`url('data:image/svg+xml,<svg width="26" height="26" xmlns="http://www.w3.org/2000/svg"><rect width="26" height="26" fill="${e[0]}"/><rect width="26" height="26" fill="${e[1]}" fill-opacity="25%"/><path d="M22.5 -3.5L-3.5 22.5M35.5 9.5L9.5 35.5" stroke="${e[1]}" stroke-opacity="67%" stroke-width="9.19239"/></svg>')`:e}function $e(e){return t=>t.id&&e[t.id]||t.color}function et(e,t=1,n=1){let r={};return tt(r,e,0,Math.PI*2,t,n),$e(r)}function tt(e,t,n,r,i=1,a=1){let o=t.size;e[t.id]=Ke(n+r/2,i,a);for(let s of t.children){let t=s.size/o*r;tt(e,s,n,t,i,a),n+=t}}var nt=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function rt(e=16,t=nt){let n=``,r=e,i=t.length;for(;r--;)n+=t[Math.random()*i|0];return n}function it(e,t,n=(e,t)=>t.size-e.size){if(e.__nanovis)return e;let r={...e};return r.id||=rt(),r.parent||=t,r.children||=[],r.sizeSelf==null&&r.size!=null&&r.children.length===0?r.sizeSelf=r.size:r.sizeSelf||=0,r.children=(r.children||[]).map(e=>it(e,r,n)),r.size||=r.children.reduce((e,t)=>e+t.size,0)+r.sizeSelf,n&&r.children.sort(n),Object.defineProperty(r,`__nanovis`,{enumerable:!1,value:!0}),r}function at(e){return e.children.length===0?1:Math.max(...e.children.map(e=>at(e)))+1}var ot=/\bFirefox\//.test(navigator.userAgent),st;function ct(e){return st?st.format(e):`${e}`}function q(){return(window.performance||Date).now()}function lt(e){let t=e.toFixed(1).split(`.`,2);return`${ct(+t[0])}.${t[1]}`}function ut(e){return e===1?`1 byte`:e<1024?`${ct(e)} bytes`:e<1024*1024?`${lt(e/1024)} kb`:e<1024*1024*1024?`${lt(e/(1024*1024))} mb`:`${lt(e/(1024*1024*1024))} gb`}function dt(e,t,n,r,i,a){if(ot){let o=e.lineWidth,s=o/2;e.fillStyle=t,e.fillRect(n-s,r-s,i+o,o),e.fillRect(n-s,r+s,o,a-o),e.fillRect(n-s,r+a-s,i+o,o),e.fillRect(n+i-s,r+s,o,a-o);return}e.strokeStyle=t,e.strokeRect(n,r,i,a)}function ft(e){return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)}function pt(e){return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}try{st=new Intl.NumberFormat}catch{}var mt=()=>({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r<i;r++)n[r](...t)},events:{},on(e,t){return(this.events[e]||=[]).push(t),()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}}),J={getText:e=>e.text,getSubtext:e=>e.subtext,animate:!0,animateDuration:350},ht={fallback:`#CCC`,stroke:`#0008`,text:`#222`,hover:`#fff5`,shadow:`#0008`,fg:`#fff`,bg:`#222`},gt=46,_t=`14px sans-serif`,vt=`bold ${_t}`,yt=class{el;canvas;c;width=0;height=0;ratio=1;root;maxDepth;events;options;palette;disposables;getColor;getText;getSubtext;_animationFrame=null;constructor(e,t){this.options={...J,...t};let{getColor:n=et(e),getText:r=()=>void 0,getSubtext:i=()=>void 0}=this.options;this.palette={...ht,...t.palette},this.el=document.createElement(`div`),this.canvas=document.createElement(`canvas`),this.c=this.canvas.getContext(`2d`),this.root=e,this.maxDepth=at(e),this.disposables=[],this.events=mt(),this.getColor=n,this.getText=r,this.getSubtext=i,this.setFont(_t),t.onClick&&this.events.on(`click`,t.onClick),t.onHover&&this.events.on(`hover`,t.onHover),t.onLeave&&this.events.on(`leave`,t.onLeave),t.onSelect&&this.events.on(`select`,t.onSelect),this.el.addEventListener(`mouseleave`,()=>{this.events.emit(`leave`)})}invalidate(){this._animationFrame===null&&(this._animationFrame=requestAnimationFrame(()=>{this._animationFrame=null,this.tick()}))}tick(){this.draw()}draw(){}resize(){this.ratio=window.devicePixelRatio||1,this.canvas.style.width=`${this.width}px`,this.canvas.style.height=`${this.height}px`,this.canvas.width=Math.round(this.width*this.ratio),this.canvas.height=Math.round(this.height*this.ratio),this.c.scale(this.ratio,this.ratio),this.draw()}select(e,t){this.events.emit(`select`,e)}dispose(){this.disposables.forEach(e=>e()),this.disposables.length=0,this.el.remove()}[Symbol.dispose](){this.dispose()}_font=`14px sans-serif`;_fontWidthCache=new Map;ellipsisWidth=0;getFontCache(){return this._fontWidthCache.has(this._font)||this._fontWidthCache.set(this._font,{}),this._fontWidthCache.get(this._font)}setFont(e){this._font=e,this.c.font=e,this.c.textBaseline=`middle`,this.ellipsisWidth=3*this.charCodeWidth(gt)}charCodeWidth(e){let t=this.getFontCache(),n=t[e];return n===void 0&&(n=this.c.measureText(String.fromCharCode(e)).width,t[e]=n),n}textOverflowEllipsis(e,t){if(t<this.ellipsisWidth)return[``,0];let n=0,r=e.length,i=0;for(;i<r;){let r=this.charCodeWidth(e.charCodeAt(i));if(t<n+this.ellipsisWidth+r)return[`${e.slice(0,i)}...`,n+this.ellipsisWidth];n+=r,i++}return[e,n]}},Y=24,bt=5,xt=.01,St=1e3,Ct=class extends yt{mainEl=document.createElement(`div`);totalBytes;viewportMin;viewportMax;zoomedOutMin=0;zoomedOutWidth=0;prevWheelTime=0;prevWheelWasZoom=!1;stripeScaleAdjust=1;hoveredNode=null;selectedNode=null;nodeStartBytes=new Map;animationFromMin=0;animationFromMax=0;animationToMin=0;animationToMax=0;animationStart=0;constructor(e,t={}){super(e,t),this.totalBytes=e.size,this.viewportMin=this.animationFromMin=this.animationToMin=0,this.viewportMax=this.animationFromMax=this.animationToMax=this.totalBytes,Object.assign(this.mainEl.style,{position:`relative`}),Object.assign(this.canvas.style,{position:`absolute`,left:`0`,top:`0`});let n=!1;this.canvas.onmousedown=e=>{if(n=!1,e.button!==2){let t=e.pageX,r=e=>{let r=e.pageX-t;!n&&Math.abs(r)<3||(n=!0,this.modifyViewport(-r,0,null),t=e.pageX)},i=()=>{document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i)};e.preventDefault(),document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)}},this.canvas.onmousemove=e=>{this.updateHover(e)},this.canvas.onmouseout=()=>{this.changeHoveredNode(null)},this.canvas.onclick=e=>{if(n)return;let t=this.hitTestNode(e);this.changeHoveredNode(t),this.changeSelectedNode(t),t&&this.events.emit(`click`,t,e)},this.disposables.push(ft(e=>{let t=e.deltaX,n=e.deltaY,r=q(),i=r-this.prevWheelTime<50?this.prevWheelWasZoom:e.ctrlKey||e.metaKey;this.prevWheelTime=r,this.prevWheelWasZoom=i,(i||Math.abs(t)>=Math.abs(n))&&e.preventDefault(),this.modifyViewport(t,n,i?e.pageX:null),this.updateHover(e)})),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(pt(()=>this.resize())),this.mainEl.append(this.canvas),this.el.append(this.mainEl)}tick(){let e=(q()-this.animationStart)/(this.options.animateDuration??J.animateDuration);e<0||e>1?(e=1,this.viewportMin=this.animationToMin,this.viewportMax=this.animationToMax):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.viewportMin=this.animationFromMin+(this.animationToMin-this.animationFromMin)*e,this.viewportMax=this.animationFromMax+(this.animationToMax-this.animationFromMax)*e,this.invalidate()),this.draw()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.root,0,0,-1/0,1)}changeSelectedNode(e,t=this.options.animate??J.animate){if(this.selectedNode!==e&&(this.selectedNode=e,this.events.emit(`select`,e),e&&this.nodeStartBytes.has(e.id))){let n=this.nodeStartBytes.get(e.id),r=n+e.size;n=Math.max(0,n-e.size*xt),r=Math.min(this.totalBytes,r+e.size*xt),this.setViewport(n,r,t)}}select(e,t=this.options.animate??J.animate){this.changeSelectedNode(e,t)}resize(){this.width=this.el.clientWidth,this.height=this.maxDepth*Y+1,this.zoomedOutMin=this.width-St>>1,this.zoomedOutWidth=this.zoomedOutMin+St,this.zoomedOutMin<0&&(this.zoomedOutMin=0),this.zoomedOutWidth>this.width&&(this.zoomedOutWidth=this.width),this.zoomedOutWidth-=this.zoomedOutMin,this.stripeScaleAdjust=this.totalBytes/this.zoomedOutWidth,this.mainEl.style.height=`${this.height}px`,super.resize()}drawNode(e,t,n,r,i){this.nodeStartBytes.set(e.id,n);let a=this.zoomedOutWidth/(this.viewportMax-this.viewportMin),o=this.zoomedOutMin+(n-this.viewportMin)*a,s=e.size*a,c=o+s;if(c<r+1.5)return r;if(o+s<0||o>this.width)return c;let l=s<2?2:s,u=(o>0?o:0)+bt,d=t+Y/2,f=this.getText(e)||``,p=this.getSubtext(e)||``,m,h=0,g=s+o-u,_=Ze(this.getColor(e)||this.palette.fallback,this.c,this.zoomedOutMin-this.viewportMin*a,Y,a*this.stripeScaleAdjust),v=this.palette.text,y=-1/0;i&1?(v=this.palette.fg,this.setFont(vt)):(this.c.fillStyle=_,this.c.fillRect(o,t,l,Y),(i&2||this.hoveredNode&&e.id===this.hoveredNode.id)&&(this.c.fillStyle=this.palette.hover,this.c.fillRect(o,t,l,Y),i|=2)),this.ellipsisWidth<g&&(m=this.c.measureText(f).width,m<=g?h+=m:(f=this.textOverflowEllipsis(f,g)[0],h=g),this.c.fillStyle=v,this.c.fillText(f,u,d)),i&1&&this.setFont(_t),h+this.ellipsisWidth<g&&(p&&f&&(p=` - ${p}`),m=this.c.measureText(p).width,h+m>g&&(p=this.textOverflowEllipsis(p,g-h)[0]),this.c.globalAlpha=.5,this.c.fillText(p,u+h,d),this.c.globalAlpha=1);for(let r of e.children)y=this.drawNode(r,t+Y,n,y,i&-2),n+=r.size;return i&1||dt(this.c,this.palette.stroke,o+.5,t+.5,l,Y),c}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=this.viewportMin+(this.viewportMax-this.viewportMin)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=(e,t,n)=>{if(i>=n&&i<n+e.size){if(r>=t&&r<t+Y&&e.id)return e;if(r>=t+Y)for(let r of e.children){let e=a(r,t+Y,n);if(e)return e;n+=r.size}}return null};return a(this.root,0,0)}modifyViewport(e,t,n){let r=this.viewportMin,i=this.viewportMax,a=0;if(n!==null){let e=r+(i-r)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=1.01**t;r=e+(r-e)*a,i=e+(i-e)*a}else a=e*(i-r)/this.zoomedOutWidth;r+a<0?a=-r:i+a>this.totalBytes&&(a=this.totalBytes-i),r+=a,i+=a,r<0&&(r=0),i>this.totalBytes&&(i=this.totalBytes),this.setViewport(r,i,!1)}setViewport(e,t,n){this.animationFromMin=this.viewportMin,this.animationFromMax=this.viewportMax,this.animationToMin=e,this.animationToMax=t,n?this.animationStart=q():this.animationStart=0,this.invalidate()}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),this.events.emit(`hover`,t,e)}};function wt(e,t){for(;t;){if(t===e)return!0;t=t.parent}return!1}function Tt(e,t,n){if(e===t)return;let r=t.parent,i=r.size||1,a=0;Tt(e,r,n);for(let e of r.children){if(e===t){n.startAngle_+=n.sweepAngle_*a/i,n.sweepAngle_=e.size/i*n.sweepAngle_;break}a+=e.size}n.depth_+=1}var Et={};function Dt(e){return Et[e]||(Et[e]=400*Math.log(1+Math.log(1+e/8))),Et[e]}var X=-Math.PI/2,Ot=class extends yt{currentNode;hoveredNode;centerX=0;centerY=0;animationStart=0;radiusScale=1;sourceDepth=0;sourceStartAngle=X;sourceSweepAngle=Math.PI*2;targetNode;targetDepth=this.sourceDepth;targetStartAngle=this.sourceStartAngle;targetSweepAngle=this.sourceSweepAngle;animatedNode;animatedDepth=this.sourceDepth;animatedStartAngle=this.sourceStartAngle;animatedSweepAngle=this.sourceSweepAngle;previousHoveredNode;historyStack=[];constructor(e,t={}){for(;e.children.length===1;)e=e.children[0];super(e,t),this.currentNode=e,this.targetNode=this.currentNode,this.animatedNode=this.currentNode,this.canvas.onmousemove=e=>{this.handleMouseMove(e)},this.canvas.onmouseout=e=>{this.changeHoveredNode(void 0),this.events.emit(`hover`,null,e)},this.canvas.onclick=e=>{let t=this.hitTestNode(e);if(!t)return;this.events.emit(`click`,t,e);let n=[];t===this.animatedNode.parent?this.historyStack.length>0&&(t=this.historyStack.pop(),n=this.historyStack.slice()):n=this.historyStack.concat(this.currentNode),this.events.emit(`click`,t,e),t.children.length>0?(this.select(t),this.historyStack=n):e.preventDefault()},this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(pt(()=>this.resize())),this.disposables.push(ft(e=>this.handleMouseMove(e)))}select(e,t){(this.currentNode!==e||this.root)&&(this.currentNode=e||this.root,this.updateSunburst(t),this.events.emit(`select`,e))}resize(){this.width=this.el.clientWidth,this.height=this.width,this.centerX=this.width>>1,this.centerY=this.height>>1;let e=2*Math.ceil(Dt(this.maxDepth));this.radiusScale=this.width/e,super.resize()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,3,-1/0),this.c.strokeStyle=this.palette.stroke,this.c.beginPath(),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,1,-1/0),this.c.stroke(),this.animatedDepth===0&&(this.c.fillStyle=this.palette.stroke,this.setFont(vt),this.c.textAlign=`center`,this.c.fillText(this.getSubtext(this.targetNode)??ut(this.targetNode.size),this.centerX,this.centerY))}drawNode(e,t,n,r,i,a,o){let s=this.computeRadius(t+1);if(s>this.centerY)return o;e===this.hoveredNode&&(a|=8);let c=(n+s)/2,l=r+i;if(l-o<1.5/c)return o;let u=2/c;if(i>u&&(u=i),a&2)this.c.fillStyle=Ze(this.getColor(e)||this.palette.fallback,this.c,this.centerX,this.centerY,1),this.c.beginPath(),this.c.arc(this.centerX,this.centerY,n,r,r+u,!1),this.c.arc(this.centerX,this.centerY,s,r+u,r,!0),this.c.fill(),this.hoveredNode&&(a&8||e.parent===this.hoveredNode)&&(this.c.fillStyle=this.palette.hover,this.c.fill());else{let e=u===Math.PI*2,t=a&4||e?s:n;a&1&&n>0&&this.c.arc(this.centerX,this.centerY,n,r+u,r,!0),this.c.moveTo(this.centerX+t*Math.cos(r),this.centerY+t*Math.sin(r)),this.c.arc(this.centerX,this.centerY,s,r,r+u,!1),e||this.c.lineTo(this.centerX+n*Math.cos(r+u),this.centerY+n*Math.sin(r+u))}let d=e.size,f=a&10,p=0,m=-1/0;for(let n of e.children)m=this.drawNode(n,t+1,s,r+i*p/d,n.size/d*i,f,m),p+=n.size,f|=4;return l}changeHoveredNode(e,t){this.hoveredNode!==e&&(this.hoveredNode=e,this.updateSunburst(t))}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left-this.centerX,r=e.clientY-t.top-this.centerY,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n),o=(e,t,n,r,s)=>{let c=this.computeRadius(t+1);if(c>this.centerY)return;if(i>=n&&i<c){let t=a-r;if(t/=Math.PI*2,t-=Math.floor(t),t*=Math.PI*2,t<s)return e===this.animatedNode?e.parent:e}let l=e.size,u=0;for(let n of e.children){let e=o(n,t+1,c,r+s*u/l,n.size/l*s);if(e)return e;u+=n.size}};return o(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle)}tick(){let e=(q()-this.animationStart)/(this.options.animateDuration??J.animateDuration);e<0||e>1?(e=1,this.animatedNode=this.targetNode,this.targetDepth=0,this.targetStartAngle=X,this.targetSweepAngle=Math.PI*2):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.invalidate()),this.animatedDepth=this.sourceDepth+(this.targetDepth-this.sourceDepth)*e,this.animatedStartAngle=this.sourceStartAngle+(this.targetStartAngle-this.sourceStartAngle)*e,this.animatedSweepAngle=this.sourceSweepAngle+(this.targetSweepAngle-this.sourceSweepAngle)*e,this.draw()}handleMouseMove(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),t&&t!==this.animatedNode.parent?(this.events.emit(`hover`,t,e),this.canvas.style.cursor=`pointer`):this.events.emit(`hover`,null,e)}computeRadius(e){return Dt(e)*this.radiusScale}updateSunburst(e=this.options.animate??!0){if(this.previousHoveredNode!==this.hoveredNode&&(this.previousHoveredNode=this.hoveredNode,this.hoveredNode||(this.canvas.style.cursor=`auto`,this.events.emit(`hover`,null)),this.invalidate()),this.targetNode!==this.currentNode){if(this.historyStack.length=0,this.invalidate(),e&&(this.animationStart=q()),wt(this.animatedNode,this.currentNode)){let e={depth_:this.animatedDepth,startAngle_:this.animatedStartAngle,sweepAngle_:this.animatedSweepAngle};Tt(this.animatedNode,this.currentNode,e),this.animatedDepth=e.depth_,this.animatedStartAngle=e.startAngle_,this.animatedSweepAngle=e.sweepAngle_,this.targetDepth=0,this.targetStartAngle=X,this.targetSweepAngle=Math.PI*2,this.animatedNode=this.currentNode}else if(wt(this.currentNode,this.animatedNode)){let e={depth_:0,startAngle_:X,sweepAngle_:Math.PI*2};Tt(this.currentNode,this.animatedNode,e),this.targetDepth=e.depth_,this.targetStartAngle=e.startAngle_,this.targetSweepAngle=e.sweepAngle_}else this.animationStart=-1/0,this.animatedNode=this.currentNode;this.sourceDepth=this.animatedDepth,this.sourceStartAngle=this.animatedStartAngle,this.sourceSweepAngle=this.animatedSweepAngle,this.targetNode=this.currentNode,this.events.emit(`select`,this.currentNode)}}},Z=4,Q=20,kt=2*Z,$=Q+Z;function At(e,t,n,r,i){let a=[],o=(t,n,r,i,a)=>{let o=e[t].size*a,s=e[n].size*a;return Math.max(r*r*o/(i*i),i*i/(r*r*s))};return((t,n,r,i,s)=>{for(;t<e.length;){let c=0;for(let n=t;n<e.length;n++)c+=e[n].size;let l=Math.min(i,s),u=i*s/c,d=t,f=0,p=0;for(;d<e.length;){let n=e[d].size*u,r=o(t,d,l,f+n,u);if(d>t&&p<r)break;f+=n,p=r,d++}let m=Math.round(f/l),h=0;for(let o=t;o<d;o++){let t=e[o],c=t.size*u,d=Math.round(l*h/f),p=Math.round(l*(h+c)/f),[g,_,v,y]=i>=s?[n,r+d,m,p-d]:[n+d,r,p-d,m];a.push({node:t,box:[g,_,v,y],children:v>kt&&y>$?At(t.children,g+Z,_+Q,v-kt,y-$):[]}),h+=c}t=d,i>=s?(n+=m,i-=m):(r+=m,s-=m)}})(0,t,n,r,i),a}var jt=class extends yt{hoveredNode=null;currentNode=null;bgOriginX=0;bgOriginY=0;layers={base:null};baseLayoutCache;currentOriginX=0;currentOriginY=0;animationStart=0;animationBlend=1;animationSource=null;animationTarget=null;constructor(e,t={}){super(e,t),this.canvas.addEventListener(`mousemove`,e=>{this.updateHover(e)}),this.canvas.addEventListener(`mouseout`,e=>{this.changeHoveredNode(null),this.events.emit(`hover`,null,e)}),this.el.addEventListener(`click`,e=>{let t=this.hitTestNode(e);if(t){let n=t.node;this.events.emit(`click`,n,e),n.children.length?t===this.layers.current?this.updateHover(e):(this.changeCurrentLayout(t),this.changeHoveredNode(null)):this.updateHover(e)}else this.currentNode&&(this.changeCurrentLayout(null),this.updateHover(e))}),this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(ft(e=>this.updateHover(e))),this.disposables.push(pt(()=>this.resize()))}select(e,t){let n=null;e===this.root&&(e=null),n=e?this.searchFor([this.layers.current,this.layers.base],e):null,this.changeCurrentLayout(n,t)}drawBaseLayout(){!this.width||!this.height||(this.c.clearRect(0,0,this.width,this.height),this.bgOriginX=this.bgOriginY=0,this.baseLayoutCache?this.c.putImageData(this.baseLayoutCache,0,0):(this.drawLayout(this.layers.base,0,[]),this.baseLayoutCache=this.c.getImageData(0,0,this.width*this.ratio,this.height*this.ratio)))}draw(){this.drawBaseLayout(),this.layers.current||this.drawHoverHighlight(this.layers.base);let e=this.layers.current?this.animationSource?this.animationTarget?1:1-this.animationBlend:this.animationBlend:0;if(this.layers.current){let[t,n,r,i]=this.layers.base.box;this.c.globalAlpha=.6*(!this.layers.current||!this.animationSource?1:e),this.c.fillStyle=this.palette.bg,this.c.fillRect(t,n,r,i),this.c.globalAlpha=1}if(this.layers.previous&&this.drawLayout(this.layers.previous,1,[this.layers.current]),this.layers.current){let[t,n,r,i]=this.layers.current.box,a=this.c.getTransform(),o=Math.sqrt(a.a*a.d);this.c.save(),this.c.shadowColor=this.palette.shadow,this.c.shadowBlur=30*e*o,this.c.shadowOffsetX=o*(2*this.width),this.c.shadowOffsetY=o*(2*this.height+15*e),this.c.fillRect(t-2*this.width,n-2*this.height,r,i),this.c.restore(),this.bgOriginX=this.currentOriginX,this.bgOriginY=this.currentOriginY,this.drawLayout(this.layers.current,0,[]),this.drawHoverHighlight(this.layers.current)}}tick(){let e=this.animationBlend,t=this.currentNode;this.animationBlend=(q()-this.animationStart)/(this.options.animateDuration??J.animateDuration),this.animationBlend<0||this.animationBlend>1?(this.currentNode=this.animationTarget,this.layers.previous=void 0,this.animationBlend=1):(this.animationBlend=1-this.animationBlend,this.animationBlend*=this.animationBlend*this.animationBlend,this.animationBlend=1-this.animationBlend,this.invalidate()),(this.animationBlend!==e||this.currentNode!==t)&&this.updateCurrentLayout(),this.draw()}resize(){this.baseLayoutCache=void 0;let e=this.width,t=this.height;this.width=Math.min(this.el.clientWidth,1600),this.height=Math.max(Math.round(this.width/2),innerHeight-200),(this.width!==e||this.height!==t||!this.layers.base)&&(this.layers.base=At([this.root],0,0,this.width-1,this.height-1)[0],this.updateCurrentLayout()),super.resize()}*iterateNodeToDraw(e,t,n){let r=e.node,[i,a,o,s]=e.box,c=r===this.hoveredNode|(e===this.animationTarget?2:0);if(t===1)for(let e of n){if(!e)continue;let[n,r,c,l]=e.box;if(i>=n&&a>=r&&i+o<=n+c&&a+s<=r+l){t=2;break}}for(let r of e.children)c|=yield*this.iterateNodeToDraw(r,t,n);return t!==2&&(yield e),c}drawHoverHighlight(e){let t=this.iterateNodeToDraw(e,0,[]),n=this.c.globalCompositeOperation;for(;;){let e=t.next();if(e.done){this.c.globalCompositeOperation=n;return}let r=e.value.node;if(this.hoveredNode===r){this.c.globalCompositeOperation=`overlay`;let[t,n,r,i]=e.value.box;this.c.fillStyle=this.palette.hover,this.c.fillRect(t,n,r,i)}}}drawNodeBackground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return e.value;let[t,n,i,a]=e.value.box;this.c.fillStyle=Ze(this.getColor(e.value.node)||this.palette.fallback,this.c,this.bgOriginX,this.bgOriginY,1),e.value.children.length?(this.c.fillRect(t,n,i,Q),this.c.fillRect(t,n+a-Z,i,Z),this.c.fillRect(t,n+Q,Z,a-$),this.c.fillRect(t+i-Z,n+Q,Z,a-$)):this.c.fillRect(t,n,i,a)}}drawLayout(e,t,n){this.drawNodeBackground(e,t,n),this.drawNodeForeground(e,t,n)}drawNodeForeground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return;let t=e.value.node,[n,i,a,o]=e.value.box;if(dt(this.c,this.palette.stroke,n+.5,i+.5,a,o),o>=Q){this.c.fillStyle=this.palette.text;let e=a-kt,r=i+Math.round($/2),[s,c]=this.textOverflowEllipsis(this.getText(t)||``,e),l=n+Math.round((a-c)/2),u=this.getText(t),d=this.getSubtext(t);if(s===u&&t.children.length){let t=d||``;t&&u&&(t=` - ${t}`);let[i,o]=this.textOverflowEllipsis(t,e-c);l=n+Math.round((a-c-o)/2),this.c.globalAlpha=.5,this.c.fillText(i,l+c,r),this.c.globalAlpha=1}if(this.c.fillText(s,l,r),o>$+16&&!t.children.length){let[t,r]=this.textOverflowEllipsis(d||``,e);this.c.globalAlpha=.5;let s=u?Q:Q/2+Z;this.c.fillText(t,n+Math.round((a-r)/2),i+s+Math.round(o-$)/2),this.c.globalAlpha=1}}}}updateCurrentLayout(){let e=this.options.selectedPaddingRatio??.2;if(this.currentNode){let[t,n,r,i]=this.currentNode.box,a=t+r,o=n+i,s=Math.round(this.width*e/2),c=Math.round(this.height*e/2),l=this.width-s-1,u=this.height-c-1,d=this.animationTarget?this.animationBlend:1-this.animationBlend,f=Math.round(t+(s-t)*d),p=Math.round(n+(c-n)*d),m=Math.round(a+(l-a)*d),h=Math.round(o+(u-o)*d),g=e=>e-Math.floor(e/64-.5)*64;this.layers.current=At([this.currentNode.node],f,p,m-f,h-p)[0],this.currentOriginX=g(-(t+a)/2)*(1-d)+(f+m)/2,this.currentOriginY=g(-(n+o)/2)*(1-d)+(p+h)/2}else this.layers.current=void 0,this.currentOriginX=0,this.currentOriginY=0}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=(e,t)=>{for(let a of e){let[e,o,s,c]=a.box;if(n>=e&&r>=o&&n<e+s&&r<o+c)return i(a.children,!1)||(t?null:a)}return null};return this.layers.current?i([this.layers.current],!1):i([this.layers.base],!0)}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t&&t.node),this.events.emit(`hover`,t?.node||null,e)}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}searchFor(e,t){for(let n of e){if(!n)continue;let e=n.node===t?n:this.searchFor(n.children,t);if(e)return e}return null}changeCurrentLayout(e,t=this.options.animate){this.animationTarget!==e&&(this.events.emit(`select`,e?.node||null),this.layers.previous=e?this.layers.current:void 0,t&&(this.animationBlend=0,this.animationStart=q(),this.animationSource=this.currentNode),this.animationTarget=e,this.currentNode=e||this.searchFor([this.layers.base],this.currentNode.node),this.updateCurrentLayout(),this.invalidate())}},Mt={flex:`~ gap-1 items-center wrap`},Nt={key:0,"i-ph-arrow-right-bold":``,"text-sm":``,"op-fade":``},Pt=[`onClick`],Ft=Object.assign(a({__name:`NavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:n}){let i=e,a=n,o=u(()=>{let e=[],t=i.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,n)=>(m(),_(`div`,Mt,[(m(!0),_(d,null,c(o.value,(e,n)=>(m(),_(d,{key:e.id},[n>0?(m(),_(`div`,Nt)):t(``,!0),y(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>a(`select`,e)},[y(`span`,null,r(e.text||e.id),1)],8,Pt)],64))),128))]))}}),{__name:`ChartNavBreadcrumb`});function It(t){let{data:n,nameKey:r,sizeKey:a,rootText:o,nodeType:s,graphOptions:c,onUpdate:l}=t,d=v(void 0),m=v(void 0),h=ee(void 0),g=v(void 0),_,y=u(()=>{if(t.tree)return t.tree.value;let e=f(n),i=new Map,c=0,l={id:`~root`,text:o,size:0,sizeSelf:0,children:[]};if(!e?.length)return{map:i,root:l,maxDepth:c};let u=[];u.unshift(()=>{l.size+=l.children.reduce((e,t)=>e+t.size,0),l.subtext=E(l.size).join(` `),l.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function d(e,t,n,r,a){if(i.has(t))return i.get(t);a>c&&(c=a);let o={id:t,text:n,size:0,sizeSelf:0,children:[],meta:{...e,path:n,type:`folder`},parent:r};return i.set(t,o),r.children.push(o),u.unshift(()=>{let t=o.sizeSelf;o.size+=o.children.reduce((e,t)=>e+t.size,0),o.subtext=E(o.size).join(` `),o.children.length&&t/o.size>.1&&o.children.push({id:`${o.id}-self`,text:``,size:t,sizeSelf:t,subtext:E(t).join(` `),children:[],meta:{...e,path:``,type:s},parent:o}),o.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),o}function p(e){let t=e[r].split(`/`).filter(Boolean),n=l,o=``,c=0;t.forEach((l,u)=>{if(o+=(o?`/`:``)+l,c++,u===t.length-1){let t={id:e[r],text:l,size:e[a],sizeSelf:e[a],subtext:E(e[a]).join(` `),children:[],meta:{...e,path:l,type:s}};n.children.push(t),i.set(e[r],t)}else n=d(e,o,l,n,c)})}return e.forEach(p),u.forEach(e=>e()),{map:i,root:l,maxDepth:c}}),b=u(()=>({animate:ae.value.chartAnimation,palette:{stroke:T.value?`#222`:`#555`,fg:T.value?`#fff`:`#000`,bg:T.value?`#111`:`#fff`},getColor:et(y.value.root,T.value?.8:.9,T.value?1:1.1),getSubtext:e=>e.subtext,...c}));function x(e,t){h.value=e?.meta,e?.children.length||(e=e?.parent),g.value?.select(e,t)}function S(){_?.(),m.value=y.value.root,l?.(),e(()=>{let e=h.value&&y.value.map.get(h.value[r])||null;e&&x(e,!1)}),_=()=>{g.value?.dispose(),g.value=void 0,h.value=void 0}}return e(()=>{p(()=>[y.value,b.value],()=>{S()},{deep:!0,immediate:!1}),S()}),i(()=>{_?.()}),{tree:y,graph:g,chartOptions:b,nodeHover:d,nodeSelected:m,selectedNode:h,selectNode:x,buildGraph:S}}export{jt as a,Ge as c,Ot as i,Ft as n,Qe as o,Ct as r,it as s,It as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,Jt as t,M as n,b as r,kt as i,lt as a,q as o,w as s,x as c,xt as l}from"./CUBdwZVs.js";import{C as u,w as d}from"./BTfiKBAm.js";import{t as f}from"./CJdYjM__.js";import{i as p,l as m,o as h}from"./BqiFImA_.js";import{O as g,w as _}from"./D8ugdtv-.js";import{n as v,r as y,t as b}from"./zt8ARaaw.js";import{t as x}from"./bqLEejUC.js";import{n as S,t as C}from"./D1iwru-F2.js";var w={flex:`~ col gap-2`,p4:``},T={flex:``,pb2:``},E={"w-8":``,"text-right":``,"text-xs":``,op50:``},D={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},O=Object.assign(n({__name:`FlatList`,props:{plugins:{}},setup(n){let r=u();return(l,u)=>{let d=x,p=f;return o(),s(`div`,w,[e(b,{items:n.plugins,"key-prop":`plugin_id`},{default:a(({item:n})=>[c(`div`,T,[e(p,{to:{path:i(r).path,query:{plugin:n.plugin_id}},"font-mono":``,border:`~ rounded base`,"w-full":``,px2:``,py1:``,"text-sm":``,hover:`bg-active`,flex:`~ gap-4 items-center`},{default:a(()=>[c(`div`,E,` #`+t(n.plugin_id),1),c(`span`,D,[e(d,{name:n.name},null,8,[`name`])])]),_:2},1032,[`to`])])]),_:1},8,[`items`])])}}}),{__name:`PluginsFlatList`}),k={relative:``,"min-h-screen":``},A={sticky:``,"left-4":``,"right-4":``,"top-4":``,"z-panel-nav":``,"p-4":``},j={fixed:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},M={op50:``},N=n({__name:`plugins`,props:{session:{}},setup(n){let i=n,a=u(),f=d(),b=l({search:a.query.search||``,selected:a.query.plugin_types?S(a.query.plugin_types):null}),x=r(()=>[...h.filter(e=>i.session?.meta?.plugins?.some(t=>e.match.test(t.name))),p]),w=r(()=>{let e=i.session?.meta?.plugins;return b.value.selected&&(e=e.filter(e=>{let t=m(e.name);return b.value.selected.includes(t.name)})),e}),T=_(()=>w.value,()=>new y(w.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),E=r(()=>b.value.search?T.value.search(b.value.search).map(e=>e.item):w.value);return g(b.value,e=>{let t={...a.query,search:e.search||void 0,plugin_types:e.selected||void 0};f.replace({query:C(t)})},{debounce:500}),(r,i)=>{let a=v,l=O;return o(),s(`div`,k,[c(`div`,A,[e(a,{modelValue:b.value,"onUpdate:modelValue":i[0]||=e=>b.value=e,rules:x.value},null,8,[`modelValue`,`rules`])]),e(l,{plugins:E.value??[]},null,8,[`plugins`]),c(`div`,j,[c(`span`,M,t(E.value.length)+` of `+t(n.session?.meta?.plugins?.length||0),1)])])}}});export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./
|
|
1
|
+
import{t as e}from"./CxYeQaBW.js";var t=class{_mapTree;constructor(e){this.length=e,this._mapTree=new Map}_getLastMap(e){let t=this._mapTree;for(let n of e.slice(0,-1))t.has(n)||t.set(n,new Map),t=t.get(n);return t}set(e,t){if(e.length!==this.length)throw Error(`Expect tuple of length ${this.length}, got ${e.length}`);return this._getLastMap(e).set(e.at(-1),t),this}get(e){return this._getLastMap(e).get(e.at(-1))}clear(){this._mapTree.clear()}delete(e){return this._getLastMap(e).delete(e.at(-1))}get size(){return this._mapTree.size}*_traverseMap(){function*e(t,n,r){if(r===0)yield{keys:n,map:t};else for(let[i,a]of t.entries())yield*e(a,[...n,i],r-1)}yield*e(this._mapTree,[],this.length)}},n=class{_lengthMap;constructor(){this._lengthMap=new Map}get(e){let t=e.length;return this._lengthMap.get(t)?.get(e)}set(e,n){let r=e.length,i=this._lengthMap.get(r);return i||(i=new t(r),this._lengthMap.set(r,i)),i.set(e,n),this}delete(e){let t=e.length;return this._lengthMap.get(t)?.delete(e)??!1}clear(){this._lengthMap.clear()}};function r(e){let t=new n,r=function(...n){let r=t.get(n);return r||(r=e(...n),t.set(n,r),r)};return r.cache=t,r}var i=[{match:/[\\/]node_modules[\\/]/i,name:`node_modules`,description:`Node Modules`,icon:`i-catppuccin-npm`},{match:/virtual:|^\0/,name:`virtual`,description:`Virtual`,icon:`i-catppuccin-symlink`},{match:/^@?[\w-]+\/?/,name:`package`,description:`Package`,icon:`i-catppuccin-java-class-abstract`},{match:/\.vue$/i,name:`vue`,description:`Vue`,icon:`i-catppuccin-vue`},{match:/\.[cm]?[tj]sx$/i,name:`jsx`,description:`JavaScript React`,icon:`i-catppuccin-javascript-react`},{match:/\.[cm]?ts$/i,name:`ts`,description:`TypeScript`,icon:`i-catppuccin-typescript`},{match:/\.[cm]?js$/i,name:`js`,description:`JavaScript`,icon:`i-catppuccin-javascript`},{match:/\.svelte$/i,name:`svelte`,description:`Svelte`,icon:`i-catppuccin-svelte`},{match:/\.mdx$/i,name:`mdx`,description:`MDX`,icon:`i-catppuccin-mdx`},{match:/\.md$/i,name:`md`,description:`Markdown`,icon:`i-catppuccin-markdown`},{match:/\.astro$/i,name:`astro`,description:`Astro`,icon:`i-catppuccin-astro`},{match:/\.angular$/i,name:`angular`,description:`Angular`,icon:`i-catppuccin-angular`},{match:/\.html?$/i,name:`html`,description:`HTML`,icon:`i-catppuccin-html`},{match:/\.(css|scss|less|postcss)$/i,name:`css`,description:`CSS`,icon:`i-catppuccin-css`},{match:/\.json[c5]?$/i,name:`json`,description:`JSON`,icon:`i-catppuccin-json`},{match:/\.(yaml|yml)$/i,name:`yaml`,description:`YAML`,icon:`i-catppuccin-yaml`},{match:/\.toml$/i,name:`toml`,description:`TOML`,icon:`i-catppuccin-toml`},{match:/\.svg$/i,name:`svg`,description:`SVG`,icon:`i-catppuccin-svg`}],a=[{match:/^(replace|define|alias)$/,name:`rollup`,description:`Rollup`,icon:`i-catppuccin-rollup`},{match:/^vite:/i,name:`vite`,description:`Vite`,icon:`i-catppuccin-vite`},{match:/^unocss:/i,name:`unocss`,description:`Unocss`,icon:`i-catppuccin-unocss`},{match:/^nuxt:/i,name:`nuxt`,description:`Nuxt`,icon:`i-catppuccin-nuxt`},{match:/^builtin:/i,name:`builtin`,description:`Builtin`,icon:`i-catppuccin-folder-prisma`}],o={name:`file`,match:/.*/,description:`File`,icon:`i-catppuccin-file`},s={name:`plugin`,match:/.*/,description:`User Plugins`,icon:`i-catppuccin-folder-plugins`};function c(e){return i.find(t=>t.name===e)??o}var l=r(e=>{e=e.replace(/(\?|&)v=[^&]*/,`$1`).replace(/\?$/,``);for(let t of i)if(t.match.test(e))return t;return o}),u=r(e=>{for(let t of a)if(t.match.test(e))return t;return s});function d(e,t=1){let n=0;for(let t=0;t<e.length;t++)n=e.charCodeAt(t)+((n<<5)-n);return f(n%360,t)}function f(t,n=1){return`hsla(${t}, ${e.value?50:65}%, ${e.value?60:40}%, ${n})`}var p={error:0,client:60,bailout:-1,ssr:270,vite:250,vite1:240,vite2:120,rolldown:18,virtual:160,nuxt:140};function m(e,t=1){if(e=e.replace(/[^a-z]+/gi,``).toLowerCase(),e in p){let n=p[e];return typeof n==`number`?f(n,t):t===1?n:n+Math.floor(t*255).toString(16).padStart(2,`0`)}return d(e,t)}export{i as a,c,s as i,u as l,d as n,a as o,f as r,l as s,m as t,r as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,C as t,
|
|
1
|
+
import{A as e,C as t,Gt as n,Jt as r,M as i,Q as a,S as o,b as s,kt as c,lt as l,q as u,qt as d,tt as f,w as p,x as m}from"./CUBdwZVs.js";import{C as h}from"./BTfiKBAm.js";import{a as g}from"#entry";import{t as _}from"./CJdYjM__.js";import{n as v,r as y}from"./BqiFImA_.js";import{n as b,t as x}from"./ENNcF9U5.js";var S=[`textContent`],C=i({__name:`DisplayBadge`,props:{text:{},color:{type:[Boolean,Number],default:!0},as:{},size:{}},setup(e){let t=e,i=s(()=>!t.text||t.color===!1?{}:{color:typeof t.color==`number`?y(t.color):v(t.text),background:typeof t.color==`number`?y(t.color,.1):v(t.text,.1)}),c=s(()=>{switch(t.size||`sm`){case`sm`:return`px-1.5 text-11px leading-1.6em`}return``});return(s,p)=>(u(),o(f(e.as||`span`),{"ws-nowrap":``,rounded:``,class:n(c.value),style:d(i.value)},{default:l(()=>[a(s.$slots,`default`,{},()=>[m(`span`,{textContent:r(t.text)},null,8,S)])]),_:3},8,[`class`,`style`]))}}),w=/^[A-Za-z]:\//;function T(e=``){return e&&e.replace(/\\/g,`/`).replace(w,e=>e.toUpperCase())}var E=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,D=/^\/([A-Za-z]:)?$/;function O(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}var k=function(...e){e=e.map(e=>T(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:O();!i||i.length===0||(t=`${i}/${t}`,n=j(i))}return t=A(t,!n),n&&!j(t)?`/${t}`:t.length>0?t:`.`};function A(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}var j=function(e){return E.test(e)},M=function(e,t){let n=k(e).replace(D,`$1`).split(`/`),r=k(t).replace(D,`$1`).split(`/`);if(r[0][1]===`:`&&n[0][1]===`:`&&n[0]!==r[0])return r.join(`/`);let i=[...n];for(let e of i){if(r[0]!==e)break;n.shift(),r.shift()}return[...n.map(()=>`..`),...r].join(`/`)},N={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},P={"font-mono":``,"text-sm":``},F=Object.assign(i({__name:`ModuleId`,props:{id:{},badges:{type:Boolean},icon:{type:Boolean,default:!0},link:{type:[Boolean,String]},minimal:{type:Boolean},kind:{},session:{},cwd:{},disableTooltip:{type:Boolean,default:!1}},setup(i){let d=i,v=h(),y=window.location,S=s(()=>{if(!d.id)return``;let e=d.id.replace(/%2F/g,`/`),t=d.cwd||d.session.meta.cwd,n=t?M(t,e):e;return n.startsWith(`.`)||(n=`./${n}`),n.startsWith(`./`)||/^(?:\.\.\/){1,3}[^.]/.test(n)?n:e}),w=s(()=>`flex items-center`);return(s,h)=>{let T=b,E=x;return u(),o(f(i.link?c(_):`div`),{to:i.link?typeof i.link==`string`?i.link:{path:c(v).path,query:{...c(v).query,module:i.id,chunk:void 0},hash:c(y).hash}:void 0},{default:l(()=>[e(c(g),{"my-auto":``,"text-sm":``,"font-mono":``,block:``,"w-full":``,triggers:[`hover`],delay:1200,disabled:i.disableTooltip||(d.id?.length||0)<30,placement:`bottom-start`},{popper:l(()=>[m(`span`,P,r(d.id),1)]),default:l(()=>[i.id?(u(),p(`div`,{key:0,class:n(w.value)},[i.icon?(u(),o(T,{key:0,filename:i.id,"mr1.5":``},null,8,[`filename`])):t(``,!0),m(`span`,N,[e(E,{path:S.value,minimal:i.minimal},null,8,[`path`,`minimal`])]),a(s.$slots,`default`),i.kind?(u(),o(C,{key:1,class:`ml1`,text:i.kind},null,8,[`text`])):t(``,!0)],2)):t(``,!0),m(`div`,null,[a(s.$slots,`detail`)])]),_:3},8,[`disabled`])]),_:3},8,[`to`])}}}),{__name:`DisplayModuleId`});export{M as n,C as r,F as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,Gt as t,Jt as n,M as r,Q as i,b as a,k as o,q as s,w as c,x as l}from"./CUBdwZVs.js";import{t as u}from"./CqfNwh25.js";import{g as d}from"./D8ugdtv-.js";var f={"text-xs":``,op75:``,"ml-0.4":``},p={key:0,"text-xs":``,ml1:``,"op-fade":``,border:`l base`,pl1:``},m=1e3,h=Object.assign(r({__name:`FileSizeBadge`,props:{bytes:{},colorize:{type:Boolean,default:!0},digits:{default:2},percent:{type:Boolean,default:!0},total:{},icon:{},percentRatio:{default:.5}},setup(r){let d=r,h=m**2,g=[[80*m,`color-scale-neutral`],[500*m,`color-scale-low`],[1*h,`color-scale-medium`],[10*h,`color-scale-high`],[20*h,`color-scale-critical`]],_=a(()=>{if(!d.colorize)return g[0];let e=d.bytes||0;for(let[t,n]of g)if(e<t)return n;return g.at(-1)?.[1]}),v=a(()=>d.total?(d.bytes||0)*100/d.total:0),y=a(()=>u(d.bytes||0,d.digits));return(a,u)=>r.bytes?(s(),c(`div`,{key:0,class:t([_.value,`px-0.4em py-0.2em font-mono line-height-none bg-gray:5 dark:bg-gray:4 flex items-center`])},[r.icon?(s(),c(`div`,{key:0,class:t([r.icon,`mr-1`])},null,2)):e(``,!0),o(` `+n(y.value[0]),1),l(`span`,f,n(y.value[1]),1),i(a.$slots,`after`,{},()=>[r.percent&&v.value>r.percentRatio?(s(),c(`span`,p,n(+v.value.toFixed(1))+`%`,1)):e(``,!0)])],2)):e(``,!0)}}),{__name:`DisplayFileSizeBadge`}),g=d(`rolldown-devtools-settings`,{codeviewerLineWrap:!1,codeviewerDiffPanelSize:50,flowExpandResolveId:!0,flowExpandTransforms:!0,flowExpandLoads:!0,flowExpandChunks:!0,flowExpandAssets:!0,flowShowAllTransforms:!1,flowShowAllLoads:!1,moduleGraphViewType:`list`,assetViewType:`list`,chartAnimation:!0,moduleDetailsViewType:`flow`,pluginDetailsViewType:`flow`,pluginDetailsTableFields:null,pluginDetailsModuleTypes:null,pluginDetailsDurationSortType:``,pluginDetailSelectedHook:``,chunkViewType:`list`,pluginDetailsShowType:`all`,packageViewType:`table`,packageSizeSortType:``},{mergeDefaults:!0});function _(e){let t=new Map;return new Proxy(e.value,{get(e,n){return t.has(n)||t.set(n,a({get(){return e[n]},set(t){e[n]=t}})),t.get(n)}})}var v=_(g);export{v as n,h as r,g as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./BYiuS205.js";import{A as t,B as n,C as r,D as i,Gt as a,Jt as o,M as s,S as c,Z as l,at as u,b as d,et as f,h as p,k as m,kt as h,lt as g,ot as _,q as v,qt as y,st as b,ut as x,w as S,x as C,xt as w,yt as T}from"./CUBdwZVs.js";import{C as E}from"./BTfiKBAm.js";import{n as D}from"#entry";import{t as O}from"./CJdYjM__.js";import{r as k}from"./C5iGLYf8.js";import{r as A,t as j}from"./CBfhMqaX.js";import{s as M,v as N,w as P}from"./D8ugdtv-.js";import{i as F,t as ee}from"./BWeJkag7.js";import{n as I}from"./CbQbsbZd.js";import{n as te,r as ne,t as L}from"./zt8ARaaw.js";import{a as re,c as ie,i as ae,n as R,o as z,r as oe,t as se}from"./BdFYEjeH.js";import{t as ce}from"./x1vnwfQM.js";import{n as le,r as ue,t as B}from"./BQIt7f6-2.js";var V=[`onClick`],de=Object.assign(s({__name:`FlatList`,props:{chunks:{},session:{},link:{type:Boolean,default:!0},basic:{type:Boolean,default:!1}},emits:[`select`],setup(e,{emit:n}){let i=n;return(n,a)=>{let o=F;return v(),c(L,{items:e.chunks,"key-prop":`chunk_id`},{default:g(({item:n})=>[C(`div`,{flex:``,pb2:``,onClick:e=>i(`select`,n)},[t(o,{chunk:n,basic:e.basic,link:e.link,"w-full":``,"font-mono":``,border:`~ rounded base`,px2:``,py1:``,"text-sm":``,hover:`bg-active`,flex:`~ gap-4 items-center`},{"left-after":g(()=>[n.is_initial?(v(),c(k,{key:0,text:`initial`})):r(``,!0)]),_:2},1032,[`chunk`,`basic`,`link`])],8,V)]),_:1},8,[`items`])}}}),{__name:`ChunksFlatList`}),H={op50:``,"font-mono":``,w12:``},U=[`title`],W={flex:`~ gap-1 items-center`},fe=Object.assign(s({__name:`Graph`,props:{session:{},chunks:{},entryId:{default:``}},setup(e){let i=e,a=d(()=>i.chunks),s=E();return I({modules:a,spacing:{width:450,height:55,linkOffset:15,margin:120,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:t,scale:r,spacing:o,tree:s,hierarchy:c,collapsedNodes:l,container:u,modulesMap:d,nodes:f,links:p,nodesMap:m,linksMap:g,width:_,height:v,childToParentMap:y}=e;return()=>{_.value=window.innerWidth,v.value=window.innerHeight;let e=a.value.filter(e=>i.entryId?e.id===i.entryId:e.reason===`entry`),b=new Set,x=c({module:{id:`~root`}},n=>`${n.module?.id}`==`~root`?(e.forEach(e=>{b.add(e),t.value&&y.set(e.id,`~root`)}),e.map(e=>({module:e,expanded:!l.has(e.id),hasChildren:!1}))):l.has(`${n.module?.id}`)?[]:n.module.imports?.map(e=>{let r=d.value.get(`${e.chunk_id}`);if(!(!r||b.has(r)))return t.value&&y.set(r.id,n.module.id),b.add(r),{module:r,expanded:!l.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));t.value&&=!1,s().nodeSize([h(o.height),h(o.width)+h(o.gap)])(x);let S=x.descendants();for(let e of S)[e.x,e.y]=[e.y-h(o.width),e.x];let C=Math.min(...S.map(e=>e.x)),w=Math.min(...S.map(e=>e.y));if(C<h(o.margin))for(let e of S)e.x+=Math.abs(C)+h(o.margin);if(w<h(o.margin))for(let e of S)e.y+=Math.abs(w)+h(o.margin);f.value=S,m.clear();for(let e of S)m.set(`${e.data.module.id}`,e);let T=x.links().filter(e=>`${e.source.data.module.id}`!=`~root`).map(e=>({...e,id:`${e.source.data.module.id}|${e.target.data.module.id}`})),E=a.value.flatMap(e=>e.imports.filter(t=>!T.some(n=>n.id===`${e.chunk_id}|${t.chunk_id}`)).map(t=>({source:m.get(`${e.chunk_id}`),target:m.get(`${t.chunk_id}`),id:`${e.chunk_id}|${t.chunk_id}`}))),D=[...T,...E];g.clear();for(let e of D)g.set(e.id,e);p.value=D,n(()=>{_.value=u.value.scrollWidth/r.value+h(o.margin),v.value=u.value.scrollHeight/r.value+h(o.margin)})}}}),(n,i)=>{let l=O,u=B;return v(),c(u,{session:e.session,modules:a.value,"expand-controls":!1},{default:g(({node:e})=>[t(l,{class:`flex items-center`,to:{path:h(s).path,query:{chunk:e.data.module.chunk_id}}},{default:g(()=>[C(`span`,H,`#`+o(e.data.module.id),1),C(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.data.module.id}`},[C(`div`,null,o(e.data.module.name||`[unnamed]`),1),t(k,{text:e.data.module.reason},null,8,[`text`]),e.data.module.is_initial?(v(),c(k,{key:0,text:`initial`})):r(``,!0)],8,U),i[1]||=C(`div`,{"flex-auto":``},null,-1),C(`div`,W,[i[0]||=C(`div`,{"i-ph-package-duotone":``},null,-1),m(` `+o(e.data.module.modules.length),1)])]),_:2},1032,[`to`])]),_:1},8,[`session`,`modules`])}}}),{__name:`ChunksGraph`}),G={grid:`~ cols-[max-content_1fr] gap-2`,p4:``},K={flex:`~ col gap-4`},q={key:0,grid:`~ cols-[250px_1fr] gap-1`},J=[`onClick`],Y={key:0,"text-primary":``},X={key:1},Z=[`onClick`],Q=[`title`],pe=Object.assign(s({__name:`Sunburst`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:n}){let i=e,a=n,s=u(`el`);return b(()=>s.value?.append(i.graph.el)),(n,i)=>{let c=R,u=A,d=f(`tooltip`);return v(),S(`div`,G,[C(`div`,{ref_key:`el`,ref:s,"w-500px":``},null,512),C(`div`,K,[t(c,{border:`b base`,py2:``,selected:e.selected,options:e.graph.options,onSelect:i[0]||=e=>a(`select`,e)},null,8,[`selected`,`options`]),e.selected?(v(),S(`div`,q,[(v(!0),S(p,null,l(e.selected.children,n=>(v(),S(p,{key:n.id},[C(`button`,{"ws-nowrap":``,"text-nowrap":``,"text-left":``,"overflow-hidden":``,"text-ellipsis":``,"text-sm":``,hover:`bg-active`,rounded:``,px2:``,onClick:e=>a(`select`,n)},[n.meta&&n.meta===e.selected?.meta?(v(),S(`span`,Y,`(self)`)):(v(),S(`span`,X,o(n.meta?.name||n.id),1))],8,J),C(`button`,{relative:``,flex:`~ gap-1 items-center`,hover:`bg-active`,rounded:``,onClick:e=>a(`select`,n)},[C(`div`,{"h-5":``,rounded:``,shadow:``,border:`~ base`,style:y({background:h(z)(e.graph.options.getColor?.(n)||`#000`),width:`${n.size/e.selected.size*100}%`})},null,4),t(u,{"text-xs":``,bytes:n.size,total:e.selected.size,"percent-ratio":3},null,8,[`bytes`,`total`]),n.children.length>0?x((v(),S(`div`,{key:0,title:`${n.children.length} modules`,"text-xs":``,"op-fade":``},[m(` (`+o(n.children.length)+`) `,1)],8,Q)),[[d,`${n.children.length} modules`]]):r(``,!0)],8,Z)],64))),128))])):r(``,!0)])])}}}),{__name:`ChunksSunburst`}),me=Object.assign(s({__name:`Flamegraph`,props:{graph:{}},setup(e){let t=e,n=u(`el`);return b(()=>n.value?.append(t.graph.el)),(e,t)=>(v(),S(`div`,{ref_key:`el`,ref:n},null,512))}}),{__name:`ChunksFlamegraph`}),he={sticky:``,"left-4":``,"right-4":``,"top-4":``,"z-panel-nav":``,"p-4":``},ge={key:0,h10:``,mr2:``,flex:`~ items-center`},_e={flex:`~ wrap gap-2 items-center`,p2:``,border:`t base`},ve=[`onClick`],ye={key:0,class:`px5 pt-4`,flex:`~ col gap-4`},be={key:1,class:`px5 pt-4`,flex:`~ col gap-4`},xe={key:3,flex:`~ col gap-2`},Se={key:4,flex:`~ col gap-2`,"pt-4":``},Ce={key:5,flex:`~ col gap-2`,"pt-4":``},we={key:0,border:`~ base rounded-lg`,"bg-base":``,p2:``,flex:`~ col gap-2`,"min-w-50":``,"shadow-lg":``},Te={flex:`~ gap-2 items-center`},Ee={truncate:``},De={flex:`~ gap-2 items-center`},Oe={key:0,flex:`~ gap-2 items-center`},ke={"text-xs":``},Ae={key:1,flex:`~ gap-2 items-center`},$=s({__name:`chunks`,props:{session:{}},setup(n){let s=n,u=T(N()),f=[{label:`List`,value:`list`,icon:`i-ph-list-bullets-duotone`},{label:`Detailed List`,value:`detailed-list`,icon:`i-ph-list-magnifying-glass-duotone`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-duotone`},{label:`Treemap`,value:`treemap`,icon:`i-ph-checkerboard-duotone`},{label:`Sunburst`,value:`sunburst`,icon:`i-ph-chart-donut-duotone`},{label:`Flamegraph`,value:`flamegraph`,icon:`i-ph-chart-bar-horizontal-duotone`}],y=w({search:``}),b=e(),{state:x,isLoading:E}=M(async()=>await b.value.call(`vite:rolldown:get-chunks-graph`,{session:s.session.id}),null),O=d(()=>{let e=new Map;return x.value?.forEach(t=>{e.set(`${t.chunk_id}`,t)}),e}),F=d(()=>x.value?.map(e=>({...e,id:`${e.chunk_id}`}))??[]),I=P(()=>F.value,()=>new ne(F.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),L=d(()=>y.value.search?I.value.search(y.value.search).map(e=>e.item):F.value),{pathSelectorVisible:z,pathNodes:B,selectPathNodes:V,togglePathSelector:H,normalizedGraph:U}=ue({onToggle:e=>{y.value.search=e?!1:``},dataMap:d(()=>O.value),list:d(()=>L.value),importIdKey:`chunk_id`});function W(e){j.value.chunkViewType=e}let G=d(()=>{let e=new Map;for(let t of s.session.modulesList)e.set(t.id,t);return e});function K(e){return e.asset?.size?e.asset.size:e.modules.reduce((e,t)=>{let n=G.value.get(t);return!n||!n.buildMetrics?.transforms?.length?e:e+n.buildMetrics.transforms.at(-1).transformed_code_size},0)}let{tree:q,chartOptions:J,graph:Y,nodeHover:X,nodeSelected:Z,selectedNode:Q,selectNode:$,buildGraph:je}=se({data:d(()=>L.value.map(e=>({...e,filename:e.name||`chunk-${e.chunk_id}`,size:K(e)}))),nameKey:`filename`,sizeKey:`size`,rootText:`Chunks`,nodeType:`chunk`,graphOptions:{onClick(e){e&&(X.value=e)},onHover(e){e&&(X.value=e),e===null&&(X.value=void 0)},onLeave(){X.value=void 0},onSelect(e){Z.value=e||q.value.root,Q.value=e?.meta}},onUpdate(){switch(j.value.chunkViewType){case`sunburst`:Y.value=new ae(q.value.root,J.value);break;case`treemap`:Y.value=new re(q.value.root,{...J.value,selectedPaddingRatio:0});break;case`flamegraph`:Y.value=new oe(q.value.root,J.value);break}}});return _(()=>j.value.chunkViewType,()=>{[`treemap`,`sunburst`,`flamegraph`].includes(j.value.chunkViewType)&&je()}),(e,s)=>{let d=D,_=de,b=le,x=te,w=ee,T=fe,M=R,N=pe,P=me,F=A,I=ie;return h(E)?(v(),c(d,{key:0})):(v(),S(`div`,{key:1,relative:``,class:a({"max-h-screen of-hidden":h(j).chunkViewType===`graph`})},[C(`div`,he,[t(x,{modelValue:y.value,"onUpdate:modelValue":s[2]||=e=>y.value=e,rules:[]},i({"search-end":g(()=>[h(j).chunkViewType===`graph`?(v(),S(`div`,ge,[C(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Graph Path Selector`,onClick:s[1]||=e=>h(H)(!0)},[...s[5]||=[C(`i`,{"i-ri:route-line":``,flex:``},null,-1)]])])):r(``,!0)]),default:g(()=>[C(`div`,_e,[s[6]||=C(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(v(),S(p,null,l(f,e=>C(`button`,{key:e.value,"btn-action":``,class:a(h(j).chunkViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>W(e.value)},[C(`div`,{class:a(e.icon)},null,2),m(` `+o(e.label),1)],10,ve)),64))])]),_:2},[h(z)?{name:`search`,fn:g(()=>[t(b,{session:n.session,data:L.value,"import-id-key":`chunk_id`,"search-keys":[`name`],onSelect:h(V),onClose:s[0]||=e=>h(H)(!1)},{list:g(({select:e,data:r})=>[t(_,{session:n.session,chunks:r,link:!1,basic:!0,onSelect:e},null,8,[`session`,`chunks`,`onSelect`])]),item:g(({id:e})=>[m(o(O.value.get(e)?.name||`[unnamed]`),1)]),_:1},8,[`session`,`data`,`onSelect`])]),key:`0`}:void 0]),1032,[`modelValue`])]),h(j).chunkViewType===`list`?(v(),S(`div`,ye,[t(_,{session:n.session,chunks:L.value},null,8,[`session`,`chunks`])])):r(``,!0),h(j).chunkViewType===`detailed-list`?(v(),S(`div`,be,[(v(!0),S(p,null,l(L.value,e=>(v(),c(w,{key:e.id,border:`~ base rounded-lg`,p3:``,chunk:e,chunks:L.value,session:n.session},null,8,[`chunk`,`chunks`,`session`]))),128))])):h(j).chunkViewType===`graph`?(v(),c(T,{key:2,class:`pt32`,session:n.session,chunks:h(U),"entry-id":h(B).start},null,8,[`session`,`chunks`,`entry-id`])):h(j).chunkViewType===`treemap`?(v(),S(`div`,xe,[h(Y)?(v(),c(ce,{key:0,graph:h(Y),selected:h(Z),onSelect:s[3]||=e=>h($)(e)},{default:g(({selected:e,options:n,onSelect:r})=>[t(M,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:n,onSelect:r},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):r(``,!0)])):h(j).chunkViewType===`sunburst`?(v(),S(`div`,Se,[h(Y)?(v(),c(N,{key:0,graph:h(Y),selected:h(Z),onSelect:s[4]||=e=>h($)(e)},null,8,[`graph`,`selected`])):r(``,!0)])):h(j).chunkViewType===`flamegraph`?(v(),S(`div`,Ce,[h(Y)?(v(),c(P,{key:0,graph:h(Y)},null,8,[`graph`])):r(``,!0)])):r(``,!0),t(I,{"hover-x":u.x,"hover-y":u.y},{default:g(()=>[h(X)?.meta?(v(),S(`div`,we,[C(`div`,Te,[s[7]||=C(`i`,{"i-ph-shapes-duotone":``,"flex-none":``},null,-1),C(`span`,Ee,o(h(X).meta.name||`[unnamed]`),1)]),C(`div`,De,[s[8]||=C(`span`,{op50:``,"text-xs":``},`Size:`,-1),t(F,{bytes:h(X).meta.size,"text-xs":``},null,8,[`bytes`])]),h(X).meta.modules?.length?(v(),S(`div`,Oe,[s[9]||=C(`span`,{op50:``,"text-xs":``},`Modules:`,-1),C(`span`,ke,o(h(X).meta.modules?.length),1)])):r(``,!0),h(X).meta.is_initial?(v(),S(`div`,Ae,[t(k,{text:`initial`})])):r(``,!0)])):r(``,!0)]),_:1},8,[`hover-x`,`hover-y`])],2))}}});export{$ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,F as t,G as n,H as r,M as i,a,b as o,c as s,i as c,kt as l,wt as u,xt as d}from"./CUBdwZVs.js";import{F as f,M as p,N as m,O as h,S as g,a as _,b as v,i as y,j as b,n as x,r as S,w as C,x as w}from"./BTfiKBAm.js";var T=(...e)=>e.find(e=>e!==void 0);function E(s){let f=s.componentName||`NuxtLink`;function m(e){return typeof e==`string`&&e.startsWith(`#`)}function E(e,t,n){let r=n??s.trailingSlash;if(!e||r!==`append`&&r!==`remove`)return e;if(typeof e==`string`)return O(e,r);let i=`path`in e&&e.path!==void 0?e.path:t(e).path;return{...e,name:void 0,path:O(i,r)}}function D(t){let n=C(),r=a(),i=o(()=>!!l(t.target)&&l(t.target)!==`_self`),c=o(()=>{let e=l(t.to)||l(t.href)||``;return typeof e==`string`&&h(e,{acceptRelative:!0})}),u=e(`RouterLink`),d=u&&typeof u!=`string`?u.useLink:void 0,f=o(()=>{if(l(t.external))return!0;let e=l(t.to)||l(t.href)||``;return typeof e==`object`?!1:e===``||c.value}),p=o(()=>{let e=l(t.to)||l(t.href)||``;return f.value?e:E(e,n.resolve,l(t.trailingSlash))}),_=f.value?void 0:d?.({...t,to:p,viewTransition:l(t.viewTransition)}),v=o(()=>{let e=l(t.trailingSlash)??s.trailingSlash;if(!p.value||c.value||m(p.value))return p.value;if(f.value){let t=typeof p.value==`object`&&`path`in p.value?g(p.value):p.value;return O(typeof t==`object`?n.resolve(t).href:t,e)}return typeof p.value==`object`?n.resolve(p.value)?.href??null:O(b(r.app.baseURL,p.value),e)});return{to:p,hasTarget:i,isAbsoluteUrl:c,isExternal:f,href:v,isActive:_?.isActive??o(()=>p.value===n.currentRoute.value.path),isExactActive:_?.isExactActive??o(()=>p.value===n.currentRoute.value.path),route:_?.route??o(()=>n.resolve(p.value)),async navigate(e){await w(v.value,{replace:l(t.replace),external:f.value||i.value})}}}return i({name:f,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:D,setup(i,{slots:a}){let o=C(),{to:l,href:f,navigate:h,isExternal:b,hasTarget:w,isAbsoluteUrl:E}=D(i),O=u(!1),A=d(null),M=e=>{A.value=i.custom?e?.$el?.nextElementSibling:e?.$el};function N(e){return!O.value&&(typeof i.prefetchOn==`string`?i.prefetchOn===e:i.prefetchOn?.[e]??s.prefetchOn?.[e])&&(i.prefetch??s.prefetch)!==!1&&i.noPrefetch!==!0&&i.target!==`_blank`&&!j()}async function P(e=c()){if(O.value)return;O.value=!0;let t=typeof l.value==`string`?l.value:b.value?g(l.value):o.resolve(l.value).fullPath,n=b.value?new URL(t,window.location.href).href:t;await Promise.all([e.hooks.callHook(`link:prefetch`,n)?.catch(()=>{}),!b.value&&!w.value&&x(l.value,o).catch(()=>{})])}if(N(`visibility`)){let e=c(),t,i=null;n(()=>{let n=k();S(()=>{t=_(()=>{A?.value?.tagName&&(i=n.observe(A.value,async()=>{i?.(),i=null,await P(e)}))})})}),r(()=>{t&&y(t),i?.(),i=null})}return()=>{if(!b.value&&!w.value&&!m(l.value)){let n={ref:M,to:l.value,activeClass:i.activeClass||s.activeClass,exactActiveClass:i.exactActiveClass||s.exactActiveClass,replace:i.replace,ariaCurrentValue:i.ariaCurrentValue,custom:i.custom};return i.custom||(N(`interaction`)&&(n.onPointerenter=P.bind(null,void 0),n.onFocus=P.bind(null,void 0)),O.value&&(n.class=i.prefetchedClass||s.prefetchedClass),n.rel=i.rel||void 0),t(e(`RouterLink`),n,a.default)}let n=i.target||null,r=T(i.noRel?``:i.rel,s.externalRelAttribute,E.value||w.value?`noopener noreferrer`:``)||null;return i.custom?a.default?a.default({href:f.value,navigate:h,prefetch:P,get route(){if(!f.value)return;let e=new URL(f.value,window.location.href);return{path:e.pathname,fullPath:e.pathname,get query(){return p(e.search)},hash:e.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:f.value}},rel:r,target:n,isExternal:b.value||w.value,isActive:!1,isExactActive:!1}):null:t(`a`,{ref:A,href:f.value||null,rel:r,target:n,onClick:async e=>{if(!(b.value||w.value)){e.preventDefault();try{let e=v(f.value);return await(i.replace?o.replace(e):o.push(e))}finally{if(m(l.value)){let e=l.value.slice(1),t=e;try{t=decodeURIComponent(e)}catch{}document.getElementById(t)?.focus()}}}}},a.default?.())}}})}var D=E(s);function O(e,t){let n=t===`append`?m:f;return h(e)&&!e.startsWith(`http`)?e:n(e,!0)}function k(){let e=c();if(e._observer)return e._observer;let t=null,n=new Map;return e._observer={observe:(e,r)=>(t||=new IntersectionObserver(e=>{for(let t of e){let e=n.get(t.target);(t.isIntersecting||t.intersectionRatio>0)&&e&&e()}}),n.set(e,r),t.observe(e),()=>{n.delete(e),t?.unobserve(e),n.size===0&&(t?.disconnect(),t=null)})}}var A=/2g/;function j(){let e=navigator.connection;return!!(e&&(e.saveData||A.test(e.effectiveType)))}export{D as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,B as t,C as n,D as r,Gt as i,Jt as a,M as o,S as s,Z as c,b as l,h as u,k as d,kt as f,lt as p,q as m,w as h,x as g,xt as _}from"./CUBdwZVs.js";import{C as v,w as y}from"./BTfiKBAm.js";import{r as b}from"./CqfNwh25.js";import{a as x,s as S}from"./BqiFImA_.js";import{t as C}from"./C5iGLYf8.js";import{t as w}from"./CKlr0Tan.js";import{t as T}from"./CBfhMqaX.js";import{t as E}from"./20hUiP46.js";import{O as D,w as O}from"./D8ugdtv-.js";import{n as k}from"./CbQbsbZd.js";import{n as A,r as j,t as M}from"./zt8ARaaw.js";import{t as N}from"./bqLEejUC.js";import{t as P}from"./CWusIlaG.js";import{n as F,r as I,t as L}from"./BQIt7f6-2.js";import{n as R,t as z}from"./D1iwru-F2.js";var B={flex:`~ col gap-2`,p4:``},V=[`onClick`],H=Object.assign(o({__name:`FlatList`,props:{session:{},modules:{},disableTooltip:{type:Boolean,default:!1},link:{type:Boolean,default:!0}},emits:[`select`],setup(t,{emit:n}){let r=n;return(n,i)=>{let a=C;return m(),h(`div`,B,[e(M,{items:t.modules,"key-prop":`id`},{default:p(({item:n})=>[g(`div`,{flex:``,pb2:``,onClick:e=>r(`select`,n)},[e(a,{id:n.id,session:t.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:t.link,"disable-tooltip":t.disableTooltip},null,8,[`id`,`session`,`link`,`disable-tooltip`])],8,V)]),_:1},8,[`items`])])}}}),{__name:`ModulesFlatList`}),U={flex:`~ col gap-2`,p4:``},W={flex:``,pb2:``},G={flex:`~ gap-1 wrap`,"text-xs":``},K={flex:`~ auto text-xs wrap`},q={key:0,flex:`~ items-center`},J={key:0,op20:``},Y={flex:`~ none gap-1 wrap justify-end`},X=Object.assign(o({__name:`DetailedList`,props:{session:{},modules:{}},setup(t){let r=t,i=l(()=>{let e=new Map;for(let t of r.modules){let n=t.buildMetrics?.transforms.filter(e=>e.source_code_size!==e.transformed_code_size).filter(e=>e.transformed_code_size);e.set(t.id,n)}return e});return(r,a)=>{let o=N,l=E,d=C;return m(),h(`div`,U,[e(M,{items:t.modules,"key-prop":`id`},{default:p(({item:r})=>[g(`div`,W,[e(d,{id:r.id,session:t.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:!0},{detail:p(()=>[g(`div`,G,[g(`ul`,K,[(m(!0),h(u,null,c(i.value.get(r.id),(t,a)=>(m(),h(u,{key:a},[t.source_code_size!==t.transformed_code_size&&t.transformed_code_size?(m(),h(`li`,q,[e(o,{name:t.plugin_name,class:`font-mono ws-nowrap op-50`},null,8,[`name`]),a===i.value.get(r.id).length-1?n(``,!0):(m(),h(`span`,J,`|`))])):n(``,!0)],64))),128))]),a[0]||=g(`div`,{flex:`~ auto gap-1`,"of-hidden":``},null,-1),g(`div`,Y,[g(`span`,null,[r.buildMetrics?(m(),s(l,{key:0,metrics:r.buildMetrics},null,8,[`metrics`])):n(``,!0)])])])]),_:2},1032,[`id`,`session`])])]),_:1},8,[`items`])])}}}),{__name:`ModulesDetailedList`}),Z=[`d`,`stroke-dasharray`],Q=Object.assign(o({__name:`Graph`,props:{modules:{},session:{}},setup(n){let r=n,a=l(()=>r.modules);return k({modules:a,spacing:{width:400,height:55,linkOffset:20,margin:800,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:n,scale:r,spacing:i,tree:o,hierarchy:s,collapsedNodes:c,container:u,modulesMap:d,nodes:p,links:m,nodesMap:h,linksMap:g,width:_,height:v,childToParentMap:y,focusOn:b}=e,x=l(()=>a.value.filter(e=>e.importers.length===0));return(e=!0)=>{_.value=window.innerWidth,v.value=window.innerHeight;let a=new Set,l=s({module:{id:`~root`}},e=>e.module.id===`~root`?(x.value.forEach(e=>{a.add(e),n.value&&y.set(e.id,`~root`)}),x.value.map(e=>({module:e,expanded:!c.has(e.id),hasChildren:!1}))):c.has(e.module.id)?[]:e.module.imports.map(t=>{let r=d.value.get(t.module_id);if(r&&!a.has(r)&&!(y.has(r.id)&&y.get(r.id)!==e.module.id))return a.add(r),n.value&&y.set(r.id,e.module.id),{module:r,import:t,expanded:!c.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));n.value&&=!1,o().nodeSize([f(i.height),f(i.width)+f(i.gap)])(l);let S=l.descendants();for(let e of S)[e.x,e.y]=[e.y-f(i.width),e.x],e.data.module.imports&&(e.data.hasChildren=e.data.module.imports?.filter(t=>y.get(t.module_id)===e.data.module.id).length>0);let C=Math.min(...S.map(e=>e.x)),w=Math.min(...S.map(e=>e.y));if(C<f(i.margin))for(let e of S)e.x+=Math.abs(C)+f(i.margin);if(w<f(i.margin))for(let e of S)e.y+=Math.abs(w)+f(i.margin);p.value=S,h.clear();for(let e of S)h.set(e.data.module.id,e);let T=l.links().filter(e=>e.source.data.module.id!==`~root`).map(e=>({...e,import:e.source.data.import,id:`${e.source.data.module.id}|${e.target.data.module.id}`}));g.clear();for(let e of T)g.set(e.id,e);m.value=T,t(()=>{_.value=u.value.scrollWidth/r.value+f(i.margin),v.value=u.value.scrollHeight/r.value+f(i.margin);let n=x.value?.[0]?.id;e&&n&&t(()=>{b(n,!1)})})}}}),(t,r)=>{let o=C,c=L;return m(),s(c,{session:n.session,modules:a.value},{default:p(({node:t,nodesRefMap:r})=>[e(o,{id:t.data.module.id,ref:e=>r.set(t.data.module.id,e?.$el),link:!0,session:n.session,minimal:!0,flex:`1`},null,8,[`id`,`session`])]),link:p(({link:e,d:t,linkClass:n})=>[g(`path`,{d:t,class:i(n),"stroke-dasharray":e.import?.kind===`dynamic-import`?`3 6`:void 0,fill:`none`},null,10,Z)]),_:1},8,[`session`,`modules`])}}}),{__name:`ModulesGraph`}),$={"of-auto":``,"max-h-screen":``,relative:``},ee={flex:`~ col gap-2`,p4:``},te=Object.assign(o({__name:`Folder`,props:{session:{},modules:{}},setup(t){let r=t,i=l(()=>{if(!r.session.modulesList.length)return{workspace:{children:{},items:[]},nodeModules:{children:{},items:[]},virtual:{children:{},items:[]}};let e=[],t=[],n=[];return r.modules.map(e=>({full:e.id,path:e.path})).forEach(i=>{i.full.startsWith(r.session.meta.cwd)?(i.path.startsWith(`../`)||(i.path=i.full.slice(r.session.meta.cwd.length+1)),e.push(i)):i.full.includes(`node_modules`)?t.push({full:i.full,path:i.full}):i.full.startsWith(`virtual:`)&&n.push(i)}),{workspace:b(e,`Project Root`),nodeModules:b(t,`Node Modules`),virtual:b(n,`Virtual Modules`)}});return(t,r)=>{let a=P;return m(),h(`div`,$,[g(`div`,ee,[Object.keys(i.value.workspace.children).length?(m(),s(a,{key:0,node:i.value.workspace,p:`l3`,icon:`i-catppuccin:folder-dist icon-catppuccin`,"icon-open":`i-catppuccin:folder-dist-open icon-catppuccin`,link:!0},null,8,[`node`])):n(``,!0),Object.keys(i.value.nodeModules.children).length?(m(),h(u,{key:1},[r[0]||=g(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),e(a,{node:i.value.nodeModules,p:`l3`,icon:`i-catppuccin:folder-node icon-catppuccin`,"icon-open":`i-catppuccin:folder-node-open icon-catppuccin`,link:!0,open:!1},null,8,[`node`])],64)):n(``,!0),Object.keys(i.value.virtual.children).length?(m(),h(u,{key:2},[r[1]||=g(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),e(a,{node:i.value.virtual,p:`l3`,icon:`i-catppuccin:folder-components icon-catppuccin`,"icon-open":`i-catppuccin:folder-components-open icon-catppuccin`,link:!0,open:!1},null,8,[`node`])],64)):n(``,!0)])])}}}),{__name:`ModulesFolder`}),ne={sticky:``,"left-4":``,"right-4":``,"top-4":``,"z-panel-nav":``,"p-4":``},re={key:0,h10:``,mr2:``,flex:`~ items-center`},ie={flex:`~ wrap gap-2 items-center`,p2:``,border:`t base`},ae=[`onClick`],oe={key:4,fixed:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},se={op50:``},ce=o({__name:`index`,props:{session:{}},setup(t){let o=t,b=v(),E=y(),k=_({search:b.query.search||``,selected:b.query.file_types?R(b.query.file_types):null,node_modules:b.query.node_modules?R(b.query.node_modules):null}),M=[{label:`List`,value:`list`,icon:`i-ph-list-bullets-duotone`},{label:`Detailed List`,value:`detailed-list`,icon:`i-ph-list-magnifying-glass-duotone`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-duotone`},{label:`Folder`,value:`folder`,icon:`i-ph-folder-duotone`}];D(k.value,e=>{let t={...b.query,search:e.search||void 0,file_types:e.selected||void 0,node_modules:e.node_modules||void 0};E.replace({query:z(t)})},{debounce:500});let N=l(()=>o.session.modulesList.map(e=>({mod:e,path:w(e.id,o.session.meta.cwd),type:S(e.id)}))),P=l(()=>x.filter(e=>N.value.some(t=>e.match.test(t.mod.id)))),L=l(()=>{let e=N.value;return k.value.selected&&(e=e.filter(e=>{let t=S(e.mod.id);return k.value.selected.includes(t.name)})),k.value.node_modules&&(e=e.filter(e=>e.path.moduleName&&k.value.node_modules.includes(e.path.moduleName))),e.map(e=>({...e.mod,path:e.path.path}))}),{pathSelectorVisible:B,selectPathNodes:V,togglePathSelector:U,normalizedGraph:W}=I({onToggle:e=>{k.value.search=e?!1:``},dataMap:l(()=>new Map(o.session.modulesList.map(e=>[e.id,e]))),list:L,importIdKey:`module_id`}),G=O(()=>L.value,()=>new j(L.value,{includeScore:!0,keys:[`id`],ignoreLocation:!0,threshold:.4})),K=l(()=>k.value.search?G.value.search(k.value.search).map(e=>e.item):L.value);function q(e){b.query.module&&E.replace({query:{...b.query,module:void 0}}),T.value.moduleGraphViewType=e}return(o,l)=>{let _=H,v=C,y=F,b=A,x=X,S=Q,w=te;return m(),h(`div`,{relative:``,class:i({"max-h-screen of-hidden":f(T).moduleGraphViewType===`graph`})},[g(`div`,ne,[e(b,{modelValue:k.value,"onUpdate:modelValue":l[2]||=e=>k.value=e,rules:P.value},r({"search-end":p(()=>[f(T).moduleGraphViewType===`graph`?(m(),h(`div`,re,[g(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Graph Path Selector`,onClick:l[1]||=e=>f(U)(!0)},[...l[3]||=[g(`i`,{"i-ri:route-line":``,flex:``},null,-1)]])])):n(``,!0)]),default:p(()=>[g(`div`,ie,[l[4]||=g(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(m(),h(u,null,c(M,e=>g(`button`,{key:e.value,"btn-action":``,class:i(f(T).moduleGraphViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>q(e.value)},[g(`div`,{class:i(e.icon)},null,2),d(` `+a(e.label),1)],10,ae)),64))])]),_:2},[f(B)?{name:`search`,fn:p(()=>[e(y,{session:t.session,data:K.value,"import-id-key":`module_id`,"search-keys":[`id`],onSelect:f(V),onClose:l[0]||=e=>f(U)(!1)},{list:p(({select:e,data:r})=>[r?.length?(m(),s(_,{key:0,session:t.session,modules:r,"disable-tooltip":``,link:!1,onSelect:e},null,8,[`session`,`modules`,`onSelect`])):n(``,!0)]),item:p(({id:n})=>[e(v,{id:n,session:t.session,block:``,"text-nowrap":``,link:!1,"disable-tooltip":!0},null,8,[`id`,`session`])]),_:1},8,[`session`,`data`,`onSelect`])]),key:`0`}:void 0]),1032,[`modelValue`,`rules`])]),f(T).moduleGraphViewType===`list`?(m(),s(_,{key:0,session:t.session,modules:K.value},null,8,[`session`,`modules`])):f(T).moduleGraphViewType===`detailed-list`?(m(),s(x,{key:1,session:t.session,modules:K.value},null,8,[`session`,`modules`])):f(T).moduleGraphViewType===`graph`?(m(),s(S,{key:2,session:t.session,modules:f(W)},null,8,[`session`,`modules`])):(m(),s(w,{key:3,session:t.session,modules:K.value},null,8,[`session`,`modules`])),f(T).moduleGraphViewType===`list`||f(T).moduleGraphViewType===`detailed-list`?(m(),h(`div`,oe,[g(`span`,se,a(K.value.length)+` of `+a(t.session.modulesList.length),1)])):n(``,!0)],2)}}});export{ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as e}from"./
|
|
1
|
+
import{u as e}from"./BqiFImA_.js";import{n as t}from"./C5iGLYf8.js";import{n,t as r}from"./DoJ6DaKu.js";function i(e){let t=e.match(/.*\/node_modules\/(.*)$/)?.[1];if(t)return t}var a=e((e,a)=>{let o=e.replace(/%2F/g,`/`).replace(/\\/g,`/`);if(n(o)||/^\w+:/.test(o)&&!/^[a-z]:\\/i.test(e))return{moduleName:o,path:o};let s=r(o),c=i(o);if(s&&c)return{moduleName:s,path:c};try{let e=t(a,o);return!e.startsWith(`./`)&&!e.startsWith(`../`)&&(e=`./${e}`),e.startsWith(`./.nuxt/`)&&(e=`#build${e.slice(7)}`),{path:e}}catch{return{path:o}}});export{a as t};
|