react-grab 0.1.28 → 0.1.30
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/README.md +8 -138
- package/dist/core/index.cjs +9 -1
- package/dist/core/index.d.cts +11 -3
- package/dist/core/index.d.ts +11 -3
- package/dist/core/index.js +9 -1
- package/dist/core--H_JZk7a.js +16 -0
- package/dist/core-1AoeBJ2R.cjs +4386 -0
- package/dist/core-4VC4A94S.js +4249 -0
- package/dist/core-5Q_6LVh_.cjs +16 -0
- package/dist/core-6sOn3YNs.js +16 -0
- package/dist/core-B3FYVaHv.cjs +16 -0
- package/dist/core-B3I0upO1.js +4250 -0
- package/dist/core-B3ndcALq.cjs +4386 -0
- package/dist/core-B9GWVp1Q.js +16 -0
- package/dist/core-BGIMywNa.js +16 -0
- package/dist/core-BGK4C6ju.js +16 -0
- package/dist/core-BGXprTx7.cjs +16 -0
- package/dist/core-BKt5SHzo.js +16 -0
- package/dist/core-BMObVYUv.cjs +16 -0
- package/dist/core-BNMx90Sn.js +16 -0
- package/dist/core-BWQ6C5g9.js +4268 -0
- package/dist/core-BcwRbSfO.js +16 -0
- package/dist/core-Be-1ubQn.cjs +16 -0
- package/dist/core-BfpPi7c6.cjs +16 -0
- package/dist/core-BiIoWLRk.js +16 -0
- package/dist/core-BjpyJHlW.js +16 -0
- package/dist/core-Bqf3D4Ra.cjs +16 -0
- package/dist/core-Bs0wekHY.cjs +4284 -0
- package/dist/core-Bvqgv6Zr.js +16 -0
- package/dist/core-Bw0-Cecq.cjs +16 -0
- package/dist/core-BzRpJ5QI.cjs +4284 -0
- package/dist/core-C0ZgNdUR.cjs +4386 -0
- package/dist/core-C191WXKe.cjs +16 -0
- package/dist/core-C4yYleJn.js +16 -0
- package/dist/core-C758xgeI.js +16 -0
- package/dist/core-CAZ8ENTv.js +16 -0
- package/dist/core-CBUFmwfx.cjs +4386 -0
- package/dist/core-CDV48I9C.js +4249 -0
- package/dist/core-CGXCsSkm.js +4280 -0
- package/dist/core-CHsFU9FZ.js +16 -0
- package/dist/core-CJOQfSzq.js +4495 -0
- package/dist/core-CLW9tl4L.js +4249 -0
- package/dist/core-CP1yCnSB.js +16 -0
- package/dist/core-CRLyvQCt.cjs +16 -0
- package/dist/core-CZX3EijL.js +16 -0
- package/dist/core-Ccli-yLf.cjs +16 -0
- package/dist/core-Ce4pBUSh.js +16 -0
- package/dist/core-CgCGjXfB.cjs +16 -0
- package/dist/core-CiQl2PfF.cjs +16 -0
- package/dist/core-CnPpGWUc.js +16 -0
- package/dist/core-Co9954wQ.cjs +16 -0
- package/dist/core-Cr4qVf2a.js +16 -0
- package/dist/core-CrQCbm00.js +16 -0
- package/dist/core-CsCg35MW.js +16 -0
- package/dist/core-Cshs0orb.js +16 -0
- package/dist/core-CthjfoZX.cjs +16 -0
- package/dist/core-CtvavOAt.cjs +16 -0
- package/dist/core-CvoFTVjy.cjs +16 -0
- package/dist/core-CzE8I9NL.cjs +16 -0
- package/dist/core-CzGijRTx.js +16 -0
- package/dist/core-CzosrDdO.cjs +16 -0
- package/dist/core-D--fM7Xq.cjs +16 -0
- package/dist/core-D-UGQb_Z.cjs +16 -0
- package/dist/core-D0UqPwu_.cjs +16 -0
- package/dist/core-D2LzIluw.js +4495 -0
- package/dist/core-D4z4W-Qz.cjs +16 -0
- package/dist/core-D7NwJuzy.js +16 -0
- package/dist/core-DCqMIKkK.js +16 -0
- package/dist/core-DFrvwczh.cjs +4284 -0
- package/dist/core-DGxxKKPR.cjs +16 -0
- package/dist/core-DGyQeEXa.js +4495 -0
- package/dist/core-DH8Uvag-.js +4249 -0
- package/dist/core-DHZBYfsC.js +16 -0
- package/dist/core-DKVj078o.js +4249 -0
- package/dist/core-DMRsaGr7.js +16 -0
- package/dist/core-DRUnXCNA.cjs +16 -0
- package/dist/core-DRlG4zYm.cjs +16 -0
- package/dist/core-DSqJwwdV.cjs +4284 -0
- package/dist/core-DXqmRz53.cjs +16 -0
- package/dist/core-DcRxqPad.js +16 -0
- package/dist/core-DdNOX4pt.js +16 -0
- package/dist/core-Df7CMRnd.cjs +4315 -0
- package/dist/core-DiIZA6Hx.js +4495 -0
- package/dist/core-DiVnlonK.cjs +4284 -0
- package/dist/core-Dj1WV911.js +4495 -0
- package/dist/core-DjPDxMID.cjs +16 -0
- package/dist/core-DjcnHWor.cjs +16 -0
- package/dist/core-DkWjrEUZ.cjs +16 -0
- package/dist/core-Dq-CCsij.cjs +4303 -0
- package/dist/core-DsVAkMs2.js +16 -0
- package/dist/core-DueMb4P6.js +4249 -0
- package/dist/core-DvJt5JmX.js +16 -0
- package/dist/core-Dz8Hrc33.js +4249 -0
- package/dist/core-ESHKG2mL.cjs +4285 -0
- package/dist/core-Ij_B_RWV.cjs +16 -0
- package/dist/core-JyczI7kP.cjs +16 -0
- package/dist/core-K0XuILjf.cjs +4284 -0
- package/dist/core-N9HyYpZv.cjs +16 -0
- package/dist/core-PW2DC2Tb.js +4495 -0
- package/dist/core-Q84EBsQ8.cjs +16 -0
- package/dist/core-TSuD8D7m.js +16 -0
- package/dist/core-WN76m9V0.cjs +16 -0
- package/dist/core-YRKn-0AV.js +16 -0
- package/dist/core-fC6GdbUJ.js +16 -0
- package/dist/core-h5q7bqH-.cjs +4284 -0
- package/dist/core-hkgBRD_T.js +16 -0
- package/dist/core-k9l5c9Hk.cjs +16 -0
- package/dist/core-mNhkpUYQ.cjs +16 -0
- package/dist/core-qCvYE9Ox.cjs +4386 -0
- package/dist/core-rvs2FEMH.js +16 -0
- package/dist/core-sXzUCmoJ.js +16 -0
- package/dist/core-t7gaYHyj.cjs +4386 -0
- package/dist/core-thci-YqL.js +16 -0
- package/dist/core-xokESdbC.cjs +16 -0
- package/dist/core-yW0MN96-.cjs +16 -0
- package/dist/core-ydFCYlV4.js +16 -0
- package/dist/core-zQ4jjKHw.cjs +16 -0
- package/dist/extract-element-css-B-R_28uM.cjs +10 -0
- package/dist/extract-element-css-B732tro7.js +10 -0
- package/dist/extract-element-css-B9Xh1wUd.js +10 -0
- package/dist/extract-element-css-BGZPWnck.js +10 -0
- package/dist/extract-element-css-BIniUwQh.js +319 -0
- package/dist/extract-element-css-BOQUDYB3.cjs +10 -0
- package/dist/extract-element-css-BTzDGIs3.cjs +336 -0
- package/dist/extract-element-css-BWUnsvjZ.js +10 -0
- package/dist/extract-element-css-BceTcL6y.cjs +10 -0
- package/dist/extract-element-css-Bi1y8V4z.cjs +336 -0
- package/dist/extract-element-css-Bra6hEzg.js +319 -0
- package/dist/extract-element-css-BuJ3zqGO.js +10 -0
- package/dist/extract-element-css-C8lBuGP7.js +10 -0
- package/dist/extract-element-css-CBHVjrBq.cjs +10 -0
- package/dist/extract-element-css-CGxXdwim.js +10 -0
- package/dist/extract-element-css-CJx4cesM.js +10 -0
- package/dist/extract-element-css-CQBJAbFD.cjs +10 -0
- package/dist/extract-element-css-CQV8FsMB.cjs +10 -0
- package/dist/extract-element-css-CQx4Biqa.cjs +336 -0
- package/dist/extract-element-css-CTy2pRfA.js +10 -0
- package/dist/extract-element-css-CchtITXx.cjs +336 -0
- package/dist/extract-element-css-CjY9vDS6.js +10 -0
- package/dist/extract-element-css-ClnG20sN.cjs +10 -0
- package/dist/extract-element-css-CmMetO-q.cjs +10 -0
- package/dist/extract-element-css-CmOD6UeE.cjs +10 -0
- package/dist/extract-element-css-CnY9b0vB.js +10 -0
- package/dist/extract-element-css-CoQLNjVI.js +10 -0
- package/dist/extract-element-css-CqjmXl0Y.cjs +10 -0
- package/dist/extract-element-css-Cr29xtzW.cjs +10 -0
- package/dist/extract-element-css-CzNVoJEM.js +319 -0
- package/dist/extract-element-css-CzgC7nM9.cjs +10 -0
- package/dist/extract-element-css-D3Dy-3Qz.js +10 -0
- package/dist/extract-element-css-D5qqKVc-.cjs +10 -0
- package/dist/extract-element-css-D5zsPw09.cjs +10 -0
- package/dist/extract-element-css-D6UwJjf4.cjs +336 -0
- package/dist/extract-element-css-DEuA2W6G.js +10 -0
- package/dist/extract-element-css-DKkUiIlS.cjs +10 -0
- package/dist/extract-element-css-DM0EhhXw.cjs +10 -0
- package/dist/extract-element-css-DPA6C_o-.cjs +10 -0
- package/dist/extract-element-css-DU45xRGh.js +10 -0
- package/dist/extract-element-css-DUvYlz4T.js +10 -0
- package/dist/extract-element-css-DVDr5Tn6.cjs +10 -0
- package/dist/extract-element-css-Di9hCigW.js +319 -0
- package/dist/extract-element-css-DivFxCRt.js +319 -0
- package/dist/extract-element-css-DlDbU4YM.cjs +10 -0
- package/dist/extract-element-css-DsssOqcQ.cjs +10 -0
- package/dist/extract-element-css-EnvrIHtf.cjs +336 -0
- package/dist/extract-element-css-FI71J_KB.js +10 -0
- package/dist/extract-element-css-GdDDlzTf.js +10 -0
- package/dist/extract-element-css-U3MgLHty.cjs +10 -0
- package/dist/extract-element-css-U4oxl-UP.js +10 -0
- package/dist/extract-element-css-VyMIgOZy.js +10 -0
- package/dist/extract-element-css-XGv0WWIL.js +319 -0
- package/dist/extract-element-css-Y-x4luJL.cjs +10 -0
- package/dist/extract-element-css-Zz_CgLqY.js +319 -0
- package/dist/extract-element-css-_aFPl5y4.cjs +336 -0
- package/dist/extract-element-css-_uZRVqCT.cjs +10 -0
- package/dist/extract-element-css-i8nzXODQ.js +10 -0
- package/dist/extract-element-css-jh1iLRzJ.js +10 -0
- package/dist/extract-element-css-nkJQc3j1.js +10 -0
- package/dist/freeze-updates--K1ecmFi.cjs +44 -0
- package/dist/freeze-updates-1FTXgIdb.js +44 -0
- package/dist/freeze-updates-3QjTocF-.cjs +2267 -0
- package/dist/freeze-updates-81f5sY45.js +44 -0
- package/dist/freeze-updates-B1mPDmJB.js +44 -0
- package/dist/freeze-updates-B5h8teL6.cjs +44 -0
- package/dist/freeze-updates-BAYe0Nlx.js +44 -0
- package/dist/freeze-updates-BDhlBp3V.js +44 -0
- package/dist/freeze-updates-BGa9CqrW.cjs +2267 -0
- package/dist/freeze-updates-BQH6Y8E1.cjs +44 -0
- package/dist/freeze-updates-BQjWBzy4.cjs +53 -0
- package/dist/freeze-updates-BSOSfpXo.js +44 -0
- package/dist/freeze-updates-BT-s67nK.js +53 -0
- package/dist/freeze-updates-BUJeYIm5.js +44 -0
- package/dist/freeze-updates-BVDrqUzf.js +2498 -0
- package/dist/freeze-updates-BVX0QSXz.cjs +44 -0
- package/dist/freeze-updates-BXMr6a9g.cjs +2912 -0
- package/dist/freeze-updates-BZpmCVDl.cjs +2267 -0
- package/dist/freeze-updates-BbbID39H.js +1866 -0
- package/dist/freeze-updates-BdnJ5RrP.js +1866 -0
- package/dist/freeze-updates-Bj59uWit.cjs +44 -0
- package/dist/freeze-updates-Bla3E0Kv.js +53 -0
- package/dist/freeze-updates-BoYyIB3V.cjs +44 -0
- package/dist/freeze-updates-C2TqDiTp.cjs +44 -0
- package/dist/freeze-updates-C6Tg4EoW.js +44 -0
- package/dist/freeze-updates-C7c9TRvJ.cjs +44 -0
- package/dist/freeze-updates-CPNAwtsl.cjs +2267 -0
- package/dist/freeze-updates-CTP39zuf.js +44 -0
- package/dist/freeze-updates-Cm3EVm_J.cjs +53 -0
- package/dist/freeze-updates-CnSZEKoI.cjs +44 -0
- package/dist/freeze-updates-CrKe4F0s.js +44 -0
- package/dist/freeze-updates-CtYFeM4D.cjs +2267 -0
- package/dist/freeze-updates-CxYFvPj9.cjs +53 -0
- package/dist/freeze-updates-D10Qj9Ec.cjs +44 -0
- package/dist/freeze-updates-D6o46vBw.cjs +44 -0
- package/dist/freeze-updates-D7XFQ3_T.js +53 -0
- package/dist/freeze-updates-D8H25gFt.js +44 -0
- package/dist/freeze-updates-DCpGX7lt.cjs +44 -0
- package/dist/freeze-updates-DG3hLEL2.cjs +44 -0
- package/dist/freeze-updates-DO_M76qf.js +44 -0
- package/dist/freeze-updates-Db4Id665.cjs +2267 -0
- package/dist/freeze-updates-DbL_EXkN.js +1866 -0
- package/dist/freeze-updates-DcvNGCcR.cjs +44 -0
- package/dist/freeze-updates-Dh4GiYXz.cjs +44 -0
- package/dist/freeze-updates-DkKJK_nh.cjs +44 -0
- package/dist/freeze-updates-DmB-ndqy.cjs +44 -0
- package/dist/freeze-updates-DnAA3QYp.cjs +44 -0
- package/dist/freeze-updates-Dpj8jndD.js +44 -0
- package/dist/freeze-updates-DuHXIi3M.js +44 -0
- package/dist/freeze-updates-DwERlFID.js +1866 -0
- package/dist/freeze-updates-HHyWtz8f.cjs +44 -0
- package/dist/freeze-updates-JRZCAR0q.js +1866 -0
- package/dist/freeze-updates-KLyCac_c.js +44 -0
- package/dist/freeze-updates-MaNDvTJS.js +1866 -0
- package/dist/freeze-updates-REe44rww.js +44 -0
- package/dist/freeze-updates-TPRkNnYY.js +44 -0
- package/dist/freeze-updates-WfKs4yF4.js +44 -0
- package/dist/freeze-updates-d9yH0V6A.cjs +44 -0
- package/dist/freeze-updates-nzZkxjqN.js +44 -0
- package/dist/freeze-updates-q_DMlHq7.js +44 -0
- package/dist/index-0hhKx6KA.d.ts +534 -0
- package/dist/index-5oOhE8Ae.d.cts +123 -0
- package/dist/index-BA23Z7zi.d.ts +77 -0
- package/dist/index-BAbHDCJb.d.ts +190 -0
- package/dist/index-BN1ZJhWK.d.cts +471 -0
- package/dist/index-BNt_9BO7.d.ts +77 -0
- package/dist/index-BQIO-ZFv.d.cts +190 -0
- package/dist/index-BTQxeAz1.d.cts +123 -0
- package/dist/index-BxsI0BlT.d.ts +471 -0
- package/dist/index-BzzHoNRc.d.cts +77 -0
- package/dist/index-C0Scq3kL.d.ts +458 -0
- package/dist/index-CAHLDDjY.d.ts +190 -0
- package/dist/index-CIJ7ossb.d.ts +190 -0
- package/dist/index-CJqujqsv.d.cts +190 -0
- package/dist/index-CJrVDk2d.d.ts +470 -0
- package/dist/index-CQBZI4f5.d.cts +458 -0
- package/dist/index-CS3VHZ8R.d.cts +77 -0
- package/dist/index-CWd5aKyK.d.ts +123 -0
- package/dist/index-DM3Ga1zc.d.ts +123 -0
- package/dist/index-DYp_9VQ_.d.cts +470 -0
- package/dist/index-DrK-HiGj.d.ts +203 -0
- package/dist/index-GwiDNOsl.d.ts +457 -0
- package/dist/index-QLMT7NRw.d.cts +203 -0
- package/dist/index-QLi1BtdI.d.cts +190 -0
- package/dist/index-sM3yy652.d.cts +534 -0
- package/dist/index-zvkV7Xwg.d.cts +457 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +21 -12
- package/dist/index.d.ts +21 -12
- package/dist/index.global.js +26 -101
- package/dist/index.iife.js +43 -0
- package/dist/index.js +2 -2
- package/dist/primitives.cjs +2 -2
- package/dist/primitives.d.cts +20 -13
- package/dist/primitives.d.ts +20 -13
- package/dist/primitives.js +2 -2
- package/dist/renderer--AVNuclr.js +9 -0
- package/dist/renderer--bWj0AZJ.js +4101 -0
- package/dist/renderer--cF4pvND.js +9 -0
- package/dist/renderer-0mo5bvxE.js +4126 -0
- package/dist/renderer-4Wa-UMC5.cjs +9 -0
- package/dist/renderer-6D9KbSAS.js +9 -0
- package/dist/renderer-7mjLlkgX.cjs +9 -0
- package/dist/renderer-B0v-2J0H.js +9 -0
- package/dist/renderer-B0yJsSRz.js +9 -0
- package/dist/renderer-B660bBKn.cjs +9 -0
- package/dist/renderer-B6m2pWq1.cjs +4102 -0
- package/dist/renderer-BA_yjKW4.cjs +9 -0
- package/dist/renderer-BDCne7IL.cjs +9 -0
- package/dist/renderer-BDKG-8eW.js +9 -0
- package/dist/renderer-BEisX7lt.js +9 -0
- package/dist/renderer-BEnSHrkN.cjs +9 -0
- package/dist/renderer-BJQHCki_.js +9 -0
- package/dist/renderer-BLEQ0lBg.js +9 -0
- package/dist/renderer-BQMe9vbO.cjs +9 -0
- package/dist/renderer-BZfQAWt2.cjs +9 -0
- package/dist/renderer-BZypunFM.cjs +9 -0
- package/dist/renderer-Be1I1mDW.cjs +9 -0
- package/dist/renderer-Bhrtihjr.cjs +9 -0
- package/dist/renderer-Bp3dRMPA.js +9 -0
- package/dist/renderer-BqYgf0tD.js +9 -0
- package/dist/renderer-BwD9ZaGr.cjs +9 -0
- package/dist/renderer-BxCRcsEK.cjs +4125 -0
- package/dist/renderer-C1Wrh8hn.js +9 -0
- package/dist/renderer-C6pztTyv.js +9 -0
- package/dist/renderer-C9bCr3pC.js +4101 -0
- package/dist/renderer-CEmrAuyA.js +9 -0
- package/dist/renderer-CG1lpM8J.cjs +9 -0
- package/dist/renderer-CIJhv1xD.js +9 -0
- package/dist/renderer-CJ3EovD7.js +9 -0
- package/dist/renderer-CJVIzi67.js +4114 -0
- package/dist/renderer-CKAmRN9i.cjs +9 -0
- package/dist/renderer-CNa9jW2d.js +9 -0
- package/dist/renderer-CS6q5sh-.cjs +4101 -0
- package/dist/renderer-CTip7L4z.cjs +4114 -0
- package/dist/renderer-Cdh6G3WO.cjs +4101 -0
- package/dist/renderer-Cfnc_J-x.js +9 -0
- package/dist/renderer-CidbOiiO.js +9 -0
- package/dist/renderer-CooL8OD4.cjs +9 -0
- package/dist/renderer-Cp8W_Vpj.cjs +4101 -0
- package/dist/renderer-Ctq4IL1w.cjs +9 -0
- package/dist/renderer-D0gZDp8v.js +9 -0
- package/dist/renderer-D2Ius1-3.cjs +9 -0
- package/dist/renderer-D2gUuAUv.cjs +9 -0
- package/dist/renderer-D6qQGrNF.js +9 -0
- package/dist/renderer-D9RBf9He.js +9 -0
- package/dist/renderer-DDpyudCh.js +9 -0
- package/dist/renderer-DEo9eIZj.cjs +9 -0
- package/dist/renderer-DHBz10-G.js +9 -0
- package/dist/renderer-DM6gVYD_.cjs +4126 -0
- package/dist/renderer-DS5wjL1R.cjs +9 -0
- package/dist/renderer-DWZQjHeF.cjs +4101 -0
- package/dist/renderer-DZ-EdxOj.cjs +9 -0
- package/dist/renderer-DblZTrea.js +9 -0
- package/dist/renderer-DcPiCh7r.js +4114 -0
- package/dist/renderer-Dfj6tfg9.cjs +4139 -0
- package/dist/renderer-DhoYb1PY.js +4103 -0
- package/dist/renderer-Dl6awT_I.cjs +9 -0
- package/dist/renderer-DmOXobMF.js +4101 -0
- package/dist/renderer-DmlAyeq6.cjs +4114 -0
- package/dist/renderer-DnwizF3I.cjs +9 -0
- package/dist/renderer-Dpzs-uao.js +4125 -0
- package/dist/renderer-Ds21virZ.cjs +4145 -0
- package/dist/renderer-DslAAsKS.js +4101 -0
- package/dist/renderer-DtBv4wTu.js +4102 -0
- package/dist/renderer-DxuOYfZN.cjs +9 -0
- package/dist/renderer-DyrsoA_r.js +9 -0
- package/dist/renderer-GlgUXTaV.js +9 -0
- package/dist/renderer-KL2bSyIW.cjs +9 -0
- package/dist/renderer-N_yFJNWi.cjs +9 -0
- package/dist/renderer-TkTQ8ZzV.cjs +4101 -0
- package/dist/renderer-WtWG_Uzr.js +4139 -0
- package/dist/renderer-YPWUo91d.cjs +9 -0
- package/dist/renderer-foaHR93_.js +9 -0
- package/dist/renderer-irss7gH9.js +9 -0
- package/dist/renderer-kNWgh9RH.js +9 -0
- package/dist/renderer-l2DsHbX5.js +4145 -0
- package/dist/renderer-lRGat4eI.js +9 -0
- package/dist/renderer-m1ynwV5m.cjs +9 -0
- package/dist/renderer-oDWZTt10.cjs +9 -0
- package/dist/renderer-ruVxrW9_.cjs +9 -0
- package/dist/renderer-tLg9bC5E.cjs +4103 -0
- package/dist/renderer-wKL03A96.cjs +9 -0
- package/dist/renderer-xY7WwwPb.cjs +9 -0
- package/dist/renderer-yNfPLGJa.js +4101 -0
- package/dist/renderer-zFA8Xsqn.js +9 -0
- package/dist/state-0zvRag7o.js +1832 -0
- package/dist/state-1bNOTRwX.js +9 -0
- package/dist/state-4KlM-876.cjs +9 -0
- package/dist/state-5YzsfKSg.js +9 -0
- package/dist/state-B2sO7SGs.cjs +9 -0
- package/dist/state-B30FVO9-.cjs +9 -0
- package/dist/state-BBF5Yd6R.cjs +1488 -0
- package/dist/state-BHM_hL69.cjs +9 -0
- package/dist/state-BKkU5MYC.js +9 -0
- package/dist/state-B_xrj8fC.js +9 -0
- package/dist/state-BaTqKR5-.js +1832 -0
- package/dist/state-Bb1Wechu.js +9 -0
- package/dist/state-BfgVpFaG.cjs +9 -0
- package/dist/state-BoRPcmmD.js +9 -0
- package/dist/state-BqB3gaPk.js +9 -0
- package/dist/state-Bt9zarML.js +1832 -0
- package/dist/state-Bw07Ecsm.js +9 -0
- package/dist/state-Bw9Y8zmt.js +9 -0
- package/dist/state-ByV_XBwX.js +9 -0
- package/dist/state-C4nNE_SS.js +9 -0
- package/dist/state-C4uusDVL.cjs +9 -0
- package/dist/state-CMwBL8Lh.cjs +9 -0
- package/dist/state-C_KJ10Ip.cjs +9 -0
- package/dist/state-ClLJ5ade.cjs +1488 -0
- package/dist/state-CpWrjvjx.js +277 -0
- package/dist/state-CwguFqss.cjs +9 -0
- package/dist/state-Cxj7mpyT.cjs +9 -0
- package/dist/state-CyWfuYBm.js +9 -0
- package/dist/state-Cz4euNVW.js +1832 -0
- package/dist/state-D1eYdbOV.js +9 -0
- package/dist/state-D231Xq-p.js +9 -0
- package/dist/state-D2nMXLig.cjs +9 -0
- package/dist/state-D3NnAU-G.js +9 -0
- package/dist/state-D4g0zX0j.cjs +9 -0
- package/dist/state-D5n1XOr-.cjs +372 -0
- package/dist/state-DPKTXrbJ.cjs +9 -0
- package/dist/state-DREKPmRw.cjs +9 -0
- package/dist/state-DT0Nzp9g.cjs +9 -0
- package/dist/state-Deun4HK-.cjs +9 -0
- package/dist/state-DfcZ51t9.js +9 -0
- package/dist/state-DgvhS6KW.cjs +1488 -0
- package/dist/state-DkjLMcvP.cjs +9 -0
- package/dist/state-DspBT1Sv.js +9 -0
- package/dist/state-DtgVqpBv.js +9 -0
- package/dist/state-DycsTHAk.cjs +9 -0
- package/dist/state-EWoHHdWu.js +9 -0
- package/dist/state-HWOltPgB.js +9 -0
- package/dist/state-JJNPE2tU.js +277 -0
- package/dist/state-KDd3Eouo.js +9 -0
- package/dist/state-Kmc6BtLp.cjs +9 -0
- package/dist/state-Q4M-6UjH.cjs +9 -0
- package/dist/state-U8yVy4Ad.cjs +9 -0
- package/dist/state-Uwm9KEi1.js +1832 -0
- package/dist/state-XYH8BGBU.cjs +372 -0
- package/dist/state-aBiYx-N-.cjs +9 -0
- package/dist/state-arg5pYvx.cjs +1488 -0
- package/dist/state-dFAAWOP9.cjs +1488 -0
- package/dist/state-daFKdtG6.js +9 -0
- package/dist/state-muKg33Sx.cjs +9 -0
- package/dist/state-wvjxc3BL.js +9 -0
- package/dist/styles.css +1 -1
- package/package.json +16 -23
- package/dist/chunk-5RMV2HA7.js +0 -101
- package/dist/chunk-QEVSATMF.cjs +0 -101
- package/dist/chunk-XWCIDYJD.cjs +0 -26
- package/dist/chunk-XYTXUEOE.js +0 -26
- package/dist/index-CN8HkCli.d.cts +0 -547
- package/dist/index-CN8HkCli.d.ts +0 -547
- package/scripts/postinstall.cjs +0 -23
|
@@ -0,0 +1,2498 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 Aiden Bai
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
//#region src/utils/supports-display-p3.ts
|
|
10
|
+
let cachedResult = null;
|
|
11
|
+
const supportsDisplayP3 = () => {
|
|
12
|
+
if (cachedResult !== null) return cachedResult;
|
|
13
|
+
try {
|
|
14
|
+
cachedResult = window.matchMedia("(color-gamut: p3)").matches;
|
|
15
|
+
} catch {
|
|
16
|
+
cachedResult = false;
|
|
17
|
+
}
|
|
18
|
+
return cachedResult;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/utils/overlay-color.ts
|
|
23
|
+
const isWideGamut = supportsDisplayP3();
|
|
24
|
+
const SRGB_COMPONENTS = "210, 57, 192";
|
|
25
|
+
const P3_COMPONENTS = "0.84 0.19 0.78";
|
|
26
|
+
const overlayColor = (alpha) => isWideGamut ? `color(display-p3 ${P3_COMPONENTS} / ${alpha})` : `rgba(${SRGB_COMPONENTS}, ${alpha})`;
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/constants.ts
|
|
30
|
+
const VERSION = "[DEV]";
|
|
31
|
+
const OFFSCREEN_POSITION = -1e3;
|
|
32
|
+
const SELECTION_LERP_FACTOR = .95;
|
|
33
|
+
const FEEDBACK_DURATION_MS = 1500;
|
|
34
|
+
const SYMBOLICATION_TIMEOUT_MS = 5e3;
|
|
35
|
+
const MAX_SELECTOR_COMBINATIONS = 1e4;
|
|
36
|
+
const Z_INDEX_OVERLAY = 2147483647;
|
|
37
|
+
const Z_INDEX_OVERLAY_CANVAS = 2147483645;
|
|
38
|
+
const DRAG_LERP_FACTOR = .7;
|
|
39
|
+
const LERP_CONVERGENCE_THRESHOLD_PX = .5;
|
|
40
|
+
const OPACITY_CONVERGENCE_THRESHOLD = .01;
|
|
41
|
+
const OVERLAY_BORDER_COLOR_DRAG = overlayColor(.4);
|
|
42
|
+
const OVERLAY_FILL_COLOR_DRAG = overlayColor(.05);
|
|
43
|
+
const OVERLAY_BORDER_COLOR_DEFAULT = overlayColor(.5);
|
|
44
|
+
const OVERLAY_FILL_COLOR_DEFAULT = overlayColor(.08);
|
|
45
|
+
const OVERLAY_BORDER_COLOR_INSPECT = overlayColor(.3);
|
|
46
|
+
const OVERLAY_FILL_COLOR_INSPECT = overlayColor(.04);
|
|
47
|
+
const FROZEN_GLOW_COLOR = overlayColor(.15);
|
|
48
|
+
const ARROW_MAX_LABEL_WIDTH_RATIO = .2;
|
|
49
|
+
const PREVIEW_PRIORITY_ATTRS = [
|
|
50
|
+
"id",
|
|
51
|
+
"class",
|
|
52
|
+
"aria-label",
|
|
53
|
+
"data-testid",
|
|
54
|
+
"role",
|
|
55
|
+
"name",
|
|
56
|
+
"title"
|
|
57
|
+
];
|
|
58
|
+
const MODIFIER_KEYS = [
|
|
59
|
+
"Meta",
|
|
60
|
+
"Control",
|
|
61
|
+
"Shift",
|
|
62
|
+
"Alt"
|
|
63
|
+
];
|
|
64
|
+
const ARROW_KEYS = new Set([
|
|
65
|
+
"ArrowUp",
|
|
66
|
+
"ArrowDown",
|
|
67
|
+
"ArrowLeft",
|
|
68
|
+
"ArrowRight"
|
|
69
|
+
]);
|
|
70
|
+
const FROZEN_ELEMENT_ATTRIBUTE = "data-react-grab-frozen";
|
|
71
|
+
const USER_IGNORE_ATTRIBUTE = "data-react-grab-ignore";
|
|
72
|
+
const VIEWPORT_COVERAGE_THRESHOLD = .9;
|
|
73
|
+
const OVERLAY_Z_INDEX_THRESHOLD = 1e3;
|
|
74
|
+
const DEV_TOOLS_OVERLAY_Z_INDEX_THRESHOLD = 2147483600;
|
|
75
|
+
const TOOLBAR_DEFAULT_POSITION_RATIO = .5;
|
|
76
|
+
const DEFAULT_ACTION_ID = "comment";
|
|
77
|
+
const TOOLBAR_SHAKE_TOOLTIP_DURATION_MS = 1500;
|
|
78
|
+
const SELECTION_HINT_CYCLE_INTERVAL_MS = 3e3;
|
|
79
|
+
const TOOLTIP_BASE_CLASS = "absolute whitespace-nowrap px-1.5 py-0.5 rounded-[10px] text-[10px] text-black/60 pointer-events-none [corner-shape:superellipse(1.25)] filter-[drop-shadow(0px_1px_2px_#51515140)]";
|
|
80
|
+
const HINT_FLIP_IN_ANIMATION = "animate-[hint-flip-in_var(--transition-normal)_ease-out]";
|
|
81
|
+
const DRAG_SELECTION_COVERAGE_THRESHOLD = .75;
|
|
82
|
+
const ZOOM_DETECTION_THRESHOLD = .01;
|
|
83
|
+
const MOUNT_ROOT_RECHECK_DELAY_MS = 1e3;
|
|
84
|
+
const MAX_SESSION_STORAGE_SIZE_BYTES = 2 * 1024 * 1024;
|
|
85
|
+
const DROPDOWN_OFFSCREEN_POSITION = {
|
|
86
|
+
left: -9999,
|
|
87
|
+
top: -9999
|
|
88
|
+
};
|
|
89
|
+
const DROPDOWN_EDGE_TRANSFORM_ORIGIN = {
|
|
90
|
+
left: "left center",
|
|
91
|
+
right: "right center",
|
|
92
|
+
top: "center top",
|
|
93
|
+
bottom: "center bottom"
|
|
94
|
+
};
|
|
95
|
+
const NEXTJS_REVALIDATION_DELAY_MS = 1e3;
|
|
96
|
+
const SELECTION_LABEL_OFFSCREEN_PX = -9999;
|
|
97
|
+
const RELEVANT_CSS_PROPERTIES = new Set([
|
|
98
|
+
"display",
|
|
99
|
+
"position",
|
|
100
|
+
"top",
|
|
101
|
+
"right",
|
|
102
|
+
"bottom",
|
|
103
|
+
"left",
|
|
104
|
+
"z-index",
|
|
105
|
+
"overflow",
|
|
106
|
+
"overflow-x",
|
|
107
|
+
"overflow-y",
|
|
108
|
+
"width",
|
|
109
|
+
"height",
|
|
110
|
+
"min-width",
|
|
111
|
+
"min-height",
|
|
112
|
+
"max-width",
|
|
113
|
+
"max-height",
|
|
114
|
+
"margin-top",
|
|
115
|
+
"margin-right",
|
|
116
|
+
"margin-bottom",
|
|
117
|
+
"margin-left",
|
|
118
|
+
"padding-top",
|
|
119
|
+
"padding-right",
|
|
120
|
+
"padding-bottom",
|
|
121
|
+
"padding-left",
|
|
122
|
+
"flex-direction",
|
|
123
|
+
"flex-wrap",
|
|
124
|
+
"justify-content",
|
|
125
|
+
"align-items",
|
|
126
|
+
"align-self",
|
|
127
|
+
"align-content",
|
|
128
|
+
"flex-grow",
|
|
129
|
+
"flex-shrink",
|
|
130
|
+
"flex-basis",
|
|
131
|
+
"order",
|
|
132
|
+
"gap",
|
|
133
|
+
"row-gap",
|
|
134
|
+
"column-gap",
|
|
135
|
+
"grid-template-columns",
|
|
136
|
+
"grid-template-rows",
|
|
137
|
+
"grid-template-areas",
|
|
138
|
+
"font-family",
|
|
139
|
+
"font-size",
|
|
140
|
+
"font-weight",
|
|
141
|
+
"font-style",
|
|
142
|
+
"line-height",
|
|
143
|
+
"letter-spacing",
|
|
144
|
+
"text-align",
|
|
145
|
+
"text-decoration-line",
|
|
146
|
+
"text-decoration-style",
|
|
147
|
+
"text-transform",
|
|
148
|
+
"text-overflow",
|
|
149
|
+
"text-shadow",
|
|
150
|
+
"white-space",
|
|
151
|
+
"word-break",
|
|
152
|
+
"overflow-wrap",
|
|
153
|
+
"vertical-align",
|
|
154
|
+
"color",
|
|
155
|
+
"background-color",
|
|
156
|
+
"background-image",
|
|
157
|
+
"background-position",
|
|
158
|
+
"background-size",
|
|
159
|
+
"background-repeat",
|
|
160
|
+
"border-top-width",
|
|
161
|
+
"border-right-width",
|
|
162
|
+
"border-bottom-width",
|
|
163
|
+
"border-left-width",
|
|
164
|
+
"border-top-style",
|
|
165
|
+
"border-right-style",
|
|
166
|
+
"border-bottom-style",
|
|
167
|
+
"border-left-style",
|
|
168
|
+
"border-top-color",
|
|
169
|
+
"border-right-color",
|
|
170
|
+
"border-bottom-color",
|
|
171
|
+
"border-left-color",
|
|
172
|
+
"border-top-left-radius",
|
|
173
|
+
"border-top-right-radius",
|
|
174
|
+
"border-bottom-left-radius",
|
|
175
|
+
"border-bottom-right-radius",
|
|
176
|
+
"box-shadow",
|
|
177
|
+
"opacity",
|
|
178
|
+
"transform",
|
|
179
|
+
"filter",
|
|
180
|
+
"backdrop-filter",
|
|
181
|
+
"object-fit",
|
|
182
|
+
"object-position"
|
|
183
|
+
]);
|
|
184
|
+
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region src/utils/get-tag-name.ts
|
|
187
|
+
const getTagName = (element) => (element.tagName || "").toLowerCase();
|
|
188
|
+
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/utils/detect-csp-nonce.ts
|
|
191
|
+
let cachedNonce;
|
|
192
|
+
const detectCspNonce = () => {
|
|
193
|
+
if (cachedNonce !== void 0) return cachedNonce;
|
|
194
|
+
const existingElement = document.querySelector("script[nonce], style[nonce]");
|
|
195
|
+
const nonce = existingElement?.nonce || existingElement?.getAttribute("nonce") || null;
|
|
196
|
+
if (nonce) cachedNonce = nonce;
|
|
197
|
+
return nonce;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/utils/hide-from-third-parties.ts
|
|
202
|
+
const THIRD_PARTY_PRIVACY_ATTRIBUTES = [
|
|
203
|
+
["data-rr-block", ""],
|
|
204
|
+
["data-rr-ignore", ""],
|
|
205
|
+
["data-rr-mask", ""],
|
|
206
|
+
["data-sentry-block", ""],
|
|
207
|
+
["data-sentry-ignore", ""],
|
|
208
|
+
["data-sentry-mask", ""],
|
|
209
|
+
["data-dd-privacy", "hidden"],
|
|
210
|
+
["data-fs-exclude", ""],
|
|
211
|
+
["data-lr-exclude", ""],
|
|
212
|
+
["data-hj-suppress", ""],
|
|
213
|
+
["data-recording-disable", ""],
|
|
214
|
+
["data-clarity-mask", "true"],
|
|
215
|
+
["data-heap-redact-text", ""]
|
|
216
|
+
];
|
|
217
|
+
const hideFromThirdParties = (element) => {
|
|
218
|
+
for (const [attributeName, attributeValue] of THIRD_PARTY_PRIVACY_ATTRIBUTES) element.setAttribute(attributeName, attributeValue);
|
|
219
|
+
element.setAttribute("data-testid", "react-grab-overlay");
|
|
220
|
+
element.classList.add("ph-no-capture");
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
//#endregion
|
|
224
|
+
//#region src/utils/native-raf.ts
|
|
225
|
+
const isClientSide = typeof window !== "undefined";
|
|
226
|
+
const noopAnimationFrame = (_callback) => 0;
|
|
227
|
+
const noopCancelFrame = (_id) => {};
|
|
228
|
+
const nativeRequestAnimationFrame = isClientSide ? (Object.getOwnPropertyDescriptor(Window.prototype, "requestAnimationFrame")?.value ?? window.requestAnimationFrame).bind(window) : noopAnimationFrame;
|
|
229
|
+
const nativeCancelAnimationFrame = isClientSide ? (Object.getOwnPropertyDescriptor(Window.prototype, "cancelAnimationFrame")?.value ?? window.cancelAnimationFrame).bind(window) : noopCancelFrame;
|
|
230
|
+
const waitUntilNextFrame = () => isClientSide ? new Promise((resolve) => nativeRequestAnimationFrame(() => resolve())) : Promise.resolve();
|
|
231
|
+
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region ../../node_modules/.pnpm/bippy@0.5.37_react@19.2.3/node_modules/bippy/dist/rdt-hook.js
|
|
234
|
+
/**
|
|
235
|
+
* @license bippy
|
|
236
|
+
*
|
|
237
|
+
* Copyright (c) Aiden Bai
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the MIT license found in the
|
|
240
|
+
* LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/
|
|
242
|
+
const e = `0.5.37`, t = `bippy-${e}`, n = Object.defineProperty, r = Object.prototype.hasOwnProperty, i$1 = () => {}, a$1 = (e) => {
|
|
243
|
+
try {
|
|
244
|
+
Function.prototype.toString.call(e).indexOf(`^_^`) > -1 && setTimeout(() => {
|
|
245
|
+
throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build`);
|
|
246
|
+
});
|
|
247
|
+
} catch {}
|
|
248
|
+
}, o$1 = (e = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__) => !!(e && `getFiberRoots` in e);
|
|
249
|
+
let s$1 = !1, c$1;
|
|
250
|
+
const l$1 = (e = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__) => s$1 ? !0 : (e && typeof e.inject == `function` && (c$1 = e.inject.toString()), !!c$1?.includes(`(injected)`)), u$1 = /* @__PURE__ */ new Set(), d$2 = /* @__PURE__ */ new Set(), f$2 = (e) => {
|
|
251
|
+
let r = /* @__PURE__ */ new Map(), o = 0, s = {
|
|
252
|
+
_instrumentationIsActive: !1,
|
|
253
|
+
_instrumentationSource: t,
|
|
254
|
+
checkDCE: a$1,
|
|
255
|
+
hasUnsupportedRendererAttached: !1,
|
|
256
|
+
inject(e) {
|
|
257
|
+
let t = ++o;
|
|
258
|
+
return r.set(t, e), d$2.add(e), s._instrumentationIsActive || (s._instrumentationIsActive = !0, u$1.forEach((e) => e())), t;
|
|
259
|
+
},
|
|
260
|
+
on: i$1,
|
|
261
|
+
onCommitFiberRoot: i$1,
|
|
262
|
+
onCommitFiberUnmount: i$1,
|
|
263
|
+
onPostCommitFiberRoot: i$1,
|
|
264
|
+
renderers: r,
|
|
265
|
+
supportsFiber: !0,
|
|
266
|
+
supportsFlight: !0
|
|
267
|
+
};
|
|
268
|
+
try {
|
|
269
|
+
n(globalThis, `__REACT_DEVTOOLS_GLOBAL_HOOK__`, {
|
|
270
|
+
configurable: !0,
|
|
271
|
+
enumerable: !0,
|
|
272
|
+
get() {
|
|
273
|
+
return s;
|
|
274
|
+
},
|
|
275
|
+
set(t) {
|
|
276
|
+
if (t && typeof t == `object`) {
|
|
277
|
+
let n = s.renderers;
|
|
278
|
+
s = t, n.size > 0 && (n.forEach((e, n) => {
|
|
279
|
+
d$2.add(e), t.renderers.set(n, e);
|
|
280
|
+
}), p$2(e));
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
let t = window.hasOwnProperty, r = !1;
|
|
285
|
+
n(window, `hasOwnProperty`, {
|
|
286
|
+
configurable: !0,
|
|
287
|
+
value: function(...e) {
|
|
288
|
+
try {
|
|
289
|
+
if (!r && e[0] === `__REACT_DEVTOOLS_GLOBAL_HOOK__`) return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__ = void 0, r = !0, -0;
|
|
290
|
+
} catch {}
|
|
291
|
+
return t.apply(this, e);
|
|
292
|
+
},
|
|
293
|
+
writable: !0
|
|
294
|
+
});
|
|
295
|
+
} catch {
|
|
296
|
+
p$2(e);
|
|
297
|
+
}
|
|
298
|
+
return s;
|
|
299
|
+
}, p$2 = (e) => {
|
|
300
|
+
e && u$1.add(e);
|
|
301
|
+
try {
|
|
302
|
+
let n = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
303
|
+
if (!n) return;
|
|
304
|
+
if (!n._instrumentationSource) {
|
|
305
|
+
n.checkDCE = a$1, n.supportsFiber = !0, n.supportsFlight = !0, n.hasUnsupportedRendererAttached = !1, n._instrumentationSource = t, n._instrumentationIsActive = !1;
|
|
306
|
+
let e = o$1(n);
|
|
307
|
+
if (e || (n.on = i$1), n.renderers.size) {
|
|
308
|
+
n._instrumentationIsActive = !0, u$1.forEach((e) => e());
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
let r = n.inject, c = l$1(n);
|
|
312
|
+
c && !e && (s$1 = !0, n.inject({ scheduleRefresh() {} }) && (n._instrumentationIsActive = !0)), n.inject = (e) => {
|
|
313
|
+
let t = r(e);
|
|
314
|
+
return d$2.add(e), c && n.renderers.set(t, e), n._instrumentationIsActive = !0, u$1.forEach((e) => e()), t;
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
(n.renderers.size || n._instrumentationIsActive || l$1()) && e?.();
|
|
318
|
+
} catch {}
|
|
319
|
+
}, m$2 = () => r.call(globalThis, `__REACT_DEVTOOLS_GLOBAL_HOOK__`), h$2 = (e) => m$2() ? (p$2(e), globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__) : f$2(e), g$2 = () => !!(typeof window < `u` && (window.document?.createElement || window.navigator?.product === `ReactNative`)), _$2 = () => {
|
|
320
|
+
try {
|
|
321
|
+
g$2() && h$2();
|
|
322
|
+
} catch {}
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region ../../node_modules/.pnpm/bippy@0.5.37_react@19.2.3/node_modules/bippy/dist/core.js
|
|
327
|
+
/**
|
|
328
|
+
* @license bippy
|
|
329
|
+
*
|
|
330
|
+
* Copyright (c) Aiden Bai
|
|
331
|
+
*
|
|
332
|
+
* This source code is licensed under the MIT license found in the
|
|
333
|
+
* LICENSE file in the root directory of this source tree.
|
|
334
|
+
*/
|
|
335
|
+
const d$1 = 0, ee$1 = 1, te$1 = 3, ne$1 = 5, re$1 = 6, ie$1 = 7, f$1 = 9, p$1 = 11, m$1 = 13, h$1 = 14, g$1 = 15, ae$1 = 16, oe$1 = 18, se$1 = 19, ce$1 = 22, le$1 = 23, ue$1 = 26, de$1 = 27, fe$1 = 28, pe$1 = 30, _$1 = 60111, me$1 = `Symbol(react.element)`, he$1 = `Symbol(react.transitional.element)`, v$1 = `Symbol(react.concurrent_mode)`, y$1 = `Symbol(react.async_mode)`, b$1 = 13366, ge$1 = (e) => typeof e == `object` && !!e && `$$typeof` in e && [`Symbol(react.element)`, `Symbol(react.transitional.element)`].includes(String(e.$$typeof)), _e$1 = (e) => typeof e == `object` && !!e && `tag` in e && `stateNode` in e && `return` in e && `child` in e && `sibling` in e && `flags` in e, x$1 = (e) => {
|
|
336
|
+
switch (e.tag) {
|
|
337
|
+
case 5:
|
|
338
|
+
case 26:
|
|
339
|
+
case 27: return !0;
|
|
340
|
+
default: return typeof e.type == `string`;
|
|
341
|
+
}
|
|
342
|
+
}, ve$1 = (e) => {
|
|
343
|
+
switch (e.tag) {
|
|
344
|
+
case 1:
|
|
345
|
+
case 11:
|
|
346
|
+
case 0:
|
|
347
|
+
case 14:
|
|
348
|
+
case 15: return !0;
|
|
349
|
+
default: return !1;
|
|
350
|
+
}
|
|
351
|
+
}, ye$1 = (e) => !e || typeof e != `object` ? !1 : `pendingProps` in e && !(`containerInfo` in e), be$1 = (e, t) => e === t || e.alternate === t || t.alternate === e, xe$1 = (e, t) => {
|
|
352
|
+
try {
|
|
353
|
+
let n = e.dependencies, r = e.alternate?.dependencies;
|
|
354
|
+
if (!n || !r || typeof n != `object` || !(`firstContext` in n) || typeof r != `object` || !(`firstContext` in r)) return !1;
|
|
355
|
+
let i = n.firstContext, a = r.firstContext;
|
|
356
|
+
for (; i && typeof i == `object` && `memoizedValue` in i || a && typeof a == `object` && `memoizedValue` in a;) {
|
|
357
|
+
if (t(i, a) === !0) return !0;
|
|
358
|
+
i = i?.next, a = a?.next;
|
|
359
|
+
}
|
|
360
|
+
} catch {}
|
|
361
|
+
return !1;
|
|
362
|
+
}, S$1 = (e, t) => {
|
|
363
|
+
try {
|
|
364
|
+
let n = e.memoizedState, r = e.alternate?.memoizedState;
|
|
365
|
+
for (; n || r;) {
|
|
366
|
+
if (t(n, r) === !0) return !0;
|
|
367
|
+
n = n?.next, r = r?.next;
|
|
368
|
+
}
|
|
369
|
+
} catch {}
|
|
370
|
+
return !1;
|
|
371
|
+
}, C$1 = (e, t) => {
|
|
372
|
+
try {
|
|
373
|
+
let n = e.memoizedProps, r = e.alternate?.memoizedProps || {}, i = new Set([...Object.keys(n), ...Object.keys(r)]);
|
|
374
|
+
for (let e of i) {
|
|
375
|
+
let i = r?.[e], a = n?.[e];
|
|
376
|
+
if (t(e, a, i) === !0) return !0;
|
|
377
|
+
}
|
|
378
|
+
} catch {}
|
|
379
|
+
return !1;
|
|
380
|
+
}, w$1 = (e) => {
|
|
381
|
+
let t = e.memoizedProps, n = e.alternate?.memoizedProps || {}, r = e.flags ?? e.effectTag ?? 0;
|
|
382
|
+
switch (e.tag) {
|
|
383
|
+
case 1:
|
|
384
|
+
case 9:
|
|
385
|
+
case 11:
|
|
386
|
+
case 0:
|
|
387
|
+
case 14:
|
|
388
|
+
case 15: return (r & 1) == 1;
|
|
389
|
+
default: return e.alternate ? n !== t || e.alternate.memoizedState !== e.memoizedState || e.alternate.ref !== e.ref : !0;
|
|
390
|
+
}
|
|
391
|
+
}, T$1 = (e) => !!(e.flags & (b$1 | 8) || e.subtreeFlags & (b$1 | 8)), E$1 = (e) => {
|
|
392
|
+
let t = [], n = [e];
|
|
393
|
+
for (; n.length;) {
|
|
394
|
+
let e = n.pop();
|
|
395
|
+
e && (x$1(e) && T$1(e) && w$1(e) && t.push(e), e.child && n.push(e.child), e.sibling && n.push(e.sibling));
|
|
396
|
+
}
|
|
397
|
+
return t;
|
|
398
|
+
}, D$1 = (e) => {
|
|
399
|
+
let t = [], n = e;
|
|
400
|
+
for (; n.return;) t.push(n), n = n.return;
|
|
401
|
+
return t;
|
|
402
|
+
}, O$1 = (e) => {
|
|
403
|
+
switch (e.tag) {
|
|
404
|
+
case 18: return !0;
|
|
405
|
+
case 7:
|
|
406
|
+
case 6:
|
|
407
|
+
case 23:
|
|
408
|
+
case 22: return !0;
|
|
409
|
+
case 3: return !1;
|
|
410
|
+
default: {
|
|
411
|
+
let t = typeof e.type == `object` && e.type !== null ? e.type.$$typeof : e.type;
|
|
412
|
+
switch (typeof t == `symbol` ? t.toString() : t) {
|
|
413
|
+
case _$1:
|
|
414
|
+
case v$1:
|
|
415
|
+
case y$1: return !0;
|
|
416
|
+
default: return !1;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}, k$1 = (e, t = !1) => {
|
|
421
|
+
let n = j$1(e, x$1, t);
|
|
422
|
+
return n ||= j$1(e, x$1, !t), n;
|
|
423
|
+
}, A$1 = (e) => {
|
|
424
|
+
let t = [], n = [];
|
|
425
|
+
for (x$1(e) ? t.push(e) : e.child && n.push(e.child); n.length;) {
|
|
426
|
+
let e = n.pop();
|
|
427
|
+
if (!e) break;
|
|
428
|
+
x$1(e) ? t.push(e) : e.child && n.push(e.child), e.sibling && n.push(e.sibling);
|
|
429
|
+
}
|
|
430
|
+
return t;
|
|
431
|
+
};
|
|
432
|
+
function j$1(e, t, n = !1) {
|
|
433
|
+
if (!e) return null;
|
|
434
|
+
let r = t(e);
|
|
435
|
+
if (r instanceof Promise) return (async () => {
|
|
436
|
+
if (await r === !0) return e;
|
|
437
|
+
let i = n ? e.return : e.child;
|
|
438
|
+
for (; i;) {
|
|
439
|
+
let e = await N$1(i, t, n);
|
|
440
|
+
if (e) return e;
|
|
441
|
+
i = n ? null : i.sibling;
|
|
442
|
+
}
|
|
443
|
+
return null;
|
|
444
|
+
})();
|
|
445
|
+
if (r === !0) return e;
|
|
446
|
+
let i = n ? e.return : e.child;
|
|
447
|
+
for (; i;) {
|
|
448
|
+
let e = M$1(i, t, n);
|
|
449
|
+
if (e) return e;
|
|
450
|
+
i = n ? null : i.sibling;
|
|
451
|
+
}
|
|
452
|
+
return null;
|
|
453
|
+
}
|
|
454
|
+
const M$1 = (e, t, n = !1) => {
|
|
455
|
+
if (!e) return null;
|
|
456
|
+
if (t(e) === !0) return e;
|
|
457
|
+
let r = n ? e.return : e.child;
|
|
458
|
+
for (; r;) {
|
|
459
|
+
let e = M$1(r, t, n);
|
|
460
|
+
if (e) return e;
|
|
461
|
+
r = n ? null : r.sibling;
|
|
462
|
+
}
|
|
463
|
+
return null;
|
|
464
|
+
}, N$1 = async (e, t, n = !1) => {
|
|
465
|
+
if (!e) return null;
|
|
466
|
+
if (await t(e) === !0) return e;
|
|
467
|
+
let r = n ? e.return : e.child;
|
|
468
|
+
for (; r;) {
|
|
469
|
+
let e = await N$1(r, t, n);
|
|
470
|
+
if (e) return e;
|
|
471
|
+
r = n ? null : r.sibling;
|
|
472
|
+
}
|
|
473
|
+
return null;
|
|
474
|
+
}, Se = (e) => {
|
|
475
|
+
let t = e?.actualDuration ?? 0, n = t, r = e?.child ?? null;
|
|
476
|
+
for (; t > 0 && r != null;) n -= r.actualDuration ?? 0, r = r.sibling;
|
|
477
|
+
return {
|
|
478
|
+
selfTime: n,
|
|
479
|
+
totalTime: t
|
|
480
|
+
};
|
|
481
|
+
}, Ce = (e) => !!e.updateQueue?.memoCache, P$1 = (e) => {
|
|
482
|
+
let t = e;
|
|
483
|
+
return typeof t == `function` ? t : typeof t == `object` && t ? P$1(t.type || t.render) : null;
|
|
484
|
+
}, we = (e) => {
|
|
485
|
+
let t = e;
|
|
486
|
+
if (typeof t == `string`) return t;
|
|
487
|
+
if (typeof t != `function` && !(typeof t == `object` && t)) return null;
|
|
488
|
+
let n = t.displayName || t.name || null;
|
|
489
|
+
if (n) return n;
|
|
490
|
+
let r = P$1(t);
|
|
491
|
+
return r && (r.displayName || r.name) || null;
|
|
492
|
+
}, F$1 = (e) => {
|
|
493
|
+
try {
|
|
494
|
+
if (typeof e.version == `string` && e.bundleType > 0) return `development`;
|
|
495
|
+
} catch {}
|
|
496
|
+
return `production`;
|
|
497
|
+
}, Te = () => {
|
|
498
|
+
let e = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
499
|
+
return !!e?._instrumentationIsActive || o$1(e) || l$1(e);
|
|
500
|
+
}, Ee = (e) => {
|
|
501
|
+
let t = e.alternate;
|
|
502
|
+
if (!t) return e;
|
|
503
|
+
if (t.actualStartTime && e.actualStartTime) return t.actualStartTime > e.actualStartTime ? t : e;
|
|
504
|
+
for (let t of $$1) {
|
|
505
|
+
let n = j$1(t.current, (t) => {
|
|
506
|
+
if (t === e) return !0;
|
|
507
|
+
});
|
|
508
|
+
if (n) return n;
|
|
509
|
+
}
|
|
510
|
+
return e;
|
|
511
|
+
};
|
|
512
|
+
let G$1 = null, K$1 = null, q$1 = null;
|
|
513
|
+
const J$1 = () => {
|
|
514
|
+
if (!m$2()) return null;
|
|
515
|
+
let e = h$2();
|
|
516
|
+
if (!e?.renderers) return null;
|
|
517
|
+
if (G$1 || K$1 || q$1) return {
|
|
518
|
+
overrideContext: q$1,
|
|
519
|
+
overrideHookState: K$1,
|
|
520
|
+
overrideProps: G$1
|
|
521
|
+
};
|
|
522
|
+
for (let [, t] of Array.from(e.renderers)) try {
|
|
523
|
+
if (K$1) {
|
|
524
|
+
let e = K$1;
|
|
525
|
+
K$1 = (n, r, i, a) => {
|
|
526
|
+
let o = n.memoizedState;
|
|
527
|
+
for (let e = 0; e < Number(r) && o?.next; e++) o = o.next;
|
|
528
|
+
if (o?.queue) {
|
|
529
|
+
let e = o.queue;
|
|
530
|
+
if (Y$1(e) && `dispatch` in e) {
|
|
531
|
+
let t = e.dispatch;
|
|
532
|
+
t(a);
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
e(n, r, i, a), t.overrideHookState?.(n, r, i, a);
|
|
537
|
+
};
|
|
538
|
+
} else t.overrideHookState && (K$1 = t.overrideHookState);
|
|
539
|
+
if (G$1) {
|
|
540
|
+
let e = G$1;
|
|
541
|
+
G$1 = (n, r, i) => {
|
|
542
|
+
e(n, r, i), t.overrideProps?.(n, r, i);
|
|
543
|
+
};
|
|
544
|
+
} else t.overrideProps && (G$1 = t.overrideProps);
|
|
545
|
+
q$1 = (e, t, n, r) => {
|
|
546
|
+
let i = e;
|
|
547
|
+
for (; i;) {
|
|
548
|
+
let e = i.type;
|
|
549
|
+
if (e === t || e?.Provider === t) {
|
|
550
|
+
G$1 && (G$1(i, [`value`, ...n], r), i.alternate && G$1(i.alternate, [`value`, ...n], r));
|
|
551
|
+
break;
|
|
552
|
+
}
|
|
553
|
+
i = i.return;
|
|
554
|
+
}
|
|
555
|
+
};
|
|
556
|
+
} catch {}
|
|
557
|
+
}, Y$1 = (e) => Object.prototype.toString.call(e) === `[object Object]` && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null), X$1 = (e, t = []) => {
|
|
558
|
+
if (!Y$1(e)) return [{
|
|
559
|
+
path: t,
|
|
560
|
+
value: e
|
|
561
|
+
}];
|
|
562
|
+
let n = [];
|
|
563
|
+
for (let r in e) {
|
|
564
|
+
let i = e[r], a = t.concat(r);
|
|
565
|
+
Y$1(i) ? n.push(...X$1(i, a)) : n.push({
|
|
566
|
+
path: a,
|
|
567
|
+
value: i
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
return n;
|
|
571
|
+
}, ke = (e, t) => {
|
|
572
|
+
J$1();
|
|
573
|
+
let n = X$1(t);
|
|
574
|
+
for (let { path: t, value: r } of n) try {
|
|
575
|
+
G$1?.(e, t, r);
|
|
576
|
+
} catch {}
|
|
577
|
+
}, Ae = (e, t, n) => {
|
|
578
|
+
J$1();
|
|
579
|
+
let r = String(t);
|
|
580
|
+
if (Y$1(n)) {
|
|
581
|
+
let t = X$1(n);
|
|
582
|
+
for (let { path: n, value: i } of t) try {
|
|
583
|
+
K$1?.(e, r, n, i);
|
|
584
|
+
} catch {}
|
|
585
|
+
} else try {
|
|
586
|
+
K$1?.(e, r, [], n);
|
|
587
|
+
} catch {}
|
|
588
|
+
}, je = (e, t, n) => {
|
|
589
|
+
if (J$1(), Y$1(n)) {
|
|
590
|
+
let r = X$1(n);
|
|
591
|
+
for (let { path: n, value: i } of r) try {
|
|
592
|
+
q$1?.(e, t, n, i);
|
|
593
|
+
} catch {}
|
|
594
|
+
} else try {
|
|
595
|
+
q$1?.(e, t, [], n);
|
|
596
|
+
} catch {}
|
|
597
|
+
}, Me = (e) => {
|
|
598
|
+
let t$1 = h$2(e.onActive);
|
|
599
|
+
t$1._instrumentationSource = e.name ?? t;
|
|
600
|
+
let n = t$1.onCommitFiberRoot;
|
|
601
|
+
if (e.onCommitFiberRoot) {
|
|
602
|
+
let r = (t, i, a) => {
|
|
603
|
+
n !== r && (n?.(t, i, a), e.onCommitFiberRoot?.(t, i, a));
|
|
604
|
+
};
|
|
605
|
+
t$1.onCommitFiberRoot = r;
|
|
606
|
+
}
|
|
607
|
+
let r = t$1.onCommitFiberUnmount;
|
|
608
|
+
if (e.onCommitFiberUnmount) {
|
|
609
|
+
let n = (i, a) => {
|
|
610
|
+
t$1.onCommitFiberUnmount === n && (r?.(i, a), e.onCommitFiberUnmount?.(i, a));
|
|
611
|
+
};
|
|
612
|
+
t$1.onCommitFiberUnmount = n;
|
|
613
|
+
}
|
|
614
|
+
let i = t$1.onPostCommitFiberRoot;
|
|
615
|
+
if (e.onPostCommitFiberRoot) {
|
|
616
|
+
let n = (r, a) => {
|
|
617
|
+
t$1.onPostCommitFiberRoot === n && (i?.(r, a), e.onPostCommitFiberRoot?.(r, a));
|
|
618
|
+
};
|
|
619
|
+
t$1.onPostCommitFiberRoot = n;
|
|
620
|
+
}
|
|
621
|
+
return t$1;
|
|
622
|
+
}, Z$1 = (e) => {
|
|
623
|
+
let t = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
624
|
+
if (t?.renderers) for (let n of t.renderers.values()) try {
|
|
625
|
+
let t = n.findFiberByHostInstance?.(e);
|
|
626
|
+
if (t) return t;
|
|
627
|
+
} catch {}
|
|
628
|
+
if (typeof e == `object` && e) {
|
|
629
|
+
if (`_reactRootContainer` in e) return e._reactRootContainer?._internalRoot?.current?.child;
|
|
630
|
+
for (let t in e) if (t.startsWith(`__reactContainer$`) || t.startsWith(`__reactInternalInstance$`) || t.startsWith(`__reactFiber`)) return e[t] || null;
|
|
631
|
+
}
|
|
632
|
+
return null;
|
|
633
|
+
}, Q$1 = Error(), $$1 = /* @__PURE__ */ new Set(), Ne = (e, n = {}) => {
|
|
634
|
+
let i = e.onActive, a = m$2(), o = o$1(), l = l$1(), u, d = !n.isProduction;
|
|
635
|
+
return e.onActive = () => {
|
|
636
|
+
clearTimeout(u);
|
|
637
|
+
let t = !0;
|
|
638
|
+
try {
|
|
639
|
+
let e = h$2();
|
|
640
|
+
for (let r of e.renderers.values()) {
|
|
641
|
+
let [e] = r.version.split(`.`);
|
|
642
|
+
Number(e) < (n.minReactMajorVersion ?? 17) && (t = !1), F$1(r) === `development` ? d = !0 : n.dangerouslyRunInProduction || (t = !1);
|
|
643
|
+
}
|
|
644
|
+
} catch (e) {
|
|
645
|
+
n.onError?.(e);
|
|
646
|
+
}
|
|
647
|
+
if (!t) {
|
|
648
|
+
e.onCommitFiberRoot = void 0, e.onCommitFiberUnmount = void 0, e.onPostCommitFiberRoot = void 0, e.onActive = void 0;
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
i?.();
|
|
652
|
+
try {
|
|
653
|
+
let t = e.onCommitFiberRoot;
|
|
654
|
+
t && (e.onCommitFiberRoot = (e, r, i) => {
|
|
655
|
+
$$1.has(r) || $$1.add(r);
|
|
656
|
+
try {
|
|
657
|
+
t(e, r, i);
|
|
658
|
+
} catch (e) {
|
|
659
|
+
n.onError?.(e);
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
let r = e.onCommitFiberUnmount;
|
|
663
|
+
r && (e.onCommitFiberUnmount = (e, t) => {
|
|
664
|
+
try {
|
|
665
|
+
r(e, t);
|
|
666
|
+
} catch (e) {
|
|
667
|
+
n.onError?.(e);
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
let i = e.onPostCommitFiberRoot;
|
|
671
|
+
i && (e.onPostCommitFiberRoot = (e, t) => {
|
|
672
|
+
try {
|
|
673
|
+
i(e, t);
|
|
674
|
+
} catch (e) {
|
|
675
|
+
n.onError?.(e);
|
|
676
|
+
}
|
|
677
|
+
});
|
|
678
|
+
} catch (e) {
|
|
679
|
+
n.onError?.(e);
|
|
680
|
+
}
|
|
681
|
+
}, !a && !o && !l && (u = setTimeout(() => {
|
|
682
|
+
d && n.onError?.(Q$1), stop();
|
|
683
|
+
}, n.installCheckTimeout ?? 100)), e;
|
|
684
|
+
};
|
|
685
|
+
|
|
686
|
+
//#endregion
|
|
687
|
+
//#region ../../node_modules/.pnpm/bippy@0.5.37_react@19.2.3/node_modules/bippy/dist/source.js
|
|
688
|
+
/**
|
|
689
|
+
* @license bippy
|
|
690
|
+
*
|
|
691
|
+
* Copyright (c) Aiden Bai
|
|
692
|
+
*
|
|
693
|
+
* This source code is licensed under the MIT license found in the
|
|
694
|
+
* LICENSE file in the root directory of this source tree.
|
|
695
|
+
*/
|
|
696
|
+
const i = /^[a-zA-Z][a-zA-Z\d+\-.]*:/, a = [
|
|
697
|
+
`rsc://`,
|
|
698
|
+
`file:///`,
|
|
699
|
+
`webpack://`,
|
|
700
|
+
`webpack-internal://`,
|
|
701
|
+
`node:`,
|
|
702
|
+
`turbopack://`,
|
|
703
|
+
`metro://`,
|
|
704
|
+
`/app-pages-browser/`,
|
|
705
|
+
`/(app-pages-browser)/`
|
|
706
|
+
], o = [
|
|
707
|
+
`<anonymous>`,
|
|
708
|
+
`eval`,
|
|
709
|
+
``
|
|
710
|
+
], s = /\.(jsx|tsx|ts|js)$/, c = /(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i, l = /^\?[\w~.-]+(?:=[^&#]*)?(?:&[\w~.-]+(?:=[^&#]*)?)*$/, u = /(^|@)\S+:\d+/, d = /^\s*at .*(\S+:\d+|\(native\))/m, f = /^(eval@)?(\[native code\])?$/, p = (e) => {
|
|
711
|
+
if (e && typeof e == `object`) {
|
|
712
|
+
let t = e.stacktrace;
|
|
713
|
+
return typeof t == `string` ? t : null;
|
|
714
|
+
}
|
|
715
|
+
return null;
|
|
716
|
+
}, m = (e, t) => {
|
|
717
|
+
if (t?.includeInElement !== !1) {
|
|
718
|
+
let n = e.split(`
|
|
719
|
+
`), r = [];
|
|
720
|
+
for (let e of n) if (/^\s*at\s+/.test(e)) {
|
|
721
|
+
let t = v(e, void 0)[0];
|
|
722
|
+
t && r.push(t);
|
|
723
|
+
} else if (/^\s*in\s+/.test(e)) {
|
|
724
|
+
let t = e.replace(/^\s*in\s+/, ``).replace(/\s*\(at .*\)$/, ``);
|
|
725
|
+
r.push({
|
|
726
|
+
functionName: t,
|
|
727
|
+
source: e
|
|
728
|
+
});
|
|
729
|
+
} else if (e.match(u)) {
|
|
730
|
+
let t = y(e, void 0)[0];
|
|
731
|
+
t && r.push(t);
|
|
732
|
+
}
|
|
733
|
+
return g(r, t);
|
|
734
|
+
}
|
|
735
|
+
return e.match(d) ? v(e, t) : y(e, t);
|
|
736
|
+
}, h = (e) => {
|
|
737
|
+
if (!e.includes(`:`)) return [
|
|
738
|
+
e,
|
|
739
|
+
void 0,
|
|
740
|
+
void 0
|
|
741
|
+
];
|
|
742
|
+
let t = e.startsWith(`(`) && /:\d+\)$/.test(e) ? e.slice(1, -1) : e, n = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t);
|
|
743
|
+
return n ? [
|
|
744
|
+
n[1],
|
|
745
|
+
n[2] || void 0,
|
|
746
|
+
n[3] || void 0
|
|
747
|
+
] : [
|
|
748
|
+
t,
|
|
749
|
+
void 0,
|
|
750
|
+
void 0
|
|
751
|
+
];
|
|
752
|
+
}, g = (e, t) => t && t.slice != null ? Array.isArray(t.slice) ? e.slice(t.slice[0], t.slice[1]) : e.slice(0, t.slice) : e, _ = (e, t) => v(e.stack, t), v = (e, t) => g(e.split(`
|
|
753
|
+
`).filter((e) => !!e.match(d)), t).map((e) => {
|
|
754
|
+
let t = e;
|
|
755
|
+
t.includes(`(eval `) && (t = t.replace(/eval code/g, `eval`).replace(/(\(eval at [^()]*)|(,.*$)/g, ``));
|
|
756
|
+
let n = t.replace(/^\s+/, ``).replace(/\(eval code/g, `(`).replace(/^.*?\s+/, ``), r = n.match(/ (\(.+\)$)/);
|
|
757
|
+
n = r ? n.replace(r[0], ``) : n;
|
|
758
|
+
let i = h(r ? r[1] : n);
|
|
759
|
+
return {
|
|
760
|
+
functionName: r && n || void 0,
|
|
761
|
+
fileName: [`eval`, `<anonymous>`].includes(i[0]) ? void 0 : i[0],
|
|
762
|
+
lineNumber: i[1] ? +i[1] : void 0,
|
|
763
|
+
columnNumber: i[2] ? +i[2] : void 0,
|
|
764
|
+
source: t
|
|
765
|
+
};
|
|
766
|
+
}), ee = (e, t) => y(e.stack, t), y = (e, t) => g(e.split(`
|
|
767
|
+
`).filter((e) => !e.match(f)), t).map((e) => {
|
|
768
|
+
let t = e;
|
|
769
|
+
if (t.includes(` > eval`) && (t = t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, `:$1`)), !t.includes(`@`) && !t.includes(`:`)) return { functionName: t };
|
|
770
|
+
{
|
|
771
|
+
let e = /(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/, n = t.match(e), r = n && n[1] ? n[1] : void 0, i = h(t.replace(e, ``));
|
|
772
|
+
return {
|
|
773
|
+
functionName: r,
|
|
774
|
+
fileName: i[0],
|
|
775
|
+
lineNumber: i[1] ? +i[1] : void 0,
|
|
776
|
+
columnNumber: i[2] ? +i[2] : void 0,
|
|
777
|
+
source: t
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
}), te = (e, t) => {
|
|
781
|
+
let n = p(e);
|
|
782
|
+
return !n || e.message.includes(`
|
|
783
|
+
`) && e.message.split(`
|
|
784
|
+
`).length > n.split(`
|
|
785
|
+
`).length ? b(e, t) : e.stack ? S(e, t) : x(e, t);
|
|
786
|
+
}, b = (e, t) => {
|
|
787
|
+
let n = /Line (\d+).*script (?:in )?(\S+)/i, r = e.message.split(`
|
|
788
|
+
`), i = [];
|
|
789
|
+
for (let e = 2, t = r.length; e < t; e += 2) {
|
|
790
|
+
let t = n.exec(r[e]);
|
|
791
|
+
t && i.push({
|
|
792
|
+
fileName: t[2],
|
|
793
|
+
lineNumber: +t[1],
|
|
794
|
+
source: r[e]
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
return g(i, t);
|
|
798
|
+
}, x = (e, t) => {
|
|
799
|
+
let n = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, r = (p(e) || ``).split(`
|
|
800
|
+
`), i = [];
|
|
801
|
+
for (let e = 0, t = r.length; e < t; e += 2) {
|
|
802
|
+
let t = n.exec(r[e]);
|
|
803
|
+
t && i.push({
|
|
804
|
+
functionName: t[3] || void 0,
|
|
805
|
+
fileName: t[2],
|
|
806
|
+
lineNumber: t[1] ? +t[1] : void 0,
|
|
807
|
+
source: r[e]
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
return g(i, t);
|
|
811
|
+
}, S = (e, t) => g(e.stack.split(`
|
|
812
|
+
`).filter((e) => !!e.match(u) && !e.match(/^Error created at/)), t).map((e) => {
|
|
813
|
+
let t = e.split(`@`), n = h(t.pop()), r = t.shift() || ``, i = r.replace(/<anonymous function(: (\w+))?>/, `$2`).replace(/\([^)]*\)/g, ``) || void 0, a;
|
|
814
|
+
return r.match(/\(([^)]*)\)/) && (a = r.replace(/^[^(]+\(([^)]*)\)$/, `$1`)), {
|
|
815
|
+
functionName: i,
|
|
816
|
+
args: a === void 0 || a === `[arguments not available]` ? void 0 : a.split(`,`),
|
|
817
|
+
fileName: n[0],
|
|
818
|
+
lineNumber: n[1] ? +n[1] : void 0,
|
|
819
|
+
columnNumber: n[2] ? +n[2] : void 0,
|
|
820
|
+
source: e
|
|
821
|
+
};
|
|
822
|
+
});
|
|
823
|
+
var ne = 44, C = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`, re = new Uint8Array(64), w = new Uint8Array(128);
|
|
824
|
+
for (let e = 0; e < C.length; e++) {
|
|
825
|
+
let t = C.charCodeAt(e);
|
|
826
|
+
re[e] = t, w[t] = e;
|
|
827
|
+
}
|
|
828
|
+
function T(e, t) {
|
|
829
|
+
let n = 0, r = 0, i = 0;
|
|
830
|
+
do
|
|
831
|
+
i = w[e.next()], n |= (i & 31) << r, r += 5;
|
|
832
|
+
while (i & 32);
|
|
833
|
+
let a = n & 1;
|
|
834
|
+
return n >>>= 1, a && (n = -2147483648 | -n), t + n;
|
|
835
|
+
}
|
|
836
|
+
function E(e, t) {
|
|
837
|
+
return e.pos >= t ? !1 : e.peek() !== ne;
|
|
838
|
+
}
|
|
839
|
+
var D = class {
|
|
840
|
+
constructor(e) {
|
|
841
|
+
this.pos = 0, this.buffer = e;
|
|
842
|
+
}
|
|
843
|
+
next() {
|
|
844
|
+
return this.buffer.charCodeAt(this.pos++);
|
|
845
|
+
}
|
|
846
|
+
peek() {
|
|
847
|
+
return this.buffer.charCodeAt(this.pos);
|
|
848
|
+
}
|
|
849
|
+
indexOf(e) {
|
|
850
|
+
let { buffer: t, pos: n } = this, r = t.indexOf(e, n);
|
|
851
|
+
return r === -1 ? t.length : r;
|
|
852
|
+
}
|
|
853
|
+
};
|
|
854
|
+
function O(e) {
|
|
855
|
+
let { length: t } = e, n = new D(e), r = [], i = 0, a = 0, o = 0, s = 0, c = 0;
|
|
856
|
+
do {
|
|
857
|
+
let e = n.indexOf(`;`), t = [], l = !0, u = 0;
|
|
858
|
+
for (i = 0; n.pos < e;) {
|
|
859
|
+
let r;
|
|
860
|
+
i = T(n, i), i < u && (l = !1), u = i, E(n, e) ? (a = T(n, a), o = T(n, o), s = T(n, s), E(n, e) ? (c = T(n, c), r = [
|
|
861
|
+
i,
|
|
862
|
+
a,
|
|
863
|
+
o,
|
|
864
|
+
s,
|
|
865
|
+
c
|
|
866
|
+
]) : r = [
|
|
867
|
+
i,
|
|
868
|
+
a,
|
|
869
|
+
o,
|
|
870
|
+
s
|
|
871
|
+
]) : r = [i], t.push(r), n.pos++;
|
|
872
|
+
}
|
|
873
|
+
l || ie(t), r.push(t), n.pos = e + 1;
|
|
874
|
+
} while (n.pos <= t);
|
|
875
|
+
return r;
|
|
876
|
+
}
|
|
877
|
+
function ie(e) {
|
|
878
|
+
e.sort(ae);
|
|
879
|
+
}
|
|
880
|
+
function ae(e, t) {
|
|
881
|
+
return e[0] - t[0];
|
|
882
|
+
}
|
|
883
|
+
const k = /^[a-zA-Z][a-zA-Z\d+\-.]*:/, oe = /^data:application\/json[^,]+base64,/, se = /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/, A = typeof WeakRef < `u`, j = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), ce = (e) => A && e instanceof WeakRef, N = (e, t, n, r) => {
|
|
884
|
+
if (n < 0 || n >= e.length) return null;
|
|
885
|
+
let i = e[n];
|
|
886
|
+
if (!i || i.length === 0) return null;
|
|
887
|
+
let a = null;
|
|
888
|
+
for (let e of i) if (e[0] <= r) a = e;
|
|
889
|
+
else break;
|
|
890
|
+
if (!a || a.length < 4) return null;
|
|
891
|
+
let [, o, s, c] = a;
|
|
892
|
+
if (o === void 0 || s === void 0 || c === void 0) return null;
|
|
893
|
+
let l = t[o];
|
|
894
|
+
return l ? {
|
|
895
|
+
columnNumber: c,
|
|
896
|
+
fileName: l,
|
|
897
|
+
lineNumber: s + 1
|
|
898
|
+
} : null;
|
|
899
|
+
}, P = (e, t, n) => {
|
|
900
|
+
if (e.sections) {
|
|
901
|
+
let r = null;
|
|
902
|
+
for (let i of e.sections) if (t > i.offset.line || t === i.offset.line && n >= i.offset.column) r = i;
|
|
903
|
+
else break;
|
|
904
|
+
if (!r) return null;
|
|
905
|
+
let i = t - r.offset.line, a = t === r.offset.line ? n - r.offset.column : n;
|
|
906
|
+
return N(r.map.mappings, r.map.sources, i, a);
|
|
907
|
+
}
|
|
908
|
+
return N(e.mappings, e.sources, t - 1, n);
|
|
909
|
+
}, le = (e, t) => {
|
|
910
|
+
let n = t.split(`
|
|
911
|
+
`), r;
|
|
912
|
+
for (let e = n.length - 1; e >= 0 && !r; e--) {
|
|
913
|
+
let t = n[e].match(se);
|
|
914
|
+
t && (r = t[1] || t[2]);
|
|
915
|
+
}
|
|
916
|
+
if (!r) return null;
|
|
917
|
+
let i = k.test(r);
|
|
918
|
+
if (!(oe.test(r) || i || r.startsWith(`/`))) {
|
|
919
|
+
let t = e.split(`/`);
|
|
920
|
+
t[t.length - 1] = r, r = t.join(`/`);
|
|
921
|
+
}
|
|
922
|
+
return r;
|
|
923
|
+
}, F = (e) => ({
|
|
924
|
+
file: e.file,
|
|
925
|
+
mappings: O(e.mappings),
|
|
926
|
+
names: e.names,
|
|
927
|
+
sourceRoot: e.sourceRoot,
|
|
928
|
+
sources: e.sources,
|
|
929
|
+
sourcesContent: e.sourcesContent,
|
|
930
|
+
version: 3
|
|
931
|
+
}), ue = (e) => {
|
|
932
|
+
let t = e.sections.map(({ map: e, offset: t }) => ({
|
|
933
|
+
map: {
|
|
934
|
+
...e,
|
|
935
|
+
mappings: O(e.mappings)
|
|
936
|
+
},
|
|
937
|
+
offset: t
|
|
938
|
+
})), n = /* @__PURE__ */ new Set();
|
|
939
|
+
for (let e of t) for (let t of e.map.sources) n.add(t);
|
|
940
|
+
return {
|
|
941
|
+
file: e.file,
|
|
942
|
+
mappings: [],
|
|
943
|
+
names: [],
|
|
944
|
+
sections: t,
|
|
945
|
+
sourceRoot: void 0,
|
|
946
|
+
sources: Array.from(n),
|
|
947
|
+
sourcesContent: void 0,
|
|
948
|
+
version: 3
|
|
949
|
+
};
|
|
950
|
+
}, I = (e) => {
|
|
951
|
+
if (!e) return !1;
|
|
952
|
+
let t = e.trim();
|
|
953
|
+
if (!t) return !1;
|
|
954
|
+
let n = t.match(k);
|
|
955
|
+
if (!n) return !0;
|
|
956
|
+
let r = n[0].toLowerCase();
|
|
957
|
+
return r === `http:` || r === `https:`;
|
|
958
|
+
}, L = async (e, t = fetch) => {
|
|
959
|
+
if (!I(e)) return null;
|
|
960
|
+
let n;
|
|
961
|
+
try {
|
|
962
|
+
let r = await t(e);
|
|
963
|
+
if (!r.ok) return null;
|
|
964
|
+
n = await r.text();
|
|
965
|
+
} catch {
|
|
966
|
+
return null;
|
|
967
|
+
}
|
|
968
|
+
if (!n) return null;
|
|
969
|
+
let r = le(e, n);
|
|
970
|
+
if (!r || !I(r)) return null;
|
|
971
|
+
try {
|
|
972
|
+
let e = await t(r);
|
|
973
|
+
if (!e.ok) return null;
|
|
974
|
+
let n = await e.json();
|
|
975
|
+
return `sections` in n ? ue(n) : F(n);
|
|
976
|
+
} catch {
|
|
977
|
+
return null;
|
|
978
|
+
}
|
|
979
|
+
}, R = async (e, t = !0, n) => {
|
|
980
|
+
if (t && j.has(e)) {
|
|
981
|
+
let t = j.get(e);
|
|
982
|
+
if (t == null) return null;
|
|
983
|
+
if (ce(t)) {
|
|
984
|
+
let n = t.deref();
|
|
985
|
+
if (n) return n;
|
|
986
|
+
j.delete(e);
|
|
987
|
+
} else return t;
|
|
988
|
+
}
|
|
989
|
+
if (t && M.has(e)) return M.get(e);
|
|
990
|
+
let r = L(e, n);
|
|
991
|
+
t && M.set(e, r);
|
|
992
|
+
let i = await r;
|
|
993
|
+
return t && M.delete(e), t && (i === null ? j.set(e, null) : j.set(e, A ? new WeakRef(i) : i)), i;
|
|
994
|
+
}, z = async (e, t = !0, n) => await Promise.all(e.map(async (e) => {
|
|
995
|
+
if (!e.fileName) return e;
|
|
996
|
+
let r = await R(e.fileName, t, n);
|
|
997
|
+
if (!r || typeof e.lineNumber != `number` || typeof e.columnNumber != `number`) return e;
|
|
998
|
+
let i = P(r, e.lineNumber, e.columnNumber);
|
|
999
|
+
return i ? {
|
|
1000
|
+
...e,
|
|
1001
|
+
source: i.fileName && e.source ? e.source.replace(e.fileName, i.fileName) : e.source,
|
|
1002
|
+
fileName: i.fileName,
|
|
1003
|
+
lineNumber: i.lineNumber,
|
|
1004
|
+
columnNumber: i.columnNumber,
|
|
1005
|
+
isSymbolicated: !0
|
|
1006
|
+
} : e;
|
|
1007
|
+
})), B = (e) => e._debugStack instanceof Error && typeof e._debugStack?.stack == `string`, V = () => {
|
|
1008
|
+
let n = h$2();
|
|
1009
|
+
for (let t of [...Array.from(d$2), ...Array.from(n.renderers.values())]) {
|
|
1010
|
+
let e = t.currentDispatcherRef;
|
|
1011
|
+
if (e && typeof e == `object`) return `H` in e ? e.H : e.current;
|
|
1012
|
+
}
|
|
1013
|
+
return null;
|
|
1014
|
+
}, H = (t) => {
|
|
1015
|
+
for (let n of d$2) {
|
|
1016
|
+
let e = n.currentDispatcherRef;
|
|
1017
|
+
e && typeof e == `object` && (`H` in e ? e.H = t : e.current = t);
|
|
1018
|
+
}
|
|
1019
|
+
}, U = (e) => `\n in ${e}`, W = (e, t) => {
|
|
1020
|
+
let n = U(e);
|
|
1021
|
+
return t && (n += ` (at ${t})`), n;
|
|
1022
|
+
};
|
|
1023
|
+
let G = !1;
|
|
1024
|
+
const K = (e, t) => {
|
|
1025
|
+
if (!e || G) return ``;
|
|
1026
|
+
let r = Error.prepareStackTrace;
|
|
1027
|
+
Error.prepareStackTrace = void 0, G = !0;
|
|
1028
|
+
let i = V();
|
|
1029
|
+
H(null);
|
|
1030
|
+
let a = console.error, o = console.warn;
|
|
1031
|
+
console.error = () => {}, console.warn = () => {};
|
|
1032
|
+
try {
|
|
1033
|
+
let r = { DetermineComponentFrameRoot() {
|
|
1034
|
+
let n;
|
|
1035
|
+
try {
|
|
1036
|
+
if (t) {
|
|
1037
|
+
let t = function() {
|
|
1038
|
+
throw Error();
|
|
1039
|
+
};
|
|
1040
|
+
if (Object.defineProperty(t.prototype, `props`, { set: function() {
|
|
1041
|
+
throw Error();
|
|
1042
|
+
} }), typeof Reflect == `object` && Reflect.construct) {
|
|
1043
|
+
try {
|
|
1044
|
+
Reflect.construct(t, []);
|
|
1045
|
+
} catch (e) {
|
|
1046
|
+
n = e;
|
|
1047
|
+
}
|
|
1048
|
+
Reflect.construct(e, [], t);
|
|
1049
|
+
} else {
|
|
1050
|
+
try {
|
|
1051
|
+
t.call();
|
|
1052
|
+
} catch (e) {
|
|
1053
|
+
n = e;
|
|
1054
|
+
}
|
|
1055
|
+
e.call(t.prototype);
|
|
1056
|
+
}
|
|
1057
|
+
} else {
|
|
1058
|
+
try {
|
|
1059
|
+
throw Error();
|
|
1060
|
+
} catch (e) {
|
|
1061
|
+
n = e;
|
|
1062
|
+
}
|
|
1063
|
+
let t = e();
|
|
1064
|
+
t && typeof t.catch == `function` && t.catch(() => {});
|
|
1065
|
+
}
|
|
1066
|
+
} catch (e) {
|
|
1067
|
+
if (e instanceof Error && n instanceof Error && typeof e.stack == `string`) return [e.stack, n.stack];
|
|
1068
|
+
}
|
|
1069
|
+
return [null, null];
|
|
1070
|
+
} };
|
|
1071
|
+
r.DetermineComponentFrameRoot.displayName = `DetermineComponentFrameRoot`, Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot, `name`)?.configurable && Object.defineProperty(r.DetermineComponentFrameRoot, `name`, { value: `DetermineComponentFrameRoot` });
|
|
1072
|
+
let [i, a] = r.DetermineComponentFrameRoot();
|
|
1073
|
+
if (i && a) {
|
|
1074
|
+
let t = i.split(`
|
|
1075
|
+
`), r = a.split(`
|
|
1076
|
+
`), o = 0, s = 0;
|
|
1077
|
+
for (; o < t.length && !t[o].includes(`DetermineComponentFrameRoot`);) o++;
|
|
1078
|
+
for (; s < r.length && !r[s].includes(`DetermineComponentFrameRoot`);) s++;
|
|
1079
|
+
if (o === t.length || s === r.length) for (o = t.length - 1, s = r.length - 1; o >= 1 && s >= 0 && t[o] !== r[s];) s--;
|
|
1080
|
+
for (; o >= 1 && s >= 0; o--, s--) if (t[o] !== r[s]) {
|
|
1081
|
+
if (o !== 1 || s !== 1) do
|
|
1082
|
+
if (o--, s--, s < 0 || t[o] !== r[s]) {
|
|
1083
|
+
let r = `\n${t[o].replace(` at new `, ` at `)}`, i = we(e);
|
|
1084
|
+
return i && r.includes(`<anonymous>`) && (r = r.replace(`<anonymous>`, i)), r;
|
|
1085
|
+
}
|
|
1086
|
+
while (o >= 1 && s >= 0);
|
|
1087
|
+
break;
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
} finally {
|
|
1091
|
+
G = !1, Error.prepareStackTrace = r, H(i), console.error = a, console.warn = o;
|
|
1092
|
+
}
|
|
1093
|
+
let s = e ? we(e) : ``;
|
|
1094
|
+
return s ? U(s) : ``;
|
|
1095
|
+
}, q = (e, t) => {
|
|
1096
|
+
let n = e.tag, r = ``;
|
|
1097
|
+
switch (n) {
|
|
1098
|
+
case 28:
|
|
1099
|
+
r = U(`Activity`);
|
|
1100
|
+
break;
|
|
1101
|
+
case 1:
|
|
1102
|
+
r = K(e.type, !0);
|
|
1103
|
+
break;
|
|
1104
|
+
case 11:
|
|
1105
|
+
r = K(e.type.render, !1);
|
|
1106
|
+
break;
|
|
1107
|
+
case 0:
|
|
1108
|
+
case 15:
|
|
1109
|
+
r = K(e.type, !1);
|
|
1110
|
+
break;
|
|
1111
|
+
case 5:
|
|
1112
|
+
case 26:
|
|
1113
|
+
case 27:
|
|
1114
|
+
r = U(e.type);
|
|
1115
|
+
break;
|
|
1116
|
+
case 16:
|
|
1117
|
+
r = U(`Lazy`);
|
|
1118
|
+
break;
|
|
1119
|
+
case 13:
|
|
1120
|
+
r = e.child !== t && t !== null ? U(`Suspense Fallback`) : U(`Suspense`);
|
|
1121
|
+
break;
|
|
1122
|
+
case 19:
|
|
1123
|
+
r = U(`SuspenseList`);
|
|
1124
|
+
break;
|
|
1125
|
+
case 30:
|
|
1126
|
+
r = U(`ViewTransition`);
|
|
1127
|
+
break;
|
|
1128
|
+
default: return ``;
|
|
1129
|
+
}
|
|
1130
|
+
return r;
|
|
1131
|
+
}, J = (e) => {
|
|
1132
|
+
try {
|
|
1133
|
+
let t = ``, n = e, r = null;
|
|
1134
|
+
do {
|
|
1135
|
+
t += q(n, r);
|
|
1136
|
+
let e = n._debugInfo;
|
|
1137
|
+
if (e && Array.isArray(e)) for (let n = e.length - 1; n >= 0; n--) {
|
|
1138
|
+
let r = e[n];
|
|
1139
|
+
typeof r.name == `string` && (t += W(r.name, r.env));
|
|
1140
|
+
}
|
|
1141
|
+
r = n, n = n.return;
|
|
1142
|
+
} while (n);
|
|
1143
|
+
return t;
|
|
1144
|
+
} catch (e) {
|
|
1145
|
+
return e instanceof Error ? `\nError generating stack: ${e.message}\n${e.stack}` : ``;
|
|
1146
|
+
}
|
|
1147
|
+
}, Y = (e) => {
|
|
1148
|
+
let t = Error.prepareStackTrace;
|
|
1149
|
+
Error.prepareStackTrace = void 0;
|
|
1150
|
+
let n = e;
|
|
1151
|
+
if (!n) return ``;
|
|
1152
|
+
Error.prepareStackTrace = t, n.startsWith(`Error: react-stack-top-frame
|
|
1153
|
+
`) && (n = n.slice(29));
|
|
1154
|
+
let r = n.indexOf(`
|
|
1155
|
+
`);
|
|
1156
|
+
if (r !== -1 && (n = n.slice(r + 1)), r = Math.max(n.indexOf(`react_stack_bottom_frame`), n.indexOf(`react-stack-bottom-frame`)), r !== -1 && (r = n.lastIndexOf(`
|
|
1157
|
+
`, r)), r !== -1) n = n.slice(0, r);
|
|
1158
|
+
else return ``;
|
|
1159
|
+
return n;
|
|
1160
|
+
}, de = (e) => !!(e.fileName?.startsWith(`rsc://`) && e.functionName), fe = (e, t) => e.fileName === t.fileName && e.lineNumber === t.lineNumber && e.columnNumber === t.columnNumber, pe = (e) => {
|
|
1161
|
+
let t = /* @__PURE__ */ new Map();
|
|
1162
|
+
for (let n of e) for (let e of n.stackFrames) {
|
|
1163
|
+
if (!de(e)) continue;
|
|
1164
|
+
let n = e.functionName, r = t.get(n) ?? [];
|
|
1165
|
+
r.some((t) => fe(t, e)) || (r.push(e), t.set(n, r));
|
|
1166
|
+
}
|
|
1167
|
+
return t;
|
|
1168
|
+
}, me = (e, t, n) => {
|
|
1169
|
+
if (!e.functionName) return {
|
|
1170
|
+
...e,
|
|
1171
|
+
isServer: !0
|
|
1172
|
+
};
|
|
1173
|
+
let r = t.get(e.functionName);
|
|
1174
|
+
if (!r || r.length === 0) return {
|
|
1175
|
+
...e,
|
|
1176
|
+
isServer: !0
|
|
1177
|
+
};
|
|
1178
|
+
let i = n.get(e.functionName) ?? 0, a = r[i % r.length];
|
|
1179
|
+
return n.set(e.functionName, i + 1), {
|
|
1180
|
+
...e,
|
|
1181
|
+
isServer: !0,
|
|
1182
|
+
fileName: a.fileName,
|
|
1183
|
+
lineNumber: a.lineNumber,
|
|
1184
|
+
columnNumber: a.columnNumber,
|
|
1185
|
+
source: e.source?.replace(`(at Server)`, `(${a.fileName}:${a.lineNumber}:${a.columnNumber})`)
|
|
1186
|
+
};
|
|
1187
|
+
}, he = (e) => {
|
|
1188
|
+
let t = [];
|
|
1189
|
+
return j$1(e, (e) => {
|
|
1190
|
+
if (!B(e)) return;
|
|
1191
|
+
let r = typeof e.type == `string` ? e.type : we(e.type) || `<anonymous>`;
|
|
1192
|
+
t.push({
|
|
1193
|
+
componentName: r,
|
|
1194
|
+
stackFrames: m(Y(e._debugStack?.stack))
|
|
1195
|
+
});
|
|
1196
|
+
}, !0), t;
|
|
1197
|
+
}, X = async (e, t = !0, n) => {
|
|
1198
|
+
let r = he(e), i = m(J(e)), a = pe(r), o = /* @__PURE__ */ new Map();
|
|
1199
|
+
return z(i.map((e) => e.source?.includes(`(at Server)`) ?? !1 ? me(e, a, o) : e).filter((e, t, n) => {
|
|
1200
|
+
if (t === 0) return !0;
|
|
1201
|
+
let r = n[t - 1];
|
|
1202
|
+
return e.functionName !== r.functionName;
|
|
1203
|
+
}), t, n);
|
|
1204
|
+
}, Z = (e) => {
|
|
1205
|
+
let t = e._debugSource;
|
|
1206
|
+
return t ? typeof t == `object` && !!t && `fileName` in t && typeof t.fileName == `string` && `lineNumber` in t && typeof t.lineNumber == `number` : !1;
|
|
1207
|
+
}, ge = async (e, t = !0, n) => {
|
|
1208
|
+
if (Z(e)) return e._debugSource || null;
|
|
1209
|
+
let r = await X(e, t, n);
|
|
1210
|
+
for (let e of r) if (e.fileName) return {
|
|
1211
|
+
fileName: e.fileName,
|
|
1212
|
+
lineNumber: e.lineNumber,
|
|
1213
|
+
columnNumber: e.columnNumber,
|
|
1214
|
+
functionName: e.functionName
|
|
1215
|
+
};
|
|
1216
|
+
return null;
|
|
1217
|
+
}, Q = (e) => e.split(`/`).filter(Boolean).length, _e = (e) => e.split(`/`).filter(Boolean)[0] ?? null, ve = (e) => {
|
|
1218
|
+
let t = e.indexOf(`/`, 1);
|
|
1219
|
+
if (t === -1 || Q(e.slice(0, t)) !== 1) return e;
|
|
1220
|
+
let n = e.slice(t);
|
|
1221
|
+
if (!s.test(n) || Q(n) < 2) return e;
|
|
1222
|
+
let r = _e(n);
|
|
1223
|
+
return !r || r.startsWith(`@`) || r.length > 4 ? e : n;
|
|
1224
|
+
}, $ = (e) => {
|
|
1225
|
+
if (!e || o.some((t) => t === e)) return ``;
|
|
1226
|
+
let t = e, n = t.startsWith(`http://`) || t.startsWith(`https://`);
|
|
1227
|
+
if (n) try {
|
|
1228
|
+
t = new URL(t).pathname;
|
|
1229
|
+
} catch {}
|
|
1230
|
+
if (n && (t = ve(t)), t.startsWith(`about://React/`)) {
|
|
1231
|
+
let e = t.slice(14), n = e.indexOf(`/`), r = e.indexOf(`:`);
|
|
1232
|
+
t = n !== -1 && (r === -1 || n < r) ? e.slice(n + 1) : e;
|
|
1233
|
+
}
|
|
1234
|
+
let r = !0;
|
|
1235
|
+
for (; r;) {
|
|
1236
|
+
r = !1;
|
|
1237
|
+
for (let e of a) if (t.startsWith(e)) {
|
|
1238
|
+
t = t.slice(e.length), e === `file:///` && (t = `/${t.replace(/^\/+/, ``)}`), r = !0;
|
|
1239
|
+
break;
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
if (i.test(t)) {
|
|
1243
|
+
let e = t.match(i);
|
|
1244
|
+
e && (t = t.slice(e[0].length));
|
|
1245
|
+
}
|
|
1246
|
+
if (t.startsWith(`//`)) {
|
|
1247
|
+
let e = t.indexOf(`/`, 2);
|
|
1248
|
+
t = e === -1 ? `` : t.slice(e);
|
|
1249
|
+
}
|
|
1250
|
+
let s = t.indexOf(`?`);
|
|
1251
|
+
if (s !== -1) {
|
|
1252
|
+
let e = t.slice(s);
|
|
1253
|
+
l.test(e) && (t = t.slice(0, s));
|
|
1254
|
+
}
|
|
1255
|
+
return t;
|
|
1256
|
+
}, ye = (e) => {
|
|
1257
|
+
let t = $(e);
|
|
1258
|
+
return !(!t || !s.test(t) || c.test(t));
|
|
1259
|
+
}, be = (e, t) => {
|
|
1260
|
+
let n = e.split(`
|
|
1261
|
+
`), r = t - 1;
|
|
1262
|
+
if (r < 0 || r >= n.length) return null;
|
|
1263
|
+
let i = Math.max(0, r - 5), a = Math.min(n.length, r + 5), o = n.slice(i, a).join(`
|
|
1264
|
+
`), s = /(?:^|export\s+)(?:const|let|var)\s+(\w+)\s*=/m, c = /(?:^|export\s+)function\s+(\w+)/m, l = /(?:^|export\s+)class\s+(\w+)/m, u = o.match(s);
|
|
1265
|
+
if (u?.[1]) return u[1];
|
|
1266
|
+
let d = o.match(c);
|
|
1267
|
+
if (d?.[1]) return d[1];
|
|
1268
|
+
let f = o.match(l);
|
|
1269
|
+
return f?.[1] ? f[1] : null;
|
|
1270
|
+
}, xe = async (e, t = !0, r) => {
|
|
1271
|
+
let i = (await X(e, t, r)).filter((e) => e.fileName)[0];
|
|
1272
|
+
if (!i?.fileName) return we(e.type);
|
|
1273
|
+
let a = await R(i.fileName, t, r);
|
|
1274
|
+
if (!a) return we(e.type);
|
|
1275
|
+
let o = null;
|
|
1276
|
+
if (typeof i.lineNumber == `number` && typeof i.columnNumber == `number` && (o = P(a, i.lineNumber, i.columnNumber)), !o?.fileName || !o.lineNumber || !a.sourcesContent) return we(e.type);
|
|
1277
|
+
let s = a.sources.indexOf(o.fileName);
|
|
1278
|
+
if (s === -1 || !a.sourcesContent[s]) return we(e.type);
|
|
1279
|
+
let c = a.sourcesContent[s];
|
|
1280
|
+
return be(c, o.lineNumber) || we(e.type);
|
|
1281
|
+
};
|
|
1282
|
+
|
|
1283
|
+
//#endregion
|
|
1284
|
+
//#region ../../node_modules/.pnpm/bippy@0.5.37_react@19.2.3/node_modules/bippy/dist/install-hook-only.js
|
|
1285
|
+
/**
|
|
1286
|
+
* @license bippy
|
|
1287
|
+
*
|
|
1288
|
+
* Copyright (c) Aiden Bai
|
|
1289
|
+
*
|
|
1290
|
+
* This source code is licensed under the MIT license found in the
|
|
1291
|
+
* LICENSE file in the root directory of this source tree.
|
|
1292
|
+
*/
|
|
1293
|
+
_$2();
|
|
1294
|
+
|
|
1295
|
+
//#endregion
|
|
1296
|
+
//#region ../../node_modules/.pnpm/bippy@0.5.37_react@19.2.3/node_modules/bippy/dist/index.js
|
|
1297
|
+
/**
|
|
1298
|
+
* @license bippy
|
|
1299
|
+
*
|
|
1300
|
+
* Copyright (c) Aiden Bai
|
|
1301
|
+
*
|
|
1302
|
+
* This source code is licensed under the MIT license found in the
|
|
1303
|
+
* LICENSE file in the root directory of this source tree.
|
|
1304
|
+
*/
|
|
1305
|
+
|
|
1306
|
+
//#endregion
|
|
1307
|
+
//#region src/utils/truncate-string.ts
|
|
1308
|
+
const truncateString = (text, maxLength) => text.length > maxLength ? `${text.slice(0, maxLength)}...` : text;
|
|
1309
|
+
|
|
1310
|
+
//#endregion
|
|
1311
|
+
//#region src/utils/get-next-base-path.ts
|
|
1312
|
+
let cachedNextBasePath;
|
|
1313
|
+
const getNextBasePath = () => {
|
|
1314
|
+
if (cachedNextBasePath !== void 0) return cachedNextBasePath;
|
|
1315
|
+
const source = document.querySelector("script[src*=\"/_next/\"]")?.src;
|
|
1316
|
+
const pathname = source ? new URL(source).pathname : "";
|
|
1317
|
+
const assetPathIndex = pathname.indexOf("/_next/");
|
|
1318
|
+
cachedNextBasePath = assetPathIndex > 0 ? pathname.slice(0, assetPathIndex) : "";
|
|
1319
|
+
return cachedNextBasePath;
|
|
1320
|
+
};
|
|
1321
|
+
|
|
1322
|
+
//#endregion
|
|
1323
|
+
//#region src/core/context.ts
|
|
1324
|
+
const NON_COMPONENT_PREFIXES = new Set([
|
|
1325
|
+
"_",
|
|
1326
|
+
"$",
|
|
1327
|
+
"motion.",
|
|
1328
|
+
"styled.",
|
|
1329
|
+
"chakra.",
|
|
1330
|
+
"ark.",
|
|
1331
|
+
"Primitive.",
|
|
1332
|
+
"Slot."
|
|
1333
|
+
]);
|
|
1334
|
+
const NEXT_INTERNAL_COMPONENT_NAMES = new Set([
|
|
1335
|
+
"InnerLayoutRouter",
|
|
1336
|
+
"RedirectErrorBoundary",
|
|
1337
|
+
"RedirectBoundary",
|
|
1338
|
+
"HTTPAccessFallbackErrorBoundary",
|
|
1339
|
+
"HTTPAccessFallbackBoundary",
|
|
1340
|
+
"LoadingBoundary",
|
|
1341
|
+
"ErrorBoundary",
|
|
1342
|
+
"InnerScrollAndFocusHandler",
|
|
1343
|
+
"ScrollAndFocusHandler",
|
|
1344
|
+
"RenderFromTemplateContext",
|
|
1345
|
+
"OuterLayoutRouter",
|
|
1346
|
+
"body",
|
|
1347
|
+
"html",
|
|
1348
|
+
"DevRootHTTPAccessFallbackBoundary",
|
|
1349
|
+
"AppDevOverlayErrorBoundary",
|
|
1350
|
+
"AppDevOverlay",
|
|
1351
|
+
"HotReload",
|
|
1352
|
+
"Router",
|
|
1353
|
+
"ErrorBoundaryHandler",
|
|
1354
|
+
"AppRouter",
|
|
1355
|
+
"ServerRoot",
|
|
1356
|
+
"SegmentStateProvider",
|
|
1357
|
+
"RootErrorBoundary",
|
|
1358
|
+
"LoadableComponent",
|
|
1359
|
+
"MotionDOMComponent"
|
|
1360
|
+
]);
|
|
1361
|
+
const REACT_INTERNAL_COMPONENT_NAMES = new Set([
|
|
1362
|
+
"Suspense",
|
|
1363
|
+
"Fragment",
|
|
1364
|
+
"StrictMode",
|
|
1365
|
+
"Profiler",
|
|
1366
|
+
"SuspenseList"
|
|
1367
|
+
]);
|
|
1368
|
+
let cachedIsNextProject;
|
|
1369
|
+
const checkIsNextProject = (revalidate) => {
|
|
1370
|
+
if (revalidate) cachedIsNextProject = void 0;
|
|
1371
|
+
cachedIsNextProject ??= typeof document !== "undefined" && Boolean(document.getElementById("__NEXT_DATA__") || document.querySelector("nextjs-portal"));
|
|
1372
|
+
return cachedIsNextProject;
|
|
1373
|
+
};
|
|
1374
|
+
const isInternalComponentName = (name) => {
|
|
1375
|
+
if (NEXT_INTERNAL_COMPONENT_NAMES.has(name)) return true;
|
|
1376
|
+
if (REACT_INTERNAL_COMPONENT_NAMES.has(name)) return true;
|
|
1377
|
+
for (const prefix of NON_COMPONENT_PREFIXES) if (name.startsWith(prefix)) return true;
|
|
1378
|
+
return false;
|
|
1379
|
+
};
|
|
1380
|
+
const isUsefulComponentName = (name) => {
|
|
1381
|
+
if (!name) return false;
|
|
1382
|
+
if (isInternalComponentName(name)) return false;
|
|
1383
|
+
if (name === "SlotClone" || name === "Slot") return false;
|
|
1384
|
+
return true;
|
|
1385
|
+
};
|
|
1386
|
+
const isSourceComponentName = (name) => {
|
|
1387
|
+
if (name.length <= 1) return false;
|
|
1388
|
+
if (isInternalComponentName(name)) return false;
|
|
1389
|
+
if (name[0] !== name[0].toUpperCase()) return false;
|
|
1390
|
+
if (name.endsWith("Provider") || name.endsWith("Context")) return false;
|
|
1391
|
+
return true;
|
|
1392
|
+
};
|
|
1393
|
+
const SERVER_COMPONENT_URL_PREFIXES = ["about://React/", "rsc://React/"];
|
|
1394
|
+
const isServerComponentUrl = (url) => SERVER_COMPONENT_URL_PREFIXES.some((prefix) => url.startsWith(prefix));
|
|
1395
|
+
const devirtualizeServerUrl = (url) => {
|
|
1396
|
+
for (const prefix of SERVER_COMPONENT_URL_PREFIXES) {
|
|
1397
|
+
if (!url.startsWith(prefix)) continue;
|
|
1398
|
+
const environmentEndIndex = url.indexOf("/", prefix.length);
|
|
1399
|
+
const querySuffixIndex = url.lastIndexOf("?");
|
|
1400
|
+
if (environmentEndIndex > -1 && querySuffixIndex > -1) return decodeURI(url.slice(environmentEndIndex + 1, querySuffixIndex));
|
|
1401
|
+
}
|
|
1402
|
+
return url;
|
|
1403
|
+
};
|
|
1404
|
+
const symbolicateServerFrames = async (frames) => {
|
|
1405
|
+
const serverFrameIndices = [];
|
|
1406
|
+
const requestFrames = [];
|
|
1407
|
+
for (let frameIndex = 0; frameIndex < frames.length; frameIndex++) {
|
|
1408
|
+
const frame = frames[frameIndex];
|
|
1409
|
+
if (!frame.isServer || !frame.fileName) continue;
|
|
1410
|
+
serverFrameIndices.push(frameIndex);
|
|
1411
|
+
requestFrames.push({
|
|
1412
|
+
file: devirtualizeServerUrl(frame.fileName),
|
|
1413
|
+
methodName: frame.functionName ?? "<unknown>",
|
|
1414
|
+
line1: frame.lineNumber ?? null,
|
|
1415
|
+
column1: frame.columnNumber ?? null,
|
|
1416
|
+
arguments: []
|
|
1417
|
+
});
|
|
1418
|
+
}
|
|
1419
|
+
if (requestFrames.length === 0) return frames;
|
|
1420
|
+
const controller = new AbortController();
|
|
1421
|
+
const timeout = setTimeout(() => controller.abort(), SYMBOLICATION_TIMEOUT_MS);
|
|
1422
|
+
try {
|
|
1423
|
+
const response = await fetch(`${getNextBasePath()}/__nextjs_original-stack-frames`, {
|
|
1424
|
+
method: "POST",
|
|
1425
|
+
headers: { "Content-Type": "application/json" },
|
|
1426
|
+
body: JSON.stringify({
|
|
1427
|
+
frames: requestFrames,
|
|
1428
|
+
isServer: true,
|
|
1429
|
+
isEdgeServer: false,
|
|
1430
|
+
isAppDirectory: true
|
|
1431
|
+
}),
|
|
1432
|
+
signal: controller.signal
|
|
1433
|
+
});
|
|
1434
|
+
if (!response.ok) return frames;
|
|
1435
|
+
const results = await response.json();
|
|
1436
|
+
const resolvedFrames = [...frames];
|
|
1437
|
+
for (let resultIndex = 0; resultIndex < serverFrameIndices.length; resultIndex++) {
|
|
1438
|
+
const result = results[resultIndex];
|
|
1439
|
+
if (result?.status !== "fulfilled") continue;
|
|
1440
|
+
const resolved = result.value?.originalStackFrame;
|
|
1441
|
+
if (!resolved?.file || resolved.ignored) continue;
|
|
1442
|
+
const originalFrameIndex = serverFrameIndices[resultIndex];
|
|
1443
|
+
resolvedFrames[originalFrameIndex] = {
|
|
1444
|
+
...frames[originalFrameIndex],
|
|
1445
|
+
fileName: resolved.file,
|
|
1446
|
+
lineNumber: resolved.line1 ?? void 0,
|
|
1447
|
+
columnNumber: resolved.column1 ?? void 0,
|
|
1448
|
+
isSymbolicated: true
|
|
1449
|
+
};
|
|
1450
|
+
}
|
|
1451
|
+
return resolvedFrames;
|
|
1452
|
+
} catch {
|
|
1453
|
+
return frames;
|
|
1454
|
+
} finally {
|
|
1455
|
+
clearTimeout(timeout);
|
|
1456
|
+
}
|
|
1457
|
+
};
|
|
1458
|
+
const extractServerFramesFromDebugStack = (rootFiber) => {
|
|
1459
|
+
const serverFramesByName = /* @__PURE__ */ new Map();
|
|
1460
|
+
j$1(rootFiber, (currentFiber) => {
|
|
1461
|
+
if (!B(currentFiber)) return false;
|
|
1462
|
+
const ownerStack = Y(currentFiber._debugStack.stack);
|
|
1463
|
+
if (!ownerStack) return false;
|
|
1464
|
+
for (const frame of m(ownerStack)) {
|
|
1465
|
+
if (!frame.functionName || !frame.fileName) continue;
|
|
1466
|
+
if (!isServerComponentUrl(frame.fileName)) continue;
|
|
1467
|
+
if (serverFramesByName.has(frame.functionName)) continue;
|
|
1468
|
+
serverFramesByName.set(frame.functionName, {
|
|
1469
|
+
...frame,
|
|
1470
|
+
isServer: true
|
|
1471
|
+
});
|
|
1472
|
+
}
|
|
1473
|
+
return false;
|
|
1474
|
+
}, true);
|
|
1475
|
+
return serverFramesByName;
|
|
1476
|
+
};
|
|
1477
|
+
const enrichServerFrameLocations = (rootFiber, frames) => {
|
|
1478
|
+
if (!frames.some((frame) => frame.isServer && !frame.fileName && frame.functionName)) return frames;
|
|
1479
|
+
const serverFramesByName = extractServerFramesFromDebugStack(rootFiber);
|
|
1480
|
+
if (serverFramesByName.size === 0) return frames;
|
|
1481
|
+
return frames.map((frame) => {
|
|
1482
|
+
if (!frame.isServer || frame.fileName || !frame.functionName) return frame;
|
|
1483
|
+
const resolved = serverFramesByName.get(frame.functionName);
|
|
1484
|
+
if (!resolved) return frame;
|
|
1485
|
+
return {
|
|
1486
|
+
...frame,
|
|
1487
|
+
fileName: resolved.fileName,
|
|
1488
|
+
lineNumber: resolved.lineNumber,
|
|
1489
|
+
columnNumber: resolved.columnNumber
|
|
1490
|
+
};
|
|
1491
|
+
});
|
|
1492
|
+
};
|
|
1493
|
+
const findNearestFiberElement = (element) => {
|
|
1494
|
+
if (!Te()) return element;
|
|
1495
|
+
let current = element;
|
|
1496
|
+
while (current) {
|
|
1497
|
+
if (Z$1(current)) return current;
|
|
1498
|
+
current = current.parentElement;
|
|
1499
|
+
}
|
|
1500
|
+
return element;
|
|
1501
|
+
};
|
|
1502
|
+
const stackCache = /* @__PURE__ */ new WeakMap();
|
|
1503
|
+
const fetchStackForElement = async (element) => {
|
|
1504
|
+
try {
|
|
1505
|
+
const fiber = Z$1(element);
|
|
1506
|
+
if (!fiber) return null;
|
|
1507
|
+
const frames = await X(fiber);
|
|
1508
|
+
if (checkIsNextProject()) return await symbolicateServerFrames(enrichServerFrameLocations(fiber, frames));
|
|
1509
|
+
return frames;
|
|
1510
|
+
} catch {
|
|
1511
|
+
return null;
|
|
1512
|
+
}
|
|
1513
|
+
};
|
|
1514
|
+
const getStack = (element) => {
|
|
1515
|
+
if (!Te()) return Promise.resolve([]);
|
|
1516
|
+
const resolvedElement = findNearestFiberElement(element);
|
|
1517
|
+
const cached = stackCache.get(resolvedElement);
|
|
1518
|
+
if (cached) return cached;
|
|
1519
|
+
const promise = fetchStackForElement(resolvedElement);
|
|
1520
|
+
stackCache.set(resolvedElement, promise);
|
|
1521
|
+
return promise;
|
|
1522
|
+
};
|
|
1523
|
+
const getNearestComponentName = async (element) => {
|
|
1524
|
+
if (!Te()) return null;
|
|
1525
|
+
const stack = await getStack(element);
|
|
1526
|
+
if (!stack) return null;
|
|
1527
|
+
for (const frame of stack) if (frame.functionName && isSourceComponentName(frame.functionName)) return frame.functionName;
|
|
1528
|
+
return null;
|
|
1529
|
+
};
|
|
1530
|
+
const resolveSource = async (element) => {
|
|
1531
|
+
const stack = await getStack(findNearestFiberElement(element));
|
|
1532
|
+
if (!stack || stack.length === 0) return null;
|
|
1533
|
+
const sourceFrames = stack.filter((frame) => frame.fileName && ye(frame.fileName));
|
|
1534
|
+
const resolvedFrame = sourceFrames.find((frame) => frame.functionName && isSourceComponentName(frame.functionName)) ?? sourceFrames[0];
|
|
1535
|
+
if (!resolvedFrame?.fileName) return null;
|
|
1536
|
+
return {
|
|
1537
|
+
filePath: $(resolvedFrame.fileName),
|
|
1538
|
+
lineNumber: resolvedFrame.lineNumber ?? null,
|
|
1539
|
+
columnNumber: resolvedFrame.columnNumber ?? null,
|
|
1540
|
+
componentName: resolvedFrame.functionName && isSourceComponentName(resolvedFrame.functionName) ? resolvedFrame.functionName : null
|
|
1541
|
+
};
|
|
1542
|
+
};
|
|
1543
|
+
const getComponentDisplayName = (element) => {
|
|
1544
|
+
if (!Te()) return null;
|
|
1545
|
+
const fiber = Z$1(findNearestFiberElement(element));
|
|
1546
|
+
if (!fiber) return null;
|
|
1547
|
+
let currentFiber = fiber.return;
|
|
1548
|
+
while (currentFiber) {
|
|
1549
|
+
if (ve$1(currentFiber)) {
|
|
1550
|
+
const name = we(currentFiber.type);
|
|
1551
|
+
if (name && isUsefulComponentName(name)) return name;
|
|
1552
|
+
}
|
|
1553
|
+
currentFiber = currentFiber.return;
|
|
1554
|
+
}
|
|
1555
|
+
return null;
|
|
1556
|
+
};
|
|
1557
|
+
const hasFormattableFrames = (stack) => {
|
|
1558
|
+
if (!stack) return false;
|
|
1559
|
+
return stack.some((frame) => {
|
|
1560
|
+
if (frame.fileName && ye(frame.fileName)) return true;
|
|
1561
|
+
if (frame.isServer && (!frame.functionName || isSourceComponentName(frame.functionName))) return true;
|
|
1562
|
+
return false;
|
|
1563
|
+
});
|
|
1564
|
+
};
|
|
1565
|
+
const getComponentNamesFromFiber = (element, maxCount) => {
|
|
1566
|
+
if (!Te()) return [];
|
|
1567
|
+
const fiber = Z$1(element);
|
|
1568
|
+
if (!fiber) return [];
|
|
1569
|
+
const componentNames = [];
|
|
1570
|
+
j$1(fiber, (currentFiber) => {
|
|
1571
|
+
if (componentNames.length >= maxCount) return true;
|
|
1572
|
+
if (ve$1(currentFiber)) {
|
|
1573
|
+
const name = we(currentFiber.type);
|
|
1574
|
+
if (name && isUsefulComponentName(name)) componentNames.push(name);
|
|
1575
|
+
}
|
|
1576
|
+
return false;
|
|
1577
|
+
}, true);
|
|
1578
|
+
return componentNames;
|
|
1579
|
+
};
|
|
1580
|
+
const formatStackContext = (stack, options = {}) => {
|
|
1581
|
+
const { maxLines = 3 } = options;
|
|
1582
|
+
const isNextProject = checkIsNextProject();
|
|
1583
|
+
const formattedLines = [];
|
|
1584
|
+
for (const frame of stack) {
|
|
1585
|
+
if (formattedLines.length >= maxLines) break;
|
|
1586
|
+
const hasResolvedSource = frame.fileName && ye(frame.fileName);
|
|
1587
|
+
if (frame.isServer && !hasResolvedSource && (!frame.functionName || isSourceComponentName(frame.functionName))) {
|
|
1588
|
+
formattedLines.push(`\n in ${frame.functionName || "<anonymous>"} (at Server)`);
|
|
1589
|
+
continue;
|
|
1590
|
+
}
|
|
1591
|
+
if (hasResolvedSource) {
|
|
1592
|
+
let line = "\n in ";
|
|
1593
|
+
const hasComponentName = frame.functionName && isSourceComponentName(frame.functionName);
|
|
1594
|
+
if (hasComponentName) line += `${frame.functionName} (at `;
|
|
1595
|
+
line += $(frame.fileName);
|
|
1596
|
+
if (isNextProject && frame.lineNumber) {
|
|
1597
|
+
line += `:${frame.lineNumber}`;
|
|
1598
|
+
if (frame.columnNumber) line += `:${frame.columnNumber}`;
|
|
1599
|
+
}
|
|
1600
|
+
if (hasComponentName) line += `)`;
|
|
1601
|
+
formattedLines.push(line);
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
return formattedLines.join("");
|
|
1605
|
+
};
|
|
1606
|
+
const getStackContext = async (element, options = {}) => {
|
|
1607
|
+
const maxLines = options.maxLines ?? 3;
|
|
1608
|
+
const stack = await getStack(element);
|
|
1609
|
+
if (stack && hasFormattableFrames(stack)) return formatStackContext(stack, options);
|
|
1610
|
+
const componentNames = getComponentNamesFromFiber(element, maxLines);
|
|
1611
|
+
if (componentNames.length > 0) return componentNames.map((name) => `\n in ${name}`).join("");
|
|
1612
|
+
return "";
|
|
1613
|
+
};
|
|
1614
|
+
const getElementContext = async (element, options = {}) => {
|
|
1615
|
+
const resolvedElement = findNearestFiberElement(element);
|
|
1616
|
+
const html = getHTMLPreview(resolvedElement);
|
|
1617
|
+
const stackContext = await getStackContext(resolvedElement, options);
|
|
1618
|
+
if (stackContext) return `${html}${stackContext}`;
|
|
1619
|
+
return getFallbackContext(resolvedElement);
|
|
1620
|
+
};
|
|
1621
|
+
const getFallbackContext = (element) => {
|
|
1622
|
+
const tagName = getTagName(element);
|
|
1623
|
+
if (!(element instanceof HTMLElement)) return `<${tagName}${formatPriorityAttrs(element, {
|
|
1624
|
+
truncate: false,
|
|
1625
|
+
maxAttrs: PREVIEW_PRIORITY_ATTRS.length
|
|
1626
|
+
})} />`;
|
|
1627
|
+
const text = element.innerText?.trim() ?? element.textContent?.trim() ?? "";
|
|
1628
|
+
let attrsText = "";
|
|
1629
|
+
for (const { name, value } of element.attributes) attrsText += ` ${name}="${value}"`;
|
|
1630
|
+
const truncatedText = truncateString(text, 100);
|
|
1631
|
+
if (truncatedText.length > 0) return `<${tagName}${attrsText}>\n ${truncatedText}\n</${tagName}>`;
|
|
1632
|
+
return `<${tagName}${attrsText} />`;
|
|
1633
|
+
};
|
|
1634
|
+
const truncateAttrValue = (value) => truncateString(value, 15);
|
|
1635
|
+
const formatPriorityAttrs = (element, options = {}) => {
|
|
1636
|
+
const { truncate = true, maxAttrs = 3 } = options;
|
|
1637
|
+
const priorityAttrs = [];
|
|
1638
|
+
for (const name of PREVIEW_PRIORITY_ATTRS) {
|
|
1639
|
+
if (priorityAttrs.length >= maxAttrs) break;
|
|
1640
|
+
const value = element.getAttribute(name);
|
|
1641
|
+
if (value) {
|
|
1642
|
+
const formattedValue = truncate ? truncateAttrValue(value) : value;
|
|
1643
|
+
priorityAttrs.push(`${name}="${formattedValue}"`);
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
return priorityAttrs.length > 0 ? ` ${priorityAttrs.join(" ")}` : "";
|
|
1647
|
+
};
|
|
1648
|
+
const getHTMLPreview = (element) => {
|
|
1649
|
+
const tagName = getTagName(element);
|
|
1650
|
+
const text = element instanceof HTMLElement ? element.innerText?.trim() ?? element.textContent?.trim() ?? "" : element.textContent?.trim() ?? "";
|
|
1651
|
+
let attrsText = "";
|
|
1652
|
+
for (const { name, value } of element.attributes) attrsText += ` ${name}="${truncateAttrValue(value)}"`;
|
|
1653
|
+
const topElements = [];
|
|
1654
|
+
const bottomElements = [];
|
|
1655
|
+
let foundFirstText = false;
|
|
1656
|
+
const childNodes = Array.from(element.childNodes);
|
|
1657
|
+
for (const node of childNodes) {
|
|
1658
|
+
if (node.nodeType === Node.COMMENT_NODE) continue;
|
|
1659
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
1660
|
+
if (node.textContent && node.textContent.trim().length > 0) foundFirstText = true;
|
|
1661
|
+
} else if (node instanceof Element) if (!foundFirstText) topElements.push(node);
|
|
1662
|
+
else bottomElements.push(node);
|
|
1663
|
+
}
|
|
1664
|
+
const formatElements = (elements) => {
|
|
1665
|
+
if (elements.length === 0) return "";
|
|
1666
|
+
if (elements.length <= 2) return elements.map((childElement) => `<${getTagName(childElement)} ...>`).join("\n ");
|
|
1667
|
+
return `(${elements.length} elements)`;
|
|
1668
|
+
};
|
|
1669
|
+
let content = "";
|
|
1670
|
+
const topElementsStr = formatElements(topElements);
|
|
1671
|
+
if (topElementsStr) content += `\n ${topElementsStr}`;
|
|
1672
|
+
if (text.length > 0) content += `\n ${truncateString(text, 100)}`;
|
|
1673
|
+
const bottomElementsStr = formatElements(bottomElements);
|
|
1674
|
+
if (bottomElementsStr) content += `\n ${bottomElementsStr}`;
|
|
1675
|
+
if (content.length > 0) return `<${tagName}${attrsText}>${content}\n</${tagName}>`;
|
|
1676
|
+
return `<${tagName}${attrsText} />`;
|
|
1677
|
+
};
|
|
1678
|
+
|
|
1679
|
+
//#endregion
|
|
1680
|
+
//#region src/utils/is-element-visible.ts
|
|
1681
|
+
const isElementVisible = (element, computedStyle = window.getComputedStyle(element)) => {
|
|
1682
|
+
return computedStyle.display !== "none" && computedStyle.visibility !== "hidden" && computedStyle.opacity !== "0";
|
|
1683
|
+
};
|
|
1684
|
+
|
|
1685
|
+
//#endregion
|
|
1686
|
+
//#region src/utils/is-root-element.ts
|
|
1687
|
+
const isRootElement = (element) => {
|
|
1688
|
+
const tagName = getTagName(element);
|
|
1689
|
+
return tagName === "html" || tagName === "body";
|
|
1690
|
+
};
|
|
1691
|
+
|
|
1692
|
+
//#endregion
|
|
1693
|
+
//#region src/utils/is-valid-grabbable-element.ts
|
|
1694
|
+
const isReactGrabElement = (element) => {
|
|
1695
|
+
if (element.hasAttribute("data-react-grab")) return true;
|
|
1696
|
+
const rootNode = element.getRootNode();
|
|
1697
|
+
return rootNode instanceof ShadowRoot && rootNode.host.hasAttribute("data-react-grab");
|
|
1698
|
+
};
|
|
1699
|
+
const isUserIgnoredElement = (element) => element.hasAttribute("data-react-grab-ignore") || element.closest(`[${"data-react-grab-ignore"}]`) !== null;
|
|
1700
|
+
const isDevToolsOverlay = (computedStyle) => {
|
|
1701
|
+
const zIndex = parseInt(computedStyle.zIndex, 10);
|
|
1702
|
+
return computedStyle.pointerEvents === "none" && computedStyle.position === "fixed" && !isNaN(zIndex) && zIndex >= 2147483600;
|
|
1703
|
+
};
|
|
1704
|
+
const isFullViewportOverlay = (element, computedStyle) => {
|
|
1705
|
+
const position = computedStyle.position;
|
|
1706
|
+
if (position !== "fixed" && position !== "absolute") return false;
|
|
1707
|
+
const rect = element.getBoundingClientRect();
|
|
1708
|
+
if (!(rect.width / window.innerWidth >= .9 && rect.height / window.innerHeight >= .9)) return false;
|
|
1709
|
+
const backgroundColor = computedStyle.backgroundColor;
|
|
1710
|
+
if (backgroundColor === "transparent" || backgroundColor === "rgba(0, 0, 0, 0)" || parseFloat(computedStyle.opacity) < .1) return true;
|
|
1711
|
+
const zIndex = parseInt(computedStyle.zIndex, 10);
|
|
1712
|
+
return !isNaN(zIndex) && zIndex > 1e3;
|
|
1713
|
+
};
|
|
1714
|
+
let visibilityCache = /* @__PURE__ */ new WeakMap();
|
|
1715
|
+
const clearVisibilityCache = () => {
|
|
1716
|
+
visibilityCache = /* @__PURE__ */ new WeakMap();
|
|
1717
|
+
};
|
|
1718
|
+
const isValidGrabbableElement = (element) => {
|
|
1719
|
+
if (isRootElement(element)) return false;
|
|
1720
|
+
if (isReactGrabElement(element)) return false;
|
|
1721
|
+
if (isUserIgnoredElement(element)) return false;
|
|
1722
|
+
const now = performance.now();
|
|
1723
|
+
const cached = visibilityCache.get(element);
|
|
1724
|
+
if (cached && now - cached.timestamp < 50) return cached.isVisible;
|
|
1725
|
+
const computedStyle = window.getComputedStyle(element);
|
|
1726
|
+
if (!isElementVisible(element, computedStyle)) {
|
|
1727
|
+
visibilityCache.set(element, {
|
|
1728
|
+
isVisible: false,
|
|
1729
|
+
timestamp: now
|
|
1730
|
+
});
|
|
1731
|
+
return false;
|
|
1732
|
+
}
|
|
1733
|
+
if (element.clientWidth / window.innerWidth >= .9 && element.clientHeight / window.innerHeight >= .9) {
|
|
1734
|
+
if (isDevToolsOverlay(computedStyle)) return false;
|
|
1735
|
+
if (isFullViewportOverlay(element, computedStyle)) return false;
|
|
1736
|
+
}
|
|
1737
|
+
visibilityCache.set(element, {
|
|
1738
|
+
isVisible: true,
|
|
1739
|
+
timestamp: now
|
|
1740
|
+
});
|
|
1741
|
+
return true;
|
|
1742
|
+
};
|
|
1743
|
+
|
|
1744
|
+
//#endregion
|
|
1745
|
+
//#region src/utils/create-style-element.ts
|
|
1746
|
+
const createStyleElement = (attribute, content) => {
|
|
1747
|
+
const element = document.createElement("style");
|
|
1748
|
+
element.setAttribute(attribute, "");
|
|
1749
|
+
const nonce = detectCspNonce();
|
|
1750
|
+
if (nonce) element.nonce = nonce;
|
|
1751
|
+
hideFromThirdParties(element);
|
|
1752
|
+
element.textContent = content;
|
|
1753
|
+
document.head.appendChild(element);
|
|
1754
|
+
return element;
|
|
1755
|
+
};
|
|
1756
|
+
|
|
1757
|
+
//#endregion
|
|
1758
|
+
//#region src/utils/freeze-pseudo-states.ts
|
|
1759
|
+
const POINTER_EVENTS_STYLES = "html { pointer-events: none !important; }";
|
|
1760
|
+
const MOUSE_EVENTS_TO_BLOCK = [
|
|
1761
|
+
"mouseenter",
|
|
1762
|
+
"mouseleave",
|
|
1763
|
+
"mouseover",
|
|
1764
|
+
"mouseout",
|
|
1765
|
+
"pointerenter",
|
|
1766
|
+
"pointerleave",
|
|
1767
|
+
"pointerover",
|
|
1768
|
+
"pointerout"
|
|
1769
|
+
];
|
|
1770
|
+
const FOCUS_EVENTS_TO_BLOCK = [
|
|
1771
|
+
"focus",
|
|
1772
|
+
"blur",
|
|
1773
|
+
"focusin",
|
|
1774
|
+
"focusout"
|
|
1775
|
+
];
|
|
1776
|
+
const HOVER_STYLE_PROPERTIES = [
|
|
1777
|
+
"background-color",
|
|
1778
|
+
"color",
|
|
1779
|
+
"border-color",
|
|
1780
|
+
"box-shadow",
|
|
1781
|
+
"transform",
|
|
1782
|
+
"opacity",
|
|
1783
|
+
"outline",
|
|
1784
|
+
"filter",
|
|
1785
|
+
"scale",
|
|
1786
|
+
"visibility"
|
|
1787
|
+
];
|
|
1788
|
+
const FOCUS_STYLE_PROPERTIES = [
|
|
1789
|
+
"background-color",
|
|
1790
|
+
"color",
|
|
1791
|
+
"border-color",
|
|
1792
|
+
"box-shadow",
|
|
1793
|
+
"outline",
|
|
1794
|
+
"outline-offset",
|
|
1795
|
+
"outline-width",
|
|
1796
|
+
"outline-color",
|
|
1797
|
+
"outline-style",
|
|
1798
|
+
"filter",
|
|
1799
|
+
"opacity",
|
|
1800
|
+
"ring-color",
|
|
1801
|
+
"ring-width"
|
|
1802
|
+
];
|
|
1803
|
+
const frozenHoverElements = /* @__PURE__ */ new Map();
|
|
1804
|
+
const frozenFocusElements = /* @__PURE__ */ new Map();
|
|
1805
|
+
let pointerEventsStyle = null;
|
|
1806
|
+
const stopEvent = (event) => {
|
|
1807
|
+
event.stopImmediatePropagation();
|
|
1808
|
+
};
|
|
1809
|
+
const preventFocusChange = (event) => {
|
|
1810
|
+
event.preventDefault();
|
|
1811
|
+
event.stopImmediatePropagation();
|
|
1812
|
+
};
|
|
1813
|
+
const collectOriginalPropertyValues = (element, properties) => {
|
|
1814
|
+
const originalPropertyValues = /* @__PURE__ */ new Map();
|
|
1815
|
+
for (const prop of properties) {
|
|
1816
|
+
const inlineValue = element.style.getPropertyValue(prop);
|
|
1817
|
+
if (inlineValue) originalPropertyValues.set(prop, inlineValue);
|
|
1818
|
+
}
|
|
1819
|
+
return originalPropertyValues;
|
|
1820
|
+
};
|
|
1821
|
+
const collectPseudoStates = (selector, properties, alreadyFrozen) => {
|
|
1822
|
+
const elementsToFreeze = [];
|
|
1823
|
+
for (const element of document.querySelectorAll(selector)) {
|
|
1824
|
+
if (!(element instanceof HTMLElement)) continue;
|
|
1825
|
+
if (alreadyFrozen?.has(element)) continue;
|
|
1826
|
+
const computed = getComputedStyle(element);
|
|
1827
|
+
let frozenStyles = element.style.cssText;
|
|
1828
|
+
const originalPropertyValues = collectOriginalPropertyValues(element, properties);
|
|
1829
|
+
for (const prop of properties) {
|
|
1830
|
+
const computedValue = computed.getPropertyValue(prop);
|
|
1831
|
+
if (computedValue) frozenStyles += `${prop}: ${computedValue} !important; `;
|
|
1832
|
+
}
|
|
1833
|
+
elementsToFreeze.push({
|
|
1834
|
+
element,
|
|
1835
|
+
frozenStyles,
|
|
1836
|
+
originalPropertyValues
|
|
1837
|
+
});
|
|
1838
|
+
}
|
|
1839
|
+
return elementsToFreeze;
|
|
1840
|
+
};
|
|
1841
|
+
const applyFrozenStates = (states, storageMap) => {
|
|
1842
|
+
for (const { element, frozenStyles, originalPropertyValues } of states) {
|
|
1843
|
+
storageMap.set(element, originalPropertyValues);
|
|
1844
|
+
element.style.cssText = frozenStyles;
|
|
1845
|
+
}
|
|
1846
|
+
};
|
|
1847
|
+
const restoreFrozenStates = (storageMap, styleProperties) => {
|
|
1848
|
+
for (const [element, originalPropertyValues] of storageMap) for (const prop of styleProperties) {
|
|
1849
|
+
const originalValue = originalPropertyValues.get(prop);
|
|
1850
|
+
if (originalValue) element.style.setProperty(prop, originalValue);
|
|
1851
|
+
else element.style.removeProperty(prop);
|
|
1852
|
+
}
|
|
1853
|
+
storageMap.clear();
|
|
1854
|
+
};
|
|
1855
|
+
const suspendPointerEventsFreeze = () => {
|
|
1856
|
+
if (pointerEventsStyle) pointerEventsStyle.disabled = true;
|
|
1857
|
+
};
|
|
1858
|
+
const resumePointerEventsFreeze = () => {
|
|
1859
|
+
if (pointerEventsStyle) pointerEventsStyle.disabled = false;
|
|
1860
|
+
};
|
|
1861
|
+
const freezePseudoStates = () => {
|
|
1862
|
+
if (pointerEventsStyle) return;
|
|
1863
|
+
for (const eventType of MOUSE_EVENTS_TO_BLOCK) document.addEventListener(eventType, stopEvent, true);
|
|
1864
|
+
for (const eventType of FOCUS_EVENTS_TO_BLOCK) document.addEventListener(eventType, preventFocusChange, true);
|
|
1865
|
+
const hoverStates = collectPseudoStates(":hover", HOVER_STYLE_PROPERTIES);
|
|
1866
|
+
const focusStates = collectPseudoStates(":focus, :focus-visible", FOCUS_STYLE_PROPERTIES, frozenFocusElements);
|
|
1867
|
+
applyFrozenStates(hoverStates, frozenHoverElements);
|
|
1868
|
+
applyFrozenStates(focusStates, frozenFocusElements);
|
|
1869
|
+
pointerEventsStyle = createStyleElement("data-react-grab-frozen-pseudo", POINTER_EVENTS_STYLES);
|
|
1870
|
+
};
|
|
1871
|
+
const unfreezePseudoStates = () => {
|
|
1872
|
+
clearElementPositionCache();
|
|
1873
|
+
for (const eventType of MOUSE_EVENTS_TO_BLOCK) document.removeEventListener(eventType, stopEvent, true);
|
|
1874
|
+
for (const eventType of FOCUS_EVENTS_TO_BLOCK) document.removeEventListener(eventType, preventFocusChange, true);
|
|
1875
|
+
restoreFrozenStates(frozenHoverElements, HOVER_STYLE_PROPERTIES);
|
|
1876
|
+
restoreFrozenStates(frozenFocusElements, FOCUS_STYLE_PROPERTIES);
|
|
1877
|
+
pointerEventsStyle?.remove();
|
|
1878
|
+
pointerEventsStyle = null;
|
|
1879
|
+
};
|
|
1880
|
+
|
|
1881
|
+
//#endregion
|
|
1882
|
+
//#region src/utils/get-element-at-position.ts
|
|
1883
|
+
let cache = null;
|
|
1884
|
+
let resumeTimerId = null;
|
|
1885
|
+
const scheduleResume = () => {
|
|
1886
|
+
if (resumeTimerId !== null) clearTimeout(resumeTimerId);
|
|
1887
|
+
resumeTimerId = setTimeout(() => {
|
|
1888
|
+
resumeTimerId = null;
|
|
1889
|
+
resumePointerEventsFreeze();
|
|
1890
|
+
}, 100);
|
|
1891
|
+
};
|
|
1892
|
+
const cancelScheduledResume = () => {
|
|
1893
|
+
if (resumeTimerId !== null) {
|
|
1894
|
+
clearTimeout(resumeTimerId);
|
|
1895
|
+
resumeTimerId = null;
|
|
1896
|
+
}
|
|
1897
|
+
};
|
|
1898
|
+
const isWithinThreshold = (x1, y1, x2, y2) => {
|
|
1899
|
+
const deltaX = Math.abs(x1 - x2);
|
|
1900
|
+
const deltaY = Math.abs(y1 - y2);
|
|
1901
|
+
return deltaX <= 2 && deltaY <= 2;
|
|
1902
|
+
};
|
|
1903
|
+
const getElementsAtPoint = (clientX, clientY) => {
|
|
1904
|
+
cancelScheduledResume();
|
|
1905
|
+
suspendPointerEventsFreeze();
|
|
1906
|
+
const elements = document.elementsFromPoint(clientX, clientY);
|
|
1907
|
+
scheduleResume();
|
|
1908
|
+
return elements;
|
|
1909
|
+
};
|
|
1910
|
+
const getElementAtPosition = (clientX, clientY) => {
|
|
1911
|
+
const now = performance.now();
|
|
1912
|
+
if (cache) {
|
|
1913
|
+
const isPositionClose = isWithinThreshold(clientX, clientY, cache.clientX, cache.clientY);
|
|
1914
|
+
const isWithinThrottle = now - cache.timestamp < 16;
|
|
1915
|
+
if (isPositionClose || isWithinThrottle) return cache.element;
|
|
1916
|
+
}
|
|
1917
|
+
cancelScheduledResume();
|
|
1918
|
+
suspendPointerEventsFreeze();
|
|
1919
|
+
let result = null;
|
|
1920
|
+
const topElement = document.elementFromPoint(clientX, clientY);
|
|
1921
|
+
if (topElement && isValidGrabbableElement(topElement)) result = topElement;
|
|
1922
|
+
else {
|
|
1923
|
+
const elementsAtPoint = document.elementsFromPoint(clientX, clientY);
|
|
1924
|
+
for (const candidateElement of elementsAtPoint) if (candidateElement !== topElement && isValidGrabbableElement(candidateElement)) {
|
|
1925
|
+
result = candidateElement;
|
|
1926
|
+
break;
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
scheduleResume();
|
|
1930
|
+
cache = {
|
|
1931
|
+
clientX,
|
|
1932
|
+
clientY,
|
|
1933
|
+
element: result,
|
|
1934
|
+
timestamp: now
|
|
1935
|
+
};
|
|
1936
|
+
return result;
|
|
1937
|
+
};
|
|
1938
|
+
const clearElementPositionCache = () => {
|
|
1939
|
+
cancelScheduledResume();
|
|
1940
|
+
resumePointerEventsFreeze();
|
|
1941
|
+
cache = null;
|
|
1942
|
+
};
|
|
1943
|
+
|
|
1944
|
+
//#endregion
|
|
1945
|
+
//#region src/utils/open-file.ts
|
|
1946
|
+
const OPEN_FILE_BASE_URL = "http://localhost:3000";
|
|
1947
|
+
const tryDevServerOpen = async (filePath, lineNumber) => {
|
|
1948
|
+
const isNextProject = checkIsNextProject();
|
|
1949
|
+
const params = new URLSearchParams({ file: filePath });
|
|
1950
|
+
const lineKey = isNextProject ? "line1" : "line";
|
|
1951
|
+
const columnKey = isNextProject ? "column1" : "column";
|
|
1952
|
+
if (lineNumber) params.set(lineKey, String(lineNumber));
|
|
1953
|
+
params.set(columnKey, "1");
|
|
1954
|
+
const endpoint = isNextProject ? `${getNextBasePath()}/__nextjs_launch-editor` : "/__open-in-editor";
|
|
1955
|
+
return (await fetch(`${endpoint}?${params}`)).ok;
|
|
1956
|
+
};
|
|
1957
|
+
const openFile = async (filePath, lineNumber, transformUrl) => {
|
|
1958
|
+
filePath = $(filePath);
|
|
1959
|
+
if (await tryDevServerOpen(filePath, lineNumber).catch(() => false)) return;
|
|
1960
|
+
const lineParam = lineNumber ? `&line=${lineNumber}` : "";
|
|
1961
|
+
const rawUrl = `${OPEN_FILE_BASE_URL}/open-file?url=${encodeURIComponent(filePath)}${lineParam}`;
|
|
1962
|
+
const url = transformUrl ? transformUrl(rawUrl, filePath, lineNumber) : rawUrl;
|
|
1963
|
+
window.open(url, "_blank", "noopener,noreferrer");
|
|
1964
|
+
};
|
|
1965
|
+
|
|
1966
|
+
//#endregion
|
|
1967
|
+
//#region src/utils/freeze-gsap.ts
|
|
1968
|
+
let isRafFrozen = false;
|
|
1969
|
+
const pendingRafCallbacks = /* @__PURE__ */ new Map();
|
|
1970
|
+
let nextFakeRafId = -1;
|
|
1971
|
+
const knownAnimationCallbacks = /* @__PURE__ */ new WeakSet();
|
|
1972
|
+
const nativeIdToHeldId = /* @__PURE__ */ new Map();
|
|
1973
|
+
const replayedFakeToNativeId = /* @__PURE__ */ new Map();
|
|
1974
|
+
const isAnimationLibraryCallback = (callback) => {
|
|
1975
|
+
if (knownAnimationCallbacks.has(callback)) return true;
|
|
1976
|
+
if (!isRafFrozen || !("gsapVersions" in window)) return false;
|
|
1977
|
+
if (!((/* @__PURE__ */ new Error()).stack ?? "").includes("_tick")) return false;
|
|
1978
|
+
knownAnimationCallbacks.add(callback);
|
|
1979
|
+
return true;
|
|
1980
|
+
};
|
|
1981
|
+
if (typeof window !== "undefined") {
|
|
1982
|
+
window.requestAnimationFrame = (callback) => {
|
|
1983
|
+
if (!isAnimationLibraryCallback(callback)) return nativeRequestAnimationFrame(callback);
|
|
1984
|
+
if (isRafFrozen) {
|
|
1985
|
+
const identifier = nextFakeRafId--;
|
|
1986
|
+
pendingRafCallbacks.set(identifier, callback);
|
|
1987
|
+
return identifier;
|
|
1988
|
+
}
|
|
1989
|
+
const nativeId = nativeRequestAnimationFrame((timestamp) => {
|
|
1990
|
+
if (isRafFrozen) {
|
|
1991
|
+
const identifier = nextFakeRafId--;
|
|
1992
|
+
pendingRafCallbacks.set(identifier, callback);
|
|
1993
|
+
nativeIdToHeldId.set(nativeId, identifier);
|
|
1994
|
+
return;
|
|
1995
|
+
}
|
|
1996
|
+
callback(timestamp);
|
|
1997
|
+
});
|
|
1998
|
+
return nativeId;
|
|
1999
|
+
};
|
|
2000
|
+
window.cancelAnimationFrame = (identifier) => {
|
|
2001
|
+
if (pendingRafCallbacks.has(identifier)) {
|
|
2002
|
+
pendingRafCallbacks.delete(identifier);
|
|
2003
|
+
return;
|
|
2004
|
+
}
|
|
2005
|
+
const replayed = replayedFakeToNativeId.get(identifier);
|
|
2006
|
+
if (replayed !== void 0) {
|
|
2007
|
+
nativeCancelAnimationFrame(replayed.nativeId);
|
|
2008
|
+
replayedFakeToNativeId.delete(identifier);
|
|
2009
|
+
return;
|
|
2010
|
+
}
|
|
2011
|
+
const heldId = nativeIdToHeldId.get(identifier);
|
|
2012
|
+
if (heldId !== void 0) {
|
|
2013
|
+
pendingRafCallbacks.delete(heldId);
|
|
2014
|
+
nativeIdToHeldId.delete(identifier);
|
|
2015
|
+
return;
|
|
2016
|
+
}
|
|
2017
|
+
nativeCancelAnimationFrame(identifier);
|
|
2018
|
+
};
|
|
2019
|
+
}
|
|
2020
|
+
const freezeGsap = () => {
|
|
2021
|
+
if (isRafFrozen) return;
|
|
2022
|
+
isRafFrozen = true;
|
|
2023
|
+
pendingRafCallbacks.clear();
|
|
2024
|
+
nativeIdToHeldId.clear();
|
|
2025
|
+
for (const [fakeId, { nativeId, callback }] of replayedFakeToNativeId) {
|
|
2026
|
+
nativeCancelAnimationFrame(nativeId);
|
|
2027
|
+
pendingRafCallbacks.set(fakeId, callback);
|
|
2028
|
+
}
|
|
2029
|
+
replayedFakeToNativeId.clear();
|
|
2030
|
+
};
|
|
2031
|
+
const unfreezeGsap = () => {
|
|
2032
|
+
if (!isRafFrozen) return;
|
|
2033
|
+
isRafFrozen = false;
|
|
2034
|
+
for (const [fakeId, callback] of pendingRafCallbacks.entries()) {
|
|
2035
|
+
const nativeId = nativeRequestAnimationFrame((timestamp) => {
|
|
2036
|
+
replayedFakeToNativeId.delete(fakeId);
|
|
2037
|
+
callback(timestamp);
|
|
2038
|
+
});
|
|
2039
|
+
replayedFakeToNativeId.set(fakeId, {
|
|
2040
|
+
nativeId,
|
|
2041
|
+
callback
|
|
2042
|
+
});
|
|
2043
|
+
}
|
|
2044
|
+
pendingRafCallbacks.clear();
|
|
2045
|
+
nativeIdToHeldId.clear();
|
|
2046
|
+
};
|
|
2047
|
+
|
|
2048
|
+
//#endregion
|
|
2049
|
+
//#region src/utils/freeze-animations.ts
|
|
2050
|
+
const FROZEN_STYLES = `
|
|
2051
|
+
[${FROZEN_ELEMENT_ATTRIBUTE}],
|
|
2052
|
+
[${FROZEN_ELEMENT_ATTRIBUTE}] * {
|
|
2053
|
+
animation-play-state: paused !important;
|
|
2054
|
+
transition: none !important;
|
|
2055
|
+
}
|
|
2056
|
+
`;
|
|
2057
|
+
const GLOBAL_FREEZE_STYLES = `
|
|
2058
|
+
*, *::before, *::after {
|
|
2059
|
+
animation-play-state: paused !important;
|
|
2060
|
+
transition: none !important;
|
|
2061
|
+
}
|
|
2062
|
+
`;
|
|
2063
|
+
const SVG_ROOT_SELECTOR = "svg";
|
|
2064
|
+
let styleElement = null;
|
|
2065
|
+
let frozenElements = [];
|
|
2066
|
+
let frozenSvgElements = [];
|
|
2067
|
+
let lastInputElements = [];
|
|
2068
|
+
let globalAnimationStyleElement = null;
|
|
2069
|
+
let globalFrozenSvgElements = [];
|
|
2070
|
+
const svgFreezeDepthMap = /* @__PURE__ */ new Map();
|
|
2071
|
+
let frozenWaapiAnimations = [];
|
|
2072
|
+
const ensureStylesInjected = () => {
|
|
2073
|
+
if (styleElement) return;
|
|
2074
|
+
styleElement = createStyleElement("data-react-grab-frozen-styles", FROZEN_STYLES);
|
|
2075
|
+
};
|
|
2076
|
+
const areElementsSame = (firstElements, secondElements) => firstElements.length === secondElements.length && firstElements.every((currentElement, index) => currentElement === secondElements[index]);
|
|
2077
|
+
const collectFrozenSvgElements = (elements) => {
|
|
2078
|
+
const svgElements = /* @__PURE__ */ new Set();
|
|
2079
|
+
for (const element of elements) {
|
|
2080
|
+
if (element instanceof SVGSVGElement) svgElements.add(element);
|
|
2081
|
+
else if (element instanceof SVGElement && element.ownerSVGElement) svgElements.add(element.ownerSVGElement);
|
|
2082
|
+
for (const innerSvgElement of element.querySelectorAll(SVG_ROOT_SELECTOR)) if (innerSvgElement instanceof SVGSVGElement) svgElements.add(innerSvgElement);
|
|
2083
|
+
}
|
|
2084
|
+
return [...svgElements];
|
|
2085
|
+
};
|
|
2086
|
+
const callSvgAnimationMethod = (svgElement, methodName) => {
|
|
2087
|
+
const animationMethod = Reflect.get(svgElement, methodName);
|
|
2088
|
+
if (typeof animationMethod !== "function") return;
|
|
2089
|
+
animationMethod.call(svgElement);
|
|
2090
|
+
};
|
|
2091
|
+
const pauseSvgAnimations = (svgElements) => {
|
|
2092
|
+
for (const svgElement of svgElements) {
|
|
2093
|
+
const currentFreezeDepth = svgFreezeDepthMap.get(svgElement) ?? 0;
|
|
2094
|
+
if (currentFreezeDepth === 0) callSvgAnimationMethod(svgElement, "pauseAnimations");
|
|
2095
|
+
svgFreezeDepthMap.set(svgElement, currentFreezeDepth + 1);
|
|
2096
|
+
}
|
|
2097
|
+
};
|
|
2098
|
+
const resumeSvgAnimations = (svgElements) => {
|
|
2099
|
+
for (const svgElement of svgElements) {
|
|
2100
|
+
const currentFreezeDepth = svgFreezeDepthMap.get(svgElement);
|
|
2101
|
+
if (!currentFreezeDepth) continue;
|
|
2102
|
+
if (currentFreezeDepth === 1) {
|
|
2103
|
+
svgFreezeDepthMap.delete(svgElement);
|
|
2104
|
+
callSvgAnimationMethod(svgElement, "unpauseAnimations");
|
|
2105
|
+
continue;
|
|
2106
|
+
}
|
|
2107
|
+
svgFreezeDepthMap.set(svgElement, currentFreezeDepth - 1);
|
|
2108
|
+
}
|
|
2109
|
+
};
|
|
2110
|
+
const collectWaapiAnimations = (elements) => {
|
|
2111
|
+
const animations = [];
|
|
2112
|
+
for (const element of elements) for (const animation of element.getAnimations({ subtree: true })) if (animation.playState === "running") animations.push(animation);
|
|
2113
|
+
return animations;
|
|
2114
|
+
};
|
|
2115
|
+
const finishAnimations = (animations) => {
|
|
2116
|
+
for (const animation of animations) try {
|
|
2117
|
+
animation.finish();
|
|
2118
|
+
} catch {}
|
|
2119
|
+
};
|
|
2120
|
+
const freezeAllAnimations = (elements) => {
|
|
2121
|
+
if (elements.length === 0) return;
|
|
2122
|
+
if (areElementsSame(elements, lastInputElements)) return;
|
|
2123
|
+
unfreezeAllAnimations();
|
|
2124
|
+
lastInputElements = [...elements];
|
|
2125
|
+
ensureStylesInjected();
|
|
2126
|
+
frozenElements = elements;
|
|
2127
|
+
frozenSvgElements = collectFrozenSvgElements(frozenElements);
|
|
2128
|
+
pauseSvgAnimations(frozenSvgElements);
|
|
2129
|
+
for (const element of frozenElements) element.setAttribute(FROZEN_ELEMENT_ATTRIBUTE, "");
|
|
2130
|
+
frozenWaapiAnimations = collectWaapiAnimations(frozenElements);
|
|
2131
|
+
for (const animation of frozenWaapiAnimations) animation.pause();
|
|
2132
|
+
};
|
|
2133
|
+
const unfreezeAllAnimations = () => {
|
|
2134
|
+
if (frozenElements.length === 0 && frozenSvgElements.length === 0 && frozenWaapiAnimations.length === 0) return;
|
|
2135
|
+
for (const element of frozenElements) element.removeAttribute(FROZEN_ELEMENT_ATTRIBUTE);
|
|
2136
|
+
resumeSvgAnimations(frozenSvgElements);
|
|
2137
|
+
finishAnimations(frozenWaapiAnimations);
|
|
2138
|
+
frozenElements = [];
|
|
2139
|
+
frozenSvgElements = [];
|
|
2140
|
+
frozenWaapiAnimations = [];
|
|
2141
|
+
lastInputElements = [];
|
|
2142
|
+
};
|
|
2143
|
+
const freezeAnimations = (elements) => {
|
|
2144
|
+
if (elements.length === 0) {
|
|
2145
|
+
unfreezeAllAnimations();
|
|
2146
|
+
return () => {};
|
|
2147
|
+
}
|
|
2148
|
+
freezeAllAnimations(elements);
|
|
2149
|
+
return unfreezeAllAnimations;
|
|
2150
|
+
};
|
|
2151
|
+
const freezeGlobalAnimations = () => {
|
|
2152
|
+
if (globalAnimationStyleElement) return;
|
|
2153
|
+
globalAnimationStyleElement = createStyleElement("data-react-grab-global-freeze", GLOBAL_FREEZE_STYLES);
|
|
2154
|
+
globalFrozenSvgElements = collectFrozenSvgElements(Array.from(document.querySelectorAll(SVG_ROOT_SELECTOR)));
|
|
2155
|
+
pauseSvgAnimations(globalFrozenSvgElements);
|
|
2156
|
+
freezeGsap();
|
|
2157
|
+
};
|
|
2158
|
+
const unfreezeGlobalAnimations = () => {
|
|
2159
|
+
if (!globalAnimationStyleElement) return;
|
|
2160
|
+
globalAnimationStyleElement.textContent = `
|
|
2161
|
+
*, *::before, *::after {
|
|
2162
|
+
transition: none !important;
|
|
2163
|
+
}
|
|
2164
|
+
`;
|
|
2165
|
+
const animations = [];
|
|
2166
|
+
for (const animation of document.getAnimations()) {
|
|
2167
|
+
if (animation.effect instanceof KeyframeEffect) {
|
|
2168
|
+
const target = animation.effect.target;
|
|
2169
|
+
if (target instanceof Element) {
|
|
2170
|
+
if (target.getRootNode() instanceof ShadowRoot) continue;
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
animations.push(animation);
|
|
2174
|
+
}
|
|
2175
|
+
finishAnimations(animations);
|
|
2176
|
+
globalAnimationStyleElement.remove();
|
|
2177
|
+
globalAnimationStyleElement = null;
|
|
2178
|
+
resumeSvgAnimations(globalFrozenSvgElements);
|
|
2179
|
+
globalFrozenSvgElements = [];
|
|
2180
|
+
unfreezeGsap();
|
|
2181
|
+
};
|
|
2182
|
+
|
|
2183
|
+
//#endregion
|
|
2184
|
+
//#region src/utils/log-recoverable-error.ts
|
|
2185
|
+
const logRecoverableError = (context, error) => {
|
|
2186
|
+
console.warn(`[react-grab] ${context}:`, error);
|
|
2187
|
+
};
|
|
2188
|
+
|
|
2189
|
+
//#endregion
|
|
2190
|
+
//#region src/utils/freeze-updates.ts
|
|
2191
|
+
let isUpdatesPaused = false;
|
|
2192
|
+
const getOrCache = (cache, key, create) => {
|
|
2193
|
+
const cached = cache.get(key);
|
|
2194
|
+
if (cached) return cached;
|
|
2195
|
+
const value = create();
|
|
2196
|
+
cache.set(key, value);
|
|
2197
|
+
return value;
|
|
2198
|
+
};
|
|
2199
|
+
const patchedDispatchers = /* @__PURE__ */ new WeakMap();
|
|
2200
|
+
const wrappedDispatchCache = /* @__PURE__ */ new WeakMap();
|
|
2201
|
+
const wrappedStartTransitionCache = /* @__PURE__ */ new WeakMap();
|
|
2202
|
+
const pendingStoreCallbacks = /* @__PURE__ */ new Set();
|
|
2203
|
+
const pendingTransitionCallbacks = [];
|
|
2204
|
+
const pendingStateUpdates = [];
|
|
2205
|
+
const pausedQueueStates = /* @__PURE__ */ new WeakMap();
|
|
2206
|
+
const pausedContextStates = /* @__PURE__ */ new WeakMap();
|
|
2207
|
+
const renderersWithPatchedDispatcher = /* @__PURE__ */ new WeakSet();
|
|
2208
|
+
const typedFiberRoots = $$1;
|
|
2209
|
+
const getFiberRoot = (fiber) => {
|
|
2210
|
+
let current = fiber;
|
|
2211
|
+
while (current.return) current = current.return;
|
|
2212
|
+
return current.stateNode ?? null;
|
|
2213
|
+
};
|
|
2214
|
+
const collectFiberRoots = () => {
|
|
2215
|
+
if (typedFiberRoots.size > 0) return typedFiberRoots;
|
|
2216
|
+
const collectedRoots = /* @__PURE__ */ new Set();
|
|
2217
|
+
const traverseDOM = (element) => {
|
|
2218
|
+
const fiber = Z$1(element);
|
|
2219
|
+
if (fiber) {
|
|
2220
|
+
const fiberRoot = getFiberRoot(fiber);
|
|
2221
|
+
if (fiberRoot) collectedRoots.add(fiberRoot);
|
|
2222
|
+
return;
|
|
2223
|
+
}
|
|
2224
|
+
for (const childElement of Array.from(element.children)) {
|
|
2225
|
+
traverseDOM(childElement);
|
|
2226
|
+
if (collectedRoots.size > 0) return;
|
|
2227
|
+
}
|
|
2228
|
+
};
|
|
2229
|
+
traverseDOM(document.body);
|
|
2230
|
+
return collectedRoots;
|
|
2231
|
+
};
|
|
2232
|
+
const mergePendingChains = (original, buffered) => {
|
|
2233
|
+
if (!original) return buffered;
|
|
2234
|
+
if (!buffered) return original;
|
|
2235
|
+
if (!original.next || !buffered.next) return buffered;
|
|
2236
|
+
const originalFirst = original.next;
|
|
2237
|
+
const bufferedFirst = buffered.next;
|
|
2238
|
+
const isOriginalSingle = original === originalFirst;
|
|
2239
|
+
const isBufferedSingle = buffered === bufferedFirst;
|
|
2240
|
+
if (isOriginalSingle && isBufferedSingle) {
|
|
2241
|
+
original.next = buffered;
|
|
2242
|
+
buffered.next = original;
|
|
2243
|
+
} else if (isOriginalSingle) {
|
|
2244
|
+
original.next = bufferedFirst;
|
|
2245
|
+
buffered.next = original;
|
|
2246
|
+
} else if (isBufferedSingle) {
|
|
2247
|
+
buffered.next = originalFirst;
|
|
2248
|
+
original.next = buffered;
|
|
2249
|
+
} else {
|
|
2250
|
+
original.next = bufferedFirst;
|
|
2251
|
+
buffered.next = originalFirst;
|
|
2252
|
+
}
|
|
2253
|
+
return buffered;
|
|
2254
|
+
};
|
|
2255
|
+
const pauseHookQueue = (queue) => {
|
|
2256
|
+
if (!queue || pausedQueueStates.has(queue)) return;
|
|
2257
|
+
const pauseState = {
|
|
2258
|
+
originalPendingDescriptor: Object.getOwnPropertyDescriptor(queue, "pending"),
|
|
2259
|
+
pendingValueAtPause: queue.pending,
|
|
2260
|
+
bufferedPending: null
|
|
2261
|
+
};
|
|
2262
|
+
if (typeof queue.getSnapshot === "function") {
|
|
2263
|
+
pauseState.originalGetSnapshot = queue.getSnapshot;
|
|
2264
|
+
pauseState.snapshotValueAtPause = queue.getSnapshot();
|
|
2265
|
+
queue.getSnapshot = () => isUpdatesPaused ? pauseState.snapshotValueAtPause : pauseState.originalGetSnapshot();
|
|
2266
|
+
}
|
|
2267
|
+
let currentPendingValue = pauseState.pendingValueAtPause;
|
|
2268
|
+
Object.defineProperty(queue, "pending", {
|
|
2269
|
+
configurable: true,
|
|
2270
|
+
enumerable: true,
|
|
2271
|
+
get: () => isUpdatesPaused ? null : currentPendingValue,
|
|
2272
|
+
set: (newValue) => {
|
|
2273
|
+
if (isUpdatesPaused) {
|
|
2274
|
+
if (newValue !== null) pauseState.bufferedPending = mergePendingChains(pauseState.bufferedPending ?? null, newValue);
|
|
2275
|
+
return;
|
|
2276
|
+
}
|
|
2277
|
+
currentPendingValue = newValue;
|
|
2278
|
+
}
|
|
2279
|
+
});
|
|
2280
|
+
pausedQueueStates.set(queue, pauseState);
|
|
2281
|
+
};
|
|
2282
|
+
const extractActionsFromChain = (pending) => {
|
|
2283
|
+
if (!pending) return [];
|
|
2284
|
+
const actions = [];
|
|
2285
|
+
const first = pending.next;
|
|
2286
|
+
if (!first) return [];
|
|
2287
|
+
let current = first;
|
|
2288
|
+
do
|
|
2289
|
+
if (current) {
|
|
2290
|
+
actions.push(current.action);
|
|
2291
|
+
current = current.next;
|
|
2292
|
+
}
|
|
2293
|
+
while (current && current !== first);
|
|
2294
|
+
return actions;
|
|
2295
|
+
};
|
|
2296
|
+
const resumeHookQueue = (queue) => {
|
|
2297
|
+
const pauseState = pausedQueueStates.get(queue);
|
|
2298
|
+
if (!pauseState) return;
|
|
2299
|
+
if (pauseState.originalGetSnapshot) queue.getSnapshot = pauseState.originalGetSnapshot;
|
|
2300
|
+
if (pauseState.originalPendingDescriptor) Object.defineProperty(queue, "pending", pauseState.originalPendingDescriptor);
|
|
2301
|
+
else delete queue.pending;
|
|
2302
|
+
queue.pending = null;
|
|
2303
|
+
const dispatch = queue.dispatch;
|
|
2304
|
+
if (typeof dispatch === "function") {
|
|
2305
|
+
const pendingActions = extractActionsFromChain(pauseState.pendingValueAtPause ?? null);
|
|
2306
|
+
const bufferedActions = extractActionsFromChain(pauseState.bufferedPending ?? null);
|
|
2307
|
+
for (const action of [...pendingActions, ...bufferedActions]) pendingStateUpdates.push(() => dispatch(action));
|
|
2308
|
+
}
|
|
2309
|
+
pausedQueueStates.delete(queue);
|
|
2310
|
+
};
|
|
2311
|
+
const pauseContextDependency = (contextDependency) => {
|
|
2312
|
+
if (pausedContextStates.has(contextDependency)) return;
|
|
2313
|
+
const pauseState = {
|
|
2314
|
+
originalDescriptor: Object.getOwnPropertyDescriptor(contextDependency, "memoizedValue"),
|
|
2315
|
+
frozenValue: contextDependency.memoizedValue
|
|
2316
|
+
};
|
|
2317
|
+
Object.defineProperty(contextDependency, "memoizedValue", {
|
|
2318
|
+
configurable: true,
|
|
2319
|
+
enumerable: true,
|
|
2320
|
+
get() {
|
|
2321
|
+
if (isUpdatesPaused) return pauseState.frozenValue;
|
|
2322
|
+
if (pauseState.originalDescriptor?.get) return pauseState.originalDescriptor.get.call(this);
|
|
2323
|
+
return this._memoizedValue;
|
|
2324
|
+
},
|
|
2325
|
+
set(value) {
|
|
2326
|
+
if (isUpdatesPaused) {
|
|
2327
|
+
pauseState.pendingValue = value;
|
|
2328
|
+
pauseState.didReceivePendingValue = true;
|
|
2329
|
+
return;
|
|
2330
|
+
}
|
|
2331
|
+
if (pauseState.originalDescriptor?.set) pauseState.originalDescriptor.set.call(this, value);
|
|
2332
|
+
else this._memoizedValue = value;
|
|
2333
|
+
}
|
|
2334
|
+
});
|
|
2335
|
+
if (!pauseState.originalDescriptor?.get) contextDependency._memoizedValue = pauseState.frozenValue;
|
|
2336
|
+
pausedContextStates.set(contextDependency, pauseState);
|
|
2337
|
+
};
|
|
2338
|
+
const resumeContextDependency = (contextDependency) => {
|
|
2339
|
+
const pauseState = pausedContextStates.get(contextDependency);
|
|
2340
|
+
if (!pauseState) return;
|
|
2341
|
+
if (pauseState.originalDescriptor) Object.defineProperty(contextDependency, "memoizedValue", pauseState.originalDescriptor);
|
|
2342
|
+
else delete contextDependency.memoizedValue;
|
|
2343
|
+
if (pauseState.didReceivePendingValue) contextDependency.memoizedValue = pauseState.pendingValue;
|
|
2344
|
+
pausedContextStates.delete(contextDependency);
|
|
2345
|
+
};
|
|
2346
|
+
const forEachHookQueue = (fiber, callback) => {
|
|
2347
|
+
let hookState = fiber.memoizedState;
|
|
2348
|
+
while (hookState) {
|
|
2349
|
+
if (hookState.queue && typeof hookState.queue === "object") callback(hookState.queue);
|
|
2350
|
+
hookState = hookState.next;
|
|
2351
|
+
}
|
|
2352
|
+
};
|
|
2353
|
+
const forEachContextDependency = (fiber, callback) => {
|
|
2354
|
+
let contextDependency = fiber.dependencies?.firstContext;
|
|
2355
|
+
while (contextDependency && typeof contextDependency === "object" && "memoizedValue" in contextDependency) {
|
|
2356
|
+
callback(contextDependency);
|
|
2357
|
+
contextDependency = contextDependency.next;
|
|
2358
|
+
}
|
|
2359
|
+
};
|
|
2360
|
+
const traverseFibers = (fiber, onCompositeFiber) => {
|
|
2361
|
+
if (!fiber) return;
|
|
2362
|
+
if (ve$1(fiber)) onCompositeFiber(fiber);
|
|
2363
|
+
traverseFibers(fiber.child, onCompositeFiber);
|
|
2364
|
+
traverseFibers(fiber.sibling, onCompositeFiber);
|
|
2365
|
+
};
|
|
2366
|
+
const pauseFiber = (fiber) => {
|
|
2367
|
+
forEachHookQueue(fiber, pauseHookQueue);
|
|
2368
|
+
forEachContextDependency(fiber, pauseContextDependency);
|
|
2369
|
+
};
|
|
2370
|
+
const resumeFiber = (fiber) => {
|
|
2371
|
+
forEachHookQueue(fiber, resumeHookQueue);
|
|
2372
|
+
forEachContextDependency(fiber, resumeContextDependency);
|
|
2373
|
+
};
|
|
2374
|
+
const patchDispatcher = (dispatcher) => {
|
|
2375
|
+
if (patchedDispatchers.has(dispatcher)) return;
|
|
2376
|
+
const typedDispatcher = dispatcher;
|
|
2377
|
+
const originalHooks = {
|
|
2378
|
+
useState: typedDispatcher.useState,
|
|
2379
|
+
useReducer: typedDispatcher.useReducer,
|
|
2380
|
+
useTransition: typedDispatcher.useTransition,
|
|
2381
|
+
useSyncExternalStore: typedDispatcher.useSyncExternalStore
|
|
2382
|
+
};
|
|
2383
|
+
patchedDispatchers.set(dispatcher, originalHooks);
|
|
2384
|
+
typedDispatcher.useState = (...args) => {
|
|
2385
|
+
const result = originalHooks.useState.apply(dispatcher, args);
|
|
2386
|
+
if (!isUpdatesPaused) return result;
|
|
2387
|
+
if (!Array.isArray(result) || typeof result[1] !== "function") return result;
|
|
2388
|
+
const [state, dispatch] = result;
|
|
2389
|
+
return [state, getOrCache(wrappedDispatchCache, dispatch, () => (...dispatchArgs) => {
|
|
2390
|
+
if (isUpdatesPaused) pendingStateUpdates.push(() => dispatch(...dispatchArgs));
|
|
2391
|
+
else dispatch(...dispatchArgs);
|
|
2392
|
+
})];
|
|
2393
|
+
};
|
|
2394
|
+
typedDispatcher.useReducer = (...args) => {
|
|
2395
|
+
const result = originalHooks.useReducer.apply(dispatcher, args);
|
|
2396
|
+
if (!isUpdatesPaused) return result;
|
|
2397
|
+
if (!Array.isArray(result) || typeof result[1] !== "function") return result;
|
|
2398
|
+
const [state, dispatch] = result;
|
|
2399
|
+
return [state, getOrCache(wrappedDispatchCache, dispatch, () => (...dispatchArgs) => {
|
|
2400
|
+
if (isUpdatesPaused) pendingStateUpdates.push(() => dispatch(...dispatchArgs));
|
|
2401
|
+
else dispatch(...dispatchArgs);
|
|
2402
|
+
})];
|
|
2403
|
+
};
|
|
2404
|
+
typedDispatcher.useTransition = (...args) => {
|
|
2405
|
+
const result = originalHooks.useTransition.apply(dispatcher, args);
|
|
2406
|
+
if (!isUpdatesPaused) return result;
|
|
2407
|
+
if (!Array.isArray(result) || typeof result[1] !== "function") return result;
|
|
2408
|
+
const [isPending, startTransition] = result;
|
|
2409
|
+
return [isPending, getOrCache(wrappedStartTransitionCache, startTransition, () => (transitionCallback) => {
|
|
2410
|
+
if (isUpdatesPaused) pendingTransitionCallbacks.push(() => startTransition(transitionCallback));
|
|
2411
|
+
else startTransition(transitionCallback);
|
|
2412
|
+
})];
|
|
2413
|
+
};
|
|
2414
|
+
typedDispatcher.useSyncExternalStore = ((subscribe, getSnapshot, getServerSnapshot) => {
|
|
2415
|
+
if (!isUpdatesPaused) return originalHooks.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
2416
|
+
const wrappedSubscribe = (onChange) => subscribe(() => {
|
|
2417
|
+
if (isUpdatesPaused) pendingStoreCallbacks.add(onChange);
|
|
2418
|
+
else onChange();
|
|
2419
|
+
});
|
|
2420
|
+
return originalHooks.useSyncExternalStore(wrappedSubscribe, getSnapshot, getServerSnapshot);
|
|
2421
|
+
});
|
|
2422
|
+
};
|
|
2423
|
+
const installDispatcherPatching = (renderer) => {
|
|
2424
|
+
const dispatcherRef = renderer.currentDispatcherRef;
|
|
2425
|
+
if (!dispatcherRef || typeof dispatcherRef !== "object") return;
|
|
2426
|
+
const dispatcherKey = "H" in dispatcherRef ? "H" : "current";
|
|
2427
|
+
let currentDispatcher = dispatcherRef[dispatcherKey];
|
|
2428
|
+
Object.defineProperty(dispatcherRef, dispatcherKey, {
|
|
2429
|
+
configurable: true,
|
|
2430
|
+
enumerable: true,
|
|
2431
|
+
get: () => {
|
|
2432
|
+
if (currentDispatcher && typeof currentDispatcher === "object") patchDispatcher(currentDispatcher);
|
|
2433
|
+
return currentDispatcher;
|
|
2434
|
+
},
|
|
2435
|
+
set: (newDispatcher) => {
|
|
2436
|
+
currentDispatcher = newDispatcher;
|
|
2437
|
+
}
|
|
2438
|
+
});
|
|
2439
|
+
};
|
|
2440
|
+
const scheduleReactUpdate = (fiberRoots) => {
|
|
2441
|
+
queueMicrotask(() => {
|
|
2442
|
+
try {
|
|
2443
|
+
for (const renderer of h$2().renderers.values()) {
|
|
2444
|
+
if (typeof renderer.scheduleUpdate !== "function") continue;
|
|
2445
|
+
for (const fiberRoot of fiberRoots) if (fiberRoot.current) try {
|
|
2446
|
+
renderer.scheduleUpdate(fiberRoot.current);
|
|
2447
|
+
} catch (error) {
|
|
2448
|
+
logRecoverableError("scheduleUpdate failed during unfreeze", error);
|
|
2449
|
+
}
|
|
2450
|
+
}
|
|
2451
|
+
} catch (error) {
|
|
2452
|
+
logRecoverableError("scheduleReactUpdate failed", error);
|
|
2453
|
+
}
|
|
2454
|
+
});
|
|
2455
|
+
};
|
|
2456
|
+
const invokeCallbacks = (callbacks) => {
|
|
2457
|
+
for (const callback of callbacks) try {
|
|
2458
|
+
callback();
|
|
2459
|
+
} catch (error) {
|
|
2460
|
+
logRecoverableError("Callback failed during state replay", error);
|
|
2461
|
+
}
|
|
2462
|
+
};
|
|
2463
|
+
const initializeFreezeSupport = () => {
|
|
2464
|
+
for (const renderer of h$2().renderers.values()) {
|
|
2465
|
+
if (renderersWithPatchedDispatcher.has(renderer)) continue;
|
|
2466
|
+
installDispatcherPatching(renderer);
|
|
2467
|
+
renderersWithPatchedDispatcher.add(renderer);
|
|
2468
|
+
}
|
|
2469
|
+
};
|
|
2470
|
+
const freezeUpdates = () => {
|
|
2471
|
+
if (isUpdatesPaused) return () => {};
|
|
2472
|
+
initializeFreezeSupport();
|
|
2473
|
+
isUpdatesPaused = true;
|
|
2474
|
+
const fiberRoots = collectFiberRoots();
|
|
2475
|
+
for (const fiberRoot of fiberRoots) traverseFibers(fiberRoot.current, pauseFiber);
|
|
2476
|
+
return () => {
|
|
2477
|
+
if (!isUpdatesPaused) return;
|
|
2478
|
+
try {
|
|
2479
|
+
const fiberRootsToResume = collectFiberRoots();
|
|
2480
|
+
for (const fiberRoot of fiberRootsToResume) traverseFibers(fiberRoot.current, resumeFiber);
|
|
2481
|
+
const storeCallbacksToInvoke = Array.from(pendingStoreCallbacks);
|
|
2482
|
+
const transitionCallbacksToInvoke = pendingTransitionCallbacks.slice();
|
|
2483
|
+
const stateUpdatesToInvoke = pendingStateUpdates.slice();
|
|
2484
|
+
isUpdatesPaused = false;
|
|
2485
|
+
invokeCallbacks(storeCallbacksToInvoke);
|
|
2486
|
+
invokeCallbacks(transitionCallbacksToInvoke);
|
|
2487
|
+
invokeCallbacks(stateUpdatesToInvoke);
|
|
2488
|
+
scheduleReactUpdate(fiberRootsToResume);
|
|
2489
|
+
} finally {
|
|
2490
|
+
pendingStoreCallbacks.clear();
|
|
2491
|
+
pendingTransitionCallbacks.length = 0;
|
|
2492
|
+
pendingStateUpdates.length = 0;
|
|
2493
|
+
}
|
|
2494
|
+
};
|
|
2495
|
+
};
|
|
2496
|
+
|
|
2497
|
+
//#endregion
|
|
2498
|
+
export { OVERLAY_BORDER_COLOR_DRAG as $, waitUntilNextFrame as A, DROPDOWN_OFFSCREEN_POSITION as B, getStack as C, Z$1 as D, Te as E, ARROW_MAX_LABEL_WIDTH_RATIO as F, MAX_SELECTOR_COMBINATIONS as G, FROZEN_GLOW_COLOR as H, DEFAULT_ACTION_ID as I, MOUNT_ROOT_RECHECK_DELAY_MS as J, MAX_SESSION_STORAGE_SIZE_BYTES as K, DRAG_LERP_FACTOR as L, detectCspNonce as M, getTagName as N, nativeCancelAnimationFrame as O, ARROW_KEYS as P, OVERLAY_BORDER_COLOR_DEFAULT as Q, DRAG_SELECTION_COVERAGE_THRESHOLD as R, getNearestComponentName as S, resolveSource as T, HINT_FLIP_IN_ANIMATION as U, FEEDBACK_DURATION_MS as V, LERP_CONVERGENCE_THRESHOLD_PX as W, OFFSCREEN_POSITION as X, NEXTJS_REVALIDATION_DELAY_MS as Y, OPACITY_CONVERGENCE_THRESHOLD as Z, isRootElement as _, freezeGlobalAnimations as a, SELECTION_HINT_CYCLE_INTERVAL_MS as at, getElementContext as b, clearElementPositionCache as c, TOOLBAR_DEFAULT_POSITION_RATIO as ct, freezePseudoStates as d, VERSION as dt, OVERLAY_BORDER_COLOR_INSPECT as et, resumePointerEventsFreeze as f, ZOOM_DETECTION_THRESHOLD as ft, isValidGrabbableElement as g, clearVisibilityCache as h, supportsDisplayP3 as ht, freezeAnimations as i, RELEVANT_CSS_PROPERTIES as it, hideFromThirdParties as j, nativeRequestAnimationFrame as k, getElementAtPosition as l, TOOLBAR_SHAKE_TOOLTIP_DURATION_MS as lt, unfreezePseudoStates as m, Z_INDEX_OVERLAY_CANVAS as mt, logRecoverableError as n, OVERLAY_FILL_COLOR_DRAG as nt, unfreezeGlobalAnimations as o, SELECTION_LABEL_OFFSCREEN_PX as ot, suspendPointerEventsFreeze as p, Z_INDEX_OVERLAY as pt, MODIFIER_KEYS as q, freezeAllAnimations as r, OVERLAY_FILL_COLOR_INSPECT as rt, openFile as s, SELECTION_LERP_FACTOR as st, freezeUpdates as t, OVERLAY_FILL_COLOR_DEFAULT as tt, getElementsAtPoint as u, TOOLTIP_BASE_CLASS as ut, checkIsNextProject as v, getStackContext as w, getHTMLPreview as x, getComponentDisplayName as y, DROPDOWN_EDGE_TRANSFORM_ORIGIN as z };
|