ryugi-artifacts 1.39.3 → 1.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/dist/cli.cjs +1 -1
  2. package/dist/server.cjs +1077 -706
  3. package/dist/viewer/ArtboardLayout-5NH9K2-f.js +4 -0
  4. package/dist/viewer/{ArtifactList-DkNzouw4.css → ArtifactList-Bdjp9Abx.css} +1 -1
  5. package/dist/viewer/ArtifactList-Cyg0EaSK.js +1 -0
  6. package/dist/viewer/{AutoPublishPrompt-k5GEC8px.js → AutoPublishPrompt-B2D53_Kz.js} +1 -1
  7. package/dist/viewer/Canvas-CvaP3Qdq.js +1 -0
  8. package/dist/viewer/{DocumentLayout-Ma6pIbFQ.js → DocumentLayout-DZ-2_UTn.js} +2 -2
  9. package/dist/viewer/{DocumentPage-DR-JR_zy.js → DocumentPage-BcgERMV0.js} +1 -1
  10. package/dist/viewer/{HtmlLayout-CN1u22T3.js → HtmlLayout-CtlWM446.js} +1 -1
  11. package/dist/viewer/{MenuRoot-DkoIaECn.js → MenuRoot-CwCVByOp.js} +1 -1
  12. package/dist/viewer/{PopoverPopup-CMVq0yky.js → PopoverPopup-BA537pRU.js} +1 -1
  13. package/dist/viewer/PreviewLayout-D9BqcBqC.js +2 -0
  14. package/dist/viewer/{Select-CwgJ37pc.js → Select-D2-94UGe.js} +1 -1
  15. package/dist/viewer/{SnapshotDocument-CRhbvguv.js → SnapshotDocument-kHyl0dKv.js} +1 -1
  16. package/dist/viewer/{ThreadView-D4SraORS.js → ThreadView-Qlz9Ufo7.js} +1 -1
  17. package/dist/viewer/{TooltipPopup-DxPP2bro.js → TooltipPopup-Cpm4Cwxn.js} +1 -1
  18. package/dist/viewer/{WarningsBadge-cm9tZcTn.js → WarningsBadge-BtRPiCiS.js} +1 -1
  19. package/dist/viewer/{abnfDiagram-VCTEODGH-BXvju000.js → abnfDiagram-VCTEODGH-Cc589tRO.js} +1 -1
  20. package/dist/viewer/{ar-SA-G6X2FPQ2-BC7_oYsw.js → ar-SA-G6X2FPQ2-qNPFpNYG.js} +1 -1
  21. package/dist/viewer/{architecture-7GRP2DOG-BsfkbdXm.js → architecture-7GRP2DOG-BizmpjHH.js} +1 -1
  22. package/dist/viewer/{architectureDiagram-5GKGNRK7-DMJC6Mss.js → architectureDiagram-5GKGNRK7-BuHdaFmM.js} +1 -1
  23. package/dist/viewer/{az-AZ-76LH7QW2-BoB-edTO.js → az-AZ-76LH7QW2-CbXvPy4A.js} +1 -1
  24. package/dist/viewer/{bg-BG-XCXSNQG7-DQONVkGg.js → bg-BG-XCXSNQG7-DcRkeEZa.js} +1 -1
  25. package/dist/viewer/{blockDiagram-I7D4REHJ-Cs5YrzXw.js → blockDiagram-I7D4REHJ-BjZAhqNZ.js} +1 -1
  26. package/dist/viewer/{bn-BD-2XOGV67Q-Cv1j6v25.js → bn-BD-2XOGV67Q-CYG0oQ07.js} +1 -1
  27. package/dist/viewer/{c4Diagram-7LVT6UL2-45NATFHl.js → c4Diagram-7LVT6UL2-Dw9Lqcc4.js} +1 -1
  28. package/dist/viewer/{ca-ES-6MX7JW3Y-DZ0TNSQ4.js → ca-ES-6MX7JW3Y-DZg7oXog.js} +1 -1
  29. package/dist/viewer/{channel-CZ3kjwGM.js → channel-CgSk2sDt.js} +4 -4
  30. package/dist/viewer/channel-DGerhKw9.js +1 -0
  31. package/dist/viewer/{chunk-4HAMMTFA-B3nJnZ9F.js → chunk-4HAMMTFA-CmIOM_4n.js} +1 -1
  32. package/dist/viewer/{chunk-75Z2AOVW-CjZa5uIp.js → chunk-75Z2AOVW-Bk3gHz3u.js} +1 -1
  33. package/dist/viewer/{chunk-DU6HZSFF-BUAXPoMb.js → chunk-DU6HZSFF-Z871Xxjd.js} +1 -1
  34. package/dist/viewer/{chunk-EIO257PC-CGBpzoiR.js → chunk-EIO257PC-BowPlGMj.js} +1 -1
  35. package/dist/viewer/{chunk-F27PBJKO-pYBnItBc.js → chunk-F27PBJKO-Da_Uy85s.js} +1 -1
  36. package/dist/viewer/{chunk-GMAD6QVW-BcEVZPpX.js → chunk-GMAD6QVW-D99eqSu1.js} +1 -1
  37. package/dist/viewer/{chunk-GVQU2GXP-RN5RCI2q.js → chunk-GVQU2GXP-DpHE-JHS.js} +1 -1
  38. package/dist/viewer/{chunk-IMKFNOWR-DmMMbiio.js → chunk-IMKFNOWR-DNlzjXm8.js} +1 -1
  39. package/dist/viewer/{chunk-L3NEJ4N5-CIyckesx.js → chunk-L3NEJ4N5-CwGjxbjF.js} +1 -1
  40. package/dist/viewer/{chunk-OSK3NFVY-DzKjAn-_.js → chunk-OSK3NFVY-B4adwKZF.js} +1 -1
  41. package/dist/viewer/{chunk-P2QGCYS3-DE5HjY3O.js → chunk-P2QGCYS3-CR8elxW8.js} +1 -1
  42. package/dist/viewer/{chunk-POPQ4Y6H-B2iFVK22.js → chunk-POPQ4Y6H-D5X5fYtJ.js} +1 -1
  43. package/dist/viewer/{chunk-PWAF6VOD-C9uEYjy_.js → chunk-PWAF6VOD-C52ljaIH.js} +1 -1
  44. package/dist/viewer/{chunk-SHT3W25Y-oMa6Fj-i.js → chunk-SHT3W25Y-Bqd2yIYA.js} +1 -1
  45. package/dist/viewer/{chunk-SVP7TREG-mHtk664v.js → chunk-SVP7TREG-B-2E6atr.js} +1 -1
  46. package/dist/viewer/{chunk-TICWLB2K-jH0CP76_.js → chunk-TICWLB2K-C4hY4B9O.js} +1 -1
  47. package/dist/viewer/classDiagram-ZZMXUADV-DWXc-S98.js +1 -0
  48. package/dist/viewer/classDiagram-v2-VYDZK3BY-DWXc-S98.js +1 -0
  49. package/dist/viewer/{cs-CZ-2BRQDIVT-Dhu4qucS.js → cs-CZ-2BRQDIVT-DmUu99ZE.js} +1 -1
  50. package/dist/viewer/{cynefin-OW5HDTMX-Dt4Lc_OY.js → cynefin-OW5HDTMX-CNpCyJlF.js} +1 -1
  51. package/dist/viewer/{cynefinDiagram-5FMLGOSQ-D9wt4obv.js → cynefinDiagram-5FMLGOSQ-D_E8exI5.js} +1 -1
  52. package/dist/viewer/{da-DK-5WZEPLOC-Cfvrwe9_.js → da-DK-5WZEPLOC-DrcqQnR5.js} +1 -1
  53. package/dist/viewer/{dagre-GXQ25YYZ-BO0WVlm2.js → dagre-GXQ25YYZ-B-hQNnoj.js} +1 -1
  54. package/dist/viewer/{de-DE-XR44H4JA-D4-18FoM.js → de-DE-XR44H4JA-BwGQ1Bu3.js} +1 -1
  55. package/dist/viewer/{diagram-S7CK7UJ4-CxdyW8LS.js → diagram-S7CK7UJ4-DyrrPPnW.js} +1 -1
  56. package/dist/viewer/{diagram-UQ7AKVKN-BIqDcs_7.js → diagram-UQ7AKVKN-DFdvde_8.js} +1 -1
  57. package/dist/viewer/{diagram-VSXAHHWV-D_PcQqk3.js → diagram-VSXAHHWV-BDdvfK3v.js} +1 -1
  58. package/dist/viewer/{diagram-VX7I27RA-DBBIedSr.js → diagram-VX7I27RA-Bv2wKJgk.js} +1 -1
  59. package/dist/viewer/{diagram-Z3DM3KII-WBRsTmE8.js → diagram-Z3DM3KII-DVbVVBJH.js} +1 -1
  60. package/dist/viewer/{dist-DOkcl75B.js → dist-2N6kKX64.js} +1 -1
  61. package/dist/viewer/{dist-C1MwFTyU.js → dist-3KIsZmwj.js} +1 -1
  62. package/dist/viewer/{dist-aYXNz_4V.js → dist-BLMq_PiX.js} +1 -1
  63. package/dist/viewer/{dist-Bnqj8Gmo.js → dist-B_G83rKD.js} +1 -1
  64. package/dist/viewer/{dist-GhJ41wUr.js → dist-BfMsz_Mq.js} +1 -1
  65. package/dist/viewer/{dist-BWwwi5_X.js → dist-BpMGGlEV.js} +4 -4
  66. package/dist/viewer/{dist-PBVFHBAM.js → dist-BqBGd2fX.js} +1 -1
  67. package/dist/viewer/{dist-BrIPUxG2.js → dist-C-Ceo6Fq.js} +1 -1
  68. package/dist/viewer/{dist-DDg3uy1L.js → dist-C1no3jCb.js} +1 -1
  69. package/dist/viewer/{dist-BD6AMMu6.js → dist-CLaYa349.js} +1 -1
  70. package/dist/viewer/{dist-DD6CYnHf.js → dist-Cp67yPvp.js} +1 -1
  71. package/dist/viewer/{dist-Dr6BjhkC.js → dist-Cs9q7OJl.js} +1 -1
  72. package/dist/viewer/{dist-B3qF9y2P.js → dist-DDjqhgMa.js} +1 -1
  73. package/dist/viewer/{dist-CgvDm6l2.js → dist-DJjmFLDp.js} +1 -1
  74. package/dist/viewer/{dist-QdFm-TpF.js → dist-DJtATNMP.js} +1 -1
  75. package/dist/viewer/{dist-BFOj1yhG.js → dist-DL1gyV3R.js} +1 -1
  76. package/dist/viewer/{dist-ax6MxZ4H.js → dist-DRMtu_-x.js} +1 -1
  77. package/dist/viewer/{dist-3FpZpQsG.js → dist-Dbb4bImq.js} +1 -1
  78. package/dist/viewer/{dist-C_apntEm.js → dist-DpiVIFsv.js} +1 -1
  79. package/dist/viewer/{dist-DUuSKx-E.js → dist-Dril0ai0.js} +1 -1
  80. package/dist/viewer/{dist-IRVOOoXy.js → dist-Ks19j7-h.js} +1 -1
  81. package/dist/viewer/{dist-CwZnN4Xq.js → dist-b6M4YQd0.js} +1 -1
  82. package/dist/viewer/{dist-VDfC7fQj.js → dist-gv6IdArU.js} +1 -1
  83. package/dist/viewer/{dist-B-B7WCBL.js → dist-nHjoUtlT.js} +1 -1
  84. package/dist/viewer/{ebnfDiagram-PWID7BFC-CvbyzUhj.js → ebnfDiagram-PWID7BFC-BPZEgIKG.js} +1 -1
  85. package/dist/viewer/{el-GR-BZB4AONW-dKGP5A6S.js → el-GR-BZB4AONW-BHX9PTvB.js} +1 -1
  86. package/dist/viewer/{en-B4ZKOASM-DdnUqB7F.js → en-B4ZKOASM-ChdJoy_X.js} +1 -1
  87. package/dist/viewer/{erDiagram-RLTQ6QDP-BSIpq4Ma.js → erDiagram-RLTQ6QDP-teAVgmCA.js} +1 -1
  88. package/dist/viewer/{es-ES-U4NZUMDT-CJs9H74B.js → es-ES-U4NZUMDT-DGRmVt9a.js} +1 -1
  89. package/dist/viewer/{eu-ES-A7QVB2H4-BpTGvnoa.js → eu-ES-A7QVB2H4-6SSWUUs4.js} +1 -1
  90. package/dist/viewer/{eventmodeling-NTZA5JFV-AEcfWQ5R.js → eventmodeling-NTZA5JFV-B1I1Mylr.js} +1 -1
  91. package/dist/viewer/{fa-IR-HGAKTJCU-DJLprM1g.js → fa-IR-HGAKTJCU-B_-FrT72.js} +1 -1
  92. package/dist/viewer/{fi-FI-Z5N7JZ37-DZO2men5.js → fi-FI-Z5N7JZ37-C7SiOzZ-.js} +1 -1
  93. package/dist/viewer/flowDiagram-HODETNUW-DWhovppS.js +1 -0
  94. package/dist/viewer/{fr-FR-RHASNOE6-BYhoE1fL.js → fr-FR-RHASNOE6-B_QvfKMB.js} +1 -1
  95. package/dist/viewer/{ganttDiagram-EL5Y4UJY-UpFE7jgj.js → ganttDiagram-EL5Y4UJY-BMv_Q37E.js} +1 -1
  96. package/dist/viewer/{gitGraph-4MIJSDKK-1vAyRROA.js → gitGraph-4MIJSDKK-Bu1dbHFU.js} +1 -1
  97. package/dist/viewer/{gitGraphDiagram-WWUBYQGX-DbBzfF1w.js → gitGraphDiagram-WWUBYQGX-DUZ8_32F.js} +1 -1
  98. package/dist/viewer/{gl-ES-HMX3MZ6V-BAZvKCaj.js → gl-ES-HMX3MZ6V-CmXVsVrw.js} +1 -1
  99. package/dist/viewer/{he-IL-6SHJWFNN--TCOY-gD.js → he-IL-6SHJWFNN-8kv-3A3Y.js} +1 -1
  100. package/dist/viewer/{hi-IN-IWLTKZ5I-DKcgdosl.js → hi-IN-IWLTKZ5I-CvpAemRq.js} +1 -1
  101. package/dist/viewer/{hu-HU-A5ZG7DT2-BytkDoyb.js → hu-HU-A5ZG7DT2-DOiAQ3qh.js} +1 -1
  102. package/dist/viewer/{id-ID-SAP4L64H-DXlwB6xv.js → id-ID-SAP4L64H-BK_k3fGY.js} +1 -1
  103. package/dist/viewer/{image-GAAHSSAO-CvxeXl6x.js → image-GAAHSSAO-WbKWFRU6.js} +1 -1
  104. package/dist/viewer/{imperative-D_aIwRcY.js → imperative-DfjHJwB9.js} +1 -1
  105. package/dist/viewer/index.html +3 -3
  106. package/dist/viewer/index.js +3 -3
  107. package/dist/viewer/index5.css +24 -0
  108. package/dist/viewer/{info-A6RAGUB7-DC1qtCjR.js → info-A6RAGUB7-BVW83dCy.js} +1 -1
  109. package/dist/viewer/{infoDiagram-27XIBGKW-CgUQBk-V.js → infoDiagram-27XIBGKW-C7TxtcWL.js} +1 -1
  110. package/dist/viewer/{ishikawaDiagram-5VMMS53U-BkKxgCdb.js → ishikawaDiagram-5VMMS53U-BT-yQVRc.js} +1 -1
  111. package/dist/viewer/{it-IT-JPQ66NNP-eGQ7yDSO.js → it-IT-JPQ66NNP-BNsEQmLq.js} +1 -1
  112. package/dist/viewer/{itemEquality-BS6j9Zsz.js → itemEquality-Dx2kxFQI.js} +1 -1
  113. package/dist/viewer/{ja-JP-DBVTYXUO-BUgjJZzs.js → ja-JP-DBVTYXUO-jEL5Zohm.js} +1 -1
  114. package/dist/viewer/{journeyDiagram-3NMN7TZE-C6_wjnmp.js → journeyDiagram-3NMN7TZE-D56mmWU7.js} +1 -1
  115. package/dist/viewer/{kaa-6HZHGXH3-BueATLLo.js → kaa-6HZHGXH3-B6pyJXZH.js} +1 -1
  116. package/dist/viewer/{kab-KAB-ZGHBKWFO-ClQZTy25.js → kab-KAB-ZGHBKWFO-CLlf3rfz.js} +1 -1
  117. package/dist/viewer/{kanban-definition-UXKFOSKX-CterUst4.js → kanban-definition-UXKFOSKX-hi8MCy0F.js} +1 -1
  118. package/dist/viewer/{kk-KZ-P5N5QNE5-Dr0MLDFl.js → kk-KZ-P5N5QNE5-D-GnQDUN.js} +1 -1
  119. package/dist/viewer/{km-KH-HSX4SM5Z-BZsbo1xA.js → km-KH-HSX4SM5Z-CvlRaq6r.js} +1 -1
  120. package/dist/viewer/{ko-KR-MTYHY66A-CBSuBQx3.js → ko-KR-MTYHY66A-mYkZX31W.js} +1 -1
  121. package/dist/viewer/{ku-TR-6OUDTVRD-C2o7j6q4.js → ku-TR-6OUDTVRD-CeXiI7eX.js} +1 -1
  122. package/dist/viewer/{lt-LT-XHIRWOB4-C1i1RYpL.js → lt-LT-XHIRWOB4-DNl9HTRS.js} +1 -1
  123. package/dist/viewer/{lv-LV-5QDEKY6T-VKJQ3_sE.js → lv-LV-5QDEKY6T-_QejX_-F.js} +1 -1
  124. package/dist/viewer/{mermaid-parser.core-DufvW-Q5.js → mermaid-parser.core-8H71iLKg.js} +3 -3
  125. package/dist/viewer/{mindmap-definition-YA3MSWOX-DVXaIRju.js → mindmap-definition-YA3MSWOX-DDgO7tS-.js} +1 -1
  126. package/dist/viewer/{mr-IN-CRQNXWMA-3ZUkepkl.js → mr-IN-CRQNXWMA-OIHNnnu8.js} +1 -1
  127. package/dist/viewer/{my-MM-5M5IBNSE-CyXWhEnh.js → my-MM-5M5IBNSE-DYrw8pYH.js} +1 -1
  128. package/dist/viewer/{nb-NO-T6EIAALU-Dx93f5cX.js → nb-NO-T6EIAALU-DMd3Sg5d.js} +1 -1
  129. package/dist/viewer/{nl-NL-IS3SIHDZ-DT_xPivA.js → nl-NL-IS3SIHDZ-D9AJQvsb.js} +1 -1
  130. package/dist/viewer/{nn-NO-6E72VCQL-Bi5T0boZ.js → nn-NO-6E72VCQL-DNeLg3d9.js} +1 -1
  131. package/dist/viewer/{oc-FR-POXYY2M6-C9zZyUC-.js → oc-FR-POXYY2M6-D6JMp-_j.js} +1 -1
  132. package/dist/viewer/{pa-IN-N4M65BXN-czDwVWgG.js → pa-IN-N4M65BXN-g5Vjsxo8.js} +1 -1
  133. package/dist/viewer/{packet-AYTQ26CC-C05op432.js → packet-AYTQ26CC-Dgk7eBb9.js} +1 -1
  134. package/dist/viewer/{pegDiagram-XKGWAZYB-Dn6Dpo1o.js → pegDiagram-XKGWAZYB-CVIwfqJt.js} +1 -1
  135. package/dist/viewer/percentages-BXMCSKIN-NLhw_fz5.js +1 -0
  136. package/dist/viewer/{pie-WAS4IAKB-DCxG3T3F.js → pie-WAS4IAKB-DS_tuosA.js} +1 -1
  137. package/dist/viewer/{pieDiagram-E7YTZNPT-DbqswtQ4.js → pieDiagram-E7YTZNPT-4vQIT90F.js} +1 -1
  138. package/dist/viewer/{pl-PL-T2D74RX3-DG-hl2Rj.js → pl-PL-T2D74RX3-CHeYNLpa.js} +1 -1
  139. package/dist/viewer/preview.html +4 -4
  140. package/dist/viewer/preview.js +1 -1
  141. package/dist/viewer/{prod-BZ4Wu9HS.js → prod-DiBc1897.js} +8 -8
  142. package/dist/viewer/{pt-BR-5N22H2LF-CzNrhnPv.js → pt-BR-5N22H2LF-taNFaSz0.js} +1 -1
  143. package/dist/viewer/{pt-PT-UZXXM6DQ-AIfpteJH.js → pt-PT-UZXXM6DQ-CsmK_jBH.js} +1 -1
  144. package/dist/viewer/{quadrantDiagram-AXDQQJYC-Gw1cmjUI.js → quadrantDiagram-AXDQQJYC-BeirbPa5.js} +1 -1
  145. package/dist/viewer/{radar-RG4KPBEZ-D4p5nZeU.js → radar-RG4KPBEZ-BsCRiS0D.js} +1 -1
  146. package/dist/viewer/{railroad-74A4TZTK-8sXbWwKa.js → railroad-74A4TZTK--zO8tvea.js} +1 -1
  147. package/dist/viewer/{railroad-abnf-HS5TGJTU-BM_sbPAY.js → railroad-abnf-HS5TGJTU-BZWetNTH.js} +1 -1
  148. package/dist/viewer/{railroad-ebnf-LZEXJU2U-CQ3-2vGf.js → railroad-ebnf-LZEXJU2U-Bdr-nXDi.js} +1 -1
  149. package/dist/viewer/{railroad-peg-WCYAUIDC-U_WXUcw7.js → railroad-peg-WCYAUIDC-5QbqtFhr.js} +1 -1
  150. package/dist/viewer/{railroadDiagram-O6MQD6OU-B1ppr3sL.js → railroadDiagram-O6MQD6OU-CEc9eC2b.js} +1 -1
  151. package/dist/viewer/{requirementDiagram-BXWQKSXE-Cxrc4SoH.js → requirementDiagram-BXWQKSXE-gHO3OQpd.js} +1 -1
  152. package/dist/viewer/{ro-RO-JPDTUUEW-BEjO4HHJ.js → ro-RO-JPDTUUEW-URJMRk3q.js} +1 -1
  153. package/dist/viewer/{ru-RU-B4JR7IUQ-BavcQZXw.js → ru-RU-B4JR7IUQ-DI6p8dtR.js} +1 -1
  154. package/dist/viewer/{sankeyDiagram-P5KCCOFB-DjgXHH9L.js → sankeyDiagram-P5KCCOFB-BKwmk90Q.js} +1 -1
  155. package/dist/viewer/{selection-BM7S9xbk.js → selection-BUarVaVG.js} +1 -1
  156. package/dist/viewer/{sequenceDiagram-WJ2MYXX4-C2DYgWi9.js → sequenceDiagram-WJ2MYXX4-DNRtNYaC.js} +1 -1
  157. package/dist/viewer/{si-LK-N5RQ5JYF-Bnt1Yc-D.js → si-LK-N5RQ5JYF-CC3Wbwwt.js} +1 -1
  158. package/dist/viewer/{sk-SK-C5VTKIMK-CrfWnb5P.js → sk-SK-C5VTKIMK-D4qIYJZm.js} +1 -1
  159. package/dist/viewer/{sl-SI-NN7IZMDC-ClYWp3TB.js → sl-SI-NN7IZMDC-BrX9Kjyd.js} +1 -1
  160. package/dist/viewer/{stateDiagram-D77RDMKH-BgY-aVKr.js → stateDiagram-D77RDMKH-DFHhwDaw.js} +1 -1
  161. package/dist/viewer/stateDiagram-v2-MP3YSRHH-D8ViYn3V.js +1 -0
  162. package/dist/viewer/subset-shared.chunk-Bx9OralH.js +1 -0
  163. package/dist/viewer/{subset-worker.chunk-Bqc0X_aB.js → subset-worker.chunk-D_1PjTiM.js} +1 -1
  164. package/dist/viewer/{sv-SE-XGPEYMSR-BdoB8Rj7.js → sv-SE-XGPEYMSR-CrLXWvFy.js} +1 -1
  165. package/dist/viewer/{swimlanes-42K2YHIH-BGTajJgK.js → swimlanes-42K2YHIH-DzGUJWU-.js} +1 -1
  166. package/dist/viewer/swimlanesDiagram-VR7AAH4N-Clea06qq.js +8 -0
  167. package/dist/viewer/{ta-IN-2NMHFXQM-BkckOnzR.js → ta-IN-2NMHFXQM-BjEs1VFY.js} +1 -1
  168. package/dist/viewer/{th-TH-HPSO5L25-CRLLuDpg.js → th-TH-HPSO5L25-Cg6PzVXI.js} +1 -1
  169. package/dist/viewer/{timeline-definition-24CTP7MA-BWXI1p8O.js → timeline-definition-24CTP7MA-CIpmMJhg.js} +1 -1
  170. package/dist/viewer/{tr-TR-DEFEU3FU-DZyMLsTh.js → tr-TR-DEFEU3FU-DCEAv9nq.js} +1 -1
  171. package/dist/viewer/{treeView-Q6P3EWNA-DEZ8PMJ0.js → treeView-Q6P3EWNA-DHjfLsjZ.js} +1 -1
  172. package/dist/viewer/{treemap-WGGIJYW6-CEtEyA1g.js → treemap-WGGIJYW6-COOVf8-Y.js} +1 -1
  173. package/dist/viewer/{type-icons-BgJTj_SA.js → type-icons-BonbxUGw.js} +1 -1
  174. package/dist/viewer/{uk-UA-QMV73CPH-CbXo3u2i.js → uk-UA-QMV73CPH-DMWYOkg6.js} +1 -1
  175. package/dist/viewer/{useSystemTheme-BzF5DZpM.js → useSystemTheme-BVZLLsnc.js} +2 -2
  176. package/dist/viewer/{useTranslation-CNLU7LLU.js → useTranslation-Ci5tOdAN.js} +1 -1
  177. package/dist/viewer/{useTypeFavicon-C9FIi3rq.js → useTypeFavicon-B--Z-Uwv.js} +1 -1
  178. package/dist/viewer/{vennDiagram-4TSXK5OY-Ia6F_eUh.js → vennDiagram-4TSXK5OY-BWDC-eE0.js} +1 -1
  179. package/dist/viewer/{vi-VN-M7AON7JQ-Bmve5EIh.js → vi-VN-M7AON7JQ-CVj2nFN-.js} +1 -1
  180. package/dist/viewer/view-BL5bZDxq.js +1 -0
  181. package/dist/viewer/{wardley-WFR3VGLG-C9MgOguc.js → wardley-WFR3VGLG-CDlPWlPO.js} +1 -1
  182. package/dist/viewer/{wardleyDiagram-VM6X3IG4-PY7TclvB.js → wardleyDiagram-VM6X3IG4-C9yxtxg6.js} +1 -1
  183. package/dist/viewer/{xychartDiagram-S5SC5T6Z-XcMgpVtH.js → xychartDiagram-S5SC5T6Z-Dv4UxBWo.js} +1 -1
  184. package/dist/viewer/{zh-CN-LNUGB5OW-DpdHIirp.js → zh-CN-LNUGB5OW-i7Vn4Pqy.js} +1 -1
  185. package/dist/viewer/{zh-HK-E62DVLB3-C3rLDvD0.js → zh-HK-E62DVLB3-Cm16SoeD.js} +1 -1
  186. package/dist/viewer/{zh-TW-RAJ6MFWO-CZhgLjog.js → zh-TW-RAJ6MFWO-Lambeacv.js} +1 -1
  187. package/dist/viewer-lib/{Canvas-DhVw4WDg.js → Canvas-BBqpPRdY.js} +116 -111
  188. package/dist/viewer-lib/{SnapshotDocument-DVgv4kZc.js → SnapshotDocument-De-tiDPI.js} +29 -29
  189. package/dist/viewer-lib/{abnfDiagram-VCTEODGH-B6bXfZxm.js → abnfDiagram-VCTEODGH-mRme_q_0.js} +2 -2
  190. package/dist/viewer-lib/{ar-SA-G6X2FPQ2-zB5Xhl_Y.js → ar-SA-G6X2FPQ2-DEB70-bl.js} +1 -1
  191. package/dist/viewer-lib/{architectureDiagram-5GKGNRK7-BUPkG7Ex.js → architectureDiagram-5GKGNRK7-C_rEuOHA.js} +3 -3
  192. package/dist/viewer-lib/{az-AZ-76LH7QW2-phkDvo9l.js → az-AZ-76LH7QW2-8eNvYQhd.js} +1 -1
  193. package/dist/viewer-lib/{bg-BG-XCXSNQG7-Cm-4WXUM.js → bg-BG-XCXSNQG7-Cp0CcXum.js} +1 -1
  194. package/dist/viewer-lib/{blockDiagram-I7D4REHJ-g-9peVRT.js → blockDiagram-I7D4REHJ-DF_oaLCS.js} +5 -5
  195. package/dist/viewer-lib/{bn-BD-2XOGV67Q-DUY86OUL.js → bn-BD-2XOGV67Q-D_-4D0lj.js} +1 -1
  196. package/dist/viewer-lib/{c4Diagram-7LVT6UL2-Dx_djqGh.js → c4Diagram-7LVT6UL2-CJuAsfLv.js} +3 -3
  197. package/dist/viewer-lib/{ca-ES-6MX7JW3Y-B4Us7cRJ.js → ca-ES-6MX7JW3Y-Dz29hIh-.js} +1 -1
  198. package/dist/viewer-lib/{chunk-4HAMMTFA-CXv-Lij8.js → chunk-4HAMMTFA-CsARL8YZ.js} +2 -2
  199. package/dist/viewer-lib/{chunk-EIO257PC-CWvt2Y0R.js → chunk-EIO257PC-CpPSxz4e.js} +1 -1
  200. package/dist/viewer-lib/{chunk-GMAD6QVW-Dnq3f5bN.js → chunk-GMAD6QVW-DjabgI3m.js} +1 -1
  201. package/dist/viewer-lib/{chunk-GVQU2GXP-IqZUlrEd.js → chunk-GVQU2GXP-Gm2AWppa.js} +1 -1
  202. package/dist/viewer-lib/{chunk-IMKFNOWR-CQe2-v6D.js → chunk-IMKFNOWR-u3xIGI3w.js} +1 -1
  203. package/dist/viewer-lib/{chunk-L3NEJ4N5-BflwC_sh.js → chunk-L3NEJ4N5-DF4ITbi3.js} +3 -3
  204. package/dist/viewer-lib/{chunk-OSK3NFVY-CaPk1ucD.js → chunk-OSK3NFVY-BOPEbkqm.js} +4 -4
  205. package/dist/viewer-lib/{chunk-PWAF6VOD-KzuaHqkZ.js → chunk-PWAF6VOD-DsQ0UBDi.js} +1 -1
  206. package/dist/viewer-lib/{chunk-SHT3W25Y-BB1CiAyK.js → chunk-SHT3W25Y-CsuWKWDg.js} +2 -2
  207. package/dist/viewer-lib/{chunk-SVP7TREG-DiV7oQG5.js → chunk-SVP7TREG-CCIdldtk.js} +1 -1
  208. package/dist/viewer-lib/{chunk-TICWLB2K-D5BWY1S6.js → chunk-TICWLB2K-DqFeVhrd.js} +1 -1
  209. package/dist/viewer-lib/{classDiagram-ZZMXUADV-CTCUwqde.js → classDiagram-ZZMXUADV-Pl5KgHxp.js} +8 -8
  210. package/dist/viewer-lib/{classDiagram-v2-VYDZK3BY-DU-Ly0qb.js → classDiagram-v2-VYDZK3BY-q6xwV0Xb.js} +8 -8
  211. package/dist/viewer-lib/{cloud-0rqarT99.js → cloud-BA1xJLJk.js} +2 -4
  212. package/dist/viewer-lib/core.js +3 -3
  213. package/dist/viewer-lib/{cs-CZ-2BRQDIVT-BfONhT2s.js → cs-CZ-2BRQDIVT-Bzhoe_-c.js} +1 -1
  214. package/dist/viewer-lib/{cynefinDiagram-5FMLGOSQ-DSX5r67L.js → cynefinDiagram-5FMLGOSQ-D8ITz1Wq.js} +1 -1
  215. package/dist/viewer-lib/{da-DK-5WZEPLOC-CvU9yHbw.js → da-DK-5WZEPLOC-DhPj59a-.js} +1 -1
  216. package/dist/viewer-lib/{dagre-GXQ25YYZ-BylEnZ1G.js → dagre-GXQ25YYZ-CYo-pGD-.js} +7 -7
  217. package/dist/viewer-lib/{de-DE-XR44H4JA-DjITOoGx.js → de-DE-XR44H4JA-CSwSki-G.js} +1 -1
  218. package/dist/viewer-lib/{diagram-S7CK7UJ4--dQvZECU.js → diagram-S7CK7UJ4-DdfvsHRY.js} +2 -2
  219. package/dist/viewer-lib/{diagram-UQ7AKVKN-DhV5GC9M.js → diagram-UQ7AKVKN-296DTSQV.js} +1 -1
  220. package/dist/viewer-lib/{diagram-VX7I27RA-BYGIiidS.js → diagram-VX7I27RA-DJLLMguH.js} +2 -2
  221. package/dist/viewer-lib/{diagram-Z3DM3KII-Bl88v_dt.js → diagram-Z3DM3KII-BtR8L7V6.js} +1 -1
  222. package/dist/viewer-lib/{dist-BnJMz1lk.js → dist-3MsoJzIP.js} +2 -2
  223. package/dist/viewer-lib/{dist-Dasyrv9p.js → dist-5rWbhm5n.js} +3 -3
  224. package/dist/viewer-lib/{dist-BKU67DAz.js → dist-6oDcRnC0.js} +43 -43
  225. package/dist/viewer-lib/{dist-Cly6VBkU.js → dist-B13LTOpq.js} +2 -2
  226. package/dist/viewer-lib/{dist-I26bVfzG.js → dist-BEof2FND.js} +4 -4
  227. package/dist/viewer-lib/{dist-D3aIBLJJ.js → dist-BVBxZbCW.js} +2 -2
  228. package/dist/viewer-lib/{dist-CN94e3wg.js → dist-BY7JD5jN.js} +4 -4
  229. package/dist/viewer-lib/{dist-DmNMOdpH.js → dist-BgOxLu7c.js} +2 -2
  230. package/dist/viewer-lib/{dist-vbK4WU3k.js → dist-BhvMRWbr.js} +2 -2
  231. package/dist/viewer-lib/{dist-D6snPs1M.js → dist-Bjk560Xs.js} +2 -2
  232. package/dist/viewer-lib/{dist-CZfGJ0TF.js → dist-CL4VtmKa.js} +3 -3
  233. package/dist/viewer-lib/{dist-BUEjxQBb.js → dist-CN6m0b1c.js} +3 -3
  234. package/dist/viewer-lib/{dist-DpcSjfzB.js → dist-CxnW7yqa.js} +3 -3
  235. package/dist/viewer-lib/{dist-C2uapCuB.js → dist-D1fdbT-F.js} +2 -2
  236. package/dist/viewer-lib/{dist-DjAen7mC.js → dist-D6MaUL0a.js} +3 -3
  237. package/dist/viewer-lib/{dist-BGRXPLGs.js → dist-DAXYzckS.js} +3 -3
  238. package/dist/viewer-lib/{dist-BNqDRX3X.js → dist-DJc71Mut.js} +3 -3
  239. package/dist/viewer-lib/{dist-CAG9fDwh.js → dist-DJv8nq9b.js} +2 -2
  240. package/dist/viewer-lib/{dist-DnWBX6zc.js → dist-DgqjK8Vv.js} +4 -4
  241. package/dist/viewer-lib/{dist-BIyd_e55.js → dist-DsM7b_A_.js} +3 -3
  242. package/dist/viewer-lib/{dist-CwK-8NZD.js → dist-LzRa-AGu.js} +1 -1
  243. package/dist/viewer-lib/{dist-DNPsTu4O.js → dist-_NLfozkW.js} +1 -1
  244. package/dist/viewer-lib/{dist-DOalUtJc.js → dist-qFBnO3rM.js} +3 -3
  245. package/dist/viewer-lib/{dist-CfdxOCXD.js → dist-z-bwfT82.js} +3 -3
  246. package/dist/viewer-lib/document.js +5 -5
  247. package/dist/viewer-lib/{ebnfDiagram-PWID7BFC-D_zTzYMe.js → ebnfDiagram-PWID7BFC-qGnBb2Wm.js} +2 -2
  248. package/dist/viewer-lib/{el-GR-BZB4AONW-C8ktxGsL.js → el-GR-BZB4AONW-DSnRjCtl.js} +1 -1
  249. package/dist/viewer-lib/{en-B4ZKOASM-B3j3Q6gb.js → en-B4ZKOASM-lVIWk7ac.js} +1 -1
  250. package/dist/viewer-lib/{erDiagram-RLTQ6QDP-B3j_D6kc.js → erDiagram-RLTQ6QDP-IKBFQG5K.js} +7 -7
  251. package/dist/viewer-lib/{es-ES-U4NZUMDT-CbllhkGx.js → es-ES-U4NZUMDT-_CDMDD4F.js} +1 -1
  252. package/dist/viewer-lib/{eu-ES-A7QVB2H4-C5mvS9oG.js → eu-ES-A7QVB2H4-CK9AWUKJ.js} +1 -1
  253. package/dist/viewer-lib/{fa-IR-HGAKTJCU-yJeTcxrT.js → fa-IR-HGAKTJCU-oHnINZdD.js} +1 -1
  254. package/dist/viewer-lib/{fi-FI-Z5N7JZ37-C8q7mIIU.js → fi-FI-Z5N7JZ37-D9kRvIBR.js} +1 -1
  255. package/dist/viewer-lib/flowDiagram-HODETNUW-BMuFpAop.js +15 -0
  256. package/dist/viewer-lib/{fr-FR-RHASNOE6-CwWN3-B4.js → fr-FR-RHASNOE6-RuoumtdC.js} +1 -1
  257. package/dist/viewer-lib/{ganttDiagram-EL5Y4UJY-BJGo1mEA.js → ganttDiagram-EL5Y4UJY-DAQf3LUk.js} +1 -1
  258. package/dist/viewer-lib/{gl-ES-HMX3MZ6V-Dfg0EguH.js → gl-ES-HMX3MZ6V-fZkA6DcO.js} +1 -1
  259. package/dist/viewer-lib/{he-IL-6SHJWFNN-IOfOOjsf.js → he-IL-6SHJWFNN-CRIBqOQe.js} +1 -1
  260. package/dist/viewer-lib/{hi-IN-IWLTKZ5I-BNW_Aia8.js → hi-IN-IWLTKZ5I-iYdeSw6W.js} +1 -1
  261. package/dist/viewer-lib/{hu-HU-A5ZG7DT2-BPZ72S51.js → hu-HU-A5ZG7DT2-O7dn2ZvO.js} +1 -1
  262. package/dist/viewer-lib/{id-ID-SAP4L64H-LjNRsgYi.js → id-ID-SAP4L64H-DZUpRr3k.js} +1 -1
  263. package/dist/viewer-lib/{ids-DbFcmtFG.js → ids-DDz78ZZ5.js} +72 -22
  264. package/dist/viewer-lib/{image-GAAHSSAO-DIMI7P3j.js → image-GAAHSSAO-D3D0VxHl.js} +1 -1
  265. package/dist/viewer-lib/{index-fXOsDC5S.css → index-uM2HnLXF.css} +1 -1
  266. package/dist/viewer-lib/index.js +1896 -1473
  267. package/dist/viewer-lib/{infoDiagram-27XIBGKW-D-7It8iH.js → infoDiagram-27XIBGKW-VpUInxAN.js} +1 -1
  268. package/dist/viewer-lib/{ishikawaDiagram-5VMMS53U-4NW1zZ5d.js → ishikawaDiagram-5VMMS53U-CLAx_hd4.js} +1 -1
  269. package/dist/viewer-lib/{it-IT-JPQ66NNP-lkae78zz.js → it-IT-JPQ66NNP-N1SVq4Kf.js} +1 -1
  270. package/dist/viewer-lib/{ja-JP-DBVTYXUO-DSJgUCk4.js → ja-JP-DBVTYXUO-BJ6iK4sg.js} +1 -1
  271. package/dist/viewer-lib/{journeyDiagram-3NMN7TZE-Ck_v3x8c.js → journeyDiagram-3NMN7TZE-Du8gOAin.js} +1 -1
  272. package/dist/viewer-lib/{kaa-6HZHGXH3-CXdKMj_t.js → kaa-6HZHGXH3-Bg8IxuTS.js} +1 -1
  273. package/dist/viewer-lib/{kab-KAB-ZGHBKWFO-Bw0U_6pK.js → kab-KAB-ZGHBKWFO-Br7FocO9.js} +1 -1
  274. package/dist/viewer-lib/{kanban-definition-UXKFOSKX-9pX9dpsT.js → kanban-definition-UXKFOSKX-c46UnR8Y.js} +6 -6
  275. package/dist/viewer-lib/{kk-KZ-P5N5QNE5-dT0Kye5E.js → kk-KZ-P5N5QNE5-B0WjTRyE.js} +1 -1
  276. package/dist/viewer-lib/{km-KH-HSX4SM5Z-DaVMjrC7.js → km-KH-HSX4SM5Z-DnNzxCcS.js} +1 -1
  277. package/dist/viewer-lib/{ko-KR-MTYHY66A-B-K7_q_r.js → ko-KR-MTYHY66A-BZRP54dC.js} +1 -1
  278. package/dist/viewer-lib/{ku-TR-6OUDTVRD-BYF3kHvm.js → ku-TR-6OUDTVRD-BMIeWyzL.js} +1 -1
  279. package/dist/viewer-lib/{lt-LT-XHIRWOB4-DI2AXzl2.js → lt-LT-XHIRWOB4-04-gFdSJ.js} +1 -1
  280. package/dist/viewer-lib/{lv-LV-5QDEKY6T-bIcCCpnl.js → lv-LV-5QDEKY6T-DlqVzs3y.js} +1 -1
  281. package/dist/viewer-lib/{mindmap-definition-YA3MSWOX-C3q0FYg7.js → mindmap-definition-YA3MSWOX-jMy53g8S.js} +7 -7
  282. package/dist/viewer-lib/{mr-IN-CRQNXWMA-BFzjeYZq.js → mr-IN-CRQNXWMA-DXdi6erT.js} +1 -1
  283. package/dist/viewer-lib/{my-MM-5M5IBNSE-CmHNRqP_.js → my-MM-5M5IBNSE-Do72N-jI.js} +1 -1
  284. package/dist/viewer-lib/{nb-NO-T6EIAALU-BHQhH2Gx.js → nb-NO-T6EIAALU-B0qFpvlt.js} +1 -1
  285. package/dist/viewer-lib/{nl-NL-IS3SIHDZ-FlkqRnMN.js → nl-NL-IS3SIHDZ-n_5oUu5x.js} +1 -1
  286. package/dist/viewer-lib/{nn-NO-6E72VCQL-Hsc9tBx8.js → nn-NO-6E72VCQL-Ci0fgvEm.js} +1 -1
  287. package/dist/viewer-lib/{oc-FR-POXYY2M6-Bcp0CfMc.js → oc-FR-POXYY2M6-D6315qus.js} +1 -1
  288. package/dist/viewer-lib/{pa-IN-N4M65BXN-XWxsyVSe.js → pa-IN-N4M65BXN-DLsF-MSy.js} +1 -1
  289. package/dist/viewer-lib/{pegDiagram-XKGWAZYB-C8tGkfQ5.js → pegDiagram-XKGWAZYB-4E5lghKW.js} +2 -2
  290. package/dist/viewer-lib/percentages-BXMCSKIN-D56a3zuK.js +1 -0
  291. package/dist/viewer-lib/{pieDiagram-E7YTZNPT-D_-Lu_w8.js → pieDiagram-E7YTZNPT-BRsWumCr.js} +2 -2
  292. package/dist/viewer-lib/{pl-PL-T2D74RX3-DmM1I7cn.js → pl-PL-T2D74RX3-D6g1WO2L.js} +1 -1
  293. package/dist/viewer-lib/{prod-BgzfkEK3.js → prod-D4-YOarx.js} +61 -61
  294. package/dist/viewer-lib/{pt-BR-5N22H2LF-Dbeqvm3K.js → pt-BR-5N22H2LF-De9ZqiZt.js} +1 -1
  295. package/dist/viewer-lib/{pt-PT-UZXXM6DQ-CiWlgjj_.js → pt-PT-UZXXM6DQ-bvFL9xgb.js} +1 -1
  296. package/dist/viewer-lib/{quadrantDiagram-AXDQQJYC-_FnYeMs6.js → quadrantDiagram-AXDQQJYC-CDCVr6OV.js} +1 -1
  297. package/dist/viewer-lib/{railroadDiagram-O6MQD6OU-Bhl1v5MK.js → railroadDiagram-O6MQD6OU-BbmUBnHP.js} +2 -2
  298. package/dist/viewer-lib/{relayConnection-xbk3NnAF.js → relayConnection-CoSjRI7m.js} +2 -2
  299. package/dist/viewer-lib/{requirementDiagram-BXWQKSXE-DyY-XgN4.js → requirementDiagram-BXWQKSXE-DH_IL77u.js} +7 -7
  300. package/dist/viewer-lib/{ro-RO-JPDTUUEW-DoT3ggB-.js → ro-RO-JPDTUUEW-DyBQN9jJ.js} +1 -1
  301. package/dist/viewer-lib/{ru-RU-B4JR7IUQ-COv6rime.js → ru-RU-B4JR7IUQ-RPkQtq1M.js} +1 -1
  302. package/dist/viewer-lib/{sequenceDiagram-WJ2MYXX4-D9D4jp-f.js → sequenceDiagram-WJ2MYXX4-BHXcQvwI.js} +1 -1
  303. package/dist/viewer-lib/{si-LK-N5RQ5JYF-3-mBGNa3.js → si-LK-N5RQ5JYF-DKm5kI6t.js} +1 -1
  304. package/dist/viewer-lib/{sk-SK-C5VTKIMK-DsBfHLr2.js → sk-SK-C5VTKIMK-C8BNZ_z4.js} +1 -1
  305. package/dist/viewer-lib/{sl-SI-NN7IZMDC-DGy84pUC.js → sl-SI-NN7IZMDC-C7EcsjdC.js} +1 -1
  306. package/dist/viewer-lib/{stateDiagram-D77RDMKH-DrAYwoLV.js → stateDiagram-D77RDMKH-C5S2moZk.js} +9 -9
  307. package/dist/viewer-lib/{stateDiagram-v2-MP3YSRHH-iXMg-PXm.js → stateDiagram-v2-MP3YSRHH-B73yQ1JF.js} +8 -8
  308. package/dist/viewer-lib/{stylex-BP2Ddl4K.css → stylex-Bp5PFQ3Y.css} +24 -0
  309. package/dist/viewer-lib/subset-shared.chunk-DCu4qbrX.js +2 -0
  310. package/dist/viewer-lib/{subset-worker.chunk-CBjr046v.js → subset-worker.chunk-DCwZmdAE.js} +2 -2
  311. package/dist/viewer-lib/{sv-SE-XGPEYMSR-BPHpHMLE.js → sv-SE-XGPEYMSR-tSpO1TT1.js} +1 -1
  312. package/dist/viewer-lib/{swimlanes-42K2YHIH-CkAUGr6X.js → swimlanes-42K2YHIH-DdoBA9Zy.js} +7 -7
  313. package/dist/viewer-lib/{swimlanesDiagram-VR7AAH4N-BchsQSdU.js → swimlanesDiagram-VR7AAH4N-pCsGMXZp.js} +8 -8
  314. package/dist/viewer-lib/{ta-IN-2NMHFXQM-B6sbnaaC.js → ta-IN-2NMHFXQM-CiTQ5eGM.js} +1 -1
  315. package/dist/viewer-lib/{th-TH-HPSO5L25-BgjbLuUG.js → th-TH-HPSO5L25-DIDntmEY.js} +1 -1
  316. package/dist/viewer-lib/thumbnail.js +187 -0
  317. package/dist/viewer-lib/{timeline-definition-24CTP7MA-pimj04jh.js → timeline-definition-24CTP7MA-Cmb3--cA.js} +2 -2
  318. package/dist/viewer-lib/{tr-TR-DEFEU3FU-BqwTawlk.js → tr-TR-DEFEU3FU-C2bwgRCn.js} +1 -1
  319. package/dist/viewer-lib/types/src/shared/thumbnail.d.ts +15 -0
  320. package/dist/viewer-lib/types/src/viewer/components/ArtifactThumbnail.d.ts +4 -4
  321. package/dist/viewer-lib/types/src/viewer/components/Canvas.d.ts +4 -2
  322. package/dist/viewer-lib/types/src/viewer/components/DebugHud.d.ts +5 -0
  323. package/dist/viewer-lib/types/src/viewer/hooks/useBoardTiers.d.ts +26 -0
  324. package/dist/viewer-lib/types/src/viewer/hooks/usePanZoom.d.ts +5 -0
  325. package/dist/viewer-lib/types/src/viewer/lib/board-tiers.d.ts +33 -0
  326. package/dist/viewer-lib/types/src/viewer/lib/snapshot-store.d.ts +41 -0
  327. package/dist/viewer-lib/types/src/viewer/lib/tier-controller.d.ts +24 -0
  328. package/dist/viewer-lib/{uk-UA-QMV73CPH-W6wr6Y1K.js → uk-UA-QMV73CPH-B_RijIIa.js} +1 -1
  329. package/dist/viewer-lib/{useCloudHeader-BxH29VyW.js → useCloudHeader-DwNI6tTZ.js} +1 -1
  330. package/dist/viewer-lib/{vennDiagram-4TSXK5OY-DMldiPdY.js → vennDiagram-4TSXK5OY-CEPj2wGd.js} +1 -1
  331. package/dist/viewer-lib/{vi-VN-M7AON7JQ-DCUfHPYF.js → vi-VN-M7AON7JQ-B16g7ZvC.js} +1 -1
  332. package/dist/viewer-lib/{wardleyDiagram-VM6X3IG4-BhuYALPd.js → wardleyDiagram-VM6X3IG4-Dc_h8Kme.js} +1 -1
  333. package/dist/viewer-lib/{xychartDiagram-S5SC5T6Z-D_wi4_1A.js → xychartDiagram-S5SC5T6Z-DyK2CgN2.js} +4 -4
  334. package/dist/viewer-lib/{zh-CN-LNUGB5OW-CSjcioxA.js → zh-CN-LNUGB5OW-y7rJuDld.js} +1 -1
  335. package/dist/viewer-lib/{zh-HK-E62DVLB3-HEuVe1m-.js → zh-HK-E62DVLB3-Bl0BXOD2.js} +1 -1
  336. package/dist/viewer-lib/{zh-TW-RAJ6MFWO-BAZSWQdy.js → zh-TW-RAJ6MFWO-DKmDvUKo.js} +1 -1
  337. package/package.json +6 -2
  338. package/dist/viewer/ArtboardLayout-CHXhqE1c.js +0 -2
  339. package/dist/viewer/ArtifactList-CmxAlH3O.js +0 -1
  340. package/dist/viewer/Canvas-4QK6m2tO.js +0 -1
  341. package/dist/viewer/PreviewLayout-CjbFhb2n.js +0 -2
  342. package/dist/viewer/channel-Bz6_93Y3.js +0 -1
  343. package/dist/viewer/classDiagram-ZZMXUADV-D6ulFbrh.js +0 -1
  344. package/dist/viewer/classDiagram-v2-VYDZK3BY-D6ulFbrh.js +0 -1
  345. package/dist/viewer/flowDiagram-HODETNUW-Cbv2Ty_R.js +0 -1
  346. package/dist/viewer/percentages-BXMCSKIN-BT3SHPoe.js +0 -1
  347. package/dist/viewer/stateDiagram-v2-MP3YSRHH-BUUBvxaG.js +0 -1
  348. package/dist/viewer/subset-shared.chunk-CswfSP1a.js +0 -1
  349. package/dist/viewer/swimlanesDiagram-VR7AAH4N-FOfEeUNB.js +0 -8
  350. package/dist/viewer/view-DjPKr0yz.js +0 -1
  351. package/dist/viewer-lib/flowDiagram-HODETNUW-I2lqvun5.js +0 -15
  352. package/dist/viewer-lib/percentages-BXMCSKIN-D-7S_OLu.js +0 -1
  353. package/dist/viewer-lib/subset-shared.chunk-Dx5wrV6y.js +0 -2
  354. package/dist/viewer-lib/types/src/viewer/hooks/useVisibleBoards.d.ts +0 -4
package/dist/server.cjs CHANGED
@@ -95,13 +95,13 @@ var require_CSSStyleRule = __commonJS({
95
95
  CSSOM.CSSStyleRule.prototype.type = 1;
96
96
  Object.defineProperty(CSSOM.CSSStyleRule.prototype, "cssText", {
97
97
  get: function() {
98
- var text2;
98
+ var text3;
99
99
  if (this.selectorText) {
100
- text2 = this.selectorText + " {" + this.style.cssText + "}";
100
+ text3 = this.selectorText + " {" + this.style.cssText + "}";
101
101
  } else {
102
- text2 = "";
102
+ text3 = "";
103
103
  }
104
- return text2;
104
+ return text3;
105
105
  },
106
106
  set: function(cssText) {
107
107
  var rule = CSSOM.CSSStyleRule.parse(cssText);
@@ -659,9 +659,9 @@ var require_CSSValue = __commonJS({
659
659
  CSSOM.CSSValue.prototype = {
660
660
  constructor: CSSOM.CSSValue,
661
661
  // @see: http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue
662
- set cssText(text2) {
662
+ set cssText(text3) {
663
663
  var name = this._getConstructorName();
664
- throw new Error('DOMException: property "cssText" of "' + name + '" is readonly and can not be replaced with "' + text2 + '"!');
664
+ throw new Error('DOMException: property "cssText" of "' + name + '" is readonly and can not be replaced with "' + text3 + '"!');
665
665
  },
666
666
  get cssText() {
667
667
  var name = this._getConstructorName();
@@ -755,7 +755,7 @@ var require_CSSValueExpression = __commonJS({
755
755
  return ret;
756
756
  };
757
757
  CSSOM.CSSValueExpression.prototype._parseJSComment = function(token, idx) {
758
- var nextChar = token.charAt(idx + 1), text2;
758
+ var nextChar = token.charAt(idx + 1), text3;
759
759
  if (nextChar === "/" || nextChar === "*") {
760
760
  var startIdx = idx, endIdx, commentEndChar;
761
761
  if (nextChar === "/") {
@@ -766,10 +766,10 @@ var require_CSSValueExpression = __commonJS({
766
766
  endIdx = token.indexOf(commentEndChar, startIdx + 1 + 1);
767
767
  if (endIdx !== -1) {
768
768
  endIdx = endIdx + commentEndChar.length - 1;
769
- text2 = token.substring(idx, endIdx + 1);
769
+ text3 = token.substring(idx, endIdx + 1);
770
770
  return {
771
771
  idx: endIdx,
772
- text: text2
772
+ text: text3
773
773
  };
774
774
  } else {
775
775
  var error = "css expression error: unfinished comment in expression!";
@@ -782,14 +782,14 @@ var require_CSSValueExpression = __commonJS({
782
782
  }
783
783
  };
784
784
  CSSOM.CSSValueExpression.prototype._parseJSString = function(token, idx, sep) {
785
- var endIdx = this._findMatchedIdx(token, idx, sep), text2;
785
+ var endIdx = this._findMatchedIdx(token, idx, sep), text3;
786
786
  if (endIdx === -1) {
787
787
  return false;
788
788
  } else {
789
- text2 = token.substring(idx, endIdx + sep.length);
789
+ text3 = token.substring(idx, endIdx + sep.length);
790
790
  return {
791
791
  idx: endIdx,
792
- text: text2
792
+ text: text3
793
793
  };
794
794
  }
795
795
  };
@@ -839,7 +839,7 @@ var require_CSSValueExpression = __commonJS({
839
839
  endIdx = NOT_FOUND;
840
840
  break;
841
841
  } else {
842
- var text2 = token.substring(idx + 1, endIdx), matched = text2.match(/\\+$/);
842
+ var text3 = token.substring(idx + 1, endIdx), matched = text3.match(/\\+$/);
843
843
  if (!matched || matched[0] % 2 === 0) {
844
844
  break;
845
845
  } else {
@@ -1424,7 +1424,7 @@ var require_CSSStyleDeclaration = __commonJS({
1424
1424
  }
1425
1425
  return properties.join(" ");
1426
1426
  },
1427
- set cssText(text2) {
1427
+ set cssText(text3) {
1428
1428
  var i6, name;
1429
1429
  for (i6 = this.length; i6--; ) {
1430
1430
  name = this[i6];
@@ -1432,7 +1432,7 @@ var require_CSSStyleDeclaration = __commonJS({
1432
1432
  }
1433
1433
  Array.prototype.splice.call(this, 0, this.length);
1434
1434
  this._importants = {};
1435
- var dummyRule = CSSOM.parse("#bogus{" + text2 + "}").cssRules[0].style;
1435
+ var dummyRule = CSSOM.parse("#bogus{" + text3 + "}").cssRules[0].style;
1436
1436
  var length = dummyRule.length;
1437
1437
  for (i6 = 0; i6 < length; ++i6) {
1438
1438
  name = dummyRule[i6];
@@ -5931,10 +5931,10 @@ function registerCustomReaders(registry2) {
5931
5931
  registry2.registerReader("grid", (el2, ctx) => {
5932
5932
  const cells = [];
5933
5933
  for (const child of el2.children) if (child.tagName.toLowerCase() === "cell") {
5934
- const children = ctx.parseChildren(child);
5934
+ const children2 = ctx.parseChildren(child);
5935
5935
  cells.push({ root: {
5936
5936
  type: "root",
5937
- children,
5937
+ children: children2,
5938
5938
  direction: "ltr",
5939
5939
  format: "",
5940
5940
  indent: 0,
@@ -6478,15 +6478,15 @@ function registerCustomWriters(registry2) {
6478
6478
  registry2.registerWriter("footnote-section", (node) => {
6479
6479
  const n7 = node;
6480
6480
  const defs = n7.definitions ?? {};
6481
- const children = Object.entries(defs).map(([ref, text2]) => ({
6481
+ const children2 = Object.entries(defs).map(([ref, text3]) => ({
6482
6482
  tag: "def",
6483
6483
  attrs: { ref },
6484
- children: [text2]
6484
+ children: [text3]
6485
6485
  }));
6486
6486
  return {
6487
6487
  tag: "footnote-section",
6488
6488
  attrs: blockId(n7),
6489
- children
6489
+ children: children2
6490
6490
  };
6491
6491
  });
6492
6492
  registry2.registerWriter("gallery", (node) => {
@@ -6633,8 +6633,8 @@ var FORMAT_TAG_TO_BIT = {
6633
6633
  sup: 64,
6634
6634
  mark: 128
6635
6635
  };
6636
- function wrapWithFormatTags(text2, format) {
6637
- return wrapContentWithFormatTags([text2], format);
6636
+ function wrapWithFormatTags(text3, format) {
6637
+ return wrapContentWithFormatTags([text3], format);
6638
6638
  }
6639
6639
  function wrapContentWithFormatTags(content, format) {
6640
6640
  if (format === 0) return content;
@@ -6660,8 +6660,8 @@ var ESCAPE_MAP = {
6660
6660
  '"': "&quot;",
6661
6661
  "'": "&apos;"
6662
6662
  };
6663
- function escapeXml(text2) {
6664
- return text2.replaceAll(/["&'<>]/g, (ch) => ESCAPE_MAP[ch]);
6663
+ function escapeXml(text3) {
6664
+ return text3.replaceAll(/["&'<>]/g, (ch) => ESCAPE_MAP[ch]);
6665
6665
  }
6666
6666
  function buildAttrs(attrs) {
6667
6667
  return Object.entries(attrs).filter(([, v6]) => v6 !== void 0 && v6 !== "").map(([k5, v6]) => ` ${k5}="${escapeXml(v6)}"`).join("");
@@ -6924,10 +6924,10 @@ function parseFallbackNode(element) {
6924
6924
  version: 1
6925
6925
  };
6926
6926
  }
6927
- function makeTextNode(text2, format) {
6927
+ function makeTextNode(text3, format) {
6928
6928
  return {
6929
6929
  type: "text",
6930
- text: text2,
6930
+ text: text3,
6931
6931
  format,
6932
6932
  detail: 0,
6933
6933
  mode: "normal",
@@ -6936,10 +6936,10 @@ function makeTextNode(text2, format) {
6936
6936
  };
6937
6937
  }
6938
6938
  function serializeToXml(state, registry2, options = {}) {
6939
- const children = state.root.children ?? [];
6939
+ const children2 = state.root.children ?? [];
6940
6940
  const selectedBlockIds = options.selectedBlockIds;
6941
6941
  const ctx = createWriterContext(registry2);
6942
- const content = children.flatMap((child) => {
6942
+ const content = children2.flatMap((child) => {
6943
6943
  const result = ctx.serializeNode(child);
6944
6944
  const items = Array.isArray(result) ? result : [result];
6945
6945
  if (!selectedBlockIds?.size) return items;
@@ -7011,8 +7011,8 @@ function serializeSiblings(nodes, ctx) {
7011
7011
  }
7012
7012
  function createWriterContext(registry2) {
7013
7013
  const ctx = {
7014
- serializeChildren(children) {
7015
- return serializeSiblings(children, ctx);
7014
+ serializeChildren(children2) {
7015
+ return serializeSiblings(children2, ctx);
7016
7016
  },
7017
7017
  serializeNode(node) {
7018
7018
  const n7 = node;
@@ -8848,9 +8848,9 @@ var NodeWithChildren = class extends Node2 {
8848
8848
  /**
8849
8849
  * @param children Children of the node. Only certain node types can have children.
8850
8850
  */
8851
- constructor(children) {
8851
+ constructor(children2) {
8852
8852
  super();
8853
- this.children = children;
8853
+ this.children = children2;
8854
8854
  }
8855
8855
  // Aliases
8856
8856
  /** First child of the node. */
@@ -8869,8 +8869,8 @@ var NodeWithChildren = class extends Node2 {
8869
8869
  get childNodes() {
8870
8870
  return this.children;
8871
8871
  }
8872
- set childNodes(children) {
8873
- this.children = children;
8872
+ set childNodes(children2) {
8873
+ this.children = children2;
8874
8874
  }
8875
8875
  };
8876
8876
  var CDATA2 = class extends NodeWithChildren {
@@ -8897,8 +8897,8 @@ var Element = class extends NodeWithChildren {
8897
8897
  * @param attribs Object mapping attribute names to attribute values.
8898
8898
  * @param children Children of the node.
8899
8899
  */
8900
- constructor(name, attribs, children = [], type = name === "script" ? ElementType.Script : name === "style" ? ElementType.Style : ElementType.Tag) {
8901
- super(children);
8900
+ constructor(name, attribs, children2 = [], type = name === "script" ? ElementType.Script : name === "style" ? ElementType.Style : ElementType.Tag) {
8901
+ super(children2);
8902
8902
  this.name = name;
8903
8903
  this.attribs = attribs;
8904
8904
  this.type = type;
@@ -8957,9 +8957,9 @@ function cloneNode(node, recursive = false) {
8957
8957
  } else if (isComment(node)) {
8958
8958
  result = new Comment2(node.data);
8959
8959
  } else if (isTag2(node)) {
8960
- const children = recursive ? cloneChildren(node.children) : [];
8961
- const clone = new Element(node.name, { ...node.attribs }, children);
8962
- children.forEach((child) => child.parent = clone);
8960
+ const children2 = recursive ? cloneChildren(node.children) : [];
8961
+ const clone = new Element(node.name, { ...node.attribs }, children2);
8962
+ children2.forEach((child) => child.parent = clone);
8963
8963
  if (node.namespace != null) {
8964
8964
  clone.namespace = node.namespace;
8965
8965
  }
@@ -8971,14 +8971,14 @@ function cloneNode(node, recursive = false) {
8971
8971
  }
8972
8972
  result = clone;
8973
8973
  } else if (isCDATA(node)) {
8974
- const children = recursive ? cloneChildren(node.children) : [];
8975
- const clone = new CDATA2(children);
8976
- children.forEach((child) => child.parent = clone);
8974
+ const children2 = recursive ? cloneChildren(node.children) : [];
8975
+ const clone = new CDATA2(children2);
8976
+ children2.forEach((child) => child.parent = clone);
8977
8977
  result = clone;
8978
8978
  } else if (isDocument(node)) {
8979
- const children = recursive ? cloneChildren(node.children) : [];
8980
- const clone = new Document(children);
8981
- children.forEach((child) => child.parent = clone);
8979
+ const children2 = recursive ? cloneChildren(node.children) : [];
8980
+ const clone = new Document(children2);
8981
+ children2.forEach((child) => child.parent = clone);
8982
8982
  if (node["x-mode"]) {
8983
8983
  clone["x-mode"] = node["x-mode"];
8984
8984
  }
@@ -9002,12 +9002,12 @@ function cloneNode(node, recursive = false) {
9002
9002
  return result;
9003
9003
  }
9004
9004
  function cloneChildren(childs) {
9005
- const children = childs.map((child) => cloneNode(child, true));
9006
- for (let i6 = 1; i6 < children.length; i6++) {
9007
- children[i6].prev = children[i6 - 1];
9008
- children[i6 - 1].next = children[i6];
9005
+ const children2 = childs.map((child) => cloneNode(child, true));
9006
+ for (let i6 = 1; i6 < children2.length; i6++) {
9007
+ children2[i6].prev = children2[i6 - 1];
9008
+ children2[i6 - 1].next = children2[i6];
9009
9009
  }
9010
- return children;
9010
+ return children2;
9011
9011
  }
9012
9012
 
9013
9013
  // node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/lib/esm/index.js
@@ -9105,11 +9105,11 @@ var DomHandler = class {
9105
9105
  this.lastNode = null;
9106
9106
  }
9107
9107
  oncdatastart() {
9108
- const text2 = new Text2("");
9109
- const node = new CDATA2([text2]);
9108
+ const text3 = new Text2("");
9109
+ const node = new CDATA2([text3]);
9110
9110
  this.addNode(node);
9111
- text2.parent = node;
9112
- this.lastNode = text2;
9111
+ text3.parent = node;
9112
+ this.lastNode = text3;
9113
9113
  }
9114
9114
  oncdataend() {
9115
9115
  this.lastNode = null;
@@ -9665,7 +9665,7 @@ function encodeXML(str) {
9665
9665
  return ret + str.substr(lastIdx);
9666
9666
  }
9667
9667
  function getEscaper(regex, map) {
9668
- return function escape4(data) {
9668
+ return function escape5(data) {
9669
9669
  let match;
9670
9670
  let lastIdx = 0;
9671
9671
  let result = "";
@@ -10359,19 +10359,19 @@ function getAtomFeed(feedRoot) {
10359
10359
  type: "atom",
10360
10360
  items: getElementsByTagName("entry", childs).map((item) => {
10361
10361
  var _a5;
10362
- const { children } = item;
10363
- const entry = { media: getMediaElements(children) };
10364
- addConditionally(entry, "id", "id", children);
10365
- addConditionally(entry, "title", "title", children);
10366
- const href2 = (_a5 = getOneElement("link", children)) === null || _a5 === void 0 ? void 0 : _a5.attribs["href"];
10362
+ const { children: children2 } = item;
10363
+ const entry = { media: getMediaElements(children2) };
10364
+ addConditionally(entry, "id", "id", children2);
10365
+ addConditionally(entry, "title", "title", children2);
10366
+ const href2 = (_a5 = getOneElement("link", children2)) === null || _a5 === void 0 ? void 0 : _a5.attribs["href"];
10367
10367
  if (href2) {
10368
10368
  entry.link = href2;
10369
10369
  }
10370
- const description = fetch2("summary", children) || fetch2("content", children);
10370
+ const description = fetch2("summary", children2) || fetch2("content", children2);
10371
10371
  if (description) {
10372
10372
  entry.description = description;
10373
10373
  }
10374
- const pubDate = fetch2("updated", children);
10374
+ const pubDate = fetch2("updated", children2);
10375
10375
  if (pubDate) {
10376
10376
  entry.pubDate = new Date(pubDate);
10377
10377
  }
@@ -10399,13 +10399,13 @@ function getRssFeed(feedRoot) {
10399
10399
  type: feedRoot.name.substr(0, 3),
10400
10400
  id: "",
10401
10401
  items: getElementsByTagName("item", feedRoot.children).map((item) => {
10402
- const { children } = item;
10403
- const entry = { media: getMediaElements(children) };
10404
- addConditionally(entry, "id", "guid", children);
10405
- addConditionally(entry, "title", "title", children);
10406
- addConditionally(entry, "link", "link", children);
10407
- addConditionally(entry, "description", "description", children);
10408
- const pubDate = fetch2("pubDate", children) || fetch2("dc:date", children);
10402
+ const { children: children2 } = item;
10403
+ const entry = { media: getMediaElements(children2) };
10404
+ addConditionally(entry, "id", "guid", children2);
10405
+ addConditionally(entry, "title", "title", children2);
10406
+ addConditionally(entry, "link", "link", children2);
10407
+ addConditionally(entry, "description", "description", children2);
10408
+ const pubDate = fetch2("pubDate", children2) || fetch2("dc:date", children2);
10409
10409
  if (pubDate)
10410
10410
  entry.pubDate = new Date(pubDate);
10411
10411
  return entry;
@@ -10790,11 +10790,11 @@ var parseFromString = (document2, isHTML, markupLanguage) => {
10790
10790
  oncomment(data) {
10791
10791
  append2(node, document2.createComment(data), active);
10792
10792
  },
10793
- ontext(text2) {
10793
+ ontext(text3) {
10794
10794
  if (parsingCData) {
10795
- append2(node, document2.createCDATASection(text2), active);
10795
+ append2(node, document2.createCDATASection(text3), active);
10796
10796
  } else {
10797
- append2(node, document2.createTextNode(text2), active);
10797
+ append2(node, document2.createTextNode(text3), active);
10798
10798
  }
10799
10799
  },
10800
10800
  // #cdata
@@ -12476,10 +12476,10 @@ function render2(node, options = {}) {
12476
12476
  return output;
12477
12477
  }
12478
12478
  var dist_default = render2;
12479
- function renderChildren(children, options, xmlMode) {
12479
+ function renderChildren(children2, options, xmlMode) {
12480
12480
  let output = "";
12481
- for (let index = 0; index < children.length; index++) {
12482
- output += renderNode2(children[index], options, xmlMode);
12481
+ for (let index = 0; index < children2.length; index++) {
12482
+ output += renderNode2(children2[index], options, xmlMode);
12483
12483
  }
12484
12484
  return output;
12485
12485
  }
@@ -12522,15 +12522,15 @@ function renderTag2(element, options, xmlMode) {
12522
12522
  if (!xmlMode && foreignElements2.has(element.name)) {
12523
12523
  xmlMode = "foreign";
12524
12524
  }
12525
- const { name, children } = element;
12525
+ const { name, children: children2 } = element;
12526
12526
  const isVoid2 = !xmlMode && voidElements2.has(name);
12527
12527
  let tag = `<${name}${formatAttributes2(element.attribs, options, xmlMode)}`;
12528
- if (children.length === 0 && (xmlMode ? options.selfClosingTags !== false : options.selfClosingTags && isVoid2)) {
12528
+ if (children2.length === 0 && (xmlMode ? options.selfClosingTags !== false : options.selfClosingTags && isVoid2)) {
12529
12529
  tag += xmlMode ? "/>" : " />";
12530
12530
  } else {
12531
12531
  tag += ">";
12532
- if (children.length > 0) {
12533
- tag += renderChildren(children, options, xmlMode);
12532
+ if (children2.length > 0) {
12533
+ tag += renderChildren(children2, options, xmlMode);
12534
12534
  }
12535
12535
  if (!isVoid2) {
12536
12536
  tag += `</${name}>`;
@@ -12607,19 +12607,19 @@ function getAtomFeed2(feedRoot) {
12607
12607
  const feed = {
12608
12608
  type: "atom",
12609
12609
  items: getElementsByTagName2("entry", childs).map((item) => {
12610
- const { children } = item;
12611
- const entry = { media: getMediaElements2(children) };
12612
- addConditionally2(entry, "id", "id", children);
12613
- addConditionally2(entry, "title", "title", children);
12614
- const href2 = getOneElement2("link", children)?.attribs["href"];
12610
+ const { children: children2 } = item;
12611
+ const entry = { media: getMediaElements2(children2) };
12612
+ addConditionally2(entry, "id", "id", children2);
12613
+ addConditionally2(entry, "title", "title", children2);
12614
+ const href2 = getOneElement2("link", children2)?.attribs["href"];
12615
12615
  if (href2) {
12616
12616
  entry.link = href2;
12617
12617
  }
12618
- const description = fetch3("summary", children) || fetch3("content", children);
12618
+ const description = fetch3("summary", children2) || fetch3("content", children2);
12619
12619
  if (description) {
12620
12620
  entry.description = description;
12621
12621
  }
12622
- const pubDate = fetch3("updated", children);
12622
+ const pubDate = fetch3("updated", children2);
12623
12623
  if (pubDate) {
12624
12624
  entry.pubDate = new Date(pubDate);
12625
12625
  }
@@ -12646,13 +12646,13 @@ function getRssFeed2(feedRoot) {
12646
12646
  type: feedRoot.name.substr(0, 3),
12647
12647
  id: "",
12648
12648
  items: getElementsByTagName2("item", feedRoot.children).map((item) => {
12649
- const { children } = item;
12650
- const entry = { media: getMediaElements2(children) };
12651
- addConditionally2(entry, "id", "guid", children);
12652
- addConditionally2(entry, "title", "title", children);
12653
- addConditionally2(entry, "link", "link", children);
12654
- addConditionally2(entry, "description", "description", children);
12655
- const pubDate = fetch3("pubDate", children) || fetch3("dc:date", children);
12649
+ const { children: children2 } = item;
12650
+ const entry = { media: getMediaElements2(children2) };
12651
+ addConditionally2(entry, "id", "guid", children2);
12652
+ addConditionally2(entry, "title", "title", children2);
12653
+ addConditionally2(entry, "link", "link", children2);
12654
+ addConditionally2(entry, "description", "description", children2);
12655
+ const pubDate = fetch3("pubDate", children2) || fetch3("dc:date", children2);
12656
12656
  if (pubDate)
12657
12657
  entry.pubDate = new Date(pubDate);
12658
12658
  return entry;
@@ -12708,10 +12708,10 @@ function getOneElement2(tagName19, node) {
12708
12708
  function fetch3(tagName19, where, recurse = false) {
12709
12709
  return textContent2(getElementsByTagName2(tagName19, where, recurse, 1)).trim();
12710
12710
  }
12711
- function addConditionally2(object2, property2, tagName19, where, recurse = false) {
12711
+ function addConditionally2(object3, property2, tagName19, where, recurse = false) {
12712
12712
  const value = fetch3(tagName19, where, recurse);
12713
12713
  if (value)
12714
- object2[property2] = value;
12714
+ object3[property2] = value;
12715
12715
  }
12716
12716
  function isValidFeed2(value) {
12717
12717
  return value === "rss" || value === "feed" || value === "rdf:RDF";
@@ -12825,12 +12825,12 @@ function replaceElement2(element, replacement) {
12825
12825
  }
12826
12826
  replacement.parent = element.parent;
12827
12827
  if (replacement.parent) {
12828
- const { children } = replacement.parent;
12829
- const elementIndex = children.lastIndexOf(element);
12828
+ const { children: children2 } = replacement.parent;
12829
+ const elementIndex = children2.lastIndexOf(element);
12830
12830
  if (elementIndex === -1) {
12831
12831
  return;
12832
12832
  }
12833
- children[elementIndex] = replacement;
12833
+ children2[elementIndex] = replacement;
12834
12834
  element.parent = null;
12835
12835
  }
12836
12836
  }
@@ -13129,9 +13129,9 @@ function findAll3(query2, nodes, options) {
13129
13129
  result.push(element);
13130
13130
  }
13131
13131
  if (xmlMode || adapter2.getName(element) !== "template") {
13132
- const children = adapter2.getChildren(element);
13133
- if (children.length > 0) {
13134
- nodeStack.unshift(children);
13132
+ const children2 = adapter2.getChildren(element);
13133
+ if (children2.length > 0) {
13134
+ nodeStack.unshift(children2);
13135
13135
  indexStack.unshift(0);
13136
13136
  }
13137
13137
  }
@@ -13158,9 +13158,9 @@ function findOne3(query2, nodes, options) {
13158
13158
  return element;
13159
13159
  }
13160
13160
  if (xmlMode || adapter2.getName(element) !== "template") {
13161
- const children = adapter2.getChildren(element);
13162
- if (children.length > 0) {
13163
- nodeStack.unshift(children);
13161
+ const children2 = adapter2.getChildren(element);
13162
+ if (children2.length > 0) {
13163
+ nodeStack.unshift(children2);
13164
13164
  indexStack.unshift(0);
13165
13165
  }
13166
13166
  }
@@ -13258,23 +13258,23 @@ function parse2(formula) {
13258
13258
  let index = 0;
13259
13259
  let a5 = 0;
13260
13260
  let sign = readSign();
13261
- let number = readNumber();
13261
+ let number2 = readNumber();
13262
13262
  if (index < formula.length && formula.charAt(index) === "n") {
13263
13263
  index++;
13264
- a5 = sign * (number ?? 1);
13264
+ a5 = sign * (number2 ?? 1);
13265
13265
  skipWhitespace();
13266
13266
  if (index < formula.length) {
13267
13267
  sign = readSign();
13268
13268
  skipWhitespace();
13269
- number = readNumber();
13269
+ number2 = readNumber();
13270
13270
  } else {
13271
- sign = number = 0;
13271
+ sign = number2 = 0;
13272
13272
  }
13273
13273
  }
13274
- if (number === null || index < formula.length) {
13274
+ if (number2 === null || index < formula.length) {
13275
13275
  throw new Error(`n-th rule couldn't be parsed ('${formula}')`);
13276
13276
  }
13277
- return [a5, sign * number];
13277
+ return [a5, sign * number2];
13278
13278
  function readSign() {
13279
13279
  switch (formula.charAt(index)) {
13280
13280
  case "-": {
@@ -13410,12 +13410,12 @@ function compileNth(reverse, ofType) {
13410
13410
  };
13411
13411
  }
13412
13412
  var filters = {
13413
- contains(next, text2, options) {
13413
+ contains(next, text3, options) {
13414
13414
  const { getText: getText4 } = options.adapter;
13415
- return cacheParentResults(next, options, (element) => getText4(element).includes(text2));
13415
+ return cacheParentResults(next, options, (element) => getText4(element).includes(text3));
13416
13416
  },
13417
- icontains(next, text2, options) {
13418
- const itext = text2.toLowerCase();
13417
+ icontains(next, text3, options) {
13418
+ const itext = text3.toLowerCase();
13419
13419
  const { getText: getText4 } = options.adapter;
13420
13420
  return cacheParentResults(next, options, (element) => getText4(element).toLowerCase().includes(itext));
13421
13421
  },
@@ -13477,11 +13477,11 @@ function dynamicStatePseudo(name) {
13477
13477
  var isDocumentWhiteSpace = /^[ \t\r\n]*$/;
13478
13478
  var pseudos = {
13479
13479
  empty(element, { adapter: adapter2 }) {
13480
- const children = adapter2.getChildren(element);
13480
+ const children2 = adapter2.getChildren(element);
13481
13481
  return (
13482
13482
  // First, make sure the tag does not have any element children.
13483
- children.every((element2) => !adapter2.isTag(element2)) && // Then, check that the text content is only whitespace.
13484
- children.every((element2) => (
13483
+ children2.every((element2) => !adapter2.isTag(element2)) && // Then, check that the text content is only whitespace.
13484
+ children2.every((element2) => (
13485
13485
  // FIXME: `getText` call is potentially expensive.
13486
13486
  isDocumentWhiteSpace.test(adapter2.getText(element2))
13487
13487
  ))
@@ -14079,24 +14079,24 @@ var Text4 = class _Text extends CharacterData {
14079
14079
  super(ownerDocument, "#text", TEXT_NODE, data);
14080
14080
  }
14081
14081
  get wholeText() {
14082
- const text2 = [];
14082
+ const text3 = [];
14083
14083
  let { previousSibling: previousSibling2, nextSibling: nextSibling2 } = this;
14084
14084
  while (previousSibling2) {
14085
14085
  if (previousSibling2.nodeType === TEXT_NODE)
14086
- text2.unshift(previousSibling2[VALUE]);
14086
+ text3.unshift(previousSibling2[VALUE]);
14087
14087
  else
14088
14088
  break;
14089
14089
  previousSibling2 = previousSibling2.previousSibling;
14090
14090
  }
14091
- text2.push(this[VALUE]);
14091
+ text3.push(this[VALUE]);
14092
14092
  while (nextSibling2) {
14093
14093
  if (nextSibling2.nodeType === TEXT_NODE)
14094
- text2.push(nextSibling2[VALUE]);
14094
+ text3.push(nextSibling2[VALUE]);
14095
14095
  else
14096
14096
  break;
14097
14097
  nextSibling2 = nextSibling2.nextSibling;
14098
14098
  }
14099
- return text2.join("");
14099
+ return text3.join("");
14100
14100
  }
14101
14101
  cloneNode() {
14102
14102
  const { ownerDocument, [VALUE]: data } = this;
@@ -14140,13 +14140,13 @@ var ParentNode = class extends Node3 {
14140
14140
  return childNodes;
14141
14141
  }
14142
14142
  get children() {
14143
- const children = new NodeList();
14143
+ const children2 = new NodeList();
14144
14144
  let { firstElementChild } = this;
14145
14145
  while (firstElementChild) {
14146
- children.push(firstElementChild);
14146
+ children2.push(firstElementChild);
14147
14147
  firstElementChild = nextElementSibling2(firstElementChild);
14148
14148
  }
14149
- return children;
14149
+ return children2;
14150
14150
  }
14151
14151
  /**
14152
14152
  * @returns {NodeStruct | null}
@@ -14895,36 +14895,36 @@ var Element2 = class extends ParentNode {
14895
14895
  // </specialGetters>
14896
14896
  // <contentRelated>
14897
14897
  get innerText() {
14898
- const text2 = [];
14898
+ const text3 = [];
14899
14899
  let { [NEXT]: next, [END]: end } = this;
14900
14900
  while (next !== end) {
14901
14901
  if (next.nodeType === TEXT_NODE) {
14902
- text2.push(next.textContent.replace(/\s+/g, " "));
14903
- } else if (text2.length && next[NEXT] != end && BLOCK_ELEMENTS.has(next.tagName)) {
14904
- text2.push("\n");
14902
+ text3.push(next.textContent.replace(/\s+/g, " "));
14903
+ } else if (text3.length && next[NEXT] != end && BLOCK_ELEMENTS.has(next.tagName)) {
14904
+ text3.push("\n");
14905
14905
  }
14906
14906
  next = next[NEXT];
14907
14907
  }
14908
- return text2.join("");
14908
+ return text3.join("");
14909
14909
  }
14910
14910
  /**
14911
14911
  * @returns {String}
14912
14912
  */
14913
14913
  get textContent() {
14914
- const text2 = [];
14914
+ const text3 = [];
14915
14915
  let { [NEXT]: next, [END]: end } = this;
14916
14916
  while (next !== end) {
14917
14917
  const nodeType = next.nodeType;
14918
14918
  if (nodeType === TEXT_NODE || nodeType === CDATA_SECTION_NODE)
14919
- text2.push(next.textContent);
14919
+ text3.push(next.textContent);
14920
14920
  next = next[NEXT];
14921
14921
  }
14922
- return text2.join("");
14922
+ return text3.join("");
14923
14923
  }
14924
- set textContent(text2) {
14924
+ set textContent(text3) {
14925
14925
  this.replaceChildren();
14926
- if (text2 != null && text2 !== "")
14927
- this.appendChild(new Text4(this.ownerDocument, text2));
14926
+ if (text3 != null && text3 !== "")
14927
+ this.appendChild(new Text4(this.ownerDocument, text3));
14928
14928
  }
14929
14929
  get innerHTML() {
14930
14930
  return getInnerHtml(this);
@@ -15104,8 +15104,8 @@ var Element2 = class extends ParentNode {
15104
15104
  insertAdjacentHTML(position, html) {
15105
15105
  this.insertAdjacentElement(position, htmlToFragment(this.ownerDocument, html));
15106
15106
  }
15107
- insertAdjacentText(position, text2) {
15108
- const node = this.ownerDocument.createTextNode(text2);
15107
+ insertAdjacentText(position, text3) {
15108
+ const node = this.ownerDocument.createTextNode(text3);
15109
15109
  this.insertAdjacentElement(position, node);
15110
15110
  }
15111
15111
  // </insertAdjacent>
@@ -16434,16 +16434,16 @@ var HTMLSelectElement = class extends HTMLElement {
16434
16434
  super(ownerDocument, localName);
16435
16435
  }
16436
16436
  get options() {
16437
- let children = new NodeList();
16437
+ let children2 = new NodeList();
16438
16438
  let { firstElementChild } = this;
16439
16439
  while (firstElementChild) {
16440
16440
  if (firstElementChild.tagName === "OPTGROUP")
16441
- children.push(...firstElementChild.children);
16441
+ children2.push(...firstElementChild.children);
16442
16442
  else
16443
- children.push(firstElementChild);
16443
+ children2.push(firstElementChild);
16444
16444
  firstElementChild = firstElementChild.nextElementSibling;
16445
16445
  }
16446
- return children;
16446
+ return children2;
16447
16447
  }
16448
16448
  /* c8 ignore start */
16449
16449
  get disabled() {
@@ -17814,7 +17814,7 @@ var serializeDocument = (state) => `${serializeToXml(state, registry, { compact:
17814
17814
  `;
17815
17815
  function stampBlockIds(state) {
17816
17816
  const seen = /* @__PURE__ */ new Set();
17817
- const children = state.root.children.map((block) => {
17817
+ const children2 = state.root.children.map((block) => {
17818
17818
  const id2 = block.$?.blockId;
17819
17819
  if (id2 && !seen.has(id2)) {
17820
17820
  seen.add(id2);
@@ -17825,7 +17825,7 @@ function stampBlockIds(state) {
17825
17825
  seen.add(fresh);
17826
17826
  return { ...block, $: { ...block.$, blockId: fresh } };
17827
17827
  });
17828
- return { ...state, root: { ...state.root, children } };
17828
+ return { ...state, root: { ...state.root, children: children2 } };
17829
17829
  }
17830
17830
  var BOX_LINE = /[\u2500-\u257F]/;
17831
17831
  var TOP_LEFT = /[┌╭╔┏]/g;
@@ -17850,8 +17850,8 @@ var documentAnchors = {
17850
17850
  same: (a5, b6) => a5.blockId === b6.blockId && a5.quote === b6.quote,
17851
17851
  missing: "a new thread needs anchor.blockId; dropped it"
17852
17852
  };
17853
- function parseComments(text2) {
17854
- const raw = JSON.parse(text2);
17853
+ function parseComments(text3) {
17854
+ const raw = JSON.parse(text3);
17855
17855
  if (!isObject(raw)) throw new Error("comments.json must be an object");
17856
17856
  if (!Array.isArray(raw.threads)) throw new Error("threads must be an array");
17857
17857
  raw.threads.forEach((thread, i6) => {
@@ -17956,8 +17956,8 @@ var updateHumanMessage = (thread, messageId, update2) => ({
17956
17956
  ...thread,
17957
17957
  messages: thread.messages.map((m11) => m11.id === messageId && m11.author === "human" && !m11.deleted ? update2(m11) : m11)
17958
17958
  });
17959
- function openThread(anchor, author, text2, now, newId, who) {
17960
- return { id: newId(), anchor, status: "open", statusAt: now, statusBy: author, messages: [{ id: newId(), author, ...personOf(who), text: text2, at: now }] };
17959
+ function openThread(anchor, author, text3, now, newId, who) {
17960
+ return { id: newId(), anchor, status: "open", statusAt: now, statusBy: author, messages: [{ id: newId(), author, ...personOf(who), text: text3, at: now }] };
17961
17961
  }
17962
17962
  function applyHumanOp(file, op, now, newId, who) {
17963
17963
  if (op.op === "create") return { ...file, threads: [...file.threads, openThread({ blockId: op.blockId, quote: op.quote }, "human", op.text, now, newId, who)] };
@@ -18154,13 +18154,13 @@ var STICKY_FONT_SIZE = 18;
18154
18154
  var STICKY_LINE_H = 27;
18155
18155
  var STICKY_PAD = 16;
18156
18156
  var isWide = (code) => code >= 11904;
18157
- function textWidth(text2, fontSize) {
18157
+ function textWidth(text3, fontSize) {
18158
18158
  let width = 0;
18159
- for (const char of text2) width += fontSize * (isWide(char.codePointAt(0)) ? 1 : 0.56);
18159
+ for (const char of text3) width += fontSize * (isWide(char.codePointAt(0)) ? 1 : 0.56);
18160
18160
  return width;
18161
18161
  }
18162
- function wrappedLines(text2, fontSize, maxWidth) {
18163
- return text2.split("\n").reduce((lines, paragraph) => lines + Math.max(1, Math.ceil(textWidth(paragraph, fontSize) / maxWidth)), 0);
18162
+ function wrappedLines(text3, fontSize, maxWidth) {
18163
+ return text3.split("\n").reduce((lines, paragraph) => lines + Math.max(1, Math.ceil(textWidth(paragraph, fontSize) / maxWidth)), 0);
18164
18164
  }
18165
18165
  function groupFrame(group, boards) {
18166
18166
  const members = group.boards.map((id2) => boards[id2]).filter((b6) => Boolean(b6));
@@ -18191,8 +18191,8 @@ function noteRect(note) {
18191
18191
  }
18192
18192
  return { x: note.x, y: note.y, w: note.w, h: wrappedLines(note.text, size, note.w) * lineH };
18193
18193
  }
18194
- function extend(bounds, rect) {
18195
- const next = { minX: rect.x, minY: rect.y, maxX: rect.x + rect.w, maxY: rect.y + rect.h };
18194
+ function extend(bounds, rect2) {
18195
+ const next = { minX: rect2.x, minY: rect2.y, maxX: rect2.x + rect2.w, maxY: rect2.y + rect2.h };
18196
18196
  if (!bounds) return next;
18197
18197
  return {
18198
18198
  minX: Math.min(bounds.minX, next.minX),
@@ -18212,16 +18212,16 @@ function computeLayout(canvas) {
18212
18212
  for (const [id2, group] of Object.entries(canvas.groups ?? {})) {
18213
18213
  const frame = groupFrame(group, canvas.boards);
18214
18214
  if (!frame) continue;
18215
- const { page, ...rect } = frame;
18215
+ const { page, ...rect2 } = frame;
18216
18216
  const layout = pageOf(page);
18217
- layout.groups[id2] = rect;
18218
- layout.bounds = extend(layout.bounds, rect);
18217
+ layout.groups[id2] = rect2;
18218
+ layout.bounds = extend(layout.bounds, rect2);
18219
18219
  }
18220
18220
  for (const [id2, note] of Object.entries(canvas.notes ?? {})) {
18221
- const rect = noteRect(note);
18221
+ const rect2 = noteRect(note);
18222
18222
  const layout = pageOf(note.page);
18223
- layout.notes[id2] = rect;
18224
- layout.bounds = extend(layout.bounds, rect);
18223
+ layout.notes[id2] = rect2;
18224
+ layout.bounds = extend(layout.bounds, rect2);
18225
18225
  }
18226
18226
  return { pages };
18227
18227
  }
@@ -18359,16 +18359,16 @@ function validateCanvas(raw, fileExists, options = {}) {
18359
18359
  warnings.push(`note "${id2}" uses unknown page "${note.page}"`);
18360
18360
  continue;
18361
18361
  }
18362
- const rect = noteRect(note);
18362
+ const rect2 = noteRect(note);
18363
18363
  if (note.kind === "title") {
18364
18364
  for (const [gid, frame] of frames) {
18365
- if (frame && frame.page === note.page && intersects(rect, frame)) {
18365
+ if (frame && frame.page === note.page && intersects(rect2, frame)) {
18366
18366
  warnings.push(`title "${id2}" overlaps group "${gid}"`);
18367
18367
  }
18368
18368
  }
18369
18369
  } else {
18370
18370
  for (const [bid, board] of boards) {
18371
- if (board.page === note.page && intersects(rect, board)) warnings.push(`sticky "${id2}" covers board "${bid}"`);
18371
+ if (board.page === note.page && intersects(rect2, board)) warnings.push(`sticky "${id2}" covers board "${bid}"`);
18372
18372
  }
18373
18373
  }
18374
18374
  }
@@ -18415,14 +18415,14 @@ var resolveHtmlFile = (artifactDir, relative) => resolveFileWithin(artifactDir,
18415
18415
 
18416
18416
  // src/server/state.ts
18417
18417
  function readRaw(boardDir) {
18418
- let text2;
18418
+ let text3;
18419
18419
  try {
18420
- text2 = import_node_fs6.default.readFileSync(import_node_path6.default.join(boardDir, "canvas.json"), "utf8");
18420
+ text3 = import_node_fs6.default.readFileSync(import_node_path6.default.join(boardDir, "canvas.json"), "utf8");
18421
18421
  } catch {
18422
18422
  return { warning: "canvas.json not found" };
18423
18423
  }
18424
18424
  try {
18425
- return { raw: JSON.parse(text2) };
18425
+ return { raw: JSON.parse(text3) };
18426
18426
  } catch (err) {
18427
18427
  return { warning: `canvas.json is not valid JSON: ${err.message}` };
18428
18428
  }
@@ -18591,22 +18591,22 @@ function createStore(file, rules, names = noNames, now = () => (/* @__PURE__ */
18591
18591
  lastSeen = import_node_fs8.default.readFileSync(file, "utf8");
18592
18592
  };
18593
18593
  const sync = () => {
18594
- let text2;
18594
+ let text3;
18595
18595
  try {
18596
- text2 = import_node_fs8.default.readFileSync(file, "utf8");
18596
+ text3 = import_node_fs8.default.readFileSync(file, "utf8");
18597
18597
  } catch {
18598
18598
  return false;
18599
18599
  }
18600
- if (text2 === lastSeen) return false;
18601
- lastSeen = text2;
18600
+ if (text3 === lastSeen) return false;
18601
+ lastSeen = text3;
18602
18602
  try {
18603
- const incoming = parseComments(text2);
18603
+ const incoming = parseComments(text3);
18604
18604
  const base = loaded ? current : rules.saved(incoming);
18605
18605
  const merged = rules.merge(base, incoming, "agent", now(), newId, names.agent());
18606
18606
  current = merged.file;
18607
18607
  warnings = merged.warnings;
18608
18608
  if (`${JSON.stringify(current, null, 2)}
18609
- ` !== text2) write();
18609
+ ` !== text3) write();
18610
18610
  } catch (err) {
18611
18611
  warnings = [`comments.json is not valid: ${err.message} (left as written; fix it)`];
18612
18612
  }
@@ -20100,9 +20100,9 @@ function $handleTextMutation(target, node, editor) {
20100
20100
  anchorOffset = domSelectionPoints.anchorOffset;
20101
20101
  focusOffset = domSelectionPoints.focusOffset;
20102
20102
  }
20103
- const text2 = target.nodeValue;
20104
- if (text2 !== null) {
20105
- $updateTextNodeFromDOMContent(node, text2, anchorOffset, focusOffset, false);
20103
+ const text3 = target.nodeValue;
20104
+ if (text3 !== null) {
20105
+ $updateTextNodeFromDOMContent(node, text3, anchorOffset, focusOffset, false);
20106
20106
  }
20107
20107
  }
20108
20108
  function shouldUpdateTextNodeFromMutation(selection, targetDOM, targetNode) {
@@ -21781,8 +21781,8 @@ function $destroyNode(key2, parentDOM) {
21781
21781
  }
21782
21782
  activeEditor$1._keyToDOMMap.delete(key2);
21783
21783
  if ($isElementNode(node)) {
21784
- const children = $createChildrenArray(node, activePrevNodeMap);
21785
- $destroyChildren(children, 0, children.length - 1, null);
21784
+ const children2 = $createChildrenArray(node, activePrevNodeMap);
21785
+ $destroyChildren(children2, 0, children2.length - 1, null);
21786
21786
  }
21787
21787
  if (node !== void 0) {
21788
21788
  for (const slotKey of $readSlots(node).values()) {
@@ -21795,9 +21795,9 @@ function $destroyNode(key2, parentDOM) {
21795
21795
  setMutatedNode(mutatedNodes, activeEditorNodes, activeMutationListeners, node, "destroyed");
21796
21796
  }
21797
21797
  }
21798
- function $destroyChildren(children, _startIndex, endIndex, dom) {
21798
+ function $destroyChildren(children2, _startIndex, endIndex, dom) {
21799
21799
  for (let startIndex = _startIndex; startIndex <= endIndex; ++startIndex) {
21800
- const child = children[startIndex];
21800
+ const child = children2[startIndex];
21801
21801
  if (child !== void 0) {
21802
21802
  $destroyNode(child, dom);
21803
21803
  }
@@ -22024,8 +22024,8 @@ function $createNode(key2, slot) {
22024
22024
  } else {
22025
22025
  const outerBefore = subTreeTextContent;
22026
22026
  const endIndex = childrenSize - 1;
22027
- const children = $createChildrenArray(node, activeNextNodeMap);
22028
- $createChildren(children, node, 0, endIndex, $getDOMSlot(node, dom, activeEditor$1));
22027
+ const children2 = $createChildrenArray(node, activeNextNodeMap);
22028
+ $createChildren(children2, node, 0, endIndex, $getDOMSlot(node, dom, activeEditor$1));
22029
22029
  if (slotTextContent !== "") {
22030
22030
  const childText = dom.__lexicalTextContent || "";
22031
22031
  dom.__lexicalTextContent = slotTextContent + childText;
@@ -22044,7 +22044,7 @@ function $createNode(key2, slot) {
22044
22044
  $reconcileDecoratorBoundaryAnchors(node, dom);
22045
22045
  }
22046
22046
  } else {
22047
- const text2 = node.getTextContent();
22047
+ const text3 = node.getTextContent();
22048
22048
  if ($isDecoratorNode(node)) {
22049
22049
  const decorator = node.decorate(activeEditor$1, activeEditorConfig);
22050
22050
  if (decorator !== null) {
@@ -22056,7 +22056,7 @@ function $createNode(key2, slot) {
22056
22056
  $mountSlotChildren(node, dom, slots);
22057
22057
  }
22058
22058
  }
22059
- subTreeTextContent += text2;
22059
+ subTreeTextContent += text3;
22060
22060
  }
22061
22061
  if (slot !== null) {
22062
22062
  slot.insertChild(dom);
@@ -22069,7 +22069,7 @@ function $createNode(key2, slot) {
22069
22069
  setMutatedNode(mutatedNodes, activeEditorNodes, activeMutationListeners, node, "created");
22070
22070
  return dom;
22071
22071
  }
22072
- function $createChildren(children, element, _startIndex, endIndex, slot) {
22072
+ function $createChildren(children2, element, _startIndex, endIndex, slot) {
22073
22073
  const previousSubTreeTextContent = subTreeTextContent;
22074
22074
  const outerSaved = $beginCaptureGuard();
22075
22075
  subTreeTextContent = "";
@@ -22079,8 +22079,8 @@ function $createChildren(children, element, _startIndex, endIndex, slot) {
22079
22079
  let startIndex = _startIndex;
22080
22080
  for (; startIndex <= endIndex; ++startIndex) {
22081
22081
  const saved = $beginCaptureGuard();
22082
- $createNode(children[startIndex], slot);
22083
- const node = activeNextNodeMap.get(children[startIndex]);
22082
+ $createNode(children2[startIndex], slot);
22083
+ const node = activeNextNodeMap.get(children2[startIndex]);
22084
22084
  if (node !== null && $isTextNode(node)) {
22085
22085
  if (subTreeTextFormat === null) {
22086
22086
  subTreeTextFormat = node.getFormat();
@@ -22335,18 +22335,18 @@ function $tryReconcileSuffixWithSizeDelta(prevElement, nextElement, slot, cacheD
22335
22335
  if (node === void 0) {
22336
22336
  return false;
22337
22337
  }
22338
- let text2;
22338
+ let text3;
22339
22339
  if ($isElementNode(node)) {
22340
22340
  const childKeyedDom = activeEditor$1._keyToDOMMap.get(nextSuffixKeys[i6]);
22341
22341
  const cached = childKeyedDom && childKeyedDom.__lexicalTextContent;
22342
22342
  if (!(typeof cached === "string")) {
22343
22343
  formatDevErrorMessage(`tryReconcileSuffixWithSizeDelta: missing __lexicalTextContent on child of type ${node.getType()} after suffix reconcile`);
22344
22344
  }
22345
- text2 = cached;
22345
+ text3 = cached;
22346
22346
  } else {
22347
- text2 = node.getTextContent();
22347
+ text3 = node.getTextContent();
22348
22348
  }
22349
- newSuffix += text2;
22349
+ newSuffix += text3;
22350
22350
  if (i6 < k5 - 1 && $isElementNode(node) && !node.isInline()) {
22351
22351
  newSuffix += DOUBLE_LINE_BREAK;
22352
22352
  }
@@ -22452,18 +22452,18 @@ function $reconcileChildren(prevElement, nextElement, slot) {
22452
22452
  if (node === void 0) {
22453
22453
  break;
22454
22454
  }
22455
- let text2;
22455
+ let text3;
22456
22456
  if ($isElementNode(node)) {
22457
22457
  const childKeyedDom = activeEditor$1._keyToDOMMap.get(cur);
22458
22458
  const cached = childKeyedDom && childKeyedDom.__lexicalTextContent;
22459
22459
  if (!(typeof cached === "string")) {
22460
22460
  formatDevErrorMessage(`reconcileChildren same-size suffix: missing __lexicalTextContent on child of type ${node.getType()} after reconcile`);
22461
22461
  }
22462
- text2 = cached;
22462
+ text3 = cached;
22463
22463
  } else {
22464
- text2 = node.getTextContent();
22464
+ text3 = node.getTextContent();
22465
22465
  }
22466
- newSuffix += text2;
22466
+ newSuffix += text3;
22467
22467
  if (i6 < k5 - 1 && $isElementNode(node) && !node.isInline()) {
22468
22468
  newSuffix += DOUBLE_LINE_BREAK;
22469
22469
  }
@@ -22502,7 +22502,7 @@ function $reconcileChildren(prevElement, nextElement, slot) {
22502
22502
  if (isDirty) {
22503
22503
  $reconcileNode(nodeKey, dom);
22504
22504
  } else {
22505
- let text2;
22505
+ let text3;
22506
22506
  let childKeyedDom;
22507
22507
  if ($isElementNode(node)) {
22508
22508
  childKeyedDom = activePrevKeyToDOMMap.get(nodeKey);
@@ -22510,11 +22510,11 @@ function $reconcileChildren(prevElement, nextElement, slot) {
22510
22510
  if (!(typeof cached === "string")) {
22511
22511
  formatDevErrorMessage(`reconcileChildren structurally-clean walk: missing __lexicalTextContent on non-dirty child of type ${node.getType()}`);
22512
22512
  }
22513
- text2 = cached;
22513
+ text3 = cached;
22514
22514
  } else {
22515
- text2 = node.getTextContent();
22515
+ text3 = node.getTextContent();
22516
22516
  }
22517
- subTreeTextContent += text2;
22517
+ subTreeTextContent += text3;
22518
22518
  if (childKeyedDom !== void 0) {
22519
22519
  $bubbleChildFirstText(childKeyedDom);
22520
22520
  }
@@ -22614,18 +22614,18 @@ function $reconcileNode(key2, parentDOM) {
22614
22614
  const isDirty = treatAllNodesAsDirty || activeDirtyLeaves.has(key2) || activeDirtyElements.has(key2);
22615
22615
  const dom = getElementByKeyOrThrow(activeEditor$1, key2);
22616
22616
  if (prevNode === nextNode && !isDirty) {
22617
- let text2;
22617
+ let text3;
22618
22618
  if ($isElementNode(prevNode)) {
22619
22619
  const previousSubTreeTextContent = dom.__lexicalTextContent;
22620
22620
  if (!(typeof previousSubTreeTextContent === "string")) {
22621
22621
  formatDevErrorMessage(`reconcileNode: missing __lexicalTextContent on non-dirty element of type ${prevNode.getType()}`);
22622
22622
  }
22623
- text2 = previousSubTreeTextContent;
22623
+ text3 = previousSubTreeTextContent;
22624
22624
  $bubbleChildFirstText(dom);
22625
22625
  } else {
22626
- text2 = prevNode.getTextContent();
22626
+ text3 = prevNode.getTextContent();
22627
22627
  }
22628
- subTreeTextContent += text2;
22628
+ subTreeTextContent += text3;
22629
22629
  return dom;
22630
22630
  }
22631
22631
  if (prevNode !== nextNode && isDirty) {
@@ -22697,7 +22697,7 @@ function $reconcileNode(key2, parentDOM) {
22697
22697
  }
22698
22698
  }
22699
22699
  } else {
22700
- const text2 = nextNode.getTextContent();
22700
+ const text3 = nextNode.getTextContent();
22701
22701
  if ($isDecoratorNode(nextNode)) {
22702
22702
  const decorator = nextNode.decorate(activeEditor$1, activeEditorConfig);
22703
22703
  if (decorator !== null) {
@@ -22707,7 +22707,7 @@ function $reconcileNode(key2, parentDOM) {
22707
22707
  $reconcileSlotChildren(prevNode, nextNode, dom);
22708
22708
  }
22709
22709
  }
22710
- subTreeTextContent += text2;
22710
+ subTreeTextContent += text3;
22711
22711
  }
22712
22712
  if (!activeEditorStateReadOnly && $isRootNode(nextNode)) {
22713
22713
  const latestRoot = nextNode.getLatest();
@@ -22742,10 +22742,10 @@ function getNextSibling(element) {
22742
22742
  }
22743
22743
  return nextSibling2;
22744
22744
  }
22745
- function childrenSet(children, start) {
22745
+ function childrenSet(children2, start) {
22746
22746
  const s7 = /* @__PURE__ */ new Set();
22747
- for (let i6 = start; i6 < children.length; i6++) {
22748
- s7.add(children[i6]);
22747
+ for (let i6 = start; i6 < children2.length; i6++) {
22748
+ s7.add(children2[i6]);
22749
22749
  }
22750
22750
  return s7;
22751
22751
  }
@@ -23118,7 +23118,7 @@ var documentSelectionChange = /* @__PURE__ */ createRefCountedRegistry((doc) =>
23118
23118
  doc.addEventListener("selectionchange", onDocumentSelectionChange);
23119
23119
  return () => doc.removeEventListener("selectionchange", onDocumentSelectionChange);
23120
23120
  });
23121
- function $shouldPreventDefaultAndInsertText(selection, domTargetRange, text2, timeStamp, isBeforeInput, cachedDOMSelectionPoints) {
23121
+ function $shouldPreventDefaultAndInsertText(selection, domTargetRange, text3, timeStamp, isBeforeInput, cachedDOMSelectionPoints) {
23122
23122
  const anchor = selection.anchor;
23123
23123
  const focus = selection.focus;
23124
23124
  const anchorNode = anchor.getNode();
@@ -23133,7 +23133,7 @@ function $shouldPreventDefaultAndInsertText(selection, domTargetRange, text2, ti
23133
23133
  const domAnchorNode = domSelectionPoints !== null ? domSelectionPoints.anchorNode : null;
23134
23134
  const anchorKey = anchor.key;
23135
23135
  const backingAnchorElement = editor.getElementByKey(anchorKey);
23136
- const textLength = text2.length;
23136
+ const textLength = text3.length;
23137
23137
  return anchorKey !== focus.key || // If we're working with a non-text node.
23138
23138
  !$isTextNode(anchorNode) || // If we are replacing a range with a single character or grapheme, and not composing.
23139
23139
  (!isBeforeInput && (!CAN_USE_BEFORE_INPUT || // We check to see if there has been
@@ -23142,7 +23142,7 @@ function $shouldPreventDefaultAndInsertText(selection, domTargetRange, text2, ti
23142
23142
  // a dangling `input` event caused by execCommand('insertText').
23143
23143
  editor._inputState.lastBeforeInputInsertTextTimeStamp < timeStamp + 50) || anchorNode.isDirty() && textLength < 2 || // TODO consider if there are other scenarios when multiple code units
23144
23144
  // should be addressed here
23145
- doesContainSurrogatePair(text2)) && anchor.offset !== focus.offset && !anchorNode.isComposing() || // Any non standard text node.
23145
+ doesContainSurrogatePair(text3)) && anchor.offset !== focus.offset && !anchorNode.isComposing() || // Any non standard text node.
23146
23146
  $isTokenOrSegmented(anchorNode) || // If the text length is more than a single character and we're either
23147
23147
  // dealing with this in "beforeinput" or where the node has already recently
23148
23148
  // been changed (thus is dirty).
@@ -23313,8 +23313,8 @@ function onClick(event, editor) {
23313
23313
  for (let i6 = 0; i6 < rootElement.childNodes.length; i6++) {
23314
23314
  const child = rootElement.childNodes[i6];
23315
23315
  if (isHTMLElement(child)) {
23316
- const rect = child.getBoundingClientRect();
23317
- if (clientY <= (rect.top + rect.bottom) / 2) {
23316
+ const rect2 = child.getBoundingClientRect();
23317
+ if (clientY <= (rect2.top + rect2.bottom) / 2) {
23318
23318
  offset = i6;
23319
23319
  break;
23320
23320
  }
@@ -23561,9 +23561,9 @@ function $handleBeforeInput(event) {
23561
23561
  event.preventDefault();
23562
23562
  dispatchCommand(editor, INSERT_PARAGRAPH_COMMAND);
23563
23563
  } else if (data == null && event.dataTransfer) {
23564
- const text2 = event.dataTransfer.getData("text/plain");
23564
+ const text3 = event.dataTransfer.getData("text/plain");
23565
23565
  event.preventDefault();
23566
- selection.insertRawText(text2);
23566
+ selection.insertRawText(text3);
23567
23567
  } else if (data != null && $shouldPreventDefaultAndInsertText(selection, targetRange, data, event.timeStamp, true)) {
23568
23568
  event.preventDefault();
23569
23569
  dispatchCommand(editor, CONTROLLED_TEXT_INSERTION_COMMAND, data);
@@ -24802,11 +24802,11 @@ var LexicalNode = class {
24802
24802
  *
24803
24803
  * @param object - the node to perform the equality comparison on.
24804
24804
  */
24805
- is(object2) {
24806
- if (object2 == null) {
24805
+ is(object3) {
24806
+ if (object3 == null) {
24807
24807
  return false;
24808
24808
  }
24809
- return this.__key === object2.__key;
24809
+ return this.__key === object3.__key;
24810
24810
  }
24811
24811
  /**
24812
24812
  * Returns true if this node logically precedes the target node in the
@@ -25641,9 +25641,9 @@ var GENERATED_TEXT = (fields) => {
25641
25641
  if (style !== void 0 && style !== "") {
25642
25642
  json.style = style;
25643
25643
  }
25644
- const text2 = node.__text;
25645
- if (text2 !== void 0 && text2 !== "") {
25646
- json.text = text2;
25644
+ const text3 = node.__text;
25645
+ if (text3 !== void 0 && text3 !== "") {
25646
+ json.text = text3;
25647
25647
  }
25648
25648
  return json;
25649
25649
  }
@@ -25656,8 +25656,8 @@ var GENERATED_TEXT = (fields) => {
25656
25656
  node.__mode = typeof mode === "string" && mode in TEXT_MODE_SETTER ? TEXT_MODE_SETTER[mode] : TEXT_MODE_SETTER_DEFAULT;
25657
25657
  const style = json.style;
25658
25658
  node.__style = typeof style === "string" ? style : "";
25659
- const text2 = json.text;
25660
- node.__text = typeof text2 === "string" ? text2 : "";
25659
+ const text3 = json.text;
25660
+ node.__text = typeof text3 === "string" ? text3 : "";
25661
25661
  return node;
25662
25662
  }
25663
25663
  return {
@@ -26055,31 +26055,31 @@ function diffComposedText(a5, b6) {
26055
26055
  function $setTextContent(nextText, dom, node) {
26056
26056
  const isComposing = node.isComposing();
26057
26057
  const suffix = isComposing ? COMPOSITION_SUFFIX : "";
26058
- const text2 = nextText + suffix;
26058
+ const text3 = nextText + suffix;
26059
26059
  const editor = $getEditor();
26060
26060
  const slot = $getEditorDOMRenderConfig(editor).$getDOMSlot(node, dom, editor);
26061
26061
  const firstChild = slot.getFirstChild();
26062
26062
  if (firstChild === null || firstChild.nodeType !== Node.TEXT_NODE) {
26063
- slot.insertChild($getDocument().createTextNode(text2));
26063
+ slot.insertChild($getDocument().createTextNode(text3));
26064
26064
  return;
26065
26065
  }
26066
26066
  const textChild = firstChild;
26067
26067
  const nodeValue = textChild.nodeValue;
26068
- if (nodeValue === text2) {
26068
+ if (nodeValue === text3) {
26069
26069
  return;
26070
26070
  }
26071
26071
  if (isComposing || IS_FIREFOX) {
26072
- const [index, remove2, insert2] = diffComposedText(nodeValue, text2);
26072
+ const [index, remove2, insert2] = diffComposedText(nodeValue, text3);
26073
26073
  if (remove2 !== 0) {
26074
26074
  textChild.deleteData(index, remove2);
26075
26075
  }
26076
26076
  textChild.insertData(index, insert2);
26077
26077
  } else {
26078
- textChild.nodeValue = text2;
26078
+ textChild.nodeValue = text3;
26079
26079
  }
26080
26080
  }
26081
- function $createTextInnerDOM(innerDOM, node, innerTag, format, text2, config) {
26082
- $setTextContent(text2, innerDOM, node);
26081
+ function $createTextInnerDOM(innerDOM, node, innerTag, format, text3, config) {
26082
+ $setTextContent(text3, innerDOM, node);
26083
26083
  const theme = config.theme;
26084
26084
  const textClassNames = theme.text;
26085
26085
  if (textClassNames !== void 0) {
@@ -26166,9 +26166,9 @@ var TextNode = class extends LexicalNode {
26166
26166
  json: textNodeSchema
26167
26167
  });
26168
26168
  }
26169
- constructor(text2 = "", key2) {
26169
+ constructor(text3 = "", key2) {
26170
26170
  super(key2);
26171
- this.__text = text2;
26171
+ this.__text = text3;
26172
26172
  this.__format = 0;
26173
26173
  this.__style = "";
26174
26174
  this.__mode = 0;
@@ -26329,8 +26329,8 @@ var TextNode = class extends LexicalNode {
26329
26329
  innerDOM = $getDocument().createElement(innerTag);
26330
26330
  dom.appendChild(innerDOM);
26331
26331
  }
26332
- const text2 = this.__text;
26333
- $createTextInnerDOM(innerDOM, this, innerTag, format, text2, config);
26332
+ const text3 = this.__text;
26333
+ $createTextInnerDOM(innerDOM, this, innerTag, format, text3, config);
26334
26334
  const style = this.__style;
26335
26335
  if (style !== "") {
26336
26336
  setDOMStyleFromCSS(dom.style, style);
@@ -26530,12 +26530,12 @@ var TextNode = class extends LexicalNode {
26530
26530
  *
26531
26531
  * @returns this TextNode.
26532
26532
  */
26533
- setTextContent(text2) {
26534
- if (this.getLatest().__text === text2) {
26533
+ setTextContent(text3) {
26534
+ if (this.getLatest().__text === text3) {
26535
26535
  return this;
26536
26536
  }
26537
26537
  const self2 = this.getWritable();
26538
- self2.__text = text2;
26538
+ self2.__text = text3;
26539
26539
  return self2;
26540
26540
  }
26541
26541
  /**
@@ -26551,10 +26551,10 @@ var TextNode = class extends LexicalNode {
26551
26551
  let anchorOffset = _anchorOffset;
26552
26552
  let focusOffset = _focusOffset;
26553
26553
  const selection = $getSelection();
26554
- const text2 = this.getTextContent();
26554
+ const text3 = this.getTextContent();
26555
26555
  const key2 = this.__key;
26556
- if (typeof text2 === "string") {
26557
- const lastOffset = text2.length;
26556
+ if (typeof text3 === "string") {
26557
+ const lastOffset = text3.length;
26558
26558
  if (anchorOffset === void 0) {
26559
26559
  anchorOffset = lastOffset;
26560
26560
  }
@@ -26596,7 +26596,7 @@ var TextNode = class extends LexicalNode {
26596
26596
  */
26597
26597
  spliceText(offset, delCount, newText, moveSelection) {
26598
26598
  const writableSelf = this.getWritable();
26599
- const text2 = writableSelf.__text;
26599
+ const text3 = writableSelf.__text;
26600
26600
  const handledTextLength = newText.length;
26601
26601
  let index = offset;
26602
26602
  if (index < 0) {
@@ -26610,7 +26610,7 @@ var TextNode = class extends LexicalNode {
26610
26610
  const newOffset = offset + handledTextLength;
26611
26611
  selection.setTextNodeRange(writableSelf, newOffset, writableSelf, newOffset);
26612
26612
  }
26613
- const updatedText = text2.slice(0, index) + newText + text2.slice(index + delCount);
26613
+ const updatedText = text3.slice(0, index) + newText + text3.slice(index + delCount);
26614
26614
  writableSelf.__text = updatedText;
26615
26615
  return writableSelf;
26616
26616
  }
@@ -26762,8 +26762,8 @@ var TextNode = class extends LexicalNode {
26762
26762
  }
26763
26763
  const key2 = this.__key;
26764
26764
  const targetKey = target.__key;
26765
- const text2 = this.__text;
26766
- const textLength = text2.length;
26765
+ const text3 = this.__text;
26766
+ const textLength = text3.length;
26767
26767
  const compositionKey = $getCompositionKey();
26768
26768
  if (compositionKey === targetKey) {
26769
26769
  $setCompositionKey(key2);
@@ -26780,7 +26780,7 @@ var TextNode = class extends LexicalNode {
26780
26780
  }
26781
26781
  }
26782
26782
  const targetText = target.__text;
26783
- const newText = isBefore ? targetText + text2 : text2 + targetText;
26783
+ const newText = isBefore ? targetText + text3 : text3 + targetText;
26784
26784
  this.setTextContent(newText);
26785
26785
  const writableSelf = this.getWritable();
26786
26786
  target.remove();
@@ -26895,8 +26895,8 @@ function $convertTextDOMNode(domNode) {
26895
26895
  node: $createTextNode(textContent3)
26896
26896
  };
26897
26897
  }
26898
- function findTextInLine(text2, forward) {
26899
- let node = text2;
26898
+ function findTextInLine(text3, forward) {
26899
+ let node = text3;
26900
26900
  while (true) {
26901
26901
  let sibling;
26902
26902
  while ((sibling = forward ? node.nextSibling : node.previousSibling) === null) {
@@ -26947,8 +26947,8 @@ function convertTextFormatElement(domNode) {
26947
26947
  node: null
26948
26948
  };
26949
26949
  }
26950
- function $createTextNode(text2 = "") {
26951
- return $applyNodeReplacement(new TextNode(text2));
26950
+ function $createTextNode(text3 = "") {
26951
+ return $applyNodeReplacement(new TextNode(text3));
26952
26952
  }
26953
26953
  function $isTextNode(node) {
26954
26954
  return node instanceof TextNode;
@@ -27219,13 +27219,13 @@ function $transferStartingElementPointToTextPoint(start, end, format, style) {
27219
27219
  }
27220
27220
  start.set(textNode.__key, 0, "text");
27221
27221
  }
27222
- function $insertTextAtPoint(selection, text2, format, style) {
27222
+ function $insertTextAtPoint(selection, text3, format, style) {
27223
27223
  const anchorNode = selection.anchor.getNode();
27224
27224
  if (!$isTextNode(anchorNode)) {
27225
27225
  formatDevErrorMessage(`insertText: anchor is not a text node`);
27226
27226
  }
27227
27227
  const offset = selection.anchor.offset;
27228
- const textNode = $createTextNode(text2);
27228
+ const textNode = $createTextNode(text3);
27229
27229
  textNode.setFormat(format);
27230
27230
  textNode.setStyle(style);
27231
27231
  const parent = anchorNode.getParentOrThrow();
@@ -27250,7 +27250,7 @@ function $insertTextAtPoint(selection, text2, format, style) {
27250
27250
  }
27251
27251
  textNode.selectEnd();
27252
27252
  if (textNode.isComposing() && selection.anchor.type === "text") {
27253
- selection.anchor.set(selection.anchor.key, selection.anchor.offset - text2.length, selection.anchor.type);
27253
+ selection.anchor.set(selection.anchor.key, selection.anchor.offset - text3.length, selection.anchor.type);
27254
27254
  }
27255
27255
  }
27256
27256
  var NodeSelection = class _NodeSelection {
@@ -27309,7 +27309,7 @@ var NodeSelection = class _NodeSelection {
27309
27309
  extract() {
27310
27310
  return this.getNodes();
27311
27311
  }
27312
- insertRawText(text2) {
27312
+ insertRawText(text3) {
27313
27313
  }
27314
27314
  insertText() {
27315
27315
  }
@@ -27339,8 +27339,8 @@ var NodeSelection = class _NodeSelection {
27339
27339
  }
27340
27340
  const objects = this._nodes;
27341
27341
  const nodes = [];
27342
- for (const object2 of objects) {
27343
- const node = $getNodeByKey(object2);
27342
+ for (const object3 of objects) {
27343
+ const node = $getNodeByKey(object3);
27344
27344
  if (node !== null) {
27345
27345
  nodes.push(node);
27346
27346
  }
@@ -27535,19 +27535,19 @@ var RangeSelection = class _RangeSelection {
27535
27535
  } else {
27536
27536
  prevWasElement = false;
27537
27537
  if ($isTextNode(node)) {
27538
- let text2 = node.getTextContent();
27538
+ let text3 = node.getTextContent();
27539
27539
  if (node === firstNode) {
27540
27540
  if (node === lastNode) {
27541
27541
  if (anchor.type !== "element" || focus.type !== "element" || focus.offset === anchor.offset) {
27542
- text2 = anchorOffset < focusOffset ? text2.slice(anchorOffset, focusOffset) : text2.slice(focusOffset, anchorOffset);
27542
+ text3 = anchorOffset < focusOffset ? text3.slice(anchorOffset, focusOffset) : text3.slice(focusOffset, anchorOffset);
27543
27543
  }
27544
27544
  } else {
27545
- text2 = isBefore ? text2.slice(anchorOffset) : text2.slice(focusOffset);
27545
+ text3 = isBefore ? text3.slice(anchorOffset) : text3.slice(focusOffset);
27546
27546
  }
27547
27547
  } else if (node === lastNode) {
27548
- text2 = isBefore ? text2.slice(0, focusOffset) : text2.slice(0, anchorOffset);
27548
+ text3 = isBefore ? text3.slice(0, focusOffset) : text3.slice(0, anchorOffset);
27549
27549
  }
27550
- textContent3 += text2;
27550
+ textContent3 += text3;
27551
27551
  } else if (($isDecoratorNode(node) || $isLineBreakNode(node)) && (node !== lastNode || !this.isCollapsed())) {
27552
27552
  textContent3 += node.getTextContent();
27553
27553
  }
@@ -27632,15 +27632,15 @@ var RangeSelection = class _RangeSelection {
27632
27632
  *
27633
27633
  * @param text the text to insert into the Selection
27634
27634
  */
27635
- insertRawText(text2) {
27636
- this.insertNodes($generateNodesFromRawText(text2));
27635
+ insertRawText(text3) {
27636
+ this.insertNodes($generateNodesFromRawText(text3));
27637
27637
  }
27638
27638
  /**
27639
27639
  * Insert the provided text into the EditorState at the current Selection.
27640
27640
  *
27641
27641
  * @param text the text to insert into the Selection
27642
27642
  */
27643
- insertText(text2) {
27643
+ insertText(text3) {
27644
27644
  let format = this.format;
27645
27645
  let style = this.style;
27646
27646
  if (!this.isCollapsed()) {
@@ -27653,14 +27653,14 @@ var RangeSelection = class _RangeSelection {
27653
27653
  this.removeText();
27654
27654
  this.format = format;
27655
27655
  this.style = style;
27656
- if (text2 === "") {
27656
+ if (text3 === "") {
27657
27657
  return;
27658
27658
  }
27659
27659
  if ($getCompositionKey() === null) {
27660
27660
  if (this.anchor.type === "element") {
27661
27661
  $transferStartingElementPointToTextPoint(this.anchor, this.focus, format, style);
27662
27662
  }
27663
- $insertTextAtPoint(this, text2, format, style);
27663
+ $insertTextAtPoint(this, text3, format, style);
27664
27664
  return;
27665
27665
  }
27666
27666
  }
@@ -27690,12 +27690,12 @@ var RangeSelection = class _RangeSelection {
27690
27690
  $setSelection(this);
27691
27691
  }
27692
27692
  }
27693
- if (text2 !== "") {
27694
- this.insertText(text2);
27693
+ if (text3 !== "") {
27694
+ this.insertText(text3);
27695
27695
  }
27696
27696
  return;
27697
27697
  }
27698
- if (text2 === "") {
27698
+ if (text3 === "") {
27699
27699
  return;
27700
27700
  }
27701
27701
  if (offset === 0) {
@@ -27713,7 +27713,7 @@ var RangeSelection = class _RangeSelection {
27713
27713
  }
27714
27714
  newNode2.select();
27715
27715
  }
27716
- this.insertText(text2);
27716
+ this.insertText(text3);
27717
27717
  return;
27718
27718
  } else if (offset === anchorSize) {
27719
27719
  const next = anchorNode.getNextSibling();
@@ -27730,17 +27730,17 @@ var RangeSelection = class _RangeSelection {
27730
27730
  }
27731
27731
  newNode2.select(0, 0);
27732
27732
  }
27733
- this.insertText(text2);
27733
+ this.insertText(text3);
27734
27734
  return;
27735
27735
  }
27736
- const newNode = $createTextNode(text2);
27736
+ const newNode = $createTextNode(text3);
27737
27737
  newNode.setFormat(format);
27738
27738
  newNode.setStyle(style);
27739
27739
  anchorNode.replace(newNode);
27740
27740
  newNode.select();
27741
27741
  return;
27742
27742
  }
27743
- if (text2 === "") {
27743
+ if (text3 === "") {
27744
27744
  return;
27745
27745
  }
27746
27746
  const atStartOfInline = anchorParent.isInline() && offset === 0 && !anchorNode.__prev;
@@ -27751,13 +27751,13 @@ var RangeSelection = class _RangeSelection {
27751
27751
  anchorNode.setFormat(format);
27752
27752
  anchorNode.setStyle(style);
27753
27753
  } else {
27754
- $insertTextAtPoint(this, text2, format, style);
27754
+ $insertTextAtPoint(this, text3, format, style);
27755
27755
  return;
27756
27756
  }
27757
27757
  }
27758
- anchorNode.spliceText(offset, 0, text2, true);
27758
+ anchorNode.spliceText(offset, 0, text3, true);
27759
27759
  if (anchorNode.isComposing() && this.anchor.type === "text") {
27760
- this.anchor.set(this.anchor.key, this.anchor.offset - text2.length, this.anchor.type);
27760
+ this.anchor.set(this.anchor.key, this.anchor.offset - text3.length, this.anchor.type);
27761
27761
  }
27762
27762
  }
27763
27763
  /**
@@ -28686,8 +28686,8 @@ function $updateCaretSelectionForUnicodeCharacter(selection, isBackward) {
28686
28686
  const endOffset = isBefore ? focusOffset : anchorOffset;
28687
28687
  const characterOffset = endOffset - 1;
28688
28688
  if (startOffset !== characterOffset) {
28689
- const text2 = anchorNode.getTextContent().slice(startOffset, endOffset);
28690
- if (shouldDeleteExactlyOneCodeUnit(text2)) {
28689
+ const text3 = anchorNode.getTextContent().slice(startOffset, endOffset);
28690
+ if (shouldDeleteExactlyOneCodeUnit(text3)) {
28691
28691
  if (isBackward) {
28692
28692
  focus.set(focus.key, characterOffset, focus.type);
28693
28693
  } else {
@@ -28697,13 +28697,13 @@ function $updateCaretSelectionForUnicodeCharacter(selection, isBackward) {
28697
28697
  }
28698
28698
  }
28699
28699
  }
28700
- function shouldDeleteExactlyOneCodeUnit(text2) {
28700
+ function shouldDeleteExactlyOneCodeUnit(text3) {
28701
28701
  {
28702
- if (!(text2.length > 1)) {
28702
+ if (!(text3.length > 1)) {
28703
28703
  formatDevErrorMessage(`shouldDeleteExactlyOneCodeUnit: expecting to be called only with sequences of two or more code units`);
28704
28704
  }
28705
28705
  }
28706
- return !(doesContainSurrogatePair(text2) || doesContainEmoji(text2));
28706
+ return !(doesContainSurrogatePair(text3) || doesContainEmoji(text3));
28707
28707
  }
28708
28708
  // @__NO_SIDE_EFFECTS__
28709
28709
  function createEmojiTest() {
@@ -28731,10 +28731,10 @@ function $removeSegment(node, isBackward, offset) {
28731
28731
  let segmentOffset = 0;
28732
28732
  let restoreOffset = 0;
28733
28733
  for (let i6 = 0; i6 < splitLength; i6++) {
28734
- const text2 = split[i6];
28734
+ const text3 = split[i6];
28735
28735
  const isLast = i6 === splitLength - 1;
28736
28736
  restoreOffset = segmentOffset;
28737
- segmentOffset += text2.length;
28737
+ segmentOffset += text3.length;
28738
28738
  if (isBackward && segmentOffset === offset || segmentOffset > offset || isLast) {
28739
28739
  split.splice(i6, 1);
28740
28740
  if (isLast) {
@@ -29418,8 +29418,8 @@ function $insertNodes(nodes) {
29418
29418
  }
29419
29419
  selection.insertNodes(nodes);
29420
29420
  }
29421
- function tokenizeRawText(text2, visitor) {
29422
- for (const part of text2.split(/(\r?\n|\t)/)) {
29421
+ function tokenizeRawText(text3, visitor) {
29422
+ for (const part of text3.split(/(\r?\n|\t)/)) {
29423
29423
  if (part === "\n" || part === "\r\n") {
29424
29424
  visitor.linebreak();
29425
29425
  } else if (part === " ") {
@@ -29429,9 +29429,9 @@ function tokenizeRawText(text2, visitor) {
29429
29429
  }
29430
29430
  }
29431
29431
  }
29432
- function $generateNodesFromRawText(text2) {
29432
+ function $generateNodesFromRawText(text3) {
29433
29433
  const nodes = [];
29434
- tokenizeRawText(text2, {
29434
+ tokenizeRawText(text3, {
29435
29435
  linebreak: () => nodes.push($createLineBreakNode()),
29436
29436
  tab: () => nodes.push($createTabNode()),
29437
29437
  text: (part) => nodes.push($createTextNode(part))
@@ -29869,10 +29869,10 @@ function $parseSerializedNodeImpl(serializedNode, registeredNodes) {
29869
29869
  }
29870
29870
  }
29871
29871
  const node = nodeClass.importJSON(serializedNode);
29872
- const children = serializedNode.children;
29873
- if ($isElementNode(node) && Array.isArray(children)) {
29874
- for (let i6 = 0; i6 < children.length; i6++) {
29875
- const serializedJSONChildNode = children[i6];
29872
+ const children2 = serializedNode.children;
29873
+ if ($isElementNode(node) && Array.isArray(children2)) {
29874
+ for (let i6 = 0; i6 < children2.length; i6++) {
29875
+ const serializedJSONChildNode = children2[i6];
29876
29876
  const childNode = $parseSerializedNodeImpl(serializedJSONChildNode, registeredNodes);
29877
29877
  node.append(childNode);
29878
29878
  }
@@ -30682,22 +30682,22 @@ var ElementNode = class extends LexicalNode {
30682
30682
  * and narrow the results with a type guard instead.
30683
30683
  */
30684
30684
  getChildren() {
30685
- const children = [];
30685
+ const children2 = [];
30686
30686
  let child = this.getFirstChild();
30687
30687
  while (child !== null) {
30688
- children.push(child);
30688
+ children2.push(child);
30689
30689
  child = child.getNextSibling();
30690
30690
  }
30691
- return children;
30691
+ return children2;
30692
30692
  }
30693
30693
  getChildrenKeys() {
30694
- const children = [];
30694
+ const children2 = [];
30695
30695
  let child = this.getFirstChild();
30696
30696
  while (child !== null) {
30697
- children.push(child.__key);
30697
+ children2.push(child.__key);
30698
30698
  child = child.getNextSibling();
30699
30699
  }
30700
- return children;
30700
+ return children2;
30701
30701
  }
30702
30702
  getChildrenSize() {
30703
30703
  const self2 = this.getLatest();
@@ -30796,13 +30796,13 @@ var ElementNode = class extends LexicalNode {
30796
30796
  * argument and narrow the result with a type guard instead.
30797
30797
  */
30798
30798
  getDescendantByIndex(index) {
30799
- const children = this.getChildren();
30800
- const childrenLength = children.length;
30799
+ const children2 = this.getChildren();
30800
+ const childrenLength = children2.length;
30801
30801
  if (index >= childrenLength) {
30802
- const resolvedNode2 = children[childrenLength - 1];
30802
+ const resolvedNode2 = children2[childrenLength - 1];
30803
30803
  return $isElementNode(resolvedNode2) && resolvedNode2.getLastDescendant() || resolvedNode2 || null;
30804
30804
  }
30805
- const resolvedNode = children[index];
30805
+ const resolvedNode = children2[index];
30806
30806
  return $isElementNode(resolvedNode) && resolvedNode.getFirstDescendant() || resolvedNode || null;
30807
30807
  }
30808
30808
  /**
@@ -30908,10 +30908,10 @@ var ElementNode = class extends LexicalNode {
30908
30908
  }
30909
30909
  getTextContent() {
30910
30910
  let textContent3 = $getSlotsTextContent(this);
30911
- const children = this.getChildren();
30912
- const childrenLength = children.length;
30911
+ const children2 = this.getChildren();
30912
+ const childrenLength = children2.length;
30913
30913
  for (let i6 = 0; i6 < childrenLength; i6++) {
30914
- const child = children[i6];
30914
+ const child = children2[i6];
30915
30915
  textContent3 += child.getTextContent();
30916
30916
  if (
30917
30917
  // this is an inline $textContentRequiresDoubleLinebreakAtEnd(child)
@@ -30924,10 +30924,10 @@ var ElementNode = class extends LexicalNode {
30924
30924
  }
30925
30925
  getTextContentSize() {
30926
30926
  let textContentSize = $getSlotsTextContentSize(this);
30927
- const children = this.getChildren();
30928
- const childrenLength = children.length;
30927
+ const children2 = this.getChildren();
30928
+ const childrenLength = children2.length;
30929
30929
  for (let i6 = 0; i6 < childrenLength; i6++) {
30930
- const child = children[i6];
30930
+ const child = children2[i6];
30931
30931
  textContentSize += child.getTextContentSize();
30932
30932
  if (
30933
30933
  // This is an inline $textContentRequiresDoubleLinebreakAtEnd(child)
@@ -31017,8 +31017,8 @@ var ElementNode = class extends LexicalNode {
31017
31017
  }
31018
31018
  clear() {
31019
31019
  const writableSelf = this.getWritable();
31020
- const children = this.getChildren();
31021
- children.forEach((child) => child.remove());
31020
+ const children2 = this.getChildren();
31021
+ children2.forEach((child) => child.remove());
31022
31022
  return writableSelf;
31023
31023
  }
31024
31024
  append(...nodesToAppend) {
@@ -31480,9 +31480,9 @@ function $exportNodeToJSON(node) {
31480
31480
  const serializedNode = $exportNodeJSON(node);
31481
31481
  if ($isElementNode(node)) {
31482
31482
  const serializedChildren = serializedNode.children;
31483
- const children = node.getChildren();
31484
- for (let i6 = 0; i6 < children.length; i6++) {
31485
- serializedChildren.push($exportNodeToJSON(children[i6]));
31483
+ const children2 = node.getChildren();
31484
+ for (let i6 = 0; i6 < children2.length; i6++) {
31485
+ serializedChildren.push($exportNodeToJSON(children2[i6]));
31486
31486
  }
31487
31487
  }
31488
31488
  const slotNames = $getSlotNames(node);
@@ -33214,11 +33214,11 @@ function getNearestEditorFromDOMNode(node) {
33214
33214
  function getEditorPropertyFromDOMNode(node) {
33215
33215
  return node ? node.__lexicalEditor : null;
33216
33216
  }
33217
- function getTextDirection(text2) {
33218
- if (RTL_REGEX.test(text2)) {
33217
+ function getTextDirection(text3) {
33218
+ if (RTL_REGEX.test(text3)) {
33219
33219
  return "rtl";
33220
33220
  }
33221
- if (LTR_REGEX.test(text2)) {
33221
+ if (LTR_REGEX.test(text3)) {
33222
33222
  return "ltr";
33223
33223
  }
33224
33224
  return null;
@@ -33964,11 +33964,11 @@ function scrollIntoViewHorizontally(view, element, left, right) {
33964
33964
  if (style.overflowX !== "auto" && style.overflowX !== "scroll") {
33965
33965
  return 0;
33966
33966
  }
33967
- const rect = element.getBoundingClientRect();
33967
+ const rect2 = element.getBoundingClientRect();
33968
33968
  const offsetWidth = element.offsetWidth;
33969
- const scale = offsetWidth > 0 && Math.abs(rect.width - offsetWidth) > 1 ? rect.width / offsetWidth : 1;
33969
+ const scale = offsetWidth > 0 && Math.abs(rect2.width - offsetWidth) > 1 ? rect2.width / offsetWidth : 1;
33970
33970
  const isRTL = style.direction === "rtl";
33971
- const scrollportLeft = rect.left + element.clientLeft * scale;
33971
+ const scrollportLeft = rect2.left + element.clientLeft * scale;
33972
33972
  const viewLeft = scrollportLeft + parseScrollPadding(style.scrollPaddingLeft, clientWidth) * scale;
33973
33973
  const viewRight = scrollportLeft + (clientWidth - parseScrollPadding(style.scrollPaddingRight, clientWidth)) * scale;
33974
33974
  let caretLeft = left;
@@ -34004,13 +34004,13 @@ function scrollIntoViewHorizontally(view, element, left, right) {
34004
34004
  return (element.scrollLeft - scrollLeft) * scale;
34005
34005
  }
34006
34006
  function getCaretRect(range) {
34007
- const rect = range.getBoundingClientRect();
34007
+ const rect2 = range.getBoundingClientRect();
34008
34008
  const {
34009
34009
  startContainer,
34010
34010
  startOffset
34011
34011
  } = range;
34012
- if (!range.collapsed || rect.width !== 0 || rect.height !== 0 || !isDOMTextNode(startContainer) || startContainer.length === 0) {
34013
- return rect;
34012
+ if (!range.collapsed || rect2.width !== 0 || rect2.height !== 0 || !isDOMTextNode(startContainer) || startContainer.length === 0) {
34013
+ return rect2;
34014
34014
  }
34015
34015
  const characterRange = range.cloneRange();
34016
34016
  if (startOffset > 0) {
@@ -35469,7 +35469,7 @@ var $findMatchingParent = (startingNode, findFn) => {
35469
35469
  return null;
35470
35470
  };
35471
35471
  function $createChildrenArray(element, nodeMap) {
35472
- const children = [];
35472
+ const children2 = [];
35473
35473
  let nodeKey = element.__first;
35474
35474
  while (nodeKey !== null) {
35475
35475
  const node = nodeMap === null ? $getNodeByKey(nodeKey) : nodeMap.get(nodeKey);
@@ -35478,10 +35478,10 @@ function $createChildrenArray(element, nodeMap) {
35478
35478
  formatDevErrorMessage(`$createChildrenArray: node does not exist in nodeMap`);
35479
35479
  }
35480
35480
  }
35481
- children.push(nodeKey);
35481
+ children2.push(nodeKey);
35482
35482
  nodeKey = node.__next;
35483
35483
  }
35484
- return children;
35484
+ return children2;
35485
35485
  }
35486
35486
  function getSuperclassOf(klass) {
35487
35487
  const viaStatic = Object.getPrototypeOf(klass);
@@ -36122,8 +36122,8 @@ var TextPointCaretSliceImpl = class {
36122
36122
  }
36123
36123
  } = this;
36124
36124
  const [indexStart, indexEnd] = this.getSliceIndices();
36125
- const text2 = origin.getTextContent();
36126
- return $getTextPointCaret(origin.setTextContent(text2.slice(0, indexStart) + text2.slice(indexEnd)), direction, indexStart);
36125
+ const text3 = origin.getTextContent();
36126
+ return $getTextPointCaret(origin.setTextContent(text3.slice(0, indexStart) + text3.slice(indexEnd)), direction, indexStart);
36127
36127
  }
36128
36128
  };
36129
36129
  function $getSliceFromTextPointCaret(caret, anchorOrFocus) {
@@ -44646,8 +44646,8 @@ function stateBinary(bytes) {
44646
44646
  function stateIndex(array, index, value) {
44647
44647
  Object.defineProperty(array, index, { value, enumerable: true, writable: true, configurable: true });
44648
44648
  }
44649
- function stateSet(object2, key2, value) {
44650
- Object.defineProperty(object2, key2, { value, enumerable: true, writable: true, configurable: true });
44649
+ function stateSet(object3, key2, value) {
44650
+ Object.defineProperty(object3, key2, { value, enumerable: true, writable: true, configurable: true });
44651
44651
  }
44652
44652
  var wasm;
44653
44653
  function __wbg_set_wasm(val) {
@@ -50146,10 +50146,10 @@ var LoroText = class _LoroText {
50146
50146
  * @param {string} text
50147
50147
  * @param {any} options
50148
50148
  */
50149
- updateByLine(text2, options) {
50149
+ updateByLine(text3, options) {
50150
50150
  try {
50151
50151
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
50152
- const ptr0 = passStringToWasm0(text2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
50152
+ const ptr0 = passStringToWasm0(text3, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
50153
50153
  const len0 = WASM_VECTOR_LEN;
50154
50154
  wasm.lorotext_updateByLine(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(options));
50155
50155
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -50585,10 +50585,10 @@ var LoroText = class _LoroText {
50585
50585
  * @param {string} text
50586
50586
  * @param {any} options
50587
50587
  */
50588
- update(text2, options) {
50588
+ update(text3, options) {
50589
50589
  try {
50590
50590
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
50591
- const ptr0 = passStringToWasm0(text2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
50591
+ const ptr0 = passStringToWasm0(text3, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
50592
50592
  const len0 = WASM_VECTOR_LEN;
50593
50593
  wasm.lorotext_update(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(options));
50594
50594
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -53239,9 +53239,9 @@ function createLoroBinding(editor, doc, options = {}) {
53239
53239
  synced.set(node.getKey(), props);
53240
53240
  if (wrote) readBaseline.set(treeNode.id, stable(storedProps(treeNode)));
53241
53241
  if ($isTextNode2(node)) {
53242
- const text2 = data.getOrCreateContainer(TEXT_KEY, new LoroText());
53242
+ const text3 = data.getOrCreateContainer(TEXT_KEY, new LoroText());
53243
53243
  const next = node.getTextContent();
53244
- if (text2.toString() !== next) text2.update(next);
53244
+ if (text3.toString() !== next) text3.update(next);
53245
53245
  }
53246
53246
  };
53247
53247
  const writeChildren = (parent, parentId, visited) => {
@@ -53294,7 +53294,7 @@ function createLoroBinding(editor, doc, options = {}) {
53294
53294
  };
53295
53295
  const readNodeUnsynced = (treeNode) => {
53296
53296
  const props = storedProps(treeNode);
53297
- const text2 = $isTextLike(props) ? String(treeNode.data.get(TEXT_KEY) ?? "") : void 0;
53297
+ const text3 = $isTextLike(props) ? String(treeNode.data.get(TEXT_KEY) ?? "") : void 0;
53298
53298
  const key2 = idToKey.get(treeNode.id);
53299
53299
  const existing = key2 === void 0 ? null : $getNodeByKey2(key2);
53300
53300
  if (existing && existing.getType() === props.type) {
@@ -53303,7 +53303,7 @@ function createLoroBinding(editor, doc, options = {}) {
53303
53303
  ...props,
53304
53304
  text: existing.getTextContent()
53305
53305
  });
53306
- applyText(existing, text2 ?? "");
53306
+ applyText(existing, text3 ?? "");
53307
53307
  return existing;
53308
53308
  }
53309
53309
  const storedKey = stable(props);
@@ -53326,7 +53326,7 @@ function createLoroBinding(editor, doc, options = {}) {
53326
53326
  }
53327
53327
  const created = $parseSerializedNode2({
53328
53328
  ...props,
53329
- ...text2 === void 0 ? {} : { text: text2 },
53329
+ ...text3 === void 0 ? {} : { text: text3 },
53330
53330
  children: []
53331
53331
  });
53332
53332
  readBaseline.set(treeNode.id, stable(props));
@@ -53398,14 +53398,14 @@ function sliceRuns(runs, start, end) {
53398
53398
  const out = [];
53399
53399
  let offset = 0;
53400
53400
  for (const run2 of runs) {
53401
- const text2 = run2.text ?? "";
53401
+ const text3 = run2.text ?? "";
53402
53402
  const from = Math.max(start, offset);
53403
- const to3 = Math.min(end, offset + text2.length);
53403
+ const to3 = Math.min(end, offset + text3.length);
53404
53404
  if (to3 > from) out.push({
53405
53405
  ...run2,
53406
- text: text2.slice(from - offset, to3 - offset)
53406
+ text: text3.slice(from - offset, to3 - offset)
53407
53407
  });
53408
- offset += text2.length;
53408
+ offset += text3.length;
53409
53409
  }
53410
53410
  return out;
53411
53411
  }
@@ -53511,10 +53511,10 @@ function $locate(focus) {
53511
53511
  };
53512
53512
  let remaining = focus.offset;
53513
53513
  const texts = block.getChildren().filter($isTextNode2);
53514
- for (const text2 of texts) {
53515
- const size = text2.getTextContentSize();
53514
+ for (const text3 of texts) {
53515
+ const size = text3.getTextContentSize();
53516
53516
  if (remaining <= size) return {
53517
- key: text2.getKey(),
53517
+ key: text3.getKey(),
53518
53518
  offset: remaining
53519
53519
  };
53520
53520
  remaining -= size;
@@ -54320,12 +54320,12 @@ function $sliceSelectedTextNodeContent(selection, textNode, mutates = "self") {
54320
54320
  startOffset = 0;
54321
54321
  endOffset = offset;
54322
54322
  }
54323
- const text2 = textNode.__text.slice(startOffset, endOffset);
54324
- if (text2 !== textNode.__text) {
54323
+ const text3 = textNode.__text.slice(startOffset, endOffset);
54324
+ if (text3 !== textNode.__text) {
54325
54325
  if (mutates === "clone") {
54326
54326
  textNode = $cloneWithPropertiesEphemeral2(textNode);
54327
54327
  }
54328
- textNode.__text = text2;
54328
+ textNode.__text = text3;
54329
54329
  }
54330
54330
  }
54331
54331
  }
@@ -54375,11 +54375,11 @@ function $trimTextContentFromAnchor(editor, anchor, delCount) {
54375
54375
  nextNode = parentSibling;
54376
54376
  }
54377
54377
  }
54378
- let text2 = currentNode.getTextContent();
54379
- if (text2 === "" && $isElementNode2(currentNode) && !currentNode.isInline()) {
54380
- text2 = "\n\n";
54378
+ let text3 = currentNode.getTextContent();
54379
+ if (text3 === "" && $isElementNode2(currentNode) && !currentNode.isInline()) {
54380
+ text3 = "\n\n";
54381
54381
  }
54382
- const currentNodeSize = text2.length;
54382
+ const currentNodeSize = text3.length;
54383
54383
  if (!$isTextNode2(currentNode) || remaining >= currentNodeSize) {
54384
54384
  const parent = currentNode.getParent();
54385
54385
  currentNode.remove();
@@ -54398,8 +54398,8 @@ function $trimTextContentFromAnchor(editor, anchor, delCount) {
54398
54398
  return null;
54399
54399
  });
54400
54400
  const offset = currentNodeSize - remaining;
54401
- const slicedText = text2.slice(0, offset);
54402
- if (prevTextContent !== null && prevTextContent !== text2) {
54401
+ const slicedText = text3.slice(0, offset);
54402
+ if (prevTextContent !== null && prevTextContent !== text3) {
54403
54403
  const prevSelection = $getPreviousSelection2();
54404
54404
  let target = currentNode;
54405
54405
  if (!currentNode.isSimpleText()) {
@@ -54642,11 +54642,11 @@ function $wrapNodes(selection, createElement, wrappingElement = null) {
54642
54642
  }
54643
54643
  if (anchor !== null && (nodesLength === 0 || nodesLength === 1 && anchor.type === "element" && anchor.getNode().getChildrenSize() === 0)) {
54644
54644
  const target = anchor.type === "text" ? anchor.getNode().getParentOrThrow() : anchor.getNode();
54645
- const children = target.getChildren();
54645
+ const children2 = target.getChildren();
54646
54646
  let element = createElement();
54647
54647
  element.setFormat(target.getFormatType());
54648
54648
  element.setIndent(target.getIndent());
54649
- children.forEach((child) => element.append(child));
54649
+ children2.forEach((child) => element.append(child));
54650
54650
  if (wrappingElement) {
54651
54651
  element = wrappingElement.append(element);
54652
54652
  }
@@ -54714,9 +54714,9 @@ function $wrapNodesImpl(selection, nodes, nodesLength, createElement, wrappingEl
54714
54714
  targetElement.setIndent(parent.getIndent());
54715
54715
  elements.push(targetElement);
54716
54716
  elementMapping.set(parentKey, targetElement);
54717
- const children = parent.getChildren();
54718
- targetElement.splice(targetElement.getChildrenSize(), 0, children);
54719
- for (const child of children) {
54717
+ const children2 = parent.getChildren();
54718
+ targetElement.splice(targetElement.getChildrenSize(), 0, children2);
54719
+ for (const child of children2) {
54720
54720
  movedNodes.add(child.getKey());
54721
54721
  if ($isElementNode2(child)) {
54722
54722
  for (const key2 of child.getChildrenKeys()) {
@@ -55455,19 +55455,19 @@ function formatDevErrorMessage3(message) {
55455
55455
  function dedupeSelectionRects(rects) {
55456
55456
  const contains = (a5, b6) => b6.left >= a5.left - 1 && b6.top >= a5.top - 1 && b6.right <= a5.right + 1 && b6.bottom <= a5.bottom + 1;
55457
55457
  const kept = [];
55458
- for (const rect of Array.from(rects)) {
55459
- if (rect.width < 0.5 || rect.height < 0.5) {
55458
+ for (const rect2 of Array.from(rects)) {
55459
+ if (rect2.width < 0.5 || rect2.height < 0.5) {
55460
55460
  continue;
55461
55461
  }
55462
- if (kept.some((keptRect) => contains(rect, keptRect))) {
55462
+ if (kept.some((keptRect) => contains(rect2, keptRect))) {
55463
55463
  continue;
55464
55464
  }
55465
55465
  for (let i6 = kept.length - 1; i6 >= 0; i6--) {
55466
- if (contains(kept[i6], rect)) {
55466
+ if (contains(kept[i6], rect2)) {
55467
55467
  kept.splice(i6, 1);
55468
55468
  }
55469
55469
  }
55470
- kept.push(rect);
55470
+ kept.push(rect2);
55471
55471
  }
55472
55472
  return kept;
55473
55473
  }
@@ -55485,14 +55485,14 @@ function prependDOMNode(parent, node) {
55485
55485
  }
55486
55486
  function dedupeHighlightRects(rects) {
55487
55487
  const kept = [];
55488
- for (const rect of rects) {
55489
- if (rect.width < 0.5 || rect.height < 0.5) {
55488
+ for (const rect2 of rects) {
55489
+ if (rect2.width < 0.5 || rect2.height < 0.5) {
55490
55490
  continue;
55491
55491
  }
55492
- if (kept.some((prev) => Math.abs(prev.left - rect.left) <= 1 && Math.abs(prev.top - rect.top) <= 1 && Math.abs(prev.right - rect.right) <= 1 && Math.abs(prev.bottom - rect.bottom) <= 1)) {
55492
+ if (kept.some((prev) => Math.abs(prev.left - rect2.left) <= 1 && Math.abs(prev.top - rect2.top) <= 1 && Math.abs(prev.right - rect2.right) <= 1 && Math.abs(prev.bottom - rect2.bottom) <= 1)) {
55493
55493
  continue;
55494
55494
  }
55495
- kept.push(rect);
55495
+ kept.push(rect2);
55496
55496
  }
55497
55497
  return kept;
55498
55498
  }
@@ -55520,29 +55520,29 @@ function mlcPositionNodeOnRange(editor, range, onReposition) {
55520
55520
  }
55521
55521
  let hasRepositioned = false;
55522
55522
  for (let i6 = 0; i6 < rects.length; i6++) {
55523
- const rect = rects[i6];
55523
+ const rect2 = rects[i6];
55524
55524
  const rectNode = lastNodes[i6] || getRootOwnerDocument2(rootDOMNode).createElement("div");
55525
55525
  const rectNodeStyle = rectNode.style;
55526
55526
  if (rectNodeStyle.position !== "absolute") {
55527
55527
  rectNodeStyle.position = "absolute";
55528
55528
  hasRepositioned = true;
55529
55529
  }
55530
- const left = px(rect.left - parentLeft);
55530
+ const left = px(rect2.left - parentLeft);
55531
55531
  if (rectNodeStyle.left !== left) {
55532
55532
  rectNodeStyle.left = left;
55533
55533
  hasRepositioned = true;
55534
55534
  }
55535
- const top = px(rect.top - parentTop);
55535
+ const top = px(rect2.top - parentTop);
55536
55536
  if (rectNodeStyle.top !== top) {
55537
55537
  rectNode.style.top = top;
55538
55538
  hasRepositioned = true;
55539
55539
  }
55540
- const width = px(rect.width);
55540
+ const width = px(rect2.width);
55541
55541
  if (rectNodeStyle.width !== width) {
55542
55542
  rectNode.style.width = width;
55543
55543
  hasRepositioned = true;
55544
55544
  }
55545
- const height = px(rect.height);
55545
+ const height = px(rect2.height);
55546
55546
  if (rectNodeStyle.height !== height) {
55547
55547
  rectNode.style.height = height;
55548
55548
  hasRepositioned = true;
@@ -55954,9 +55954,9 @@ function* $reverseDfsSubtreeIterator(node, depth) {
55954
55954
  };
55955
55955
  const childDepth = depth + 1;
55956
55956
  if ($isElementNode2(node)) {
55957
- const children = node.getChildren();
55958
- for (let i6 = children.length - 1; i6 >= 0; i6--) {
55959
- yield* $reverseDfsSubtreeIterator(children[i6], childDepth);
55957
+ const children2 = node.getChildren();
55958
+ for (let i6 = children2.length - 1; i6 >= 0; i6--) {
55959
+ yield* $reverseDfsSubtreeIterator(children2[i6], childDepth);
55960
55960
  }
55961
55961
  }
55962
55962
  if ($isSlotHost2(node)) {
@@ -55987,9 +55987,9 @@ function registerNestedElementResolver(editor, targetNode, cloneNode2, handleOve
55987
55987
  return node instanceof targetNode;
55988
55988
  };
55989
55989
  const $findMatch = (node) => {
55990
- const children = node.getChildren();
55991
- for (let i6 = 0; i6 < children.length; i6++) {
55992
- const child = children[i6];
55990
+ const children2 = node.getChildren();
55991
+ for (let i6 = 0; i6 < children2.length; i6++) {
55992
+ const child = children2[i6];
55993
55993
  if ($isTargetNode(child)) {
55994
55994
  return null;
55995
55995
  }
@@ -56101,11 +56101,11 @@ function $wrapNodeInElement(node, createElementNode) {
56101
56101
  elementNode.append(node);
56102
56102
  return elementNode;
56103
56103
  }
56104
- function objectKlassEquals(object2, objectClass) {
56105
- if (object2 == null) {
56104
+ function objectKlassEquals(object3, objectClass) {
56105
+ if (object3 == null) {
56106
56106
  return false;
56107
56107
  }
56108
- const prototype2 = Object.getPrototypeOf(object2);
56108
+ const prototype2 = Object.getPrototypeOf(object3);
56109
56109
  if (prototype2 == null || prototype2.constructor == null) {
56110
56110
  return false;
56111
56111
  }
@@ -56214,9 +56214,9 @@ function $unwrapAndFilterDescendantsImpl(root, $predicate, $onSuccess) {
56214
56214
  }
56215
56215
  return didMutate;
56216
56216
  }
56217
- function $descendantsMatching(children, $predicate) {
56217
+ function $descendantsMatching(children2, $predicate) {
56218
56218
  const result = [];
56219
- const stack = Array.from(children).reverse();
56219
+ const stack = Array.from(children2).reverse();
56220
56220
  for (let child = stack.pop(); child !== void 0; child = stack.pop()) {
56221
56221
  if ($predicate(child)) {
56222
56222
  result.push(child);
@@ -59600,7 +59600,7 @@ var $withImportContext = /* @__PURE__ */ $withContext(DOMImportContextSymbol, ge
59600
59600
  function $isBlockLevel(node) {
59601
59601
  return $isBlockElementNode2(node) || $isDecoratorNode2(node) && !node.isInline();
59602
59602
  }
59603
- function $distributeInlineWrapper(children, $makeWrapper) {
59603
+ function $distributeInlineWrapper(children2, $makeWrapper) {
59604
59604
  const out = [];
59605
59605
  let inlineRun = [];
59606
59606
  const flushInline = () => {
@@ -59610,7 +59610,7 @@ function $distributeInlineWrapper(children, $makeWrapper) {
59610
59610
  out.push($makeWrapper().splice(0, 0, inlineRun));
59611
59611
  inlineRun = [];
59612
59612
  };
59613
- for (const child of children) {
59613
+ for (const child of children2) {
59614
59614
  if ($isBlockLevel(child)) {
59615
59615
  flushInline();
59616
59616
  if ($isElementNode2(child)) {
@@ -59625,7 +59625,7 @@ function $distributeInlineWrapper(children, $makeWrapper) {
59625
59625
  flushInline();
59626
59626
  return out;
59627
59627
  }
59628
- function $applySchema(schema, children, parent, domParent) {
59628
+ function $applySchema(schema, children2, parent, domParent) {
59629
59629
  const out = [];
59630
59630
  let run2 = null;
59631
59631
  const flushRun = () => {
@@ -59649,7 +59649,7 @@ function $applySchema(schema, children, parent, domParent) {
59649
59649
  }
59650
59650
  }
59651
59651
  };
59652
- for (const child of children) {
59652
+ for (const child of children2) {
59653
59653
  if (schema.$accepts(child, parent)) {
59654
59654
  flushRun();
59655
59655
  out.push(child);
@@ -59663,20 +59663,20 @@ function $applySchema(schema, children, parent, domParent) {
59663
59663
  flushRun();
59664
59664
  return schema.$finalize ? schema.$finalize(out, parent) : out;
59665
59665
  }
59666
- function $propagateTextAlignToBlockChildren(children, domParent) {
59666
+ function $propagateTextAlignToBlockChildren(children2, domParent) {
59667
59667
  if (!isHTMLElement2(domParent)) {
59668
- return children;
59668
+ return children2;
59669
59669
  }
59670
59670
  const textAlign = domParent.style.textAlign;
59671
59671
  if (!isAlignmentValue(textAlign)) {
59672
- return children;
59672
+ return children2;
59673
59673
  }
59674
- for (const child of children) {
59674
+ for (const child of children2) {
59675
59675
  if ($isBlockElementNode2(child) && child.getFormatType() === "") {
59676
59676
  child.setFormat(textAlign);
59677
59677
  }
59678
59678
  }
59679
- return children;
59679
+ return children2;
59680
59680
  }
59681
59681
  function $paragraphPackageRun(run2, _parent, domParent) {
59682
59682
  if (run2.length === 1 && $isLineBreakNode2(run2[0])) {
@@ -59863,8 +59863,8 @@ function isInsidePreserveWhitespace(node, wsConfig) {
59863
59863
  }
59864
59864
  return false;
59865
59865
  }
59866
- function findAdjacentTextOnLine(text2, forward, wsConfig) {
59867
- let node = text2;
59866
+ function findAdjacentTextOnLine(text3, forward, wsConfig) {
59867
+ let node = text3;
59868
59868
  while (true) {
59869
59869
  let sibling = null;
59870
59870
  while ((sibling = forward ? node.nextSibling : node.previousSibling) === null) {
@@ -59967,10 +59967,10 @@ var TextRule = {
59967
59967
  if (collapsed === "") {
59968
59968
  return [];
59969
59969
  }
59970
- const text2 = $createTextNode2(collapsed);
59971
- $applyFormat(text2, format);
59972
- $applyTextStyle(text2, style);
59973
- return [text2];
59970
+ const text3 = $createTextNode2(collapsed);
59971
+ $applyFormat(text3, format);
59972
+ $applyTextStyle(text3, style);
59973
+ return [text3];
59974
59974
  },
59975
59975
  match: /* @__PURE__ */ sel$1.text(),
59976
59976
  name: "@lexical/html/#text"
@@ -60463,11 +60463,11 @@ function $appendNodesToHTML(editor, currentNode, parentElementAppend, selection
60463
60463
  return false;
60464
60464
  }
60465
60465
  const fragment = $getDocument2().createDocumentFragment();
60466
- const children = $getChildNodes ? $getChildNodes() : $isElementNode2(target) ? target.getChildren() : [];
60466
+ const children2 = $getChildNodes ? $getChildNodes() : $isElementNode2(target) ? target.getChildren() : [];
60467
60467
  const childSelection = shouldInclude && $isNodeSelection2(selection) && $isElementNode2(currentNode) ? null : selection;
60468
60468
  const fragmentAppend = fragment.append.bind(fragment);
60469
60469
  let lastIncludedChild = null;
60470
- for (const childNode of children) {
60470
+ for (const childNode of children2) {
60471
60471
  const shouldIncludeChild = $appendNodesToHTML(editor, childNode, fragmentAppend, childSelection, domConfig);
60472
60472
  if (shouldIncludeChild) {
60473
60473
  lastIncludedChild = childNode;
@@ -60565,11 +60565,11 @@ function $createNodesFromDOM(node, editor, allArtificialNodes, hasBlockAncestorL
60565
60565
  forChildMap.set(node.nodeName, transformOutput.forChild);
60566
60566
  }
60567
60567
  }
60568
- const children = node.childNodes;
60568
+ const children2 = node.childNodes;
60569
60569
  let childLexicalNodes = [];
60570
60570
  const hasBlockAncestorLexicalNodeForChildren = currentLexicalNode != null && $isRootOrShadowRoot2(currentLexicalNode) ? false : currentLexicalNode != null && $isBlockElementNode2(currentLexicalNode) || hasBlockAncestorLexicalNode;
60571
- for (let i6 = 0; i6 < children.length; i6++) {
60572
- childLexicalNodes.push(...$createNodesFromDOM(children[i6], editor, allArtificialNodes, hasBlockAncestorLexicalNodeForChildren, new Map(forChildMap), currentLexicalNode));
60571
+ for (let i6 = 0; i6 < children2.length; i6++) {
60572
+ childLexicalNodes.push(...$createNodesFromDOM(children2[i6], editor, allArtificialNodes, hasBlockAncestorLexicalNodeForChildren, new Map(forChildMap), currentLexicalNode));
60573
60573
  }
60574
60574
  if (postTransform != null) {
60575
60575
  childLexicalNodes = postTransform(childLexicalNodes);
@@ -62085,9 +62085,9 @@ function $getLexicalContent(editor, selection = $getSelection2()) {
62085
62085
  return JSON.stringify($generateJSONFromSelectedNodes(editor, selection));
62086
62086
  }
62087
62087
  function $insertDataTransferForPlainText(dataTransfer, selection) {
62088
- const text2 = dataTransfer.getData("text/plain") || dataTransfer.getData("text/uri-list");
62089
- if (text2 != null) {
62090
- selection.insertRawText(text2);
62088
+ const text3 = dataTransfer.getData("text/plain") || dataTransfer.getData("text/uri-list");
62089
+ if (text3 != null) {
62090
+ selection.insertRawText(text3);
62091
62091
  }
62092
62092
  }
62093
62093
  function $insertDataTransferForRichText(dataTransfer, selection, _editor) {
@@ -62288,14 +62288,14 @@ function $appendNodesToJSON(editor, selection, currentNode, targetArray = []) {
62288
62288
  target = $sliceSelectedTextNodeContent2(selection, target, "clone");
62289
62289
  }
62290
62290
  const serializedNode = $exportNodeJSON2(target);
62291
- const children = $isElementNode2(target) ? target.getChildren() : [];
62291
+ const children2 = $isElementNode2(target) ? target.getChildren() : [];
62292
62292
  const childTarget = serializedNode.children || [];
62293
62293
  if ($isTextNode2(target) && target.getTextContentSize() === 0) {
62294
62294
  shouldInclude = false;
62295
62295
  }
62296
62296
  const childSelection = shouldInclude && $isNodeSelection2(selection) && $isElementNode2(currentNode) ? null : selection;
62297
- for (let i6 = 0; i6 < children.length; i6++) {
62298
- const childNode = children[i6];
62297
+ for (let i6 = 0; i6 < children2.length; i6++) {
62298
+ const childNode = children2[i6];
62299
62299
  const shouldIncludeChild = $appendNodesToJSON(editor, childSelection, childNode, childTarget);
62300
62300
  if (!shouldInclude && $isElementNode2(currentNode) && shouldIncludeChild && currentNode.extractWithChild(childNode, selection, "clone")) {
62301
62301
  shouldInclude = true;
@@ -63619,7 +63619,7 @@ function $convertTableRowElement(domNode) {
63619
63619
  height = parseFloat(domNode_.style.height);
63620
63620
  }
63621
63621
  return {
63622
- after: (children) => $descendantsMatching2(children, $isTableCellNode),
63622
+ after: (children2) => $descendantsMatching2(children2, $isTableCellNode),
63623
63623
  node: $setDirectionFromDOM2($createTableRowNode(height), domNode_)
63624
63624
  };
63625
63625
  }
@@ -64842,11 +64842,11 @@ var TableSelection = class _TableSelection {
64842
64842
  extract() {
64843
64843
  return this.getNodes();
64844
64844
  }
64845
- insertRawText(text2) {
64846
- if (text2 === "") {
64845
+ insertRawText(text3) {
64846
+ if (text3 === "") {
64847
64847
  return;
64848
64848
  }
64849
- const trimmed = text2.endsWith("\n") ? text2.slice(0, -1) : text2;
64849
+ const trimmed = text3.endsWith("\n") ? text3.slice(0, -1) : text3;
64850
64850
  const tsvGrid = trimmed.split("\n").map((line) => line.split(" "));
64851
64851
  const tableNode = $createTableNode();
64852
64852
  for (const row2 of tsvGrid) {
@@ -65671,9 +65671,9 @@ function $handleTableClick(editor, event, selectedDOMCell, tableElement, tableOb
65671
65671
  start = 0;
65672
65672
  end = axis === "x" ? editorWindow.innerWidth : editorWindow.innerHeight;
65673
65673
  } else {
65674
- const rect = container.getBoundingClientRect();
65675
- start = axis === "x" ? rect.left : rect.top;
65676
- end = axis === "x" ? rect.right : rect.bottom;
65674
+ const rect2 = container.getBoundingClientRect();
65675
+ start = axis === "x" ? rect2.left : rect2.top;
65676
+ end = axis === "x" ? rect2.right : rect2.bottom;
65677
65677
  }
65678
65678
  const step = autoScrollStep(pos, start, end);
65679
65679
  if (step === 0) {
@@ -65699,22 +65699,22 @@ function $handleTableClick(editor, event, selectedDOMCell, tableElement, tableOb
65699
65699
  if (hContainer === null) {
65700
65700
  x9 = Math.min(Math.max(x9, 1), editorWindow.innerWidth - 1);
65701
65701
  } else {
65702
- const rect = hContainer.getBoundingClientRect();
65703
- x9 = Math.min(Math.max(x9, rect.left + 1), rect.right - 1);
65702
+ const rect2 = hContainer.getBoundingClientRect();
65703
+ x9 = Math.min(Math.max(x9, rect2.left + 1), rect2.right - 1);
65704
65704
  }
65705
65705
  if (vContainer === null) {
65706
65706
  y5 = Math.min(Math.max(y5, 1), editorWindow.innerHeight - 1);
65707
65707
  } else {
65708
- const rect = vContainer.getBoundingClientRect();
65709
- y5 = Math.min(Math.max(y5, rect.top + 1), rect.bottom - 1);
65708
+ const rect2 = vContainer.getBoundingClientRect();
65709
+ y5 = Math.min(Math.max(y5, rect2.top + 1), rect2.bottom - 1);
65710
65710
  }
65711
65711
  return [x9, y5];
65712
65712
  };
65713
65713
  const isNearScrollEdge = () => {
65714
65714
  const hContainer = findScrollContainer("x");
65715
65715
  if (hContainer !== null) {
65716
- const rect = hContainer.getBoundingClientRect();
65717
- if (autoScrollStep(lastClientX, rect.left, rect.right) !== 0) {
65716
+ const rect2 = hContainer.getBoundingClientRect();
65717
+ if (autoScrollStep(lastClientX, rect2.left, rect2.right) !== 0) {
65718
65718
  return true;
65719
65719
  }
65720
65720
  }
@@ -66466,31 +66466,31 @@ var selectTableNodeInDirection = (tableObserver, tableNode, x9, y5, direction) =
66466
66466
  return false;
66467
66467
  }
66468
66468
  };
66469
- function getCorner(rect, cellValue) {
66469
+ function getCorner(rect2, cellValue) {
66470
66470
  let colName;
66471
66471
  let rowName;
66472
- if (cellValue.startColumn === rect.minColumn) {
66472
+ if (cellValue.startColumn === rect2.minColumn) {
66473
66473
  colName = "minColumn";
66474
- } else if (cellValue.startColumn + cellValue.cell.__colSpan - 1 === rect.maxColumn) {
66474
+ } else if (cellValue.startColumn + cellValue.cell.__colSpan - 1 === rect2.maxColumn) {
66475
66475
  colName = "maxColumn";
66476
66476
  } else {
66477
66477
  return null;
66478
66478
  }
66479
- if (cellValue.startRow === rect.minRow) {
66479
+ if (cellValue.startRow === rect2.minRow) {
66480
66480
  rowName = "minRow";
66481
- } else if (cellValue.startRow + cellValue.cell.__rowSpan - 1 === rect.maxRow) {
66481
+ } else if (cellValue.startRow + cellValue.cell.__rowSpan - 1 === rect2.maxRow) {
66482
66482
  rowName = "maxRow";
66483
66483
  } else {
66484
66484
  return null;
66485
66485
  }
66486
66486
  return [colName, rowName];
66487
66487
  }
66488
- function getAnchorCorner(rect, anchorCellValue, focusCellValue) {
66489
- const anchorCorner = getCorner(rect, anchorCellValue);
66488
+ function getAnchorCorner(rect2, anchorCellValue, focusCellValue) {
66489
+ const anchorCorner = getCorner(rect2, anchorCellValue);
66490
66490
  if (anchorCorner) {
66491
66491
  return anchorCorner;
66492
66492
  }
66493
- const focusCorner = getCorner(rect, focusCellValue);
66493
+ const focusCorner = getCorner(rect2, focusCellValue);
66494
66494
  if (focusCorner) {
66495
66495
  return oppositeCorner(focusCorner);
66496
66496
  }
@@ -66499,13 +66499,13 @@ function getAnchorCorner(rect, anchorCellValue, focusCellValue) {
66499
66499
  function oppositeCorner([colName, rowName]) {
66500
66500
  return [colName === "minColumn" ? "maxColumn" : "minColumn", rowName === "minRow" ? "maxRow" : "minRow"];
66501
66501
  }
66502
- function cellAtCornerOrThrow(tableMap, rect, [colName, rowName]) {
66503
- const rowNum = rect[rowName];
66502
+ function cellAtCornerOrThrow(tableMap, rect2, [colName, rowName]) {
66503
+ const rowNum = rect2[rowName];
66504
66504
  const rowMap = tableMap[rowNum];
66505
66505
  if (!(rowMap !== void 0)) {
66506
66506
  formatDevErrorMessage9(`cellAtCornerOrThrow: ${rowName} = ${String(rowNum)} missing in tableMap`);
66507
66507
  }
66508
- const colNum = rect[colName];
66508
+ const colNum = rect2[colName];
66509
66509
  const cell = rowMap[colNum];
66510
66510
  if (!(cell !== void 0)) {
66511
66511
  formatDevErrorMessage9(`cellAtCornerOrThrow: ${colName} = ${String(colNum)} missing in tableMap`);
@@ -66513,23 +66513,23 @@ function cellAtCornerOrThrow(tableMap, rect, [colName, rowName]) {
66513
66513
  return cell;
66514
66514
  }
66515
66515
  function $extractRectCorners(tableMap, anchorCellValue, newFocusCellValue) {
66516
- const rect = $computeTableCellRectBoundary(tableMap, anchorCellValue, newFocusCellValue);
66517
- const anchorCorner = getAnchorCorner(rect, anchorCellValue, newFocusCellValue);
66518
- return [cellAtCornerOrThrow(tableMap, rect, anchorCorner), cellAtCornerOrThrow(tableMap, rect, oppositeCorner(anchorCorner))];
66516
+ const rect2 = $computeTableCellRectBoundary(tableMap, anchorCellValue, newFocusCellValue);
66517
+ const anchorCorner = getAnchorCorner(rect2, anchorCellValue, newFocusCellValue);
66518
+ return [cellAtCornerOrThrow(tableMap, rect2, anchorCorner), cellAtCornerOrThrow(tableMap, rect2, oppositeCorner(anchorCorner))];
66519
66519
  }
66520
66520
  function $adjustFocusInDirection(tableObserver, tableMap, anchorCellValue, focusCellValue, direction) {
66521
- const rect = $computeTableCellRectBoundary(tableMap, anchorCellValue, focusCellValue);
66522
- const spans = $computeTableCellRectSpans(tableMap, rect);
66521
+ const rect2 = $computeTableCellRectBoundary(tableMap, anchorCellValue, focusCellValue);
66522
+ const spans = $computeTableCellRectSpans(tableMap, rect2);
66523
66523
  const {
66524
66524
  topSpan,
66525
66525
  leftSpan,
66526
66526
  bottomSpan,
66527
66527
  rightSpan
66528
66528
  } = spans;
66529
- const anchorCorner = getAnchorCorner(rect, anchorCellValue, focusCellValue);
66529
+ const anchorCorner = getAnchorCorner(rect2, anchorCellValue, focusCellValue);
66530
66530
  const [focusColumn, focusRow] = oppositeCorner(anchorCorner);
66531
- let fCol = rect[focusColumn];
66532
- let fRow = rect[focusRow];
66531
+ let fCol = rect2[focusColumn];
66532
+ let fRow = rect2[focusRow];
66533
66533
  if (direction === "forward") {
66534
66534
  fCol += focusColumn === "maxColumn" ? 1 : leftSpan;
66535
66535
  } else if (direction === "backward") {
@@ -66921,14 +66921,14 @@ function isTypeaheadMenuInView(editor) {
66921
66921
  }
66922
66922
  return root.hasAttribute("aria-controls") && root.getAttribute("aria-controls") === "typeahead-menu";
66923
66923
  }
66924
- function $insertParagraphAtTableEdge(edgePosition, tableNode, children) {
66924
+ function $insertParagraphAtTableEdge(edgePosition, tableNode, children2) {
66925
66925
  const paragraphNode = $createParagraphNode2();
66926
66926
  if (edgePosition === "first") {
66927
66927
  tableNode.insertBefore(paragraphNode);
66928
66928
  } else {
66929
66929
  tableNode.insertAfter(paragraphNode);
66930
66930
  }
66931
- paragraphNode.append(...children || []);
66931
+ paragraphNode.append(...children2 || []);
66932
66932
  paragraphNode.selectEnd();
66933
66933
  }
66934
66934
  function $getTableEdgeCursorPosition(editor, selection, tableNode) {
@@ -67606,7 +67606,7 @@ function $convertTableElement(domNode) {
67606
67606
  }
67607
67607
  $setDirectionFromDOM2(tableNode, domNode);
67608
67608
  return {
67609
- after: (children) => $descendantsMatching2(children, $isTableRowNode),
67609
+ after: (children2) => $descendantsMatching2(children2, $isTableRowNode),
67610
67610
  node: tableNode
67611
67611
  };
67612
67612
  }
@@ -67879,17 +67879,17 @@ function $tableSelectionInsertClipboardNodesCommand(selectionPayload, hasNestedT
67879
67879
  const hasTables = nodes.some((n7) => $isTableNode(n7) || $dfs2(n7).some((d9) => $isTableNode(d9.node)));
67880
67880
  if (!hasTables) {
67881
67881
  if ($isTableSelection(selection)) {
67882
- let text2 = "";
67882
+ let text3 = "";
67883
67883
  let lastWasBlock = false;
67884
67884
  for (const node of nodes) {
67885
67885
  const isBlock = $isElementNode2(node) && !node.isInline();
67886
- if (text2.length > 0 && (isBlock || lastWasBlock)) {
67887
- text2 += "\n";
67886
+ if (text3.length > 0 && (isBlock || lastWasBlock)) {
67887
+ text3 += "\n";
67888
67888
  }
67889
- text2 += node.getTextContent();
67889
+ text3 += node.getTextContent();
67890
67890
  lastWasBlock = isBlock;
67891
67891
  }
67892
- selection.insertRawText(text2);
67892
+ selection.insertRawText(text3);
67893
67893
  return true;
67894
67894
  }
67895
67895
  return false;
@@ -67938,7 +67938,7 @@ function cellTextFormatMask(style) {
67938
67938
  }
67939
67939
  return mask;
67940
67940
  }
67941
- function $packageCellChildren(children) {
67941
+ function $packageCellChildren(children2) {
67942
67942
  const result = [];
67943
67943
  let paragraph = null;
67944
67944
  const flushSingleLineBreak = () => {
@@ -67949,7 +67949,7 @@ function $packageCellChildren(children) {
67949
67949
  }
67950
67950
  }
67951
67951
  };
67952
- for (const child of children) {
67952
+ for (const child of children2) {
67953
67953
  if ($isInlineElementOrDecoratorNode2(child) || $isTextNode2(child) || $isLineBreakNode2(child)) {
67954
67954
  if (paragraph !== null) {
67955
67955
  paragraph.append(child);
@@ -68066,8 +68066,8 @@ var TableCellRule = {
68066
68066
  const packaged = $packageCellChildren(ctx.$importChildren(el2, {
68067
68067
  context: branchContext
68068
68068
  }));
68069
- const children = isHeader ? packaged : $propagateTextAlignToBlockChildren2(packaged, el2);
68070
- return [cell.splice(0, 0, children)];
68069
+ const children2 = isHeader ? packaged : $propagateTextAlignToBlockChildren2(packaged, el2);
68070
+ return [cell.splice(0, 0, children2)];
68071
68071
  },
68072
68072
  match: /* @__PURE__ */ sel2.tag("td", "th"),
68073
68073
  name: "@lexical/table/cell"
@@ -70958,9 +70958,9 @@ function $getEndOfCodeInLine(anchor) {
70958
70958
  }
70959
70959
  return lastNode;
70960
70960
  }
70961
- function $plainifyCodeContent(text2) {
70961
+ function $plainifyCodeContent(text3) {
70962
70962
  const out = [];
70963
- tokenizeRawText2(text2, {
70963
+ tokenizeRawText2(text3, {
70964
70964
  linebreak: () => out.push($createLineBreakNode2()),
70965
70965
  tab: () => out.push($createTabNode2()),
70966
70966
  text: (part) => out.push($createCodeHighlightNode(part))
@@ -70971,8 +70971,8 @@ function $outdentLeadingSpaces(node, tabSize, selection) {
70971
70971
  if (!Number.isInteger(tabSize) || tabSize <= 0) {
70972
70972
  return false;
70973
70973
  }
70974
- const text2 = node.getTextContent();
70975
- const leading = /^ +/.exec(text2);
70974
+ const text3 = node.getTextContent();
70975
+ const leading = /^ +/.exec(text3);
70976
70976
  if (!leading) {
70977
70977
  return false;
70978
70978
  }
@@ -71131,9 +71131,9 @@ var GENERATED_CODEHIGHLIGHT = (fields) => {
71131
71131
  if (style !== void 0 && style !== "") {
71132
71132
  json.style = style;
71133
71133
  }
71134
- const text2 = node.__text;
71135
- if (text2 !== void 0 && text2 !== "") {
71136
- json.text = text2;
71134
+ const text3 = node.__text;
71135
+ if (text3 !== void 0 && text3 !== "") {
71136
+ json.text = text3;
71137
71137
  }
71138
71138
  return json;
71139
71139
  }
@@ -71146,8 +71146,8 @@ var GENERATED_CODEHIGHLIGHT = (fields) => {
71146
71146
  node.__mode = typeof mode === "string" && mode in CODEHIGHLIGHT_MODE_SETTER ? CODEHIGHLIGHT_MODE_SETTER[mode] : CODEHIGHLIGHT_MODE_SETTER_DEFAULT;
71147
71147
  const style = json.style;
71148
71148
  node.__style = typeof style === "string" ? style : "";
71149
- const text2 = json.text;
71150
- node.__text = typeof text2 === "string" ? text2 : "";
71149
+ const text3 = json.text;
71150
+ node.__text = typeof text3 === "string" ? text3 : "";
71151
71151
  const highlightType = json.highlightType;
71152
71152
  node.setHighlightType(highlightType == null ? highlightType : typeof highlightType === "string" ? highlightType : "");
71153
71153
  return node;
@@ -71388,9 +71388,9 @@ var CodeNode = class extends ElementNode2 {
71388
71388
  node = node.getNextSibling();
71389
71389
  } else if ($isCodeHighlightNode(node)) {
71390
71390
  let spaces = 0;
71391
- const text2 = node.getTextContent();
71391
+ const text3 = node.getTextContent();
71392
71392
  const textSize = node.getTextContentSize();
71393
- while (spaces < textSize && text2[spaces] === " ") {
71393
+ while (spaces < textSize && text3[spaces] === " ") {
71394
71394
  spaces++;
71395
71395
  }
71396
71396
  if (spaces !== 0) {
@@ -71433,8 +71433,8 @@ var CodeNode = class extends ElementNode2 {
71433
71433
  }
71434
71434
  collapseAtStart() {
71435
71435
  const paragraph = $createParagraphNode2();
71436
- const children = this.getChildren();
71437
- children.forEach((child) => paragraph.append(child));
71436
+ const children2 = this.getChildren();
71437
+ children2.forEach((child) => paragraph.append(child));
71438
71438
  this.replace(paragraph);
71439
71439
  return true;
71440
71440
  }
@@ -71552,8 +71552,8 @@ var codeHighlightNodeSchema = /* @__PURE__ */ nodeSchema2()({
71552
71552
  var CodeHighlightNode = class extends TextNode2 {
71553
71553
  /** @internal */
71554
71554
  __highlightType;
71555
- constructor(text2 = "", highlightType, key2) {
71556
- super(text2, key2);
71555
+ constructor(text3 = "", highlightType, key2) {
71556
+ super(text3, key2);
71557
71557
  this.__highlightType = highlightType;
71558
71558
  }
71559
71559
  $config() {
@@ -71609,8 +71609,8 @@ var CodeHighlightNode = class extends TextNode2 {
71609
71609
  function getHighlightThemeClass(theme, highlightType) {
71610
71610
  return highlightType && theme && theme.codeHighlight && theme.codeHighlight[highlightType];
71611
71611
  }
71612
- function $createCodeHighlightNode(text2 = "", highlightType) {
71613
- return $applyNodeReplacement2(new CodeHighlightNode(text2, highlightType));
71612
+ function $createCodeHighlightNode(text3 = "", highlightType) {
71613
+ return $applyNodeReplacement2(new CodeHighlightNode(text3, highlightType));
71614
71614
  }
71615
71615
  function $isCodeHighlightNode(node) {
71616
71616
  return node instanceof CodeHighlightNode;
@@ -71642,8 +71642,8 @@ var PreRule = {
71642
71642
  };
71643
71643
  var MultilineCodeRule = {
71644
71644
  $import: (ctx, el2, $next) => {
71645
- const text2 = el2.textContent || "";
71646
- const isMultiLine = /\r?\n/.test(text2) || el2.querySelector("br") !== null;
71645
+ const text3 = el2.textContent || "";
71646
+ const isMultiLine = /\r?\n/.test(text3) || el2.querySelector("br") !== null;
71647
71647
  if (!isMultiLine) {
71648
71648
  return $next();
71649
71649
  }
@@ -71833,8 +71833,8 @@ function $updateCodeGutter(node) {
71833
71833
  if (codeElement === null) {
71834
71834
  return;
71835
71835
  }
71836
- const children = node.getChildren();
71837
- const childrenLength = children.length;
71836
+ const children2 = node.getChildren();
71837
+ const childrenLength = children2.length;
71838
71838
  if (childrenLength === codeElement.__cachedChildrenLength) {
71839
71839
  return;
71840
71840
  }
@@ -71842,7 +71842,7 @@ function $updateCodeGutter(node) {
71842
71842
  let gutter = "1";
71843
71843
  let count = 1;
71844
71844
  for (let i6 = 0; i6 < childrenLength; i6++) {
71845
- if ($isLineBreakNode2(children[i6])) {
71845
+ if ($isLineBreakNode2(children2[i6])) {
71846
71846
  gutter += "\n" + ++count;
71847
71847
  }
71848
71848
  }
@@ -73204,8 +73204,8 @@ var AriaLiveRegionExtension = {
73204
73204
  const message = state.getInitResult();
73205
73205
  return {
73206
73206
  ...namedSignals2(config),
73207
- announce(text2) {
73208
- message.value = text2 === message.peek() ? text2 + "\u200B" : text2;
73207
+ announce(text3) {
73208
+ message.value = text3 === message.peek() ? text3 + "\u200B" : text3;
73209
73209
  }
73210
73210
  };
73211
73211
  },
@@ -73260,10 +73260,10 @@ var AriaLiveRegionExtension = {
73260
73260
  // region would make the screen reader re-announce it on every editor
73261
73261
  // remount with no user action.
73262
73262
  effect(() => {
73263
- const text2 = message.value;
73263
+ const text3 = message.value;
73264
73264
  const el2 = region.peek();
73265
73265
  if (el2) {
73266
- el2.textContent = text2;
73266
+ el2.textContent = text3;
73267
73267
  }
73268
73268
  })
73269
73269
  );
@@ -74546,9 +74546,9 @@ var ClickableLinkExtension = {
74546
74546
  }
74547
74547
  };
74548
74548
  // @__NO_SIDE_EFFECTS__
74549
- function createLinkMatcherWithRegExp(regExp, urlTransformer = (text2) => text2) {
74550
- return (text2) => {
74551
- const match = regExp.exec(text2);
74549
+ function createLinkMatcherWithRegExp(regExp, urlTransformer = (text3) => text3) {
74550
+ return (text3) => {
74551
+ const match = regExp.exec(text3);
74552
74552
  if (match === null) {
74553
74553
  return null;
74554
74554
  }
@@ -74562,8 +74562,8 @@ function createLinkMatcherWithRegExp(regExp, urlTransformer = (text2) => text2)
74562
74562
  }
74563
74563
  var URL_REGEX = /((https?:\/\/(www\.)?)|(www\.))[-\p{L}\p{N}@:%._+~#=]{1,256}\.[\p{L}\p{N}]{1,6}(?:[-\p{L}\p{N}()@:%_+.~#?&//=]*[\p{L}\p{N}()@_~#?&//=])?/u;
74564
74564
  var EMAIL_REGEX = /(([^<>()[\]\\.,;:\s@"]{1,64}(\.[^<>()[\]\\.,;:\s@"]{1,64}){0,63})|(".{1,255}"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]{1,63}\.){1,127}[a-zA-Z]{2,63}))/;
74565
- var autoLinkUrlMatcher = (text2) => {
74566
- const match = URL_REGEX.exec(text2);
74565
+ var autoLinkUrlMatcher = (text3) => {
74566
+ const match = URL_REGEX.exec(text3);
74567
74567
  if (match === null) {
74568
74568
  return null;
74569
74569
  }
@@ -74587,10 +74587,10 @@ var autoLinkUrlMatcher = (text2) => {
74587
74587
  url: matched.startsWith("http") ? matched : `https://${matched}`
74588
74588
  };
74589
74589
  };
74590
- var autoLinkEmailMatcher = /* @__PURE__ */ createLinkMatcherWithRegExp(EMAIL_REGEX, (text2) => `mailto:${text2}`);
74591
- function findFirstMatch(text2, matchers) {
74590
+ var autoLinkEmailMatcher = /* @__PURE__ */ createLinkMatcherWithRegExp(EMAIL_REGEX, (text3) => `mailto:${text3}`);
74591
+ function findFirstMatch(text3, matchers) {
74592
74592
  for (let i6 = 0; i6 < matchers.length; i6++) {
74593
- const match = matchers[i6](text2);
74593
+ const match = matchers[i6](text3);
74594
74594
  if (match) {
74595
74595
  return match;
74596
74596
  }
@@ -74628,12 +74628,12 @@ function isNextNodeValid(node, separatorRegex) {
74628
74628
  }
74629
74629
  return nextNode === null || $isLineBreakNode2(nextNode) || $isTextNode2(nextNode) && startsWithSeparator(nextNode.getTextContent(), separatorRegex);
74630
74630
  }
74631
- function isContentAroundIsValid(matchStart, matchEnd, separatorRegex, text2, nodes) {
74632
- const contentBeforeIsValid = matchStart > 0 ? isSeparator(text2[matchStart - 1], separatorRegex) : isPreviousNodeValid(nodes[0], separatorRegex);
74631
+ function isContentAroundIsValid(matchStart, matchEnd, separatorRegex, text3, nodes) {
74632
+ const contentBeforeIsValid = matchStart > 0 ? isSeparator(text3[matchStart - 1], separatorRegex) : isPreviousNodeValid(nodes[0], separatorRegex);
74633
74633
  if (!contentBeforeIsValid) {
74634
74634
  return false;
74635
74635
  }
74636
- const contentAfterIsValid = matchEnd < text2.length ? isSeparator(text2[matchEnd], separatorRegex) : isNextNodeValid(nodes[nodes.length - 1], separatorRegex);
74636
+ const contentAfterIsValid = matchEnd < text3.length ? isSeparator(text3[matchEnd], separatorRegex) : isNextNodeValid(nodes[nodes.length - 1], separatorRegex);
74637
74637
  return contentAfterIsValid;
74638
74638
  }
74639
74639
  function extractMatchingNodes(nodes, startIndex, endIndex) {
@@ -74735,10 +74735,10 @@ function $handleLinkCreation(nodes, matchers, onChange, separatorRegex) {
74735
74735
  }
74736
74736
  let currentNodes = [...nodes];
74737
74737
  const initialText = currentNodes.map((node) => node.getTextContent()).join("");
74738
- let text2 = initialText;
74738
+ let text3 = initialText;
74739
74739
  let match;
74740
74740
  let invalidMatchEnd = 0;
74741
- while ((match = findFirstMatch(text2, matchers)) && match !== null) {
74741
+ while ((match = findFirstMatch(text3, matchers)) && match !== null) {
74742
74742
  const matchStart = match.index;
74743
74743
  const matchLength = match.length;
74744
74744
  const matchEnd = matchStart + matchLength;
@@ -74755,7 +74755,7 @@ function $handleLinkCreation(nodes, matchers, onChange, separatorRegex) {
74755
74755
  }
74756
74756
  if (alreadyLinked) {
74757
74757
  invalidMatchEnd += matchEnd;
74758
- text2 = text2.substring(matchEnd);
74758
+ text3 = text3.substring(matchEnd);
74759
74759
  continue;
74760
74760
  }
74761
74761
  const actualMatchStart = invalidMatchEnd + matchStart - matchingOffset;
@@ -74767,23 +74767,23 @@ function $handleLinkCreation(nodes, matchers, onChange, separatorRegex) {
74767
74767
  } else {
74768
74768
  invalidMatchEnd += matchEnd;
74769
74769
  }
74770
- text2 = text2.substring(matchEnd);
74770
+ text3 = text3.substring(matchEnd);
74771
74771
  }
74772
74772
  }
74773
74773
  function handleLinkEdit(linkNode, matchers, onChange, separatorRegex) {
74774
- const children = linkNode.getChildren();
74775
- const childrenLength = children.length;
74774
+ const children2 = linkNode.getChildren();
74775
+ const childrenLength = children2.length;
74776
74776
  for (let i6 = 0; i6 < childrenLength; i6++) {
74777
- const child = children[i6];
74777
+ const child = children2[i6];
74778
74778
  if (!$isTextNode2(child) || !child.isSimpleText()) {
74779
74779
  replaceWithChildren(linkNode);
74780
74780
  onChange(null, linkNode.getURL());
74781
74781
  return;
74782
74782
  }
74783
74783
  }
74784
- const text2 = linkNode.getTextContent();
74785
- const match = findFirstMatch(text2, matchers);
74786
- if (match === null || match.text !== text2) {
74784
+ const text3 = linkNode.getTextContent();
74785
+ const match = findFirstMatch(text3, matchers);
74786
+ if (match === null || match.text !== text3) {
74787
74787
  replaceWithChildren(linkNode);
74788
74788
  onChange(null, linkNode.getURL());
74789
74789
  return;
@@ -74814,19 +74814,19 @@ function handleBadNeighbors(textNode, matchers, onChange, separatorRegex) {
74814
74814
  const parent = textNode.getParent();
74815
74815
  const previousSibling2 = textNode.getPreviousSibling();
74816
74816
  const nextSibling2 = textNode.getNextSibling();
74817
- const text2 = textNode.getTextContent();
74817
+ const text3 = textNode.getTextContent();
74818
74818
  if ($isAutoLinkNode(parent) && !parent.getIsUnlinked()) {
74819
74819
  return;
74820
74820
  }
74821
74821
  if ($isAutoLinkNode(previousSibling2) && !previousSibling2.getIsUnlinked()) {
74822
74822
  if (previousSibling2.is(textNode.getPreviousSibling()) && textNode.getParent() === previousSibling2.getParent()) {
74823
- if (!startsWithSeparator(text2, separatorRegex)) {
74823
+ if (!startsWithSeparator(text3, separatorRegex)) {
74824
74824
  replaceWithChildren(previousSibling2);
74825
74825
  onChange(null, previousSibling2.getURL());
74826
74826
  return;
74827
74827
  }
74828
- if (startsWithTLD(text2, previousSibling2.isEmailURI())) {
74829
- const combinedText = previousSibling2.getTextContent() + text2;
74828
+ if (startsWithTLD(text3, previousSibling2.isEmailURI())) {
74829
+ const combinedText = previousSibling2.getTextContent() + text3;
74830
74830
  const match = findFirstMatch(combinedText, matchers);
74831
74831
  if (match !== null && match.text === combinedText) {
74832
74832
  previousSibling2.append(textNode);
@@ -74836,7 +74836,7 @@ function handleBadNeighbors(textNode, matchers, onChange, separatorRegex) {
74836
74836
  }
74837
74837
  }
74838
74838
  }
74839
- if ($isAutoLinkNode(nextSibling2) && !nextSibling2.getIsUnlinked() && !endsWithSeparator(text2, separatorRegex)) {
74839
+ if ($isAutoLinkNode(nextSibling2) && !nextSibling2.getIsUnlinked() && !endsWithSeparator(text3, separatorRegex)) {
74840
74840
  if (nextSibling2.is(textNode.getNextSibling()) && textNode.getParent() === nextSibling2.getParent()) {
74841
74841
  replaceWithChildren(nextSibling2);
74842
74842
  onChange(null, nextSibling2.getURL());
@@ -74844,13 +74844,13 @@ function handleBadNeighbors(textNode, matchers, onChange, separatorRegex) {
74844
74844
  }
74845
74845
  }
74846
74846
  function replaceWithChildren(node) {
74847
- const children = node.getChildren();
74848
- const childrenLength = children.length;
74847
+ const children2 = node.getChildren();
74848
+ const childrenLength = children2.length;
74849
74849
  for (let j4 = childrenLength - 1; j4 >= 0; j4--) {
74850
- node.insertAfter(children[j4]);
74850
+ node.insertAfter(children2[j4]);
74851
74851
  }
74852
74852
  node.remove();
74853
- return children.map((child) => child.getLatest());
74853
+ return children2.map((child) => child.getLatest());
74854
74854
  }
74855
74855
  function getTextNodesToMatch(textNode) {
74856
74856
  const textNodesToMatch = [textNode];
@@ -75969,8 +75969,8 @@ function $handleIndent(listItemNode) {
75969
75969
  if ($isListNode(nextInnerList) && // Only pull in the following sublist when it is the same kind of
75970
75970
  // list, otherwise it loses its listType.
75971
75971
  innerList.getListType() === nextInnerList.getListType()) {
75972
- const children = nextInnerList.getChildren();
75973
- append4(innerList, children);
75972
+ const children2 = nextInnerList.getChildren();
75973
+ append4(innerList, children2);
75974
75974
  nextSibling2.remove();
75975
75975
  removed.add(nextSibling2.getKey());
75976
75976
  }
@@ -76341,20 +76341,20 @@ var ListItemNode = class extends ElementNode2 {
76341
76341
  if (!$isListNode(newParent)) {
76342
76342
  formatDevErrorMessage12(`ListItemNode.createParentElementNode() must return a ListNode`);
76343
76343
  }
76344
- const children = [node];
76344
+ const children2 = [node];
76345
76345
  for (const dir of ["previous", "next"]) {
76346
- children.reverse();
76346
+ children2.reverse();
76347
76347
  for (const {
76348
76348
  origin
76349
76349
  } of $getSiblingCaret2(node, dir)) {
76350
76350
  if (!$isListItemNode(origin)) {
76351
76351
  break;
76352
76352
  }
76353
- children.push(origin);
76353
+ children2.push(origin);
76354
76354
  }
76355
76355
  }
76356
76356
  node.insertBefore(newParent);
76357
- newParent.splice(0, 0, children);
76357
+ newParent.splice(0, 0, children2);
76358
76358
  if (!$isRootOrShadowRoot2(parent)) {
76359
76359
  $insertNodeToNearestRootAtCaret2(newParent, $rewindSiblingCaret2($getSiblingCaret2(newParent, "next")), {
76360
76360
  $shouldSplit: () => false,
@@ -76438,8 +76438,8 @@ var ListItemNode = class extends ElementNode2 {
76438
76438
  for (let i6 = 0; i6 < nodes.length; i6++) {
76439
76439
  const node = nodes[i6];
76440
76440
  if ($isElementNode2(node) && this.canMergeWith(node)) {
76441
- const children = node.getChildren();
76442
- this.append(...children);
76441
+ const children2 = node.getChildren();
76442
+ this.append(...children2);
76443
76443
  node.remove();
76444
76444
  } else {
76445
76445
  super.append(node);
@@ -76751,13 +76751,13 @@ function $convertCheckboxInput(domNode) {
76751
76751
  node
76752
76752
  };
76753
76753
  }
76754
- function setFormatFromChildren(listItemNode, children) {
76755
- const firstChild = children[0];
76756
- if (children.length === 1 && $isParagraphNode2(firstChild) && !listItemNode.getFormatType() && firstChild.getFormatType()) {
76754
+ function setFormatFromChildren(listItemNode, children2) {
76755
+ const firstChild = children2[0];
76756
+ if (children2.length === 1 && $isParagraphNode2(firstChild) && !listItemNode.getFormatType() && firstChild.getFormatType()) {
76757
76757
  listItemNode.setFormat(firstChild.getFormatType());
76758
76758
  return firstChild.getChildren();
76759
76759
  }
76760
- return children;
76760
+ return children2;
76761
76761
  }
76762
76762
  function $createListItemNode(checked) {
76763
76763
  return $applyNodeReplacement2(new ListItemNode(void 0, checked));
@@ -76979,9 +76979,9 @@ function $normalizeChildren(nodes, listNode) {
76979
76979
  const node = nodes[i6];
76980
76980
  if ($isListItemNode(node)) {
76981
76981
  normalizedListItems.push(node);
76982
- const children = node.getChildren();
76983
- if (children.length > 1) {
76984
- children.forEach((child) => {
76982
+ const children2 = node.getChildren();
76983
+ if (children2.length > 1) {
76984
+ children2.forEach((child) => {
76985
76985
  if ($isListNode(child)) {
76986
76986
  normalizedListItems.push($createWrapperItem().append(child));
76987
76987
  }
@@ -77021,7 +77021,7 @@ function $convertListNode(domNode) {
77021
77021
  }
77022
77022
  $setDirectionFromDOM2(node, domNode);
77023
77023
  return {
77024
- after: (children) => $normalizeChildren(children, node),
77024
+ after: (children2) => $normalizeChildren(children2, node),
77025
77025
  node
77026
77026
  };
77027
77027
  }
@@ -77229,7 +77229,7 @@ function handleCheckItemEvent(event, callback) {
77229
77229
  if (clientX == null) {
77230
77230
  return;
77231
77231
  }
77232
- const rect = target.getBoundingClientRect();
77232
+ const rect2 = target.getBoundingClientRect();
77233
77233
  const zoom = calculateZoomLevel2(target);
77234
77234
  const clientXInPixels = clientX / zoom;
77235
77235
  const targetView = target.ownerDocument.defaultView;
@@ -77239,7 +77239,7 @@ function handleCheckItemEvent(event, callback) {
77239
77239
  const beforeWidthInPixels = parseFloat(beforeStyles.width);
77240
77240
  const isTouchEvent = pointerType === "touch" || "pointerType" in event && event.pointerType === "touch";
77241
77241
  const clickAreaPadding = isTouchEvent ? 32 : 0;
77242
- if (target.dir === "rtl" ? clientXInPixels < rect.right + clickAreaPadding && clientXInPixels > rect.right - beforeWidthInPixels - clickAreaPadding : clientXInPixels > rect.left - clickAreaPadding && clientXInPixels < rect.left + beforeWidthInPixels + clickAreaPadding) {
77242
+ if (target.dir === "rtl" ? clientXInPixels < rect2.right + clickAreaPadding && clientXInPixels > rect2.right - beforeWidthInPixels - clickAreaPadding : clientXInPixels > rect2.left - clickAreaPadding && clientXInPixels < rect2.left + beforeWidthInPixels + clickAreaPadding) {
77243
77243
  callback();
77244
77244
  }
77245
77245
  }
@@ -77348,9 +77348,9 @@ function handleArrowUpOrDown(event, editor, backward) {
77348
77348
  function isDomChecklist(domNode) {
77349
77349
  return domNode.matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]') || domNode.querySelector(":scope > [aria-checked]") !== null;
77350
77350
  }
77351
- function $normalizeListChildren(children, listNode) {
77351
+ function $normalizeListChildren(children2, listNode) {
77352
77352
  const out = [];
77353
- for (const child of children) {
77353
+ for (const child of children2) {
77354
77354
  if ($isListItemNode(child)) {
77355
77355
  out.push(child);
77356
77356
  const innerChildren = child.getChildren();
@@ -77383,21 +77383,21 @@ var ListRule = {
77383
77383
  match: /* @__PURE__ */ sel2.tag("ol", "ul"),
77384
77384
  name: "@lexical/list/list"
77385
77385
  };
77386
- function $liftFormatFromSingleParagraph(listItemNode, children) {
77387
- if (children.length !== 1) {
77388
- return children;
77386
+ function $liftFormatFromSingleParagraph(listItemNode, children2) {
77387
+ if (children2.length !== 1) {
77388
+ return children2;
77389
77389
  }
77390
- const firstChild = children[0];
77390
+ const firstChild = children2[0];
77391
77391
  if ($isParagraphNode2(firstChild) && !listItemNode.getFormatType() && firstChild.getFormatType()) {
77392
77392
  listItemNode.setFormat(firstChild.getFormatType());
77393
77393
  return firstChild.getChildren();
77394
77394
  }
77395
- return children;
77395
+ return children2;
77396
77396
  }
77397
- function $flattenListItemBlocks(children) {
77397
+ function $flattenListItemBlocks(children2) {
77398
77398
  const $isBoundary = (node) => $isBlockLevel2(node) && !$isListNode(node);
77399
- if (!children.some($isBoundary)) {
77400
- return children;
77399
+ if (!children2.some($isBoundary)) {
77400
+ return children2;
77401
77401
  }
77402
77402
  const segments = [];
77403
77403
  let inlineRun = [];
@@ -77407,7 +77407,7 @@ function $flattenListItemBlocks(children) {
77407
77407
  inlineRun = [];
77408
77408
  }
77409
77409
  };
77410
- for (const child of children) {
77410
+ for (const child of children2) {
77411
77411
  if ($isBoundary(child)) {
77412
77412
  flushInlineRun();
77413
77413
  segments.push($isElementNode2(child) ? child.getChildren() : [child]);
@@ -78987,8 +78987,8 @@ function handleMessage(event) {
78987
78987
  if (payload && payload.functionId === "makeChanges") {
78988
78988
  const args = payload.args;
78989
78989
  if (Array.isArray(args)) {
78990
- const [elementStart, elementLength, text2, selStart, selLength, formatCommand] = args;
78991
- if (![elementStart, elementLength, selStart, selLength].every(Number.isFinite) || typeof text2 !== "string" && text2 !== -1) {
78990
+ const [elementStart, elementLength, text3, selStart, selLength, formatCommand] = args;
78991
+ if (![elementStart, elementLength, selStart, selLength].every(Number.isFinite) || typeof text3 !== "string" && text3 !== -1) {
78992
78992
  return;
78993
78993
  }
78994
78994
  editor.update(() => {
@@ -79005,8 +79005,8 @@ function handleMessage(event) {
79005
79005
  selection.setTextNodeRange(anchorNode, setSelStart, anchorNode, setSelEnd);
79006
79006
  }
79007
79007
  }
79008
- if (typeof text2 === "string" && (setSelStart !== setSelEnd || text2 !== "")) {
79009
- selection.insertRawText(text2);
79008
+ if (typeof text3 === "string" && (setSelStart !== setSelEnd || text3 !== "")) {
79009
+ selection.insertRawText(text3);
79010
79010
  anchorNode = anchor.getNode();
79011
79011
  }
79012
79012
  if ($isTextNode2(anchorNode)) {
@@ -79749,8 +79749,8 @@ var QuoteNode = class extends ElementNode2 {
79749
79749
  return true;
79750
79750
  }
79751
79751
  const paragraph = $createParagraphNode2();
79752
- const children = this.getChildren();
79753
- children.forEach((child) => paragraph.append(child));
79752
+ const children2 = this.getChildren();
79753
+ children2.forEach((child) => paragraph.append(child));
79754
79754
  this.replace(paragraph);
79755
79755
  return true;
79756
79756
  }
@@ -79905,8 +79905,8 @@ var HeadingNode = class extends ElementNode2 {
79905
79905
  collapseAtStart() {
79906
79906
  if (this.isEmpty()) {
79907
79907
  const paragraph = $createParagraphNode2();
79908
- const children = this.getChildren();
79909
- children.forEach((child) => paragraph.append(child));
79908
+ const children2 = this.getChildren();
79909
+ children2.forEach((child) => paragraph.append(child));
79910
79910
  this.replace(paragraph);
79911
79911
  }
79912
79912
  return true;
@@ -81693,32 +81693,32 @@ function parseMarkdownHardLineBreak(line) {
81693
81693
  const spaces = line.match(/^(.*?\S)( {2,})$/);
81694
81694
  return spaces ? [spaces[1], spaces[2]] : null;
81695
81695
  }
81696
- function hasNonWhitespaceContentOnLine(children, endIndex) {
81696
+ function hasNonWhitespaceContentOnLine(children2, endIndex) {
81697
81697
  for (let i6 = endIndex - 1; i6 >= 0; i6--) {
81698
- if ($isLineBreakNode2(children[i6])) {
81698
+ if ($isLineBreakNode2(children2[i6])) {
81699
81699
  return false;
81700
81700
  }
81701
- if (/\S/.test(children[i6].getTextContent())) {
81701
+ if (/\S/.test(children2[i6].getTextContent())) {
81702
81702
  return true;
81703
81703
  }
81704
81704
  }
81705
81705
  return false;
81706
81706
  }
81707
81707
  function $extractMarkdownHardLineBreakMarker(previousNode) {
81708
- const children = previousNode.getChildren();
81709
- const lastChildIndex = children.length - 1;
81710
- const lastChild = children[lastChildIndex];
81708
+ const children2 = previousNode.getChildren();
81709
+ const lastChildIndex = children2.length - 1;
81710
+ const lastChild = children2[lastChildIndex];
81711
81711
  if (!$isTextNode2(lastChild)) {
81712
81712
  return null;
81713
81713
  }
81714
81714
  const lastText = lastChild.getTextContent();
81715
81715
  const hardLineBreak = parseMarkdownHardLineBreak(lastText);
81716
81716
  if (hardLineBreak !== null) {
81717
- const [text2, marker] = hardLineBreak;
81718
- lastChild.setTextContent(text2);
81717
+ const [text3, marker] = hardLineBreak;
81718
+ lastChild.setTextContent(text3);
81719
81719
  return marker;
81720
81720
  }
81721
- if (/^ {2,}$/.test(lastText) && hasNonWhitespaceContentOnLine(children, lastChildIndex)) {
81721
+ if (/^ {2,}$/.test(lastText) && hasNonWhitespaceContentOnLine(children2, lastChildIndex)) {
81722
81722
  lastChild.setTextContent("");
81723
81723
  return lastText;
81724
81724
  }
@@ -81749,9 +81749,9 @@ function $setCodeMeta(parentNode, meta) {
81749
81749
  }
81750
81750
  }
81751
81751
  var createBlockNode = /* @__NO_SIDE_EFFECTS__ */ (createNode) => {
81752
- return (parentNode, children, match, isImport) => {
81752
+ return (parentNode, children2, match, isImport) => {
81753
81753
  const node = createNode(match);
81754
- node.append(...children);
81754
+ node.append(...children2);
81755
81755
  parentNode.replace(node);
81756
81756
  if (!isImport) {
81757
81757
  node.select(0, 0);
@@ -81819,7 +81819,7 @@ function setOpenColumn(columns, indent, match, listType) {
81819
81819
  columns[indent] = getContentColumn(match, listType);
81820
81820
  }
81821
81821
  var listReplace = /* @__NO_SIDE_EFFECTS__ */ (listType) => {
81822
- return (parentNode, children, match, isImport) => {
81822
+ return (parentNode, children2, match, isImport) => {
81823
81823
  if ($isHeadingNode2(parentNode) || !isImport && $isUnreplaceableBlock(parentNode)) {
81824
81824
  return false;
81825
81825
  }
@@ -81863,7 +81863,7 @@ var listReplace = /* @__NO_SIDE_EFFECTS__ */ (listType) => {
81863
81863
  list2.append(listItem);
81864
81864
  parentNode.replace(list2);
81865
81865
  }
81866
- listItem.append(...children);
81866
+ listItem.append(...children2);
81867
81867
  if (!isImport) {
81868
81868
  listItem.select(0, 0);
81869
81869
  }
@@ -81905,9 +81905,9 @@ function $retypeNestedList(listItem, listType, match) {
81905
81905
  }
81906
81906
  var $listExport = (listNode, exportChildren, depth, selection) => {
81907
81907
  const output = [];
81908
- const children = listNode.getChildren();
81908
+ const children2 = listNode.getChildren();
81909
81909
  let index = 0;
81910
- for (const listItemNode of children) {
81910
+ for (const listItemNode of children2) {
81911
81911
  if ($isListItemNode2(listItemNode)) {
81912
81912
  if (listItemNode.getChildrenSize() === 1) {
81913
81913
  const firstChild = listItemNode.getFirstChild();
@@ -81950,11 +81950,11 @@ var HEADING = {
81950
81950
  return "#".repeat(level) + " " + exportChildren(node);
81951
81951
  },
81952
81952
  regExp: HEADING_REGEX,
81953
- replace: (parentNode, children, match, isImport) => {
81953
+ replace: (parentNode, children2, match, isImport) => {
81954
81954
  if (!isImport && $isUnreplaceableBlock(parentNode)) {
81955
81955
  return false;
81956
81956
  }
81957
- return $replaceWithHeading(parentNode, children, match, isImport);
81957
+ return $replaceWithHeading(parentNode, children2, match, isImport);
81958
81958
  },
81959
81959
  triggerOnEnter: true,
81960
81960
  type: "element"
@@ -81973,17 +81973,17 @@ var QUOTE2 = {
81973
81973
  return output.join("\n");
81974
81974
  },
81975
81975
  regExp: QUOTE_REGEX,
81976
- replace: (parentNode, children, _match, isImport) => {
81976
+ replace: (parentNode, children2, _match, isImport) => {
81977
81977
  if (isImport) {
81978
81978
  const previousNode = parentNode.getPreviousSibling();
81979
81979
  if ($isQuoteNode2(previousNode)) {
81980
- previousNode.splice(previousNode.getChildrenSize(), 0, [$createMarkdownLineBreakNode(previousNode), ...children]);
81980
+ previousNode.splice(previousNode.getChildrenSize(), 0, [$createMarkdownLineBreakNode(previousNode), ...children2]);
81981
81981
  parentNode.remove();
81982
81982
  return;
81983
81983
  }
81984
81984
  }
81985
81985
  const node = $createQuoteNode2();
81986
- node.append(...children);
81986
+ node.append(...children2);
81987
81987
  parentNode.replace(node);
81988
81988
  if (!isImport) {
81989
81989
  node.select(0, 0);
@@ -82054,13 +82054,13 @@ var CODE = {
82054
82054
  regExp: CODE_END_REGEX
82055
82055
  },
82056
82056
  regExpStart: CODE_START_REGEX,
82057
- replace: (rootNode, children, startMatch, endMatch, linesInBetween, isImport) => {
82057
+ replace: (rootNode, children2, startMatch, endMatch, linesInBetween, isImport) => {
82058
82058
  let codeBlockNode;
82059
82059
  let code;
82060
82060
  const fence2 = startMatch[1] ? startMatch[1].trim() : "```";
82061
82061
  const language = startMatch[2] || void 0;
82062
82062
  const fenceIndent = startMatch[1] ? startMatch[1].length - startMatch[1].trimStart().length : 0;
82063
- if (!children && linesInBetween) {
82063
+ if (!children2 && linesInBetween) {
82064
82064
  if (linesInBetween.length === 1) {
82065
82065
  if (endMatch) {
82066
82066
  codeBlockNode = $createCodeNode2(language);
@@ -82087,13 +82087,13 @@ var CODE = {
82087
82087
  const textNode = $createTextNode2(code);
82088
82088
  codeBlockNode.append(textNode);
82089
82089
  rootNode.append(codeBlockNode);
82090
- } else if (children) {
82090
+ } else if (children2) {
82091
82091
  if (!isImport && $isUnreplaceableBlock(rootNode)) {
82092
82092
  return false;
82093
82093
  }
82094
82094
  (/* @__PURE__ */ createBlockNode((match) => {
82095
82095
  return $createCodeNode2(match ? match[2] : void 0);
82096
- }))(rootNode, children, startMatch, isImport);
82096
+ }))(rootNode, children2, startMatch, isImport);
82097
82097
  }
82098
82098
  },
82099
82099
  type: "multiline-element"
@@ -82327,14 +82327,14 @@ function createMarkdownExport(transformers, shouldPreserveNewLines = false) {
82327
82327
  });
82328
82328
  return (node) => {
82329
82329
  const output = [];
82330
- const children = (node || $getRoot2()).getChildren();
82331
- for (let i6 = 0; i6 < children.length; i6++) {
82332
- const child = children[i6];
82330
+ const children2 = (node || $getRoot2()).getChildren();
82331
+ for (let i6 = 0; i6 < children2.length; i6++) {
82332
+ const child = children2[i6];
82333
82333
  const result = $exportTopLevelElements(child, elementTransformers, textFormatTransformers, byType.textMatch, shouldPreserveNewLines);
82334
82334
  if (result != null) {
82335
82335
  output.push(
82336
82336
  // separate consecutive group of texts with a line break: eg. ["hello", "world"] -> ["hello", "/nworld"]
82337
- isNewlineDelimited && i6 > 0 && !isEmptyParagraph(child) && !isEmptyParagraph(children[i6 - 1]) ? "\n".concat(result) : result
82337
+ isNewlineDelimited && i6 > 0 && !isEmptyParagraph(child) && !isEmptyParagraph(children2[i6 - 1]) ? "\n".concat(result) : result
82338
82338
  );
82339
82339
  }
82340
82340
  }
@@ -82406,7 +82406,7 @@ function $processNodeForSelection(node, selection, elementTransformers, textForm
82406
82406
  }
82407
82407
  function $exportChildrenForSelection(node, selection, textFormatTransformers, textMatchTransformers, shouldPreserveNewLines, unclosedTags, unclosableTags) {
82408
82408
  const output = [];
82409
- const children = node.getChildren();
82409
+ const children2 = node.getChildren();
82410
82410
  let anyChildIncluded = false;
82411
82411
  if (!unclosedTags) {
82412
82412
  unclosedTags = [];
@@ -82414,7 +82414,7 @@ function $exportChildrenForSelection(node, selection, textFormatTransformers, te
82414
82414
  if (!unclosableTags) {
82415
82415
  unclosableTags = [];
82416
82416
  }
82417
- mainLoop: for (const child of children) {
82417
+ mainLoop: for (const child of children2) {
82418
82418
  let childIncluded = child.isSelected(selection);
82419
82419
  for (const transformer of textMatchTransformers) {
82420
82420
  if (!transformer.export) {
@@ -82487,14 +82487,14 @@ function $exportTopLevelElements(node, elementTransformers, textTransformersInde
82487
82487
  }
82488
82488
  function $exportChildren(node, textTransformersIndex, textMatchTransformers, unclosedTags, unclosableTags, shouldPreserveNewLines = false) {
82489
82489
  const output = [];
82490
- const children = node.getChildren();
82490
+ const children2 = node.getChildren();
82491
82491
  if (!unclosedTags) {
82492
82492
  unclosedTags = [];
82493
82493
  }
82494
82494
  if (!unclosableTags) {
82495
82495
  unclosableTags = [];
82496
82496
  }
82497
- mainLoop: for (const child of children) {
82497
+ mainLoop: for (const child of children2) {
82498
82498
  for (const transformer of textMatchTransformers) {
82499
82499
  if (!transformer.export) {
82500
82500
  continue;
@@ -82688,20 +82688,20 @@ function findOutermostTextFormatTransformer(textNode, textFormatTransformersInde
82688
82688
  transformer: resultTransformer
82689
82689
  };
82690
82690
  }
82691
- function scanCodeSpans(text2) {
82691
+ function scanCodeSpans(text3) {
82692
82692
  const isEscaped = (index) => {
82693
82693
  let count = 0;
82694
- for (let i7 = index - 1; i7 >= 0 && text2[i7] === "\\"; i7--) {
82694
+ for (let i7 = index - 1; i7 >= 0 && text3[i7] === "\\"; i7--) {
82695
82695
  count++;
82696
82696
  }
82697
82697
  return count % 2 === 1;
82698
82698
  };
82699
82699
  const runs = [];
82700
82700
  let i6 = 0;
82701
- while (i6 < text2.length) {
82702
- if (text2[i6] === "`") {
82701
+ while (i6 < text3.length) {
82702
+ if (text3[i6] === "`") {
82703
82703
  let length = 1;
82704
- while (i6 + length < text2.length && text2[i6 + length] === "`") {
82704
+ while (i6 + length < text3.length && text3[i6 + length] === "`") {
82705
82705
  length++;
82706
82706
  }
82707
82707
  runs.push({
@@ -82733,7 +82733,7 @@ function scanCodeSpans(text2) {
82733
82733
  continue;
82734
82734
  }
82735
82735
  const closer = runs[closeIdx];
82736
- let content = text2.slice(opener.index + opener.length, closer.index);
82736
+ let content = text3.slice(opener.index + opener.length, closer.index);
82737
82737
  if (content.length >= 2 && content.startsWith(" ") && content.endsWith(" ") && /[^ ]/.test(content)) {
82738
82738
  content = content.slice(1, -1);
82739
82739
  }
@@ -82746,12 +82746,12 @@ function scanCodeSpans(text2) {
82746
82746
  }
82747
82747
  return spans;
82748
82748
  }
82749
- function scanDelimiters(text2, transformersIndex, excludeRanges = []) {
82749
+ function scanDelimiters(text3, transformersIndex, excludeRanges = []) {
82750
82750
  const delimiters = [];
82751
82751
  const delimiterChars = new Set(Object.keys(transformersIndex.transformersByTag).filter((tag) => tag[0] !== "`").map((tag) => tag[0]));
82752
82752
  const isEscaped = (index) => {
82753
82753
  let count = 0;
82754
- for (let i7 = index - 1; i7 >= 0 && text2[i7] === "\\"; i7--) {
82754
+ for (let i7 = index - 1; i7 >= 0 && text3[i7] === "\\"; i7--) {
82755
82755
  count++;
82756
82756
  }
82757
82757
  return count % 2 === 1;
@@ -82760,18 +82760,18 @@ function scanDelimiters(text2, transformersIndex, excludeRanges = []) {
82760
82760
  return excludeRanges.some((range) => index >= range.start && index < range.end);
82761
82761
  };
82762
82762
  let i6 = 0;
82763
- while (i6 < text2.length) {
82764
- const char = text2[i6];
82763
+ while (i6 < text3.length) {
82764
+ const char = text3[i6];
82765
82765
  if (!delimiterChars.has(char) || isEscaped(i6) || isInExcludedRange(i6)) {
82766
82766
  i6++;
82767
82767
  continue;
82768
82768
  }
82769
82769
  let len = 1;
82770
- while (i6 + len < text2.length && text2[i6 + len] === char) {
82770
+ while (i6 + len < text3.length && text3[i6 + len] === char) {
82771
82771
  len++;
82772
82772
  }
82773
- const canOpen = canEmphasis(char, text2, i6, len, true);
82774
- const canClose = canEmphasis(char, text2, i6, len, false);
82773
+ const canOpen = canEmphasis(char, text3, i6, len, true);
82774
+ const canClose = canEmphasis(char, text3, i6, len, false);
82775
82775
  if (canOpen || canClose) {
82776
82776
  delimiters.push({
82777
82777
  active: true,
@@ -82786,7 +82786,7 @@ function scanDelimiters(text2, transformersIndex, excludeRanges = []) {
82786
82786
  }
82787
82787
  return delimiters;
82788
82788
  }
82789
- function processEmphasis(text2, delimiters, transformersIndex) {
82789
+ function processEmphasis(text3, delimiters, transformersIndex) {
82790
82790
  const openersBottom = {};
82791
82791
  let currentPos = 0;
82792
82792
  let result = null;
@@ -82818,7 +82818,7 @@ function processEmphasis(text2, delimiters, transformersIndex) {
82818
82818
  foundOpener = true;
82819
82819
  const matchLen = matchedTag.length;
82820
82820
  const match = {
82821
- content: text2.slice(opener.index + opener.length, closer.index),
82821
+ content: text3.slice(opener.index + opener.length, closer.index),
82822
82822
  endIndex: closer.index + matchLen,
82823
82823
  startIndex: opener.index + (opener.length - matchLen),
82824
82824
  tag: matchedTag
@@ -82850,25 +82850,25 @@ function processEmphasis(text2, delimiters, transformersIndex) {
82850
82850
  }
82851
82851
  return result;
82852
82852
  }
82853
- function canEmphasis(char, text2, index, length, isOpen) {
82854
- if (!isFlanking(text2, index, length, isOpen)) {
82853
+ function canEmphasis(char, text3, index, length, isOpen) {
82854
+ if (!isFlanking(text3, index, length, isOpen)) {
82855
82855
  return false;
82856
82856
  }
82857
82857
  if (char === "*") {
82858
82858
  return true;
82859
82859
  }
82860
82860
  if (char === "_") {
82861
- if (!isFlanking(text2, index, length, !isOpen)) {
82861
+ if (!isFlanking(text3, index, length, !isOpen)) {
82862
82862
  return true;
82863
82863
  }
82864
- const adjacentChar = isOpen ? text2[index - 1] : text2[index + length];
82864
+ const adjacentChar = isOpen ? text3[index - 1] : text3[index + length];
82865
82865
  return adjacentChar !== void 0 && PUNCTUATION.test(adjacentChar);
82866
82866
  }
82867
82867
  return true;
82868
82868
  }
82869
- function isFlanking(text2, index, length, isLeft) {
82870
- const charBefore = text2[index - 1];
82871
- const charAfter = text2[index + length];
82869
+ function isFlanking(text3, index, length, isLeft) {
82870
+ const charBefore = text3[index - 1];
82871
+ const charAfter = text3[index + length];
82872
82872
  const [primary, secondary] = isLeft ? [charAfter, charBefore] : [charBefore, charAfter];
82873
82873
  if (primary === void 0 || WHITESPACE.test(primary)) {
82874
82874
  return false;
@@ -83027,8 +83027,8 @@ function $importMarkdownNodes(markdownString, container, transformers, shouldPre
83027
83027
  $importBlocks(lineText, container, byType.element, textFormatTransformersIndex, byType.textMatch, shouldPreserveNewLines);
83028
83028
  }
83029
83029
  });
83030
- const children = container.getChildren();
83031
- for (const child of children) {
83030
+ const children2 = container.getChildren();
83031
+ for (const child of children2) {
83032
83032
  if (!shouldPreserveNewLines && isEmptyParagraph(child) && container.getChildrenSize() > 1) {
83033
83033
  child.remove();
83034
83034
  continue;
@@ -83088,11 +83088,11 @@ function $importMultiline(lines, startLineIndex, multilineElementTransformers, r
83088
83088
  } else {
83089
83089
  for (let i6 = startLineIndex; i6 <= endLineIndex; i6++) {
83090
83090
  if (i6 === startLineIndex) {
83091
- const text2 = lines[i6].slice(startMatch[0].length);
83092
- linesInBetween.push(text2);
83091
+ const text3 = lines[i6].slice(startMatch[0].length);
83092
+ linesInBetween.push(text3);
83093
83093
  } else if (i6 === endLineIndex && endMatch) {
83094
- const text2 = lines[i6].slice(0, -endMatch[0].length);
83095
- linesInBetween.push(text2);
83094
+ const text3 = lines[i6].slice(0, -endMatch[0].length);
83095
+ linesInBetween.push(text3);
83096
83096
  } else {
83097
83097
  linesInBetween.push(lines[i6]);
83098
83098
  }
@@ -83148,23 +83148,23 @@ function $normalizeMarkdownTextNode(textNode) {
83148
83148
  if ($isTabNode2(textNode)) {
83149
83149
  return;
83150
83150
  }
83151
- const text2 = textNode.getTextContent();
83152
- if (!text2.includes(" ")) {
83151
+ const text3 = textNode.getTextContent();
83152
+ if (!text3.includes(" ")) {
83153
83153
  return;
83154
83154
  }
83155
83155
  const format = textNode.getFormat();
83156
83156
  const style = textNode.getStyle();
83157
83157
  const nodes = [];
83158
83158
  let start = 0;
83159
- for (let index = text2.indexOf(" "); index !== -1; index = text2.indexOf(" ", index + 1)) {
83159
+ for (let index = text3.indexOf(" "); index !== -1; index = text3.indexOf(" ", index + 1)) {
83160
83160
  if (index > start) {
83161
- nodes.push($createTextNode2(text2.slice(start, index)).setFormat(format).setStyle(style));
83161
+ nodes.push($createTextNode2(text3.slice(start, index)).setFormat(format).setStyle(style));
83162
83162
  }
83163
83163
  nodes.push($createTabNode2());
83164
83164
  start = index + 1;
83165
83165
  }
83166
- if (start < text2.length) {
83167
- nodes.push($createTextNode2(text2.slice(start)).setFormat(format).setStyle(style));
83166
+ if (start < text3.length) {
83167
+ nodes.push($createTextNode2(text3.slice(start)).setFormat(format).setStyle(style));
83168
83168
  }
83169
83169
  textNode.getParentOrThrow().splice(textNode.getIndexWithinParent(), 1, nodes);
83170
83170
  }
@@ -83388,20 +83388,20 @@ function $runTextFormatTransformers(anchorNode, anchorOffset, textFormatTransfor
83388
83388
  }
83389
83389
  function $isInsideUnclosedCodeSpan(node, offset) {
83390
83390
  let backtickCount = 0;
83391
- const text2 = node.getTextContent();
83391
+ const text3 = node.getTextContent();
83392
83392
  for (let i6 = 0; i6 < offset; i6++) {
83393
- if (text2[i6] === "`") {
83393
+ if (text3[i6] === "`") {
83394
83394
  backtickCount++;
83395
83395
  }
83396
83396
  }
83397
83397
  return backtickCount % 2 !== 0;
83398
83398
  }
83399
- function getOpenTagStartIndex(string, maxIndex, tag) {
83399
+ function getOpenTagStartIndex(string2, maxIndex, tag) {
83400
83400
  const tagLength = tag.length;
83401
83401
  for (let i6 = maxIndex; i6 >= tagLength; i6--) {
83402
83402
  const startIndex = i6 - tagLength;
83403
- if (isEqualSubString(string, startIndex, tag, 0, tagLength) && // Space after opening tag cancels transformation
83404
- string[startIndex + tagLength] !== " ") {
83403
+ if (isEqualSubString(string2, startIndex, tag, 0, tagLength) && // Space after opening tag cancels transformation
83404
+ string2[startIndex + tagLength] !== " ") {
83405
83405
  return startIndex;
83406
83406
  }
83407
83407
  }
@@ -84499,9 +84499,9 @@ function fence(content) {
84499
84499
  return "`".repeat(Math.max(3, max + 1));
84500
84500
  }
84501
84501
  function walkText(node) {
84502
- const children = node.children;
84503
- if (!children) return node.text ?? "";
84504
- return children.map(walkText).join("\n");
84502
+ const children2 = node.children;
84503
+ if (!children2) return node.text ?? "";
84504
+ return children2.map(walkText).join("\n");
84505
84505
  }
84506
84506
  function stateText(state) {
84507
84507
  if (!state || typeof state !== "object") return "";
@@ -84698,10 +84698,10 @@ var LEGACY_CODE_NODE_TRANSFORMER = {
84698
84698
  export: (node) => {
84699
84699
  if (node.getType() !== "code") return null;
84700
84700
  const lang = node.getLanguage?.() ?? "";
84701
- const text2 = node.getTextContent();
84702
- const f6 = fence(text2);
84701
+ const text3 = node.getTextContent();
84702
+ const f6 = fence(text3);
84703
84703
  return `${f6}${lang}
84704
- ${text2}
84704
+ ${text3}
84705
84705
  ${f6}`;
84706
84706
  },
84707
84707
  regExp: NEVER,
@@ -87178,9 +87178,9 @@ function extractText(state) {
87178
87178
  return walkChildren(root);
87179
87179
  }
87180
87180
  function walkChildren(node) {
87181
- const children = node.children;
87182
- if (!children) return node.text ?? "";
87183
- return children.map(walkChildren).join("\n");
87181
+ const children2 = node.children;
87182
+ if (!children2) return node.text ?? "";
87183
+ return children2.map(walkChildren).join("\n");
87184
87184
  }
87185
87185
  var SpoilerNode = class SpoilerNode2 extends ElementNode2 {
87186
87186
  static getType() {
@@ -87934,10 +87934,10 @@ function blockStats(before2, after2) {
87934
87934
  const changed = Math.min(added, removed);
87935
87935
  return `+${added - changed} ~${changed} -${removed - changed} blocks`;
87936
87936
  }
87937
- function closestBase(written, text2, fallback, floor) {
87937
+ function closestBase(written, text3, fallback, floor) {
87938
87938
  const keys2 = [...written.keys()];
87939
87939
  const from = floor === null ? -1 : keys2.indexOf(floor);
87940
- const wanted = new Set(text2.split("\n").map((line) => line.trim()));
87940
+ const wanted = new Set(text3.split("\n").map((line) => line.trim()));
87941
87941
  let best = fallback;
87942
87942
  let bestScore = -1;
87943
87943
  for (const candidate of from >= 0 ? keys2.slice(from) : keys2) {
@@ -87993,9 +87993,9 @@ async function createDocumentSession(options) {
87993
87993
  const binding = createLoroBinding(editor, loro);
87994
87994
  loro.subscribeLocalUpdates((bytes) => emit({ type: "update", bytes }));
87995
87995
  const written = /* @__PURE__ */ new Map();
87996
- const remember = (text2, frontiers = loro.frontiers()) => {
87997
- written.delete(text2);
87998
- written.set(text2, frontiers);
87996
+ const remember = (text3, frontiers = loro.frontiers()) => {
87997
+ written.delete(text3);
87998
+ written.set(text3, frontiers);
87999
87999
  if (written.size > WRITTEN_LIMIT) written.delete(written.keys().next().value);
88000
88000
  };
88001
88001
  let outcome = { kind: "idle" };
@@ -88026,7 +88026,7 @@ async function createDocumentSession(options) {
88026
88026
  let snapshotDirty = true;
88027
88027
  let writing = Promise.resolve();
88028
88028
  let playing = Promise.resolve();
88029
- const prepareAgentEdit = (baseText, text2, target) => {
88029
+ const prepareAgentEdit = (baseText, text3, target) => {
88030
88030
  const baseState = parseDocument2(baseText);
88031
88031
  const stats = blockStats(baseState, target);
88032
88032
  const { frontiers, steps } = streamAtVersion(
@@ -88037,7 +88037,7 @@ async function createDocumentSession(options) {
88037
88037
  target,
88038
88038
  `agent: ${stats}`
88039
88039
  );
88040
- remember(text2, frontiers);
88040
+ remember(text3, frontiers);
88041
88041
  return { stats, steps };
88042
88042
  };
88043
88043
  const applyStep = (step) => {
@@ -88048,15 +88048,15 @@ async function createDocumentSession(options) {
88048
88048
  emit({ type: "cursor", cursor: step.cursor });
88049
88049
  }
88050
88050
  };
88051
- const onFileText = (text2) => {
88052
- if (text2 === lastFileText) return;
88053
- lastFileText = text2;
88051
+ const onFileText = (text3) => {
88052
+ if (text3 === lastFileText) return;
88053
+ lastFileText = text3;
88054
88054
  agentActiveAt = Date.now();
88055
88055
  const at7 = agentActiveAt;
88056
88056
  activitySaved = activitySaved.then(() => writeAtomic(activityFile, String(at7))).catch((err) => log(`agent activity not saved: ${messageOf(err)}`));
88057
88057
  let target;
88058
88058
  try {
88059
- target = parseDocument2(text2);
88059
+ target = parseDocument2(text3);
88060
88060
  } catch (err) {
88061
88061
  log(`agent edit rejected: ${messageOf(err)}`);
88062
88062
  setOutcome({ kind: "rejected", message: messageOf(err) });
@@ -88064,15 +88064,15 @@ async function createDocumentSession(options) {
88064
88064
  }
88065
88065
  const fallback = lastGoodText ?? serializeDocument(editor.getEditorState().toJSON());
88066
88066
  const floor = lastAgentText;
88067
- lastAgentText = text2;
88067
+ lastAgentText = text3;
88068
88068
  const queued = streaming > 0;
88069
- lastGoodText = text2;
88069
+ lastGoodText = text3;
88070
88070
  streaming += 1;
88071
88071
  emitStatus();
88072
88072
  playing = playing.then(async () => {
88073
88073
  try {
88074
- const baseText = queued ? fallback : closestBase(written, text2, fallback, floor);
88075
- const { stats, steps } = prepareAgentEdit(baseText, text2, target);
88074
+ const baseText = queued ? fallback : closestBase(written, text3, fallback, floor);
88075
+ const { stats, steps } = prepareAgentEdit(baseText, text3, target);
88076
88076
  for (const step of steps) {
88077
88077
  applyStep(step);
88078
88078
  if (stepDelayMs > 0) await new Promise((resolve) => setTimeout(resolve, stepDelayMs * (0.6 + Math.random() * 0.8)));
@@ -88110,17 +88110,17 @@ async function createDocumentSession(options) {
88110
88110
  if (stamped !== current && JSON.stringify(stamped) !== JSON.stringify(current)) {
88111
88111
  editor.update(() => $reconcileRoot2(stamped.root), { discrete: true });
88112
88112
  }
88113
- const text2 = serializeDocument(editor.getEditorState().toJSON());
88114
- if (text2 !== lastFileText) {
88113
+ const text3 = serializeDocument(editor.getEditorState().toJSON());
88114
+ if (text3 !== lastFileText) {
88115
88115
  const beforeRename = await readText(file);
88116
88116
  if (beforeRename !== null && beforeRename !== lastFileText) {
88117
88117
  onFileText(beforeRename);
88118
88118
  return;
88119
88119
  }
88120
- await writeAtomic(file, text2);
88121
- lastFileText = text2;
88122
- lastGoodText = text2;
88123
- remember(text2);
88120
+ await writeAtomic(file, text3);
88121
+ lastFileText = text3;
88122
+ lastGoodText = text3;
88123
+ remember(text3);
88124
88124
  emit({ type: "saved" });
88125
88125
  }
88126
88126
  snapshotDirty = true;
@@ -88270,8 +88270,8 @@ function createDocumentRegistry(options) {
88270
88270
  const known = sessions.has(id2);
88271
88271
  void open(id2).then((session) => {
88272
88272
  if (!session || !known) return;
88273
- import_node_fs10.default.readFile(docFile(id2), "utf8", (err, text2) => {
88274
- if (!err) session.onFileText(text2);
88273
+ import_node_fs10.default.readFile(docFile(id2), "utf8", (err, text3) => {
88274
+ if (!err) session.onFileText(text3);
88275
88275
  });
88276
88276
  });
88277
88277
  },
@@ -88366,8 +88366,8 @@ function installInspector(win, properties, commentCursor = "crosshair") {
88366
88366
  return style.display.includes("grid") ? "Grid" : "Frame";
88367
88367
  };
88368
88368
  const rectOf = (el2) => {
88369
- const rect = el2.getBoundingClientRect();
88370
- return { x: rect.x, y: rect.y, width: rect.width, height: rect.height };
88369
+ const rect2 = el2.getBoundingClientRect();
88370
+ return { x: rect2.x, y: rect2.y, width: rect2.width, height: rect2.height };
88371
88371
  };
88372
88372
  const selection = (reason, toggle = false) => {
88373
88373
  if (!selected?.isConnected) {
@@ -88444,10 +88444,10 @@ function installInspector(win, properties, commentCursor = "crosshair") {
88444
88444
  const geometry = () => {
88445
88445
  if (!enabled) return;
88446
88446
  if (selected?.isConnected) {
88447
- const rect = rectOf(selected);
88448
- if (!sameRect(selectedRect, rect)) {
88449
- selectedRect = rect;
88450
- post("rect", { id: idOf(selected), rect });
88447
+ const rect2 = rectOf(selected);
88448
+ if (!sameRect(selectedRect, rect2)) {
88449
+ selectedRect = rect2;
88450
+ post("rect", { id: idOf(selected), rect: rect2 });
88451
88451
  }
88452
88452
  }
88453
88453
  for (const [id2, previous] of tracked) {
@@ -88456,19 +88456,19 @@ function installInspector(win, properties, commentCursor = "crosshair") {
88456
88456
  tracked.delete(id2);
88457
88457
  continue;
88458
88458
  }
88459
- const rect = rectOf(el2);
88460
- if (!sameRect(previous, rect)) {
88461
- tracked.set(id2, rect);
88462
- post("rect", { id: id2, rect });
88459
+ const rect2 = rectOf(el2);
88460
+ if (!sameRect(previous, rect2)) {
88461
+ tracked.set(id2, rect2);
88462
+ post("rect", { id: id2, rect: rect2 });
88463
88463
  }
88464
88464
  }
88465
88465
  if (hovered?.isConnected) {
88466
- const rect = rectOf(hovered);
88466
+ const rect2 = rectOf(hovered);
88467
88467
  const id2 = treeId(hovered);
88468
- if (!sameRect(hoverRect, rect) || id2 !== hoverId) {
88469
- hoverRect = rect;
88468
+ if (!sameRect(hoverRect, rect2) || id2 !== hoverId) {
88469
+ hoverRect = rect2;
88470
88470
  hoverId = id2;
88471
- post("hover", { rect, id: id2 });
88471
+ post("hover", { rect: rect2, id: id2 });
88472
88472
  }
88473
88473
  } else if (hoverRect) {
88474
88474
  hoverRect = null;
@@ -88622,10 +88622,10 @@ function installInspector(win, properties, commentCursor = "crosshair") {
88622
88622
  let parent = el2.parentElement;
88623
88623
  while (parent && !picked.has(parent)) parent = parent.parentElement;
88624
88624
  if (parent) continue;
88625
- const rect = rectOf(el2);
88626
- if (rect.width <= 0 || rect.height <= 0) continue;
88625
+ const rect2 = rectOf(el2);
88626
+ if (rect2.width <= 0 || rect2.height <= 0) continue;
88627
88627
  picked.add(el2);
88628
- targets.push({ id: id2, name: label(el2) || selector(el2), rect });
88628
+ targets.push({ id: id2, name: label(el2) || selector(el2), rect: rect2 });
88629
88629
  }
88630
88630
  post("targets", { request: data.request, targets });
88631
88631
  } else if (data.action === "describe" && Number.isSafeInteger(data.request) && data.request > 0 && Array.isArray(data.ids) && data.ids.length <= 2500) {
@@ -88703,6 +88703,174 @@ function installInspector(win, properties, commentCursor = "crosshair") {
88703
88703
  };
88704
88704
  }
88705
88705
 
88706
+ // src/inspector/snapshot.ts
88707
+ function installSnapshot(win, serialize) {
88708
+ const doc = win.document;
88709
+ const post = (type, data = {}) => win.parent.postMessage({ type: `ryugi:board:${type}`, ...data }, "*");
88710
+ const frame = () => new Promise((resolve) => win.requestAnimationFrame(() => resolve()));
88711
+ const settle = async () => {
88712
+ try {
88713
+ await doc.fonts?.ready;
88714
+ } catch {
88715
+ }
88716
+ for (let round = 0; round < 20; round++) {
88717
+ const running = (doc.getAnimations?.() ?? []).filter((animation) => animation.playState === "running" && animation.effect?.getComputedTiming().endTime !== Infinity);
88718
+ if (!running.length) break;
88719
+ await Promise.all(running.map((animation) => animation.finished.catch(() => void 0)));
88720
+ }
88721
+ await frame();
88722
+ await frame();
88723
+ post("ready");
88724
+ };
88725
+ if (doc.readyState === "complete") void settle();
88726
+ else win.addEventListener("load", () => void settle(), { once: true });
88727
+ const own = (node) => !!node && (node.nodeType === 1 ? node : node.parentElement)?.closest?.("[data-ryugi-inspector]") != null;
88728
+ let changed = 0;
88729
+ const observer = new win.MutationObserver((records) => {
88730
+ if (records.every((record) => own(record.target) || [...record.addedNodes, ...record.removedNodes].some(own))) return;
88731
+ win.clearTimeout(changed);
88732
+ changed = win.setTimeout(() => post("changed"), 500);
88733
+ });
88734
+ observer.observe(doc.documentElement, { subtree: true, childList: true, characterData: true, attributes: true });
88735
+ const rasterize = async (svg, width, height, scale) => {
88736
+ const image = new win.Image();
88737
+ image.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;
88738
+ await image.decode();
88739
+ const canvas = new win.OffscreenCanvas(Math.max(1, Math.round(width * scale)), Math.max(1, Math.round(height * scale)));
88740
+ const context = canvas.getContext("2d");
88741
+ context.scale(scale, scale);
88742
+ context.drawImage(image, 0, 0, width, height);
88743
+ return canvas.convertToBlob({ type: "image/png" });
88744
+ };
88745
+ win.addEventListener("message", async (event) => {
88746
+ const data = event.data;
88747
+ if (event.source !== win.parent || data?.type !== "ryugi:board:capture" || !Number.isSafeInteger(data.request) || !(data.scale > 0 && data.scale <= 4)) return;
88748
+ try {
88749
+ const { svg, width, height } = await serialize(win);
88750
+ const blob = await rasterize(svg, width, height, data.scale);
88751
+ post("snapshot", { request: data.request, blob, width, height });
88752
+ } catch (error) {
88753
+ post("snapshot", { request: data.request, error: String(error?.message ?? error).slice(0, 200) });
88754
+ }
88755
+ });
88756
+ }
88757
+ async function serializeBoard(win) {
88758
+ const doc = win.document;
88759
+ const unsupported = (reason) => new Error(`unsupported: ${reason}`);
88760
+ const blocked = doc.querySelector("video, audio, iframe, object, embed");
88761
+ if (blocked) throw unsupported(blocked.tagName.toLowerCase());
88762
+ const dataUrl = (blob) => new Promise((resolve, reject) => {
88763
+ const reader = new win.FileReader();
88764
+ reader.onload = () => resolve(String(reader.result));
88765
+ reader.onerror = () => reject(reader.error);
88766
+ reader.readAsDataURL(blob);
88767
+ });
88768
+ const files = /* @__PURE__ */ new Map();
88769
+ const load = (url) => {
88770
+ if (!files.has(url)) files.set(url, win.fetch(url).then((response) => {
88771
+ if (!response.ok) throw unsupported(`fetch ${url.slice(0, 120)}`);
88772
+ return response;
88773
+ }));
88774
+ return files.get(url).then((response) => response.clone());
88775
+ };
88776
+ const inline = async (url) => dataUrl(await (await load(url)).blob());
88777
+ const CSS_URL = /url\(\s*(['"]?)([^'")]+?)\1\s*\)/g;
88778
+ const IMPORT = /@import\s+(?:url\(\s*)?(['"]?)([^'")\s;]+)\1\s*\)?[^;]*;/g;
88779
+ const FONT_FACE = /@font-face\s*\{[^}]*\}/g;
88780
+ const faceKey = (family, weight, style, range) => [
88781
+ family.replace(/["']/g, "").trim().toLowerCase(),
88782
+ { normal: "400", bold: "700" }[weight.trim()] ?? weight.trim(),
88783
+ style.trim() || "normal",
88784
+ range.replace(/\s/g, "").toLowerCase()
88785
+ ].join("|");
88786
+ const faces = /* @__PURE__ */ new Map();
88787
+ for (const face of doc.fonts ?? []) {
88788
+ const key2 = faceKey(face.family, face.weight, face.style, face.unicodeRange);
88789
+ faces.set(key2, faces.get(key2) === true || face.status === "loaded");
88790
+ }
88791
+ const descriptor = (block, name, fallback) => new RegExp(`${name}\\s*:\\s*([^;}]+)`).exec(block)?.[1] ?? fallback;
88792
+ const unloaded = (block) => faces.get(faceKey(descriptor(block, "font-family", ""), descriptor(block, "font-weight", "400"), descriptor(block, "font-style", "normal"), descriptor(block, "unicode-range", "U+0-10FFFF"))) === false;
88793
+ const inlineCss = async (css, base, depth = 0) => {
88794
+ let text3 = css;
88795
+ for (const match of [...text3.matchAll(IMPORT)]) {
88796
+ const href = new URL(match[2], base).href;
88797
+ text3 = text3.replace(match[0], depth < 3 ? await inlineCss(await (await load(href)).text(), href, depth + 1) : "");
88798
+ }
88799
+ text3 = text3.replace(FONT_FACE, (block) => unloaded(block) ? "" : block);
88800
+ const urls = [...new Set([...text3.matchAll(CSS_URL)].map((match) => match[2]).filter((url) => !/^(?:data:|#|about:)/.test(url)))];
88801
+ const inlined = await Promise.all(urls.map((url) => inline(new URL(url, base).href)));
88802
+ return text3.replace(CSS_URL, (whole, _quote, url) => urls.includes(url) ? `url("${inlined[urls.indexOf(url)]}")` : whole).replace(/:root\b/g, "html");
88803
+ };
88804
+ const root = doc.documentElement;
88805
+ const clone = root.cloneNode(true);
88806
+ const source = [root, ...root.querySelectorAll("*")];
88807
+ const target = [clone, ...clone.querySelectorAll("*")];
88808
+ const jobs = [];
88809
+ for (let index = 0; index < source.length; index++) {
88810
+ const from = source[index], to3 = target[index];
88811
+ if (from.hasAttribute("data-ryugi-inspector")) continue;
88812
+ if (from.shadowRoot) {
88813
+ const style = win.getComputedStyle(from);
88814
+ to3.style.display = style.display;
88815
+ to3.style.verticalAlign = style.verticalAlign;
88816
+ to3.style.flex = style.flex;
88817
+ to3.innerHTML = from.shadowRoot.innerHTML.replace(/<style[\s\S]*?<\/style>/g, "");
88818
+ const svg = to3.querySelector("svg");
88819
+ if (svg) {
88820
+ svg.style.display = "block";
88821
+ svg.style.width = "100%";
88822
+ svg.style.height = "100%";
88823
+ }
88824
+ }
88825
+ if (from instanceof win.HTMLImageElement) {
88826
+ to3.removeAttribute("srcset");
88827
+ to3.removeAttribute("sizes");
88828
+ const src = from.currentSrc || from.src;
88829
+ if (src && !src.startsWith("data:")) jobs.push(inline(new URL(src, doc.baseURI).href).then((url) => to3.setAttribute("src", url)));
88830
+ } else if (from instanceof win.HTMLCanvasElement) {
88831
+ if (!from.getContext("2d")) throw unsupported("webgl canvas");
88832
+ let url = "";
88833
+ try {
88834
+ url = from.toDataURL();
88835
+ } catch {
88836
+ throw unsupported("tainted canvas");
88837
+ }
88838
+ const image = doc.createElement("img");
88839
+ image.src = url;
88840
+ image.setAttribute("style", from.getAttribute("style") ?? "");
88841
+ image.width = from.width;
88842
+ image.height = from.height;
88843
+ to3.replaceWith(image);
88844
+ } else if (from instanceof win.HTMLInputElement) {
88845
+ to3.setAttribute("value", from.value);
88846
+ if (from.checked) to3.setAttribute("checked", "");
88847
+ else to3.removeAttribute("checked");
88848
+ } else if (from instanceof win.HTMLTextAreaElement) {
88849
+ to3.textContent = from.value;
88850
+ } else if (from instanceof win.HTMLSelectElement) {
88851
+ to3.querySelectorAll("option").forEach((option, at7) => at7 === from.selectedIndex ? option.setAttribute("selected", "") : option.removeAttribute("selected"));
88852
+ } else if (from instanceof win.HTMLLinkElement && /\bstylesheet\b/i.test(from.rel) && from.href) {
88853
+ const href = new URL(from.href, doc.baseURI).href;
88854
+ jobs.push(load(href).then((response) => response.text()).then((css) => inlineCss(css, href)).then((css) => {
88855
+ const style = doc.createElement("style");
88856
+ style.textContent = css;
88857
+ to3.replaceWith(style);
88858
+ }));
88859
+ } else if (from instanceof win.HTMLStyleElement) {
88860
+ jobs.push(inlineCss(from.textContent ?? "", doc.baseURI).then((css) => {
88861
+ to3.textContent = css;
88862
+ }));
88863
+ }
88864
+ const inlineStyle = from.getAttribute("style");
88865
+ if (inlineStyle?.includes("url(")) jobs.push(inlineCss(inlineStyle, doc.baseURI).then((css) => to3.setAttribute("style", css)));
88866
+ }
88867
+ await Promise.all(jobs);
88868
+ for (const element of clone.querySelectorAll("script, noscript, link, [data-ryugi-inspector]")) element.remove();
88869
+ const width = win.innerWidth, height = win.innerHeight;
88870
+ const xhtml = new win.XMLSerializer().serializeToString(clone);
88871
+ return { svg: `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}"><foreignObject x="0" y="0" width="100%" height="100%">${xhtml}</foreignObject></svg>`, width, height };
88872
+ }
88873
+
88706
88874
  // src/shared/inspector.ts
88707
88875
  var INSPECTOR_PROPERTIES = [
88708
88876
  "width",
@@ -88728,23 +88896,23 @@ var COMMENT_CURSOR = `url("data:image/svg+xml,${encodeURIComponent(COMMENT_CURSO
88728
88896
 
88729
88897
  // src/shared/tweaks.ts
88730
88898
  function tweakTools() {
88731
- const object2 = (value) => !!value && typeof value === "object" && !Array.isArray(value);
88732
- const text2 = (value, max = 512) => typeof value === "string" && value.length <= max;
88733
- const number = (value) => typeof value === "number" && Number.isFinite(value) && Math.abs(value) <= 1e9;
88899
+ const object3 = (value) => !!value && typeof value === "object" && !Array.isArray(value);
88900
+ const text3 = (value, max = 512) => typeof value === "string" && value.length <= max;
88901
+ const number2 = (value) => typeof value === "number" && Number.isFinite(value) && Math.abs(value) <= 1e9;
88734
88902
  const color = (value) => typeof value === "string" && /^#[\da-f]{6}$/i.test(value);
88735
88903
  function valid(control, value) {
88736
- if (control.type === "text") return text2(value);
88904
+ if (control.type === "text") return text3(value);
88737
88905
  if (control.type === "color") return color(value);
88738
88906
  if (control.type === "boolean") return typeof value === "boolean";
88739
88907
  if (control.type === "enum") return typeof value === "string" && !!control.options?.some((option) => option.value === value);
88740
- if (!number(value) || control.min !== void 0 && value < control.min || control.max !== void 0 && value > control.max) return false;
88908
+ if (!number2(value) || control.min !== void 0 && value < control.min || control.max !== void 0 && value > control.max) return false;
88741
88909
  const steps = control.step === void 0 ? 0 : (value - (control.min ?? 0)) / control.step;
88742
88910
  return Math.abs(steps - Math.round(steps)) < 1e-7;
88743
88911
  }
88744
88912
  function readTweakSchema2(input) {
88745
88913
  if (input === null) return { schema: null, error: null };
88746
88914
  const fail = (message) => ({ schema: null, error: message });
88747
- if (!object2(input) || input.version !== 1 || !object2(input.controls)) return fail("Expected version 1 and a controls object.");
88915
+ if (!object3(input) || input.version !== 1 || !object3(input.controls)) return fail("Expected version 1 and a controls object.");
88748
88916
  const entries2 = Object.entries(input.controls);
88749
88917
  if (entries2.length > 32) return fail("Declare at most 32 parameters.");
88750
88918
  const controls = [];
@@ -88754,15 +88922,15 @@ function tweakTools() {
88754
88922
  if (!/^[A-Za-z][\w-]{0,63}$/.test(key2) || ["constructor", "prototype"].includes(key2)) return bad("invalid key.");
88755
88923
  if (keys2.has(key2.toLowerCase())) return bad("duplicate case-insensitive key.");
88756
88924
  keys2.add(key2.toLowerCase());
88757
- if (!object2(raw) || !["color", "range", "number", "boolean", "enum", "text"].includes(String(raw.type))) return bad("unsupported type.");
88758
- if (raw.label !== void 0 && !text2(raw.label, 128)) return bad("label must be short text.");
88759
- if (raw.section !== void 0 && !text2(raw.section, 128)) return bad("section must be short text.");
88925
+ if (!object3(raw) || !["color", "range", "number", "boolean", "enum", "text"].includes(String(raw.type))) return bad("unsupported type.");
88926
+ if (raw.label !== void 0 && !text3(raw.label, 128)) return bad("label must be short text.");
88927
+ if (raw.section !== void 0 && !text3(raw.section, 128)) return bad("section must be short text.");
88760
88928
  const control = { type: raw.type, label: raw.label ?? key2, default: raw.default };
88761
88929
  if (raw.section !== void 0) control.section = raw.section;
88762
88930
  if (control.type === "number" || control.type === "range") {
88763
88931
  for (const field of ["min", "max", "step"]) {
88764
88932
  if (raw[field] !== void 0) {
88765
- if (!number(raw[field])) return bad(`${field} must be a finite number.`);
88933
+ if (!number2(raw[field])) return bad(`${field} must be a finite number.`);
88766
88934
  control[field] = raw[field];
88767
88935
  }
88768
88936
  }
@@ -88776,9 +88944,9 @@ function tweakTools() {
88776
88944
  if (!Array.isArray(raw.options) || !raw.options.length || raw.options.length > 32) return bad("options must contain 1\u201332 choices.");
88777
88945
  const options = [];
88778
88946
  for (const option of raw.options) {
88779
- const value = typeof option === "string" ? option : object2(option) ? option.value : null;
88780
- const label = typeof option === "string" ? option : object2(option) ? option.label ?? value : null;
88781
- if (!text2(value) || !text2(label, 128) || control.type === "color" && !color(value) || options.some((entry) => entry.value === value)) return bad("invalid or duplicate option.");
88947
+ const value = typeof option === "string" ? option : object3(option) ? option.value : null;
88948
+ const label = typeof option === "string" ? option : object3(option) ? option.label ?? value : null;
88949
+ if (!text3(value) || !text3(label, 128) || control.type === "color" && !color(value) || options.some((entry) => entry.value === value)) return bad("invalid or duplicate option.");
88782
88950
  options.push({ value, label });
88783
88951
  }
88784
88952
  control.options = options;
@@ -88789,7 +88957,7 @@ function tweakTools() {
88789
88957
  return { schema: { version: 1, controls: Object.fromEntries(controls) }, error: null };
88790
88958
  }
88791
88959
  function readTweakValues2(schema, input) {
88792
- if (!object2(input) || Object.keys(input).length !== Object.keys(schema.controls).length) return null;
88960
+ if (!object3(input) || Object.keys(input).length !== Object.keys(schema.controls).length) return null;
88793
88961
  const entries2 = [];
88794
88962
  for (const [key2, control] of Object.entries(schema.controls)) {
88795
88963
  if (!Object.hasOwn(input, key2) || !valid(control, input[key2])) return null;
@@ -88985,7 +89153,7 @@ var EMBEDDED_STYLE = "<style>:root{color-scheme:light dark;background:transparen
88985
89153
  var UI_MARKER = /<ryugi-(?!icon(?:\s|>))[a-z0-9-]+(?:\s|>)/i;
88986
89154
  var UI_META = /<meta[^>]+name=["']ryugi-ui["'][^>]*>/i;
88987
89155
  function injectRuntime(html, options = {}) {
88988
- const inspect = options.inspector ? `;(${installTweaks.toString().replace(/\n/g, " ")})(window,${tweakTools.toString().replace(/\n/g, " ")});(${installInspector.toString().replace(/\n/g, " ")})(window,${JSON.stringify(INSPECTOR_PROPERTIES)},${JSON.stringify(COMMENT_CURSOR)});` : "";
89156
+ const inspect = options.inspector ? `;(${installTweaks.toString().replace(/\n/g, " ")})(window,${tweakTools.toString().replace(/\n/g, " ")});(${installInspector.toString().replace(/\n/g, " ")})(window,${JSON.stringify(INSPECTOR_PROPERTIES)},${JSON.stringify(COMMENT_CURSOR)});;(${installSnapshot.toString().replace(/\n/g, " ")})(window,${serializeBoard.toString().replace(/\n/g, " ")});` : "";
88989
89157
  const tag = `${options.embedded ? EMBEDDED_STYLE : ""}<script>${inspect || RUNTIME_LINE}</script>`;
88990
89158
  const ui2 = options.uiRuntimeUrl && !options.inspector && (UI_MARKER.test(html) || UI_META.test(html)) ? `<script defer src="${options.uiRuntimeUrl.replace(/"/g, "&quot;")}"></script>` : "";
88991
89159
  const icons = options.uiRuntimeUrl && (ui2 || /<ryugi-icon(?:\s|>)|<meta[^>]+name=["']ryugi-icons["']/i.test(html)) ? `<script defer src="${options.uiRuntimeUrl.replace(/ryugi-ui\.js$/, "ryugi-icons.js").replace(/"/g, "&quot;")}"></script>` : "";
@@ -89334,14 +89502,14 @@ function normalize(raw) {
89334
89502
  return config;
89335
89503
  }
89336
89504
  function readConfig(file) {
89337
- let text2;
89505
+ let text3;
89338
89506
  try {
89339
- text2 = import_node_fs14.default.readFileSync(file, "utf8");
89507
+ text3 = import_node_fs14.default.readFileSync(file, "utf8");
89340
89508
  } catch {
89341
89509
  return { config: defaults() };
89342
89510
  }
89343
89511
  try {
89344
- return { config: normalize(JSON.parse(text2)) };
89512
+ return { config: normalize(JSON.parse(text3)) };
89345
89513
  } catch (err) {
89346
89514
  return { config: defaults(), warning: `config.json is not valid JSON: ${err.message}` };
89347
89515
  }
@@ -89479,15 +89647,15 @@ function createRelayClient(options) {
89479
89647
  }, options.heartbeatMs ?? HEARTBEAT_MS);
89480
89648
  });
89481
89649
  ws2.on("message", (data) => {
89482
- const text2 = data.toString();
89483
- if (text2 === "pong") {
89650
+ const text3 = data.toString();
89651
+ if (text3 === "pong") {
89484
89652
  clearTimeout(pongDeadline);
89485
89653
  pongDeadline = void 0;
89486
89654
  return;
89487
89655
  }
89488
89656
  let message;
89489
89657
  try {
89490
- message = JSON.parse(text2);
89658
+ message = JSON.parse(text3);
89491
89659
  } catch {
89492
89660
  return;
89493
89661
  }
@@ -89568,7 +89736,7 @@ function encodeFrame(opcode, payload) {
89568
89736
  }
89569
89737
  return Buffer.concat([header, payload]);
89570
89738
  }
89571
- var textFrame = (text2) => encodeFrame(OPCODE_TEXT, Buffer.from(text2));
89739
+ var textFrame = (text3) => encodeFrame(OPCODE_TEXT, Buffer.from(text3));
89572
89740
  function completeHandshake(socket, clientKey) {
89573
89741
  socket.write(
89574
89742
  `HTTP/1.1 101 Switching Protocols\r
@@ -89630,10 +89798,10 @@ function createDirectRelay(options) {
89630
89798
  const sockets = /* @__PURE__ */ new Map();
89631
89799
  let opened = 0;
89632
89800
  const write = (socket, message) => socket.write(textFrame(JSON.stringify(message)));
89633
- const onText = async (socket, key2, conn, text2) => {
89801
+ const onText = async (socket, key2, conn, text3) => {
89634
89802
  let message;
89635
89803
  try {
89636
- message = JSON.parse(text2);
89804
+ message = JSON.parse(text3);
89637
89805
  } catch {
89638
89806
  return;
89639
89807
  }
@@ -89651,7 +89819,7 @@ function createDirectRelay(options) {
89651
89819
  const conn = `direct:${++opened}`;
89652
89820
  sockets.set(socket, { key: key2, conn });
89653
89821
  write(socket, { t: "presence", online: true, version: options.version });
89654
- handleClientFrames(socket, (text2) => void onText(socket, key2, conn, text2));
89822
+ handleClientFrames(socket, (text3) => void onText(socket, key2, conn, text3));
89655
89823
  const forget = () => {
89656
89824
  if (sockets.delete(socket)) options.onClose(conn);
89657
89825
  };
@@ -90109,25 +90277,25 @@ async function readJsonBody(req) {
90109
90277
  }
90110
90278
  }
90111
90279
  async function refuse(res) {
90112
- const text2 = await res.text().catch(() => "");
90280
+ const text3 = await res.text().catch(() => "");
90113
90281
  let parsed = {};
90114
90282
  try {
90115
- const body = JSON.parse(text2);
90283
+ const body = JSON.parse(text3);
90116
90284
  if (body && typeof body === "object") parsed = body;
90117
90285
  } catch {
90118
90286
  }
90119
90287
  const details = cloudErrorDetails(parsed);
90120
- const message = typeof parsed.error === "string" ? parsed.error : text2 || res.statusText;
90288
+ const message = typeof parsed.error === "string" ? parsed.error : text3 || res.statusText;
90121
90289
  if (res.status === 402 && details.code === "plan_limit" && details.upgradeUrl) throw new PlanLimited(message, details.upgradeUrl, details);
90122
90290
  throw new CloudRefused(res.status, `cloud refused (${res.status}): ${message}`, details);
90123
90291
  }
90124
90292
  async function errorMessage(res) {
90125
- const text2 = await res.text().catch(() => "");
90293
+ const text3 = await res.text().catch(() => "");
90126
90294
  try {
90127
- const parsed = JSON.parse(text2);
90128
- return typeof parsed.error === "string" ? parsed.error : text2;
90295
+ const parsed = JSON.parse(text3);
90296
+ return typeof parsed.error === "string" ? parsed.error : text3;
90129
90297
  } catch {
90130
- return text2 || res.statusText;
90298
+ return text3 || res.statusText;
90131
90299
  }
90132
90300
  }
90133
90301
  function fingerprintPayload(payload) {
@@ -90670,6 +90838,178 @@ function commentNames({ agentFile, projectDir, cloud }) {
90670
90838
  };
90671
90839
  }
90672
90840
 
90841
+ // src/shared/thumbnail.ts
90842
+ var STYLE3 = "<style>:root{--ink:#333;--muted:#85817c;--paper:#fff;--bg:#f3f2f0;--border:#dedcd7;--block:#f2f1ee;--alert:#f7eee4}@media (prefers-color-scheme: dark){:root{--ink:#e5e5e5;--muted:#a0a0a0;--paper:#292929;--bg:#1c1c1c;--border:#424242;--block:#353535;--alert:#3b342e}}text{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,sans-serif}rect{stroke-width:.8;vector-effect:non-scaling-stroke}</style>";
90843
+ var object2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
90844
+ var string = (value) => typeof value === "string" ? value : "";
90845
+ var children = (value) => Array.isArray(value) ? value.slice(0, 200).map(object2) : [];
90846
+ var escape4 = (value) => value.replace(/[&<>"']/g, (c10) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&apos;" })[c10]);
90847
+ var number = (value) => typeof value === "number" && Number.isFinite(value) && Math.abs(value) <= 1e9;
90848
+ var rect = (x9, y5, w5, h9, fill = "var(--paper)", stroke = "none") => `<rect x="${x9}" y="${y5}" width="${w5}" height="${h9}" fill="${fill}" stroke="${stroke}"/>`;
90849
+ var text2 = (x9, y5, value, size = 9, color = "var(--ink)", weight = 400) => `<text x="${x9}" y="${y5}" font-size="${size}" fill="${color}" font-weight="${weight}">${escape4(value)}</text>`;
90850
+ function wrap(value, size, width, limit) {
90851
+ const lines = [];
90852
+ let line = "", used = 0;
90853
+ for (const char of value.slice(0, 4e3)) {
90854
+ const advance = size * (char.codePointAt(0) >= 11904 ? 1 : 0.55);
90855
+ if (char === "\n" || used + advance > width) {
90856
+ lines.push(line);
90857
+ if (lines.length === limit) {
90858
+ lines[limit - 1] += "\u2026";
90859
+ return lines;
90860
+ }
90861
+ line = "";
90862
+ used = 0;
90863
+ }
90864
+ if (char !== "\n") {
90865
+ line += char;
90866
+ used += advance;
90867
+ }
90868
+ }
90869
+ if (line) lines.push(line);
90870
+ return lines;
90871
+ }
90872
+ function nodeText(node) {
90873
+ const pending = [node], parts = [];
90874
+ for (let i6 = 0; pending.length && i6 < 300; i6++) {
90875
+ const current = pending.pop();
90876
+ if (typeof current.text === "string") parts.push(current.text.slice(0, 4e3));
90877
+ else pending.push(...children(current.children).reverse());
90878
+ }
90879
+ return parts.join("").slice(0, 4e3);
90880
+ }
90881
+ function documentDrawing(title, payload) {
90882
+ const blocks = children(object2(object2(payload.state).root).children);
90883
+ const parts = [rect(0, 0, 600, 360, "var(--bg)"), rect(78, 18, 444, 540, "var(--paper)", "var(--border)")];
90884
+ let y5 = 47;
90885
+ const lines = (value, size, count, indent = 0, weight = 400) => {
90886
+ for (const line of wrap(value, size, 392 - indent, count)) {
90887
+ parts.push(text2(104 + indent, y5, line, size, "var(--ink)", weight));
90888
+ y5 += size * 1.5;
90889
+ }
90890
+ };
90891
+ if (blocks[0]?.type !== "heading") {
90892
+ lines(title, 18, 2, 0, 650);
90893
+ y5 += 7;
90894
+ }
90895
+ for (const block of blocks.slice(0, 18)) {
90896
+ if (y5 > 330) break;
90897
+ const type = string(block.type);
90898
+ if (type === "heading") {
90899
+ const size = block.tag === "h1" ? 18 : 11.5;
90900
+ y5 += block.tag === "h1" ? 0 : 8;
90901
+ lines(nodeText(block), size, 2, 0, 650);
90902
+ y5 += 8;
90903
+ } else if (type === "table") {
90904
+ const rows = children(block.children).slice(0, 5);
90905
+ const cols = Math.max(1, ...rows.map((row2) => children(row2.children).length));
90906
+ const width = 392 / cols;
90907
+ rows.forEach((row2, ri2) => {
90908
+ children(row2.children).forEach((cell, ci2) => {
90909
+ parts.push(rect(104 + ci2 * width, y5 - 8 + ri2 * 22, width, 22, ri2 === 0 ? "var(--block)" : "var(--paper)", "var(--border)"));
90910
+ parts.push(text2(109 + ci2 * width, y5 + 6 + ri2 * 22, wrap(nodeText(cell), 7.5, width - 10, 1)[0] ?? "", 7.5));
90911
+ });
90912
+ });
90913
+ y5 += rows.length * 22 + 10;
90914
+ } else if (type === "list") {
90915
+ children(block.children).slice(0, 4).forEach((item, i6) => {
90916
+ parts.push(text2(104, y5, block.listType === "number" ? `${i6 + 1}.` : "\u2022"));
90917
+ lines(nodeText(item), 9, 2, 13);
90918
+ });
90919
+ y5 += 8;
90920
+ } else if (type === "alert-quote") {
90921
+ const body = children(object2(object2(block.content).root).children).map(nodeText).join(" ");
90922
+ const rows = wrap(body, 9, 368, 3);
90923
+ parts.push(rect(104, y5 - 8, 392, rows.length * 14 + 16, "var(--alert)"), rect(104, y5 - 8, 2, rows.length * 14 + 16, "#c3986d"));
90924
+ rows.forEach((line) => {
90925
+ parts.push(text2(116, y5 + 7, line));
90926
+ y5 += 14;
90927
+ });
90928
+ y5 += 21;
90929
+ } else if (type === "code-block") {
90930
+ const rows = wrap(string(block.code), 8, 372, 4);
90931
+ parts.push(rect(104, y5 - 8, 392, rows.length * 12 + 18, "var(--block)"));
90932
+ rows.forEach((line) => {
90933
+ parts.push(text2(114, y5 + 6, line, 8));
90934
+ y5 += 12;
90935
+ });
90936
+ y5 += 20;
90937
+ } else if (type === "paragraph" || type === "quote") {
90938
+ lines(nodeText(block), 9, 3);
90939
+ y5 += 7;
90940
+ } else {
90941
+ parts.push(rect(104, y5 - 8, 392, 30, "var(--block)"), text2(114, y5 + 11, type.toUpperCase().slice(0, 30), 8, "var(--muted)"));
90942
+ y5 += 40;
90943
+ }
90944
+ }
90945
+ return parts.join("");
90946
+ }
90947
+ function box(value) {
90948
+ const b6 = object2(value);
90949
+ return [b6.x, b6.y, b6.w, b6.h].every(number) && b6.w > 0 && b6.h > 0 ? b6 : null;
90950
+ }
90951
+ function artboardDrawing(payload) {
90952
+ const canvas = object2(payload.canvas);
90953
+ const page = string(canvas.activePage) || string(children(canvas.pages)[0]?.id);
90954
+ const layout = object2(object2(object2(payload.layout).pages)[page]);
90955
+ const boards = Object.values(object2(canvas.boards)).slice(0, 2e3).map(object2).filter((b6) => b6.page === page && box(b6));
90956
+ const noteRects = object2(layout.notes), groupRects = object2(layout.groups);
90957
+ const bounds = object2(layout.bounds);
90958
+ let minX = bounds.minX, minY = bounds.minY, maxX = bounds.maxX, maxY = bounds.maxY;
90959
+ if (![minX, minY, maxX, maxY].every(number) || maxX <= minX || maxY <= minY) {
90960
+ if (!boards.length) return rect(0, 0, 600, 360, "var(--bg)");
90961
+ minX = Math.min(...boards.map((b6) => b6.x));
90962
+ minY = Math.min(...boards.map((b6) => b6.y));
90963
+ maxX = Math.max(...boards.map((b6) => b6.x + b6.w));
90964
+ maxY = Math.max(...boards.map((b6) => b6.y + b6.h));
90965
+ }
90966
+ const width = Math.max(1, maxX - minX), height = Math.max(1, maxY - minY);
90967
+ const scale = Math.min(556 / width, 316 / height);
90968
+ const tx = (600 - width * scale) / 2 - minX * scale;
90969
+ const ty = (360 - height * scale) / 2 - minY * scale;
90970
+ const shapes = [];
90971
+ for (const [id2, value] of Object.entries(groupRects).slice(0, 200)) {
90972
+ const b6 = box(value);
90973
+ if (!b6) continue;
90974
+ shapes.push(rect(b6.x, b6.y, b6.w, b6.h, "none", "var(--border)"));
90975
+ if (b6.w * scale > 85) shapes.push(text2(b6.x + 12 / scale, b6.y + 18 / scale, wrap(string(object2(object2(canvas.groups)[id2]).title), 7 / scale, b6.w - 24 / scale, 1)[0] ?? "", 7 / scale, "var(--muted)", 550));
90976
+ }
90977
+ for (const board of boards) {
90978
+ const b6 = box(board);
90979
+ shapes.push(rect(b6.x, b6.y, b6.w, b6.h, "var(--paper)", "var(--border)"));
90980
+ if (b6.w * scale > 70) shapes.push(text2(b6.x, b6.y - 5 / scale, wrap(string(board.title), 6 / scale, b6.w, 1)[0] ?? "", 6 / scale, "var(--muted)"));
90981
+ }
90982
+ for (const [id2, value] of Object.entries(object2(canvas.notes)).slice(0, 200)) {
90983
+ const note = object2(value), b6 = box(noteRects[id2]);
90984
+ if (note.page !== page || !b6) continue;
90985
+ if (note.kind === "sticky") {
90986
+ const color = /^#[\da-f]{3}(?:[\da-f]{3})?$/i.test(string(note.color)) ? string(note.color) : "#f0e2ad";
90987
+ shapes.push(rect(b6.x, b6.y, b6.w, b6.h, color));
90988
+ if (b6.w * scale > 35) wrap(string(note.text), 4.7 / scale, b6.w - 12 / scale, 3).forEach((line, i6) => {
90989
+ shapes.push(text2(b6.x + 6 / scale, b6.y + (10 + i6 * 7) / scale, line, 4.7 / scale, "#514a37"));
90990
+ });
90991
+ } else {
90992
+ const size = number(note.size) && note.size > 0 ? note.size : 96;
90993
+ if (size * scale > 3) shapes.push(text2(b6.x, b6.y + size, wrap(string(note.text), size, b6.w, 1)[0] ?? "", size, "var(--muted)", 600));
90994
+ }
90995
+ }
90996
+ return `${rect(0, 0, 600, 360, "var(--bg)")}<defs><pattern id="dots" width="12" height="12" patternUnits="userSpaceOnUse"><circle cx="1" cy="1" r=".65" fill="var(--border)"/></pattern></defs>${rect(0, 0, 600, 360, "url(#dots)")}<g transform="translate(${tx} ${ty}) scale(${scale})">${shapes.join("")}</g>`;
90997
+ }
90998
+ function renderThumbnail(artifact, value) {
90999
+ const title = artifact.title ?? artifact.id;
91000
+ let body;
91001
+ if (artifact.type === "document") body = documentDrawing(title, object2(value));
91002
+ else if (artifact.type === "artboard") body = artboardDrawing(object2(value));
91003
+ else {
91004
+ const key2 = `${artifact.project ?? ""}/${artifact.id}`;
91005
+ const index = [...key2].reduce((hash, c10) => Math.imul(hash, 31) + c10.charCodeAt(0) >>> 0, 0) % 5;
91006
+ const light = ["#eee8e0", "#e6ece8", "#e9e8f0", "#e5ebed", "#f0e7e4"][index];
91007
+ const dark = ["#312b25", "#25312a", "#2c2937", "#263036", "#342824"][index];
91008
+ body = `<style>:root{--cover:${light}}@media (prefers-color-scheme: dark){:root{--cover:${dark}}}</style>${rect(0, 0, 600, 360, "var(--cover)")}${text2(42, 91, "</>", 44, "var(--muted)", 500)}${wrap(title, 25, 505, 3).map((line, i6) => text2(42, 160 + i6 * 36, line, 25, "var(--ink)", 600)).join("")}${text2(42, 318, `${artifact.project ?? "RYUGI"} / HTML`, 11, "var(--muted)")}`;
91009
+ }
91010
+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 360"><title>${escape4(title)}</title>${STYLE3}${body}</svg>`;
91011
+ }
91012
+
90673
91013
  // src/server/viewer-page.ts
90674
91014
  var import_node_crypto9 = require("node:crypto");
90675
91015
  var escapeHtml2 = (value) => value.replace(/[&<>"']/g, (ch) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[ch]);
@@ -90943,6 +91283,7 @@ var SHELL_ROUTE = new RegExp(`^/(?:(${ARTIFACT_TYPES.join("|")})/([^/]+)/?)?$`);
90943
91283
  var API_ARTIFACT_ROUTE = /^\/api\/artifacts\/([^/]+)\/([^/]+)$/;
90944
91284
  var PREVIEW_ROUTE = /^\/preview\/(artboard|document|html)\/([a-z0-9][a-z0-9-]*)\/?$/;
90945
91285
  var API_PREVIEW_ROUTE = /^\/api\/preview\/([^/]+)\/([^/]+)$/;
91286
+ var API_THUMBNAIL_ROUTE = /^\/api\/thumbnail\/([^/]+)\/([^/]+)\.svg$/;
90946
91287
  var API_DOCUMENT_ROUTE = /^\/api\/document\/([^/]+)\/(state|update|comments)$/;
90947
91288
  var MAX_COMMENT_OP = 64 * 1024;
90948
91289
  var API_AGENT_COMMENTS_ROUTE = /^\/api\/agent\/document\/([^/]+)\/comments$/;
@@ -91325,10 +91666,10 @@ async function startArtifactsServer(options) {
91325
91666
  }));
91326
91667
  sendJson(res, 200, { project: import_node_path21.default.basename(import_node_path21.default.dirname(import_node_path21.default.dirname(root))), artifacts: summaries, warnings });
91327
91668
  };
91328
- function onClientText(socket, text2) {
91669
+ function onClientText(socket, text3) {
91329
91670
  let message;
91330
91671
  try {
91331
- message = JSON.parse(text2);
91672
+ message = JSON.parse(text3);
91332
91673
  } catch {
91333
91674
  return;
91334
91675
  }
@@ -91439,6 +91780,36 @@ async function startArtifactsServer(options) {
91439
91780
  }
91440
91781
  return;
91441
91782
  }
91783
+ const thumbnailMatch = API_THUMBNAIL_ROUTE.exec(pathname);
91784
+ if (thumbnailMatch) {
91785
+ const requested = artifactKeyOf(`${thumbnailMatch[1]}/${thumbnailMatch[2]}`);
91786
+ let resolved = null;
91787
+ try {
91788
+ resolved = requested && resolveArtifactAddress(root, requested.type, requested.id);
91789
+ } catch {
91790
+ resolved = null;
91791
+ }
91792
+ if (!resolved) {
91793
+ send(res, 404, "Artifact not found");
91794
+ return;
91795
+ }
91796
+ try {
91797
+ const ref = { type: resolved.type, id: resolved.id };
91798
+ const payload = readArtifact(resolved.dir, ref);
91799
+ const title = titleOf(payload, ref);
91800
+ const project = import_node_path21.default.basename(import_node_path21.default.dirname(import_node_path21.default.dirname(root)));
91801
+ const svg = renderThumbnail({ id: ref.id, type: ref.type, title, project }, ref.type === "html" ? null : publishPayload(ref, resolved.dir, title, payload));
91802
+ send(res, 200, svg, {
91803
+ "Content-Type": "image/svg+xml",
91804
+ "Cache-Control": "private, max-age=31536000, immutable",
91805
+ "Content-Security-Policy": "sandbox; default-src 'none'; style-src 'unsafe-inline'",
91806
+ "X-Content-Type-Options": "nosniff"
91807
+ });
91808
+ } catch {
91809
+ send(res, 422, "Thumbnail unavailable");
91810
+ }
91811
+ return;
91812
+ }
91442
91813
  if (pathname === "/api/cloud/flush") {
91443
91814
  if (req.method !== "POST" || key2 === null || !safeEqual(key2, token)) {
91444
91815
  send(res, 403, "Forbidden: agent calls need ?key=");
@@ -91572,7 +91943,7 @@ async function startArtifactsServer(options) {
91572
91943
  }
91573
91944
  completeHandshake(socket, clientKey);
91574
91945
  clients.add(socket);
91575
- handleClientFrames(socket, (text2) => onClientText(socket, text2));
91946
+ handleClientFrames(socket, (text3) => onClientText(socket, text3));
91576
91947
  const forget = () => {
91577
91948
  clients.delete(socket);
91578
91949
  selections.drop(socket);
@@ -91713,9 +92084,9 @@ async function startArtifactsServer(options) {
91713
92084
  let merging = false;
91714
92085
  if (ref.type === "document") {
91715
92086
  const session = await documents.open(ref.id);
91716
- const text2 = await import_node_fs24.default.promises.readFile(import_node_path21.default.join(dir, "doc.xml"), "utf8").catch(() => null);
91717
- if (session && text2 !== null) {
91718
- session.onFileText(text2);
92087
+ const text3 = await import_node_fs24.default.promises.readFile(import_node_path21.default.join(dir, "doc.xml"), "utf8").catch(() => null);
92088
+ if (session && text3 !== null) {
92089
+ session.onFileText(text3);
91719
92090
  const timeout = new Promise((resolve) => setTimeout(() => resolve("timeout"), CHECK_MERGE_WAIT_MS).unref());
91720
92091
  merging = await Promise.race([session.settled(), timeout]) === "timeout";
91721
92092
  }
@@ -91833,13 +92204,13 @@ function parseEnv(env, argv = []) {
91833
92204
  };
91834
92205
  }
91835
92206
  function readOwners(file) {
91836
- let text2;
92207
+ let text3;
91837
92208
  try {
91838
- text2 = import_node_fs25.default.readFileSync(file, "utf8");
92209
+ text3 = import_node_fs25.default.readFileSync(file, "utf8");
91839
92210
  } catch {
91840
92211
  return [];
91841
92212
  }
91842
- const pids = text2.split("\n").map((line) => Number(line.trim())).filter((pid) => Number.isInteger(pid) && pid > 1);
92213
+ const pids = text3.split("\n").map((line) => Number(line.trim())).filter((pid) => Number.isInteger(pid) && pid > 1);
91843
92214
  return [...new Set(pids)];
91844
92215
  }
91845
92216
  var liveOwners = (pids, alive) => pids.filter(alive);
@@ -91998,7 +92369,7 @@ function touchEntry(dir, entry) {
91998
92369
  }
91999
92370
 
92000
92371
  // package.json
92001
- var version = "1.39.3";
92372
+ var version = "1.40.0";
92002
92373
 
92003
92374
  // src/server/main.ts
92004
92375
  async function main() {