@forgeax/view 0.2.1-beta-20260924075842

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.
Files changed (585) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +742 -0
  3. package/dist/modules/backend.mjs +54 -0
  4. package/dist/modules/backend.mjs.map +7 -0
  5. package/dist/modules/browser.mjs +180 -0
  6. package/dist/modules/browser.mjs.map +7 -0
  7. package/dist/modules/carrier-contract.mjs +38 -0
  8. package/dist/modules/carrier-contract.mjs.map +7 -0
  9. package/dist/modules/carrier.mjs +13 -0
  10. package/dist/modules/carrier.mjs.map +7 -0
  11. package/dist/modules/chunks/chunk-2ASWB6IX.mjs +225 -0
  12. package/dist/modules/chunks/chunk-2ASWB6IX.mjs.map +7 -0
  13. package/dist/modules/chunks/chunk-2IJKOG2F.mjs +801 -0
  14. package/dist/modules/chunks/chunk-2IJKOG2F.mjs.map +7 -0
  15. package/dist/modules/chunks/chunk-2K3BBJ5S.mjs +9 -0
  16. package/dist/modules/chunks/chunk-2K3BBJ5S.mjs.map +7 -0
  17. package/dist/modules/chunks/chunk-32GD5LL6.mjs +482 -0
  18. package/dist/modules/chunks/chunk-32GD5LL6.mjs.map +7 -0
  19. package/dist/modules/chunks/chunk-3B4KFAEC.mjs +10 -0
  20. package/dist/modules/chunks/chunk-3B4KFAEC.mjs.map +7 -0
  21. package/dist/modules/chunks/chunk-46O5WX43.mjs +25 -0
  22. package/dist/modules/chunks/chunk-46O5WX43.mjs.map +7 -0
  23. package/dist/modules/chunks/chunk-47J5JXAB.mjs +237 -0
  24. package/dist/modules/chunks/chunk-47J5JXAB.mjs.map +7 -0
  25. package/dist/modules/chunks/chunk-4BXQOUDQ.mjs +17 -0
  26. package/dist/modules/chunks/chunk-4BXQOUDQ.mjs.map +7 -0
  27. package/dist/modules/chunks/chunk-4GQWYU2V.mjs +126 -0
  28. package/dist/modules/chunks/chunk-4GQWYU2V.mjs.map +7 -0
  29. package/dist/modules/chunks/chunk-4N5X2PRQ.mjs +48 -0
  30. package/dist/modules/chunks/chunk-4N5X2PRQ.mjs.map +7 -0
  31. package/dist/modules/chunks/chunk-4WXD2KYX.mjs +56 -0
  32. package/dist/modules/chunks/chunk-4WXD2KYX.mjs.map +7 -0
  33. package/dist/modules/chunks/chunk-6ZWWVAZK.mjs +468 -0
  34. package/dist/modules/chunks/chunk-6ZWWVAZK.mjs.map +7 -0
  35. package/dist/modules/chunks/chunk-73UZNRHN.mjs +296 -0
  36. package/dist/modules/chunks/chunk-73UZNRHN.mjs.map +7 -0
  37. package/dist/modules/chunks/chunk-7ITLCRND.mjs +10 -0
  38. package/dist/modules/chunks/chunk-7ITLCRND.mjs.map +7 -0
  39. package/dist/modules/chunks/chunk-7TGVWKH7.mjs +59 -0
  40. package/dist/modules/chunks/chunk-7TGVWKH7.mjs.map +7 -0
  41. package/dist/modules/chunks/chunk-7URFF53W.mjs +42 -0
  42. package/dist/modules/chunks/chunk-7URFF53W.mjs.map +7 -0
  43. package/dist/modules/chunks/chunk-7YSDRIFN.mjs +14 -0
  44. package/dist/modules/chunks/chunk-7YSDRIFN.mjs.map +7 -0
  45. package/dist/modules/chunks/chunk-AAFVCQPK.mjs +52 -0
  46. package/dist/modules/chunks/chunk-AAFVCQPK.mjs.map +7 -0
  47. package/dist/modules/chunks/chunk-AEK7ZESQ.mjs +18 -0
  48. package/dist/modules/chunks/chunk-AEK7ZESQ.mjs.map +7 -0
  49. package/dist/modules/chunks/chunk-AL6ZWIEU.mjs +42 -0
  50. package/dist/modules/chunks/chunk-AL6ZWIEU.mjs.map +7 -0
  51. package/dist/modules/chunks/chunk-ALT7XVMQ.mjs +73 -0
  52. package/dist/modules/chunks/chunk-ALT7XVMQ.mjs.map +7 -0
  53. package/dist/modules/chunks/chunk-ASI2HBE6.mjs +116 -0
  54. package/dist/modules/chunks/chunk-ASI2HBE6.mjs.map +7 -0
  55. package/dist/modules/chunks/chunk-ATWGCH7I.mjs +174 -0
  56. package/dist/modules/chunks/chunk-ATWGCH7I.mjs.map +7 -0
  57. package/dist/modules/chunks/chunk-C45U6IIY.mjs +692 -0
  58. package/dist/modules/chunks/chunk-C45U6IIY.mjs.map +7 -0
  59. package/dist/modules/chunks/chunk-C7R3YRA7.mjs +98 -0
  60. package/dist/modules/chunks/chunk-C7R3YRA7.mjs.map +7 -0
  61. package/dist/modules/chunks/chunk-CRMICXKN.mjs +87 -0
  62. package/dist/modules/chunks/chunk-CRMICXKN.mjs.map +7 -0
  63. package/dist/modules/chunks/chunk-CUH2G6UF.mjs +81 -0
  64. package/dist/modules/chunks/chunk-CUH2G6UF.mjs.map +7 -0
  65. package/dist/modules/chunks/chunk-D7GWRZLL.mjs +77 -0
  66. package/dist/modules/chunks/chunk-D7GWRZLL.mjs.map +7 -0
  67. package/dist/modules/chunks/chunk-DBWUIBE3.mjs +10 -0
  68. package/dist/modules/chunks/chunk-DBWUIBE3.mjs.map +7 -0
  69. package/dist/modules/chunks/chunk-DQWVWWUU.mjs +77 -0
  70. package/dist/modules/chunks/chunk-DQWVWWUU.mjs.map +7 -0
  71. package/dist/modules/chunks/chunk-DZZ2WFEU.mjs +122 -0
  72. package/dist/modules/chunks/chunk-DZZ2WFEU.mjs.map +7 -0
  73. package/dist/modules/chunks/chunk-E4UIAN26.mjs +58 -0
  74. package/dist/modules/chunks/chunk-E4UIAN26.mjs.map +7 -0
  75. package/dist/modules/chunks/chunk-EJGBVKFE.mjs +77 -0
  76. package/dist/modules/chunks/chunk-EJGBVKFE.mjs.map +7 -0
  77. package/dist/modules/chunks/chunk-EPSTTHWV.mjs +173 -0
  78. package/dist/modules/chunks/chunk-EPSTTHWV.mjs.map +7 -0
  79. package/dist/modules/chunks/chunk-ER7T6QJ3.mjs +64 -0
  80. package/dist/modules/chunks/chunk-ER7T6QJ3.mjs.map +7 -0
  81. package/dist/modules/chunks/chunk-FD4BAJ6K.mjs +389 -0
  82. package/dist/modules/chunks/chunk-FD4BAJ6K.mjs.map +7 -0
  83. package/dist/modules/chunks/chunk-FJM6WWIY.mjs +80 -0
  84. package/dist/modules/chunks/chunk-FJM6WWIY.mjs.map +7 -0
  85. package/dist/modules/chunks/chunk-FKCQYDLX.mjs +162 -0
  86. package/dist/modules/chunks/chunk-FKCQYDLX.mjs.map +7 -0
  87. package/dist/modules/chunks/chunk-FLGC65SR.mjs +10 -0
  88. package/dist/modules/chunks/chunk-FLGC65SR.mjs.map +7 -0
  89. package/dist/modules/chunks/chunk-FMCACPX5.mjs +289 -0
  90. package/dist/modules/chunks/chunk-FMCACPX5.mjs.map +7 -0
  91. package/dist/modules/chunks/chunk-FOBRLUQV.mjs +51 -0
  92. package/dist/modules/chunks/chunk-FOBRLUQV.mjs.map +7 -0
  93. package/dist/modules/chunks/chunk-FV3DSKZB.mjs +33 -0
  94. package/dist/modules/chunks/chunk-FV3DSKZB.mjs.map +7 -0
  95. package/dist/modules/chunks/chunk-G7BAFAGO.mjs +98 -0
  96. package/dist/modules/chunks/chunk-G7BAFAGO.mjs.map +7 -0
  97. package/dist/modules/chunks/chunk-GQBZMCTK.mjs +145 -0
  98. package/dist/modules/chunks/chunk-GQBZMCTK.mjs.map +7 -0
  99. package/dist/modules/chunks/chunk-GYWIY7AL.mjs +131 -0
  100. package/dist/modules/chunks/chunk-GYWIY7AL.mjs.map +7 -0
  101. package/dist/modules/chunks/chunk-H3KNBALD.mjs +256 -0
  102. package/dist/modules/chunks/chunk-H3KNBALD.mjs.map +7 -0
  103. package/dist/modules/chunks/chunk-H3M22JDL.mjs +144 -0
  104. package/dist/modules/chunks/chunk-H3M22JDL.mjs.map +7 -0
  105. package/dist/modules/chunks/chunk-HES3DNTM.mjs +40 -0
  106. package/dist/modules/chunks/chunk-HES3DNTM.mjs.map +7 -0
  107. package/dist/modules/chunks/chunk-I5BFP7SS.mjs +2392 -0
  108. package/dist/modules/chunks/chunk-I5BFP7SS.mjs.map +7 -0
  109. package/dist/modules/chunks/chunk-IGRMZYRD.mjs +15 -0
  110. package/dist/modules/chunks/chunk-IGRMZYRD.mjs.map +7 -0
  111. package/dist/modules/chunks/chunk-IKNGC766.mjs +321 -0
  112. package/dist/modules/chunks/chunk-IKNGC766.mjs.map +7 -0
  113. package/dist/modules/chunks/chunk-IVHNYKZB.mjs +35 -0
  114. package/dist/modules/chunks/chunk-IVHNYKZB.mjs.map +7 -0
  115. package/dist/modules/chunks/chunk-JHOURMYW.mjs +101 -0
  116. package/dist/modules/chunks/chunk-JHOURMYW.mjs.map +7 -0
  117. package/dist/modules/chunks/chunk-JURXMRFA.mjs +282 -0
  118. package/dist/modules/chunks/chunk-JURXMRFA.mjs.map +7 -0
  119. package/dist/modules/chunks/chunk-JWZIREC3.mjs +18 -0
  120. package/dist/modules/chunks/chunk-JWZIREC3.mjs.map +7 -0
  121. package/dist/modules/chunks/chunk-KHRTIZ56.mjs +1400 -0
  122. package/dist/modules/chunks/chunk-KHRTIZ56.mjs.map +7 -0
  123. package/dist/modules/chunks/chunk-KLJZZ23J.mjs +102 -0
  124. package/dist/modules/chunks/chunk-KLJZZ23J.mjs.map +7 -0
  125. package/dist/modules/chunks/chunk-KNBAYU5I.mjs +49 -0
  126. package/dist/modules/chunks/chunk-KNBAYU5I.mjs.map +7 -0
  127. package/dist/modules/chunks/chunk-KSZNCFU4.mjs +125 -0
  128. package/dist/modules/chunks/chunk-KSZNCFU4.mjs.map +7 -0
  129. package/dist/modules/chunks/chunk-L45W6KM6.mjs +158 -0
  130. package/dist/modules/chunks/chunk-L45W6KM6.mjs.map +7 -0
  131. package/dist/modules/chunks/chunk-LERMYZRC.mjs +239 -0
  132. package/dist/modules/chunks/chunk-LERMYZRC.mjs.map +7 -0
  133. package/dist/modules/chunks/chunk-LKJCXYSJ.mjs +91 -0
  134. package/dist/modules/chunks/chunk-LKJCXYSJ.mjs.map +7 -0
  135. package/dist/modules/chunks/chunk-MBS3EICT.mjs +25 -0
  136. package/dist/modules/chunks/chunk-MBS3EICT.mjs.map +7 -0
  137. package/dist/modules/chunks/chunk-MUOQZPVH.mjs +609 -0
  138. package/dist/modules/chunks/chunk-MUOQZPVH.mjs.map +7 -0
  139. package/dist/modules/chunks/chunk-MVEPGFSB.mjs +1 -0
  140. package/dist/modules/chunks/chunk-MVEPGFSB.mjs.map +7 -0
  141. package/dist/modules/chunks/chunk-NBJKLWJ5.mjs +42 -0
  142. package/dist/modules/chunks/chunk-NBJKLWJ5.mjs.map +7 -0
  143. package/dist/modules/chunks/chunk-NBLGKTEM.mjs +86 -0
  144. package/dist/modules/chunks/chunk-NBLGKTEM.mjs.map +7 -0
  145. package/dist/modules/chunks/chunk-NI7CS3I2.mjs +110 -0
  146. package/dist/modules/chunks/chunk-NI7CS3I2.mjs.map +7 -0
  147. package/dist/modules/chunks/chunk-NJH2OJFC.mjs +2113 -0
  148. package/dist/modules/chunks/chunk-NJH2OJFC.mjs.map +7 -0
  149. package/dist/modules/chunks/chunk-OBK4LIJB.mjs +20 -0
  150. package/dist/modules/chunks/chunk-OBK4LIJB.mjs.map +7 -0
  151. package/dist/modules/chunks/chunk-PEUT3FW7.mjs +1 -0
  152. package/dist/modules/chunks/chunk-PEUT3FW7.mjs.map +7 -0
  153. package/dist/modules/chunks/chunk-PRZOWPDN.mjs +66 -0
  154. package/dist/modules/chunks/chunk-PRZOWPDN.mjs.map +7 -0
  155. package/dist/modules/chunks/chunk-Q4RXBGQS.mjs +55 -0
  156. package/dist/modules/chunks/chunk-Q4RXBGQS.mjs.map +7 -0
  157. package/dist/modules/chunks/chunk-QBHBKOIL.mjs +55 -0
  158. package/dist/modules/chunks/chunk-QBHBKOIL.mjs.map +7 -0
  159. package/dist/modules/chunks/chunk-QD6CCRMG.mjs +20 -0
  160. package/dist/modules/chunks/chunk-QD6CCRMG.mjs.map +7 -0
  161. package/dist/modules/chunks/chunk-QF4V23GW.mjs +39 -0
  162. package/dist/modules/chunks/chunk-QF4V23GW.mjs.map +7 -0
  163. package/dist/modules/chunks/chunk-QK6W7MJO.mjs +42 -0
  164. package/dist/modules/chunks/chunk-QK6W7MJO.mjs.map +7 -0
  165. package/dist/modules/chunks/chunk-QL7V6DK7.mjs +34 -0
  166. package/dist/modules/chunks/chunk-QL7V6DK7.mjs.map +7 -0
  167. package/dist/modules/chunks/chunk-QLBQQKRI.mjs +25 -0
  168. package/dist/modules/chunks/chunk-QLBQQKRI.mjs.map +7 -0
  169. package/dist/modules/chunks/chunk-QLZQGZDC.mjs +418 -0
  170. package/dist/modules/chunks/chunk-QLZQGZDC.mjs.map +7 -0
  171. package/dist/modules/chunks/chunk-QSKQZGK7.mjs +1625 -0
  172. package/dist/modules/chunks/chunk-QSKQZGK7.mjs.map +7 -0
  173. package/dist/modules/chunks/chunk-QURKBAG4.mjs +25 -0
  174. package/dist/modules/chunks/chunk-QURKBAG4.mjs.map +7 -0
  175. package/dist/modules/chunks/chunk-R274XBEH.mjs +53 -0
  176. package/dist/modules/chunks/chunk-R274XBEH.mjs.map +7 -0
  177. package/dist/modules/chunks/chunk-R4I4JEY5.mjs +77 -0
  178. package/dist/modules/chunks/chunk-R4I4JEY5.mjs.map +7 -0
  179. package/dist/modules/chunks/chunk-RR6L6VVR.mjs +9 -0
  180. package/dist/modules/chunks/chunk-RR6L6VVR.mjs.map +7 -0
  181. package/dist/modules/chunks/chunk-RXF7SBBZ.mjs +125 -0
  182. package/dist/modules/chunks/chunk-RXF7SBBZ.mjs.map +7 -0
  183. package/dist/modules/chunks/chunk-SR66S6EJ.mjs +138 -0
  184. package/dist/modules/chunks/chunk-SR66S6EJ.mjs.map +7 -0
  185. package/dist/modules/chunks/chunk-SSQMQJ52.mjs +27 -0
  186. package/dist/modules/chunks/chunk-SSQMQJ52.mjs.map +7 -0
  187. package/dist/modules/chunks/chunk-TP26TASL.mjs +20 -0
  188. package/dist/modules/chunks/chunk-TP26TASL.mjs.map +7 -0
  189. package/dist/modules/chunks/chunk-TSAEK5P3.mjs +50 -0
  190. package/dist/modules/chunks/chunk-TSAEK5P3.mjs.map +7 -0
  191. package/dist/modules/chunks/chunk-UAY27HT3.mjs +68 -0
  192. package/dist/modules/chunks/chunk-UAY27HT3.mjs.map +7 -0
  193. package/dist/modules/chunks/chunk-UDLIWGWS.mjs +103 -0
  194. package/dist/modules/chunks/chunk-UDLIWGWS.mjs.map +7 -0
  195. package/dist/modules/chunks/chunk-UDVQHPWV.mjs +89 -0
  196. package/dist/modules/chunks/chunk-UDVQHPWV.mjs.map +7 -0
  197. package/dist/modules/chunks/chunk-UM23W3G7.mjs +237 -0
  198. package/dist/modules/chunks/chunk-UM23W3G7.mjs.map +7 -0
  199. package/dist/modules/chunks/chunk-VDZJWEAA.mjs +214 -0
  200. package/dist/modules/chunks/chunk-VDZJWEAA.mjs.map +7 -0
  201. package/dist/modules/chunks/chunk-VIGOJWSO.mjs +42 -0
  202. package/dist/modules/chunks/chunk-VIGOJWSO.mjs.map +7 -0
  203. package/dist/modules/chunks/chunk-VY3S5BWI.mjs +284 -0
  204. package/dist/modules/chunks/chunk-VY3S5BWI.mjs.map +7 -0
  205. package/dist/modules/chunks/chunk-VZXGRZYU.mjs +47 -0
  206. package/dist/modules/chunks/chunk-VZXGRZYU.mjs.map +7 -0
  207. package/dist/modules/chunks/chunk-W5DMQZB5.mjs +42 -0
  208. package/dist/modules/chunks/chunk-W5DMQZB5.mjs.map +7 -0
  209. package/dist/modules/chunks/chunk-WOMHSTVZ.mjs +918 -0
  210. package/dist/modules/chunks/chunk-WOMHSTVZ.mjs.map +7 -0
  211. package/dist/modules/chunks/chunk-XFQT7XCG.mjs +42 -0
  212. package/dist/modules/chunks/chunk-XFQT7XCG.mjs.map +7 -0
  213. package/dist/modules/chunks/chunk-XJZEVRYX.mjs +98 -0
  214. package/dist/modules/chunks/chunk-XJZEVRYX.mjs.map +7 -0
  215. package/dist/modules/chunks/chunk-XUYFV23R.mjs +317 -0
  216. package/dist/modules/chunks/chunk-XUYFV23R.mjs.map +7 -0
  217. package/dist/modules/chunks/chunk-Y5HXCPPQ.mjs +58 -0
  218. package/dist/modules/chunks/chunk-Y5HXCPPQ.mjs.map +7 -0
  219. package/dist/modules/chunks/chunk-YTHGRKGI.mjs +147 -0
  220. package/dist/modules/chunks/chunk-YTHGRKGI.mjs.map +7 -0
  221. package/dist/modules/chunks/chunk-YVQSDKAO.mjs +341 -0
  222. package/dist/modules/chunks/chunk-YVQSDKAO.mjs.map +7 -0
  223. package/dist/modules/chunks/chunk-YYXQDUVT.mjs +123 -0
  224. package/dist/modules/chunks/chunk-YYXQDUVT.mjs.map +7 -0
  225. package/dist/modules/chunks/chunk-ZFXZ2NUI.mjs +142 -0
  226. package/dist/modules/chunks/chunk-ZFXZ2NUI.mjs.map +7 -0
  227. package/dist/modules/chunks/chunk-ZLNWF4ET.mjs +9 -0
  228. package/dist/modules/chunks/chunk-ZLNWF4ET.mjs.map +7 -0
  229. package/dist/modules/chunks/chunk-ZLU5QW2O.mjs +9 -0
  230. package/dist/modules/chunks/chunk-ZLU5QW2O.mjs.map +7 -0
  231. package/dist/modules/chunks/chunk-ZNZPYE2V.mjs +28 -0
  232. package/dist/modules/chunks/chunk-ZNZPYE2V.mjs.map +7 -0
  233. package/dist/modules/chunks/core-564N45MO.mjs +7480 -0
  234. package/dist/modules/chunks/core-564N45MO.mjs.map +7 -0
  235. package/dist/modules/chunks/css-BKH4SVJG.mjs +8 -0
  236. package/dist/modules/chunks/css-BKH4SVJG.mjs.map +7 -0
  237. package/dist/modules/chunks/engine-javascript-PDVIGNGR.mjs +3241 -0
  238. package/dist/modules/chunks/engine-javascript-PDVIGNGR.mjs.map +7 -0
  239. package/dist/modules/chunks/github-dark-default-6HVTHEWF.mjs +8 -0
  240. package/dist/modules/chunks/github-dark-default-6HVTHEWF.mjs.map +7 -0
  241. package/dist/modules/chunks/github-light-default-LAXRA6XL.mjs +8 -0
  242. package/dist/modules/chunks/github-light-default-LAXRA6XL.mjs.map +7 -0
  243. package/dist/modules/chunks/glsl-UC3YWUD2.mjs +18 -0
  244. package/dist/modules/chunks/glsl-UC3YWUD2.mjs.map +7 -0
  245. package/dist/modules/chunks/html-FRVIUV63.mjs +19 -0
  246. package/dist/modules/chunks/html-FRVIUV63.mjs.map +7 -0
  247. package/dist/modules/chunks/javascript-LN3OC7S2.mjs +8 -0
  248. package/dist/modules/chunks/javascript-LN3OC7S2.mjs.map +7 -0
  249. package/dist/modules/chunks/json-5CUGWTOP.mjs +11 -0
  250. package/dist/modules/chunks/json-5CUGWTOP.mjs.map +7 -0
  251. package/dist/modules/chunks/json5-YZQI5VNO.mjs +11 -0
  252. package/dist/modules/chunks/json5-YZQI5VNO.mjs.map +7 -0
  253. package/dist/modules/chunks/jsonc-SWID6VOZ.mjs +11 -0
  254. package/dist/modules/chunks/jsonc-SWID6VOZ.mjs.map +7 -0
  255. package/dist/modules/chunks/jsx-A7RDCLJO.mjs +11 -0
  256. package/dist/modules/chunks/jsx-A7RDCLJO.mjs.map +7 -0
  257. package/dist/modules/chunks/markdown-QTCU5KP5.mjs +11 -0
  258. package/dist/modules/chunks/markdown-QTCU5KP5.mjs.map +7 -0
  259. package/dist/modules/chunks/python-LAZONBIB.mjs +11 -0
  260. package/dist/modules/chunks/python-LAZONBIB.mjs.map +7 -0
  261. package/dist/modules/chunks/rust-XWTPJFJO.mjs +11 -0
  262. package/dist/modules/chunks/rust-XWTPJFJO.mjs.map +7 -0
  263. package/dist/modules/chunks/scss-CFXRHUUW.mjs +15 -0
  264. package/dist/modules/chunks/scss-CFXRHUUW.mjs.map +7 -0
  265. package/dist/modules/chunks/shellscript-OHO3LCVU.mjs +11 -0
  266. package/dist/modules/chunks/shellscript-OHO3LCVU.mjs.map +7 -0
  267. package/dist/modules/chunks/toml-IOHFZJ5B.mjs +11 -0
  268. package/dist/modules/chunks/toml-IOHFZJ5B.mjs.map +7 -0
  269. package/dist/modules/chunks/tsx-2E6WNX2E.mjs +11 -0
  270. package/dist/modules/chunks/tsx-2E6WNX2E.mjs.map +7 -0
  271. package/dist/modules/chunks/typescript-PBKAS54P.mjs +11 -0
  272. package/dist/modules/chunks/typescript-PBKAS54P.mjs.map +7 -0
  273. package/dist/modules/chunks/wgsl-PS6QPRLZ.mjs +11 -0
  274. package/dist/modules/chunks/wgsl-PS6QPRLZ.mjs.map +7 -0
  275. package/dist/modules/chunks/xml-JECR2ACB.mjs +18 -0
  276. package/dist/modules/chunks/xml-JECR2ACB.mjs.map +7 -0
  277. package/dist/modules/chunks/yaml-P2SV4LOE.mjs +11 -0
  278. package/dist/modules/chunks/yaml-P2SV4LOE.mjs.map +7 -0
  279. package/dist/modules/cli-contributions.mjs +32 -0
  280. package/dist/modules/cli-contributions.mjs.map +7 -0
  281. package/dist/modules/cli.mjs +14 -0
  282. package/dist/modules/cli.mjs.map +7 -0
  283. package/dist/modules/command-executor.mjs +65 -0
  284. package/dist/modules/command-executor.mjs.map +7 -0
  285. package/dist/modules/commands.mjs +10 -0
  286. package/dist/modules/commands.mjs.map +7 -0
  287. package/dist/modules/embedded.mjs +18608 -0
  288. package/dist/modules/embedded.mjs.map +7 -0
  289. package/dist/modules/extension-bridge.mjs +18 -0
  290. package/dist/modules/extension-bridge.mjs.map +7 -0
  291. package/dist/modules/frontend-root.mjs +61 -0
  292. package/dist/modules/frontend-root.mjs.map +7 -0
  293. package/dist/modules/index.mjs +784 -0
  294. package/dist/modules/index.mjs.map +7 -0
  295. package/dist/modules/page.mjs +45 -0
  296. package/dist/modules/page.mjs.map +7 -0
  297. package/dist/modules/pages/scene.mjs +18 -0
  298. package/dist/modules/pages/scene.mjs.map +7 -0
  299. package/dist/modules/plugin.mjs +56 -0
  300. package/dist/modules/plugin.mjs.map +7 -0
  301. package/dist/modules/plugins/asset/frontend.mjs +23 -0
  302. package/dist/modules/plugins/asset/frontend.mjs.map +7 -0
  303. package/dist/modules/plugins/asset/i18n.mjs +15 -0
  304. package/dist/modules/plugins/asset/i18n.mjs.map +7 -0
  305. package/dist/modules/plugins/asset/identity.mjs +42 -0
  306. package/dist/modules/plugins/asset/identity.mjs.map +7 -0
  307. package/dist/modules/plugins/asset/schema.mjs +10 -0
  308. package/dist/modules/plugins/asset/schema.mjs.map +7 -0
  309. package/dist/modules/plugins/asset/ui.mjs +16 -0
  310. package/dist/modules/plugins/asset/ui.mjs.map +7 -0
  311. package/dist/modules/plugins/content-browser/frontend.mjs +17 -0
  312. package/dist/modules/plugins/content-browser/frontend.mjs.map +7 -0
  313. package/dist/modules/plugins/content-browser/i18n.mjs +15 -0
  314. package/dist/modules/plugins/content-browser/i18n.mjs.map +7 -0
  315. package/dist/modules/plugins/content-browser/identity.mjs +22 -0
  316. package/dist/modules/plugins/content-browser/identity.mjs.map +7 -0
  317. package/dist/modules/plugins/content-browser/schema.mjs +12 -0
  318. package/dist/modules/plugins/content-browser/schema.mjs.map +7 -0
  319. package/dist/modules/plugins/content-browser/ui.mjs +15 -0
  320. package/dist/modules/plugins/content-browser/ui.mjs.map +7 -0
  321. package/dist/modules/plugins/display/api.mjs +10 -0
  322. package/dist/modules/plugins/display/api.mjs.map +7 -0
  323. package/dist/modules/plugins/display/backend.mjs +16 -0
  324. package/dist/modules/plugins/display/backend.mjs.map +7 -0
  325. package/dist/modules/plugins/display/carrier-contract.mjs +38 -0
  326. package/dist/modules/plugins/display/carrier-contract.mjs.map +7 -0
  327. package/dist/modules/plugins/display/carrier.mjs +13 -0
  328. package/dist/modules/plugins/display/carrier.mjs.map +7 -0
  329. package/dist/modules/plugins/display/effects.mjs +8 -0
  330. package/dist/modules/plugins/display/effects.mjs.map +7 -0
  331. package/dist/modules/plugins/display/frontend.mjs +14 -0
  332. package/dist/modules/plugins/display/frontend.mjs.map +7 -0
  333. package/dist/modules/plugins/display/i18n.mjs +58 -0
  334. package/dist/modules/plugins/display/i18n.mjs.map +7 -0
  335. package/dist/modules/plugins/display/identity.mjs +30 -0
  336. package/dist/modules/plugins/display/identity.mjs.map +7 -0
  337. package/dist/modules/plugins/display/page-broker.mjs +12 -0
  338. package/dist/modules/plugins/display/page-broker.mjs.map +7 -0
  339. package/dist/modules/plugins/display/schema.mjs +40 -0
  340. package/dist/modules/plugins/display/schema.mjs.map +7 -0
  341. package/dist/modules/plugins/display/ui.mjs +9 -0
  342. package/dist/modules/plugins/display/ui.mjs.map +7 -0
  343. package/dist/modules/plugins/inspector/frontend.mjs +17 -0
  344. package/dist/modules/plugins/inspector/frontend.mjs.map +7 -0
  345. package/dist/modules/plugins/inspector/i18n.mjs +15 -0
  346. package/dist/modules/plugins/inspector/i18n.mjs.map +7 -0
  347. package/dist/modules/plugins/inspector/identity.mjs +22 -0
  348. package/dist/modules/plugins/inspector/identity.mjs.map +7 -0
  349. package/dist/modules/plugins/inspector/schema.mjs +12 -0
  350. package/dist/modules/plugins/inspector/schema.mjs.map +7 -0
  351. package/dist/modules/plugins/inspector/ui.mjs +16 -0
  352. package/dist/modules/plugins/inspector/ui.mjs.map +7 -0
  353. package/dist/modules/plugins/material/frontend.mjs +25 -0
  354. package/dist/modules/plugins/material/frontend.mjs.map +7 -0
  355. package/dist/modules/plugins/material/i18n.mjs +15 -0
  356. package/dist/modules/plugins/material/i18n.mjs.map +7 -0
  357. package/dist/modules/plugins/material/identity.mjs +60 -0
  358. package/dist/modules/plugins/material/identity.mjs.map +7 -0
  359. package/dist/modules/plugins/material/schema.mjs +47 -0
  360. package/dist/modules/plugins/material/schema.mjs.map +7 -0
  361. package/dist/modules/plugins/material/ui.mjs +28 -0
  362. package/dist/modules/plugins/material/ui.mjs.map +7 -0
  363. package/dist/modules/plugins/mesh/frontend.mjs +23 -0
  364. package/dist/modules/plugins/mesh/frontend.mjs.map +7 -0
  365. package/dist/modules/plugins/mesh/i18n.mjs +15 -0
  366. package/dist/modules/plugins/mesh/i18n.mjs.map +7 -0
  367. package/dist/modules/plugins/mesh/identity.mjs +54 -0
  368. package/dist/modules/plugins/mesh/identity.mjs.map +7 -0
  369. package/dist/modules/plugins/mesh/schema.mjs +10 -0
  370. package/dist/modules/plugins/mesh/schema.mjs.map +7 -0
  371. package/dist/modules/plugins/mesh/ui.mjs +26 -0
  372. package/dist/modules/plugins/mesh/ui.mjs.map +7 -0
  373. package/dist/modules/plugins/plugins/api.mjs +11 -0
  374. package/dist/modules/plugins/plugins/api.mjs.map +7 -0
  375. package/dist/modules/plugins/plugins/backend.mjs +21 -0
  376. package/dist/modules/plugins/plugins/backend.mjs.map +7 -0
  377. package/dist/modules/plugins/plugins/cli.mjs +12 -0
  378. package/dist/modules/plugins/plugins/cli.mjs.map +7 -0
  379. package/dist/modules/plugins/plugins/frontend.mjs +17 -0
  380. package/dist/modules/plugins/plugins/frontend.mjs.map +7 -0
  381. package/dist/modules/plugins/plugins/i18n.mjs +15 -0
  382. package/dist/modules/plugins/plugins/i18n.mjs.map +7 -0
  383. package/dist/modules/plugins/plugins/identity.mjs +26 -0
  384. package/dist/modules/plugins/plugins/identity.mjs.map +7 -0
  385. package/dist/modules/plugins/plugins/runtime.mjs +50 -0
  386. package/dist/modules/plugins/plugins/runtime.mjs.map +7 -0
  387. package/dist/modules/plugins/plugins/schema.mjs +12 -0
  388. package/dist/modules/plugins/plugins/schema.mjs.map +7 -0
  389. package/dist/modules/plugins/plugins/ui/panel.mjs +14 -0
  390. package/dist/modules/plugins/plugins/ui/panel.mjs.map +7 -0
  391. package/dist/modules/plugins/plugins/ui.mjs +15 -0
  392. package/dist/modules/plugins/plugins/ui.mjs.map +7 -0
  393. package/dist/modules/plugins/scene/frontend.mjs +18 -0
  394. package/dist/modules/plugins/scene/frontend.mjs.map +7 -0
  395. package/dist/modules/plugins/scene/identity.mjs +14 -0
  396. package/dist/modules/plugins/scene/identity.mjs.map +7 -0
  397. package/dist/modules/plugins/scene-tree/frontend.mjs +17 -0
  398. package/dist/modules/plugins/scene-tree/frontend.mjs.map +7 -0
  399. package/dist/modules/plugins/scene-tree/i18n.mjs +15 -0
  400. package/dist/modules/plugins/scene-tree/i18n.mjs.map +7 -0
  401. package/dist/modules/plugins/scene-tree/identity.mjs +22 -0
  402. package/dist/modules/plugins/scene-tree/identity.mjs.map +7 -0
  403. package/dist/modules/plugins/scene-tree/schema.mjs +12 -0
  404. package/dist/modules/plugins/scene-tree/schema.mjs.map +7 -0
  405. package/dist/modules/plugins/scene-tree/ui.mjs +16 -0
  406. package/dist/modules/plugins/scene-tree/ui.mjs.map +7 -0
  407. package/dist/modules/plugins/texture/frontend.mjs +23 -0
  408. package/dist/modules/plugins/texture/frontend.mjs.map +7 -0
  409. package/dist/modules/plugins/texture/i18n.mjs +15 -0
  410. package/dist/modules/plugins/texture/i18n.mjs.map +7 -0
  411. package/dist/modules/plugins/texture/identity.mjs +54 -0
  412. package/dist/modules/plugins/texture/identity.mjs.map +7 -0
  413. package/dist/modules/plugins/texture/schema.mjs +10 -0
  414. package/dist/modules/plugins/texture/schema.mjs.map +7 -0
  415. package/dist/modules/plugins/texture/ui.mjs +26 -0
  416. package/dist/modules/plugins/texture/ui.mjs.map +7 -0
  417. package/dist/modules/plugins/viewport/frontend.mjs +27 -0
  418. package/dist/modules/plugins/viewport/frontend.mjs.map +7 -0
  419. package/dist/modules/plugins/viewport/identity.mjs +28 -0
  420. package/dist/modules/plugins/viewport/identity.mjs.map +7 -0
  421. package/dist/modules/plugins/viewport/presentation-identity.mjs +10 -0
  422. package/dist/modules/plugins/viewport/presentation-identity.mjs.map +7 -0
  423. package/dist/modules/plugins/viewport/presentation.mjs +18 -0
  424. package/dist/modules/plugins/viewport/presentation.mjs.map +7 -0
  425. package/dist/modules/plugins/viewport/schema.mjs +18 -0
  426. package/dist/modules/plugins/viewport/schema.mjs.map +7 -0
  427. package/dist/modules/plugins/viewport/workspace-shell.mjs +29 -0
  428. package/dist/modules/plugins/viewport/workspace-shell.mjs.map +7 -0
  429. package/dist/modules/shell/contract.mjs +10 -0
  430. package/dist/modules/shell/contract.mjs.map +7 -0
  431. package/dist/modules/shell/frontend.mjs +14 -0
  432. package/dist/modules/shell/frontend.mjs.map +7 -0
  433. package/dist/modules/shell/layout-zones.mjs +20 -0
  434. package/dist/modules/shell/layout-zones.mjs.map +7 -0
  435. package/dist/modules/start-cli.mjs +57 -0
  436. package/dist/modules/start-cli.mjs.map +7 -0
  437. package/dist/modules/start.mjs +18 -0
  438. package/dist/modules/start.mjs.map +7 -0
  439. package/dist/modules/viewer/catalog/backend.mjs +47 -0
  440. package/dist/modules/viewer/catalog/backend.mjs.map +7 -0
  441. package/dist/modules/viewer/catalog/frontend.mjs +55 -0
  442. package/dist/modules/viewer/catalog/frontend.mjs.map +7 -0
  443. package/dist/modules/viewer/catalog/shared.mjs +43 -0
  444. package/dist/modules/viewer/catalog/shared.mjs.map +7 -0
  445. package/dist/modules/viewer/catalog.mjs +85 -0
  446. package/dist/modules/viewer/catalog.mjs.map +7 -0
  447. package/dist/modules/viewer/cli.mjs +23 -0
  448. package/dist/modules/viewer/cli.mjs.map +7 -0
  449. package/dist/modules/viewer-host/frontend.mjs +65 -0
  450. package/dist/modules/viewer-host/frontend.mjs.map +7 -0
  451. package/dist/modules/viewer-host/page-registry.mjs +27 -0
  452. package/dist/modules/viewer-host/page-registry.mjs.map +7 -0
  453. package/dist/modules/viewer-host/slot-registry.mjs +8 -0
  454. package/dist/modules/viewer-host/slot-registry.mjs.map +7 -0
  455. package/dist/modules/viewer-host.mjs +43 -0
  456. package/dist/modules/viewer-host.mjs.map +7 -0
  457. package/dist/modules/viewer.mjs +85 -0
  458. package/dist/modules/viewer.mjs.map +7 -0
  459. package/dist/modules/workspace/adopt-surface.mjs +16 -0
  460. package/dist/modules/workspace/adopt-surface.mjs.map +7 -0
  461. package/dist/modules/workspace/api.mjs +8 -0
  462. package/dist/modules/workspace/api.mjs.map +7 -0
  463. package/dist/modules/workspace/backend.mjs +23 -0
  464. package/dist/modules/workspace/backend.mjs.map +7 -0
  465. package/dist/modules/workspace/broker.mjs +16 -0
  466. package/dist/modules/workspace/broker.mjs.map +7 -0
  467. package/dist/modules/workspace/cli.mjs +9 -0
  468. package/dist/modules/workspace/cli.mjs.map +7 -0
  469. package/dist/modules/workspace/client.mjs +15 -0
  470. package/dist/modules/workspace/client.mjs.map +7 -0
  471. package/dist/modules/workspace/command-error.mjs +16 -0
  472. package/dist/modules/workspace/command-error.mjs.map +7 -0
  473. package/dist/modules/workspace/contract.mjs +71 -0
  474. package/dist/modules/workspace/contract.mjs.map +7 -0
  475. package/dist/modules/workspace/demo-client.mjs +127 -0
  476. package/dist/modules/workspace/demo-client.mjs.map +7 -0
  477. package/dist/modules/workspace/engine-adapter.mjs +16 -0
  478. package/dist/modules/workspace/engine-adapter.mjs.map +7 -0
  479. package/dist/modules/workspace/engine-presentation.mjs +10 -0
  480. package/dist/modules/workspace/engine-presentation.mjs.map +7 -0
  481. package/dist/modules/workspace/extension-bridge.mjs +18 -0
  482. package/dist/modules/workspace/extension-bridge.mjs.map +7 -0
  483. package/dist/modules/workspace/frontend-plugin.mjs +18 -0
  484. package/dist/modules/workspace/frontend-plugin.mjs.map +7 -0
  485. package/dist/modules/workspace/frontend.mjs +29 -0
  486. package/dist/modules/workspace/frontend.mjs.map +7 -0
  487. package/dist/modules/workspace/id.mjs +8 -0
  488. package/dist/modules/workspace/id.mjs.map +7 -0
  489. package/dist/modules/workspace/inspection-presentation.mjs +12 -0
  490. package/dist/modules/workspace/inspection-presentation.mjs.map +7 -0
  491. package/dist/modules/workspace/locale-bridge.mjs +14 -0
  492. package/dist/modules/workspace/locale-bridge.mjs.map +7 -0
  493. package/dist/modules/workspace/page-title.mjs +13 -0
  494. package/dist/modules/workspace/page-title.mjs.map +7 -0
  495. package/dist/modules/workspace/presentation.mjs +18 -0
  496. package/dist/modules/workspace/presentation.mjs.map +7 -0
  497. package/dist/modules/workspace/preview-surface.mjs +17 -0
  498. package/dist/modules/workspace/preview-surface.mjs.map +7 -0
  499. package/dist/modules/workspace/project-session.mjs +18 -0
  500. package/dist/modules/workspace/project-session.mjs.map +7 -0
  501. package/dist/modules/workspace/render-resize-sync.mjs +12 -0
  502. package/dist/modules/workspace/render-resize-sync.mjs.map +7 -0
  503. package/dist/modules/workspace/resident.mjs +16 -0
  504. package/dist/modules/workspace/resident.mjs.map +7 -0
  505. package/dist/modules/workspace/resource-open.mjs +34 -0
  506. package/dist/modules/workspace/resource-open.mjs.map +7 -0
  507. package/dist/modules/workspace/resource-page.mjs +27 -0
  508. package/dist/modules/workspace/resource-page.mjs.map +7 -0
  509. package/dist/modules/workspace/tool-runtime.mjs +14 -0
  510. package/dist/modules/workspace/tool-runtime.mjs.map +7 -0
  511. package/dist/modules/workspace/view-trace.mjs +60 -0
  512. package/dist/modules/workspace/view-trace.mjs.map +7 -0
  513. package/dist/modules/workspace/workspace-client-connection.mjs +22 -0
  514. package/dist/modules/workspace/workspace-client-connection.mjs.map +7 -0
  515. package/dist/modules/workspace/workspace-recovery.mjs +35 -0
  516. package/dist/modules/workspace/workspace-recovery.mjs.map +7 -0
  517. package/dist/modules/workspace/workspace-state.mjs +12 -0
  518. package/dist/modules/workspace/workspace-state.mjs.map +7 -0
  519. package/dist/modules/workspace-frontend.mjs +17 -0
  520. package/dist/modules/workspace-frontend.mjs.map +7 -0
  521. package/dist/viewer/assets/chunk-CilyBKbf.js +1 -0
  522. package/dist/viewer/assets/core-DSQma37-.js +13 -0
  523. package/dist/viewer/assets/core-DSQma37-.js.map +1 -0
  524. package/dist/viewer/assets/css-Bq1BXecw.js +2 -0
  525. package/dist/viewer/assets/css-Bq1BXecw.js.map +1 -0
  526. package/dist/viewer/assets/css-CWQWazmX.js +1 -0
  527. package/dist/viewer/assets/embedded-D4ZDx--W.js +2 -0
  528. package/dist/viewer/assets/embedded-D4ZDx--W.js.map +1 -0
  529. package/dist/viewer/assets/engine-javascript-BvokIV9O.js +142 -0
  530. package/dist/viewer/assets/engine-javascript-BvokIV9O.js.map +1 -0
  531. package/dist/viewer/assets/github-dark-default-DaDlj-WZ.js +2 -0
  532. package/dist/viewer/assets/github-dark-default-DaDlj-WZ.js.map +1 -0
  533. package/dist/viewer/assets/github-light-default-BqhWxAZd.js +2 -0
  534. package/dist/viewer/assets/github-light-default-BqhWxAZd.js.map +1 -0
  535. package/dist/viewer/assets/glsl-BJgVnv11.js +2 -0
  536. package/dist/viewer/assets/glsl-BJgVnv11.js.map +1 -0
  537. package/dist/viewer/assets/html-AaaHGGyt.js +2 -0
  538. package/dist/viewer/assets/html-AaaHGGyt.js.map +1 -0
  539. package/dist/viewer/assets/javascript-BX9W64FE.js +1 -0
  540. package/dist/viewer/assets/javascript-DQODvD07.js +2 -0
  541. package/dist/viewer/assets/javascript-DQODvD07.js.map +1 -0
  542. package/dist/viewer/assets/json-CpcIDpT7.js +2 -0
  543. package/dist/viewer/assets/json-CpcIDpT7.js.map +1 -0
  544. package/dist/viewer/assets/json5-Czq4A7dk.js +2 -0
  545. package/dist/viewer/assets/json5-Czq4A7dk.js.map +1 -0
  546. package/dist/viewer/assets/jsonc-BXDfCMmu.js +2 -0
  547. package/dist/viewer/assets/jsonc-BXDfCMmu.js.map +1 -0
  548. package/dist/viewer/assets/jsx-DAWscEnf.js +2 -0
  549. package/dist/viewer/assets/jsx-DAWscEnf.js.map +1 -0
  550. package/dist/viewer/assets/main-C-2CHTN_.js +15 -0
  551. package/dist/viewer/assets/main-C-2CHTN_.js.map +1 -0
  552. package/dist/viewer/assets/markdown-Cx1FMNw-.js +2 -0
  553. package/dist/viewer/assets/markdown-Cx1FMNw-.js.map +1 -0
  554. package/dist/viewer/assets/panels-entry-Ddhfjgf0.js +46 -0
  555. package/dist/viewer/assets/panels-entry-Ddhfjgf0.js.map +1 -0
  556. package/dist/viewer/assets/python-CYPKjWV9.js +2 -0
  557. package/dist/viewer/assets/python-CYPKjWV9.js.map +1 -0
  558. package/dist/viewer/assets/rust-0e5cNx_V.js +2 -0
  559. package/dist/viewer/assets/rust-0e5cNx_V.js.map +1 -0
  560. package/dist/viewer/assets/scss-B-aKzLbT.js +2 -0
  561. package/dist/viewer/assets/scss-B-aKzLbT.js.map +1 -0
  562. package/dist/viewer/assets/shellscript-CpXD-pSm.js +2 -0
  563. package/dist/viewer/assets/shellscript-CpXD-pSm.js.map +1 -0
  564. package/dist/viewer/assets/style-ClttNKZk.css +2 -0
  565. package/dist/viewer/assets/styles-BXozhwiU.js +11 -0
  566. package/dist/viewer/assets/styles-BXozhwiU.js.map +1 -0
  567. package/dist/viewer/assets/toml-GmchYTXa.js +2 -0
  568. package/dist/viewer/assets/toml-GmchYTXa.js.map +1 -0
  569. package/dist/viewer/assets/tsx-Crj1Bi53.js +2 -0
  570. package/dist/viewer/assets/tsx-Crj1Bi53.js.map +1 -0
  571. package/dist/viewer/assets/typescript-xi0cSHCO.js +2 -0
  572. package/dist/viewer/assets/typescript-xi0cSHCO.js.map +1 -0
  573. package/dist/viewer/assets/wgsl-BoEPRo9U.js +2 -0
  574. package/dist/viewer/assets/wgsl-BoEPRo9U.js.map +1 -0
  575. package/dist/viewer/assets/xml-B8JqQrMD.js +2 -0
  576. package/dist/viewer/assets/xml-B8JqQrMD.js.map +1 -0
  577. package/dist/viewer/assets/yaml-DsIB85X9.js +2 -0
  578. package/dist/viewer/assets/yaml-DsIB85X9.js.map +1 -0
  579. package/dist/viewer/index.html +15 -0
  580. package/dist/viewer/panels.js +1 -0
  581. package/host.pack.json +13 -0
  582. package/package.json +174 -0
  583. package/skills/forgeax-view-cli/SKILL.md +74 -0
  584. package/skills/forgeax-view-start/SKILL.md +202 -0
  585. package/skills/forgeax-view-start/scripts/start-view.mjs +202 -0
@@ -0,0 +1,801 @@
1
+ // packages/view-workspace-core/src/view-trace.mjs
2
+ var TRACE_KEY = "forgeax.view.trace";
3
+ var TRACE_URL_PARAM = "forgeaxViewTrace";
4
+ var LOG_PREFIX = "[forgeax.view.trace]";
5
+ var MAX_EVENTS = 6e3;
6
+ var LATENCY_SAMPLE_CAP = 1024;
7
+ var MAX_SESSION_EVENTS = 2e4;
8
+ var enabled = false;
9
+ var owned = false;
10
+ var installedApi;
11
+ var longTaskObserver;
12
+ var sessionId = "";
13
+ var bootAt = 0;
14
+ var events = [];
15
+ var counters = /* @__PURE__ */ new Map();
16
+ var rpcLatencies = /* @__PURE__ */ new Map();
17
+ var rafId = 0;
18
+ var lastRaf = 0;
19
+ var longFrameCount = 0;
20
+ var maxFrameGap = 0;
21
+ var sessionLongFrameCount = 0;
22
+ var activeCaptureSession = null;
23
+ var captureSessions = [];
24
+ var domRoot = null;
25
+ var domMutationObserver = null;
26
+ var layoutObserver = null;
27
+ var paintObserver = null;
28
+ function now() {
29
+ return typeof performance !== "undefined" && typeof performance.now === "function" ? performance.now() : Date.now();
30
+ }
31
+ function relT() {
32
+ return Math.round((now() - bootAt) * 100) / 100;
33
+ }
34
+ function readEnabledFromEnvironment() {
35
+ try {
36
+ if (typeof globalThis.location?.search === "string") {
37
+ const params = new URLSearchParams(globalThis.location.search);
38
+ if (params.get(TRACE_URL_PARAM) === "1" || params.get(TRACE_URL_PARAM) === "true") return true;
39
+ }
40
+ } catch {
41
+ }
42
+ try {
43
+ const stored = globalThis.localStorage?.getItem(TRACE_KEY);
44
+ if (stored === "1" || stored === "true") return true;
45
+ } catch {
46
+ }
47
+ return false;
48
+ }
49
+ function bump(name, delta = 1) {
50
+ counters.set(name, (counters.get(name) ?? 0) + delta);
51
+ }
52
+ function sessionBump(name, delta = 1) {
53
+ if (!activeCaptureSession) return;
54
+ const map = activeCaptureSession.counters;
55
+ map.set(name, (map.get(name) ?? 0) + delta);
56
+ }
57
+ function recordRpcLatency(operation, ms, targetMap = rpcLatencies) {
58
+ let bucket = targetMap.get(operation);
59
+ if (!bucket) {
60
+ bucket = [];
61
+ targetMap.set(operation, bucket);
62
+ }
63
+ if (bucket.length >= LATENCY_SAMPLE_CAP) bucket.shift();
64
+ bucket.push(ms);
65
+ }
66
+ function percentile(sorted, p) {
67
+ if (sorted.length === 0) return 0;
68
+ const index = Math.min(sorted.length - 1, Math.max(0, Math.floor(p / 100 * sorted.length)));
69
+ return sorted[index];
70
+ }
71
+ function summarizeLatencies(samples) {
72
+ if (!samples?.length) return null;
73
+ const sorted = [...samples].sort((a, b) => a - b);
74
+ const sum = sorted.reduce((acc, value) => acc + value, 0);
75
+ return {
76
+ n: sorted.length,
77
+ avg: Math.round(sum / sorted.length * 100) / 100,
78
+ p50: Math.round(percentile(sorted, 50) * 100) / 100,
79
+ p95: Math.round(percentile(sorted, 95) * 100) / 100,
80
+ max: Math.round(sorted[sorted.length - 1] * 100) / 100,
81
+ sum: Math.round(sum * 100) / 100
82
+ };
83
+ }
84
+ function summarizeRenderDurations(samples) {
85
+ const stats = summarizeLatencies(samples);
86
+ if (!stats) return null;
87
+ return stats;
88
+ }
89
+ function pushEvent(entry, { sessionOnly = false } = {}) {
90
+ if (!enabled) return;
91
+ if (activeCaptureSession) {
92
+ activeCaptureSession.events.push(entry);
93
+ if (activeCaptureSession.events.length > MAX_SESSION_EVENTS) {
94
+ activeCaptureSession.events.splice(0, activeCaptureSession.events.length - MAX_SESSION_EVENTS);
95
+ sessionBump("session.events-truncated");
96
+ }
97
+ }
98
+ if (!sessionOnly) {
99
+ events.push(entry);
100
+ if (events.length > MAX_EVENTS) events.splice(0, events.length - MAX_EVENTS);
101
+ }
102
+ }
103
+ function isViewTraceEnabled() {
104
+ return enabled;
105
+ }
106
+ function isCaptureSessionActive() {
107
+ return activeCaptureSession !== null;
108
+ }
109
+ function traceView(phase, event, data = {}) {
110
+ if (!enabled) return;
111
+ const entry = { t: relT(), phase, event, ...data };
112
+ bump(`${phase}.${event}`);
113
+ sessionBump(`${phase}.${event}`);
114
+ pushEvent(entry);
115
+ const verbose = activeCaptureSession || phase === "session" || phase === "boot";
116
+ if (verbose && typeof console !== "undefined" && typeof console.debug === "function") {
117
+ console.debug(LOG_PREFIX, phase, event, data);
118
+ }
119
+ }
120
+ function traceViewRpc(operation, durationMs, extra = {}) {
121
+ if (!enabled) return;
122
+ recordRpcLatency(operation, durationMs, rpcLatencies);
123
+ if (activeCaptureSession) {
124
+ recordRpcLatency(operation, durationMs, activeCaptureSession.rpcLatencies);
125
+ if (durationMs > (activeCaptureSession.maxRpcMs ?? 0)) activeCaptureSession.maxRpcMs = durationMs;
126
+ if (extra.inputType === "pointer-move") {
127
+ sessionBump("input.rpc-pointer-move");
128
+ const q = activeCaptureSession.pendingRpc ?? 0;
129
+ if (q > (activeCaptureSession.maxRpcQueue ?? 0)) activeCaptureSession.maxRpcQueue = q;
130
+ }
131
+ }
132
+ bump(`rpc.${operation}`);
133
+ sessionBump(`rpc.${operation}`);
134
+ if (durationMs > 32) {
135
+ bump(`rpc.slow.${operation}`);
136
+ sessionBump(`rpc.slow.${operation}`);
137
+ }
138
+ pushEvent({
139
+ t: relT(),
140
+ phase: "rpc",
141
+ event: operation,
142
+ ms: Math.round(durationMs * 100) / 100,
143
+ ...extra
144
+ });
145
+ }
146
+ function describeElement(element) {
147
+ if (!element || typeof element !== "object") return null;
148
+ const tag = element.tagName?.toLowerCase?.() ?? String(element);
149
+ const dataset = element.dataset ? { ...element.dataset } : {};
150
+ return {
151
+ tag,
152
+ id: element.id ?? void 0,
153
+ className: typeof element.className === "string" ? element.className : void 0,
154
+ dataset,
155
+ tabIndex: element.tabIndex,
156
+ pointerLock: typeof element.requestPointerLock === "function"
157
+ };
158
+ }
159
+ function attachDomObservers() {
160
+ if (!activeCaptureSession || !domRoot || domMutationObserver) return;
161
+ if (typeof globalThis.MutationObserver === "function") {
162
+ domMutationObserver = new MutationObserver((records) => {
163
+ if (!activeCaptureSession) return;
164
+ for (const record of records) {
165
+ sessionBump("dom.mutation");
166
+ activeCaptureSession.mutationRecords += 1;
167
+ if (record.type === "childList") {
168
+ sessionBump("dom.childList");
169
+ activeCaptureSession.childListMutations += record.addedNodes.length + record.removedNodes.length;
170
+ }
171
+ if (record.type === "attributes") sessionBump("dom.attributes");
172
+ }
173
+ if (activeCaptureSession.mutationRecords % 50 === 0) {
174
+ pushEvent({
175
+ t: relT(),
176
+ phase: "dom",
177
+ event: "mutation-burst",
178
+ records: activeCaptureSession.mutationRecords,
179
+ childListNodes: activeCaptureSession.childListMutations
180
+ });
181
+ }
182
+ });
183
+ domMutationObserver.observe(domRoot, {
184
+ subtree: true,
185
+ childList: true,
186
+ attributes: true,
187
+ attributeFilter: ["style", "class", "hidden", "data-forgeax-view-selected"]
188
+ });
189
+ }
190
+ if (typeof globalThis.PerformanceObserver === "function") {
191
+ try {
192
+ layoutObserver = new PerformanceObserver((list) => {
193
+ if (!activeCaptureSession) return;
194
+ for (const entry of list.getEntries()) {
195
+ sessionBump("dom.layout");
196
+ const ms = entry.duration;
197
+ activeCaptureSession.layoutDurations.push(ms);
198
+ if (ms > 8) {
199
+ sessionBump("dom.layout-slow");
200
+ pushEvent({
201
+ t: relT(),
202
+ phase: "dom",
203
+ event: "layout",
204
+ durationMs: Math.round(ms * 100) / 100,
205
+ name: entry.name
206
+ });
207
+ }
208
+ }
209
+ });
210
+ layoutObserver.observe({ type: "layout", buffered: true });
211
+ } catch {
212
+ }
213
+ try {
214
+ paintObserver = new PerformanceObserver((list) => {
215
+ if (!activeCaptureSession) return;
216
+ for (const entry of list.getEntries()) {
217
+ sessionBump("dom.paint");
218
+ if (entry.duration > 8) {
219
+ sessionBump("dom.paint-slow");
220
+ pushEvent({
221
+ t: relT(),
222
+ phase: "dom",
223
+ event: "paint",
224
+ durationMs: Math.round(entry.duration * 100) / 100
225
+ });
226
+ }
227
+ }
228
+ });
229
+ paintObserver.observe({ type: "paint", buffered: true });
230
+ } catch {
231
+ }
232
+ }
233
+ }
234
+ function detachDomObservers() {
235
+ domMutationObserver?.disconnect();
236
+ domMutationObserver = null;
237
+ layoutObserver?.disconnect();
238
+ layoutObserver = null;
239
+ paintObserver?.disconnect();
240
+ paintObserver = null;
241
+ }
242
+ function buildSessionHints(summary) {
243
+ const hints = [];
244
+ const durationSec = (summary.durationMs ?? 0) / 1e3;
245
+ if (durationSec <= 0) return hints;
246
+ const move = summary.counters["input.pointer-move"] ?? 0;
247
+ const render = summary.counters["shell.render"] ?? 0;
248
+ const push = summary.counters["shell.state-push"] ?? 0;
249
+ const cameraRpc = summary.counters["rpc.camera.update"] ?? 0;
250
+ const mutations = summary.counters["dom.mutation"] ?? 0;
251
+ if (render > 0 && move > 0 && Math.abs(render - push) < render * 0.2 && render / move > 0.5) {
252
+ hints.push("Almost every workspace update triggers shell.render; subscription updates may cause excessive DOM work.");
253
+ }
254
+ if (cameraRpc > 0 && Math.abs(cameraRpc - move) < cameraRpc * 0.15) {
255
+ hints.push("Pointer moves and camera updates are nearly one-to-one; consider coalescing input samples before submission.");
256
+ }
257
+ if (mutations > render * 30 && render > 10) {
258
+ hints.push("Many DOM mutations occur per render; check whole-tree replacement and repeated mounting.");
259
+ }
260
+ const renderStats = summary.render;
261
+ if (renderStats?.p95 > 8 && render > 20) {
262
+ hints.push("Rendering is slow during capture, including child replacement and target surface synchronization.");
263
+ }
264
+ const layoutSlow = summary.counters["dom.layout-slow"] ?? 0;
265
+ if (layoutSlow > 5) {
266
+ hints.push("The browser reports repeated slow layouts during capture; check forced layout and large DOM changes.");
267
+ }
268
+ return hints;
269
+ }
270
+ function finalizeCaptureSession(reason, extra = {}) {
271
+ if (!activeCaptureSession) return null;
272
+ const session = activeCaptureSession;
273
+ activeCaptureSession = null;
274
+ detachDomObservers();
275
+ const durationMs = Math.round((now() - session.startedAtPerf) * 100) / 100;
276
+ const counterObj = Object.fromEntries([...session.counters.entries()].sort(([a], [b]) => a.localeCompare(b)));
277
+ const rpc = {};
278
+ for (const [operation, samples] of session.rpcLatencies.entries()) {
279
+ rpc[operation] = summarizeLatencies(samples);
280
+ }
281
+ const summary = {
282
+ id: session.id,
283
+ reason,
284
+ durationMs,
285
+ startedAtT: session.startedAtT,
286
+ endedAtT: relT(),
287
+ meta: { ...session.meta, ...extra },
288
+ counters: counterObj,
289
+ rpc,
290
+ render: summarizeRenderDurations(session.renderDurations),
291
+ dom: {
292
+ mutationRecords: session.mutationRecords,
293
+ childListNodeChanges: session.childListMutations,
294
+ layoutSamples: session.layoutDurations.length,
295
+ syncTargetSurfaces: session.syncTargetSurfaces,
296
+ targetSurfaceRemovals: session.targetSurfaceRemovals,
297
+ targetSurfaceReorders: session.targetSurfaceReorders
298
+ },
299
+ input: {
300
+ maxUpdatesInFlight: session.maxInFlight,
301
+ maxRpcMs: Math.round((session.maxRpcMs ?? 0) * 100) / 100
302
+ },
303
+ subscription: {
304
+ statePush: counterObj["shell.state-push"] ?? 0,
305
+ stateUpdate: counterObj["shell.state-update"] ?? 0
306
+ },
307
+ hints: []
308
+ };
309
+ summary.hints = buildSessionHints(summary);
310
+ const record = {
311
+ ...summary,
312
+ events: session.events
313
+ };
314
+ captureSessions.push(record);
315
+ traceView("session", "capture-end", {
316
+ id: session.id,
317
+ reason,
318
+ durationMs,
319
+ counters: counterObj,
320
+ rpc,
321
+ render: summary.render,
322
+ dom: summary.dom,
323
+ subscription: summary.subscription,
324
+ hints: summary.hints
325
+ });
326
+ if (typeof console !== "undefined" && typeof console.info === "function") {
327
+ console.info(`${LOG_PREFIX} capture session ended (${reason})`, summary);
328
+ }
329
+ return record;
330
+ }
331
+ function beginCaptureSession(meta = {}) {
332
+ if (!enabled) return;
333
+ if (activeCaptureSession) finalizeCaptureSession("superseded");
334
+ const id = `cap-${Math.random().toString(36).slice(2, 10)}`;
335
+ activeCaptureSession = {
336
+ id,
337
+ startedAtPerf: now(),
338
+ startedAtT: relT(),
339
+ meta,
340
+ counters: /* @__PURE__ */ new Map(),
341
+ rpcLatencies: /* @__PURE__ */ new Map(),
342
+ events: [],
343
+ renderDurations: [],
344
+ layoutDurations: [],
345
+ mutationRecords: 0,
346
+ childListMutations: 0,
347
+ syncTargetSurfaces: 0,
348
+ targetSurfaceRemovals: 0,
349
+ targetSurfaceReorders: 0,
350
+ maxInFlight: 0,
351
+ maxRpcMs: 0,
352
+ maxRpcQueue: 0
353
+ };
354
+ sessionLongFrameCount = 0;
355
+ attachDomObservers();
356
+ traceView("session", "capture-begin", { id, ...meta });
357
+ }
358
+ function endCaptureSession(reason, extra = {}) {
359
+ if (!enabled || !activeCaptureSession) return null;
360
+ return finalizeCaptureSession(reason, extra);
361
+ }
362
+ function traceShellRegisterDomRoot(rootElement) {
363
+ if (!enabled || !rootElement) return;
364
+ domRoot = rootElement;
365
+ traceView("shell", "dom-root", { element: describeElement(rootElement) });
366
+ }
367
+ function traceShellStatePush(state) {
368
+ if (!enabled) return;
369
+ bump("shell.state-push");
370
+ sessionBump("shell.state-push");
371
+ const payload = {
372
+ selectedTabId: state?.selectedTabId,
373
+ cameraVersion: state?.preview?.cameraVersion,
374
+ hasInteraction: Boolean(state?.preview?.interaction)
375
+ };
376
+ pushEvent({ t: relT(), phase: "shell", event: "state-push", ...payload });
377
+ }
378
+ function wrapViewWorkspaceClient(client) {
379
+ if (!client || client.__forgeaxViewTraceWrapped) return client;
380
+ const originalCall = client.call?.bind(client);
381
+ if (typeof originalCall !== "function") return client;
382
+ client.__forgeaxViewTraceWrapped = true;
383
+ client.call = (operation, args = {}, options = {}) => {
384
+ if (!enabled) return originalCall(operation, args, options);
385
+ if (activeCaptureSession && operation === "camera.update") {
386
+ activeCaptureSession.pendingRpc = (activeCaptureSession.pendingRpc ?? 0) + 1;
387
+ }
388
+ const started = now();
389
+ const result = originalCall(operation, args, options);
390
+ return Promise.resolve(result).then((value) => {
391
+ if (activeCaptureSession && operation === "camera.update") {
392
+ activeCaptureSession.pendingRpc = Math.max(0, (activeCaptureSession.pendingRpc ?? 1) - 1);
393
+ }
394
+ traceViewRpc(operation, now() - started, {
395
+ ok: true,
396
+ interactionId: args?.interactionId,
397
+ inputType: args?.input?.type
398
+ });
399
+ return value;
400
+ }).catch((error) => {
401
+ if (activeCaptureSession && operation === "camera.update") {
402
+ activeCaptureSession.pendingRpc = Math.max(0, (activeCaptureSession.pendingRpc ?? 1) - 1);
403
+ }
404
+ traceViewRpc(operation, now() - started, {
405
+ ok: false,
406
+ message: error?.message ?? String(error),
407
+ interactionId: args?.interactionId,
408
+ inputType: args?.input?.type
409
+ });
410
+ throw error;
411
+ });
412
+ };
413
+ if (typeof client.subscribe === "function") {
414
+ const originalSubscribe = client.subscribe.bind(client);
415
+ client.subscribe = (listener) => originalSubscribe((state) => {
416
+ traceShellStatePush(state);
417
+ return listener(state);
418
+ });
419
+ }
420
+ return client;
421
+ }
422
+ function startRafMonitor() {
423
+ if (rafId || typeof globalThis.requestAnimationFrame !== "function") return;
424
+ lastRaf = now();
425
+ const tick = () => {
426
+ if (!enabled) {
427
+ rafId = 0;
428
+ return;
429
+ }
430
+ const t = now();
431
+ const gap = t - lastRaf;
432
+ lastRaf = t;
433
+ if (gap > maxFrameGap) maxFrameGap = gap;
434
+ if (gap > 32) {
435
+ longFrameCount += 1;
436
+ if (activeCaptureSession) {
437
+ sessionLongFrameCount += 1;
438
+ sessionBump("perf.long-frame");
439
+ pushEvent({
440
+ t: relT(),
441
+ phase: "perf",
442
+ event: "long-frame",
443
+ gapMs: Math.round(gap * 100) / 100,
444
+ capture: true
445
+ });
446
+ } else if (gap > 50) {
447
+ pushEvent({ t: relT(), phase: "perf", event: "long-frame", gapMs: Math.round(gap * 100) / 100 });
448
+ }
449
+ }
450
+ rafId = globalThis.requestAnimationFrame(tick);
451
+ };
452
+ rafId = globalThis.requestAnimationFrame(tick);
453
+ }
454
+ function startLongTaskObserver() {
455
+ if (typeof globalThis.PerformanceObserver !== "function") return;
456
+ try {
457
+ const observer = new PerformanceObserver((list) => {
458
+ for (const entry of list.getEntries()) {
459
+ if (entry.duration < 50) continue;
460
+ bump("perf.long-task");
461
+ sessionBump("perf.long-task");
462
+ pushEvent({
463
+ t: relT(),
464
+ phase: "perf",
465
+ event: "long-task",
466
+ name: entry.name,
467
+ durationMs: Math.round(entry.duration * 100) / 100,
468
+ capture: Boolean(activeCaptureSession)
469
+ });
470
+ }
471
+ });
472
+ observer.observe({ entryTypes: ["longtask"] });
473
+ longTaskObserver = observer;
474
+ } catch {
475
+ }
476
+ }
477
+ function buildSummary(elapsedSec) {
478
+ const counterObj = Object.fromEntries([...counters.entries()].sort(([a], [b]) => a.localeCompare(b)));
479
+ const rpc = {};
480
+ for (const [operation, samples] of rpcLatencies.entries()) {
481
+ rpc[operation] = summarizeLatencies(samples);
482
+ }
483
+ const hints = [];
484
+ const last = captureSessions[captureSessions.length - 1];
485
+ if (last?.hints?.length) {
486
+ hints.push(`Last capture (${last.reason}, ${last.durationMs} ms): ${last.hints.join(" ")}`);
487
+ }
488
+ return {
489
+ sessionId,
490
+ elapsedSec: Math.round(elapsedSec * 100) / 100,
491
+ counters: counterObj,
492
+ rpc,
493
+ perf: {
494
+ longFramesOver32ms: longFrameCount,
495
+ maxFrameGapMs: Math.round(maxFrameGap * 100) / 100
496
+ },
497
+ captureSessionCount: captureSessions.length,
498
+ hints
499
+ };
500
+ }
501
+ function getViewTraceReport() {
502
+ const elapsedSec = bootAt ? (now() - bootAt) / 1e3 : 0;
503
+ return {
504
+ kind: "forgeax.view.trace/report",
505
+ version: 2,
506
+ generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
507
+ summary: buildSummary(elapsedSec),
508
+ captureSessions: captureSessions.map(({ events: _e, ...rest }) => rest),
509
+ captureSessionsFull: captureSessions,
510
+ events
511
+ };
512
+ }
513
+ function dumpViewTraceText() {
514
+ return JSON.stringify(getViewTraceReport(), null, 2);
515
+ }
516
+ function installViewTraceGlobal() {
517
+ if (!owned || !enabled) return false;
518
+ if (installedApi) return true;
519
+ sessionId = `vt-${Math.random().toString(36).slice(2, 10)}`;
520
+ bootAt = now();
521
+ traceView("boot", "enabled", {
522
+ page: globalThis.location ? `${globalThis.location.origin}${globalThis.location.pathname}` : void 0,
523
+ userAgent: globalThis.navigator?.userAgent
524
+ });
525
+ startRafMonitor();
526
+ startLongTaskObserver();
527
+ const api = {
528
+ enabled: () => enabled,
529
+ enable: enableViewTrace,
530
+ dump: dumpViewTraceText,
531
+ download: downloadViewTraceTxtFile,
532
+ report: getViewTraceReport,
533
+ event: traceView,
534
+ describeElement,
535
+ activeCapture: () => activeCaptureSession?.id ?? null,
536
+ lastCaptureSession: () => captureSessions[captureSessions.length - 1] ?? null,
537
+ captureSessions: () => captureSessions
538
+ };
539
+ globalThis.__forgeaxViewTrace = api;
540
+ installedApi = api;
541
+ if (typeof console !== "undefined" && typeof console.info === "function") {
542
+ console.info(
543
+ `${LOG_PREFIX} active \u2014 click canvas, drag, press ESC, then: copy(__forgeaxViewTrace.dump())`
544
+ );
545
+ }
546
+ return true;
547
+ }
548
+ function initViewTraceFromEnvironment() {
549
+ if (typeof globalThis.document !== "object") return () => {
550
+ };
551
+ if (owned) throw new Error("The workspace plugin already owns View tracing in this document");
552
+ owned = true;
553
+ enabled = readEnabledFromEnvironment();
554
+ installViewTraceGlobal();
555
+ let disposed = false;
556
+ return () => {
557
+ if (disposed) return;
558
+ disposed = true;
559
+ owned = false;
560
+ enabled = false;
561
+ if (rafId) globalThis.cancelAnimationFrame?.(rafId);
562
+ rafId = 0;
563
+ longTaskObserver?.disconnect();
564
+ longTaskObserver = void 0;
565
+ detachDomObservers();
566
+ domRoot = null;
567
+ activeCaptureSession = null;
568
+ events.length = 0;
569
+ captureSessions.length = 0;
570
+ counters.clear();
571
+ rpcLatencies.clear();
572
+ lastRaf = longFrameCount = maxFrameGap = sessionLongFrameCount = bootAt = 0;
573
+ sessionId = "";
574
+ if (globalThis.__forgeaxViewTrace === installedApi) delete globalThis.__forgeaxViewTrace;
575
+ installedApi = void 0;
576
+ };
577
+ }
578
+ function enableViewTrace({ persist = false } = {}) {
579
+ if (!owned) return false;
580
+ if (persist) {
581
+ try {
582
+ globalThis.localStorage?.setItem(TRACE_KEY, "1");
583
+ } catch {
584
+ }
585
+ }
586
+ if (enabled && globalThis.__forgeaxViewTrace) return true;
587
+ enabled = true;
588
+ return installViewTraceGlobal();
589
+ }
590
+ function traceExportFilename() {
591
+ const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
592
+ return `forgeax-view-trace-${stamp}.txt`;
593
+ }
594
+ function downloadViewTraceTxtFile() {
595
+ enableViewTrace();
596
+ const text = dumpViewTraceText();
597
+ traceView("export", "download", {
598
+ bytes: text.length,
599
+ captureSessions: captureSessions.length
600
+ });
601
+ const doc = globalThis.document;
602
+ if (doc?.createElement) {
603
+ const blob = new Blob([text], { type: "text/plain;charset=utf-8" });
604
+ const url = URL.createObjectURL(blob);
605
+ const anchor = doc.createElement("a");
606
+ anchor.href = url;
607
+ anchor.download = traceExportFilename();
608
+ anchor.rel = "noopener";
609
+ anchor.click();
610
+ URL.revokeObjectURL(url);
611
+ }
612
+ return text;
613
+ }
614
+ function traceInputAttach(element, { targetId, tabId } = {}) {
615
+ if (!enabled) return;
616
+ traceView("input", "attach", {
617
+ targetId,
618
+ tabId,
619
+ element: describeElement(element),
620
+ pointerLockElement: describeElement(globalThis.document?.pointerLockElement)
621
+ });
622
+ const canvas = element?.tagName?.toLowerCase?.() === "canvas" ? element : element?.querySelector?.("canvas");
623
+ if (!canvas || canvas.__forgeaxViewTraceCanvas) return;
624
+ canvas.__forgeaxViewTraceCanvas = true;
625
+ traceView("canvas", "found", {
626
+ width: canvas.width,
627
+ height: canvas.height,
628
+ clientWidth: canvas.clientWidth,
629
+ clientHeight: canvas.clientHeight
630
+ });
631
+ if (typeof globalThis.ResizeObserver === "function") {
632
+ const observer = new ResizeObserver(() => {
633
+ const payload = {
634
+ width: canvas.width,
635
+ height: canvas.height,
636
+ clientWidth: canvas.clientWidth,
637
+ clientHeight: canvas.clientHeight,
638
+ capture: Boolean(activeCaptureSession)
639
+ };
640
+ bump("canvas.resize");
641
+ sessionBump("canvas.resize");
642
+ pushEvent({ t: relT(), phase: "canvas", event: "resize", ...payload });
643
+ });
644
+ observer.observe(canvas);
645
+ }
646
+ }
647
+ function traceInputPointerDown(event, { accepted, element }) {
648
+ if (!enabled) return;
649
+ traceView("input", "pointerdown", {
650
+ accepted,
651
+ button: event?.button,
652
+ pointerId: event?.pointerId,
653
+ pointerType: event?.pointerType,
654
+ buttons: event?.buttons,
655
+ target: describeElement(event?.target),
656
+ inputSurface: describeElement(element),
657
+ pointerLockBefore: describeElement(globalThis.document?.pointerLockElement)
658
+ });
659
+ if (accepted) {
660
+ beginCaptureSession({
661
+ trigger: "pointerdown",
662
+ target: describeElement(event?.target),
663
+ inputSurface: describeElement(element)
664
+ });
665
+ }
666
+ }
667
+ function traceInputPointerUp(event, { element } = {}) {
668
+ if (!enabled) return;
669
+ traceView("input", "pointerup", {
670
+ pointerId: event?.pointerId,
671
+ inputSurface: describeElement(element)
672
+ });
673
+ endCaptureSession("pointerup");
674
+ }
675
+ function traceInputPointerLockExit({ locked, element }) {
676
+ if (!enabled) return;
677
+ traceView("input", "pointerlock-exit", {
678
+ locked,
679
+ element: describeElement(element)
680
+ });
681
+ if (!locked) endCaptureSession("pointerlock-exit");
682
+ }
683
+ function traceInputCaptureAbort(reason) {
684
+ if (!enabled) return;
685
+ traceView("input", "abort", { reason });
686
+ if (activeCaptureSession) endCaptureSession("abort", { abortReason: reason });
687
+ }
688
+ function traceInputEscape() {
689
+ if (!enabled) return;
690
+ traceView("input", "escape-key");
691
+ endCaptureSession("escape-key");
692
+ }
693
+ function traceInputPointerMove(event, { queueDepth, inFlight }) {
694
+ if (!enabled) return;
695
+ bump("input.pointer-move");
696
+ sessionBump("input.pointer-move");
697
+ if (inFlight > (activeCaptureSession?.maxInFlight ?? 0)) {
698
+ if (activeCaptureSession) activeCaptureSession.maxInFlight = inFlight;
699
+ }
700
+ const payload = {
701
+ movementX: event?.movementX,
702
+ movementY: event?.movementY,
703
+ queueDepth,
704
+ inFlight
705
+ };
706
+ if (activeCaptureSession) {
707
+ pushEvent({ t: relT(), phase: "input", event: "pointer-move", ...payload });
708
+ } else if ((counters.get("input.pointer-move") ?? 0) % 30 === 1) {
709
+ pushEvent({ t: relT(), phase: "input", event: "pointer-move-sample", ...payload });
710
+ }
711
+ }
712
+ function traceInputEnqueueUpdate(input, { queueDepth, inFlight }) {
713
+ if (!enabled) return;
714
+ sessionBump("input.enqueue-update");
715
+ bump("input.enqueue-update");
716
+ if (activeCaptureSession) {
717
+ pushEvent({
718
+ t: relT(),
719
+ phase: "input",
720
+ event: "enqueue-update",
721
+ type: input?.type,
722
+ queueDepth,
723
+ inFlight
724
+ });
725
+ }
726
+ }
727
+ function traceShellRender(meta = {}) {
728
+ if (!enabled) return;
729
+ bump("shell.render");
730
+ sessionBump("shell.render");
731
+ if (activeCaptureSession && typeof meta.durationMs === "number") {
732
+ activeCaptureSession.renderDurations.push(meta.durationMs);
733
+ }
734
+ if (activeCaptureSession) {
735
+ pushEvent({ t: relT(), phase: "shell", event: "render", ...meta });
736
+ } else if ((counters.get("shell.render") ?? 0) % 25 === 1) {
737
+ pushEvent({ t: relT(), phase: "shell", event: "render-sample", ...meta });
738
+ }
739
+ }
740
+ function traceShellUpdate(meta = {}) {
741
+ if (!enabled) return;
742
+ bump("shell.state-update");
743
+ sessionBump("shell.state-update");
744
+ if (activeCaptureSession) {
745
+ pushEvent({ t: relT(), phase: "shell", event: "state-update", ...meta });
746
+ }
747
+ }
748
+ function tracePresentationAttach(tabId, targetId, surface) {
749
+ if (!enabled) return;
750
+ sessionBump("shell.presentation-attach");
751
+ bump("shell.presentation-attach");
752
+ traceView("shell", "presentation-attach", {
753
+ tabId,
754
+ targetId,
755
+ surface: describeElement(surface)
756
+ });
757
+ }
758
+ function traceSyncTargetSurfaces(stats = {}) {
759
+ if (!enabled) return;
760
+ bump("shell.sync-target-surfaces");
761
+ sessionBump("shell.sync-target-surfaces");
762
+ if (activeCaptureSession) {
763
+ activeCaptureSession.syncTargetSurfaces += 1;
764
+ activeCaptureSession.targetSurfaceRemovals += stats.removed ?? 0;
765
+ activeCaptureSession.targetSurfaceReorders += stats.reordered ?? 0;
766
+ }
767
+ if (activeCaptureSession) {
768
+ pushEvent({ t: relT(), phase: "shell", event: "sync-target-surfaces", ...stats });
769
+ }
770
+ }
771
+
772
+ export {
773
+ isViewTraceEnabled,
774
+ isCaptureSessionActive,
775
+ traceView,
776
+ traceViewRpc,
777
+ beginCaptureSession,
778
+ endCaptureSession,
779
+ traceShellRegisterDomRoot,
780
+ traceShellStatePush,
781
+ wrapViewWorkspaceClient,
782
+ getViewTraceReport,
783
+ dumpViewTraceText,
784
+ installViewTraceGlobal,
785
+ initViewTraceFromEnvironment,
786
+ enableViewTrace,
787
+ downloadViewTraceTxtFile,
788
+ traceInputAttach,
789
+ traceInputPointerDown,
790
+ traceInputPointerUp,
791
+ traceInputPointerLockExit,
792
+ traceInputCaptureAbort,
793
+ traceInputEscape,
794
+ traceInputPointerMove,
795
+ traceInputEnqueueUpdate,
796
+ traceShellRender,
797
+ traceShellUpdate,
798
+ tracePresentationAttach,
799
+ traceSyncTargetSurfaces
800
+ };
801
+ //# sourceMappingURL=chunk-2IJKOG2F.mjs.map