@inkeep/open-knowledge 0.4.0-beta.9 → 0.4.1

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 (510) hide show
  1. package/dist/THIRD_PARTY_NOTICES.md +10 -5
  2. package/dist/alias-JE7RI5QX-BCGl9_yw.mjs +1 -0
  3. package/dist/assets/skills/open-knowledge/SKILL.md +3 -3
  4. package/dist/awk2-POPGKRAI-CGGIG9fD.mjs +1 -0
  5. package/dist/{banner-DdbR6AZr.mjs → banner-8cQrR88n.mjs} +2 -2
  6. package/dist/base64-4YMZCVJ5-DQZX3-n8.mjs +1 -0
  7. package/dist/basename-AA2KJYZQ-BxQSdX4k.mjs +1 -0
  8. package/dist/bash-IJWYRKFO-BitzNsGT.mjs +1 -0
  9. package/dist/build-GAD37AZK.mjs +1 -0
  10. package/dist/build-fAc55Z_L.mjs +2 -0
  11. package/dist/cat-RDUMLXKC-DT-A9snL.mjs +1 -0
  12. package/dist/chmod-SYMGL4JA-DjEw7qQb.mjs +1 -0
  13. package/dist/{chokidar-CxU7f6JW.mjs → chokidar-DnkSPA-1.mjs} +1 -1
  14. package/dist/{chunk-24IMIIXA-B6yIPkk2.mjs → chunk-24IMIIXA-_PX4ITYZ.mjs} +2 -2
  15. package/dist/{chunk-3THT3N7L-DztAF386.mjs → chunk-3THT3N7L-DrzOuTpA.mjs} +1 -1
  16. package/dist/{chunk-3ZUFRYJ4-qsYuZX7b.mjs → chunk-3ZUFRYJ4-BUqSdAvt.mjs} +1 -1
  17. package/dist/{chunk-44UOCSGV-CaFxJDHm.mjs → chunk-44UOCSGV-BbZqjKvt.mjs} +1 -1
  18. package/dist/{chunk-4GTNDTRF-PuLVuVJW.mjs → chunk-4GTNDTRF-C7Bk89yc.mjs} +2 -2
  19. package/dist/{chunk-4HHKTUW3-CQ53AiA_.mjs → chunk-4HHKTUW3-DaxBqSRO.mjs} +1 -1
  20. package/dist/{chunk-4Q4SM6WR-BlQvqCag.mjs → chunk-4Q4SM6WR-CQ3yG3KJ.mjs} +2 -2
  21. package/dist/{chunk-55VFSPNA-DLwfww5b.mjs → chunk-55VFSPNA-o6aQtPTI.mjs} +2 -2
  22. package/dist/{chunk-5QMZ5MUS-CAp625aG.mjs → chunk-5QMZ5MUS-SLhNX8t9.mjs} +2 -2
  23. package/dist/{chunk-5QVNJEHU-dbrKfPGl.mjs → chunk-5QVNJEHU-Besgjasu.mjs} +2 -2
  24. package/dist/{chunk-5V6VZH6T-DMPvCPbn.mjs → chunk-5V6VZH6T-1WdUUj8r.mjs} +2 -2
  25. package/dist/{chunk-62RKD26F-B9la0pfD.mjs → chunk-62RKD26F-BbNaH0fp.mjs} +2 -2
  26. package/dist/{chunk-64BAICW3-D92CLSK-.mjs → chunk-64BAICW3-CQTRuYnm.mjs} +2 -2
  27. package/dist/{chunk-74CEPOFO-BcZUJMO1.mjs → chunk-74CEPOFO-CLQh_oXv.mjs} +1 -1
  28. package/dist/{chunk-7L36YK2X-D7Z_Qw_C.mjs → chunk-7L36YK2X-VJvKq7OX.mjs} +1 -1
  29. package/dist/{chunk-7TSDKFEO-DUQhJkDy.mjs → chunk-7TSDKFEO-D7K8a1nI.mjs} +1 -1
  30. package/dist/{chunk-A4HU7SVR-DKLaJeys.mjs → chunk-A4HU7SVR-SqitiwTc.mjs} +1 -1
  31. package/dist/{chunk-A4JSPFCI-CEm2r8SB.mjs → chunk-A4JSPFCI-BzZWBgeR.mjs} +2 -2
  32. package/dist/{chunk-A5O5YHGN-DvJz5Cpw.mjs → chunk-A5O5YHGN-DQP-O5US.mjs} +2 -2
  33. package/dist/{chunk-A65PWWJC-DV6RO_es.mjs → chunk-A65PWWJC-C9G7KuCV.mjs} +2 -2
  34. package/dist/{chunk-A7A2DBEE-dTNL-45u.mjs → chunk-A7A2DBEE-CWXz1JTo.mjs} +1 -1
  35. package/dist/{chunk-A7ICOL4V-BvXPAaHu.mjs → chunk-A7ICOL4V-k5RTBWOL.mjs} +2 -2
  36. package/dist/{chunk-ALLTKNUZ-Cu6JFoC4.mjs → chunk-ALLTKNUZ-SyOkRvXW.mjs} +2 -2
  37. package/dist/{chunk-APT7OOP2-DmUrFuRy.mjs → chunk-APT7OOP2-CriAmyUL.mjs} +2 -2
  38. package/dist/{chunk-BBXLRYSX-K758HlCs.mjs → chunk-BBXLRYSX-dCISWeRn.mjs} +2 -2
  39. package/dist/{chunk-BRGMQKJV-BXc-9Cgj.mjs → chunk-BRGMQKJV-Dnv0H02a.mjs} +3 -3
  40. package/dist/{chunk-CR5AFCPT-DxNsgM0M.mjs → chunk-CR5AFCPT-BS9vrR_k.mjs} +2 -2
  41. package/dist/{chunk-CWQS3NFK-Co4ALolT.mjs → chunk-CWQS3NFK-BQ5SUtd7.mjs} +1 -1
  42. package/dist/{chunk-D4J545R4-DkHLjHX6.mjs → chunk-D4J545R4-T2J_By_d.mjs} +2 -2
  43. package/dist/{chunk-D6CWQ5DW-7lvT8dGP.mjs → chunk-D6CWQ5DW-0uvJGnRG.mjs} +2 -2
  44. package/dist/{chunk-D7MEQ3VN-D8jJZr4A.mjs → chunk-D7MEQ3VN-CSN8BGNX.mjs} +2 -2
  45. package/dist/{chunk-DCAAORBQ-C3s1D8OY.mjs → chunk-DCAAORBQ-BgX2K5fq.mjs} +2 -2
  46. package/dist/{chunk-DXB73IDG-DIKSLkPq.mjs → chunk-DXB73IDG-DfmyzFzL.mjs} +1 -1
  47. package/dist/{chunk-EEXR5ZDP-CETL3_Uw.mjs → chunk-EEXR5ZDP-DUXT2_T-.mjs} +1 -1
  48. package/dist/{chunk-EIZGF4BS-DOoQW9jQ.mjs → chunk-EIZGF4BS-BMblx_pb.mjs} +2 -2
  49. package/dist/{chunk-F23WWYKW-BK2tpXPf.mjs → chunk-F23WWYKW-B0xoXfw7.mjs} +2 -2
  50. package/dist/{chunk-F55TLFGB-Vy5RU2P3.mjs → chunk-F55TLFGB-CekdCv-K.mjs} +2 -2
  51. package/dist/{chunk-FEIOJCZD-C25Und0M.mjs → chunk-FEIOJCZD-Vm1q1kLH.mjs} +2 -2
  52. package/dist/{chunk-GCTKCWKD-Di-RB9Qt.mjs → chunk-GCTKCWKD-ByezaQ15.mjs} +1 -1
  53. package/dist/{chunk-GFQRA5P5-DnjwTqP3.mjs → chunk-GFQRA5P5-CkMj9l7f.mjs} +1 -1
  54. package/dist/{chunk-GOV5EKKI-CKV9jOGv.mjs → chunk-GOV5EKKI-B4qGAgcI.mjs} +2 -2
  55. package/dist/{chunk-GXVXFKBA-CUKDClxt.mjs → chunk-GXVXFKBA-CQs4HBko.mjs} +2 -2
  56. package/dist/{chunk-HDQ56CKY-MTQ75a8z.mjs → chunk-HDQ56CKY-DnAJDKCm.mjs} +2 -2
  57. package/dist/{chunk-HJQJAYMS-D-8Vc6Zb.mjs → chunk-HJQJAYMS-lEGf1x1q.mjs} +1 -1
  58. package/dist/{chunk-HJWBQKYG-XrOcsn2f.mjs → chunk-HJWBQKYG-lmVh-ZXn.mjs} +2 -2
  59. package/dist/{chunk-HWBSOZZR-BZF8XsyZ.mjs → chunk-HWBSOZZR-CdcHflPt.mjs} +2 -2
  60. package/dist/{chunk-HWKDQ44K-wgmyck2O.mjs → chunk-HWKDQ44K-cV6V5ZgY.mjs} +2 -2
  61. package/dist/{chunk-I57KEIP3-DipCOPKf.mjs → chunk-I57KEIP3-Cr5Okw7t.mjs} +2 -2
  62. package/dist/{chunk-IPJHKYVM-C3IodQq7.mjs → chunk-IPJHKYVM-orb6vjJ1.mjs} +1 -1
  63. package/dist/{chunk-J642UCRS-YiNealfn.mjs → chunk-J642UCRS-DfKEFKiV.mjs} +2 -2
  64. package/dist/{chunk-JVPRLUMK-VMFWXimu.mjs → chunk-JVPRLUMK-Bf9V_Gv7.mjs} +2 -2
  65. package/dist/{chunk-KMEYNNUA-pRogdye4.mjs → chunk-KMEYNNUA-Caoc9sHa.mjs} +2 -2
  66. package/dist/{chunk-LL3S3NLB-ByBS5IDP.mjs → chunk-LL3S3NLB-GadY6GUd.mjs} +2 -2
  67. package/dist/{chunk-LPQPILI2-FRQB9gt5.mjs → chunk-LPQPILI2-DDrAB1na.mjs} +2 -2
  68. package/dist/{chunk-LTZRCH7N-46S7WKw8.mjs → chunk-LTZRCH7N-DsWqztAp.mjs} +2 -2
  69. package/dist/{chunk-LWEGUNWT-DdGmM3wr.mjs → chunk-LWEGUNWT-DQ_TsrhS.mjs} +2 -2
  70. package/dist/{chunk-MDDMCKUK-CuRdI1Uv.mjs → chunk-MDDMCKUK-Cnfznbkf.mjs} +2 -2
  71. package/dist/{chunk-MDLLFABN-Wd1iVjXi.mjs → chunk-MDLLFABN-C_2lIHFT.mjs} +2 -2
  72. package/dist/{chunk-MHTUABJP-BWrqic3t.mjs → chunk-MHTUABJP-7AQ2Pv6q.mjs} +1 -1
  73. package/dist/{chunk-MIZPJHVH-DWdPvcYR.mjs → chunk-MIZPJHVH-BB7Is338.mjs} +2 -2
  74. package/dist/{chunk-MLXIYONF-CiCzoeGt.mjs → chunk-MLXIYONF-BI0CC1Dm.mjs} +2 -2
  75. package/dist/{chunk-MYE6AGBJ-DJo74dVC.mjs → chunk-MYE6AGBJ-DWNp4Fd-.mjs} +2 -2
  76. package/dist/{chunk-NAERJDUW-CIHrNgJB.mjs → chunk-NAERJDUW-D3VeMMYB.mjs} +2 -2
  77. package/dist/{chunk-NCNPKYJZ-BVljycUZ.mjs → chunk-NCNPKYJZ-BBZ5fJNa.mjs} +2 -2
  78. package/dist/{chunk-NUYSJFDK-BTseBdxv.mjs → chunk-NUYSJFDK-5tRwRhY2.mjs} +2 -2
  79. package/dist/{chunk-NYQYO467-BgXuDHUQ.mjs → chunk-NYQYO467-Blr3IMkQ.mjs} +2 -2
  80. package/dist/{chunk-OARHFVLG-Cr0x3Si_.mjs → chunk-OARHFVLG-Irp_vfLa.mjs} +2 -2
  81. package/dist/{chunk-OCLXQMOG-BW6rwyzS.mjs → chunk-OCLXQMOG-DKBkjIbk.mjs} +2 -2
  82. package/dist/{chunk-OCS6LSEM-D7VAOziZ.mjs → chunk-OCS6LSEM-C2EAQI0w.mjs} +2 -2
  83. package/dist/{chunk-OJDRYQWQ-ikvLWpfV.mjs → chunk-OJDRYQWQ-D4lSWh0K.mjs} +1 -1
  84. package/dist/{chunk-OL3S66CO-CQnF8cPH.mjs → chunk-OL3S66CO-BSC-nhbc.mjs} +2 -2
  85. package/dist/{chunk-PBXLG62G-CgbPJTiw.mjs → chunk-PBXLG62G-9wkRpzkO.mjs} +2 -2
  86. package/dist/{chunk-PP6PSHAB-CO4MYU__.mjs → chunk-PP6PSHAB-BkN6oaqq.mjs} +1 -1
  87. package/dist/{chunk-PYSFUGCK-DsRn64Ef.mjs → chunk-PYSFUGCK-C-zBGrN0.mjs} +2 -2
  88. package/dist/{chunk-QCDB2VPH-BUMOhlW7.mjs → chunk-QCDB2VPH-BUg_3i-W.mjs} +2 -2
  89. package/dist/{chunk-QJ7O6ZN3-F0_rcDPM.mjs → chunk-QJ7O6ZN3-h8P6Rj5g.mjs} +2 -2
  90. package/dist/{chunk-R6QSAL5T-CeW6f7-x.mjs → chunk-R6QSAL5T-CBXSpChE.mjs} +1 -1
  91. package/dist/{chunk-R6VWJ2ZL-FwG_Za20.mjs → chunk-R6VWJ2ZL-DSqbA7Rj.mjs} +1 -1
  92. package/dist/{chunk-RPNGRAAP-BmkapBPD.mjs → chunk-RPNGRAAP-BVzuWIcl.mjs} +2 -2
  93. package/dist/{chunk-SDNKECQQ-DkebEzkd.mjs → chunk-SDNKECQQ-CQaGD8tt.mjs} +2 -2
  94. package/dist/{chunk-SYMJJMQ4-DOZMaECk.mjs → chunk-SYMJJMQ4-C3GxJv_z.mjs} +2 -2
  95. package/dist/{chunk-T56QNPHK-DPXaSSfC.mjs → chunk-T56QNPHK-DLf9xkTG.mjs} +2 -2
  96. package/dist/{chunk-TLSUDHID-BovZg0r1.mjs → chunk-TLSUDHID-BHtR3boD.mjs} +2 -2
  97. package/dist/{chunk-TOMNU26N-AAglMy4J.mjs → chunk-TOMNU26N-DerX6zSM.mjs} +2 -2
  98. package/dist/{chunk-TXBZCHCQ-WeVWfqYv.mjs → chunk-TXBZCHCQ-CAbfX7on.mjs} +2 -2
  99. package/dist/{chunk-UNYNJIFU-CqGlXAg7.mjs → chunk-UNYNJIFU-Bd2svF5l.mjs} +3 -3
  100. package/dist/{chunk-V7TAPXDL-DQgGPvBY.mjs → chunk-V7TAPXDL-BUbPC-Wn.mjs} +2 -2
  101. package/dist/{chunk-VJFXDYWH-DIo0Ia0_.mjs → chunk-VJFXDYWH-B5EkAwKK.mjs} +2 -2
  102. package/dist/{chunk-VLGZJRPG-DymOu90-.mjs → chunk-VLGZJRPG-C9UlHcZa.mjs} +2 -2
  103. package/dist/{chunk-VOBGTVA6-Bfa1NTzt.mjs → chunk-VOBGTVA6-BbJdoZlr.mjs} +2 -2
  104. package/dist/{chunk-VYOJP4TV-PBsHe2md.mjs → chunk-VYOJP4TV-B4Ua-c0F.mjs} +2 -2
  105. package/dist/{chunk-WKFATFPP-KO2zkfs2.mjs → chunk-WKFATFPP-DWw-N9hi.mjs} +2 -2
  106. package/dist/{chunk-X2AJGDEF-D5w6wtaX.mjs → chunk-X2AJGDEF-BosVr67X.mjs} +1 -1
  107. package/dist/{chunk-XHM67O4N-akBjDPaR.mjs → chunk-XHM67O4N-Cd7Fiqsb.mjs} +1 -1
  108. package/dist/{chunk-XKQRETAK-RHzVmuiF.mjs → chunk-XKQRETAK-ud_FNcYV.mjs} +2 -2
  109. package/dist/{chunk-XORM457F-wr_DBBnV.mjs → chunk-XORM457F-B_0Xbzib.mjs} +2 -2
  110. package/dist/{chunk-XVDPCNWR-DxaG1FfA.mjs → chunk-XVDPCNWR-DNk_0jVb.mjs} +2 -2
  111. package/dist/{chunk-YCFVLTST-Dzwevuc3.mjs → chunk-YCFVLTST-0XsXjpJU.mjs} +2 -2
  112. package/dist/{chunk-YFG2CMIF-BoZQym0L.mjs → chunk-YFG2CMIF-BwW9XX2A.mjs} +2 -2
  113. package/dist/{chunk-YNYSPYQ5-DesxOVHh.mjs → chunk-YNYSPYQ5-Dq-BWW-f.mjs} +1 -1
  114. package/dist/{chunk-YS3AZT3J-CBc9LHIy.mjs → chunk-YS3AZT3J-CLwj1P0Z.mjs} +2 -2
  115. package/dist/{chunk-YTNYSM6T-WMIf3AF8.mjs → chunk-YTNYSM6T-TIb8x1lA.mjs} +2 -2
  116. package/dist/{chunk-Z6LRHWXI-DGTVoTuf.mjs → chunk-Z6LRHWXI-VE8VWpH9.mjs} +2 -2
  117. package/dist/{chunk-Z7JVV2SM-Cb4YKOCM.mjs → chunk-Z7JVV2SM-BAsPuUWb.mjs} +2 -2
  118. package/dist/clear-5CZ5X4YR-ph4db-bT.mjs +1 -0
  119. package/dist/cli.mjs +42 -38
  120. package/dist/colors-BCE2jNgl.mjs +1 -0
  121. package/dist/{colors-BNufdynn.mjs → colors-BtKMHmBX.mjs} +1 -1
  122. package/dist/column-WLPMMSTS-BCX6Q17n.mjs +1 -0
  123. package/dist/comm-5SLSESQG-C7AhH0K0.mjs +1 -0
  124. package/dist/config-schema.json +0 -23
  125. package/dist/config.project.schema.json +0 -13
  126. package/dist/config.user.schema.json +0 -10
  127. package/dist/constants-D6K9fctf.mjs +2 -0
  128. package/dist/cp-XOYR4ABJ-CQdiaiBl.mjs +1 -0
  129. package/dist/{curl-47BFPSFW-C2kRcGkX.mjs → curl-47BFPSFW-BzVtpc-O.mjs} +2 -2
  130. package/dist/cut-OPC3VAGB-oTKBumd9.mjs +1 -0
  131. package/dist/date-DD7FVA2V-BrmKZaC_.mjs +1 -0
  132. package/dist/diff-HJF2MPDN-BNIGqrz6.mjs +1 -0
  133. package/dist/dirname-LEMTZZFS-BwH_Sy4c.mjs +1 -0
  134. package/dist/{dist-DVM7wH81.mjs → dist-CGdW0JZ5.mjs} +69 -68
  135. package/dist/{dist-ou5qina8.mjs → dist-CM-e7rrB.mjs} +1067 -92
  136. package/dist/dist-iEhrVwoD.mjs +1 -0
  137. package/dist/du-WO2ENHXQ-CaFJHtt9.mjs +1 -0
  138. package/dist/echo-O45JWWI2-BVUJjhWK.mjs +1 -0
  139. package/dist/env-5EPCWSXR-DH5CCl6V.mjs +1 -0
  140. package/dist/{execAsync-CulVJBMN.mjs → execAsync-Bpfn4nfY.mjs} +1 -1
  141. package/dist/{execAsync-CzW9fUYQ.mjs → execAsync-D93HRpVy.mjs} +1 -1
  142. package/dist/{execAsync-DuQoqWaW.mjs → execAsync-DMx5TUjh.mjs} +1 -1
  143. package/dist/expand-DTNXU4LQ-eK5V8PVi.mjs +1 -0
  144. package/dist/expansion-ENLSRCXJ-DJReNXZq.mjs +1 -0
  145. package/dist/expr-5T3UU5KE-DTdq14FE.mjs +1 -0
  146. package/dist/file-ZIGAJ4YS-WHJtEeVR.mjs +1 -0
  147. package/dist/find-TPUOAIUQ-Dk362bwv.mjs +1 -0
  148. package/dist/flag-coverage-QT4N2Z44-C5s46vwi.mjs +2 -0
  149. package/dist/fold-LDSORVYE-CkRa6rpW.mjs +1 -0
  150. package/dist/{getMachineId-bsd-DAmB-Ym0.mjs → getMachineId-bsd-B3nMvpKd.mjs} +2 -2
  151. package/dist/{getMachineId-bsd-FYDP9w5Q.mjs → getMachineId-bsd-CbGsKq4x.mjs} +2 -2
  152. package/dist/{getMachineId-bsd-mPrX3ckm.mjs → getMachineId-bsd-Cbosky3N.mjs} +2 -2
  153. package/dist/{getMachineId-darwin-B0Qw-MTj.mjs → getMachineId-darwin-BNex6tJ8.mjs} +2 -2
  154. package/dist/{getMachineId-darwin-C79HtyON.mjs → getMachineId-darwin-BnJVzhVS.mjs} +2 -2
  155. package/dist/{getMachineId-darwin-Co8Jnu5v.mjs → getMachineId-darwin-UUooObuL.mjs} +2 -2
  156. package/dist/{getMachineId-linux-BizmCjYq.mjs → getMachineId-linux-BCV7VFT0.mjs} +1 -1
  157. package/dist/{getMachineId-linux-BvLCCmKQ.mjs → getMachineId-linux-Bo4OhbSY.mjs} +1 -1
  158. package/dist/{getMachineId-linux-BBORs2cS.mjs → getMachineId-linux-D4ybKI-D.mjs} +1 -1
  159. package/dist/{getMachineId-unsupported-CbR45h2D.mjs → getMachineId-unsupported-4i2apDO3.mjs} +1 -1
  160. package/dist/{getMachineId-unsupported-DbGFOAw1.mjs → getMachineId-unsupported-DKWpTC9E.mjs} +1 -1
  161. package/dist/{getMachineId-unsupported-Bgp-Es9j.mjs → getMachineId-unsupported-DYYMUAWj.mjs} +1 -1
  162. package/dist/{getMachineId-win-Cy0XHq4X.mjs → getMachineId-win-CHxnm_JZ.mjs} +2 -2
  163. package/dist/{getMachineId-win-D5gDnBHa.mjs → getMachineId-win-E9RqBHbs.mjs} +2 -2
  164. package/dist/{getMachineId-win-CT_Y5i_4.mjs → getMachineId-win-W9lSyLKl.mjs} +2 -2
  165. package/dist/grep-3AIAIJVR-9FFpNxXg.mjs +1 -0
  166. package/dist/gzip-AQXSGOVS-B69jDA3r.mjs +1 -0
  167. package/dist/head-HT2B6D2J-LVz3MZgn.mjs +1 -0
  168. package/dist/help-VVWX7SA5-NiesqNE9.mjs +1 -0
  169. package/dist/history-J4QRNGRO-CJ6sdqLF.mjs +1 -0
  170. package/dist/hostname-BK6HG2DE-BTiQGLXj.mjs +1 -0
  171. package/dist/html-to-markdown-TFCECAGV-gA9lIhli.mjs +1 -0
  172. package/dist/index.d.mts +75 -4
  173. package/dist/index.mjs +1 -1
  174. package/dist/init-3AFVYf9q.mjs +1 -0
  175. package/dist/init-CdsG66O_.mjs +408 -0
  176. package/dist/{is-object-DF0ZeuvD.mjs → is-object-C-4FJ0rP.mjs} +1 -1
  177. package/dist/join-GG2LDHE5-DP2t9Lzd.mjs +1 -0
  178. package/dist/jq-ODXZBPLY-DIh5TTSi.mjs +1 -0
  179. package/dist/{js-exec-M6UR76J5-IyD-lpzv.mjs → js-exec-M6UR76J5-2jDKLOtz.mjs} +2 -2
  180. package/dist/{lib-BOCdCkg7.mjs → lib-CxZz7HCo.mjs} +1 -1
  181. package/dist/ln-4TRFBYAT-CcfWdebC.mjs +1 -0
  182. package/dist/loader-Bncr5BJi.mjs +4 -0
  183. package/dist/loader-DTI1TGWC.mjs +1 -0
  184. package/dist/ls-KSXFZCWH-Ck3u5K5M.mjs +1 -0
  185. package/dist/{lzma-vr8hBkhz.mjs → lzma-noRZ7I73.mjs} +1 -1
  186. package/dist/md5sum-INMIK4DX-B5BLDgGd.mjs +1 -0
  187. package/dist/mkdir-TDEMSB6C-BHFCS7vA.mjs +1 -0
  188. package/dist/mv-Z6MORUFL-CmLWSH1J.mjs +1 -0
  189. package/dist/nl-U5YJDM32-Cn7q_PFe.mjs +1 -0
  190. package/dist/od-VJEF2UR5-BMxC8c-2.mjs +1 -0
  191. package/dist/open-browser-BOeCxs2W.mjs +2 -0
  192. package/dist/paste-7N6AFSDS-C9XyEur2.mjs +1 -0
  193. package/dist/preview-BvnHrXsi.mjs +1 -0
  194. package/dist/{preview-IJyfVtTf.mjs → preview-CpFNaoeP.mjs} +2 -2
  195. package/dist/printf-CX64KX2P-Hzp-xme8.mjs +1 -0
  196. package/dist/public/assets/ActivityModeContent-B9qJjoag.js +2 -0
  197. package/dist/public/assets/ConsentDialogBody-Nm0bF6eX.js +2 -0
  198. package/dist/public/assets/DocumentContext-DXmaxXXr.js +37 -0
  199. package/dist/public/assets/GraphPanel-lypmG_hQ.js +46 -0
  200. package/dist/public/assets/McpConsentDialogBody-0w9-K4mU.js +1 -0
  201. package/dist/public/assets/SettingsDialog-B0r_NhKC.js +11 -0
  202. package/dist/public/assets/SourceEditor-CzC_EQwX.js +2 -0
  203. package/dist/public/assets/{_baseFor-CX8dsZbW.js → _baseFor-CVV1DSgL.js} +1 -1
  204. package/dist/public/assets/{agent-presence-Ds2n3U5P.js → agent-presence-BrTlNKmt.js} +1 -1
  205. package/dist/public/assets/{arc-BL_OKZmE.js → arc-DoxD41WW.js} +1 -1
  206. package/dist/public/assets/architecture-YZFGNWBL-C7rs88Cj.js +1 -0
  207. package/dist/public/assets/{architectureDiagram-Q4EWVU46-BKKtWWhU.js → architectureDiagram-Q4EWVU46-Du5oNRD5.js} +1 -1
  208. package/dist/public/assets/{blockDiagram-DXYQGD6D-fzO4vZye.js → blockDiagram-DXYQGD6D-CuxUJ8VP.js} +1 -1
  209. package/dist/public/assets/{c4Diagram-AHTNJAMY-BkXqEjiP.js → c4Diagram-AHTNJAMY-D58kKzW4.js} +1 -1
  210. package/dist/public/assets/channel-kvPH_LHg.js +1 -0
  211. package/dist/public/assets/{chunk-2KRD3SAO-DQj0pw3H.js → chunk-2KRD3SAO-uai9wz3V.js} +1 -1
  212. package/dist/public/assets/{chunk-336JU56O-CBajDulv.js → chunk-336JU56O-CtkQ28bg.js} +2 -2
  213. package/dist/public/assets/chunk-426QAEUC-jRhC4EYv.js +1 -0
  214. package/dist/public/assets/{chunk-4BX2VUAB-D8pbSOlJ.js → chunk-4BX2VUAB-BTctgoF3.js} +1 -1
  215. package/dist/public/assets/{chunk-4TB4RGXK-mA6CujZO.js → chunk-4TB4RGXK-Cnl-K_AI.js} +1 -1
  216. package/dist/public/assets/chunk-55IACEB6-dtXOOCuI.js +1 -0
  217. package/dist/public/assets/{chunk-5FUZZQ4R-BVDLgFg2.js → chunk-5FUZZQ4R-DF0EG1O8.js} +1 -1
  218. package/dist/public/assets/{chunk-5PVQY5BW-Cxi5d3lT.js → chunk-5PVQY5BW-BpceE2BZ.js} +1 -1
  219. package/dist/public/assets/{chunk-67CJDMHE-CdrAY8qZ.js → chunk-67CJDMHE-DiSIolj4.js} +1 -1
  220. package/dist/public/assets/{chunk-7N4EOEYR-CJ3HBg3c.js → chunk-7N4EOEYR-Yp7Nf16N.js} +1 -1
  221. package/dist/public/assets/{chunk-AA7GKIK3-D0ckJAXt.js → chunk-AA7GKIK3--s2NNuet.js} +1 -1
  222. package/dist/public/assets/{chunk-BSJP7CBP-D4bNhKd7.js → chunk-BSJP7CBP-BrRqu__W.js} +1 -1
  223. package/dist/public/assets/{chunk-CIAEETIT-D1Fpp2md.js → chunk-CIAEETIT-BUzaopy6.js} +1 -1
  224. package/dist/public/assets/{chunk-EDXVE4YY-ChhT3Iyo.js → chunk-EDXVE4YY-Bo83e0iq.js} +1 -1
  225. package/dist/public/assets/{chunk-ENJZ2VHE-Bby39so4.js → chunk-ENJZ2VHE-CY9yto8o.js} +1 -1
  226. package/dist/public/assets/{chunk-FMBD7UC4-pRkDIOZn.js → chunk-FMBD7UC4-DEzvlUl3.js} +1 -1
  227. package/dist/public/assets/{chunk-FOC6F5B3-BsB4oTj4.js → chunk-FOC6F5B3-BtjWNx10.js} +1 -1
  228. package/dist/public/assets/{chunk-ICPOFSXX-CrnuSfeJ.js → chunk-ICPOFSXX-BC5Xd13f.js} +2 -2
  229. package/dist/public/assets/{chunk-K5T4RW27-CtREah_n.js → chunk-K5T4RW27-CfU2wPmV.js} +1 -1
  230. package/dist/public/assets/{chunk-KGLVRYIC-DtDxSfKu.js → chunk-KGLVRYIC-BV1pDifD.js} +1 -1
  231. package/dist/public/assets/{chunk-LIHQZDEY-D63TRk6j.js → chunk-LIHQZDEY-C40dIbib.js} +1 -1
  232. package/dist/public/assets/{chunk-ORNJ4GCN-Dv2PvYVu.js → chunk-ORNJ4GCN-8cFqvOFf.js} +1 -1
  233. package/dist/public/assets/{chunk-OYMX7WX6-BhfqKepC.js → chunk-OYMX7WX6-D0C6jdl8.js} +1 -1
  234. package/dist/public/assets/chunk-QZHKN3VN-Bz4XrtbS.js +1 -0
  235. package/dist/public/assets/{chunk-U2HBQHQK-6BAKH95D.js → chunk-U2HBQHQK-DenE4TdD.js} +1 -1
  236. package/dist/public/assets/{chunk-X2U36JSP-Cqpkx90-.js → chunk-X2U36JSP-DSyuGkzP.js} +1 -1
  237. package/dist/public/assets/{chunk-XPW4576I-DSytTnq4.js → chunk-XPW4576I-CLO5Bb_q.js} +1 -1
  238. package/dist/public/assets/{chunk-YZCP3GAM-Dt9awjVh.js → chunk-YZCP3GAM-D8kUvWu6.js} +1 -1
  239. package/dist/public/assets/{chunk-ZZ45TVLE-JGFITgiO.js → chunk-ZZ45TVLE-DHB0SHUz.js} +1 -1
  240. package/dist/public/assets/classDiagram-6PBFFD2Q-MrFnlVPS.js +1 -0
  241. package/dist/public/assets/classDiagram-v2-HSJHXN6E-DFkKo4Ct.js +1 -0
  242. package/dist/public/assets/clone-jj9sSaF-.js +1 -0
  243. package/dist/public/assets/config-validation-events-CajjS6y9.js +10 -0
  244. package/dist/public/assets/consent-store-lB0p7dI5.js +1 -0
  245. package/dist/public/assets/{cose-bilkent-S5V4N54A-B9nG-SHi.js → cose-bilkent-S5V4N54A-6FB6GAoi.js} +1 -1
  246. package/dist/public/assets/{dagre-BEdPLXba.js → dagre-D2_448Gx.js} +1 -1
  247. package/dist/public/assets/{dagre-KV5264BT-DKn5nGCC.js → dagre-KV5264BT-Bn9RtFC-.js} +1 -1
  248. package/dist/public/assets/{diagram-5BDNPKRD-BQuwYEd0.js → diagram-5BDNPKRD-XCR9sVhK.js} +1 -1
  249. package/dist/public/assets/{diagram-G4DWMVQ6-BmzIMyV5.js → diagram-G4DWMVQ6-Bz0ngc_7.js} +1 -1
  250. package/dist/public/assets/{diagram-MMDJMWI5-CI5eJfgr.js → diagram-MMDJMWI5-o_IQFxK_.js} +1 -1
  251. package/dist/public/assets/{diagram-TYMM5635-Cc8TJ7v3.js → diagram-TYMM5635-D2QJXyfV.js} +1 -1
  252. package/dist/public/assets/dialog-BFN-ujuF.js +1 -0
  253. package/dist/public/assets/{dist-D08h1pJc.js → dist-BYGzJeLM.js} +1 -1
  254. package/dist/public/assets/dist-Bej94Urx.js +1 -0
  255. package/dist/public/assets/dist-BrsSsfiw.js +1 -0
  256. package/dist/public/assets/dist-CXGJFbY5.js +9 -0
  257. package/dist/public/assets/dist-Cg-Qaqw_.js +1 -0
  258. package/dist/public/assets/dist-Cq1LYbUj.js +1 -0
  259. package/dist/public/assets/{dist-BH1b1nWB.js → dist-CyaBbyDQ.js} +1 -1
  260. package/dist/public/assets/dist-DsbVHLNy.js +1 -0
  261. package/dist/public/assets/{dist-nPpvoMNC.js → dist-Du-s1q8P.js} +2 -2
  262. package/dist/public/assets/dist-OTL8-1C2.js +45 -0
  263. package/dist/public/assets/doc-hash-Cp6jbuyP.js +422 -0
  264. package/dist/public/assets/{erDiagram-SMLLAGMA-BkrhGWMT.js → erDiagram-SMLLAGMA-C1Mr5jbs.js} +1 -1
  265. package/dist/public/assets/{flatten-UmyAv3V9.js → flatten-DFiFicpD.js} +1 -1
  266. package/dist/public/assets/{flowDiagram-DWJPFMVM-qh62fanI.js → flowDiagram-DWJPFMVM--ukgnTYS.js} +1 -1
  267. package/dist/public/assets/{ganttDiagram-T4ZO3ILL-DXuCeCk6.js → ganttDiagram-T4ZO3ILL-CVeIdgCM.js} +1 -1
  268. package/dist/public/assets/gitGraph-7Q5UKJZL-Bmgp5n-M.js +1 -0
  269. package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-BbcuenPj.js → gitGraphDiagram-UUTBAWPF-BSivDyLh.js} +1 -1
  270. package/dist/public/assets/{graphlib-CasrTmMJ.js → graphlib-DvRtwu4N.js} +1 -1
  271. package/dist/public/assets/index-Cuiz8Dsb.js +1853 -0
  272. package/dist/public/assets/index-zh5eSlzN.css +1 -0
  273. package/dist/public/assets/info-OMHHGYJF-DCMX4pS_.js +1 -0
  274. package/dist/public/assets/{infoDiagram-42DDH7IO-WFAMbO2S.js → infoDiagram-42DDH7IO-DtO1Tc8U.js} +1 -1
  275. package/dist/public/assets/input-BOmkuBId.js +1 -0
  276. package/dist/public/assets/{isEmpty-DWJlzxR1.js → isEmpty-gGVpRSDa.js} +1 -1
  277. package/dist/public/assets/isSymbol-D0ur5y-p.js +1 -0
  278. package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-BJBiReWg.js → ishikawaDiagram-UXIWVN3A-BY3noyNF.js} +1 -1
  279. package/dist/public/assets/{journeyDiagram-VCZTEJTY-Boq77pl6.js → journeyDiagram-VCZTEJTY-DdFdkR8_.js} +1 -1
  280. package/dist/public/assets/{kanban-definition-6JOO6SKY-DYMSr18F.js → kanban-definition-6JOO6SKY-WoLnXp48.js} +1 -1
  281. package/dist/public/assets/label-Dv_9VZWz.js +1 -0
  282. package/dist/public/assets/{line-_p5Px7MV.js → line-C59Ezo8Z.js} +1 -1
  283. package/dist/public/assets/{linear-DwuDS4qT.js → linear-faBQNtcz.js} +1 -1
  284. package/dist/public/assets/mcp-consent-store-DZ1pCmhN.js +1 -0
  285. package/dist/public/assets/{mermaid-parser.core-BcBb_Ows.js → mermaid-parser.core-CFsvu03i.js} +2 -2
  286. package/dist/public/assets/{mermaid.core-ZLTnLqVQ.js → mermaid.core-CWYso-V4.js} +3 -3
  287. package/dist/public/assets/{mindmap-definition-QFDTVHPH-BSxM4djR.js → mindmap-definition-QFDTVHPH-BG3Kwhhs.js} +1 -1
  288. package/dist/public/assets/{now-BBH4UqDm.js → now-D_m-3Vjm.js} +1 -1
  289. package/dist/public/assets/{ordinal-CeOFUmRv.js → ordinal-BLFwWMHf.js} +1 -1
  290. package/dist/public/assets/packet-4T2RLAQJ-DveBhlQF.js +1 -0
  291. package/dist/public/assets/{panel-BgMqDESF.js → panel-8fydlQgn.js} +1 -1
  292. package/dist/public/assets/pie-ZZUOXDRM-yiLyabeZ.js +1 -0
  293. package/dist/public/assets/{pieDiagram-DEJITSTG-CHRE_Jie.js → pieDiagram-DEJITSTG-B1wtn7py.js} +1 -1
  294. package/dist/public/assets/{propagation-api-qAYD7s-v.js → propagation-api-3kmMXRwS.js} +1 -1
  295. package/dist/public/assets/{quadrantDiagram-34T5L4WZ-CQkE5TwH.js → quadrantDiagram-34T5L4WZ-yboV7Kxh.js} +1 -1
  296. package/dist/public/assets/radar-PYXPWWZC-D8GV_2fZ.js +1 -0
  297. package/dist/public/assets/{reduce-DotyoGA7.js → reduce-DmI60TfL.js} +1 -1
  298. package/dist/public/assets/{requirementDiagram-MS252O5E-DHK98tKS.js → requirementDiagram-MS252O5E-BpVLqxNT.js} +1 -1
  299. package/dist/public/assets/{sankeyDiagram-XADWPNL6-BIXaStZh.js → sankeyDiagram-XADWPNL6-CH1ZYL1H.js} +1 -1
  300. package/dist/public/assets/{sequenceDiagram-FGHM5R23-BCNH3kJo.js → sequenceDiagram-FGHM5R23-CwQvwa3m.js} +1 -1
  301. package/dist/public/assets/{src-C9jsS3p4.js → src-DOAilbaA.js} +1 -1
  302. package/dist/public/assets/{stateDiagram-FHFEXIEX-BC5mjB6x.js → stateDiagram-FHFEXIEX-DL3pXt3n.js} +1 -1
  303. package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-6f8E13YF.js +1 -0
  304. package/dist/public/assets/stex-CzCFWeB9.js +1 -0
  305. package/dist/public/assets/{target-navigation-intent-BfGOumP6.js → target-navigation-intent-D0C4LZky.js} +1 -1
  306. package/dist/public/assets/{telemetry-impl-CMeDUVKn.js → telemetry-impl-H--5W_Jc.js} +2 -2
  307. package/dist/public/assets/textarea-CaFqgjns.js +1 -0
  308. package/dist/public/assets/{timeline-definition-GMOUNBTQ-VNxUGgXp.js → timeline-definition-GMOUNBTQ-CDbb3c--.js} +1 -1
  309. package/dist/public/assets/toggle-group-Dq1Ta0Sb.js +1 -0
  310. package/dist/public/assets/tooltip-BVo05ikW.js +1 -0
  311. package/dist/public/assets/treeView-SZITEDCU-A2Cj-I1J.js +1 -0
  312. package/dist/public/assets/treemap-W4RFUUIX-uOn6xcZK.js +1 -0
  313. package/dist/public/assets/typing-burst-detector-Bj_bIEkO.js +2 -0
  314. package/dist/public/assets/{vennDiagram-DHZGUBPP-DV2Y2j0r.js → vennDiagram-DHZGUBPP-BaHOUqGA.js} +1 -1
  315. package/dist/public/assets/wardley-RL74JXVD-DrTPuxUO.js +1 -0
  316. package/dist/public/assets/{wardleyDiagram-NUSXRM2D-C1mMZ3kx.js → wardleyDiagram-NUSXRM2D-5ysokC2z.js} +1 -1
  317. package/dist/public/assets/{xychartDiagram-5P7HB3ND-CxFcwN2X.js → xychartDiagram-5P7HB3ND-CFQqcNjf.js} +1 -1
  318. package/dist/public/index.html +44 -26
  319. package/dist/pwd-D4OZ7N27-CxX1ETVW.mjs +1 -0
  320. package/dist/{python3-AUFTPCU6-BaJugIdp.mjs → python3-AUFTPCU6-C74hXpFG.mjs} +2 -2
  321. package/dist/readlink-MI4GCHJF-DeD4E7nz.mjs +1 -0
  322. package/dist/rev-XOSYPP45-BnymxcnA.mjs +1 -0
  323. package/dist/rg-FOQSCCX3-BiJSKli9.mjs +1 -0
  324. package/dist/rm-RTZG23RL-Djvo3nEY.mjs +1 -0
  325. package/dist/rmdir-XTQXT7RK-OI_3n90A.mjs +1 -0
  326. package/dist/schemas/v0/config.project.schema.json +0 -13
  327. package/dist/schemas/v0/config.user.schema.json +0 -10
  328. package/dist/sed-VFTTATXJ-Tyu5G4I6.mjs +1 -0
  329. package/dist/seq-RN5ZUASB-CG-hfPIu.mjs +1 -0
  330. package/dist/sha1sum-VJPNLNU6-CEXqRxvP.mjs +1 -0
  331. package/dist/sha256sum-PI32XWXY-Bxzw_ykX.mjs +1 -0
  332. package/dist/sleep-VZFPZFWA-WRTGZhTn.mjs +1 -0
  333. package/dist/sort-DCNRDA7U-CuSJrCSQ.mjs +1 -0
  334. package/dist/split-SITCSYCZ-DqKN3r-A.mjs +1 -0
  335. package/dist/sqlite3-56UMWEY3-C6G8A9IC.mjs +1 -0
  336. package/dist/src-DMe_jLWZ.mjs +2 -0
  337. package/dist/start-BTbMaVtC.mjs +1 -0
  338. package/dist/start-BtHrrb3o.mjs +3 -0
  339. package/dist/stat-BT5A227F-D3-4IZjb.mjs +1 -0
  340. package/dist/strings-7PLOGTPD-DoJhZcXP.mjs +1 -0
  341. package/dist/tac-SJGXQ4T2-CGNEtOiG.mjs +1 -0
  342. package/dist/tail-S5ULNTJU-17nfIM0G.mjs +1 -0
  343. package/dist/tar-ANUBEFJY-C-eZUMPO.mjs +1 -0
  344. package/dist/tee-O7VXZDCO-D4C0E2s8.mjs +1 -0
  345. package/dist/time-DEUO3QV2-Wc9ZVUVu.mjs +1 -0
  346. package/dist/timeout-VRKMCG72-2MptSPRD.mjs +1 -0
  347. package/dist/touch-DX2IJOQ4-DOTz2-NU.mjs +1 -0
  348. package/dist/tr-2HXZRDSW-5aOBfN_I.mjs +1 -0
  349. package/dist/tree-LYXBS7DC-BVyeg_3R.mjs +1 -0
  350. package/dist/true-WHJNXCHG-QiTH9f1Z.mjs +1 -0
  351. package/dist/unexpand-RGTMIGZM-m3YwxdOg.mjs +1 -0
  352. package/dist/uniq-SUNANL47-CuhWyTTO.mjs +1 -0
  353. package/dist/wc-TQB3VNOX-CaEqXvYd.mjs +1 -0
  354. package/dist/which-XZHEH76L-DA_Bm_KM.mjs +1 -0
  355. package/dist/whoami-DGKU3D2X-Bdt58SNY.mjs +1 -0
  356. package/dist/xan-BXDXYEIB-CWBZ1rgf.mjs +1 -0
  357. package/dist/xan-view-ECQUO7AJ-eo_owVyX.mjs +1 -0
  358. package/dist/xargs-I6EZUCYF-VBH5v0oN.mjs +1 -0
  359. package/dist/yq-MJMAR36V-eZBfA9vJ.mjs +1 -0
  360. package/package.json +1 -1
  361. package/dist/alias-JE7RI5QX-Bia4gLMF.mjs +0 -1
  362. package/dist/awk2-POPGKRAI-DDrFV-7v.mjs +0 -1
  363. package/dist/base64-4YMZCVJ5-DDKKOjMm.mjs +0 -1
  364. package/dist/basename-AA2KJYZQ-BK5zVs3W.mjs +0 -1
  365. package/dist/bash-IJWYRKFO-B9r1a0X9.mjs +0 -1
  366. package/dist/build-B6buVrsB.mjs +0 -2
  367. package/dist/cat-RDUMLXKC-CeNrSElK.mjs +0 -1
  368. package/dist/chmod-SYMGL4JA-DFJ4ylQU.mjs +0 -1
  369. package/dist/clear-5CZ5X4YR-CadVxKrq.mjs +0 -1
  370. package/dist/colors-T3xmlXQT.mjs +0 -1
  371. package/dist/column-WLPMMSTS-6o4DDsDk.mjs +0 -1
  372. package/dist/comm-5SLSESQG-C2GatHU6.mjs +0 -1
  373. package/dist/constants-CswmjLU5.mjs +0 -2
  374. package/dist/cp-XOYR4ABJ-DmS6dER-.mjs +0 -1
  375. package/dist/cut-OPC3VAGB-s4tQWhL5.mjs +0 -1
  376. package/dist/date-DD7FVA2V-Dubgjr6a.mjs +0 -1
  377. package/dist/diff-HJF2MPDN-DjGBLQph.mjs +0 -1
  378. package/dist/dirname-LEMTZZFS-B477CImE.mjs +0 -1
  379. package/dist/dist-BToVkFhc.mjs +0 -1
  380. package/dist/du-WO2ENHXQ-C4c5wweW.mjs +0 -1
  381. package/dist/echo-O45JWWI2-TudodhHR.mjs +0 -1
  382. package/dist/env-5EPCWSXR-CTcNEMpy.mjs +0 -1
  383. package/dist/expand-DTNXU4LQ-BT6M2Tdc.mjs +0 -1
  384. package/dist/expansion-ENLSRCXJ-Cy7j--Iy.mjs +0 -1
  385. package/dist/expr-5T3UU5KE-D2Kr5nuJ.mjs +0 -1
  386. package/dist/file-ZIGAJ4YS-BH3jYcuM.mjs +0 -1
  387. package/dist/find-TPUOAIUQ-RFxkUcGN.mjs +0 -1
  388. package/dist/flag-coverage-QT4N2Z44--nNG-HLV.mjs +0 -2
  389. package/dist/fold-LDSORVYE-CfKQmrJ1.mjs +0 -1
  390. package/dist/grep-3AIAIJVR-DgQJLmW0.mjs +0 -1
  391. package/dist/gzip-AQXSGOVS-yXjpnIVd.mjs +0 -1
  392. package/dist/head-HT2B6D2J-BR4RHRTk.mjs +0 -1
  393. package/dist/help-VVWX7SA5-M6C6klSC.mjs +0 -1
  394. package/dist/history-J4QRNGRO-C1r7-kvT.mjs +0 -1
  395. package/dist/hostname-BK6HG2DE-BBBcRrtV.mjs +0 -1
  396. package/dist/html-to-markdown-TFCECAGV-B9oYuMVf.mjs +0 -1
  397. package/dist/init-C90VliDt.mjs +0 -1
  398. package/dist/init-Cw_1Ay1s.mjs +0 -397
  399. package/dist/join-GG2LDHE5-xeTE0Mi4.mjs +0 -1
  400. package/dist/jq-ODXZBPLY-C5v6qNu_.mjs +0 -1
  401. package/dist/ln-4TRFBYAT-4XMTO1OQ.mjs +0 -1
  402. package/dist/loader-BOTBqos-.mjs +0 -1
  403. package/dist/loader-BTC8Ab4t.mjs +0 -4
  404. package/dist/ls-KSXFZCWH-Bw_Cf-VY.mjs +0 -1
  405. package/dist/md5sum-INMIK4DX-CAIH4ZVI.mjs +0 -1
  406. package/dist/mkdir-TDEMSB6C-D1oUG8Jf.mjs +0 -1
  407. package/dist/mrmime-C2W7cgq2.mjs +0 -2
  408. package/dist/mv-Z6MORUFL-CN471qcL.mjs +0 -1
  409. package/dist/nl-U5YJDM32-CFzXKze3.mjs +0 -1
  410. package/dist/od-VJEF2UR5-C2R4Accu.mjs +0 -1
  411. package/dist/open-browser-BZZK_gJj.mjs +0 -2
  412. package/dist/paste-7N6AFSDS-bUl2Dwz3.mjs +0 -1
  413. package/dist/preview-CGUMKfC0.mjs +0 -1
  414. package/dist/printf-CX64KX2P-Ce--gWAq.mjs +0 -1
  415. package/dist/public/assets/ActivityModeContent-1ymqlcHI.js +0 -2
  416. package/dist/public/assets/DocumentContext-bvfr7pL2.js +0 -37
  417. package/dist/public/assets/GraphPanel-DdVygxYk.js +0 -46
  418. package/dist/public/assets/McpConsentDialogBody-CJwPf_uv.js +0 -1
  419. package/dist/public/assets/OutlinePanel-dumodx-h.js +0 -2
  420. package/dist/public/assets/SettingsPane-CtgbQZxP.js +0 -6
  421. package/dist/public/assets/SourceEditor-CR_7DOAH.js +0 -2
  422. package/dist/public/assets/architecture-YZFGNWBL-DVxNz-zn.js +0 -1
  423. package/dist/public/assets/channel-CR-xJel6.js +0 -1
  424. package/dist/public/assets/chunk-426QAEUC-BoBKbVmN.js +0 -1
  425. package/dist/public/assets/chunk-55IACEB6-CqVyNzhX.js +0 -1
  426. package/dist/public/assets/chunk-QZHKN3VN-DBRWHtgj.js +0 -1
  427. package/dist/public/assets/classDiagram-6PBFFD2Q-oopM_Z0m.js +0 -1
  428. package/dist/public/assets/classDiagram-v2-HSJHXN6E-ZAL74u9S.js +0 -1
  429. package/dist/public/assets/clone-C5y6xhRJ.js +0 -1
  430. package/dist/public/assets/config-validation-events-BvuBj41U.js +0 -1
  431. package/dist/public/assets/dialog-Cv1qneWl.js +0 -45
  432. package/dist/public/assets/dist-B4kUko7n.js +0 -9
  433. package/dist/public/assets/dist-BOapDt7N.js +0 -1
  434. package/dist/public/assets/dist-S8LJmtzL.js +0 -1
  435. package/dist/public/assets/dist-VyzSEzD4.js +0 -1
  436. package/dist/public/assets/doc-hash-Q6dTjwu5.js +0 -421
  437. package/dist/public/assets/gitGraph-7Q5UKJZL-CYhZlmk3.js +0 -1
  438. package/dist/public/assets/index-BBbaN3Kd.js +0 -1858
  439. package/dist/public/assets/index-DOkkqO-8.css +0 -1
  440. package/dist/public/assets/info-OMHHGYJF-BslcKZhH.js +0 -1
  441. package/dist/public/assets/isSymbol-BP7IOIqG.js +0 -1
  442. package/dist/public/assets/mcp-consent-store-BBTXqzE6.js +0 -1
  443. package/dist/public/assets/packet-4T2RLAQJ-QVnYA304.js +0 -1
  444. package/dist/public/assets/pie-ZZUOXDRM-C61c5byc.js +0 -1
  445. package/dist/public/assets/radar-PYXPWWZC-CMxjRtd8.js +0 -1
  446. package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-B8L3BBt1.js +0 -1
  447. package/dist/public/assets/stex-BKMR5xQj.js +0 -1
  448. package/dist/public/assets/tooltip-CBGDOTMI.js +0 -1
  449. package/dist/public/assets/treeView-SZITEDCU-DfSa_Oiv.js +0 -1
  450. package/dist/public/assets/treemap-W4RFUUIX-Cp0s5wEq.js +0 -1
  451. package/dist/public/assets/wardley-RL74JXVD-CXcBKCuj.js +0 -1
  452. package/dist/pwd-D4OZ7N27-C18XewhV.mjs +0 -1
  453. package/dist/readlink-MI4GCHJF-CHvs7DDT.mjs +0 -1
  454. package/dist/rev-XOSYPP45-2mnFFZWW.mjs +0 -1
  455. package/dist/rg-FOQSCCX3-BJahNfSe.mjs +0 -1
  456. package/dist/rm-RTZG23RL-D9-0WGRY.mjs +0 -1
  457. package/dist/rmdir-XTQXT7RK-Br7eH9kL.mjs +0 -1
  458. package/dist/sed-VFTTATXJ-mYhAmixc.mjs +0 -1
  459. package/dist/seq-RN5ZUASB-CKf5MNNO.mjs +0 -1
  460. package/dist/sha1sum-VJPNLNU6-DuOHap1X.mjs +0 -1
  461. package/dist/sha256sum-PI32XWXY-D9fEipQ7.mjs +0 -1
  462. package/dist/sleep-VZFPZFWA-B1fSoYuO.mjs +0 -1
  463. package/dist/sort-DCNRDA7U-DDCY4JZu.mjs +0 -1
  464. package/dist/split-SITCSYCZ-b9hfEJw7.mjs +0 -1
  465. package/dist/sqlite3-56UMWEY3-BQEx5i3P.mjs +0 -1
  466. package/dist/src-DXx7F2B7.mjs +0 -1
  467. package/dist/start-BDIOjX_O.mjs +0 -3
  468. package/dist/start-DmOxN4Ez.mjs +0 -1
  469. package/dist/stat-BT5A227F-Dzp4sgau.mjs +0 -1
  470. package/dist/strings-7PLOGTPD-DT41jX9d.mjs +0 -1
  471. package/dist/tac-SJGXQ4T2-BpdVoP8b.mjs +0 -1
  472. package/dist/tail-S5ULNTJU-0-sYrYik.mjs +0 -1
  473. package/dist/tar-ANUBEFJY-Wh3na_NU.mjs +0 -1
  474. package/dist/tee-O7VXZDCO-CwnGG0go.mjs +0 -1
  475. package/dist/time-DEUO3QV2-DzkqaQ1k.mjs +0 -1
  476. package/dist/timeout-VRKMCG72-BtPBpIRq.mjs +0 -1
  477. package/dist/touch-DX2IJOQ4-KW0Ui-lB.mjs +0 -1
  478. package/dist/tr-2HXZRDSW-C6Kf0M8T.mjs +0 -1
  479. package/dist/tree-LYXBS7DC-BN1FBqvM.mjs +0 -1
  480. package/dist/true-WHJNXCHG-DxCMVdqj.mjs +0 -1
  481. package/dist/unexpand-RGTMIGZM-DZ4Kf6Xq.mjs +0 -1
  482. package/dist/uniq-SUNANL47-Ceg51JdA.mjs +0 -1
  483. package/dist/wc-TQB3VNOX-BzWNq0MY.mjs +0 -1
  484. package/dist/which-XZHEH76L-DH_U2-Cj.mjs +0 -1
  485. package/dist/whoami-DGKU3D2X-BholYNPM.mjs +0 -1
  486. package/dist/xan-BXDXYEIB-b1eAtgch.mjs +0 -1
  487. package/dist/xan-view-ECQUO7AJ-DWDC57b_.mjs +0 -1
  488. package/dist/xargs-I6EZUCYF-Cov-i7kW.mjs +0 -1
  489. package/dist/yq-MJMAR36V-1r29nH4p.mjs +0 -1
  490. /package/dist/public/assets/{ActivityPanelDiffView-DoHWP1ak.js → ActivityPanelDiffView-DeDaG2lq.js} +0 -0
  491. /package/dist/public/assets/{__vite-browser-external-FEGw1XPd.js → __vite-browser-external-sCjVW6Bj.js} +0 -0
  492. /package/dist/public/assets/{array-X0JlPOfd.js → array-COEOjKUv.js} +0 -0
  493. /package/dist/public/assets/{button-BsFpqlpT.js → button-C1nwPVFQ.js} +0 -0
  494. /package/dist/public/assets/{colors-XIJoz9Bd.js → colors-D6LRuSY-.js} +0 -0
  495. /package/dist/public/assets/{cytoscape.esm-BkjNfcSF.js → cytoscape.esm-4jw_vW_Q.js} +0 -0
  496. /package/dist/public/assets/{defaultLocale-ZxyFnXCb.js → defaultLocale-CoF2cqkH.js} +0 -0
  497. /package/dist/public/assets/{dist-CIRuNcH5.js → dist-Bog19bCH.js} +0 -0
  498. /package/dist/public/assets/{go-a33xvodr.js → go-wMvjCq97.js} +0 -0
  499. /package/dist/public/assets/{init-CBj3ecIW.js → init-8GNx5phc.js} +0 -0
  500. /package/dist/public/assets/{isObjectLike-AdQZ65l0.js → isObjectLike-DFnkciUU.js} +0 -0
  501. /package/dist/public/assets/{katex-qwlL5fSd.js → katex-DX-tM4Fr.js} +0 -0
  502. /package/dist/public/assets/{min-HKuGSUqa.js → min-BiwsSkbB.js} +0 -0
  503. /package/dist/public/assets/{path-rUlDLHdA.js → path-C-grg3CZ.js} +0 -0
  504. /package/dist/public/assets/{pdf-a35ddrIO.js → pdf-CtJiipL_.js} +0 -0
  505. /package/dist/public/assets/{pdf.worker-CM-zAFN-.js → pdf.worker-BZq-wJdz.js} +0 -0
  506. /package/dist/public/assets/{rough.esm-BFJ-MgcB.js → rough.esm-DDK-gphn.js} +0 -0
  507. /package/dist/public/assets/{shell-40VLet8r.js → shell-DdhS5_h8.js} +0 -0
  508. /package/dist/public/assets/{src-zyMpT2LE.js → src-L3wpjxBL.js} +0 -0
  509. /package/dist/public/assets/{trace-api-DPMyR1_m.js → trace-api-CiCjX4Sz.js} +0 -0
  510. /package/dist/public/assets/{w3c-keyname-Dfj2imOv.js → w3c-keyname-B5t0fahT.js} +0 -0
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./__vite-browser-external-FEGw1XPd.js","./chunk-CFjPhJqf.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./preload-helper-2ej06EnG.js";import{a as n,c as r,d as i,f as a,i as o,l as s,n as c,o as l,p as u,r as d,t as f,u as p}from"./trace-api-DPMyR1_m.js";import{n as m,r as ee,t as h}from"./propagation-api-qAYD7s-v.js";var te=class{constructor(){}createGauge(e,t){return fe}createHistogram(e,t){return pe}createCounter(e,t){return de}createUpDownCounter(e,t){return me}createObservableGauge(e,t){return ge}createObservableCounter(e,t){return he}createObservableUpDownCounter(e,t){return _e}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}},g=class{},ne=class extends g{add(e,t){}},re=class extends g{add(e,t){}},ie=class extends g{record(e,t){}},ae=class extends g{record(e,t){}},oe=class{addCallback(e){}removeCallback(e){}},se=class extends oe{},ce=class extends oe{},le=class extends oe{},ue=new te,de=new ne,fe=new ie,pe=new ae,me=new re,he=new se,ge=new ce,_e=new le;function ve(){return ue}var ye;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(ye||={});var be;(function(e){e[e.INTERNAL=0]=`INTERNAL`,e[e.SERVER=1]=`SERVER`,e[e.CLIENT=2]=`CLIENT`,e[e.PRODUCER=3]=`PRODUCER`,e[e.CONSUMER=4]=`CONSUMER`})(be||={});var _=p.instance(),xe=new class{getMeter(e,t,n){return ue}},Se=`metrics`,Ce=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalMeterProvider(e){return a(Se,e,p.instance())}getMeterProvider(){return i(Se)||xe}getMeter(e,t,n){return this.getMeterProvider().getMeter(e,t,n)}disable(){u(Se,p.instance())}}.getInstance(),we=class{_delegate;constructor(e){this._delegate=e}export(e,t){this._delegate.export(e,t)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}},Te=class extends Error{code;name=`OTLPExporterError`;data;constructor(e,t,n){super(e),this.data=n,this.code=t}};function Ee(e){if(Number.isFinite(e)&&e>0)return e;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${e}')`)}function De(e){if(e!=null)return()=>e}function Oe(e,t,n){return{timeoutMillis:Ee(e.timeoutMillis??t.timeoutMillis??n.timeoutMillis),concurrencyLimit:e.concurrencyLimit??t.concurrencyLimit??n.concurrencyLimit,compression:e.compression??t.compression??n.compression}}function ke(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:`none`}}var Ae=class{_concurrencyLimit;_sendingPromises=[];constructor(e){this._concurrencyLimit=e}pushPromise(e){if(this.hasReachedLimit())throw Error(`Concurrency Limit reached`);this._sendingPromises.push(e);let t=()=>{let t=this._sendingPromises.indexOf(e);this._sendingPromises.splice(t,1)};e.then(t,t)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}};function je(e){return new Ae(e.concurrencyLimit)}var Me=`http.url`,Ne=`http.user_agent`,Pe=Me,Fe=Ne,Ie=`error.type`,Le=`exception.message`,Re=`exception.stacktrace`,ze=`exception.type`,Be=`http.request.method`,Ve=`http.request.method_original`,He=`http.response.status_code`,Ue=`server.address`,We=`server.port`,Ge=`service.name`,Ke=`service.version`,qe=`telemetry.sdk.language`,Je=`webjs`,Ye=`telemetry.sdk.name`,Xe=`telemetry.sdk.version`,Ze=`url.full`,v;(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.FAILED=1]=`FAILED`})(v||={});function Qe(e){return Object.prototype.hasOwnProperty.call(e,`partialSuccess`)}function $e(){return{handleResponse(e){e==null||!Qe(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||_.warn(`Received Partial Success response:`,JSON.stringify(e.partialSuccess))}}}var et=class{_transport;_serializer;_responseHandler;_promiseQueue;_timeout;_diagLogger;constructor(e,t,n,r,i){this._transport=e,this._serializer=t,this._responseHandler=n,this._promiseQueue=r,this._timeout=i,this._diagLogger=_.createComponentLogger({namespace:`OTLPExportDelegate`})}export(e,t){if(this._diagLogger.debug(`items to be sent`,e),this._promiseQueue.hasReachedLimit()){t({code:v.FAILED,error:Error(`Concurrent export limit reached`)});return}let n=this._serializer.serializeRequest(e);if(n==null){t({code:v.FAILED,error:Error(`Nothing to send`)});return}this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(e=>{if(e.status===`success`){if(e.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(e.data))}catch(t){this._diagLogger.warn(`Export succeeded but could not deserialize response - is the response specification compliant?`,t,e.data)}t({code:v.SUCCESS});return}else if(e.status===`failure`&&e.error){t({code:v.FAILED,error:e.error});return}else e.status===`retryable`?t({code:v.FAILED,error:new Te(`Export failed with retryable status`)}):t({code:v.FAILED,error:new Te(`Export failed with unknown error`)})},e=>t({code:v.FAILED,error:e})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug(`shutdown started`),await this.forceFlush(),this._transport.shutdown()}};function tt(e,t){return new et(e.transport,e.serializer,$e(),e.promiseHandler,t.timeout)}function nt(e,t,n){return tt({transport:n,serializer:t,promiseHandler:je(e)},{timeout:e.timeoutMillis})}var rt=10**9;function it(e){return e[0]*rt+e[1]}function at(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function ot(e){let t=new Uint8Array(e.length/2),n=0;for(let r=0;r<e.length;r+=2){let i=at(e.charCodeAt(r)),a=at(e.charCodeAt(r+1));t[n++]=i<<4|a}return t}function st(e){let t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function ct(e){return{low:Number(BigInt.asUintN(32,e)),high:Number(BigInt.asUintN(32,e>>BigInt(32)))}}function lt(e){return ct(st(e))}function ut(e){return st(e).toString()}var dt=typeof BigInt<`u`?ut:it;function ft(e){return e}function pt(e){if(e!==void 0)return ot(e)}var mt={encodeHrTime:lt,encodeSpanContext:ot,encodeOptionalSpanContext:pt};function ht(e){if(e===void 0)return mt;let t=e.useLongBits??!0,n=e.useHex??!1;return{encodeHrTime:t?lt:dt,encodeSpanContext:n?ft:ot,encodeOptionalSpanContext:n?ft:pt}}function gt(e){let t={attributes:vt(e.attributes),droppedAttributesCount:0},n=e.schemaUrl;return n&&n!==``&&(t.schemaUrl=n),t}function _t(e){return{name:e.name,version:e.version}}function vt(e){return Object.keys(e).map(t=>yt(t,e[t]))}function yt(e,t){return{key:e,value:bt(t)}}function bt(e){let t=typeof e;return t===`string`?{stringValue:e}:t===`number`?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t===`boolean`?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(bt)}}:t===`object`&&e!=null?{kvlistValue:{values:Object.entries(e).map(([e,t])=>yt(e,t))}}:{}}function xt(e,t){let n=e.spanContext(),r=e.status,i=e.parentSpanContext?.spanId?t.encodeSpanContext(e.parentSpanContext?.spanId):void 0;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:i,traceState:n.traceState?.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:vt(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(e=>Ct(e,t)),droppedEventsCount:e.droppedEventsCount,status:{code:r.code,message:r.message},links:e.links.map(e=>St(e,t)),droppedLinksCount:e.droppedLinksCount}}function St(e,t){return{attributes:e.attributes?vt(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:e.context.traceState?.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function Ct(e,t){return{attributes:e.attributes?vt(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function wt(e,t){return{resourceSpans:Et(e,ht(t))}}function Tt(e){let t=new Map;for(let n of e){let e=t.get(n.resource);e||(e=new Map,t.set(n.resource,e));let r=`${n.instrumentationScope.name}@${n.instrumentationScope.version||``}:${n.instrumentationScope.schemaUrl||``}`,i=e.get(r);i||(i=[],e.set(r,i)),i.push(n)}return t}function Et(e,t){let n=Tt(e),r=[],i=n.entries(),a=i.next();for(;!a.done;){let[e,n]=a.value,o=[],s=n.values(),c=s.next();for(;!c.done;){let e=c.value;if(e.length>0){let n=e.map(e=>xt(e,t));o.push({scope:_t(e[0].instrumentationScope),spans:n,schemaUrl:e[0].instrumentationScope.schemaUrl})}c=s.next()}let l=gt(e),u={resource:l,scopeSpans:o,schemaUrl:l.schemaUrl};r.push(u),a=i.next()}return r}var Dt={serializeRequest:e=>{let t=wt(e,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(t))},deserializeResponse:e=>{if(e.length===0)return{};let t=new TextDecoder;return JSON.parse(t.decode(e))}},Ot=5,kt=1e3,At=5e3,jt=1.5,Mt=.2;function Nt(){return 2*Mt*Math.random()-Mt}var Pt=class{_transport;constructor(e){this._transport=e}retry(e,t,n){return new Promise((r,i)=>{setTimeout(()=>{this._transport.send(e,t).then(r,i)},n)})}async send(e,t){let n=Date.now()+t,r=await this._transport.send(e,t),i=Ot,a=kt;for(;r.status===`retryable`&&i>0;){i--;let t=Math.max(Math.min(a,At)+Nt(),0);a*=jt;let o=r.retryInMillis??t,s=n-Date.now();if(o>s)return r;r=await this.retry(e,s,o)}return r}shutdown(){return this._transport.shutdown()}};function Ft(e){return new Pt(e.transport)}function It(e){return[429,502,503,504].includes(e)}function Lt(e){if(e==null)return;let t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;let n=new Date(e).getTime()-Date.now();return n>=0?n:0}var Rt=class{_parameters;constructor(e){this._parameters=e}send(e,t){return new Promise(n=>{let r=new XMLHttpRequest;r.timeout=t,r.open(`POST`,this._parameters.url);let i=this._parameters.headers();Object.entries(i).forEach(([e,t])=>{r.setRequestHeader(e,t)}),r.ontimeout=e=>{n({status:`failure`,error:Error(`XHR request timed out`)})},r.onreadystatechange=()=>{r.status>=200&&r.status<=299?(_.debug(`XHR success`),n({status:`success`})):r.status&&It(r.status)?n({status:`retryable`,retryInMillis:Lt(r.getResponseHeader(`Retry-After`))}):r.status!==0&&n({status:`failure`,error:Error(`XHR request failed with non-retryable status`)})},r.onabort=()=>{n({status:`failure`,error:Error(`XHR request aborted`)})},r.onerror=()=>{n({status:`failure`,error:Error(`XHR request errored`)})},r.send(e)})}shutdown(){}};function zt(e){return new Rt(e)}var Bt=class{_params;constructor(e){this._params=e}send(e){return new Promise(t=>{navigator.sendBeacon(this._params.url,new Blob([e],{type:this._params.blobType}))?(_.debug(`SendBeacon success`),t({status:`success`})):t({status:`failure`,error:Error(`SendBeacon failed`)})})}shutdown(){}};function Vt(e){return new Bt(e)}var Ht=class{_parameters;constructor(e){this._parameters=e}async send(e,t){let n=new AbortController,r=setTimeout(()=>n.abort(),t);try{let t=!!globalThis.location,r=new URL(this._parameters.url),i=await fetch(r.href,{method:`POST`,headers:this._parameters.headers(),body:e,signal:n.signal,keepalive:t,mode:t?globalThis.location?.origin===r.origin?`same-origin`:`cors`:`no-cors`});return i.status>=200&&i.status<=299?(_.debug(`response success`),{status:`success`}):It(i.status)?{status:`retryable`,retryInMillis:Lt(i.headers.get(`Retry-After`))}:{status:`failure`,error:Error(`Fetch request failed with non-retryable status`)}}catch(e){return e?.name===`AbortError`?{status:`failure`,error:Error(`Fetch request timed out`,{cause:e})}:{status:`failure`,error:Error(`Fetch request errored`,{cause:e})}}finally{clearTimeout(r)}}shutdown(){}};function Ut(e){return new Ht(e)}function Wt(e,t){return nt(e,t,Ft({transport:zt(e)}))}function Gt(e,t){return nt(e,t,Ft({transport:Ut(e)}))}function Kt(e,t){return nt(e,t,Ft({transport:Vt({url:e.url,blobType:e.headers()[`Content-Type`]})}))}function qt(e){return()=>{let t={};return Object.entries(e?.()??{}).forEach(([e,n])=>{n===void 0?_.warn(`Header "${e}" has invalid value (${n}) and will be ignored`):t[e]=String(n)}),t}}function Jt(e,t,n){let r={...n()},i={};return()=>(t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,r))}function Yt(e){if(e!=null)try{let t=globalThis.location?.href;return new URL(e,t).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${e}'`)}}function Xt(n){return async r=>{let{Agent:i}=await t(()=>import(`./__vite-browser-external-FEGw1XPd.js`).then(t=>e(t.default)),__vite__mapDeps([0,1]),import.meta.url);return new i(n)}}function Zt(e,t,n){return{...Oe(e,t,n),headers:Jt(qt(e.headers),t.headers,n.headers),url:Yt(e.url)??t.url??n.url,agentFactory:e.agentFactory??t.agentFactory??n.agentFactory}}function Qt(e,t){return{...ke(),headers:()=>e,url:`http://localhost:4318/`+t,agentFactory:Xt({keepAlive:!0})}}function $t(e,t,n){return Zt({url:e.url,timeoutMillis:e.timeoutMillis,headers:De(e.headers),concurrencyLimit:e.concurrencyLimit},{},Qt(n,t))}function en(e,t,n,r){return tn(e.headers)($t(e,n,r),t)}function tn(e){return!e&&typeof navigator.sendBeacon==`function`?Kt:globalThis.fetch===void 0?Wt:Gt}var nn=class extends we{constructor(e={}){super(en(e,Dt,`v1/traces`,{"Content-Type":`application/json`}))}},rn=class{emit(e){}},an=new rn,on=new class{getLogger(e,t,n){return new rn}},sn=class{constructor(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider._getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):an}},cn=class{getLogger(e,t,n){return this._getDelegateLogger(e,t,n)??new sn(this,e,t,n)}_getDelegate(){return this._delegate??on}_setDelegate(e){this._delegate=e}_getDelegateLogger(e,t,n){return this._delegate?.getLogger(e,t,n)}},ln=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{},y=Symbol.for(`io.opentelemetry.js.api.logs`),b=ln;function un(e,t,n){return r=>r===e?t:n}var dn=class e{constructor(){this._proxyLoggerProvider=new cn}static getInstance(){return this._instance||=new e,this._instance}setGlobalLoggerProvider(e){return b[y]?this.getLoggerProvider():(b[y]=un(1,e,on),this._proxyLoggerProvider._setDelegate(e),e)}getLoggerProvider(){return b[y]?.call(b,1)??this._proxyLoggerProvider}getLogger(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)}disable(){delete b[y],this._proxyLoggerProvider=new cn}}.getInstance();function fn(e,t,n,r){for(let i=0,a=e.length;i<a;i++){let a=e[i];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}function pn(e){e.forEach(e=>e.disable())}function mn(e){let t=e.tracerProvider||f.getTracerProvider(),n=e.meterProvider||Ce.getMeterProvider(),r=e.loggerProvider||dn.getLoggerProvider(),i=e.instrumentations?.flat()??[];return fn(i,t,n,r),()=>{pn(i)}}var x=console.error.bind(console);function S(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var hn=(e,t,n)=>{if(!e||!e[t]){x(`no original function `+String(t)+` to wrap`);return}if(!n){x(`no wrapper function`),x(Error().stack);return}let r=e[t];if(typeof r!=`function`||typeof n!=`function`){x(`original object and wrapper must be functions`);return}let i=n(r,t);return S(i,`__original`,r),S(i,`__unwrap`,()=>{e[t]===i&&S(e,t,r)}),S(i,`__wrapped`,!0),S(e,t,i),i},gn=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{x(`must provide one or more modules to patch`),x(Error().stack);return}if(!(t&&Array.isArray(t))){x(`must provide one or more functions to wrap on modules`);return}e.forEach(e=>{t.forEach(t=>{hn(e,t,n)})})},_n=(e,t)=>{if(!e||!e[t]){x(`no function to unwrap.`),x(Error().stack);return}let n=e[t];if(!n.__unwrap)x(`no original to unwrap to -- has `+String(t)+` already been unwrapped?`);else{n.__unwrap();return}},vn=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{x(`must provide one or more modules to patch`),x(Error().stack);return}if(!(t&&Array.isArray(t))){x(`must provide one or more functions to unwrap on modules`);return}e.forEach(e=>{t.forEach(t=>{_n(e,t)})})};function C(e){e&&e.logger&&(typeof e.logger==`function`?x=e.logger:x(`new logger isn't a function, not replacing`))}C.wrap=hn,C.massWrap=gn,C.unwrap=_n,C.massUnwrap=vn;var yn=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(e,t,n){this.instrumentationName=e,this.instrumentationVersion=t,this.setConfig(n),this._diag=_.createComponentLogger({namespace:e}),this._tracer=f.getTracer(e,t),this._meter=Ce.getMeter(e,t),this._logger=dn.getLogger(e,t),this._updateMetricInstruments()}_wrap=hn;_unwrap=_n;_massWrap=gn;_massUnwrap=vn;get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let e=this.init()??[];return Array.isArray(e)?e:[e]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config={enabled:!0,...e}}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,t,n,r){if(e)try{e(n,r)}catch(e){this._diag.error(`Error running span customization hook due to exception in handler`,{triggerName:t},e)}}},bn=class extends yn{constructor(e,t,n){super(e,t,n),this._config.enabled&&this.enable()}};function w(e,t,n){let r,i;try{i=e()}catch(e){r=e}finally{if(t(r,i),r&&!n)throw r;return i}}function T(e){return typeof e==`function`&&typeof e.__original==`function`&&typeof e.__unwrap==`function`&&e.__wrapped===!0}var E;(function(e){e[e.STABLE=1]=`STABLE`,e[e.OLD=2]=`OLD`,e[e.DUPLICATE=3]=`DUPLICATE`})(E||={});function xn(e,t){let n=E.OLD,r=t?.split(`,`).map(e=>e.trim()).filter(e=>e!==``);for(let t of r??[])if(t.toLowerCase()===e+`/dup`){n=E.DUPLICATE;break}else t.toLowerCase()===e&&(n=E.STABLE);return n}var Sn=s(`OpenTelemetry SDK Context Key SUPPRESS_TRACING`);function Cn(e){return e.setValue(Sn,!0)}function wn(e){return e.getValue(Sn)===!0}var Tn=`baggage`,En=4096;function Dn(e){return e.reduce((e,t)=>{let n=`${e}${e===``?``:`,`}${t}`;return n.length>8192?e:n},``)}function On(e){return e.getAllEntries().map(([e,t])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(n+=`;`+t.metadata.toString()),n})}function kn(e){if(!e)return;let t=e.indexOf(`;`),n=t===-1?e:e.substring(0,t),r=n.indexOf(`=`);if(r<=0)return;let i=n.substring(0,r).trim(),a=n.substring(r+1).trim();if(!i||!a)return;let o,s;try{o=decodeURIComponent(i),s=decodeURIComponent(a)}catch{return}let c;return t!==-1&&t<e.length-1&&(c=ee(e.substring(t+1))),{key:o,value:s,metadata:c}}var An=class{inject(e,t,n){let r=h.getBaggage(e);if(!r||wn(e))return;let i=Dn(On(r).filter(e=>e.length<=En).slice(0,180));i.length>0&&n.set(t,Tn,i)}extract(e,t,n){let r=n.get(t,Tn),i=Array.isArray(r)?r.join(`,`):r;if(!i)return e;let a={};return i.length===0||(i.split(`,`).forEach(e=>{let t=kn(e);if(t){let e={value:t.value};t.metadata&&(e.metadata=t.metadata),a[t.key]=e}}),Object.entries(a).length===0)?e:h.setBaggage(e,h.createBaggage(a))}fields(){return[Tn]}};function D(e){let t={};if(typeof e!=`object`||!e)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!jn(n)){_.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Mn(r)){_.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}function jn(e){return typeof e==`string`&&e!==``}function Mn(e){return e==null?!0:Array.isArray(e)?Nn(e):Pn(typeof e)}function Nn(e){let t;for(let n of e){if(n==null)continue;let e=typeof n;if(e!==t){if(!t){if(Pn(e)){t=e;continue}return!1}return!1}}return!0}function Pn(e){switch(e){case`number`:case`boolean`:case`string`:return!0}return!1}function Fn(){return e=>{_.error(In(e))}}function In(e){return typeof e==`string`?e:JSON.stringify(Ln(e))}function Ln(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))}),n=Object.getPrototypeOf(n);return t}var Rn=Fn();function O(e){try{Rn(e)}catch{}}var zn=`2.7.0`,Bn=`process.runtime.name`,Vn={[Ye]:`opentelemetry`,[Bn]:`browser`,[qe]:Je,[Xe]:zn},k=performance,Hn=9,Un=10**6,Wn=10**Hn;function A(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*Un)]}function Gn(e){return Yn(A(k.timeOrigin),A(typeof e==`number`?e:k.now()))}function Kn(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(--n,r+=Wn),[n,r]}function qn(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function Jn(e){return qn(e)||typeof e==`number`||e instanceof Date}function Yn(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Wn&&(n[1]-=Wn,n[0]+=1),n}var Xn;(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.FAILED=1]=`FAILED`})(Xn||={});var Zn=class{_propagators;_fields;constructor(e={}){this._propagators=e.propagators??[],this._fields=Array.from(new Set(this._propagators.map(e=>typeof e.fields==`function`?e.fields():[]).reduce((e,t)=>e.concat(t),[])))}inject(e,t,n){for(let r of this._propagators)try{r.inject(e,t,n)}catch(e){_.warn(`Failed to inject with ${r.constructor.name}. Err: ${e.message}`)}}extract(e,t,n){return this._propagators.reduce((e,r)=>{try{return r.extract(e,t,n)}catch(e){_.warn(`Failed to extract with ${r.constructor.name}. Err: ${e.message}`)}return e},e)}fields(){return this._fields.slice()}},Qn=`[_0-9a-z-*/]`,$n=`[a-z]${Qn}{0,255}`,er=`[a-z0-9]${Qn}{0,240}@[a-z]${Qn}{0,13}`,tr=RegExp(`^(?:${$n}|${er})$`),nr=/^[ -~]{0,255}[!-~]$/,rr=/,|=/;function ir(e){return tr.test(e)}function ar(e){return nr.test(e)&&!rr.test(e)}var or=32,sr=512,cr=`,`,lr=`=`,ur=class e{_internalState=new Map;constructor(e){e&&this._parse(e)}set(e,t){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,t)=>(e.push(t+lr+this.get(t)),e),[]).join(cr)}_parse(e){e.length>sr||(this._internalState=e.split(cr).reverse().reduce((e,t)=>{let n=t.trim(),r=n.indexOf(lr);if(r!==-1){let i=n.slice(0,r),a=n.slice(r+1,t.length);ir(i)&&ar(a)&&e.set(i,a)}return e},new Map),this._internalState.size>or&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,or))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}},j=`traceparent`,dr=`tracestate`,fr=`00`,pr=RegExp(`^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$`);function mr(e){let t=pr.exec(e);return!t||t[1]===`00`&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var hr=class{inject(e,t,n){let r=f.getSpanContext(e);if(!r||wn(e)||!d(r))return;let i=`${fr}-${r.traceId}-${r.spanId}-0${Number(r.traceFlags||l.NONE).toString(16)}`;n.set(t,j,i),r.traceState&&n.set(t,dr,r.traceState.serialize())}extract(e,t,n){let r=n.get(t,j);if(!r)return e;let i=Array.isArray(r)?r[0]:r;if(typeof i!=`string`)return e;let a=mr(i);if(!a)return e;a.isRemote=!0;let o=n.get(t,dr);if(o){let e=Array.isArray(o)?o.join(`,`):o;a.traceState=new ur(typeof e==`string`?e:void 0)}return f.setSpanContext(e,a)}fields(){return[j,dr]}},gr=`[object Object]`,_r=`[object Null]`,vr=`[object Undefined]`,yr=Function.prototype.toString,br=yr.call(Object),xr=Object.getPrototypeOf,Sr=Object.prototype,Cr=Sr.hasOwnProperty,M=Symbol?Symbol.toStringTag:void 0,wr=Sr.toString;function Tr(e){if(!Er(e)||Dr(e)!==gr)return!1;let t=xr(e);if(t===null)return!0;let n=Cr.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&yr.call(n)===br}function Er(e){return typeof e==`object`&&!!e}function Dr(e){return e==null?e===void 0?vr:_r:M&&M in Object(e)?Or(e):kr(e)}function Or(e){let t=Cr.call(e,M),n=e[M],r=!1;try{e[M]=void 0,r=!0}catch{}let i=wr.call(e);return r&&(t?e[M]=n:delete e[M]),i}function kr(e){return wr.call(e)}var Ar=20;function jr(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=Nr(t,e.shift(),0,n);return t}function Mr(e){return N(e)?e.slice():e}function Nr(e,t,n=0,r){let i;if(!(n>Ar)){if(n++,F(e)||F(t)||Fr(t))i=Mr(t);else if(N(e)){if(i=e.slice(),N(t))for(let e=0,n=t.length;e<n;e++)i.push(Mr(t[e]));else if(P(t)){let e=Object.keys(t);for(let n=0,r=e.length;n<r;n++){let r=e[n];r===`__proto__`||r===`constructor`||r===`prototype`||(i[r]=Mr(t[r]))}}}else if(P(e))if(P(t)){if(!Ir(e,t))return t;i=Object.assign({},e);let a=Object.keys(t);for(let o=0,s=a.length;o<s;o++){let s=a[o];if(s===`__proto__`||s===`constructor`||s===`prototype`)continue;let c=t[s];if(F(c))c===void 0?delete i[s]:i[s]=c;else{let a=i[s],o=c;if(Pr(e,s,r)||Pr(t,s,r))delete i[s];else{if(P(a)&&P(o)){let n=r.get(a)||[],i=r.get(o)||[];n.push({obj:e,key:s}),i.push({obj:t,key:s}),r.set(a,n),r.set(o,i)}i[s]=Nr(i[s],c,n,r)}}}}else i=t;return i}}function Pr(e,t,n){let r=n.get(e[t])||[];for(let n=0,i=r.length;n<i;n++){let i=r[n];if(i.key===t&&i.obj===e)return!0}return!1}function N(e){return Array.isArray(e)}function Fr(e){return typeof e==`function`}function P(e){return!F(e)&&!N(e)&&!Fr(e)&&typeof e==`object`}function F(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===void 0||e instanceof Date||e instanceof RegExp||e===null}function Ir(e,t){return!(!Tr(e)||!Tr(t))}var Lr=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}},Rr=class{_isCalled=!1;_deferred=new Lr;_callback;_that;constructor(e,t){this._callback=e,this._that=t}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(e=>this._deferred.resolve(e),e=>this._deferred.reject(e))}catch(e){this._deferred.reject(e)}}return this._deferred.promise}},I;function zr(){if(I===void 0)try{let e=globalThis.process.argv0;I=e?`unknown_service:${e}`:`unknown_service`}catch{I=`unknown_service`}return I}var L=e=>typeof e==`object`&&!!e&&typeof e.then==`function`,Br=class e{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(t,n){let r=new e({},n);return r._rawAttributes=Ur(t),r._asyncAttributesPending=t.filter(([e,t])=>L(t)).length>0,r}constructor(e,t){let n=e.attributes??{};this._rawAttributes=Object.entries(n).map(([e,t])=>(L(t)&&(this._asyncAttributesPending=!0),[e,t])),this._rawAttributes=Ur(this._rawAttributes),this._schemaUrl=Wr(t?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[t,n]=this._rawAttributes[e];this._rawAttributes[e]=[t,L(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&_.error(`Accessing resource attributes before async attributes settled`),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[t,n]of this._rawAttributes){if(L(n)){_.debug(`Unsettled resource attribute ${t} skipped`);continue}n!=null&&(e[t]??=n)}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(t){if(t==null)return this;let n=Gr(this,t),r=n?{schemaUrl:n}:void 0;return e.FromAttributeList([...t.getRawAttributes(),...this.getRawAttributes()],r)}};function Vr(e,t){return Br.FromAttributeList(Object.entries(e),t)}function Hr(){return Vr({[Ge]:zr(),[qe]:Vn[qe],[Ye]:Vn[Ye],[Xe]:Vn[Xe]})}function Ur(e){return e.map(([e,t])=>L(t)?[e,t.catch(t=>{_.debug(`promise rejection for resource attribute: %s - %s`,e,t)})]:[e,t])}function Wr(e){if(typeof e==`string`||e===void 0)return e;_.warn(`Schema URL must be string or undefined, got %s. Schema URL will be ignored.`,e)}function Gr(e,t){let n=e?.schemaUrl,r=t?.schemaUrl,i=n===void 0||n===``,a=r===void 0||r===``;if(i)return r;if(a||n===r)return n;_.warn(`Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.`,n,r)}var Kr=`exception`,qr=class{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;_attributesCount=0;name;status={code:c.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_recordEndMetrics;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(e){let t=Date.now();if(this._spanContext=e.spanContext,this._performanceStartTime=k.now(),this._performanceOffset=t-(this._performanceStartTime+k.timeOrigin),this._startTimeProvided=e.startTime!=null,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit??0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,e.links)for(let t of e.links)this.addLink(t);this.startTime=this._getTime(e.startTime??t),this.resource=e.resource,this.instrumentationScope=e.scope,this._recordEndMetrics=e.recordEndMetrics,e.attributes!=null&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,t){if(t==null||this._isSpanEnded())return this;if(e.length===0)return _.warn(`Invalid attribute key: ${e}`),this;if(!Mn(t))return _.warn(`Invalid attribute value set for key: ${e}`),this;let{attributeCountLimit:n}=this._spanLimits,r=!Object.prototype.hasOwnProperty.call(this.attributes,e);return n!==void 0&&this._attributesCount>=n&&r?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),r&&this._attributesCount++,this)}setAttributes(e){for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.setAttribute(t,e[t]);return this}addEvent(e,t,n){if(this._isSpanEnded())return this;let{eventCountLimit:r}=this._spanLimits;if(r===0)return _.warn(`No events allowed.`),this._droppedEventsCount++,this;r!==void 0&&this.events.length>=r&&(this._droppedEventsCount===0&&_.debug(`Dropping extra events.`),this.events.shift(),this._droppedEventsCount++),Jn(t)&&(Jn(n)||(n=t),t=void 0);let i=D(t),{attributePerEventCountLimit:a}=this._spanLimits,o={},s=0,c=0;for(let e in i){if(!Object.prototype.hasOwnProperty.call(i,e))continue;let t=i[e];if(a!==void 0&&c>=a){s++;continue}o[e]=this._truncateToSize(t),c++}return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:s}),this}addLink(e){if(this._isSpanEnded())return this;let{linkCountLimit:t}=this._spanLimits;if(t===0)return this._droppedLinksCount++,this;t!==void 0&&this.links.length>=t&&(this._droppedLinksCount===0&&_.debug(`Dropping extra links.`),this.links.shift(),this._droppedLinksCount++);let{attributePerLinkCountLimit:n}=this._spanLimits,r=D(e.attributes),i={},a=0,o=0;for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let t=r[e];if(n!==void 0&&o>=n){a++;continue}i[e]=this._truncateToSize(t),o++}let s={context:e.context};return o>0&&(s.attributes=i),a>0&&(s.droppedAttributesCount=a),this.links.push(s),this}addLinks(e){for(let t of e)this.addLink(t);return this}setStatus(e){if(this._isSpanEnded()||e.code===c.UNSET||this.status.code===c.OK)return this;let t={code:e.code};return e.code===c.ERROR&&(typeof e.message==`string`?t.message=e.message:e.message!=null&&_.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`)),this.status=t,this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e){if(this._isSpanEnded()){_.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this.endTime=this._getTime(e),this._duration=Kn(this.startTime,this.endTime),this._duration[0]<0&&(_.warn(`Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.`,this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&_.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._droppedLinksCount>0&&_.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`),this._spanProcessor.onEnding&&this._spanProcessor.onEnding(this),this._recordEndMetrics?.(),this._ended=!0,this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e==`number`&&e<=k.now())return Gn(e+this._performanceOffset);if(typeof e==`number`)return A(e);if(e instanceof Date)return A(e.getTime());if(qn(e))return e;if(this._startTimeProvided)return A(Date.now());let t=k.now()-this._performanceStartTime;return Yn(this.startTime,A(t))}isRecording(){return this._ended===!1}recordException(e,t){let n={};typeof e==`string`?n[Le]=e:e&&(e.code?n[ze]=e.code.toString():e.name&&(n[ze]=e.name),e.message&&(n[Le]=e.message),e.stack&&(n[Re]=e.stack)),n[`exception.type`]||n[`exception.message`]?this.addEvent(Kr,n,t):_.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let e=Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);_.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_truncateToSize(e){let t=this._attributeValueLengthLimit;return t<=0?(_.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e==`string`?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(e=>typeof e==`string`?this._truncateToLimitUtil(e,t):e):e}},R;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(R||={});var z=class{shouldSample(){return{decision:R.NOT_RECORD}}toString(){return`AlwaysOffSampler`}},B=class{shouldSample(){return{decision:R.RECORD_AND_SAMPLED}}toString(){return`AlwaysOnSampler`}},V=class{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(e){this._root=e.root,this._root||=(O(Error(`ParentBasedSampler must have a root sampler configured`)),new B),this._remoteParentSampled=e.remoteParentSampled??new B,this._remoteParentNotSampled=e.remoteParentNotSampled??new z,this._localParentSampled=e.localParentSampled??new B,this._localParentNotSampled=e.localParentNotSampled??new z}shouldSample(e,t,n,r,i,a){let o=f.getSpanContext(e);return!o||!d(o)?this._root.shouldSample(e,t,n,r,i,a):o.isRemote?o.traceFlags&l.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,i,a):this._remoteParentNotSampled.shouldSample(e,t,n,r,i,a):o.traceFlags&l.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,i,a):this._localParentNotSampled.shouldSample(e,t,n,r,i,a)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}},Jr=class{_ratio;_upperBound;constructor(e=0){this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:o(t)&&this._accumulate(t)<this._upperBound?R.RECORD_AND_SAMPLED:R.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!=`number`||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n<e.length/8;n++){let r=n*8,i=parseInt(e.slice(r,r+8),16);t=(t^i)>>>0}return t}},H;(function(e){e.AlwaysOff=`always_off`,e.AlwaysOn=`always_on`,e.ParentBasedAlwaysOff=`parentbased_always_off`,e.ParentBasedAlwaysOn=`parentbased_always_on`,e.ParentBasedTraceIdRatio=`parentbased_traceidratio`,e.TraceIdRatio=`traceidratio`})(H||={});var Yr=1;function Xr(){return{sampler:Zr(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},spanLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128,linkCountLimit:128,eventCountLimit:128,attributePerEventCountLimit:128,attributePerLinkCountLimit:128}}}function Zr(){let e=H.ParentBasedAlwaysOn;switch(e){case H.AlwaysOn:return new B;case H.AlwaysOff:return new z;case H.ParentBasedAlwaysOn:return new V({root:new B});case H.ParentBasedAlwaysOff:return new V({root:new z});case H.TraceIdRatio:return new Jr(Qr());case H.ParentBasedTraceIdRatio:return new V({root:new Jr(Qr())});default:return _.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${H.ParentBasedAlwaysOn}".`),new V({root:new B})}}function Qr(){return _.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Yr}.`),Yr}function $r(e){let t={sampler:Zr()},n=Xr(),r=Object.assign({},n,t,e);return r.generalLimits=Object.assign({},n.generalLimits,e.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,e.spanLimits||{}),r}function ei(e){let t=Object.assign({},e.spanLimits);return t.attributeCountLimit=e.spanLimits?.attributeCountLimit??e.generalLimits?.attributeCountLimit??void 0??void 0??128,t.attributeValueLengthLimit=e.spanLimits?.attributeValueLengthLimit??e.generalLimits?.attributeValueLengthLimit??void 0??void 0??1/0,Object.assign({},e,{spanLimits:t})}var ti=class{_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_exporter;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(e,t){this._exporter=e,this._maxExportBatchSize=typeof t?.maxExportBatchSize==`number`?t.maxExportBatchSize:512,this._maxQueueSize=typeof t?.maxQueueSize==`number`?t.maxQueueSize:2048,this._scheduledDelayMillis=typeof t?.scheduledDelayMillis==`number`?t.scheduledDelayMillis:5e3,this._exportTimeoutMillis=typeof t?.exportTimeoutMillis==`number`?t.exportTimeoutMillis:3e4,this._shutdownOnce=new Rr(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(_.warn(`BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize`),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,t){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&l.SAMPLED)!==0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&_.debug(`maxQueueSize reached, dropping spans`),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(_.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,t)=>{let n=[],r=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let e=0,t=r;e<t;e++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,t)=>{let n=setTimeout(()=>{t(Error(`Timeout`))},this._exportTimeoutMillis);m.with(Cn(m.active()),()=>{let r;this._finishedSpans.length<=this._maxExportBatchSize?(r=this._finishedSpans,this._finishedSpans=[]):r=this._finishedSpans.splice(0,this._maxExportBatchSize);let i=()=>this._exporter.export(r,r=>{clearTimeout(n),r.code===Xn.SUCCESS?e():t(r.error??Error(`BatchSpanProcessor: span export failed`))}),a=null;for(let e=0,t=r.length;e<t;e++){let t=r[e];t.resource.asyncAttributesPending&&t.resource.waitForAsyncAttributes&&(a??=[],a.push(t.resource.waitForAsyncAttributes()))}a===null?i():Promise.all(a).then(i,e=>{O(e),t(e)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{this._isExporting=!1,O(e)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),typeof this._timer!=`number`&&this._timer.unref())}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}},ni=class extends ti{_visibilityChangeListener;_pageHideListener;constructor(e,t){super(e,t),this.onInit(t)}onInit(e){e?.disableAutoFlushOnDocumentHide!==!0&&typeof document<`u`&&(this._visibilityChangeListener=()=>{document.visibilityState===`hidden`&&this.forceFlush().catch(e=>{O(e)})},this._pageHideListener=()=>{this.forceFlush().catch(e=>{O(e)})},document.addEventListener(`visibilitychange`,this._visibilityChangeListener),document.addEventListener(`pagehide`,this._pageHideListener))}onShutdown(){typeof document<`u`&&(this._visibilityChangeListener&&document.removeEventListener(`visibilitychange`,this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener(`pagehide`,this._pageHideListener))}},ri=16,ii=8,ai=new Uint8Array(ri),oi=new Uint8Array(ii),si=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function ci(e){for(let t=0;t<e.length;t++)e[t]=Math.random()*256>>>0;for(let t=0;t<e.length;t++)if(e[t]>0)return;e[e.length-1]=1}function li(e){let t=``;for(let n=0;n<e.length;n++)t+=si[e[n]];return t}var ui=class{generateTraceId(){return ci(ai),li(ai)}generateSpanId(){return ci(oi),li(oi)}},di=`otel.span.parent.origin`,fi=`otel.span.sampling_result`,pi=`otel.sdk.span.live`,mi=`otel.sdk.span.started`,hi=class{startedSpans;liveSpans;constructor(e){this.startedSpans=e.createCounter(mi,{unit:`{span}`,description:`The number of created spans.`}),this.liveSpans=e.createUpDownCounter(pi,{unit:`{span}`,description:`The number of currently live spans.`})}startSpan(e,t){let n=_i(t);if(this.startedSpans.add(1,{[di]:gi(e),[fi]:n}),t===R.NOT_RECORD)return()=>{};let r={[fi]:n};return this.liveSpans.add(1,r),()=>{this.liveSpans.add(-1,r)}}};function gi(e){return e?e.isRemote?`remote`:`local`:`none`}function _i(e){switch(e){case R.RECORD_AND_SAMPLED:return`RECORD_AND_SAMPLE`;case R.RECORD:return`RECORD_ONLY`;case R.NOT_RECORD:return`DROP`}}var vi=`2.7.0`,yi=class{_sampler;_generalLimits;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;_tracerMetrics;constructor(e,t,n,r){let i=$r(t);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=t.idGenerator||new ui,this._resource=n,this._spanProcessor=r,this.instrumentationScope=e,this._tracerMetrics=new hi(i.meterProvider?i.meterProvider.getMeter(`@opentelemetry/sdk-trace`,vi):ve())}startSpan(e,t={},r=m.active()){t.root&&(r=f.deleteSpan(r));let i=f.getSpan(r);if(wn(r))return _.debug(`Instrumentation suppressed, returning Noop Span`),f.wrapSpanContext(n);let a=i?.spanContext(),o=this._idGenerator.generateSpanId(),s,c,u;!a||!f.isSpanContextValid(a)?c=this._idGenerator.generateTraceId():(c=a.traceId,u=a.traceState,s=a);let d=t.kind??be.INTERNAL,p=(t.links??[]).map(e=>({context:e.context,attributes:D(e.attributes)})),ee=D(t.attributes),h=this._sampler.shouldSample(r,c,e,d,ee,p),te=this._tracerMetrics.startSpan(a,h.decision);u=h.traceState??u;let g=h.decision===ye.RECORD_AND_SAMPLED?l.SAMPLED:l.NONE,ne={traceId:c,spanId:o,traceFlags:g,traceState:u};if(h.decision===ye.NOT_RECORD)return _.debug(`Recording is off, propagating context in a non-recording span`),f.wrapSpanContext(ne);let re=D(Object.assign(ee,h.attributes));return new qr({resource:this._resource,scope:this.instrumentationScope,context:r,spanContext:ne,name:e,kind:d,links:p,parentSpanContext:s,attributes:re,startTime:t.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits,recordEndMetrics:te})}startActiveSpan(e,t,n,r){let i,a,o;if(arguments.length<2)return;arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);let s=a??m.active(),c=this.startSpan(e,i,s),l=f.setSpan(s,c);return m.with(l,o,void 0,c)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}},bi=class{_spanProcessors;constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(t=>{Promise.all(e).then(()=>{t()}).catch(e=>{O(e||Error(`MultiSpanProcessor: forceFlush failed`)),t()})})}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnding(e){for(let t of this._spanProcessors)t.onEnding&&t.onEnding(e)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,n)=>{Promise.all(e).then(()=>{t()},n)})}},U;(function(e){e[e.resolved=0]=`resolved`,e[e.timeout=1]=`timeout`,e[e.error=2]=`error`,e[e.unresolved=3]=`unresolved`})(U||={});var xi=class{_config;_tracers=new Map;_resource;_activeSpanProcessor;constructor(e={}){let t=jr({},Xr(),ei(e));this._resource=t.resource??Hr(),this._config=Object.assign({},t,{resource:this._resource});let n=[];e.spanProcessors?.length&&n.push(...e.spanProcessors),this._activeSpanProcessor=new bi(n)}getTracer(e,t,n){let r=`${e}@${t||``}:${n?.schemaUrl||``}`;return this._tracers.has(r)||this._tracers.set(r,new yi({name:e,version:t,schemaUrl:n?.schemaUrl},this._config,this._resource,this._activeSpanProcessor)),this._tracers.get(r)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,t=this._activeSpanProcessor._spanProcessors.map(t=>new Promise(n=>{let r,i=setTimeout(()=>{n(Error(`Span processor did not completed within timeout period of ${e} ms`)),r=U.timeout},e);t.forceFlush().then(()=>{clearTimeout(i),r!==U.timeout&&(r=U.resolved,n(r))}).catch(e=>{clearTimeout(i),r=U.error,n(e)})}));return new Promise((e,n)=>{Promise.all(t).then(t=>{let r=t.filter(e=>e!==U.resolved);r.length>0?n(r):e()}).catch(e=>n([e]))})}shutdown(){return this._activeSpanProcessor.shutdown()}},Si=class{_enabled=!1;_currentContext=r;_bindFunction(e=r,t){let n=this,i=function(...r){return n.with(e,()=>t.apply(this,r))};return Object.defineProperty(i,`length`,{enumerable:!1,configurable:!0,writable:!1,value:t.length}),i}active(){return this._currentContext}bind(e,t){return e===void 0&&(e=this.active()),typeof t==`function`?this._bindFunction(e,t):t}disable(){return this._currentContext=r,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=r,this)}with(e,t,n,...i){let a=this._currentContext;this._currentContext=e||r;try{return t.call(n,...i)}finally{this._currentContext=a}}};function Ci(e){if(e!==null){if(e===void 0){let e=new Si;e.enable(),m.setGlobalContextManager(e);return}e.enable(),m.setGlobalContextManager(e)}}function wi(e){if(e!==null){if(e===void 0){h.setGlobalPropagator(new Zn({propagators:[new hr,new An]}));return}h.setGlobalPropagator(e)}}var Ti=class extends xi{constructor(e={}){super(e)}register(e={}){f.setGlobalTracerProvider(this),wi(e.propagator),Ci(e.contextManager)}},W;(function(e){e.CONNECT_END=`connectEnd`,e.CONNECT_START=`connectStart`,e.DECODED_BODY_SIZE=`decodedBodySize`,e.DOM_COMPLETE=`domComplete`,e.DOM_CONTENT_LOADED_EVENT_END=`domContentLoadedEventEnd`,e.DOM_CONTENT_LOADED_EVENT_START=`domContentLoadedEventStart`,e.DOM_INTERACTIVE=`domInteractive`,e.DOMAIN_LOOKUP_END=`domainLookupEnd`,e.DOMAIN_LOOKUP_START=`domainLookupStart`,e.ENCODED_BODY_SIZE=`encodedBodySize`,e.FETCH_START=`fetchStart`,e.LOAD_EVENT_END=`loadEventEnd`,e.LOAD_EVENT_START=`loadEventStart`,e.NAVIGATION_START=`navigationStart`,e.REDIRECT_END=`redirectEnd`,e.REDIRECT_START=`redirectStart`,e.REQUEST_START=`requestStart`,e.RESPONSE_END=`responseEnd`,e.RESPONSE_START=`responseStart`,e.SECURE_CONNECTION_START=`secureConnectionStart`,e.START_TIME=`startTime`,e.UNLOAD_EVENT_END=`unloadEventEnd`,e.UNLOAD_EVENT_START=`unloadEventStart`})(W||={});var Ei=`http.response_content_length`,Di=`http.response_content_length_uncompressed`;function G(e,t){return t in e}function K(e,t,n,r=!0){if(G(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function Oi(e,t,n=!1,r,i){if(r===void 0&&(r=t[W.START_TIME]!==0),n||(K(e,W.FETCH_START,t,r),K(e,W.DOMAIN_LOOKUP_START,t,r),K(e,W.DOMAIN_LOOKUP_END,t,r),K(e,W.CONNECT_START,t,r),K(e,W.SECURE_CONNECTION_START,t,r),K(e,W.CONNECT_END,t,r),K(e,W.REQUEST_START,t,r),K(e,W.RESPONSE_START,t,r),K(e,W.RESPONSE_END,t,r)),!i){let n=t[W.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(Ei,n);let r=t[W.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute(Di,r)}}function ki(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return`/`;let n=ji(e,t);if(t&&n.indexOf(`@id`)>0)return n;let r=``;return e.parentNode&&(r+=ki(e.parentNode,t)),r+=n,r}function Ai(e){if(!e.parentNode)return 0;let t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);let n=Array.from(e.parentNode.childNodes);return n=n.filter(n=>{let r=n.localName;return t.indexOf(n.nodeType)>=0&&r===e.localName}),n.length>=1?n.indexOf(e)+1:0}function ji(e,t){let n=e.nodeType,r=Ai(e),i=``;if(n===Node.ELEMENT_NODE){let n=e.getAttribute(`id`);if(t&&n)return`//*[@id="${n}"]`;i=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i=`text()`;else if(n===Node.COMMENT_NODE)i=`comment()`;else return``;return i&&r>1?`/${i}[${r}]`:`/${i}`}var q;(function(e){e.DOCUMENT_LOAD=`documentLoad`,e.DOCUMENT_FETCH=`documentFetch`,e.RESOURCE_FETCH=`resourceFetch`})(q||={});var Mi=`0.49.0`,Ni=`@opentelemetry/instrumentation-document-load`,Pi;(function(e){e.FIRST_PAINT=`firstPaint`,e.FIRST_CONTENTFUL_PAINT=`firstContentfulPaint`})(Pi||={});var Fi=()=>{let e={},t=k.getEntriesByType?.(`navigation`)[0];if(t)Object.values(W).forEach(n=>{if(G(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}});else{let t=k.timing;t&&Object.values(W).forEach(n=>{if(G(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}})}return e},Ii={"first-paint":Pi.FIRST_PAINT,"first-contentful-paint":Pi.FIRST_CONTENTFUL_PAINT},Li=e=>{let t=k.getEntriesByType?.(`paint`);t&&t.forEach(({name:t,startTime:n})=>{G(Ii,t)&&e.addEvent(Ii[t],n)})},Ri=class extends bn{component=`document-load`;version=`1`;moduleName=this.component;constructor(e={}){super(Ni,Mi,e)}init(){}_onDocumentLoaded(){window.setTimeout(()=>{this._collectPerformance()})}_addResourcesSpans(e){let t=k.getEntriesByType?.(`resource`);t&&t.forEach(t=>{this._initResourceSpan(t,e)})}_collectPerformance(){let e=Array.from(document.getElementsByTagName(`meta`)).find(e=>e.getAttribute(`name`)===j),t=Fi(),n=e&&e.content||``;m.with(h.extract(r,{traceparent:n}),()=>{let e=this._startSpan(q.DOCUMENT_LOAD,W.FETCH_START,t);e&&(m.with(f.setSpan(m.active(),e),()=>{let e=this._startSpan(q.DOCUMENT_FETCH,W.FETCH_START,t);e&&(e.setAttribute(Pe,location.href),m.with(f.setSpan(m.active(),e),()=>{Oi(e,t,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentFetch),this._endSpan(e,W.RESPONSE_END,t)}))}),e.setAttribute(Pe,location.href),e.setAttribute(Fe,navigator.userAgent),this._addResourcesSpans(e),this.getConfig().ignoreNetworkEvents||(K(e,W.FETCH_START,t),K(e,W.UNLOAD_EVENT_START,t),K(e,W.UNLOAD_EVENT_END,t),K(e,W.DOM_INTERACTIVE,t),K(e,W.DOM_CONTENT_LOADED_EVENT_START,t),K(e,W.DOM_CONTENT_LOADED_EVENT_END,t),K(e,W.DOM_COMPLETE,t),K(e,W.LOAD_EVENT_START,t),K(e,W.LOAD_EVENT_END,t)),this.getConfig().ignorePerformancePaintEvents||Li(e),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentLoad),this._endSpan(e,W.LOAD_EVENT_END,t))})}_endSpan(e,t,n){e&&(G(n,t)?e.end(n[t]):e.end())}_initResourceSpan(e,t){let n=this._startSpan(q.RESOURCE_FETCH,W.FETCH_START,e,t);n&&(n.setAttribute(Pe,e.name),Oi(n,e,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnResourceSpan(n,e,this.getConfig().applyCustomAttributesOnSpan?.resourceFetch),this._endSpan(n,W.RESPONSE_END,e))}_startSpan(e,t,n,r){if(G(n,t)&&typeof n[t]==`number`)return this.tracer.startSpan(e,{startTime:n[t]},r?f.setSpan(m.active(),r):void 0)}_waitForPageLoad(){window.document.readyState===`complete`?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener(`load`,this._onDocumentLoaded))}_addCustomAttributesOnSpan(e,t){t&&w(()=>t(e),e=>{e&&this._diag.error(`addCustomAttributesOnSpan`,e)},!0)}_addCustomAttributesOnResourceSpan(e,t,n){n&&w(()=>n(e,t),e=>{e&&this._diag.error(`addCustomAttributesOnResourceSpan`,e)},!0)}enable(){window.removeEventListener(`load`,this._onDocumentLoaded),this._waitForPageLoad()}disable(){window.removeEventListener(`load`,this._onDocumentLoaded)}},zi=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{},Bi=performance,Vi=9,Hi=10**6,Ui=10**Vi;function J(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*Hi)]}function Wi(){let e=Bi.timeOrigin;if(typeof e!=`number`){let t=Bi;e=t.timing&&t.timing.fetchStart}return e}function Gi(e){return qi(J(Wi()),J(typeof e==`number`?e:Bi.now()))}function Y(e){if(Ki(e))return e;if(typeof e==`number`)return e<Wi()?Gi(e):J(e);if(e instanceof Date)return J(e.getTime());throw TypeError(`Invalid input type`)}function X(e){return e[0]*Ui+e[1]}function Ki(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function qi(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Ui&&(n[1]-=Ui,n[0]+=1),n}function Ji(e,t){return typeof t==`string`?e===t:!!e.match(t)}function Yi(e,t){if(!t)return!1;for(let n of t)if(Ji(e,n))return!0;return!1}var Z;(function(e){e.CONNECT_END=`connectEnd`,e.CONNECT_START=`connectStart`,e.DECODED_BODY_SIZE=`decodedBodySize`,e.DOM_COMPLETE=`domComplete`,e.DOM_CONTENT_LOADED_EVENT_END=`domContentLoadedEventEnd`,e.DOM_CONTENT_LOADED_EVENT_START=`domContentLoadedEventStart`,e.DOM_INTERACTIVE=`domInteractive`,e.DOMAIN_LOOKUP_END=`domainLookupEnd`,e.DOMAIN_LOOKUP_START=`domainLookupStart`,e.ENCODED_BODY_SIZE=`encodedBodySize`,e.FETCH_START=`fetchStart`,e.LOAD_EVENT_END=`loadEventEnd`,e.LOAD_EVENT_START=`loadEventStart`,e.NAVIGATION_START=`navigationStart`,e.REDIRECT_END=`redirectEnd`,e.REDIRECT_START=`redirectStart`,e.REQUEST_START=`requestStart`,e.RESPONSE_END=`responseEnd`,e.RESPONSE_START=`responseStart`,e.SECURE_CONNECTION_START=`secureConnectionStart`,e.START_TIME=`startTime`,e.UNLOAD_EVENT_END=`unloadEventEnd`,e.UNLOAD_EVENT_START=`unloadEventStart`})(Z||={});var Xi=`http.response_content_length`,Zi=`http.response_content_length_uncompressed`,Qi;function $i(){return Qi||=document.createElement(`a`),Qi}function ea(e,t){return t in e}function Q(e,t,n,r=!0){if(ea(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function ta(e,t,n=!1,r,i){if(r===void 0&&(r=t[Z.START_TIME]!==0),n||(Q(e,Z.FETCH_START,t,r),Q(e,Z.DOMAIN_LOOKUP_START,t,r),Q(e,Z.DOMAIN_LOOKUP_END,t,r),Q(e,Z.CONNECT_START,t,r),Q(e,Z.SECURE_CONNECTION_START,t,r),Q(e,Z.CONNECT_END,t,r),Q(e,Z.REQUEST_START,t,r),Q(e,Z.RESPONSE_START,t,r),Q(e,Z.RESPONSE_END,t,r)),!i){let n=t[Z.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(Xi,n);let r=t[Z.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute(Zi,r)}}function na(e){return e.slice().sort((e,t)=>{let n=e[Z.FETCH_START],r=t[Z.FETCH_START];return n>r?1:n<r?-1:0})}function ra(){return typeof location<`u`?location.origin:void 0}function ia(e,t,n,r,i=new WeakSet,a){let o=sa(e);e=o.toString();let s=oa(e,t,n,r,i,a);if(s.length===0)return{mainRequest:void 0};if(s.length===1)return{mainRequest:s[0]};let c=na(s);if(o.origin!==ra()&&c.length>1){let e=c[0],t=aa(c,e[Z.RESPONSE_END],n),r=e[Z.RESPONSE_END];return t[Z.FETCH_START]<r&&(t=e,e=void 0),{corsPreFlightRequest:e,mainRequest:t}}else return{mainRequest:s[0]}}function aa(e,t,n){let r=X(n),i=X(Y(t)),a=e[1],o,s=e.length;for(let t=1;t<s;t++){let n=e[t],s=X(Y(n[Z.FETCH_START])),c=r-X(Y(n[Z.RESPONSE_END]));s>=i&&(!o||c<o)&&(o=c,a=n)}return a}function oa(e,t,n,r,i,a){let o=X(t),s=X(n),c=r.filter(t=>{let n=X(Y(t[Z.FETCH_START])),r=X(Y(t[Z.RESPONSE_END]));return t.initiatorType.toLowerCase()===(a||`xmlhttprequest`)&&t.name===e&&n>=o&&r<=s});return c.length>0&&(c=c.filter(e=>!i.has(e))),c}function sa(e){if(typeof URL==`function`)return new URL(e,typeof document<`u`?document.baseURI:typeof location<`u`?location.href:void 0);let t=$i();return t.href=e,t}function ca(e,t){let n=t||[];return(typeof n==`string`||n instanceof RegExp)&&(n=[n]),sa(e).origin===ra()?!0:n.some(t=>Ji(e,t))}var la;(function(e){e.COMPONENT=`component`,e.HTTP_STATUS_TEXT=`http.status_text`})(la||={});var ua=`http.host`,da=`http.method`,fa=`http.request.body.size`,pa=`http.request_content_length_uncompressed`,ma=`http.scheme`,ha=`http.status_code`,ga=`http.url`,_a=`http.user_agent`,va=_.createComponentLogger({namespace:`@opentelemetry/opentelemetry-instrumentation-fetch/utils`});function ya(...e){if(e[0]instanceof URL||typeof e[0]==`string`){let t=e[1];if(!t?.body)return Promise.resolve();if(t.body instanceof ReadableStream){let{body:e,length:n}=ba(t.body);return t.body=e,n}else return Promise.resolve(Sa(t.body))}else{let t=e[0];return t?.body?t.clone().text().then(e=>wa(e)):Promise.resolve()}}function ba(e){if(!e.pipeThrough)return va.warn(`Platform has ReadableStream but not pipeThrough!`),{body:e,length:Promise.resolve(void 0)};let t=0,n,r=new Promise(e=>{n=e}),i=new TransformStream({start(){},async transform(e,n){let r=await e;t+=r.byteLength,n.enqueue(e)},flush(){n(t)}});return{body:e.pipeThrough(i),length:r}}function xa(e){return typeof Document<`u`&&e instanceof Document}function Sa(e){if(xa(e))return new XMLSerializer().serializeToString(document).length;if(typeof e==`string`)return wa(e);if(e instanceof Blob)return e.size;if(e instanceof FormData)return Ta(e);if(e instanceof URLSearchParams)return wa(e.toString());if(e.byteLength!==void 0)return e.byteLength;va.warn(`unknown body type`)}var Ca=new TextEncoder;function wa(e){return Ca.encode(e).byteLength}function Ta(e){let t=0;for(let[n,r]of e.entries())t+=n.length,r instanceof Blob?t+=r.size:t+=r.length;return t}function Ea(e){let t=ka(),n=e.toUpperCase();return n in t?n:`_OTHER`}var Da={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0},Oa;function ka(){return Oa===void 0&&(Oa=Da),Oa}var Aa={"https:":`443`,"http:":`80`};function ja(e){let t=Number(e.port||Aa[e.protocol]);if(t&&!isNaN(t))return t}var Ma=`0.204.0`,Na=300,Pa=typeof process==`object`&&process.release?.name===`node`,Fa=class extends bn{component=`fetch`;version=Ma;moduleName=this.component;_usedResources=new WeakSet;_tasksCount=0;_semconvStability;constructor(e={}){super(`@opentelemetry/instrumentation-fetch`,Ma,e),this._semconvStability=xn(`http`,e?.semconvStabilityOptIn)}init(){}_addChildSpan(e,t){let n=this.tracer.startSpan(`CORS Preflight`,{startTime:t[Z.FETCH_START]},f.setSpan(m.active(),e)),r=!(this._semconvStability&E.OLD);ta(n,t,this.getConfig().ignoreNetworkEvents,void 0,r),n.end(t[Z.RESPONSE_END])}_addFinalSpanAttributes(e,t){let n=sa(t.url);if(this._semconvStability&E.OLD&&(e.setAttribute(ha,t.status),t.statusText!=null&&e.setAttribute(la.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(ua,n.host),e.setAttribute(ma,n.protocol.replace(`:`,``)),typeof navigator<`u`&&e.setAttribute(_a,navigator.userAgent)),this._semconvStability&E.STABLE){e.setAttribute(He,t.status),e.setAttribute(Ue,n.hostname);let r=ja(n);r&&e.setAttribute(We,r)}}_addHeaders(e,t){if(!ca(t,this.getConfig().propagateTraceHeaderCorsUrls)){let e={};h.inject(m.active(),e),Object.keys(e).length>0&&this._diag.debug(`headers inject skipped due to CORS policy`);return}if(e instanceof Request)h.inject(m.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Headers)h.inject(m.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Map)h.inject(m.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else{let t={};h.inject(m.active(),t),e.headers=Object.assign({},t,e.headers||{})}}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(e,t={}){if(Yi(e,this.getConfig().ignoreUrls)){this._diag.debug(`ignoring span as url matches ignored url`);return}let n=``,r={};if(this._semconvStability&E.OLD){let i=(t.method||`GET`).toUpperCase();n=`HTTP ${i}`,r[la.COMPONENT]=this.moduleName,r[da]=i,r[ga]=e}if(this._semconvStability&E.STABLE){let i=t.method,a=Ea(t.method||`GET`);n||=a,r[Be]=a,a!==i&&(r[Ve]=i),r[Ze]=e}return this.tracer.startSpan(n,{kind:be.CLIENT,attributes:r})}_findResourceAndAddNetworkEvents(e,t,n){let r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType(`resource`)}let i=ia(t.spanUrl,t.startTime,n,r,this._usedResources,`fetch`);if(i.mainRequest){let t=i.mainRequest;this._markResourceAsUsed(t);let n=i.corsPreFlightRequest;n&&(this._addChildSpan(e,n),this._markResourceAsUsed(n));let r=!(this._semconvStability&E.OLD);ta(e,t,this.getConfig().ignoreNetworkEvents,void 0,r)}}_markResourceAsUsed(e){this._usedResources.add(e)}_endSpan(e,t,n){let r=J(Date.now()),i=Gi();this._addFinalSpanAttributes(e,n),this._semconvStability&E.STABLE&&n.status>=400&&(e.setStatus({code:c.ERROR}),e.setAttribute(Ie,String(n.status))),setTimeout(()=>{t.observer?.disconnect(),this._findResourceAndAddNetworkEvents(e,t,i),this._tasksCount--,this._clearResources(),e.end(r)},Na)}_patchConstructor(){return e=>{let t=this;return function(...n){let r=this,i=sa(n[0]instanceof Request?n[0].url:String(n[0])).href,a=n[0]instanceof Request?n[0]:n[1]||{},o=t._createSpan(i,a);if(!o)return e.apply(this,n);let s=t._prepareSpanData(i);t.getConfig().measureRequestSize&&ya(...n).then(e=>{e&&(t._semconvStability&E.OLD&&o.setAttribute(pa,e),t._semconvStability&E.STABLE&&o.setAttribute(fa,e))}).catch(e=>{t._diag.warn(`getFetchBodyLength`,e)});function c(e,n){t._applyAttributesAfterFetch(e,a,n),t._endSpan(e,s,{status:n.status||0,statusText:n.message,url:i})}function l(e,n){t._applyAttributesAfterFetch(e,a,n),n.status>=200&&n.status<400?t._endSpan(e,s,n):t._endSpan(e,s,{status:n.status,statusText:n.statusText,url:i})}function u(e,t,n){try{let t=n.clone().body;if(t){let r=t.getReader(),i=()=>{r.read().then(({done:t})=>{t?l(e,n):i()},t=>{c(e,t)})};i()}else l(e,n)}finally{t(n)}}function d(e,t,n){try{c(e,n)}finally{t(n)}}return new Promise((n,s)=>m.with(f.setSpan(m.active(),o),()=>(t._addHeaders(a,i),t._callRequestHook(o,a),t._tasksCount++,e.apply(r,a instanceof Request?[a]:[i,a]).then(u.bind(r,o,n),d.bind(r,o,s)))))}}}_applyAttributesAfterFetch(e,t,n){let r=this.getConfig().applyCustomAttributesOnSpan;r&&w(()=>r(e,t,n),e=>{e&&this._diag.error(`applyCustomAttributesOnSpan`,e)},!0)}_callRequestHook(e,t){let n=this.getConfig().requestHook;n&&w(()=>n(e,t),e=>{e&&this._diag.error(`requestHook`,e)},!0)}_prepareSpanData(e){let t=Gi(),n=[];if(typeof PerformanceObserver!=`function`)return{entries:n,startTime:t,spanUrl:e};let r=new PerformanceObserver(t=>{t.getEntries().forEach(t=>{t.initiatorType===`fetch`&&t.name===e&&n.push(t)})});return r.observe({entryTypes:[`resource`]}),{entries:n,observer:r,startTime:t,spanUrl:e}}enable(){if(Pa){this._diag.warn(`this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()`);return}T(fetch)&&(this._unwrap(zi,`fetch`),this._diag.debug(`removing previous patch for constructor`)),this._wrap(zi,`fetch`,this._patchConstructor())}disable(){Pa||(this._unwrap(zi,`fetch`),this._usedResources=new WeakSet)}},$;(function(e){e.EVENT_TYPE=`event_type`,e.TARGET_ELEMENT=`target_element`,e.TARGET_XPATH=`target_xpath`,e.HTTP_URL=`http.url`})($||={});var Ia=`0.49.0`,La=`@opentelemetry/instrumentation-user-interaction`,Ra=`OT_ZONE_CONTEXT`,za=`Navigation:`,Ba=[`click`];function Va(){return!1}var Ha=class extends bn{version=Ia;moduleName=`user-interaction`;_spansData=new WeakMap;_wrappedListeners=new WeakMap;_eventsSpanMap=new WeakMap;_eventNames;_shouldPreventSpanCreation;constructor(e={}){super(La,Ia,e),this._eventNames=new Set(e?.eventNames??Ba),this._shouldPreventSpanCreation=typeof e?.shouldPreventSpanCreation==`function`?e.shouldPreventSpanCreation:Va}init(){}_checkForTimeout(e,t){let n=this._spansData.get(t);n&&(e.source===`setTimeout`?n.hrTimeLastTimeout=Gn():e.source!==`Promise.then`&&e.source!==`setTimeout`&&(n.hrTimeLastTimeout=void 0))}_allowEventName(e){return this._eventNames.has(e)}_createSpan(e,t,n){if(!(e instanceof HTMLElement)||!e.getAttribute||e.hasAttribute(`disabled`)||!this._allowEventName(t))return;let r=ki(e,!0);try{let i=this.tracer.startSpan(t,{attributes:{[$.EVENT_TYPE]:t,[$.TARGET_ELEMENT]:e.tagName,[$.TARGET_XPATH]:r,[$.HTTP_URL]:window.location.href}},n?f.setSpan(m.active(),n):void 0);return this._shouldPreventSpanCreation(t,e,i)===!0?void 0:(this._spansData.set(i,{taskCount:0}),i)}catch(e){this._diag.error(`failed to start create new user interaction span`,e)}}_decrementTask(e){let t=this._spansData.get(e);t&&(t.taskCount--,t.taskCount===0&&this._tryToEndSpan(e,t.hrTimeLastTimeout))}_getCurrentSpan(e){let t=e.get(Ra);return t&&f.getSpan(t)}_incrementTask(e){let t=this._spansData.get(e);t&&t.taskCount++}addPatchedListener(e,t,n,r){let i=this._wrappedListeners.get(n);i||(i=new Map,this._wrappedListeners.set(n,i));let a=i.get(t);return a||(a=new Map,i.set(t,a)),a.has(e)?!1:(a.set(e,r),!0)}removePatchedListener(e,t,n){let r=this._wrappedListeners.get(n);if(!r)return;let i=r.get(t);if(!i)return;let a=i.get(e);return a&&(i.delete(e),i.size===0&&(r.delete(t),r.size===0&&this._wrappedListeners.delete(n))),a}_invokeListener(e,t,n){return typeof e==`function`?e.apply(t,n):e.handleEvent(n[0])}_patchAddEventListener(){let e=this;return t=>function(n,r,i){if(!r)return t.call(this,n,r,i);let a=i&&typeof i==`object`&&i.once,o=function(...t){let i,o=t[0],s=o?.target;o&&(i=e._eventsSpanMap.get(o)),a&&e.removePatchedListener(this,n,r);let c=e._createSpan(s,n,i);return c?(o&&e._eventsSpanMap.set(o,c),m.with(f.setSpan(m.active(),c),()=>{let n=e._invokeListener(r,this,t);return c.end(),n})):e._invokeListener(r,this,t)};if(e.addPatchedListener(this,n,r,o))return t.call(this,n,o,i)}}_patchRemoveEventListener(){let e=this;return t=>function(n,r,i){let a=e.removePatchedListener(this,n,r);return a?t.call(this,n,a,i):t.call(this,n,r,i)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,`replaceState`,this._patchHistoryMethod()),this._wrap(history,`pushState`,this._patchHistoryMethod()),this._wrap(history,`back`,this._patchHistoryMethod()),this._wrap(history,`forward`,this._patchHistoryMethod()),this._wrap(history,`go`,this._patchHistoryMethod())}_patchHistoryMethod(){let e=this;return t=>function(...n){let r=`${location.pathname}${location.hash}${location.search}`,i=t.apply(this,n),a=`${location.pathname}${location.hash}${location.search}`;return r!==a&&e._updateInteractionName(a),i}}_unpatchHistoryApi(){T(history.replaceState)&&this._unwrap(history,`replaceState`),T(history.pushState)&&this._unwrap(history,`pushState`),T(history.back)&&this._unwrap(history,`back`),T(history.forward)&&this._unwrap(history,`forward`),T(history.go)&&this._unwrap(history,`go`)}_updateInteractionName(e){let t=f.getSpan(m.active());t&&typeof t.updateName==`function`&&t.updateName(`${za} ${e}`)}_patchZoneCancelTask(){let e=this;return t=>function(n){let r=Zone.current,i=e._getCurrentSpan(r);return i&&e._shouldCountTask(n,r)&&e._decrementTask(i),t.call(this,n)}}_patchZoneScheduleTask(){let e=this;return t=>function(n){let r=Zone.current,i=e._getCurrentSpan(r);return i&&e._shouldCountTask(n,r)&&(e._incrementTask(i),e._checkForTimeout(n,i)),t.call(this,n)}}_patchZoneRunTask(){let e=this;return t=>function(n,r,i){let a=(Array.isArray(i)&&i[0]instanceof Event?i[0]:void 0)?.target,o,s=this;if(a){if(o=e._createSpan(a,n.eventName),o)return e._incrementTask(o),s.run(()=>{try{return m.with(f.setSpan(m.active(),o),()=>{let e=Zone.current;return n._zone=e,t.call(e,n,r,i)})}finally{e._decrementTask(o)}})}else o=e._getCurrentSpan(s);try{return t.call(s,n,r,i)}finally{o&&e._shouldCountTask(n,s)&&e._decrementTask(o)}}}_shouldCountTask(e,t){if(e._zone&&(t=e._zone),!t||!e.data||e.data.isPeriodic)return!1;let n=this._getCurrentSpan(t);return!n||!this._spansData.get(n)?!1:e.type===`macroTask`||e.type===`microTask`}_tryToEndSpan(e,t){e&&this._spansData.get(e)&&(e.end(t),this._spansData.delete(e))}enable(){let e=this._getZoneWithPrototype();this._diag.debug(`applying patch to`,this.moduleName,this.version,`zone:`,!!e),e?(T(e.prototype.runTask)&&(this._unwrap(e.prototype,`runTask`),this._diag.debug(`removing previous patch from method runTask`)),T(e.prototype.scheduleTask)&&(this._unwrap(e.prototype,`scheduleTask`),this._diag.debug(`removing previous patch from method scheduleTask`)),T(e.prototype.cancelTask)&&(this._unwrap(e.prototype,`cancelTask`),this._diag.debug(`removing previous patch from method cancelTask`)),this._zonePatched=!0,this._wrap(e.prototype,`runTask`,this._patchZoneRunTask()),this._wrap(e.prototype,`scheduleTask`,this._patchZoneScheduleTask()),this._wrap(e.prototype,`cancelTask`,this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(e=>{T(e.addEventListener)&&(this._unwrap(e,`addEventListener`),this._diag.debug(`removing previous patch from method addEventListener`)),T(e.removeEventListener)&&(this._unwrap(e,`removeEventListener`),this._diag.debug(`removing previous patch from method removeEventListener`)),this._wrap(e,`addEventListener`,this._patchAddEventListener()),this._wrap(e,`removeEventListener`,this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){let e=this._getZoneWithPrototype();this._diag.debug(`removing patch from`,this.moduleName,this.version,`zone:`,!!e),e&&this._zonePatched?(T(e.prototype.runTask)&&this._unwrap(e.prototype,`runTask`),T(e.prototype.scheduleTask)&&this._unwrap(e.prototype,`scheduleTask`),T(e.prototype.cancelTask)&&this._unwrap(e.prototype,`cancelTask`)):this._getPatchableEventTargets().forEach(e=>{T(e.addEventListener)&&this._unwrap(e,`addEventListener`),T(e.removeEventListener)&&this._unwrap(e,`removeEventListener`)}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}},Ua=`deployment.environment.name`,Wa=!1;function Ga(){return{BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}?.VITE_OTEL_COLLECTOR_URL??`http://localhost:4318`}function Ka(){if(Wa)return;Wa=!0;let e=null,t=!1;try{let n=Ga(),r={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1};e=new Ti({resource:Vr({[Ge]:`open-knowledge-app`,[Ke]:r?.VITE_APP_VERSION??`dev`,[Ua]:r?.MODE??`dev`}),spanProcessors:[new ni(new nn({url:`${n}/v1/traces`}),{maxExportBatchSize:50,scheduledDelayMillis:2e3})]}),e.register(),t=!0,mn({instrumentations:[new Ri,new Ha({eventNames:[`click`,`submit`]}),new Fa({propagateTraceHeaderCorsUrls:[/^https?:\/\/localhost(:\d+)?\/api\//,/^https?:\/\/127\.0\.0\.1(:\d+)?\/api\//,/^\/api\//],clearTimingResources:!0})]}),console.info(`[otel] frontend telemetry initialized — OTLP/HTTP → ${n}/v1/traces`)}catch(n){console.warn(`[otel] frontend telemetry init failed — continuing without`,n),t&&e&&e.shutdown().catch(()=>{}),Wa=!1}}export{Ka as install};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./__vite-browser-external-sCjVW6Bj.js","./chunk-CFjPhJqf.js"])))=>i.map(i=>d[i]);
2
+ import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./preload-helper-2ej06EnG.js";import{a as n,c as r,d as i,f as a,i as o,l as s,n as c,o as l,p as u,r as d,t as f,u as p}from"./trace-api-CiCjX4Sz.js";import{n as m,r as ee,t as h}from"./propagation-api-3kmMXRwS.js";var te=class{constructor(){}createGauge(e,t){return fe}createHistogram(e,t){return pe}createCounter(e,t){return de}createUpDownCounter(e,t){return me}createObservableGauge(e,t){return ge}createObservableCounter(e,t){return he}createObservableUpDownCounter(e,t){return _e}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}},g=class{},ne=class extends g{add(e,t){}},re=class extends g{add(e,t){}},ie=class extends g{record(e,t){}},ae=class extends g{record(e,t){}},oe=class{addCallback(e){}removeCallback(e){}},se=class extends oe{},ce=class extends oe{},le=class extends oe{},ue=new te,de=new ne,fe=new ie,pe=new ae,me=new re,he=new se,ge=new ce,_e=new le;function ve(){return ue}var ye;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(ye||={});var be;(function(e){e[e.INTERNAL=0]=`INTERNAL`,e[e.SERVER=1]=`SERVER`,e[e.CLIENT=2]=`CLIENT`,e[e.PRODUCER=3]=`PRODUCER`,e[e.CONSUMER=4]=`CONSUMER`})(be||={});var _=p.instance(),xe=new class{getMeter(e,t,n){return ue}},Se=`metrics`,Ce=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalMeterProvider(e){return a(Se,e,p.instance())}getMeterProvider(){return i(Se)||xe}getMeter(e,t,n){return this.getMeterProvider().getMeter(e,t,n)}disable(){u(Se,p.instance())}}.getInstance(),we=class{_delegate;constructor(e){this._delegate=e}export(e,t){this._delegate.export(e,t)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}},Te=class extends Error{code;name=`OTLPExporterError`;data;constructor(e,t,n){super(e),this.data=n,this.code=t}};function Ee(e){if(Number.isFinite(e)&&e>0)return e;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${e}')`)}function De(e){if(e!=null)return()=>e}function Oe(e,t,n){return{timeoutMillis:Ee(e.timeoutMillis??t.timeoutMillis??n.timeoutMillis),concurrencyLimit:e.concurrencyLimit??t.concurrencyLimit??n.concurrencyLimit,compression:e.compression??t.compression??n.compression}}function ke(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:`none`}}var Ae=class{_concurrencyLimit;_sendingPromises=[];constructor(e){this._concurrencyLimit=e}pushPromise(e){if(this.hasReachedLimit())throw Error(`Concurrency Limit reached`);this._sendingPromises.push(e);let t=()=>{let t=this._sendingPromises.indexOf(e);this._sendingPromises.splice(t,1)};e.then(t,t)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}};function je(e){return new Ae(e.concurrencyLimit)}var Me=`http.url`,Ne=`http.user_agent`,Pe=Me,Fe=Ne,Ie=`error.type`,Le=`exception.message`,Re=`exception.stacktrace`,ze=`exception.type`,Be=`http.request.method`,Ve=`http.request.method_original`,He=`http.response.status_code`,Ue=`server.address`,We=`server.port`,Ge=`service.name`,Ke=`service.version`,qe=`telemetry.sdk.language`,Je=`webjs`,Ye=`telemetry.sdk.name`,Xe=`telemetry.sdk.version`,Ze=`url.full`,v;(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.FAILED=1]=`FAILED`})(v||={});function Qe(e){return Object.prototype.hasOwnProperty.call(e,`partialSuccess`)}function $e(){return{handleResponse(e){e==null||!Qe(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||_.warn(`Received Partial Success response:`,JSON.stringify(e.partialSuccess))}}}var et=class{_transport;_serializer;_responseHandler;_promiseQueue;_timeout;_diagLogger;constructor(e,t,n,r,i){this._transport=e,this._serializer=t,this._responseHandler=n,this._promiseQueue=r,this._timeout=i,this._diagLogger=_.createComponentLogger({namespace:`OTLPExportDelegate`})}export(e,t){if(this._diagLogger.debug(`items to be sent`,e),this._promiseQueue.hasReachedLimit()){t({code:v.FAILED,error:Error(`Concurrent export limit reached`)});return}let n=this._serializer.serializeRequest(e);if(n==null){t({code:v.FAILED,error:Error(`Nothing to send`)});return}this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(e=>{if(e.status===`success`){if(e.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(e.data))}catch(t){this._diagLogger.warn(`Export succeeded but could not deserialize response - is the response specification compliant?`,t,e.data)}t({code:v.SUCCESS});return}else if(e.status===`failure`&&e.error){t({code:v.FAILED,error:e.error});return}else e.status===`retryable`?t({code:v.FAILED,error:new Te(`Export failed with retryable status`)}):t({code:v.FAILED,error:new Te(`Export failed with unknown error`)})},e=>t({code:v.FAILED,error:e})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug(`shutdown started`),await this.forceFlush(),this._transport.shutdown()}};function tt(e,t){return new et(e.transport,e.serializer,$e(),e.promiseHandler,t.timeout)}function nt(e,t,n){return tt({transport:n,serializer:t,promiseHandler:je(e)},{timeout:e.timeoutMillis})}var rt=10**9;function it(e){return e[0]*rt+e[1]}function at(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function ot(e){let t=new Uint8Array(e.length/2),n=0;for(let r=0;r<e.length;r+=2){let i=at(e.charCodeAt(r)),a=at(e.charCodeAt(r+1));t[n++]=i<<4|a}return t}function st(e){let t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function ct(e){return{low:Number(BigInt.asUintN(32,e)),high:Number(BigInt.asUintN(32,e>>BigInt(32)))}}function lt(e){return ct(st(e))}function ut(e){return st(e).toString()}var dt=typeof BigInt<`u`?ut:it;function ft(e){return e}function pt(e){if(e!==void 0)return ot(e)}var mt={encodeHrTime:lt,encodeSpanContext:ot,encodeOptionalSpanContext:pt};function ht(e){if(e===void 0)return mt;let t=e.useLongBits??!0,n=e.useHex??!1;return{encodeHrTime:t?lt:dt,encodeSpanContext:n?ft:ot,encodeOptionalSpanContext:n?ft:pt}}function gt(e){let t={attributes:vt(e.attributes),droppedAttributesCount:0},n=e.schemaUrl;return n&&n!==``&&(t.schemaUrl=n),t}function _t(e){return{name:e.name,version:e.version}}function vt(e){return Object.keys(e).map(t=>yt(t,e[t]))}function yt(e,t){return{key:e,value:bt(t)}}function bt(e){let t=typeof e;return t===`string`?{stringValue:e}:t===`number`?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t===`boolean`?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(bt)}}:t===`object`&&e!=null?{kvlistValue:{values:Object.entries(e).map(([e,t])=>yt(e,t))}}:{}}function xt(e,t){let n=e.spanContext(),r=e.status,i=e.parentSpanContext?.spanId?t.encodeSpanContext(e.parentSpanContext?.spanId):void 0;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:i,traceState:n.traceState?.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:vt(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(e=>Ct(e,t)),droppedEventsCount:e.droppedEventsCount,status:{code:r.code,message:r.message},links:e.links.map(e=>St(e,t)),droppedLinksCount:e.droppedLinksCount}}function St(e,t){return{attributes:e.attributes?vt(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:e.context.traceState?.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function Ct(e,t){return{attributes:e.attributes?vt(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function wt(e,t){return{resourceSpans:Et(e,ht(t))}}function Tt(e){let t=new Map;for(let n of e){let e=t.get(n.resource);e||(e=new Map,t.set(n.resource,e));let r=`${n.instrumentationScope.name}@${n.instrumentationScope.version||``}:${n.instrumentationScope.schemaUrl||``}`,i=e.get(r);i||(i=[],e.set(r,i)),i.push(n)}return t}function Et(e,t){let n=Tt(e),r=[],i=n.entries(),a=i.next();for(;!a.done;){let[e,n]=a.value,o=[],s=n.values(),c=s.next();for(;!c.done;){let e=c.value;if(e.length>0){let n=e.map(e=>xt(e,t));o.push({scope:_t(e[0].instrumentationScope),spans:n,schemaUrl:e[0].instrumentationScope.schemaUrl})}c=s.next()}let l=gt(e),u={resource:l,scopeSpans:o,schemaUrl:l.schemaUrl};r.push(u),a=i.next()}return r}var Dt={serializeRequest:e=>{let t=wt(e,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(t))},deserializeResponse:e=>{if(e.length===0)return{};let t=new TextDecoder;return JSON.parse(t.decode(e))}},Ot=5,kt=1e3,At=5e3,jt=1.5,Mt=.2;function Nt(){return 2*Mt*Math.random()-Mt}var Pt=class{_transport;constructor(e){this._transport=e}retry(e,t,n){return new Promise((r,i)=>{setTimeout(()=>{this._transport.send(e,t).then(r,i)},n)})}async send(e,t){let n=Date.now()+t,r=await this._transport.send(e,t),i=Ot,a=kt;for(;r.status===`retryable`&&i>0;){i--;let t=Math.max(Math.min(a,At)+Nt(),0);a*=jt;let o=r.retryInMillis??t,s=n-Date.now();if(o>s)return r;r=await this.retry(e,s,o)}return r}shutdown(){return this._transport.shutdown()}};function Ft(e){return new Pt(e.transport)}function It(e){return[429,502,503,504].includes(e)}function Lt(e){if(e==null)return;let t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;let n=new Date(e).getTime()-Date.now();return n>=0?n:0}var Rt=class{_parameters;constructor(e){this._parameters=e}send(e,t){return new Promise(n=>{let r=new XMLHttpRequest;r.timeout=t,r.open(`POST`,this._parameters.url);let i=this._parameters.headers();Object.entries(i).forEach(([e,t])=>{r.setRequestHeader(e,t)}),r.ontimeout=e=>{n({status:`failure`,error:Error(`XHR request timed out`)})},r.onreadystatechange=()=>{r.status>=200&&r.status<=299?(_.debug(`XHR success`),n({status:`success`})):r.status&&It(r.status)?n({status:`retryable`,retryInMillis:Lt(r.getResponseHeader(`Retry-After`))}):r.status!==0&&n({status:`failure`,error:Error(`XHR request failed with non-retryable status`)})},r.onabort=()=>{n({status:`failure`,error:Error(`XHR request aborted`)})},r.onerror=()=>{n({status:`failure`,error:Error(`XHR request errored`)})},r.send(e)})}shutdown(){}};function zt(e){return new Rt(e)}var Bt=class{_params;constructor(e){this._params=e}send(e){return new Promise(t=>{navigator.sendBeacon(this._params.url,new Blob([e],{type:this._params.blobType}))?(_.debug(`SendBeacon success`),t({status:`success`})):t({status:`failure`,error:Error(`SendBeacon failed`)})})}shutdown(){}};function Vt(e){return new Bt(e)}var Ht=class{_parameters;constructor(e){this._parameters=e}async send(e,t){let n=new AbortController,r=setTimeout(()=>n.abort(),t);try{let t=!!globalThis.location,r=new URL(this._parameters.url),i=await fetch(r.href,{method:`POST`,headers:this._parameters.headers(),body:e,signal:n.signal,keepalive:t,mode:t?globalThis.location?.origin===r.origin?`same-origin`:`cors`:`no-cors`});return i.status>=200&&i.status<=299?(_.debug(`response success`),{status:`success`}):It(i.status)?{status:`retryable`,retryInMillis:Lt(i.headers.get(`Retry-After`))}:{status:`failure`,error:Error(`Fetch request failed with non-retryable status`)}}catch(e){return e?.name===`AbortError`?{status:`failure`,error:Error(`Fetch request timed out`,{cause:e})}:{status:`failure`,error:Error(`Fetch request errored`,{cause:e})}}finally{clearTimeout(r)}}shutdown(){}};function Ut(e){return new Ht(e)}function Wt(e,t){return nt(e,t,Ft({transport:zt(e)}))}function Gt(e,t){return nt(e,t,Ft({transport:Ut(e)}))}function Kt(e,t){return nt(e,t,Ft({transport:Vt({url:e.url,blobType:e.headers()[`Content-Type`]})}))}function qt(e){return()=>{let t={};return Object.entries(e?.()??{}).forEach(([e,n])=>{n===void 0?_.warn(`Header "${e}" has invalid value (${n}) and will be ignored`):t[e]=String(n)}),t}}function Jt(e,t,n){let r={...n()},i={};return()=>(t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,r))}function Yt(e){if(e!=null)try{let t=globalThis.location?.href;return new URL(e,t).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${e}'`)}}function Xt(n){return async r=>{let{Agent:i}=await t(()=>import(`./__vite-browser-external-sCjVW6Bj.js`).then(t=>e(t.default)),__vite__mapDeps([0,1]),import.meta.url);return new i(n)}}function Zt(e,t,n){return{...Oe(e,t,n),headers:Jt(qt(e.headers),t.headers,n.headers),url:Yt(e.url)??t.url??n.url,agentFactory:e.agentFactory??t.agentFactory??n.agentFactory}}function Qt(e,t){return{...ke(),headers:()=>e,url:`http://localhost:4318/`+t,agentFactory:Xt({keepAlive:!0})}}function $t(e,t,n){return Zt({url:e.url,timeoutMillis:e.timeoutMillis,headers:De(e.headers),concurrencyLimit:e.concurrencyLimit},{},Qt(n,t))}function en(e,t,n,r){return tn(e.headers)($t(e,n,r),t)}function tn(e){return!e&&typeof navigator.sendBeacon==`function`?Kt:globalThis.fetch===void 0?Wt:Gt}var nn=class extends we{constructor(e={}){super(en(e,Dt,`v1/traces`,{"Content-Type":`application/json`}))}},rn=class{emit(e){}},an=new rn,on=new class{getLogger(e,t,n){return new rn}},sn=class{constructor(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider._getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):an}},cn=class{getLogger(e,t,n){return this._getDelegateLogger(e,t,n)??new sn(this,e,t,n)}_getDelegate(){return this._delegate??on}_setDelegate(e){this._delegate=e}_getDelegateLogger(e,t,n){return this._delegate?.getLogger(e,t,n)}},ln=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{},y=Symbol.for(`io.opentelemetry.js.api.logs`),b=ln;function un(e,t,n){return r=>r===e?t:n}var dn=class e{constructor(){this._proxyLoggerProvider=new cn}static getInstance(){return this._instance||=new e,this._instance}setGlobalLoggerProvider(e){return b[y]?this.getLoggerProvider():(b[y]=un(1,e,on),this._proxyLoggerProvider._setDelegate(e),e)}getLoggerProvider(){return b[y]?.call(b,1)??this._proxyLoggerProvider}getLogger(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)}disable(){delete b[y],this._proxyLoggerProvider=new cn}}.getInstance();function fn(e,t,n,r){for(let i=0,a=e.length;i<a;i++){let a=e[i];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}function pn(e){e.forEach(e=>e.disable())}function mn(e){let t=e.tracerProvider||f.getTracerProvider(),n=e.meterProvider||Ce.getMeterProvider(),r=e.loggerProvider||dn.getLoggerProvider(),i=e.instrumentations?.flat()??[];return fn(i,t,n,r),()=>{pn(i)}}var x=console.error.bind(console);function S(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var hn=(e,t,n)=>{if(!e||!e[t]){x(`no original function `+String(t)+` to wrap`);return}if(!n){x(`no wrapper function`),x(Error().stack);return}let r=e[t];if(typeof r!=`function`||typeof n!=`function`){x(`original object and wrapper must be functions`);return}let i=n(r,t);return S(i,`__original`,r),S(i,`__unwrap`,()=>{e[t]===i&&S(e,t,r)}),S(i,`__wrapped`,!0),S(e,t,i),i},gn=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{x(`must provide one or more modules to patch`),x(Error().stack);return}if(!(t&&Array.isArray(t))){x(`must provide one or more functions to wrap on modules`);return}e.forEach(e=>{t.forEach(t=>{hn(e,t,n)})})},_n=(e,t)=>{if(!e||!e[t]){x(`no function to unwrap.`),x(Error().stack);return}let n=e[t];if(!n.__unwrap)x(`no original to unwrap to -- has `+String(t)+` already been unwrapped?`);else{n.__unwrap();return}},vn=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{x(`must provide one or more modules to patch`),x(Error().stack);return}if(!(t&&Array.isArray(t))){x(`must provide one or more functions to unwrap on modules`);return}e.forEach(e=>{t.forEach(t=>{_n(e,t)})})};function C(e){e&&e.logger&&(typeof e.logger==`function`?x=e.logger:x(`new logger isn't a function, not replacing`))}C.wrap=hn,C.massWrap=gn,C.unwrap=_n,C.massUnwrap=vn;var yn=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(e,t,n){this.instrumentationName=e,this.instrumentationVersion=t,this.setConfig(n),this._diag=_.createComponentLogger({namespace:e}),this._tracer=f.getTracer(e,t),this._meter=Ce.getMeter(e,t),this._logger=dn.getLogger(e,t),this._updateMetricInstruments()}_wrap=hn;_unwrap=_n;_massWrap=gn;_massUnwrap=vn;get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let e=this.init()??[];return Array.isArray(e)?e:[e]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config={enabled:!0,...e}}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,t,n,r){if(e)try{e(n,r)}catch(e){this._diag.error(`Error running span customization hook due to exception in handler`,{triggerName:t},e)}}},bn=class extends yn{constructor(e,t,n){super(e,t,n),this._config.enabled&&this.enable()}};function w(e,t,n){let r,i;try{i=e()}catch(e){r=e}finally{if(t(r,i),r&&!n)throw r;return i}}function T(e){return typeof e==`function`&&typeof e.__original==`function`&&typeof e.__unwrap==`function`&&e.__wrapped===!0}var E;(function(e){e[e.STABLE=1]=`STABLE`,e[e.OLD=2]=`OLD`,e[e.DUPLICATE=3]=`DUPLICATE`})(E||={});function xn(e,t){let n=E.OLD,r=t?.split(`,`).map(e=>e.trim()).filter(e=>e!==``);for(let t of r??[])if(t.toLowerCase()===e+`/dup`){n=E.DUPLICATE;break}else t.toLowerCase()===e&&(n=E.STABLE);return n}var Sn=s(`OpenTelemetry SDK Context Key SUPPRESS_TRACING`);function Cn(e){return e.setValue(Sn,!0)}function wn(e){return e.getValue(Sn)===!0}var Tn=`baggage`,En=4096;function Dn(e){return e.reduce((e,t)=>{let n=`${e}${e===``?``:`,`}${t}`;return n.length>8192?e:n},``)}function On(e){return e.getAllEntries().map(([e,t])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(n+=`;`+t.metadata.toString()),n})}function kn(e){if(!e)return;let t=e.indexOf(`;`),n=t===-1?e:e.substring(0,t),r=n.indexOf(`=`);if(r<=0)return;let i=n.substring(0,r).trim(),a=n.substring(r+1).trim();if(!i||!a)return;let o,s;try{o=decodeURIComponent(i),s=decodeURIComponent(a)}catch{return}let c;return t!==-1&&t<e.length-1&&(c=ee(e.substring(t+1))),{key:o,value:s,metadata:c}}var An=class{inject(e,t,n){let r=h.getBaggage(e);if(!r||wn(e))return;let i=Dn(On(r).filter(e=>e.length<=En).slice(0,180));i.length>0&&n.set(t,Tn,i)}extract(e,t,n){let r=n.get(t,Tn),i=Array.isArray(r)?r.join(`,`):r;if(!i)return e;let a={};return i.length===0||(i.split(`,`).forEach(e=>{let t=kn(e);if(t){let e={value:t.value};t.metadata&&(e.metadata=t.metadata),a[t.key]=e}}),Object.entries(a).length===0)?e:h.setBaggage(e,h.createBaggage(a))}fields(){return[Tn]}};function D(e){let t={};if(typeof e!=`object`||!e)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!jn(n)){_.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Mn(r)){_.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}function jn(e){return typeof e==`string`&&e!==``}function Mn(e){return e==null?!0:Array.isArray(e)?Nn(e):Pn(typeof e)}function Nn(e){let t;for(let n of e){if(n==null)continue;let e=typeof n;if(e!==t){if(!t){if(Pn(e)){t=e;continue}return!1}return!1}}return!0}function Pn(e){switch(e){case`number`:case`boolean`:case`string`:return!0}return!1}function Fn(){return e=>{_.error(In(e))}}function In(e){return typeof e==`string`?e:JSON.stringify(Ln(e))}function Ln(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))}),n=Object.getPrototypeOf(n);return t}var Rn=Fn();function O(e){try{Rn(e)}catch{}}var zn=`2.7.0`,Bn=`process.runtime.name`,Vn={[Ye]:`opentelemetry`,[Bn]:`browser`,[qe]:Je,[Xe]:zn},k=performance,Hn=9,Un=10**6,Wn=10**Hn;function A(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*Un)]}function Gn(e){return Yn(A(k.timeOrigin),A(typeof e==`number`?e:k.now()))}function Kn(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(--n,r+=Wn),[n,r]}function qn(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function Jn(e){return qn(e)||typeof e==`number`||e instanceof Date}function Yn(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Wn&&(n[1]-=Wn,n[0]+=1),n}var Xn;(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.FAILED=1]=`FAILED`})(Xn||={});var Zn=class{_propagators;_fields;constructor(e={}){this._propagators=e.propagators??[],this._fields=Array.from(new Set(this._propagators.map(e=>typeof e.fields==`function`?e.fields():[]).reduce((e,t)=>e.concat(t),[])))}inject(e,t,n){for(let r of this._propagators)try{r.inject(e,t,n)}catch(e){_.warn(`Failed to inject with ${r.constructor.name}. Err: ${e.message}`)}}extract(e,t,n){return this._propagators.reduce((e,r)=>{try{return r.extract(e,t,n)}catch(e){_.warn(`Failed to extract with ${r.constructor.name}. Err: ${e.message}`)}return e},e)}fields(){return this._fields.slice()}},Qn=`[_0-9a-z-*/]`,$n=`[a-z]${Qn}{0,255}`,er=`[a-z0-9]${Qn}{0,240}@[a-z]${Qn}{0,13}`,tr=RegExp(`^(?:${$n}|${er})$`),nr=/^[ -~]{0,255}[!-~]$/,rr=/,|=/;function ir(e){return tr.test(e)}function ar(e){return nr.test(e)&&!rr.test(e)}var or=32,sr=512,cr=`,`,lr=`=`,ur=class e{_internalState=new Map;constructor(e){e&&this._parse(e)}set(e,t){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,t)=>(e.push(t+lr+this.get(t)),e),[]).join(cr)}_parse(e){e.length>sr||(this._internalState=e.split(cr).reverse().reduce((e,t)=>{let n=t.trim(),r=n.indexOf(lr);if(r!==-1){let i=n.slice(0,r),a=n.slice(r+1,t.length);ir(i)&&ar(a)&&e.set(i,a)}return e},new Map),this._internalState.size>or&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,or))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}},j=`traceparent`,dr=`tracestate`,fr=`00`,pr=RegExp(`^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$`);function mr(e){let t=pr.exec(e);return!t||t[1]===`00`&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var hr=class{inject(e,t,n){let r=f.getSpanContext(e);if(!r||wn(e)||!d(r))return;let i=`${fr}-${r.traceId}-${r.spanId}-0${Number(r.traceFlags||l.NONE).toString(16)}`;n.set(t,j,i),r.traceState&&n.set(t,dr,r.traceState.serialize())}extract(e,t,n){let r=n.get(t,j);if(!r)return e;let i=Array.isArray(r)?r[0]:r;if(typeof i!=`string`)return e;let a=mr(i);if(!a)return e;a.isRemote=!0;let o=n.get(t,dr);if(o){let e=Array.isArray(o)?o.join(`,`):o;a.traceState=new ur(typeof e==`string`?e:void 0)}return f.setSpanContext(e,a)}fields(){return[j,dr]}},gr=`[object Object]`,_r=`[object Null]`,vr=`[object Undefined]`,yr=Function.prototype.toString,br=yr.call(Object),xr=Object.getPrototypeOf,Sr=Object.prototype,Cr=Sr.hasOwnProperty,M=Symbol?Symbol.toStringTag:void 0,wr=Sr.toString;function Tr(e){if(!Er(e)||Dr(e)!==gr)return!1;let t=xr(e);if(t===null)return!0;let n=Cr.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&yr.call(n)===br}function Er(e){return typeof e==`object`&&!!e}function Dr(e){return e==null?e===void 0?vr:_r:M&&M in Object(e)?Or(e):kr(e)}function Or(e){let t=Cr.call(e,M),n=e[M],r=!1;try{e[M]=void 0,r=!0}catch{}let i=wr.call(e);return r&&(t?e[M]=n:delete e[M]),i}function kr(e){return wr.call(e)}var Ar=20;function jr(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=Nr(t,e.shift(),0,n);return t}function Mr(e){return N(e)?e.slice():e}function Nr(e,t,n=0,r){let i;if(!(n>Ar)){if(n++,F(e)||F(t)||Fr(t))i=Mr(t);else if(N(e)){if(i=e.slice(),N(t))for(let e=0,n=t.length;e<n;e++)i.push(Mr(t[e]));else if(P(t)){let e=Object.keys(t);for(let n=0,r=e.length;n<r;n++){let r=e[n];r===`__proto__`||r===`constructor`||r===`prototype`||(i[r]=Mr(t[r]))}}}else if(P(e))if(P(t)){if(!Ir(e,t))return t;i=Object.assign({},e);let a=Object.keys(t);for(let o=0,s=a.length;o<s;o++){let s=a[o];if(s===`__proto__`||s===`constructor`||s===`prototype`)continue;let c=t[s];if(F(c))c===void 0?delete i[s]:i[s]=c;else{let a=i[s],o=c;if(Pr(e,s,r)||Pr(t,s,r))delete i[s];else{if(P(a)&&P(o)){let n=r.get(a)||[],i=r.get(o)||[];n.push({obj:e,key:s}),i.push({obj:t,key:s}),r.set(a,n),r.set(o,i)}i[s]=Nr(i[s],c,n,r)}}}}else i=t;return i}}function Pr(e,t,n){let r=n.get(e[t])||[];for(let n=0,i=r.length;n<i;n++){let i=r[n];if(i.key===t&&i.obj===e)return!0}return!1}function N(e){return Array.isArray(e)}function Fr(e){return typeof e==`function`}function P(e){return!F(e)&&!N(e)&&!Fr(e)&&typeof e==`object`}function F(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===void 0||e instanceof Date||e instanceof RegExp||e===null}function Ir(e,t){return!(!Tr(e)||!Tr(t))}var Lr=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}},Rr=class{_isCalled=!1;_deferred=new Lr;_callback;_that;constructor(e,t){this._callback=e,this._that=t}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(e=>this._deferred.resolve(e),e=>this._deferred.reject(e))}catch(e){this._deferred.reject(e)}}return this._deferred.promise}},I;function zr(){if(I===void 0)try{let e=globalThis.process.argv0;I=e?`unknown_service:${e}`:`unknown_service`}catch{I=`unknown_service`}return I}var L=e=>typeof e==`object`&&!!e&&typeof e.then==`function`,Br=class e{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(t,n){let r=new e({},n);return r._rawAttributes=Ur(t),r._asyncAttributesPending=t.filter(([e,t])=>L(t)).length>0,r}constructor(e,t){let n=e.attributes??{};this._rawAttributes=Object.entries(n).map(([e,t])=>(L(t)&&(this._asyncAttributesPending=!0),[e,t])),this._rawAttributes=Ur(this._rawAttributes),this._schemaUrl=Wr(t?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[t,n]=this._rawAttributes[e];this._rawAttributes[e]=[t,L(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&_.error(`Accessing resource attributes before async attributes settled`),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[t,n]of this._rawAttributes){if(L(n)){_.debug(`Unsettled resource attribute ${t} skipped`);continue}n!=null&&(e[t]??=n)}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(t){if(t==null)return this;let n=Gr(this,t),r=n?{schemaUrl:n}:void 0;return e.FromAttributeList([...t.getRawAttributes(),...this.getRawAttributes()],r)}};function Vr(e,t){return Br.FromAttributeList(Object.entries(e),t)}function Hr(){return Vr({[Ge]:zr(),[qe]:Vn[qe],[Ye]:Vn[Ye],[Xe]:Vn[Xe]})}function Ur(e){return e.map(([e,t])=>L(t)?[e,t.catch(t=>{_.debug(`promise rejection for resource attribute: %s - %s`,e,t)})]:[e,t])}function Wr(e){if(typeof e==`string`||e===void 0)return e;_.warn(`Schema URL must be string or undefined, got %s. Schema URL will be ignored.`,e)}function Gr(e,t){let n=e?.schemaUrl,r=t?.schemaUrl,i=n===void 0||n===``,a=r===void 0||r===``;if(i)return r;if(a||n===r)return n;_.warn(`Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.`,n,r)}var Kr=`exception`,qr=class{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;_attributesCount=0;name;status={code:c.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_recordEndMetrics;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(e){let t=Date.now();if(this._spanContext=e.spanContext,this._performanceStartTime=k.now(),this._performanceOffset=t-(this._performanceStartTime+k.timeOrigin),this._startTimeProvided=e.startTime!=null,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit??0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,e.links)for(let t of e.links)this.addLink(t);this.startTime=this._getTime(e.startTime??t),this.resource=e.resource,this.instrumentationScope=e.scope,this._recordEndMetrics=e.recordEndMetrics,e.attributes!=null&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,t){if(t==null||this._isSpanEnded())return this;if(e.length===0)return _.warn(`Invalid attribute key: ${e}`),this;if(!Mn(t))return _.warn(`Invalid attribute value set for key: ${e}`),this;let{attributeCountLimit:n}=this._spanLimits,r=!Object.prototype.hasOwnProperty.call(this.attributes,e);return n!==void 0&&this._attributesCount>=n&&r?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),r&&this._attributesCount++,this)}setAttributes(e){for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.setAttribute(t,e[t]);return this}addEvent(e,t,n){if(this._isSpanEnded())return this;let{eventCountLimit:r}=this._spanLimits;if(r===0)return _.warn(`No events allowed.`),this._droppedEventsCount++,this;r!==void 0&&this.events.length>=r&&(this._droppedEventsCount===0&&_.debug(`Dropping extra events.`),this.events.shift(),this._droppedEventsCount++),Jn(t)&&(Jn(n)||(n=t),t=void 0);let i=D(t),{attributePerEventCountLimit:a}=this._spanLimits,o={},s=0,c=0;for(let e in i){if(!Object.prototype.hasOwnProperty.call(i,e))continue;let t=i[e];if(a!==void 0&&c>=a){s++;continue}o[e]=this._truncateToSize(t),c++}return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:s}),this}addLink(e){if(this._isSpanEnded())return this;let{linkCountLimit:t}=this._spanLimits;if(t===0)return this._droppedLinksCount++,this;t!==void 0&&this.links.length>=t&&(this._droppedLinksCount===0&&_.debug(`Dropping extra links.`),this.links.shift(),this._droppedLinksCount++);let{attributePerLinkCountLimit:n}=this._spanLimits,r=D(e.attributes),i={},a=0,o=0;for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let t=r[e];if(n!==void 0&&o>=n){a++;continue}i[e]=this._truncateToSize(t),o++}let s={context:e.context};return o>0&&(s.attributes=i),a>0&&(s.droppedAttributesCount=a),this.links.push(s),this}addLinks(e){for(let t of e)this.addLink(t);return this}setStatus(e){if(this._isSpanEnded()||e.code===c.UNSET||this.status.code===c.OK)return this;let t={code:e.code};return e.code===c.ERROR&&(typeof e.message==`string`?t.message=e.message:e.message!=null&&_.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`)),this.status=t,this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e){if(this._isSpanEnded()){_.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this.endTime=this._getTime(e),this._duration=Kn(this.startTime,this.endTime),this._duration[0]<0&&(_.warn(`Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.`,this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&_.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._droppedLinksCount>0&&_.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`),this._spanProcessor.onEnding&&this._spanProcessor.onEnding(this),this._recordEndMetrics?.(),this._ended=!0,this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e==`number`&&e<=k.now())return Gn(e+this._performanceOffset);if(typeof e==`number`)return A(e);if(e instanceof Date)return A(e.getTime());if(qn(e))return e;if(this._startTimeProvided)return A(Date.now());let t=k.now()-this._performanceStartTime;return Yn(this.startTime,A(t))}isRecording(){return this._ended===!1}recordException(e,t){let n={};typeof e==`string`?n[Le]=e:e&&(e.code?n[ze]=e.code.toString():e.name&&(n[ze]=e.name),e.message&&(n[Le]=e.message),e.stack&&(n[Re]=e.stack)),n[`exception.type`]||n[`exception.message`]?this.addEvent(Kr,n,t):_.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let e=Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);_.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_truncateToSize(e){let t=this._attributeValueLengthLimit;return t<=0?(_.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e==`string`?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(e=>typeof e==`string`?this._truncateToLimitUtil(e,t):e):e}},R;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(R||={});var z=class{shouldSample(){return{decision:R.NOT_RECORD}}toString(){return`AlwaysOffSampler`}},B=class{shouldSample(){return{decision:R.RECORD_AND_SAMPLED}}toString(){return`AlwaysOnSampler`}},V=class{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(e){this._root=e.root,this._root||=(O(Error(`ParentBasedSampler must have a root sampler configured`)),new B),this._remoteParentSampled=e.remoteParentSampled??new B,this._remoteParentNotSampled=e.remoteParentNotSampled??new z,this._localParentSampled=e.localParentSampled??new B,this._localParentNotSampled=e.localParentNotSampled??new z}shouldSample(e,t,n,r,i,a){let o=f.getSpanContext(e);return!o||!d(o)?this._root.shouldSample(e,t,n,r,i,a):o.isRemote?o.traceFlags&l.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,i,a):this._remoteParentNotSampled.shouldSample(e,t,n,r,i,a):o.traceFlags&l.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,i,a):this._localParentNotSampled.shouldSample(e,t,n,r,i,a)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}},Jr=class{_ratio;_upperBound;constructor(e=0){this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:o(t)&&this._accumulate(t)<this._upperBound?R.RECORD_AND_SAMPLED:R.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!=`number`||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n<e.length/8;n++){let r=n*8,i=parseInt(e.slice(r,r+8),16);t=(t^i)>>>0}return t}},H;(function(e){e.AlwaysOff=`always_off`,e.AlwaysOn=`always_on`,e.ParentBasedAlwaysOff=`parentbased_always_off`,e.ParentBasedAlwaysOn=`parentbased_always_on`,e.ParentBasedTraceIdRatio=`parentbased_traceidratio`,e.TraceIdRatio=`traceidratio`})(H||={});var Yr=1;function Xr(){return{sampler:Zr(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},spanLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128,linkCountLimit:128,eventCountLimit:128,attributePerEventCountLimit:128,attributePerLinkCountLimit:128}}}function Zr(){let e=H.ParentBasedAlwaysOn;switch(e){case H.AlwaysOn:return new B;case H.AlwaysOff:return new z;case H.ParentBasedAlwaysOn:return new V({root:new B});case H.ParentBasedAlwaysOff:return new V({root:new z});case H.TraceIdRatio:return new Jr(Qr());case H.ParentBasedTraceIdRatio:return new V({root:new Jr(Qr())});default:return _.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${H.ParentBasedAlwaysOn}".`),new V({root:new B})}}function Qr(){return _.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Yr}.`),Yr}function $r(e){let t={sampler:Zr()},n=Xr(),r=Object.assign({},n,t,e);return r.generalLimits=Object.assign({},n.generalLimits,e.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,e.spanLimits||{}),r}function ei(e){let t=Object.assign({},e.spanLimits);return t.attributeCountLimit=e.spanLimits?.attributeCountLimit??e.generalLimits?.attributeCountLimit??void 0??void 0??128,t.attributeValueLengthLimit=e.spanLimits?.attributeValueLengthLimit??e.generalLimits?.attributeValueLengthLimit??void 0??void 0??1/0,Object.assign({},e,{spanLimits:t})}var ti=class{_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_exporter;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(e,t){this._exporter=e,this._maxExportBatchSize=typeof t?.maxExportBatchSize==`number`?t.maxExportBatchSize:512,this._maxQueueSize=typeof t?.maxQueueSize==`number`?t.maxQueueSize:2048,this._scheduledDelayMillis=typeof t?.scheduledDelayMillis==`number`?t.scheduledDelayMillis:5e3,this._exportTimeoutMillis=typeof t?.exportTimeoutMillis==`number`?t.exportTimeoutMillis:3e4,this._shutdownOnce=new Rr(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(_.warn(`BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize`),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,t){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&l.SAMPLED)!==0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&_.debug(`maxQueueSize reached, dropping spans`),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(_.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,t)=>{let n=[],r=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let e=0,t=r;e<t;e++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,t)=>{let n=setTimeout(()=>{t(Error(`Timeout`))},this._exportTimeoutMillis);m.with(Cn(m.active()),()=>{let r;this._finishedSpans.length<=this._maxExportBatchSize?(r=this._finishedSpans,this._finishedSpans=[]):r=this._finishedSpans.splice(0,this._maxExportBatchSize);let i=()=>this._exporter.export(r,r=>{clearTimeout(n),r.code===Xn.SUCCESS?e():t(r.error??Error(`BatchSpanProcessor: span export failed`))}),a=null;for(let e=0,t=r.length;e<t;e++){let t=r[e];t.resource.asyncAttributesPending&&t.resource.waitForAsyncAttributes&&(a??=[],a.push(t.resource.waitForAsyncAttributes()))}a===null?i():Promise.all(a).then(i,e=>{O(e),t(e)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{this._isExporting=!1,O(e)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),typeof this._timer!=`number`&&this._timer.unref())}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}},ni=class extends ti{_visibilityChangeListener;_pageHideListener;constructor(e,t){super(e,t),this.onInit(t)}onInit(e){e?.disableAutoFlushOnDocumentHide!==!0&&typeof document<`u`&&(this._visibilityChangeListener=()=>{document.visibilityState===`hidden`&&this.forceFlush().catch(e=>{O(e)})},this._pageHideListener=()=>{this.forceFlush().catch(e=>{O(e)})},document.addEventListener(`visibilitychange`,this._visibilityChangeListener),document.addEventListener(`pagehide`,this._pageHideListener))}onShutdown(){typeof document<`u`&&(this._visibilityChangeListener&&document.removeEventListener(`visibilitychange`,this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener(`pagehide`,this._pageHideListener))}},ri=16,ii=8,ai=new Uint8Array(ri),oi=new Uint8Array(ii),si=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function ci(e){for(let t=0;t<e.length;t++)e[t]=Math.random()*256>>>0;for(let t=0;t<e.length;t++)if(e[t]>0)return;e[e.length-1]=1}function li(e){let t=``;for(let n=0;n<e.length;n++)t+=si[e[n]];return t}var ui=class{generateTraceId(){return ci(ai),li(ai)}generateSpanId(){return ci(oi),li(oi)}},di=`otel.span.parent.origin`,fi=`otel.span.sampling_result`,pi=`otel.sdk.span.live`,mi=`otel.sdk.span.started`,hi=class{startedSpans;liveSpans;constructor(e){this.startedSpans=e.createCounter(mi,{unit:`{span}`,description:`The number of created spans.`}),this.liveSpans=e.createUpDownCounter(pi,{unit:`{span}`,description:`The number of currently live spans.`})}startSpan(e,t){let n=_i(t);if(this.startedSpans.add(1,{[di]:gi(e),[fi]:n}),t===R.NOT_RECORD)return()=>{};let r={[fi]:n};return this.liveSpans.add(1,r),()=>{this.liveSpans.add(-1,r)}}};function gi(e){return e?e.isRemote?`remote`:`local`:`none`}function _i(e){switch(e){case R.RECORD_AND_SAMPLED:return`RECORD_AND_SAMPLE`;case R.RECORD:return`RECORD_ONLY`;case R.NOT_RECORD:return`DROP`}}var vi=`2.7.0`,yi=class{_sampler;_generalLimits;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;_tracerMetrics;constructor(e,t,n,r){let i=$r(t);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=t.idGenerator||new ui,this._resource=n,this._spanProcessor=r,this.instrumentationScope=e,this._tracerMetrics=new hi(i.meterProvider?i.meterProvider.getMeter(`@opentelemetry/sdk-trace`,vi):ve())}startSpan(e,t={},r=m.active()){t.root&&(r=f.deleteSpan(r));let i=f.getSpan(r);if(wn(r))return _.debug(`Instrumentation suppressed, returning Noop Span`),f.wrapSpanContext(n);let a=i?.spanContext(),o=this._idGenerator.generateSpanId(),s,c,u;!a||!f.isSpanContextValid(a)?c=this._idGenerator.generateTraceId():(c=a.traceId,u=a.traceState,s=a);let d=t.kind??be.INTERNAL,p=(t.links??[]).map(e=>({context:e.context,attributes:D(e.attributes)})),ee=D(t.attributes),h=this._sampler.shouldSample(r,c,e,d,ee,p),te=this._tracerMetrics.startSpan(a,h.decision);u=h.traceState??u;let g=h.decision===ye.RECORD_AND_SAMPLED?l.SAMPLED:l.NONE,ne={traceId:c,spanId:o,traceFlags:g,traceState:u};if(h.decision===ye.NOT_RECORD)return _.debug(`Recording is off, propagating context in a non-recording span`),f.wrapSpanContext(ne);let re=D(Object.assign(ee,h.attributes));return new qr({resource:this._resource,scope:this.instrumentationScope,context:r,spanContext:ne,name:e,kind:d,links:p,parentSpanContext:s,attributes:re,startTime:t.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits,recordEndMetrics:te})}startActiveSpan(e,t,n,r){let i,a,o;if(arguments.length<2)return;arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);let s=a??m.active(),c=this.startSpan(e,i,s),l=f.setSpan(s,c);return m.with(l,o,void 0,c)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}},bi=class{_spanProcessors;constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(t=>{Promise.all(e).then(()=>{t()}).catch(e=>{O(e||Error(`MultiSpanProcessor: forceFlush failed`)),t()})})}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnding(e){for(let t of this._spanProcessors)t.onEnding&&t.onEnding(e)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,n)=>{Promise.all(e).then(()=>{t()},n)})}},U;(function(e){e[e.resolved=0]=`resolved`,e[e.timeout=1]=`timeout`,e[e.error=2]=`error`,e[e.unresolved=3]=`unresolved`})(U||={});var xi=class{_config;_tracers=new Map;_resource;_activeSpanProcessor;constructor(e={}){let t=jr({},Xr(),ei(e));this._resource=t.resource??Hr(),this._config=Object.assign({},t,{resource:this._resource});let n=[];e.spanProcessors?.length&&n.push(...e.spanProcessors),this._activeSpanProcessor=new bi(n)}getTracer(e,t,n){let r=`${e}@${t||``}:${n?.schemaUrl||``}`;return this._tracers.has(r)||this._tracers.set(r,new yi({name:e,version:t,schemaUrl:n?.schemaUrl},this._config,this._resource,this._activeSpanProcessor)),this._tracers.get(r)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,t=this._activeSpanProcessor._spanProcessors.map(t=>new Promise(n=>{let r,i=setTimeout(()=>{n(Error(`Span processor did not completed within timeout period of ${e} ms`)),r=U.timeout},e);t.forceFlush().then(()=>{clearTimeout(i),r!==U.timeout&&(r=U.resolved,n(r))}).catch(e=>{clearTimeout(i),r=U.error,n(e)})}));return new Promise((e,n)=>{Promise.all(t).then(t=>{let r=t.filter(e=>e!==U.resolved);r.length>0?n(r):e()}).catch(e=>n([e]))})}shutdown(){return this._activeSpanProcessor.shutdown()}},Si=class{_enabled=!1;_currentContext=r;_bindFunction(e=r,t){let n=this,i=function(...r){return n.with(e,()=>t.apply(this,r))};return Object.defineProperty(i,`length`,{enumerable:!1,configurable:!0,writable:!1,value:t.length}),i}active(){return this._currentContext}bind(e,t){return e===void 0&&(e=this.active()),typeof t==`function`?this._bindFunction(e,t):t}disable(){return this._currentContext=r,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=r,this)}with(e,t,n,...i){let a=this._currentContext;this._currentContext=e||r;try{return t.call(n,...i)}finally{this._currentContext=a}}};function Ci(e){if(e!==null){if(e===void 0){let e=new Si;e.enable(),m.setGlobalContextManager(e);return}e.enable(),m.setGlobalContextManager(e)}}function wi(e){if(e!==null){if(e===void 0){h.setGlobalPropagator(new Zn({propagators:[new hr,new An]}));return}h.setGlobalPropagator(e)}}var Ti=class extends xi{constructor(e={}){super(e)}register(e={}){f.setGlobalTracerProvider(this),wi(e.propagator),Ci(e.contextManager)}},W;(function(e){e.CONNECT_END=`connectEnd`,e.CONNECT_START=`connectStart`,e.DECODED_BODY_SIZE=`decodedBodySize`,e.DOM_COMPLETE=`domComplete`,e.DOM_CONTENT_LOADED_EVENT_END=`domContentLoadedEventEnd`,e.DOM_CONTENT_LOADED_EVENT_START=`domContentLoadedEventStart`,e.DOM_INTERACTIVE=`domInteractive`,e.DOMAIN_LOOKUP_END=`domainLookupEnd`,e.DOMAIN_LOOKUP_START=`domainLookupStart`,e.ENCODED_BODY_SIZE=`encodedBodySize`,e.FETCH_START=`fetchStart`,e.LOAD_EVENT_END=`loadEventEnd`,e.LOAD_EVENT_START=`loadEventStart`,e.NAVIGATION_START=`navigationStart`,e.REDIRECT_END=`redirectEnd`,e.REDIRECT_START=`redirectStart`,e.REQUEST_START=`requestStart`,e.RESPONSE_END=`responseEnd`,e.RESPONSE_START=`responseStart`,e.SECURE_CONNECTION_START=`secureConnectionStart`,e.START_TIME=`startTime`,e.UNLOAD_EVENT_END=`unloadEventEnd`,e.UNLOAD_EVENT_START=`unloadEventStart`})(W||={});var Ei=`http.response_content_length`,Di=`http.response_content_length_uncompressed`;function G(e,t){return t in e}function K(e,t,n,r=!0){if(G(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function Oi(e,t,n=!1,r,i){if(r===void 0&&(r=t[W.START_TIME]!==0),n||(K(e,W.FETCH_START,t,r),K(e,W.DOMAIN_LOOKUP_START,t,r),K(e,W.DOMAIN_LOOKUP_END,t,r),K(e,W.CONNECT_START,t,r),K(e,W.SECURE_CONNECTION_START,t,r),K(e,W.CONNECT_END,t,r),K(e,W.REQUEST_START,t,r),K(e,W.RESPONSE_START,t,r),K(e,W.RESPONSE_END,t,r)),!i){let n=t[W.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(Ei,n);let r=t[W.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute(Di,r)}}function ki(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return`/`;let n=ji(e,t);if(t&&n.indexOf(`@id`)>0)return n;let r=``;return e.parentNode&&(r+=ki(e.parentNode,t)),r+=n,r}function Ai(e){if(!e.parentNode)return 0;let t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);let n=Array.from(e.parentNode.childNodes);return n=n.filter(n=>{let r=n.localName;return t.indexOf(n.nodeType)>=0&&r===e.localName}),n.length>=1?n.indexOf(e)+1:0}function ji(e,t){let n=e.nodeType,r=Ai(e),i=``;if(n===Node.ELEMENT_NODE){let n=e.getAttribute(`id`);if(t&&n)return`//*[@id="${n}"]`;i=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i=`text()`;else if(n===Node.COMMENT_NODE)i=`comment()`;else return``;return i&&r>1?`/${i}[${r}]`:`/${i}`}var q;(function(e){e.DOCUMENT_LOAD=`documentLoad`,e.DOCUMENT_FETCH=`documentFetch`,e.RESOURCE_FETCH=`resourceFetch`})(q||={});var Mi=`0.49.0`,Ni=`@opentelemetry/instrumentation-document-load`,Pi;(function(e){e.FIRST_PAINT=`firstPaint`,e.FIRST_CONTENTFUL_PAINT=`firstContentfulPaint`})(Pi||={});var Fi=()=>{let e={},t=k.getEntriesByType?.(`navigation`)[0];if(t)Object.values(W).forEach(n=>{if(G(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}});else{let t=k.timing;t&&Object.values(W).forEach(n=>{if(G(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}})}return e},Ii={"first-paint":Pi.FIRST_PAINT,"first-contentful-paint":Pi.FIRST_CONTENTFUL_PAINT},Li=e=>{let t=k.getEntriesByType?.(`paint`);t&&t.forEach(({name:t,startTime:n})=>{G(Ii,t)&&e.addEvent(Ii[t],n)})},Ri=class extends bn{component=`document-load`;version=`1`;moduleName=this.component;constructor(e={}){super(Ni,Mi,e)}init(){}_onDocumentLoaded(){window.setTimeout(()=>{this._collectPerformance()})}_addResourcesSpans(e){let t=k.getEntriesByType?.(`resource`);t&&t.forEach(t=>{this._initResourceSpan(t,e)})}_collectPerformance(){let e=Array.from(document.getElementsByTagName(`meta`)).find(e=>e.getAttribute(`name`)===j),t=Fi(),n=e&&e.content||``;m.with(h.extract(r,{traceparent:n}),()=>{let e=this._startSpan(q.DOCUMENT_LOAD,W.FETCH_START,t);e&&(m.with(f.setSpan(m.active(),e),()=>{let e=this._startSpan(q.DOCUMENT_FETCH,W.FETCH_START,t);e&&(e.setAttribute(Pe,location.href),m.with(f.setSpan(m.active(),e),()=>{Oi(e,t,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentFetch),this._endSpan(e,W.RESPONSE_END,t)}))}),e.setAttribute(Pe,location.href),e.setAttribute(Fe,navigator.userAgent),this._addResourcesSpans(e),this.getConfig().ignoreNetworkEvents||(K(e,W.FETCH_START,t),K(e,W.UNLOAD_EVENT_START,t),K(e,W.UNLOAD_EVENT_END,t),K(e,W.DOM_INTERACTIVE,t),K(e,W.DOM_CONTENT_LOADED_EVENT_START,t),K(e,W.DOM_CONTENT_LOADED_EVENT_END,t),K(e,W.DOM_COMPLETE,t),K(e,W.LOAD_EVENT_START,t),K(e,W.LOAD_EVENT_END,t)),this.getConfig().ignorePerformancePaintEvents||Li(e),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentLoad),this._endSpan(e,W.LOAD_EVENT_END,t))})}_endSpan(e,t,n){e&&(G(n,t)?e.end(n[t]):e.end())}_initResourceSpan(e,t){let n=this._startSpan(q.RESOURCE_FETCH,W.FETCH_START,e,t);n&&(n.setAttribute(Pe,e.name),Oi(n,e,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnResourceSpan(n,e,this.getConfig().applyCustomAttributesOnSpan?.resourceFetch),this._endSpan(n,W.RESPONSE_END,e))}_startSpan(e,t,n,r){if(G(n,t)&&typeof n[t]==`number`)return this.tracer.startSpan(e,{startTime:n[t]},r?f.setSpan(m.active(),r):void 0)}_waitForPageLoad(){window.document.readyState===`complete`?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener(`load`,this._onDocumentLoaded))}_addCustomAttributesOnSpan(e,t){t&&w(()=>t(e),e=>{e&&this._diag.error(`addCustomAttributesOnSpan`,e)},!0)}_addCustomAttributesOnResourceSpan(e,t,n){n&&w(()=>n(e,t),e=>{e&&this._diag.error(`addCustomAttributesOnResourceSpan`,e)},!0)}enable(){window.removeEventListener(`load`,this._onDocumentLoaded),this._waitForPageLoad()}disable(){window.removeEventListener(`load`,this._onDocumentLoaded)}},zi=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{},Bi=performance,Vi=9,Hi=10**6,Ui=10**Vi;function J(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*Hi)]}function Wi(){let e=Bi.timeOrigin;if(typeof e!=`number`){let t=Bi;e=t.timing&&t.timing.fetchStart}return e}function Gi(e){return qi(J(Wi()),J(typeof e==`number`?e:Bi.now()))}function Y(e){if(Ki(e))return e;if(typeof e==`number`)return e<Wi()?Gi(e):J(e);if(e instanceof Date)return J(e.getTime());throw TypeError(`Invalid input type`)}function X(e){return e[0]*Ui+e[1]}function Ki(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function qi(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Ui&&(n[1]-=Ui,n[0]+=1),n}function Ji(e,t){return typeof t==`string`?e===t:!!e.match(t)}function Yi(e,t){if(!t)return!1;for(let n of t)if(Ji(e,n))return!0;return!1}var Z;(function(e){e.CONNECT_END=`connectEnd`,e.CONNECT_START=`connectStart`,e.DECODED_BODY_SIZE=`decodedBodySize`,e.DOM_COMPLETE=`domComplete`,e.DOM_CONTENT_LOADED_EVENT_END=`domContentLoadedEventEnd`,e.DOM_CONTENT_LOADED_EVENT_START=`domContentLoadedEventStart`,e.DOM_INTERACTIVE=`domInteractive`,e.DOMAIN_LOOKUP_END=`domainLookupEnd`,e.DOMAIN_LOOKUP_START=`domainLookupStart`,e.ENCODED_BODY_SIZE=`encodedBodySize`,e.FETCH_START=`fetchStart`,e.LOAD_EVENT_END=`loadEventEnd`,e.LOAD_EVENT_START=`loadEventStart`,e.NAVIGATION_START=`navigationStart`,e.REDIRECT_END=`redirectEnd`,e.REDIRECT_START=`redirectStart`,e.REQUEST_START=`requestStart`,e.RESPONSE_END=`responseEnd`,e.RESPONSE_START=`responseStart`,e.SECURE_CONNECTION_START=`secureConnectionStart`,e.START_TIME=`startTime`,e.UNLOAD_EVENT_END=`unloadEventEnd`,e.UNLOAD_EVENT_START=`unloadEventStart`})(Z||={});var Xi=`http.response_content_length`,Zi=`http.response_content_length_uncompressed`,Qi;function $i(){return Qi||=document.createElement(`a`),Qi}function ea(e,t){return t in e}function Q(e,t,n,r=!0){if(ea(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function ta(e,t,n=!1,r,i){if(r===void 0&&(r=t[Z.START_TIME]!==0),n||(Q(e,Z.FETCH_START,t,r),Q(e,Z.DOMAIN_LOOKUP_START,t,r),Q(e,Z.DOMAIN_LOOKUP_END,t,r),Q(e,Z.CONNECT_START,t,r),Q(e,Z.SECURE_CONNECTION_START,t,r),Q(e,Z.CONNECT_END,t,r),Q(e,Z.REQUEST_START,t,r),Q(e,Z.RESPONSE_START,t,r),Q(e,Z.RESPONSE_END,t,r)),!i){let n=t[Z.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(Xi,n);let r=t[Z.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute(Zi,r)}}function na(e){return e.slice().sort((e,t)=>{let n=e[Z.FETCH_START],r=t[Z.FETCH_START];return n>r?1:n<r?-1:0})}function ra(){return typeof location<`u`?location.origin:void 0}function ia(e,t,n,r,i=new WeakSet,a){let o=sa(e);e=o.toString();let s=oa(e,t,n,r,i,a);if(s.length===0)return{mainRequest:void 0};if(s.length===1)return{mainRequest:s[0]};let c=na(s);if(o.origin!==ra()&&c.length>1){let e=c[0],t=aa(c,e[Z.RESPONSE_END],n),r=e[Z.RESPONSE_END];return t[Z.FETCH_START]<r&&(t=e,e=void 0),{corsPreFlightRequest:e,mainRequest:t}}else return{mainRequest:s[0]}}function aa(e,t,n){let r=X(n),i=X(Y(t)),a=e[1],o,s=e.length;for(let t=1;t<s;t++){let n=e[t],s=X(Y(n[Z.FETCH_START])),c=r-X(Y(n[Z.RESPONSE_END]));s>=i&&(!o||c<o)&&(o=c,a=n)}return a}function oa(e,t,n,r,i,a){let o=X(t),s=X(n),c=r.filter(t=>{let n=X(Y(t[Z.FETCH_START])),r=X(Y(t[Z.RESPONSE_END]));return t.initiatorType.toLowerCase()===(a||`xmlhttprequest`)&&t.name===e&&n>=o&&r<=s});return c.length>0&&(c=c.filter(e=>!i.has(e))),c}function sa(e){if(typeof URL==`function`)return new URL(e,typeof document<`u`?document.baseURI:typeof location<`u`?location.href:void 0);let t=$i();return t.href=e,t}function ca(e,t){let n=t||[];return(typeof n==`string`||n instanceof RegExp)&&(n=[n]),sa(e).origin===ra()?!0:n.some(t=>Ji(e,t))}var la;(function(e){e.COMPONENT=`component`,e.HTTP_STATUS_TEXT=`http.status_text`})(la||={});var ua=`http.host`,da=`http.method`,fa=`http.request.body.size`,pa=`http.request_content_length_uncompressed`,ma=`http.scheme`,ha=`http.status_code`,ga=`http.url`,_a=`http.user_agent`,va=_.createComponentLogger({namespace:`@opentelemetry/opentelemetry-instrumentation-fetch/utils`});function ya(...e){if(e[0]instanceof URL||typeof e[0]==`string`){let t=e[1];if(!t?.body)return Promise.resolve();if(t.body instanceof ReadableStream){let{body:e,length:n}=ba(t.body);return t.body=e,n}else return Promise.resolve(Sa(t.body))}else{let t=e[0];return t?.body?t.clone().text().then(e=>wa(e)):Promise.resolve()}}function ba(e){if(!e.pipeThrough)return va.warn(`Platform has ReadableStream but not pipeThrough!`),{body:e,length:Promise.resolve(void 0)};let t=0,n,r=new Promise(e=>{n=e}),i=new TransformStream({start(){},async transform(e,n){let r=await e;t+=r.byteLength,n.enqueue(e)},flush(){n(t)}});return{body:e.pipeThrough(i),length:r}}function xa(e){return typeof Document<`u`&&e instanceof Document}function Sa(e){if(xa(e))return new XMLSerializer().serializeToString(document).length;if(typeof e==`string`)return wa(e);if(e instanceof Blob)return e.size;if(e instanceof FormData)return Ta(e);if(e instanceof URLSearchParams)return wa(e.toString());if(e.byteLength!==void 0)return e.byteLength;va.warn(`unknown body type`)}var Ca=new TextEncoder;function wa(e){return Ca.encode(e).byteLength}function Ta(e){let t=0;for(let[n,r]of e.entries())t+=n.length,r instanceof Blob?t+=r.size:t+=r.length;return t}function Ea(e){let t=ka(),n=e.toUpperCase();return n in t?n:`_OTHER`}var Da={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0},Oa;function ka(){return Oa===void 0&&(Oa=Da),Oa}var Aa={"https:":`443`,"http:":`80`};function ja(e){let t=Number(e.port||Aa[e.protocol]);if(t&&!isNaN(t))return t}var Ma=`0.204.0`,Na=300,Pa=typeof process==`object`&&process.release?.name===`node`,Fa=class extends bn{component=`fetch`;version=Ma;moduleName=this.component;_usedResources=new WeakSet;_tasksCount=0;_semconvStability;constructor(e={}){super(`@opentelemetry/instrumentation-fetch`,Ma,e),this._semconvStability=xn(`http`,e?.semconvStabilityOptIn)}init(){}_addChildSpan(e,t){let n=this.tracer.startSpan(`CORS Preflight`,{startTime:t[Z.FETCH_START]},f.setSpan(m.active(),e)),r=!(this._semconvStability&E.OLD);ta(n,t,this.getConfig().ignoreNetworkEvents,void 0,r),n.end(t[Z.RESPONSE_END])}_addFinalSpanAttributes(e,t){let n=sa(t.url);if(this._semconvStability&E.OLD&&(e.setAttribute(ha,t.status),t.statusText!=null&&e.setAttribute(la.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(ua,n.host),e.setAttribute(ma,n.protocol.replace(`:`,``)),typeof navigator<`u`&&e.setAttribute(_a,navigator.userAgent)),this._semconvStability&E.STABLE){e.setAttribute(He,t.status),e.setAttribute(Ue,n.hostname);let r=ja(n);r&&e.setAttribute(We,r)}}_addHeaders(e,t){if(!ca(t,this.getConfig().propagateTraceHeaderCorsUrls)){let e={};h.inject(m.active(),e),Object.keys(e).length>0&&this._diag.debug(`headers inject skipped due to CORS policy`);return}if(e instanceof Request)h.inject(m.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Headers)h.inject(m.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Map)h.inject(m.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else{let t={};h.inject(m.active(),t),e.headers=Object.assign({},t,e.headers||{})}}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(e,t={}){if(Yi(e,this.getConfig().ignoreUrls)){this._diag.debug(`ignoring span as url matches ignored url`);return}let n=``,r={};if(this._semconvStability&E.OLD){let i=(t.method||`GET`).toUpperCase();n=`HTTP ${i}`,r[la.COMPONENT]=this.moduleName,r[da]=i,r[ga]=e}if(this._semconvStability&E.STABLE){let i=t.method,a=Ea(t.method||`GET`);n||=a,r[Be]=a,a!==i&&(r[Ve]=i),r[Ze]=e}return this.tracer.startSpan(n,{kind:be.CLIENT,attributes:r})}_findResourceAndAddNetworkEvents(e,t,n){let r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType(`resource`)}let i=ia(t.spanUrl,t.startTime,n,r,this._usedResources,`fetch`);if(i.mainRequest){let t=i.mainRequest;this._markResourceAsUsed(t);let n=i.corsPreFlightRequest;n&&(this._addChildSpan(e,n),this._markResourceAsUsed(n));let r=!(this._semconvStability&E.OLD);ta(e,t,this.getConfig().ignoreNetworkEvents,void 0,r)}}_markResourceAsUsed(e){this._usedResources.add(e)}_endSpan(e,t,n){let r=J(Date.now()),i=Gi();this._addFinalSpanAttributes(e,n),this._semconvStability&E.STABLE&&n.status>=400&&(e.setStatus({code:c.ERROR}),e.setAttribute(Ie,String(n.status))),setTimeout(()=>{t.observer?.disconnect(),this._findResourceAndAddNetworkEvents(e,t,i),this._tasksCount--,this._clearResources(),e.end(r)},Na)}_patchConstructor(){return e=>{let t=this;return function(...n){let r=this,i=sa(n[0]instanceof Request?n[0].url:String(n[0])).href,a=n[0]instanceof Request?n[0]:n[1]||{},o=t._createSpan(i,a);if(!o)return e.apply(this,n);let s=t._prepareSpanData(i);t.getConfig().measureRequestSize&&ya(...n).then(e=>{e&&(t._semconvStability&E.OLD&&o.setAttribute(pa,e),t._semconvStability&E.STABLE&&o.setAttribute(fa,e))}).catch(e=>{t._diag.warn(`getFetchBodyLength`,e)});function c(e,n){t._applyAttributesAfterFetch(e,a,n),t._endSpan(e,s,{status:n.status||0,statusText:n.message,url:i})}function l(e,n){t._applyAttributesAfterFetch(e,a,n),n.status>=200&&n.status<400?t._endSpan(e,s,n):t._endSpan(e,s,{status:n.status,statusText:n.statusText,url:i})}function u(e,t,n){try{let t=n.clone().body;if(t){let r=t.getReader(),i=()=>{r.read().then(({done:t})=>{t?l(e,n):i()},t=>{c(e,t)})};i()}else l(e,n)}finally{t(n)}}function d(e,t,n){try{c(e,n)}finally{t(n)}}return new Promise((n,s)=>m.with(f.setSpan(m.active(),o),()=>(t._addHeaders(a,i),t._callRequestHook(o,a),t._tasksCount++,e.apply(r,a instanceof Request?[a]:[i,a]).then(u.bind(r,o,n),d.bind(r,o,s)))))}}}_applyAttributesAfterFetch(e,t,n){let r=this.getConfig().applyCustomAttributesOnSpan;r&&w(()=>r(e,t,n),e=>{e&&this._diag.error(`applyCustomAttributesOnSpan`,e)},!0)}_callRequestHook(e,t){let n=this.getConfig().requestHook;n&&w(()=>n(e,t),e=>{e&&this._diag.error(`requestHook`,e)},!0)}_prepareSpanData(e){let t=Gi(),n=[];if(typeof PerformanceObserver!=`function`)return{entries:n,startTime:t,spanUrl:e};let r=new PerformanceObserver(t=>{t.getEntries().forEach(t=>{t.initiatorType===`fetch`&&t.name===e&&n.push(t)})});return r.observe({entryTypes:[`resource`]}),{entries:n,observer:r,startTime:t,spanUrl:e}}enable(){if(Pa){this._diag.warn(`this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()`);return}T(fetch)&&(this._unwrap(zi,`fetch`),this._diag.debug(`removing previous patch for constructor`)),this._wrap(zi,`fetch`,this._patchConstructor())}disable(){Pa||(this._unwrap(zi,`fetch`),this._usedResources=new WeakSet)}},$;(function(e){e.EVENT_TYPE=`event_type`,e.TARGET_ELEMENT=`target_element`,e.TARGET_XPATH=`target_xpath`,e.HTTP_URL=`http.url`})($||={});var Ia=`0.49.0`,La=`@opentelemetry/instrumentation-user-interaction`,Ra=`OT_ZONE_CONTEXT`,za=`Navigation:`,Ba=[`click`];function Va(){return!1}var Ha=class extends bn{version=Ia;moduleName=`user-interaction`;_spansData=new WeakMap;_wrappedListeners=new WeakMap;_eventsSpanMap=new WeakMap;_eventNames;_shouldPreventSpanCreation;constructor(e={}){super(La,Ia,e),this._eventNames=new Set(e?.eventNames??Ba),this._shouldPreventSpanCreation=typeof e?.shouldPreventSpanCreation==`function`?e.shouldPreventSpanCreation:Va}init(){}_checkForTimeout(e,t){let n=this._spansData.get(t);n&&(e.source===`setTimeout`?n.hrTimeLastTimeout=Gn():e.source!==`Promise.then`&&e.source!==`setTimeout`&&(n.hrTimeLastTimeout=void 0))}_allowEventName(e){return this._eventNames.has(e)}_createSpan(e,t,n){if(!(e instanceof HTMLElement)||!e.getAttribute||e.hasAttribute(`disabled`)||!this._allowEventName(t))return;let r=ki(e,!0);try{let i=this.tracer.startSpan(t,{attributes:{[$.EVENT_TYPE]:t,[$.TARGET_ELEMENT]:e.tagName,[$.TARGET_XPATH]:r,[$.HTTP_URL]:window.location.href}},n?f.setSpan(m.active(),n):void 0);return this._shouldPreventSpanCreation(t,e,i)===!0?void 0:(this._spansData.set(i,{taskCount:0}),i)}catch(e){this._diag.error(`failed to start create new user interaction span`,e)}}_decrementTask(e){let t=this._spansData.get(e);t&&(t.taskCount--,t.taskCount===0&&this._tryToEndSpan(e,t.hrTimeLastTimeout))}_getCurrentSpan(e){let t=e.get(Ra);return t&&f.getSpan(t)}_incrementTask(e){let t=this._spansData.get(e);t&&t.taskCount++}addPatchedListener(e,t,n,r){let i=this._wrappedListeners.get(n);i||(i=new Map,this._wrappedListeners.set(n,i));let a=i.get(t);return a||(a=new Map,i.set(t,a)),a.has(e)?!1:(a.set(e,r),!0)}removePatchedListener(e,t,n){let r=this._wrappedListeners.get(n);if(!r)return;let i=r.get(t);if(!i)return;let a=i.get(e);return a&&(i.delete(e),i.size===0&&(r.delete(t),r.size===0&&this._wrappedListeners.delete(n))),a}_invokeListener(e,t,n){return typeof e==`function`?e.apply(t,n):e.handleEvent(n[0])}_patchAddEventListener(){let e=this;return t=>function(n,r,i){if(!r)return t.call(this,n,r,i);let a=i&&typeof i==`object`&&i.once,o=function(...t){let i,o=t[0],s=o?.target;o&&(i=e._eventsSpanMap.get(o)),a&&e.removePatchedListener(this,n,r);let c=e._createSpan(s,n,i);return c?(o&&e._eventsSpanMap.set(o,c),m.with(f.setSpan(m.active(),c),()=>{let n=e._invokeListener(r,this,t);return c.end(),n})):e._invokeListener(r,this,t)};if(e.addPatchedListener(this,n,r,o))return t.call(this,n,o,i)}}_patchRemoveEventListener(){let e=this;return t=>function(n,r,i){let a=e.removePatchedListener(this,n,r);return a?t.call(this,n,a,i):t.call(this,n,r,i)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,`replaceState`,this._patchHistoryMethod()),this._wrap(history,`pushState`,this._patchHistoryMethod()),this._wrap(history,`back`,this._patchHistoryMethod()),this._wrap(history,`forward`,this._patchHistoryMethod()),this._wrap(history,`go`,this._patchHistoryMethod())}_patchHistoryMethod(){let e=this;return t=>function(...n){let r=`${location.pathname}${location.hash}${location.search}`,i=t.apply(this,n),a=`${location.pathname}${location.hash}${location.search}`;return r!==a&&e._updateInteractionName(a),i}}_unpatchHistoryApi(){T(history.replaceState)&&this._unwrap(history,`replaceState`),T(history.pushState)&&this._unwrap(history,`pushState`),T(history.back)&&this._unwrap(history,`back`),T(history.forward)&&this._unwrap(history,`forward`),T(history.go)&&this._unwrap(history,`go`)}_updateInteractionName(e){let t=f.getSpan(m.active());t&&typeof t.updateName==`function`&&t.updateName(`${za} ${e}`)}_patchZoneCancelTask(){let e=this;return t=>function(n){let r=Zone.current,i=e._getCurrentSpan(r);return i&&e._shouldCountTask(n,r)&&e._decrementTask(i),t.call(this,n)}}_patchZoneScheduleTask(){let e=this;return t=>function(n){let r=Zone.current,i=e._getCurrentSpan(r);return i&&e._shouldCountTask(n,r)&&(e._incrementTask(i),e._checkForTimeout(n,i)),t.call(this,n)}}_patchZoneRunTask(){let e=this;return t=>function(n,r,i){let a=(Array.isArray(i)&&i[0]instanceof Event?i[0]:void 0)?.target,o,s=this;if(a){if(o=e._createSpan(a,n.eventName),o)return e._incrementTask(o),s.run(()=>{try{return m.with(f.setSpan(m.active(),o),()=>{let e=Zone.current;return n._zone=e,t.call(e,n,r,i)})}finally{e._decrementTask(o)}})}else o=e._getCurrentSpan(s);try{return t.call(s,n,r,i)}finally{o&&e._shouldCountTask(n,s)&&e._decrementTask(o)}}}_shouldCountTask(e,t){if(e._zone&&(t=e._zone),!t||!e.data||e.data.isPeriodic)return!1;let n=this._getCurrentSpan(t);return!n||!this._spansData.get(n)?!1:e.type===`macroTask`||e.type===`microTask`}_tryToEndSpan(e,t){e&&this._spansData.get(e)&&(e.end(t),this._spansData.delete(e))}enable(){let e=this._getZoneWithPrototype();this._diag.debug(`applying patch to`,this.moduleName,this.version,`zone:`,!!e),e?(T(e.prototype.runTask)&&(this._unwrap(e.prototype,`runTask`),this._diag.debug(`removing previous patch from method runTask`)),T(e.prototype.scheduleTask)&&(this._unwrap(e.prototype,`scheduleTask`),this._diag.debug(`removing previous patch from method scheduleTask`)),T(e.prototype.cancelTask)&&(this._unwrap(e.prototype,`cancelTask`),this._diag.debug(`removing previous patch from method cancelTask`)),this._zonePatched=!0,this._wrap(e.prototype,`runTask`,this._patchZoneRunTask()),this._wrap(e.prototype,`scheduleTask`,this._patchZoneScheduleTask()),this._wrap(e.prototype,`cancelTask`,this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(e=>{T(e.addEventListener)&&(this._unwrap(e,`addEventListener`),this._diag.debug(`removing previous patch from method addEventListener`)),T(e.removeEventListener)&&(this._unwrap(e,`removeEventListener`),this._diag.debug(`removing previous patch from method removeEventListener`)),this._wrap(e,`addEventListener`,this._patchAddEventListener()),this._wrap(e,`removeEventListener`,this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){let e=this._getZoneWithPrototype();this._diag.debug(`removing patch from`,this.moduleName,this.version,`zone:`,!!e),e&&this._zonePatched?(T(e.prototype.runTask)&&this._unwrap(e.prototype,`runTask`),T(e.prototype.scheduleTask)&&this._unwrap(e.prototype,`scheduleTask`),T(e.prototype.cancelTask)&&this._unwrap(e.prototype,`cancelTask`)):this._getPatchableEventTargets().forEach(e=>{T(e.addEventListener)&&this._unwrap(e,`addEventListener`),T(e.removeEventListener)&&this._unwrap(e,`removeEventListener`)}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}},Ua=`deployment.environment.name`,Wa=!1;function Ga(){return{BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}?.VITE_OTEL_COLLECTOR_URL??`http://localhost:4318`}function Ka(){if(Wa)return;Wa=!0;let e=null,t=!1;try{let n=Ga(),r={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1};e=new Ti({resource:Vr({[Ge]:`open-knowledge-app`,[Ke]:r?.VITE_APP_VERSION??`dev`,[Ua]:r?.MODE??`dev`}),spanProcessors:[new ni(new nn({url:`${n}/v1/traces`}),{maxExportBatchSize:50,scheduledDelayMillis:2e3})]}),e.register(),t=!0,mn({instrumentations:[new Ri,new Ha({eventNames:[`click`,`submit`]}),new Fa({propagateTraceHeaderCorsUrls:[/^https?:\/\/localhost(:\d+)?\/api\//,/^https?:\/\/127\.0\.0\.1(:\d+)?\/api\//,/^\/api\//],clearTimingResources:!0})]}),console.info(`[otel] frontend telemetry initialized — OTLP/HTTP → ${n}/v1/traces`)}catch(n){console.warn(`[otel] frontend telemetry init failed — continuing without`,n),t&&e&&e.shutdown().catch(()=>{}),Wa=!1}}export{Ka as install};
@@ -0,0 +1 @@
1
+ import{r as e,t}from"./compiler-runtime-CVnuRdak.js";import{r as n}from"./button-C1nwPVFQ.js";var r=t(),i=e();function a(e){let t=(0,r.c)(8),a,o;t[0]===e?(a=t[1],o=t[2]):({className:a,...o}=e,t[0]=e,t[1]=a,t[2]=o);let s;t[3]===a?s=t[4]:(s=n(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,a),t[3]=a,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,i.jsx)(`textarea`,{"data-slot":`textarea`,className:s,...o}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}export{a as t};
@@ -1,4 +1,4 @@
1
- import{n as e,r as t,t as n}from"./src-C9jsS3p4.js";import{$ as r,K as i,Q as a,a as o,b as s,o as c,tt as l,y as u}from"./chunk-ICPOFSXX-CrnuSfeJ.js";import{C as d}from"./src-zyMpT2LE.js";import{t as f}from"./arc-BL_OKZmE.js";import{f as p}from"./chunk-5PVQY5BW-Cxi5d3lT.js";import{t as m}from"./chunk-426QAEUC-BoBKbVmN.js";var h=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(n,[2,5],{5:6}),t(n,[2,2]),t(n,[2,3]),t(n,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,10],{1:[2,1]}),t(n,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,8]),t(n,[2,9]),t(n,[2,11]),{16:[1,22]},{18:[1,23]},t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,7]),t(n,[2,12]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e,r as t,t as n}from"./src-DOAilbaA.js";import{$ as r,K as i,Q as a,a as o,b as s,o as c,tt as l,y as u}from"./chunk-ICPOFSXX-BC5Xd13f.js";import{C as d}from"./src-L3wpjxBL.js";import{t as f}from"./arc-DoxD41WW.js";import{f as p}from"./chunk-5PVQY5BW-BpceE2BZ.js";import{t as m}from"./chunk-426QAEUC-jRhC4EYv.js";var h=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(n,[2,5],{5:6}),t(n,[2,2]),t(n,[2,3]),t(n,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,10],{1:[2,1]}),t(n,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,8]),t(n,[2,9]),t(n,[2,11]),{16:[1,22]},{18:[1,23]},t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,7]),t(n,[2,12]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};u.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{I as i,L as a}from"./doc-hash-Cp6jbuyP.js";import{S as o,c as s,f as c,h as l,m as u,r as d,s as f,u as p,x as m}from"./button-C1nwPVFQ.js";var h=e(t(),1),g=n(),_=`rovingFocusGroup.onEntryFocus`,v={bubbles:!1,cancelable:!0},y=`RovingFocusGroup`,[b,x,S]=a(y),[C,w]=u(y,[S]),[T,E]=C(y),D=h.forwardRef((e,t)=>(0,g.jsx)(b.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(b.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(O,{...e,ref:t})})}));D.displayName=y;var O=h.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:b,preventScrollOnEntryFocus:S=!1,...C}=e,w=h.useRef(null),E=m(t,w),D=i(o),[O,k]=p({prop:s,defaultProp:u??null,onChange:d,caller:y}),[A,j]=h.useState(!1),M=f(b),N=x(n),F=h.useRef(!1),[I,L]=h.useState(0);return h.useEffect(()=>{let e=w.current;if(e)return e.addEventListener(_,M),()=>e.removeEventListener(_,M)},[M]),(0,g.jsx)(T,{scope:n,orientation:r,dir:D,loop:a,currentTabStopId:O,onItemFocus:h.useCallback(e=>k(e),[k]),onItemShiftTab:h.useCallback(()=>j(!0),[]),onFocusableItemAdd:h.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:h.useCallback(()=>L(e=>e-1),[]),children:(0,g.jsx)(l.div,{tabIndex:A||I===0?-1:0,"data-orientation":r,...C,ref:E,style:{outline:`none`,...e.style},onMouseDown:c(e.onMouseDown,()=>{F.current=!0}),onFocus:c(e.onFocus,e=>{let t=!F.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(_,v);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=N().filter(e=>e.focusable);P([e.find(e=>e.active),e.find(e=>e.id===O),...e].filter(Boolean).map(e=>e.ref.current),S)}}F.current=!1}),onBlur:c(e.onBlur,()=>j(!1))})})}),k=`RovingFocusGroupItem`,A=h.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...u}=e,d=s(),f=a||d,p=E(k,n),m=p.currentTabStopId===f,_=x(n),{onFocusableItemAdd:v,onFocusableItemRemove:y,currentTabStopId:S}=p;return h.useEffect(()=>{if(r)return v(),()=>y()},[r,v,y]),(0,g.jsx)(b.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:(0,g.jsx)(l.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:c(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:c(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:c(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=N(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=_().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?F(n,r+1):n.slice(r+1)}setTimeout(()=>P(n))}}),children:typeof o==`function`?o({isCurrentTabStop:m,hasTabStop:S!=null}):o})})});A.displayName=k;var j={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function M(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function N(e,t,n){let r=M(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return j[r]}function P(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function F(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var I=D,L=A,R=`Toggle`,z=h.forwardRef((e,t)=>{let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=p({prop:n,onChange:i,defaultProp:r??!1,caller:R});return(0,g.jsx)(l.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:c(e.onClick,()=>{e.disabled||s(!o)})})});z.displayName=R;var B=`ToggleGroup`,[V,ee]=u(B,[w]),H=w(),U=h.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`)return(0,g.jsx)(K,{...r,ref:t});if(n===`multiple`)return(0,g.jsx)(q,{...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${B}\``)});U.displayName=B;var[W,G]=V(B),K=h.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=p({prop:n,defaultProp:r??``,onChange:i,caller:B});return(0,g.jsx)(W,{scope:e.__scopeToggleGroup,type:`single`,value:h.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:h.useCallback(()=>s(``),[s]),children:(0,g.jsx)(J,{...a,ref:t})})}),q=h.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=p({prop:n,defaultProp:r??[],onChange:i,caller:B}),c=h.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=h.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,g.jsx)(W,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:(0,g.jsx)(J,{...a,ref:t})})});U.displayName=B;var[te,ne]=V(B),J=h.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:a=!0,orientation:o,dir:s,loop:c=!0,...u}=e,d=H(n),f=i(s),p={role:`group`,dir:f,...u};return(0,g.jsx)(te,{scope:n,rovingFocus:a,disabled:r,children:a?(0,g.jsx)(I,{asChild:!0,...d,orientation:o,dir:f,loop:c,children:(0,g.jsx)(l.div,{...p,ref:t})}):(0,g.jsx)(l.div,{...p,ref:t})})}),Y=`ToggleGroupItem`,X=h.forwardRef((e,t)=>{let n=G(Y,e.__scopeToggleGroup),r=ne(Y,e.__scopeToggleGroup),i=H(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=h.useRef(null);return r.rovingFocus?(0,g.jsx)(L,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,g.jsx)(Z,{...s,ref:t})}):(0,g.jsx)(Z,{...s,ref:t})});X.displayName=Y;var Z=h.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=G(Y,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,g.jsx)(z,{...a.type===`single`?o:void 0,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),re=U,ie=X,Q=r(),ae=o(`group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-muted`,segmented:`text-muted-foreground hover:bg-muted-foreground/10 data-[state=on]:bg-background data-[state=on]:shadow-sm data-[state=on]:text-foreground dark:data-[state=on]:bg-muted`},size:{default:`h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,sm:`h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`}},defaultVariants:{variant:`default`,size:`default`}}),$=h.createContext({size:`default`,variant:`default`,spacing:0,orientation:`horizontal`});function oe(e){let t=(0,Q.c)(29),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({className:r,variant:c,size:a,spacing:o,orientation:s,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=o===void 0?0:o,u=s===void 0?`horizontal`:s,f;t[8]===l?f=t[9]:(f={"--gap":l},t[8]=l,t[9]=f);let p=f,m;t[10]===r?m=t[11]:(m=d(`group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch`,r),t[10]=r,t[11]=m);let h;t[12]!==u||t[13]!==a||t[14]!==l||t[15]!==c?(h={variant:c,size:a,spacing:l,orientation:u},t[12]=u,t[13]=a,t[14]=l,t[15]=c,t[16]=h):h=t[16];let _;t[17]!==n||t[18]!==h?(_=(0,g.jsx)($.Provider,{value:h,children:n}),t[17]=n,t[18]=h,t[19]=_):_=t[19];let v;return t[20]!==u||t[21]!==i||t[22]!==a||t[23]!==l||t[24]!==p||t[25]!==m||t[26]!==_||t[27]!==c?(v=(0,g.jsx)(re,{"data-slot":`toggle-group`,"data-variant":c,"data-size":a,"data-spacing":l,"data-orientation":u,style:p,className:m,...i,children:_}),t[20]=u,t[21]=i,t[22]=a,t[23]=l,t[24]=p,t[25]=m,t[26]=_,t[27]=c,t[28]=v):v=t[28],v}function se(e){let t=(0,Q.c)(19),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,children:n,variant:a,size:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`default`:a,c=o===void 0?`default`:o,l=h.use($),u=l.variant||s,f=l.size||c,p=l.spacing,m;t[6]!==r||t[7]!==l.size||t[8]!==l.variant||t[9]!==c||t[10]!==s?(m=d(`shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t text-muted-foreground data-[state=on]:text-foreground`,ae({variant:l.variant||s,size:l.size||c}),r),t[6]=r,t[7]=l.size,t[8]=l.variant,t[9]=c,t[10]=s,t[11]=m):m=t[11];let _;return t[12]!==n||t[13]!==l.spacing||t[14]!==i||t[15]!==u||t[16]!==f||t[17]!==m?(_=(0,g.jsx)(ie,{"data-slot":`toggle-group-item`,"data-variant":u,"data-size":f,"data-spacing":p,className:m,...i,children:n}),t[12]=n,t[13]=l.spacing,t[14]=i,t[15]=u,t[16]=f,t[17]=m,t[18]=_):_=t[18],_}export{w as a,I as i,se as n,L as r,oe as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{C as i,R as a,S as o,T as s,w as c,x as l}from"./doc-hash-Cp6jbuyP.js";import{a as u,c as d,f,h as p,l as m,m as h,o as g,r as _,u as ee,x as v,y}from"./button-C1nwPVFQ.js";var b=e(t(),1),x=n(),[S,te]=h(`Tooltip`,[s]),C=s(),w=`TooltipProvider`,T=700,E=`tooltip.open`,[D,O]=S(w),k=e=>{let{__scopeTooltip:t,delayDuration:n=T,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=b.useRef(!0),s=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,x.jsx)(D,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:b.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};k.displayName=w;var A=`Tooltip`,[j,M]=S(A),N=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,l=O(A,e.__scopeTooltip),u=C(t),[f,p]=b.useState(null),m=d(),h=b.useRef(0),g=o??l.disableHoverableContent,_=s??l.delayDuration,v=b.useRef(!1),[y,S]=ee({prop:r,defaultProp:i??!1,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(E))):l.onClose(),a?.(e)},caller:A}),te=b.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),w=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,S(!0)},[S]),T=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,S(!1)},[S]),D=b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,S(!0),h.current=0},_)},[_,S]);return b.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]),(0,x.jsx)(c,{...u,children:(0,x.jsx)(j,{scope:t,contentId:m,open:y,stateAttribute:te,trigger:f,onTriggerChange:p,onTriggerEnter:b.useCallback(()=>{l.isOpenDelayedRef.current?D():w()},[l.isOpenDelayedRef,D,w]),onTriggerLeave:b.useCallback(()=>{g?T():(window.clearTimeout(h.current),h.current=0)},[T,g]),onOpen:w,onClose:T,disableHoverableContent:g,children:n})})};N.displayName=A;var P=`TooltipTrigger`,F=b.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=M(P,n),a=O(P,n),o=C(n),s=v(t,b.useRef(null),i.onTriggerChange),c=b.useRef(!1),u=b.useRef(!1),d=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,x.jsx)(l,{asChild:!0,...o,children:(0,x.jsx)(p.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:f(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:f(e.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:f(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:f(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:f(e.onBlur,i.onClose),onClick:f(e.onClick,i.onClose)})})});F.displayName=P;var I=`TooltipPortal`,[L,R]=S(I,{forceMount:void 0}),z=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=M(I,t);return(0,x.jsx)(L,{scope:t,forceMount:n,children:(0,x.jsx)(m,{present:n||a.open,children:(0,x.jsx)(u,{asChild:!0,container:i,children:r})})})};z.displayName=I;var B=`TooltipContent`,V=b.forwardRef((e,t)=>{let n=R(B,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=M(B,e.__scopeTooltip);return(0,x.jsx)(m,{present:r||o.open,children:o.disableHoverableContent?(0,x.jsx)(K,{side:i,...a,ref:t}):(0,x.jsx)(H,{side:i,...a,ref:t})})}),H=b.forwardRef((e,t)=>{let n=M(B,e.__scopeTooltip),r=O(B,e.__scopeTooltip),i=b.useRef(null),a=v(t,i),[o,s]=b.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=b.useCallback(()=>{s(null),d(!1)},[d]),p=b.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=X(r,Y(r,n.getBoundingClientRect())),a=Z(t.getBoundingClientRect());s(re([...i,...a])),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),b.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!ne(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,x.jsx)(K,{...e,ref:a})}),[U,W]=S(A,{isInside:!1}),G=y(`TooltipContent`),K=b.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=e,u=M(B,n),d=C(n),{onClose:f}=u;return b.useEffect(()=>(document.addEventListener(E,f),()=>document.removeEventListener(E,f)),[f]),b.useEffect(()=>{if(u.trigger){let e=e=>{e.target?.contains(u.trigger)&&f()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[u.trigger,f]),(0,x.jsx)(g,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,x.jsxs)(i,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,x.jsx)(G,{children:r}),(0,x.jsx)(U,{scope:n,isInside:!0,children:(0,x.jsx)(a,{id:u.contentId,role:`tooltip`,children:o||r})})]})})});V.displayName=B;var q=`TooltipArrow`,J=b.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=C(n);return W(q,n).isInside?null:(0,x.jsx)(o,{...i,...r,ref:t})});J.displayName=q;function Y(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function X(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Z(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function ne(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function re(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),ie(t)}function ie(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Q=k,ae=N,oe=F,se=z,ce=V,le=J,$=r();function ue(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({delayDuration:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?0:r,a;return t[3]!==i||t[4]!==n?(a=(0,x.jsx)(Q,{"data-slot":`tooltip-provider`,delayDuration:i,...n}),t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function de(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,x.jsx)(ae,{"data-slot":`tooltip`,...n}),t[2]=n,t[3]=r),r}function fe(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,x.jsx)(oe,{"data-slot":`tooltip-trigger`,...n}),t[2]=n,t[3]=r),r}function pe(e){let t=(0,$.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,sideOffset:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?0:a,s;t[5]===r?s=t[6]:(s=_(`z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,r),t[5]=r,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,x.jsx)(le,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`}),t[7]=c):c=t[7];let l;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==s?(l=(0,x.jsx)(se,{children:(0,x.jsxs)(ce,{"data-slot":`tooltip-content`,sideOffset:o,className:s,...i,children:[n,c]})}),t[8]=n,t[9]=i,t[10]=o,t[11]=s,t[12]=l):l=t[12],l}export{fe as i,pe as n,ue as r,de as t};
@@ -0,0 +1 @@
1
+ import"./chunk-K5T4RW27-CfU2wPmV.js";import{n as e}from"./chunk-ORNJ4GCN-8cFqvOFf.js";export{e as createTreeViewServices};
@@ -0,0 +1 @@
1
+ import"./chunk-K5T4RW27-CfU2wPmV.js";import{n as e}from"./chunk-LIHQZDEY-C40dIbib.js";export{e as createTreemapServices};
@@ -0,0 +1,2 @@
1
+ import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{D as i,O as a,Yt as o,k as s,n as c,nt as l}from"./DocumentContext-DXmaxXXr.js";import{a as u,c as d,i as f,n as ee,o as te,r as ne,s as re,t as ie,u as ae}from"./panel-8fydlQgn.js";import{At as p,Dt as m,s as oe}from"./doc-hash-Cp6jbuyP.js";import{r as se}from"./button-C1nwPVFQ.js";import{$ as h,At as g,Bt as _,Dt as v,E as y,Et as b,Ft as x,Ht as S,J as C,Mt as w,N as T,Ot as E,Pt as D,Q as O,Rt as k,Ut as A,X as j,_ as ce,_t as M,ct as N,dt as P,et as F,f as I,gt as L,ht as R,l as le,lt as ue,mt as de,nt as fe,ot as pe,rt as me,st as he,tt as ge,ut as _e,wt as z,y as ve,yt as B,zt as ye}from"./dist-Du-s1q8P.js";import{i as be,n as xe,o as Se,r as Ce}from"./dist-BrsSsfiw.js";var we=e(t(),1),Te=r(),Ee=new Map;function De(e,t){Ee.set(e,t)}function Oe(e){let t=Ee.get(e)??null;return Ee.delete(e),t}function ke(e){Ee.delete(e)}var Ae=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,V=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(Ae(e)):Ae,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return k(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=A(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=ye(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n;;e++){let a=r.charCodeAt(e),o=this.match(a,i,this.bufferPos+this.bufferStart);if(e==r.length-1){if(o)return this.value=o,this;break}i==n&&e<t.length&&t.charCodeAt(e)==a&&i++}}}match(e,t,n){let r=null;for(let t=0;t<this.matches.length;t+=2){let i=this.matches[t],a=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?r={from:this.matches[t+1],to:n}:(this.matches[t]++,a=!0)),a||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}};typeof Symbol<`u`&&(V.prototype[Symbol.iterator]=function(){return this});var je={from:-1,to:-1,match:/.*/.exec(``)},Me=`gm`+(/x/.unicode==null?``:`u`),Ne=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=je,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new Ie(e,t,n,r,i);this.re=new RegExp(t,Me+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter(),this.curLineStart=e.lineAt(r).from,this.matchPos=Re(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=Re(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},Pe=new WeakMap,Fe=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=Pe.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return Pe.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),Pe.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},Ie=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=je,this.matchPos=Re(e,r),this.re=new RegExp(t,Me+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=Fe.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=Re(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Fe.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(Ne.prototype[Symbol.iterator]=Ie.prototype[Symbol.iterator]=function(){return this});function Le(e){try{return new RegExp(e,Me),!0}catch{return!1}}function Re(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}var ze=e=>{let{state:t}=e,n=String(t.doc.lineAt(e.state.selection.main.head).number),{close:r,result:i}=L(e,{label:t.phrase(`Go to line`),input:{type:`text`,name:`line`,value:n},focus:!0,submitLabel:t.phrase(`go`)});return i.then(n=>{let i=n&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.elements.line.value);if(!i){e.dispatch({effects:r});return}let a=t.doc.lineAt(t.selection.main.head),[,o,s,c,l]=i,u=c?+c.slice(1):0,d=s?+s:a.number;if(s&&l){let e=d/100;o&&(e=e*(o==`-`?-1:1)+a.number/t.doc.lines),d=Math.round(t.doc.lines*e)}else s&&o&&(d=d*(o==`-`?-1:1)+a.number);let f=t.doc.line(Math.max(1,Math.min(t.doc.lines,d))),ee=b.cursor(f.from+Math.max(0,Math.min(u,f.length)));e.dispatch({effects:[r,j.scrollIntoView(ee.from,{y:`center`})],selection:ee})}),!0},Be={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Ve=E.define({combine(e){return _(e,Be,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function He(e){let t=[Je,qe];return e&&t.push(Ve.of(e)),t}var Ue=C.mark({class:`cm-selectionMatch`}),We=C.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function Ge(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=z.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=z.Word)}function Ke(e,t,n,r){return e(t.sliceDoc(n,n+1))==z.Word&&e(t.sliceDoc(r-1,r))==z.Word}var qe=O.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(Ve),{state:n}=e,r=n.selection;if(r.ranges.length>1)return C.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return C.none;let e=n.wordAt(i.head);if(!e)return C.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return C.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(Ge(o,n,i.from,i.to)&&Ke(o,n,i.from,i.to)))return C.none}else if(a=n.sliceDoc(i.from,i.to),!a)return C.none}let s=[];for(let r of e.visibleRanges){let e=new V(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||Ge(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(We.range(r,a)):(r>=i.to||a<=i.from)&&s.push(Ue.range(r,a)),s.length>t.maxMatches))return C.none}}return C.set(s)}},{decorations:e=>e.decorations}),Je=j.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),Ye=({state:e,dispatch:t})=>{let{selection:n}=e,r=b.create(n.ranges.map(t=>e.wordAt(t.head)||b.cursor(t.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)};function Xe(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new V(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new V(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var Ze=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return Ye({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=Xe(e,r);return i?(t(e.update({selection:e.selection.addRange(b.range(i.from,i.to),!1),effects:j.scrollIntoView(i.to)})),!0):!1},H=E.define({combine(e){return _(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Et(e),scrollToMatch:e=>j.scrollIntoView(e)})}}),Qe=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||Le(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
2
+ `:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new st(this):new nt(this)}getCursor(e,t=0,n){let r=e.doc?e:v.create({doc:e});return n??=r.doc.length,this.regexp?W(this,r,t,n):U(this,r,t,n)}},$e=class{constructor(e){this.spec=e}};function et(e,t,n){return(r,i,a,o)=>n&&!n(r,i,a,o)?!1:e(r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i),t,r,i)}function U(e,t,n,r){let i;return e.wholeWord&&(i=tt(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=et(e.test,t,i)),new V(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}function tt(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(it(i,n-a))!=z.Word||t(at(i,n-a))!=z.Word)&&(t(at(i,r-a))!=z.Word||t(it(i,r-a))!=z.Word))}var nt=class extends $e{constructor(e){super(e)}nextMatch(e,t,n){let r=U(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=U(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=U(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=U(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=U(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function rt(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function W(e,t,n,r){let i;return e.wholeWord&&(i=ot(t.charCategorizer(t.selection.main.head))),e.test&&(i=rt(e.test,t,i)),new Ne(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function it(e,t){return e.slice(S(e,t,!1),t)}function at(e,t){return e.slice(t,S(e,t))}function ot(e){return(t,n,r)=>!r[0].length||(e(it(r.input,r.index))!=z.Word||e(at(r.input,r.index))!=z.Word)&&(e(at(r.input,r.index+r[0].length))!=z.Word||e(it(r.input,r.index+r[0].length))!=z.Word)}var st=class extends $e{nextMatch(e,t,n){let r=W(this.spec,e,n,e.doc.length).next();return r.done&&(r=W(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=W(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=W(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=W(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},G=D.define(),ct=D.define(),K=x.define({create(e){return new lt(bt(e).create(),null)},update(e,t){for(let n of t.effects)n.is(G)?e=new lt(n.value.create(),e.panel):n.is(ct)&&(e=new lt(e.query,n.value?yt:null));return e},provide:e=>M.from(e,e=>e.panel)}),lt=class{constructor(e,t){this.query=e,this.panel=t}},ut=C.mark({class:`cm-searchMatch`}),dt=C.mark({class:`cm-searchMatch cm-searchMatch-selected`}),ft=O.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(K))}update(e){let t=e.state.field(K);(t!=e.startState.field(K)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return C.none;let{view:n}=this,r=new w;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?dt:ut)})}return r.finish()}},{decorations:e=>e.decorations});function q(e){return t=>{let n=t.state.field(K,!1);return n&&n.query.spec.valid?e(t,n):Ct(t)}}var pt=q((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=b.single(r.from,r.to),a=e.state.facet(H);return e.dispatch({selection:i,effects:[kt(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),St(e),!0}),mt=q((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=b.single(i.from,i.to),o=e.state.facet(H);return e.dispatch({selection:a,effects:[kt(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),St(e),!0}),ht=q((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:b.create(n.map(e=>b.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),gt=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new V(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(b.range(t.value.from,t.value.to))}return t(e.update({selection:b.create(a,o),userEvent:`select.search.matches`})),!0},_t=q((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(j.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`)));let d=e.state.changes(s);return o&&(c=b.single(o.from,o.to).map(d),u.push(kt(e,o)),u.push(n.facet(H).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),vt=q((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}});if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:j.announce.of(r),userEvent:`input.replace.all`}),!0});function yt(e){return e.state.facet(H).createPanel(e)}function bt(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(H);return new Qe({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function xt(e){let t=me(e,yt);return t&&t.dom.querySelector(`[main-field]`)}function St(e){let t=xt(e);t&&t==e.root.activeElement&&t.select()}var Ct=e=>{let t=e.state.field(K,!1);if(t&&t.panel){let n=xt(e);if(n&&n!=e.root.activeElement){let r=bt(e.state,t.query.spec);r.valid&&e.dispatch({effects:G.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[ct.of(!0),t?G.of(bt(e.state,t.query.spec)):D.appendConfig.of(jt)]});return!0},wt=e=>{let t=e.state.field(K,!1);if(!t||!t.panel)return!1;let n=me(e,yt);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:ct.of(!1)}),!0},Tt=[{key:`Mod-f`,run:Ct,scope:`editor search-panel`},{key:`F3`,run:pt,shift:mt,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:pt,shift:mt,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:wt,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:gt},{key:`Mod-Alt-g`,run:ze},{key:`Mod-d`,run:Ze,preventDefault:!0}],Et=class{constructor(e){this.view=e;let t=this.query=e.state.field(K).query.spec;this.commit=this.commit.bind(this),this.searchField=B(`input`,{value:t.search,placeholder:J(e,`Find`),"aria-label":J(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=B(`input`,{value:t.replace,placeholder:J(e,`Replace`),"aria-label":J(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=B(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=B(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=B(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return B(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=B(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>pt(e),[J(e,`next`)]),n(`prev`,()=>mt(e),[J(e,`previous`)]),n(`select`,()=>ht(e),[J(e,`all`)]),B(`label`,null,[this.caseField,J(e,`match case`)]),B(`label`,null,[this.reField,J(e,`regexp`)]),B(`label`,null,[this.wordField,J(e,`by word`)]),...e.state.readOnly?[]:[B(`br`),this.replaceField,n(`replace`,()=>_t(e),[J(e,`replace`)]),n(`replaceAll`,()=>vt(e),[J(e,`replace all`)])],B(`button`,{name:`close`,onclick:()=>wt(e),"aria-label":J(e,`close`),type:`button`},[`×`])])}commit(){let e=new Qe({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:G.of(e)}))}keydown(e){R(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?mt:pt)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),_t(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(G)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(H).top}};function J(e,t){return e.state.phrase(t)}var Dt=30,Ot=/[\s\.,:;?!]/;function kt(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-Dt),o=Math.min(i,n+Dt),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<Dt;e++)if(!Ot.test(s[e+1])&&Ot.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-Dt;e--)if(!Ot.test(s[e-1])&&Ot.test(s[e])){s=s.slice(0,e);break}}return j.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var At=j.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),jt=[K,g.low(ft),At],Mt=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},Y=class e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(t,n,r){let i=r.facet(Q).markerFilter;i&&(t=i(t,r));let a=t.slice().sort((e,t)=>e.from-t.from||e.to-t.to),o=new w,s=[],c=0,l=r.doc.iter(),u=0,d=r.doc.length;for(let e=0;;){let t=e==a.length?null:a[e];if(!t&&!s.length)break;let n,r;if(s.length)n=c,r=s.reduce((e,t)=>Math.min(e,t.to),t&&t.from>n?t.from:1e8);else{if(n=t.from,n>d)break;r=t.to,s.push(t),e++}for(;e<a.length;){let t=a[e];if(t.from==n&&(t.to>t.from||t.to==n))s.push(t),e++,r=Math.min(t.to,r);else{r=Math.min(t.from,r);break}}r=Math.min(r,d);let i=!1;if(s.some(e=>e.from==n&&(e.to==r||r==d))&&(i=n==r,!i&&r-n<10)){let e=n-(u+l.value.length);e>0&&(l.next(e),u=n);for(let e=n;;){if(e>=r){i=!0;break}if(!l.lineBreak&&u+l.value.length>e)break;e=u+l.value.length,u+=l.value.length,l.next()}}let f=en(s);if(i)o.add(n,n,C.widget({widget:new qt(f),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+` `+t.markClass:e,``);o.add(n,r,C.mark({class:`cm-lintRange cm-lintRange-`+f+e,diagnostics:s.slice(),inclusiveEnd:s.some(e=>e.to>r)}))}if(c=r,c==d)break;for(let e=0;e<s.length;e++)s[e].to<=c&&s.splice(e--,1)}let f=o.finish();return new e(f,n,X(f))}};function X(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&i.diagnostics.indexOf(t)<0))if(!r)r=new Mt(e,n,t||i.diagnostics[0]);else if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;else r=new Mt(r.from,n,r.diagnostic)}),r}function Nt(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(Q).hideOn(e,n,r);if(i!=null)return i;let a=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(Ft))||e.changes.touchesRange(a.from,Math.max(a.to,r)))}function Pt(e,t){return e.field(Z,!1)?t:t.concat(D.appendConfig.of(tn))}var Ft=D.define(),It=D.define(),Lt=D.define(),Z=x.define({create(){return new Y(C.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=X(n,e.selected.diagnostic,i)||X(n,null,i)}!n.size&&i&&t.state.facet(Q).autoPanel&&(i=null),e=new Y(n,i,r)}for(let n of t.effects)if(n.is(Ft)){let r=t.state.facet(Q).autoPanel?n.value.length?Yt.open:null:e.panel;e=Y.init(n.value,r,t.state)}else n.is(It)?e=new Y(e.diagnostics,n.value?Yt.open:null,e.selected):n.is(Lt)&&(e=new Y(e.diagnostics,e.panel,n.value));return e},provide:e=>[M.from(e,e=>e.panel),j.decorations.from(e,e=>e.diagnostics)]}),Rt=C.mark({class:`cm-lintRange cm-lintRange-active`});function zt(e,t,n){let{diagnostics:r}=e.state.field(Z),i,a=-1,o=-1;r.between(t-+(n<0),t+ +(n>0),(e,r,{spec:s})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=s.diagnostics,a=e,o=r,!1});let s=e.state.facet(Q).tooltipFilter;return i&&s&&(i=s(i,e.state)),i?{pos:a,end:o,above:e.state.doc.lineAt(a).to<o,create(){return{dom:Bt(e,i)}}}:null}function Bt(e,t){return B(`ul`,{class:`cm-tooltip-lint`},t.map(t=>Kt(e,t,!1)))}var Vt=e=>{let t=e.state.field(Z,!1);(!t||!t.panel)&&e.dispatch({effects:Pt(e.state,[It.of(!0)])});let n=me(e,Yt.open);return n&&n.dom.querySelector(`.cm-panel-lint ul`).focus(),!0},Ht=e=>{let t=e.state.field(Z,!1);return!t||!t.panel?!1:(e.dispatch({effects:It.of(!1)}),!0)},Ut=[{key:`Mod-Shift-m`,run:Vt,preventDefault:!0},{key:`F8`,run:e=>{let t=e.state.field(Z,!1);if(!t)return!1;let n=e.state.selection.main,r=X(t.diagnostics,null,n.to+1);return!r&&(r=X(t.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to)?!1:(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],Q=E.define({combine(e){return{sources:e.map(e=>e.source).filter(e=>e!=null),..._(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:Wt,tooltipFilter:Wt,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})}}});function Wt(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function Gt(e){let t=[];if(e)actions:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue actions}}t.push(``)}return t}function Kt(e,t,n){let r=n?Gt(t.actions):[];return B(`li`,{class:`cm-diagnostic cm-diagnostic-`+t.severity},B(`span`,{class:`cm-diagnosticText`},t.renderMessage?t.renderMessage(e):t.message),t.actions?.map((n,i)=>{let a=!1,o=r=>{if(r.preventDefault(),a)return;a=!0;let i=X(e.state.field(Z).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:s}=n,c=r[i]?s.indexOf(r[i]):-1,l=c<0?s:[s.slice(0,c),B(`u`,s.slice(c,c+1)),s.slice(c+1)];return B(`button`,{type:`button`,class:`cm-diagnosticAction`+(n.markClass?` `+n.markClass:``),onclick:o,onmousedown:o,"aria-label":` Action: ${s}${c<0?``:` (access key "${r[i]})"`}.`},l)}),t.source&&B(`div`,{class:`cm-diagnosticSource`},t.source))}var qt=class extends h{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return B(`span`,{class:`cm-lintPoint cm-lintPoint-`+this.sev})}},Jt=class{constructor(e,t){this.diagnostic=t,this.id=`item_`+Math.floor(Math.random()*4294967295).toString(16),this.dom=Kt(e,t,!0),this.dom.id=this.id,this.dom.setAttribute(`role`,`option`)}},Yt=class e{constructor(e){this.view=e,this.items=[],this.list=B(`ul`,{tabIndex:0,role:`listbox`,"aria-label":this.view.state.phrase(`Diagnostics`),onkeydown:t=>{if(!(t.ctrlKey||t.altKey||t.metaKey)){if(t.keyCode==27)Ht(this.view),this.view.focus();else if(t.keyCode==38||t.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(t.keyCode==40||t.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(t.keyCode==36)this.moveSelection(0);else if(t.keyCode==35)this.moveSelection(this.items.length-1);else if(t.keyCode==13)this.view.focus();else if(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:n}=this.items[this.selectedIndex],r=Gt(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=X(this.view.state.field(Z).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}else return;t.preventDefault()}},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=B(`div`,{class:`cm-panel-lint`},this.list,B(`button`,{type:`button`,name:`close`,"aria-label":this.view.state.phrase(`close`),onclick:()=>Ht(this.view)},`×`)),this.update()}get selectedIndex(){let e=this.view.state.field(Z).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(Z),n=0,r=!1,i=null,a=new Set;for(e.between(0,this.view.state.doc.length,(e,o,{spec:s})=>{for(let e of s.diagnostics){if(a.has(e))continue;a.add(e);let o=-1,s;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){o=t;break}o<0?(s=new Jt(this.view,e),this.items.splice(n,0,s),r=!0):(s=this.items[o],o>n&&(this.items.splice(n,o-n),r=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute(`aria-selected`)||(s.dom.setAttribute(`aria-selected`,`true`),i=s):s.dom.hasAttribute(`aria-selected`)&&s.dom.removeAttribute(`aria-selected`),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new Jt(this.view,{from:-1,to:-1,severity:`info`,message:this.view.state.phrase(`No diagnostics`)})),r=!0),i?(this.list.setAttribute(`aria-activedescendant`,i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute(`aria-activedescendant`),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=X(this.view.state.field(Z).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:Lt.of(t)})}static open(t){return new e(t)}};function Xt(e,t=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function Zt(e){return Xt(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,`width="6" height="3"`)}var Qt=j.baseTheme({".cm-diagnostic":{padding:`3px 6px 3px 8px`,marginLeft:`-1px`,display:`block`,whiteSpace:`pre-wrap`},".cm-diagnostic-error":{borderLeft:`5px solid #d11`},".cm-diagnostic-warning":{borderLeft:`5px solid orange`},".cm-diagnostic-info":{borderLeft:`5px solid #999`},".cm-diagnostic-hint":{borderLeft:`5px solid #66d`},".cm-diagnosticAction":{font:`inherit`,border:`none`,padding:`2px 4px`,backgroundColor:`#444`,color:`white`,borderRadius:`3px`,marginLeft:`8px`,cursor:`pointer`},".cm-diagnosticSource":{fontSize:`70%`,opacity:.7},".cm-lintRange":{backgroundPosition:`left bottom`,backgroundRepeat:`repeat-x`,paddingBottom:`0.7px`},".cm-lintRange-error":{backgroundImage:Zt(`#d11`)},".cm-lintRange-warning":{backgroundImage:Zt(`orange`)},".cm-lintRange-info":{backgroundImage:Zt(`#999`)},".cm-lintRange-hint":{backgroundImage:Zt(`#66d`)},".cm-lintRange-active":{backgroundColor:`#ffdd9980`},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:`relative`,"&:after":{content:`""`,position:`absolute`,bottom:0,left:`-2px`,borderLeft:`3px solid transparent`,borderRight:`3px solid transparent`,borderBottom:`4px solid #d11`}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:`orange`}},".cm-lintPoint-info":{"&:after":{borderBottomColor:`#999`}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:`#66d`}},".cm-panel.cm-panel-lint":{position:`relative`,"& ul":{maxHeight:`100px`,overflowY:`auto`,"& [aria-selected]":{backgroundColor:`#ddd`,"& u":{textDecoration:`underline`}},"&:focus [aria-selected]":{background_fallback:`#bdf`,backgroundColor:`Highlight`,color_fallback:`white`,color:`HighlightText`},"& u":{textDecoration:`none`},padding:0,margin:0},"& [name=close]":{position:`absolute`,top:`0`,right:`2px`,background:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:`#86714a80`},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:`#2e343e`}}});function $t(e){return e==`error`?4:e==`warning`?3:e==`info`?2:1}function en(e){let t=`hint`,n=1;for(let r of e){let e=$t(r.severity);e>n&&(n=e,t=r.severity)}return t}var tn=[Z,j.decorations.compute([Z],e=>{let{selected:t,panel:n}=e.field(Z);return!t||!n||t.from==t.to?C.none:C.set([Rt.range(t.from,t.to)])}),ue(zt,{hideOn:Nt}),Qt],nn=[P(),he(),N(),a(),ce(),ge(),fe(),v.allowMultipleSelections.of(!0),y(),T(I,{fallback:!0}),le(),Ce(),xe(),de(),F(),pe(),He(),_e.of([...be,...i,...Tt,...s,...ve,...Se,...Ut])];N(),a(),ge(),T(I,{fallback:!0}),_e.of([...i,...s]);function rn(e,t){let n=(0,Te.c)(4),r=t===void 0?!1:t,[i,a]=(0,we.useState)(void 0),o=(0,we.useRef)(null),s,c;return n[0]!==r||n[1]!==e?(s=()=>{if(r||e.length===0){a(void 0);return}let t=function(){let t=window.innerHeight/2,n,r;for(let i of e){let e=document.getElementById(i);if(!e)continue;let a=e.getBoundingClientRect().top;a<0?n=i:r===void 0&&a<t&&(r=i)}a(r??n??e[0])},n=function(){o.current===null&&(o.current=requestAnimationFrame(()=>{o.current=null,t()}))};return document.addEventListener(`scroll`,n,{capture:!0,passive:!0}),t(),()=>{document.removeEventListener(`scroll`,n,{capture:!0}),o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)}},c=[e,r],n[0]=r,n[1]=e,n[2]=s,n[3]=c):(s=n[2],c=n[3]),(0,we.useEffect)(s,c),i}var $=n(),an=300;async function on(e){let t=await fetch(`/api/page-headings?docName=${encodeURIComponent(e)}`),n;try{n=await t.json()}catch(e){throw new l(`Page headings response was not JSON`,{cause:e,status:t.status})}if(!t.ok){let e=p.safeParse(n);throw e.success?Error(e.data.title):new l(`Page headings error response did not match RFC 9457`,{status:t.status})}let r=m.safeParse(n);if(!r.success)throw new l(`Page headings response did not match success schema`,{status:t.status});return r.data.headings??[]}var sn=32,cn=12,ln=6,un=`open-knowledge:outline-nav`;function dn(e){let t=(0,Te.c)(2),n;return t[0]===e?n=t[1]:(n=(0,$.jsx)(o,{name:`outline-panel`,children:(0,$.jsx)(fn,{...e})}),t[0]=e,t[1]=n),n}function fn(e){let t=(0,Te.c)(49),{docName:n,isSourceMode:r,className:i}=e,a=i===void 0?``:i,{pages:o,loading:s}=oe(),l=ae(),{activeProvider:p,activeDocName:m}=c(),h,g;t[0]===n?(h=t[1],g=t[2]):(h=[`page-headings`,n],g=()=>on(n),t[0]=n,t[1]=h,t[2]=g);let _;t[3]!==n||t[4]!==s||t[5]!==o?(_=!s&&o.has(n),t[3]=n,t[4]=s,t[5]=o,t[6]=_):_=t[6];let v;t[7]!==h||t[8]!==g||t[9]!==_?(v={queryKey:h,queryFn:g,enabled:_,staleTime:1/0},t[7]=h,t[8]=g,t[9]=_,t[10]=v):v=t[10];let{data:y,isLoading:b,error:x}=d(v),S;t[11]===y?S=t[12]:(S=y===void 0?[]:y,t[11]=y,t[12]=S);let C=S,w,T;t[13]!==m||t[14]!==p||t[15]!==n||t[16]!==l?(w=()=>{if(!p||m!==n)return;let e=p.document,t=null,r=()=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,l.invalidateQueries({queryKey:[`page-headings`,n]})},an)};return e.on(`update`,r),()=>{e.off(`update`,r),t!==null&&clearTimeout(t)}},T=[p,m,n,l],t[13]=m,t[14]=p,t[15]=n,t[16]=l,t[17]=w,t[18]=T):(w=t[17],T=t[18]),(0,we.useEffect)(w,T);let E;t[19]===C?E=t[20]:(E=C.map(pn),t[19]=C,t[20]=E);let D=rn(E,r),O;t[21]!==D||t[22]!==C?(O=D?C.findIndex(e=>e.slug===D):-1,t[21]=D,t[22]=C,t[23]=O):O=t[23];let k=O,A;t[24]!==n||t[25]!==r?(A=function(e,t){let i={index:e,slug:t,mode:r?`source`:`wysiwyg`};i.mode===`source`&&De(n,{kind:`outline`,detail:i}),window.dispatchEvent(new CustomEvent(un,{detail:i}))},t[24]=n,t[25]=r,t[26]=A):A=t[26];let j=A,ce=((k>=0?C[k].level:1)-1)*cn+(cn-ln)/2,M=k*sn+(sn-ln)/2,N;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(re,{children:`Outline`}),t[27]=N):N=t[27];let P;t[28]!==C.length||t[29]!==b?(P=!b&&(0,$.jsx)(ne,{children:C.length}),t[28]=C.length,t[29]=b,t[30]=P):P=t[30];let F;t[31]===P?F=t[32]:(F=(0,$.jsxs)(te,{children:[N,P]}),t[31]=P,t[32]=F);let I;t[33]!==k||t[34]!==D||t[35]!==x||t[36]!==j||t[37]!==C||t[38]!==b||t[39]!==ce||t[40]!==M?(I=x?(0,$.jsx)(u,{className:`px-2`,children:x instanceof Error?x.message:`Failed to load headings`}):C.length===0&&!b?(0,$.jsx)(f,{className:`px-2`,children:`No headings yet.`}):(0,$.jsxs)(`nav`,{"aria-label":`Document outline`,className:`relative`,children:[k>=0&&(0,$.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute left-0 top-0 rounded-full bg-primary motion-safe:[transition:transform_0.25s_var(--ease-out-strong)]`,style:{width:ln,height:ln,transform:`translate(${ce}px, ${M}px)`}}),C.map((e,t)=>{let n=e.slug===D;return(0,$.jsx)(`button`,{type:`button`,"aria-current":n?`location`:void 0,onClick:()=>j(t,e.slug),className:se(`w-full cursor-pointer truncate py-1.5 pe-2 text-left text-sm transition-colors`,n?`font-medium text-primary`:`text-muted-foreground hover:text-foreground`),style:{paddingLeft:`${(e.level-1)*cn+20}px`},title:e.text,children:e.text},t)})]}),t[33]=k,t[34]=D,t[35]=x,t[36]=j,t[37]=C,t[38]=b,t[39]=ce,t[40]=M,t[41]=I):I=t[41];let L;t[42]!==b||t[43]!==I?(L=(0,$.jsx)(ee,{className:`px-3 py-2`,"aria-busy":b,children:I}),t[42]=b,t[43]=I,t[44]=L):L=t[44];let R;return t[45]!==a||t[46]!==F||t[47]!==L?(R=(0,$.jsxs)(ie,{className:a,children:[F,L]}),t[45]=a,t[46]=F,t[47]=L,t[48]=R):R=t[48],R}function pn(e){return e.slug}export{Oe as a,ke as i,dn as n,De as o,nn as r,un as t};