dorkos 0.129.0 → 0.130.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 (327) hide show
  1. package/dist/bin/cli.js +694 -513
  2. package/dist/browser/native/package-manifest.json +1 -1
  3. package/dist/browser/source-manifest.json +1 -1
  4. package/dist/client/assets/{AboutPage-CML_SdU1.js → AboutPage-B2CzVj5W.js} +1 -1
  5. package/dist/client/assets/{ActivityErrorState-TuQRJopr.js → ActivityErrorState-Dl-P-e0R.js} +1 -1
  6. package/dist/client/assets/{ActivityPage-CmSxeVSK.js → ActivityPage-CW7tqLHb.js} +1 -1
  7. package/dist/client/assets/{ActivityRow-DJhDehIR.js → ActivityRow-Vy4aXWk-.js} +1 -1
  8. package/dist/client/assets/{AdapterIcon-CeRDpZGz.js → AdapterIcon-aabKVZmM.js} +1 -1
  9. package/dist/client/assets/{AdapterSetupWizard-B6KkTuJo.js → AdapterSetupWizard-C5Hs0xkG.js} +2 -2
  10. package/dist/client/assets/{AgentOptionRow-388OJkPc.js → AgentOptionRow-CqIMxq9S.js} +1 -1
  11. package/dist/client/assets/{AgentPicker-C51wqToQ.js → AgentPicker-C6mbTDJJ.js} +1 -1
  12. package/dist/client/assets/{AgentRequestCard-Bz31ewIs.js → AgentRequestCard-C8GV5Sxn.js} +3 -3
  13. package/dist/client/assets/{AppearancePage-DSVeowGb.js → AppearancePage-C0JKrHsO.js} +1 -1
  14. package/dist/client/assets/{ApplyToOverridesDialog-DRtcLrVY.js → ApplyToOverridesDialog-DWEi0MNt.js} +1 -1
  15. package/dist/client/assets/{AttentionSignalRow-CqKZyoxB.js → AttentionSignalRow-Cpu0lKYg.js} +1 -1
  16. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-DA1jhqFy.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-_zVrHu5s.js} +1 -1
  17. package/dist/client/assets/{BindingDialog-D25PAed0.js → BindingDialog-4UeaJfUu.js} +1 -1
  18. package/dist/client/assets/BlintzCanvas-DCXIQZM_.js +1231 -0
  19. package/dist/client/assets/{CanvasCsvContent-ZWHWmb88.js → CanvasCsvContent-D-0TuvVs.js} +1 -1
  20. package/dist/client/assets/{CanvasFileContent-DR5pUgca.js → CanvasFileContent-DqSx7lz9.js} +2 -2
  21. package/dist/client/assets/{CanvasModel3dContent-OP1ZOMui.js → CanvasModel3dContent-zTx660yQ.js} +2 -2
  22. package/dist/client/assets/ChannelComposer-D4TYVkvO.js +45 -0
  23. package/dist/client/assets/{ChatAppsOff-ByitL4Xt.js → ChatAppsOff-BzfyQc55.js} +1 -1
  24. package/dist/client/assets/{CodeMirrorDiff-JsV_vWBa.js → CodeMirrorDiff-BLWBYGLp.js} +1 -1
  25. package/dist/client/assets/{CodeMirrorEditor-BfCJG9hQ.js → CodeMirrorEditor-D0q3ETxK.js} +1 -1
  26. package/dist/client/assets/{CommitmentList-yFV3_m00.js → CommitmentList-BoMiLsRe.js} +1 -1
  27. package/dist/client/assets/{CommitmentsPage-DeERVg-2.js → CommitmentsPage-_7mNJVUZ.js} +1 -1
  28. package/dist/client/assets/{ComputerResourceView-CYMMSE8Y.js → ComputerResourceView-Bo2LaCJf.js} +1 -1
  29. package/dist/client/assets/{ComputerViewer-H7kJSIj7.js → ComputerViewer-a4VSdAw_.js} +1 -1
  30. package/dist/client/assets/{ConnectionAccessLists-SRkf7-Y6.js → ConnectionAccessLists-Dvv0YO31.js} +1 -1
  31. package/dist/client/assets/{ConnectionsPage-D6e3hd4L.js → ConnectionsPage-oO8pNgbc.js} +2 -2
  32. package/dist/client/assets/{ConventionPage-CpvRMcSG.js → ConventionPage-CFJjwhBd.js} +2 -2
  33. package/dist/client/assets/{ExtensionPageRoute-CiFv6we8.js → ExtensionPageRoute-BqZN9q7M.js} +2 -2
  34. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-D-8CeYC7.js → FloatingTanStackRouterDevtools-CqogiFob-CnSp2ZEM.js} +1 -1
  35. package/dist/client/assets/{ForwardConsentHost-ml3b_fsX.js → ForwardConsentHost-4LhRvCdu.js} +1 -1
  36. package/dist/client/assets/HandlePage-BjoYPqme.js +1 -0
  37. package/dist/client/assets/{HeartbeatPage-C0zSvWH4.js → HeartbeatPage-rJzICayy.js} +1 -1
  38. package/dist/client/assets/{KeyEntry-Dq6eKAbX.js → KeyEntry-BTTuXleL.js} +1 -1
  39. package/dist/client/assets/{LexicalField-CYOqOLpV.js → LexicalField-Dk_SDrjk.js} +1 -1
  40. package/dist/client/assets/{ManagesPage-DZTMD3Al.js → ManagesPage-Cvu3CQDn.js} +1 -1
  41. package/dist/client/assets/{Marketplace-buSfuVrY.js → Marketplace-DPjPPlZz.js} +2 -2
  42. package/dist/client/assets/{MarketplaceSourcesView-BxwvBWgh.js → MarketplaceSourcesView-ChCys0on.js} +1 -1
  43. package/dist/client/assets/{McpAppFrame-CWiRFp8o.js → McpAppFrame-DNamtzOp.js} +2 -2
  44. package/dist/client/assets/{McpSigninBody-BpYSAV1h.js → McpSigninBody-DLw3ZdZE.js} +1 -1
  45. package/dist/client/assets/{Model3dViewer-B2KTvx6d.js → Model3dViewer-IwCBCPZ2.js} +1 -1
  46. package/dist/client/assets/NamePage-FY_D0eA2.js +1 -0
  47. package/dist/client/assets/NewDirectMessageMenu-BB0gvClR.js +1 -0
  48. package/dist/client/assets/{NotificationsPage-CWXIghVM.js → NotificationsPage-aCF0AtqL.js} +1 -1
  49. package/dist/client/assets/{OpenMeshSwitch-C9hiAEHP.js → OpenMeshSwitch-DjCWF2Vy.js} +2 -2
  50. package/dist/client/assets/{OperatorIdentityForm-CjmMoP6n.js → OperatorIdentityForm-Bcveds6f.js} +1 -1
  51. package/dist/client/assets/{PermissionHistory-D_Imuq02.js → PermissionHistory-CYsxFYmV.js} +1 -1
  52. package/dist/client/assets/{PermissionsPage-QMLV8PfB.js → PermissionsPage-sxHkY92V.js} +1 -1
  53. package/dist/client/assets/{PersonalityPopover-BL9DLK0Q.js → PersonalityPopover-BZ20JTnJ.js} +1 -1
  54. package/dist/client/assets/PhotoPage-KBzkb0sT.js +1 -0
  55. package/dist/client/assets/{PreviewRefusedNotice-Dt2hV0aJ.js → PreviewRefusedNotice-BFQPYcUG.js} +1 -1
  56. package/dist/client/assets/{ProfileFields-DD6X85w2.js → ProfileFields-sp17IFo8.js} +1 -1
  57. package/dist/client/assets/{ProfilePanelContainer-DuFEpNJ3.js → ProfilePanelContainer-mA44jh5A.js} +1 -1
  58. package/dist/client/assets/{ProfileRolePicker-CT9eJ1J0.js → ProfileRolePicker-Chh4_ZMB.js} +1 -1
  59. package/dist/client/assets/{PromptSuggestionChips-C8V611-5.js → PromptSuggestionChips-CEi_-fHF.js} +1 -1
  60. package/dist/client/assets/{ReportsToPopover-Bs55bP7b.js → ReportsToPopover-D1uknwnk.js} +1 -1
  61. package/dist/client/assets/RoomSurface-Clf1yLrr.js +1 -0
  62. package/dist/client/assets/{RoomsPage-CDiSwt-I.js → RoomsPage-BtCNzvhQ.js} +1 -1
  63. package/dist/client/assets/{RunsOnPopover-CFBDa9DO.js → RunsOnPopover-LCvBpe9J.js} +1 -1
  64. package/dist/client/assets/{RuntimeConnectFlow-DsawxJN7.js → RuntimeConnectFlow-C5UDeHUC.js} +1 -1
  65. package/dist/client/assets/{RuntimeSetupDialog-bdf844gx.js → RuntimeSetupDialog-Bqh67Vqb.js} +1 -1
  66. package/dist/client/assets/{SeenDevices-Cix5nnGQ.js → SeenDevices-DvCfdeDo.js} +3 -3
  67. package/dist/client/assets/{SessionsPage-CCu8rM-J.js → SessionsPage-DLByE-re.js} +1 -1
  68. package/dist/client/assets/{SettingsDialog-D7sVluoe.js → SettingsDialog-Co-Oxtyw.js} +3 -3
  69. package/dist/client/assets/{SkillsPage-SSq7ofgp.js → SkillsPage-Cc79IstM.js} +1 -1
  70. package/dist/client/assets/{TaskDialogWrapper-CBIuIbmj.js → TaskDialogWrapper-DuYV7Zch.js} +1 -1
  71. package/dist/client/assets/{TasksEmptyState-C0K_NOA3.js → TasksEmptyState-CfmPtBra.js} +2 -2
  72. package/dist/client/assets/{TasksPage-BpSn7GmR.js → TasksPage-DGk0zUhO.js} +1 -1
  73. package/dist/client/assets/{TeamComputerEntry-BAi9omUC.js → TeamComputerEntry-CLHbeX5i.js} +1 -1
  74. package/dist/client/assets/{ToolsPage-nkGWy6MR.js → ToolsPage-CSkDE7rZ.js} +2 -2
  75. package/dist/client/assets/{TopologyGraph-D6SSv0kC.js → TopologyGraph-pBC37k5P.js} +1 -1
  76. package/dist/client/assets/{TourHost-CrZciWIf.js → TourHost-CS9RsLj_.js} +1 -1
  77. package/dist/client/assets/{UnlinkDialog-B9zw8r6F.js → UnlinkDialog-CelhOUZ0.js} +1 -1
  78. package/dist/client/assets/{UnreadDivider-BnJ06LmP.js → UnreadDivider-B_OMR0mQ.js} +1 -1
  79. package/dist/client/assets/{WidgetErrorCard-CQKYI7oK.js → WidgetErrorCard-CsMqCyCb.js} +9 -9
  80. package/dist/client/assets/{WithheldExtensionsNotice-VMM5NjL5.js → WithheldExtensionsNotice-GiKb0iQu.js} +1 -1
  81. package/dist/client/assets/WorkQueuePage-Cu721KyM.js +1 -0
  82. package/dist/client/assets/{WorkView-D5d8DDxS.js → WorkView-CpWEaxMr.js} +1 -1
  83. package/dist/client/assets/_shell-CmGG8Ysk.js +80 -0
  84. package/dist/client/assets/{_shell._home-CcfELPIk.js → _shell._home-BnKkAeSp.js} +1 -1
  85. package/dist/client/assets/{_shell._home.activity-CGKsuLq8.js → _shell._home.activity-DaaLJbvO.js} +1 -1
  86. package/dist/client/assets/{_shell._home.index-DrJRgJCb.js → _shell._home.index-CNPasFxP.js} +2 -2
  87. package/dist/client/assets/_shell._home.tasks-DXEOJ5Nq.js +1 -0
  88. package/dist/client/assets/{_shell._home.workspaces-CjBJymCW.js → _shell._home.workspaces-UeSvmquR.js} +1 -1
  89. package/dist/client/assets/{_shell.channels-CzQFR6pU.js → _shell.channels-NUbf5mcb.js} +1 -1
  90. package/dist/client/assets/{_shell.connections-B5hafeep.js → _shell.connections-BEns4DKb.js} +1 -1
  91. package/dist/client/assets/{_shell.feedback-requests-DtD2bH-4.js → _shell.feedback-requests-NyjHNdnj.js} +2 -2
  92. package/dist/client/assets/_shell.marketplace-BEYqsDKe.js +1 -0
  93. package/dist/client/assets/_shell.marketplace_.sources-D6Ls30FY.js +1 -0
  94. package/dist/client/assets/_shell.session-CVc6i3eN.js +1 -0
  95. package/dist/client/assets/{_shell.team-BrGo-IxK.js → _shell.team-CXeOt4XD.js} +4 -4
  96. package/dist/client/assets/{_shell.threads-Ceq_tmNk.js → _shell.threads-BYdN1UtZ.js} +1 -1
  97. package/dist/client/assets/_shell.x._extensionId-DtJYSfvG.js +1 -0
  98. package/dist/client/assets/_shell.x._extensionId_._-DtJYSfvG.js +1 -0
  99. package/dist/client/assets/{abnfDiagram-WEYOIA3C-BN5bqwbu.js → abnfDiagram-WEYOIA3C-BLCVDt6M.js} +1 -1
  100. package/dist/client/assets/{access-copy-BAhTOOsG.js → access-copy-BSQ3QECN.js} +1 -1
  101. package/dist/client/assets/{arc-BfTE_VoF.js → arc-t4OhsI5R.js} +1 -1
  102. package/dist/client/assets/{architectureDiagram-ZHVYKT53-Dc6keeDz.js → architectureDiagram-ZHVYKT53-BcIfbGZR.js} +1 -1
  103. package/dist/client/assets/{banner-DOgGDCJ5.js → banner-B6xfuDA7.js} +1 -1
  104. package/dist/client/assets/{blockDiagram-RJAE7QA3-B4c6U-ob.js → blockDiagram-RJAE7QA3-DTOlrcEZ.js} +1 -1
  105. package/dist/client/assets/{c4Diagram-XDPPPE54-CCtD8QC8.js → c4Diagram-XDPPPE54-CHGqwaxa.js} +1 -1
  106. package/dist/client/assets/channel-CSk6LhO2.js +1 -0
  107. package/dist/client/assets/{chunk-2E7WHVMD-DcDNqIJG.js → chunk-2E7WHVMD-Bh4L_7yX.js} +1 -1
  108. package/dist/client/assets/{chunk-2Q5K7J3B-DOVVK0B8.js → chunk-2Q5K7J3B-BmouLl8r.js} +1 -1
  109. package/dist/client/assets/{chunk-4EMNKR2T-Cg-Do982.js → chunk-4EMNKR2T-BVhtiAdG.js} +1 -1
  110. package/dist/client/assets/{chunk-55XCU76K-CDmULSeY.js → chunk-55XCU76K-BdbLnE56.js} +1 -1
  111. package/dist/client/assets/{chunk-5VM5RSS4-Bi0yIWW1.js → chunk-5VM5RSS4-Qg9lQpPO.js} +1 -1
  112. package/dist/client/assets/{chunk-JWPE2WC7-ZHaJh6CV.js → chunk-JWPE2WC7-CfIrQaMW.js} +1 -1
  113. package/dist/client/assets/{chunk-VQ5W62QI-DZi6GyW_.js → chunk-VQ5W62QI-BP9oQzc0.js} +1 -1
  114. package/dist/client/assets/{chunk-XXDRQBXY-D18oZOrd.js → chunk-XXDRQBXY-DKzIjnsB.js} +1 -1
  115. package/dist/client/assets/{chunk-ZCHMQSOR-BkZ0l0fE.js → chunk-ZCHMQSOR-DsvG6BGY.js} +2 -2
  116. package/dist/client/assets/{classDiagram-v2-4MYWR3UA-BfmK1buF.js → classDiagram-v2-4MYWR3UA-BSiSmGgP.js} +1 -1
  117. package/dist/client/assets/{command-CZqA020F.js → command-B_FPXirc.js} +1 -1
  118. package/dist/client/assets/{copy-button-ByA00JGh.js → copy-button-Bp75zBSh.js} +1 -1
  119. package/dist/client/assets/{cose-bilkent-JH36ORCC-B1NTVSbk.js → cose-bilkent-JH36ORCC-CXgyrZix.js} +1 -1
  120. package/dist/client/assets/{cpu-DNvpMmNN.js → cpu-DpkNIYeK.js} +1 -1
  121. package/dist/client/assets/{cynefin-EF2NZ3EQ-CB_HMIZ8.js → cynefin-EF2NZ3EQ-DkmPO3hK.js} +1 -1
  122. package/dist/client/assets/{cynefinDiagram-WF24UDRP-MmIWYdc2.js → cynefinDiagram-WF24UDRP-BDknJT17.js} +1 -1
  123. package/dist/client/assets/{dagre-NK4GIZVX-BQay0k4e.js → dagre-NK4GIZVX-BR4J5E3b.js} +1 -1
  124. package/dist/client/assets/{detail-row-290qyusq.js → detail-row-C8zz6mAC.js} +1 -1
  125. package/dist/client/assets/{diagram-CBK3MWTC-C1lRH4cb.js → diagram-CBK3MWTC-CvLKqPry.js} +1 -1
  126. package/dist/client/assets/{diagram-I5XIIV2D-CnANa27A.js → diagram-I5XIIV2D-CVtE60X9.js} +1 -1
  127. package/dist/client/assets/{diagram-ODIL2UCW-Cwt7hxes.js → diagram-ODIL2UCW-B--CpfLk.js} +1 -1
  128. package/dist/client/assets/{diagram-PFBEJUXE-DZtAER77.js → diagram-PFBEJUXE-08gch1t1.js} +1 -1
  129. package/dist/client/assets/{diagram-RJA3I4VV-CbVXbiGs.js → diagram-RJA3I4VV-C2e-ubaD.js} +1 -1
  130. package/dist/client/assets/{diagram-TYUNFSNR-D-AcGdsL.js → diagram-TYUNFSNR-DcpK4OXX.js} +1 -1
  131. package/dist/client/assets/{ebnfDiagram-V4P3TTPT-DLkrFSAy.js → ebnfDiagram-V4P3TTPT-DM44BkBt.js} +1 -1
  132. package/dist/client/assets/{elk-QONTBCTQ-DQM6Glxa.js → elk-QONTBCTQ-maYS1Zzm.js} +1 -1
  133. package/dist/client/assets/{empty-state-BnuM8oop.js → empty-state-HtOTBAoq.js} +1 -1
  134. package/dist/client/assets/{erDiagram-KYQIGQAA-C1qgB1Mn.js → erDiagram-KYQIGQAA-BR7z9r2M.js} +1 -1
  135. package/dist/client/assets/{execution-config-BjLHHc9x.js → execution-config-DYYeJyJh.js} +1 -1
  136. package/dist/client/assets/{file-D7_QdH_S.js → file-VtGYNr9E.js} +1 -1
  137. package/dist/client/assets/{file-exclamation-point-Cdt8YqyQ.js → file-exclamation-point-eBlQssyW.js} +1 -1
  138. package/dist/client/assets/{file-text-CB9l6Ur-.js → file-text-DvNAxTGZ.js} +1 -1
  139. package/dist/client/assets/{find-latest-widget-fence-SQB9WgjN.js → find-latest-widget-fence-C2qXvASs.js} +3 -3
  140. package/dist/client/assets/{flowDiagram-IUGLLWBU-DH-ePeFu.js → flowDiagram-IUGLLWBU-DiuMtMbj.js} +1 -1
  141. package/dist/client/assets/{form--HjBAzX8.js → form-CGIIzr1u.js} +1 -1
  142. package/dist/client/assets/{format-cron-svkfKW5b.js → format-cron-BzJ6ekoo.js} +1 -1
  143. package/dist/client/assets/{ganttDiagram-R7GPNTJY-fjb_iAW1.js → ganttDiagram-R7GPNTJY-Cf_z8Ri1.js} +1 -1
  144. package/dist/client/assets/{git-branch-CPOwiT8a.js → git-branch-BVzjBPW-.js} +1 -1
  145. package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-CcCqH5T3.js → gitGraphDiagram-PDYL7XHY-RZXACCBr.js} +1 -1
  146. package/dist/client/assets/{graph-DS3J2jnN.js → graph-DfAV_ObD.js} +1 -1
  147. package/dist/client/assets/{heart-C6uRnXx3.js → heart-BMOCYMFT.js} +1 -1
  148. package/dist/client/assets/{highlighted-body-KPVGNVTW-CNygKq0i.js → highlighted-body-KPVGNVTW-DrrsaKBc.js} +1 -1
  149. package/dist/client/assets/{image-lightbox-BQV3i0WJ.js → image-lightbox-tAwBNBhm.js} +1 -1
  150. package/dist/client/assets/{image-off-B88WBkcV.js → image-off-BpagBHk1.js} +1 -1
  151. package/dist/client/assets/{index-UJpgX--l.js → index-0uCJUW_h.js} +2 -2
  152. package/dist/client/assets/index-0y0K3rYv.js +1 -0
  153. package/dist/client/assets/{index-B_YZ5cyn.js → index-2GjydAcS.js} +1 -1
  154. package/dist/client/assets/{index-tRdq7FGO.js → index-6dsaPQ7-.js} +1 -1
  155. package/dist/client/assets/{index-DhqeMM58.js → index-7-yzdcAx.js} +3 -3
  156. package/dist/client/assets/{index-DXZ-w0Z9.js → index-A7HgzxSw.js} +1 -1
  157. package/dist/client/assets/{index-BTqJGL1_.js → index-BEqKTiCR.js} +1 -1
  158. package/dist/client/assets/{index-B_v2l2ND.js → index-BIN0yv4s.js} +1 -1
  159. package/dist/client/assets/{index-B6pmysqs.js → index-BL5Vmq62.js} +1 -1
  160. package/dist/client/assets/index-BOvFXsF_.js +1 -0
  161. package/dist/client/assets/{index-BtTqA4_d.js → index-BbcfxnHC.js} +1 -1
  162. package/dist/client/assets/{index-D0QV18E0.js → index-BdKIijqB.js} +1 -1
  163. package/dist/client/assets/{index-CZmU-67J.js → index-BfAymWoj.js} +1 -1
  164. package/dist/client/assets/{index-COXdXByr.js → index-Bgts5its.js} +1 -1
  165. package/dist/client/assets/{index-DYQjub9g.js → index-BiL3chP7.js} +1 -1
  166. package/dist/client/assets/{index-C7I0BjyX.js → index-Bu3PEVA_.js} +1 -1
  167. package/dist/client/assets/{index-BKdXHSbr.js → index-C6DTV4h3.js} +1 -1
  168. package/dist/client/assets/{index-DK8zHloW.js → index-CCH9c-nB.js} +1 -1
  169. package/dist/client/assets/{index-oc-yQ5Q4.js → index-CH4NJ8dD.js} +1 -1
  170. package/dist/client/assets/{index-BxsALYNM.js → index-CKGJp3Cm.js} +1 -1
  171. package/dist/client/assets/{index-BIZNH5u1.js → index-CeqI4FFw.js} +1 -1
  172. package/dist/client/assets/{index-Cbk19RQp.js → index-Cj9-XXKl.js} +1 -1
  173. package/dist/client/assets/{index-um-0KSur.js → index-Cu8tnfM_.js} +1 -1
  174. package/dist/client/assets/{index-B_rc9Pb1.js → index-D4OWRMsG.js} +1 -1
  175. package/dist/client/assets/{index-RQhQx8gq.js → index-D8SP73Xw.js} +1 -1
  176. package/dist/client/assets/{index-CEicS7Zi.js → index-DEJXVqcY.js} +1 -1
  177. package/dist/client/assets/{index-CTJA-mZu.js → index-DEMZynQt.js} +1 -1
  178. package/dist/client/assets/{index-5RD9flqf.js → index-DGzMwE1Z.js} +1 -1
  179. package/dist/client/assets/{index-CLTrC-a-.js → index-DIJdZqg2.js} +3 -3
  180. package/dist/client/assets/{index-Ds9wPt9M.js → index-DIRqrOEK.js} +1 -1
  181. package/dist/client/assets/{index-DBAPfYwE.js → index-DNbdGvs9.js} +1 -1
  182. package/dist/client/assets/{index-D5fV4hrl.js → index-DOBjxRe9.js} +1 -1
  183. package/dist/client/assets/{index-57qzL_5b.js → index-DcBlHsnC.js} +1 -1
  184. package/dist/client/assets/index-DdsaTuqO.js +1 -0
  185. package/dist/client/assets/{index-BN3zOTbR.js → index-Dt4H9Tms.js} +3 -3
  186. package/dist/client/assets/{index-BNq_mnok.js → index-HXC63Ry8.js} +1 -1
  187. package/dist/client/assets/index-MHIn2TC9.js +1063 -0
  188. package/dist/client/assets/{index-DdBvjuc4.js → index-OjJ_8uMM.js} +1 -1
  189. package/dist/client/assets/index-P4Wos1Gi.css +1 -0
  190. package/dist/client/assets/{index-Bktc0aFV.js → index-U5jTIqzv.js} +1 -1
  191. package/dist/client/assets/{index-CLVvKY2v.js → index-ZzPr9GUI.js} +1 -1
  192. package/dist/client/assets/{index-DO8NbOqk.js → index-d9cqTUAj.js} +1 -1
  193. package/dist/client/assets/{index-Cbbw2ByB.js → index-fcfCRITA.js} +1 -1
  194. package/dist/client/assets/{index-3CJSEcZE.js → index-onQlu3UR.js} +1 -1
  195. package/dist/client/assets/{index.esm-B10OaB6F.js → index.esm-DSKTDEoH.js} +1 -1
  196. package/dist/client/assets/{infoDiagram-MVDRKAX5-CGtvYWtj.js → infoDiagram-MVDRKAX5-B8dulOBe.js} +1 -1
  197. package/dist/client/assets/{inline-code-BL-6EKVP.js → inline-code-B3qpjdZ2.js} +1 -1
  198. package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-ICsVVT2t.js → ishikawaDiagram-HPEHV2GE-Cy8aIg0O.js} +1 -1
  199. package/dist/client/assets/{journeyDiagram-BOSHW7O7-DEmSX2Hn.js → journeyDiagram-BOSHW7O7-BZAlejG3.js} +1 -1
  200. package/dist/client/assets/{kanban-definition-FNSA4HC5-SAV5PQOr.js → kanban-definition-FNSA4HC5-BxS1edpe.js} +1 -1
  201. package/dist/client/assets/{layers-Bfdpn7ZM.js → layers-ByCM7XO5.js} +1 -1
  202. package/dist/client/assets/{lightbulb-CSPTiZoi.js → lightbulb-KjW8YTXH.js} +1 -1
  203. package/dist/client/assets/{link-2-ZzmN9B9k.js → link-2-CtFfuMO5.js} +1 -1
  204. package/dist/client/assets/{list-runtime-types-7qV7HQ7K.js → list-runtime-types-DrzHejZo.js} +1 -1
  205. package/dist/client/assets/{markdown-content-CiDXslQf.js → markdown-content-DgiSdNwz.js} +1 -1
  206. package/dist/client/assets/mention-pill-CHPHlu-U.js +1 -0
  207. package/dist/client/assets/{mermaid.core-C-qvGQ5g.js → mermaid.core-ovqlC4PC.js} +4 -4
  208. package/dist/client/assets/{message-square-off-BehEHG9c.js → message-square-off-CEOyy4Pq.js} +1 -1
  209. package/dist/client/assets/{mindmap-definition-6OY57UG3-DzU2APoo.js → mindmap-definition-6OY57UG3-CsngqLzI.js} +1 -1
  210. package/dist/client/assets/{more-details-DF2dJXMV.js → more-details-BW9mauVT.js} +1 -1
  211. package/dist/client/assets/{owner-notice-DoH-_Veh.js → owner-notice-BRUVafHC.js} +1 -1
  212. package/dist/client/assets/{package-Fm_v1gMn.js → package-Bbs99yqi.js} +1 -1
  213. package/dist/client/assets/{page-container-Bcz5wJVR.js → page-container-BVfGgaaJ.js} +1 -1
  214. package/dist/client/assets/{pane-resize-handle-_EuIpxzc.js → pane-resize-handle-BL7Meu5R.js} +1 -1
  215. package/dist/client/assets/{paperclip-AGN67YEM.js → paperclip-QOWXs8-5.js} +1 -1
  216. package/dist/client/assets/{path-input-jrT0Ap4j.js → path-input-BDRHmgzW.js} +1 -1
  217. package/dist/client/assets/{pegDiagram-ECIUJNBX-CAyGJ7fm.js → pegDiagram-ECIUJNBX-DPsWmWqw.js} +1 -1
  218. package/dist/client/assets/{pieDiagram-GNMPY74T-tmLJe1p-.js → pieDiagram-GNMPY74T-BdOIDv4F.js} +1 -1
  219. package/dist/client/assets/{plug-C-4o4Kb8.js → plug-BrsPyUhu.js} +1 -1
  220. package/dist/client/assets/primer-trigger-C97fRm1v.js +3 -0
  221. package/dist/client/assets/{profile-errors-vJU1kT3U.js → profile-errors-nPLX60ha.js} +1 -1
  222. package/dist/client/assets/{progress-BTu_QWg8.js → progress-C9TALtIa.js} +1 -1
  223. package/dist/client/assets/{quadrantDiagram-D57K4MC3-CUr2zJoz.js → quadrantDiagram-D57K4MC3-MzMEunU7.js} +1 -1
  224. package/dist/client/assets/{query-error-state-BCX32dab.js → query-error-state-BJjgx-WC.js} +1 -1
  225. package/dist/client/assets/{radio-DBitPjM1.js → radio-Biql29-B.js} +1 -1
  226. package/dist/client/assets/{railroadDiagram-Y72NRBL7-Bk9OMEWz.js → railroadDiagram-Y72NRBL7-Dzx_PYVW.js} +1 -1
  227. package/dist/client/assets/registry-B0HgbN69.js +1 -0
  228. package/dist/client/assets/registry-fiUD5cv6.js +39 -0
  229. package/dist/client/assets/{relay-trace-schemas-C-1Js81V.js → relay-trace-schemas-BJ4MfChd.js} +2 -2
  230. package/dist/client/assets/{repeat-B1wCYWXI.js → repeat-CKufDGoQ.js} +1 -1
  231. package/dist/client/assets/{requirementDiagram-EQYSW5RA-B2pkljrw.js → requirementDiagram-EQYSW5RA-J0pg6FEt.js} +1 -1
  232. package/dist/client/assets/{room-files-source-BDkq0-fd.js → room-files-source-iaYdshKo.js} +2 -2
  233. package/dist/client/assets/{rotate-ccw-clock-Ds8cHkxD.js → rotate-ccw-clock-CnARSw5V.js} +1 -1
  234. package/dist/client/assets/{rotate-cw-hUzouNTK.js → rotate-cw-BAn_5-Gq.js} +1 -1
  235. package/dist/client/assets/{sankeyDiagram-SY24JHO5-DEW9eIPS.js → sankeyDiagram-SY24JHO5-6V_uy-zQ.js} +1 -1
  236. package/dist/client/assets/{scroll-area-RSd8NjrE.js → scroll-area-XDq7yL_d.js} +1 -1
  237. package/dist/client/assets/{sequenceDiagram-BLEHNHQU-CoiCdD1D.js → sequenceDiagram-BLEHNHQU-C4jZi3N4.js} +1 -1
  238. package/dist/client/assets/{shield-x-KL4ZbHfz.js → shield-x-CpiXuMbN.js} +1 -1
  239. package/dist/client/assets/{signed-in-Dzxe2378.js → signed-in-Rv3Sjk8n.js} +1 -1
  240. package/dist/client/assets/{sizeCapture-INFHLROL-BWGf0Ghs.js → sizeCapture-INFHLROL-B7nxFreb.js} +1 -1
  241. package/dist/client/assets/{soul-file-BQXbWArv.js → soul-file-BQz4TtHo.js} +1 -1
  242. package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-aeqwGZMB.js → stateDiagram-v2-A6IESKWZ-B5rvc4n2.js} +1 -1
  243. package/dist/client/assets/{swimlanes-B3ENRKFQ-BkWhAAlV.js → swimlanes-B3ENRKFQ-DnElusDo.js} +1 -1
  244. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-DLpKz5fF.js +8 -0
  245. package/dist/client/assets/{table-CfLst6CF.js → table-NGiWzPO4.js} +1 -1
  246. package/dist/client/assets/{timeline-definition-JXYKGLGB-C1BUxIfq.js → timeline-definition-JXYKGLGB-DMgyn3XX.js} +1 -1
  247. package/dist/client/assets/{trust-posture-CfEIPM4Z.js → trust-posture-BArJ9H4j.js} +1 -1
  248. package/dist/client/assets/{unplug-B3eDst8L.js → unplug-MSjeZ0tJ.js} +1 -1
  249. package/dist/client/assets/{unverified-catalog-notice-BqIWxQuN.js → unverified-catalog-notice-DA96H8Df.js} +1 -1
  250. package/dist/client/assets/{use-bindings-DhOKnybh.js → use-bindings-BojBqRJS.js} +1 -1
  251. package/dist/client/assets/{use-composer-prefs-_rlNL0D8.js → use-composer-prefs-BDl8aMme.js} +1 -1
  252. package/dist/client/assets/{use-connector-management-CHLdhBhC.js → use-connector-management-FONU6FK8.js} +1 -1
  253. package/dist/client/assets/{use-deep-link-scroll-BVkszEn2.js → use-deep-link-scroll-CtbBPBgi.js} +1 -1
  254. package/dist/client/assets/{use-delete-binding-BET7vH2R.js → use-delete-binding-COhBv6X3.js} +1 -1
  255. package/dist/client/assets/{use-dev-links-BjLPuSUC.js → use-dev-links-Dh0MCiGY.js} +1 -1
  256. package/dist/client/assets/{use-direct-message-panel-ClXVf94w.js → use-direct-message-panel-CYnWunqk.js} +1 -1
  257. package/dist/client/assets/{use-external-adapter-catalog-D1INoacX.js → use-external-adapter-catalog-RTDOW8Yi.js} +1 -1
  258. package/dist/client/assets/{use-filter-state-BRlb3qG3.js → use-filter-state-CSFTDx7z.js} +1 -1
  259. package/dist/client/assets/{use-full-activity-feed-GWBg-_1B.js → use-full-activity-feed-DlY_ZbRZ.js} +1 -1
  260. package/dist/client/assets/use-is-below-desktop-ClzGXlRb.js +1 -0
  261. package/dist/client/assets/{use-local-browser-C-V2n_wd.js → use-local-browser-WwZd-FOP.js} +1 -1
  262. package/dist/client/assets/{use-mesh-topology-BzSFyR_s.js → use-mesh-topology-WnFkjq41.js} +1 -1
  263. package/dist/client/assets/{use-mounted-ref-1T3JbkY1.js → use-mounted-ref-Dz1h70pz.js} +1 -1
  264. package/dist/client/assets/{use-notification-prefs-qcYeVmLQ.js → use-notification-prefs-IrF5_cko.js} +1 -1
  265. package/dist/client/assets/use-pending-read-CnAnzOt_.js +1 -0
  266. package/dist/client/assets/{use-personality-commit-CJb-rqmM.js → use-personality-commit-C4hYkSPy.js} +1 -1
  267. package/dist/client/assets/use-promo-activation-CPVANFBh.js +6 -0
  268. package/dist/client/assets/{use-promo-dismissals-C6bPU5Rm.js → use-promo-dismissals-B9m0HT6L.js} +1 -1
  269. package/dist/client/assets/{use-pulse-freshness-Y11Ibit1.js → use-pulse-freshness-DMySxN8D.js} +1 -1
  270. package/dist/client/assets/{use-room-follow-claim-Di-yvoJD.js → use-room-follow-claim-ByaYVY0o.js} +1 -1
  271. package/dist/client/assets/{use-room-sessions-CPDRbQAW.js → use-room-sessions-DPB29acU.js} +1 -1
  272. package/dist/client/assets/{use-roving-tab-list-DK0OzOUz.js → use-roving-tab-list-BO8kbs-w.js} +1 -1
  273. package/dist/client/assets/{use-session-canvas-DA2i9Mdm.js → use-session-canvas-Cunag2K7.js} +9 -9
  274. package/dist/client/assets/{use-status-budget-jMg_w0rF.js → use-status-budget-jt-9aQR0.js} +2 -2
  275. package/dist/client/assets/{use-transform-BX3r518L.js → use-transform-ydtuYUNp.js} +1 -1
  276. package/dist/client/assets/{use-unclaimed-chats-B0nk8b84.js → use-unclaimed-chats-ClBWJgNm.js} +1 -1
  277. package/dist/client/assets/use-update-config-ZHtOtve0.js +1 -0
  278. package/dist/client/assets/{useMutationState-Rlga1GBT.js → useMutationState-B8ArIqeH.js} +1 -1
  279. package/dist/client/assets/{usecaseDiagram-WPOLBNNX-mjIwRNL1.js → usecaseDiagram-WPOLBNNX-C5JdAkG9.js} +1 -1
  280. package/dist/client/assets/{vennDiagram-Q3Y3IDCW-BcDIpVa6.js → vennDiagram-Q3Y3IDCW-CqLCy7LU.js} +1 -1
  281. package/dist/client/assets/{wardleyDiagram-IVAIDKWA-NFX31kox.js → wardleyDiagram-IVAIDKWA-C9FlHLTd.js} +1 -1
  282. package/dist/client/assets/{xychartDiagram-4URNHDU4-DZZY7dL1.js → xychartDiagram-4URNHDU4-BIm-RUWd.js} +1 -1
  283. package/dist/client/index.html +2 -2
  284. package/dist/drizzle/20261101195529_work_queue.sql +38 -0
  285. package/dist/drizzle/20261101233656_dor3644_session_launched_by.sql +1 -0
  286. package/dist/drizzle/20261102041558_dor3070_marketplace_summary.sql +2 -0
  287. package/dist/drizzle/20261102051715_dor3440_clear_origin_holds.sql +10 -0
  288. package/dist/drizzle/20261102135442_agent_browser_profiles.sql +15 -0
  289. package/dist/drizzle/meta/20261101195529_snapshot.json +14363 -0
  290. package/dist/drizzle/meta/20261101233656_snapshot.json +14370 -0
  291. package/dist/drizzle/meta/20261102041558_snapshot.json +14384 -0
  292. package/dist/drizzle/meta/20261102051715_snapshot.json +14384 -0
  293. package/dist/drizzle/meta/20261102135442_snapshot.json +14483 -0
  294. package/dist/drizzle/meta/_journal.json +35 -0
  295. package/dist/server/extension-child.cjs +1147 -572
  296. package/dist/server/index.js +41788 -36880
  297. package/dist/server/index.js.map +2 -2
  298. package/package.json +3 -3
  299. package/dist/client/assets/BlintzCanvas-BgIQdpTx.js +0 -1231
  300. package/dist/client/assets/ChannelComposer-BJ0nNzQb.js +0 -45
  301. package/dist/client/assets/HandlePage-Bq5qdCfY.js +0 -1
  302. package/dist/client/assets/NamePage-_yT2RQvT.js +0 -1
  303. package/dist/client/assets/NewDirectMessageMenu-CMp4ppiH.js +0 -1
  304. package/dist/client/assets/PhotoPage-Djh4IZBF.js +0 -1
  305. package/dist/client/assets/RoomSurface-DXZ36tmU.js +0 -1
  306. package/dist/client/assets/_shell-CTKp94uQ.js +0 -80
  307. package/dist/client/assets/_shell._home.tasks-B_lv_-fX.js +0 -1
  308. package/dist/client/assets/_shell.marketplace-DUpaCb0r.js +0 -1
  309. package/dist/client/assets/_shell.marketplace_.sources-C3pA7zZW.js +0 -1
  310. package/dist/client/assets/_shell.session-DH_9f3AK.js +0 -1
  311. package/dist/client/assets/_shell.x._extensionId-DaXLhYNr.js +0 -1
  312. package/dist/client/assets/_shell.x._extensionId_._-DaXLhYNr.js +0 -1
  313. package/dist/client/assets/channel-CF9_Q7CV.js +0 -1
  314. package/dist/client/assets/index-3JL8A9YZ.css +0 -1
  315. package/dist/client/assets/index-BPp-rj-W.js +0 -1
  316. package/dist/client/assets/index-C4Uak2ha.js +0 -1
  317. package/dist/client/assets/index-Daoy3TZ8.js +0 -1
  318. package/dist/client/assets/index-YUtEyz7O.js +0 -1053
  319. package/dist/client/assets/mention-pill-CuSUdpn7.js +0 -1
  320. package/dist/client/assets/primer-trigger-CmE4Ib-X.js +0 -3
  321. package/dist/client/assets/registry-DVPRVi8T.js +0 -34
  322. package/dist/client/assets/registry-DiFfRDdW.js +0 -1
  323. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-CS2DMvLi.js +0 -8
  324. package/dist/client/assets/use-is-below-desktop-BjWA-tqP.js +0 -1
  325. package/dist/client/assets/use-pending-read-C1oA2H00.js +0 -1
  326. package/dist/client/assets/use-promo-activation-CAJItujg.js +0 -11
  327. package/dist/client/assets/use-update-config-Ce7sHmp2.js +0 -1
@@ -1 +1 @@
1
- import{gB as U}from"./index-YUtEyz7O.js";const G=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],q={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function H(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}function L(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}function P(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}function v(e){return P(e)||H(e)}const Y=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function D(e,r){const i=r||{},R=typeof i.additional=="string"?i.additional.charCodeAt(0):i.additional,E=[];let u=0,I=-1,g="",m,O;i.position&&("start"in i.position||"indent"in i.position?(O=i.position.indent,m=i.position.start):m=i.position);let S=(m?m.line:0)||1,h=(m?m.column:0)||1,w=A(),p;for(u--;++u<=e.length;)if(p===10&&(h=(O?O[I]:0)||1),p=e.charCodeAt(u),p===38){const c=e.charCodeAt(u+1);if(c===9||c===10||c===12||c===32||c===38||c===60||Number.isNaN(c)||R&&c===R){g+=String.fromCharCode(p),h++;continue}const s=u+1;let l=s,n=s,f;if(c===35){n=++l;const t=e.charCodeAt(n);t===88||t===120?(f="hexadecimal",n=++l):f="decimal"}else f="named";let N="",C="",a="";const k=f==="named"?v:f==="decimal"?H:L;for(n--;++n<=e.length;){const t=e.charCodeAt(n);if(!k(t))break;a+=String.fromCharCode(t),f==="named"&&G.includes(a)&&(N=a,C=U(a))}let b=e.charCodeAt(n)===59;if(b){n++;const t=f==="named"?U(a):!1;t&&(N=a,C=t)}let d=1+n-s,x="";if(!(!b&&i.nonTerminated===!1))if(!a)f!=="named"&&o(4,d);else if(f==="named"){if(b&&!C)o(5,1);else if(N!==a&&(n=l+N.length,d=1+n-l,b=!1),!b){const t=N?1:3;if(i.attribute){const y=e.charCodeAt(n);y===61?(o(t,d),C=""):v(y)?C="":o(t,d)}else o(t,d)}x=C}else{b||o(2,d);let t=Number.parseInt(a,f==="hexadecimal"?16:10);if(j(t))o(7,d),x="�";else if(t in q)o(6,d),x=q[t];else{let y="";z(t)&&o(6,d),t>65535&&(t-=65536,y+=String.fromCharCode(t>>>10|55296),t=56320|t&1023),x=y+String.fromCharCode(t)}}if(x){T(),w=A(),u=n-1,h+=n-s+1,E.push(x);const t=A();t.offset++,i.reference&&i.reference.call(i.referenceContext||void 0,x,{start:w,end:t},e.slice(s-1,n)),w=t}else a=e.slice(s-1,n),g+=a,h+=a.length,u=n-1}else p===10&&(S++,I++,h=0),Number.isNaN(p)?T():(g+=String.fromCharCode(p),h++);return E.join("");function A(){return{line:S,column:h,offset:u+((m?m.offset:0)||0)}}function o(c,s){let l;i.warning&&(l=A(),l.column+=s,l.offset+=s,i.warning.call(i.warningContext||void 0,Y[c],l,c))}function T(){g&&(E.push(g),i.text&&i.text.call(i.textContext||void 0,g,{start:w,end:A()}),g="")}}function j(e){return e>=55296&&e<=57343||e>1114111}function z(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}export{D as p};
1
+ import{gE as U}from"./index-MHIn2TC9.js";const G=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],q={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function H(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}function L(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}function P(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}function v(e){return P(e)||H(e)}const Y=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function M(e,r){const i=r||{},R=typeof i.additional=="string"?i.additional.charCodeAt(0):i.additional,E=[];let u=0,I=-1,g="",m,O;i.position&&("start"in i.position||"indent"in i.position?(O=i.position.indent,m=i.position.start):m=i.position);let S=(m?m.line:0)||1,h=(m?m.column:0)||1,w=A(),p;for(u--;++u<=e.length;)if(p===10&&(h=(O?O[I]:0)||1),p=e.charCodeAt(u),p===38){const c=e.charCodeAt(u+1);if(c===9||c===10||c===12||c===32||c===38||c===60||Number.isNaN(c)||R&&c===R){g+=String.fromCharCode(p),h++;continue}const s=u+1;let l=s,n=s,f;if(c===35){n=++l;const t=e.charCodeAt(n);t===88||t===120?(f="hexadecimal",n=++l):f="decimal"}else f="named";let N="",C="",a="";const k=f==="named"?v:f==="decimal"?H:L;for(n--;++n<=e.length;){const t=e.charCodeAt(n);if(!k(t))break;a+=String.fromCharCode(t),f==="named"&&G.includes(a)&&(N=a,C=U(a))}let b=e.charCodeAt(n)===59;if(b){n++;const t=f==="named"?U(a):!1;t&&(N=a,C=t)}let d=1+n-s,x="";if(!(!b&&i.nonTerminated===!1))if(!a)f!=="named"&&o(4,d);else if(f==="named"){if(b&&!C)o(5,1);else if(N!==a&&(n=l+N.length,d=1+n-l,b=!1),!b){const t=N?1:3;if(i.attribute){const y=e.charCodeAt(n);y===61?(o(t,d),C=""):v(y)?C="":o(t,d)}else o(t,d)}x=C}else{b||o(2,d);let t=Number.parseInt(a,f==="hexadecimal"?16:10);if(j(t))o(7,d),x="�";else if(t in q)o(6,d),x=q[t];else{let y="";z(t)&&o(6,d),t>65535&&(t-=65536,y+=String.fromCharCode(t>>>10|55296),t=56320|t&1023),x=y+String.fromCharCode(t)}}if(x){T(),w=A(),u=n-1,h+=n-s+1,E.push(x);const t=A();t.offset++,i.reference&&i.reference.call(i.referenceContext||void 0,x,{start:w,end:t},e.slice(s-1,n)),w=t}else a=e.slice(s-1,n),g+=a,h+=a.length,u=n-1}else p===10&&(S++,I++,h=0),Number.isNaN(p)?T():(g+=String.fromCharCode(p),h++);return E.join("");function A(){return{line:S,column:h,offset:u+((m?m.offset:0)||0)}}function o(c,s){let l;i.warning&&(l=A(),l.column+=s,l.offset+=s,i.warning.call(i.warningContext||void 0,Y[c],l,c))}function T(){g&&(E.push(g),i.text&&i.text.call(i.textContext||void 0,g,{start:w,end:A()}),g="")}}function j(e){return e>=55296&&e<=57343||e>1114111}function z(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}export{M as p};
@@ -1 +1 @@
1
- import{P as L,N as $,g as E,D as j,h as y,T as S,I as G}from"./index-CLTrC-a-.js";var N={};class v{constructor(t,e,s,i,h,r,n,o,a,u=0,f){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=h,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new v(t,[],e,s,s,0,[],0,i?new R(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=t&65535,{parser:h}=this.p,r=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),n=h.dynamicPrecedence(i);if(n&&(this.score+=n),s==0){i<h.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(h.getGoto(this.state,i,!0),this.reducePos),i<h.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,r?8:4,!0),this.reduceContext(i,this.reducePos);return}let o=this.stack.length-(s-1)*3-(t&262144?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from;i<h.minRepeatTerm&&a==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let u=this.reducePos-a;u>=2e3&&!(!((e=this.p.parser.nodeSet.types[i])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=u));let f=o?this.stack[o-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<h.minRepeatTerm||t&131072){let c=h.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,c,d+4,!0)}if(t&262144)this.state=this.stack[o];else{let c=this.stack[o-3];this.state=h.getGoto(c,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,h=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this.buffer.length;if(r>0&&this.buffer[r-4]==0&&this.buffer[r-1]>-1){if(e==s)return;if(this.buffer[r-2]>=e){this.buffer[r-2]=s;return}}}if(!h||this.pos==s)this.buffer.push(t,e,s,i);else{let r=this.buffer.length;if(r>0&&(this.buffer[r-4]!=0||this.buffer[r-1]<0)){let n=!1;for(let o=r;o>0&&this.buffer[o-2]>s;o-=4)if(this.buffer[o-1]>=0){n=!0;break}if(n)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}}shift(t,e,s,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let h=t,{parser:r}=this.p;this.pos=i;let n=r.stateFlag(h,1);!n&&(i>s||e<=r.maxNode)&&(this.reducePos=i),this.pushState(h,n?s:Math.min(s,this.reducePos)),this.shiftContext(e,s),e<=r.maxNode&&this.buffer.push(e,s,i,4)}else this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4)}apply(t,e,s,i){t&65536?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(e&&t.buffer[e-4]==0&&(e-=4);e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new v(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new U(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(s==0)return!1;if((s&65536)==0)return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let h=0,r;h<e.length;h+=2)(r=e[h+1])!=this.state&&this.p.parser.hasAction(r,t)&&i.push(e[h],r);if(this.stack.length<120)for(let h=0;i.length<8&&h<e.length;h+=2){let r=e[h+1];i.some((n,o)=>o&1&&n==r)||i.push(e[h],r)}e=i}let s=[];for(let i=0;i<e.length&&s.length<4;i+=2){let h=e[i+1];if(h==this.state)continue;let r=this.split();r.pushState(h,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[i],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if((e&65536)==0)return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=e&65535,h=this.stack.length-s*3;if(h<0||t.getGoto(this.stack[h],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;e=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],s=(i,h)=>{if(!e.includes(i))return e.push(i),t.allActions(i,r=>{if(!(r&393216))if(r&65536){let n=(r>>19)-h;if(n>1){let o=r&65535,a=this.stack.length-n*3;if(a>=0&&t.getGoto(this.stack[a],o,!1)>=0)return n<<19|65536|o}}else{let n=s(r,h+1);if(n!=null)return n}})};return s(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new R(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return t<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class R{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class U{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=t&65535,s=t>>19;s==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(s-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class A{constructor(t,e,s){this.stack=t,this.pos=e,this.index=s,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new A(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new A(this.stack,this.pos,this.index)}}function x(l,t=Uint16Array){if(typeof l!="string")return l;let e=null;for(let s=0,i=0;s<l.length;){let h=0;for(;;){let r=l.charCodeAt(s++),n=!1;if(r==126){h=65535;break}r>=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,n=!0),h+=o,n)break;h*=46}e?e[i++]=h:e=new t(h)}return e}class P{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const z=new P;class H{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=z,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let s=this.range,i=this.rangeIndex,h=this.pos+t;for(;h<s.from;){if(!i)return null;let r=this.ranges[--i];h-=s.from-r.to,s=r}for(;e<0?h>s.to:h>=s.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];h+=r.from-s.to,s=r}return h}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e=this.chunkOff+t,s,i;if(e>=0&&e<this.chunk.length)s=this.pos+t,i=this.chunk.charCodeAt(e);else{let h=this.resolveOffset(t,1);if(h==null)return-1;if(s=h,s>=this.chunk2Pos&&s<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(s-this.chunk2Pos);else{let r=this.rangeIndex,n=this.range;for(;n.to<=s;)n=this.ranges[++r];this.chunk2=this.input.chunk(this.chunk2Pos=s),s+this.chunk2.length>n.to&&(this.chunk2=this.chunk2.slice(0,n.to-s)),i=this.chunk2.charCodeAt(0)}}return s>=this.token.lookAhead&&(this.token.lookAhead=s+1),i}acceptToken(t,e=0){let s=e?this.resolveOffset(e,-1):this.pos;if(s==null||s<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=s}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=z,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let s="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(s+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return s}}class m{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:s}=e.p;O(this.data,t,e,this.id,s.data,s.tokenPrecTable)}}m.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class W{constructor(t,e,s){this.precTable=e,this.elseToken=s,this.data=typeof t=="string"?x(t):t}token(t,e){let s=t.pos,i=0;for(;;){let h=t.next<0,r=t.resolveOffset(1,1);if(O(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(this.elseToken==null)return;if(h||i++,r==null)break;t.reset(r,t.token)}i&&(t.reset(s,t.token),t.acceptToken(this.elseToken,i))}}W.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class Z{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function O(l,t,e,s,i,h){let r=0,n=1<<s,{dialect:o}=e.p.parser;t:for(;(n&l[r])!=0;){let a=l[r+1];for(let c=r+3;c<a;c+=2)if((l[c+1]&n)>0){let p=l[c];if(o.allows(p)&&(t.token.value==-1||t.token.value==p||q(p,t.token.value,i,h))){t.acceptToken(p);break}}let u=t.next,f=0,d=l[r+2];if(t.next<0&&d>f&&l[a+d*3-3]==65535){r=l[a+d*3-1];continue t}for(;f<d;){let c=f+d>>1,p=a+c+(c<<1),b=l[p],M=l[p+1]||65536;if(u<b)d=c;else if(u>=M)f=c+1;else{r=l[p+2],t.advance();continue t}}break}}function I(l,t,e){for(let s=t,i;(i=l[s])!=65535;s++)if(i==e)return s-t;return-1}function q(l,t,e,s){let i=I(e,s,t);return i<0||I(e,s,l)<i}const g=typeof process<"u"&&N&&/\bparse\b/.test(N.LOG);let T=null;function D(l,t,e){let s=l.cursor(G.IncludeAnonymous);for(s.moveTo(t);;)if(!(e<0?s.childBefore(t):s.childAfter(t)))for(;;){if((e<0?s.to<t:s.from>t)&&!s.type.isError)return e<0?Math.max(0,Math.min(s.to-1,t-25)):Math.min(l.length,Math.max(s.from+1,t+25));if(e<0?s.prevSibling():s.nextSibling())break;if(!s.parent())return e<0?0:l.length}}class J{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?D(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?D(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let s=this.trees[e],i=this.index[e];if(i==s.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let h=s.children[i],r=this.start[e]+s.positions[i];if(r>t)return this.nextStart=r,null;if(h instanceof S){if(r==t){if(r<this.safeFrom)return null;let n=r+h.length;if(n<=this.safeTo){let o=h.prop(y.lookAhead);if(!o||n+o<this.fragment.to)return h}}this.index[e]++,r+h.length>=Math.max(this.safeFrom,t)&&(this.trees.push(h),this.start.push(r),this.index.push(0))}else this.index[e]++,this.nextStart=r+h.length}}}class K{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(s=>new P)}getActions(t){let e=0,s=null,{parser:i}=t.p,{tokenizers:h}=i,r=i.stateSlot(t.state,3),n=t.curContext?t.curContext.hash:0,o=0;for(let a=0;a<h.length;a++){if((1<<a&r)==0)continue;let u=h[a],f=this.tokens[a];if(!(s&&!u.fallback)&&((u.contextual||f.start!=t.pos||f.mask!=r||f.context!=n)&&(this.updateCachedToken(f,u,t),f.mask=r,f.context=n),f.lookAhead>f.end+25&&(o=Math.max(f.lookAhead,o)),f.value!=0)){let d=e;if(f.extended>-1&&(e=this.addActions(t,f.extended,f.end,e)),e=this.addActions(t,f.value,f.end,e),!u.extend&&(s=f,e>d))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),!s&&t.pos==this.stream.end&&(s=new P,s.value=t.p.parser.eofTerm,s.start=s.end=t.pos,e=this.addActions(t,s.value,s.end,e)),this.mainToken=s,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new P,{pos:s,p:i}=t;return e.start=s,e.end=Math.min(s+1,i.stream.end),e.value=s==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,s){let i=this.stream.clipPos(s.pos);if(e.token(this.stream.reset(i,t),s),t.value>-1){let{parser:h}=s.p;for(let r=0;r<h.specialized.length;r++)if(h.specialized[r]==t.value){let n=h.specializers[r](this.stream.read(t.start,t.end),s);if(n>=0&&s.p.parser.dialect.allows(n>>1)){(n&1)==0?t.value=n>>1:t.extended=n>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,s,i){for(let h=0;h<i;h+=3)if(this.actions[h]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=s,i}addActions(t,e,s,i){let{state:h}=t,{parser:r}=t.p,{data:n}=r;for(let o=0;o<2;o++)for(let a=r.stateSlot(h,o?2:1);;a+=3){if(n[a]==65535)if(n[a+1]==1)a=k(n,a+2);else{i==0&&n[a+1]==2&&(i=this.putAction(k(n,a+2),e,s,i));break}n[a]==e&&(i=this.putAction(k(n,a+1),e,s,i))}return i}}class Q{constructor(t,e,s,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new H(e,i),this.tokens=new K(t,this.stream),this.topTerm=t.top[1];let{from:h}=i[0];this.stacks=[v.start(this,t.top[0],h)],this.fragments=s.length&&this.stream.end-h>t.bufferLength*4?new J(s,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,e=this.minStackPos,s=this.stacks=[],i,h;if(this.bigReductionCount>300&&t.length==1){let[r]=t;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;r<t.length;r++){let n=t[r];for(;;){if(this.tokens.mainToken=null,n.pos>e)s.push(n);else{if(this.advanceStack(n,s,t))continue;{i||(i=[],h=[]),i.push(n);let o=this.tokens.getMainToken(n);h.push(o.value,o.end)}}break}}if(!s.length){let r=i&&X(i);if(r)return g&&console.log("Finish with "+this.stackID(r)),this.stackToTree(r);if(this.parser.strict)throw g&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,h,s);if(r)return g&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(s.length>r)for(s.sort((n,o)=>o.score-n.score);s.length>r;)s.pop();s.some(n=>n.reducePos>e)&&this.recovering--}else if(s.length>1){t:for(let r=0;r<s.length-1;r++){let n=s[r];for(let o=r+1;o<s.length;o++){let a=s[o];if(n.sameState(a)||n.buffer.length>500&&a.buffer.length>500)if((n.score-a.score||n.buffer.length-a.buffer.length)>0)s.splice(o--,1);else{s.splice(r--,1);continue t}}}s.length>12&&(s.sort((r,n)=>n.score-r.score),s.splice(12,s.length-12))}this.minStackPos=s[0].pos;for(let r=1;r<s.length;r++)s[r].pos<this.minStackPos&&(this.minStackPos=s[r].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,s){let i=t.pos,{parser:h}=this,r=g?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let a=t.curContext&&t.curContext.tracker.strict,u=a?t.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?h.getGoto(t.state,f.type.id):-1;if(d>-1&&f.length&&(!a||(f.prop(y.contextHash)||0)==u))return t.useNode(f,d),g&&console.log(r+this.stackID(t)+` (via reuse of ${h.getName(f.type.id)})`),!0;if(!(f instanceof S)||f.children.length==0||f.positions[0]>0)break;let c=f.children[0];if(c instanceof S&&f.positions[0]==0)f=c;else break}}let n=h.stateSlot(t.state,4);if(n>0)return t.reduce(n),g&&console.log(r+this.stackID(t)+` (via always-reduce ${h.getName(n&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let o=this.tokens.getActions(t);for(let a=0;a<o.length;){let u=o[a++],f=o[a++],d=o[a++],c=a==o.length||!s,p=c?t:t.split(),b=this.tokens.mainToken;if(p.apply(u,f,b?b.start:p.pos,d),g&&console.log(r+this.stackID(p)+` (via ${(u&65536)==0?"shift":`reduce of ${h.getName(u&65535)}`} for ${h.getName(f)} @ ${i}${p==t?"":", split"})`),c)return!0;p.pos>i?e.push(p):s.push(p)}return!1}advanceFully(t,e){let s=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>s)return B(t,e),!0}}runRecovery(t,e,s){let i=null,h=!1;for(let r=0;r<t.length;r++){let n=t[r],o=e[r<<1],a=e[(r<<1)+1],u=g?this.stackID(n)+" -> ":"";if(n.deadEnd&&(h||(h=!0,n.restart(),g&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,s))))continue;let f=n.split(),d=u;for(let c=0;c<10&&f.forceReduce()&&(g&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,s));c++)g&&(d=this.stackID(f)+" -> ");for(let c of n.recoverByInsert(o))g&&console.log(u+this.stackID(c)+" (via recover-insert)"),this.advanceFully(c,s);this.stream.end>n.pos?(a==n.pos&&(a++,o=0),n.recoverByDelete(o,a),g&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),B(n,s)):(!i||i.score<f.score)&&(i=f)}return i}stackToTree(t){return t.close(),S.build({buffer:A.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(T||(T=new WeakMap)).get(t);return e||T.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function B(l,t){for(let e=0;e<t.length;e++){let s=t[e];if(s.pos==l.pos&&s.sameState(l)){t[e].score<l.score&&(t[e]=l);return}}t.push(l)}class V{constructor(t,e,s){this.source=t,this.flags=e,this.disabled=s}allows(t){return!this.disabled||this.disabled[t]==0}}const C=l=>l;class _{constructor(t){this.start=t.start,this.shift=t.shift||C,this.reduce=t.reduce||C,this.reuse=t.reuse||C,this.hash=t.hash||(()=>0),this.strict=t.strict!==!1}}class w extends L{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let n=0;n<t.repeatNodeCount;n++)e.push("");let s=Object.keys(t.topRules).map(n=>t.topRules[n][1]),i=[];for(let n=0;n<e.length;n++)i.push([]);function h(n,o,a){i[n].push([o,o.deserialize(String(a))])}if(t.nodeProps)for(let n of t.nodeProps){let o=n[0];typeof o=="string"&&(o=y[o]);for(let a=1;a<n.length;){let u=n[a++];if(u>=0)h(u,o,n[a++]);else{let f=n[a+-u];for(let d=-u;d>0;d--)h(n[a++],o,f);a++}}}this.nodeSet=new $(e.map((n,o)=>E.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:s.indexOf(o)>-1,error:o==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(o)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=j;let r=x(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;n<this.specializerSpecs.length;n++)this.specialized[n]=this.specializerSpecs[n].term;this.specializers=this.specializerSpecs.map(F),this.states=x(t.states,Uint32Array),this.data=x(t.stateData),this.goto=x(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(n=>typeof n=="number"?new m(r,n):n),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,s){let i=new Q(this,t,e,s);for(let h of this.wrappers)i=h(i,t,e,s);return i}getGoto(t,e,s=!1){let i=this.goto;if(e>=i[0])return-1;for(let h=i[e+1];;){let r=i[h++],n=r&1,o=i[h++];if(n&&s)return o;for(let a=h+(r>>1);h<a;h++)if(i[h]==t)return o;if(n)return-1}}hasAction(t,e){let s=this.data;for(let i=0;i<2;i++)for(let h=this.stateSlot(t,i?2:1),r;;h+=3){if((r=s[h])==65535)if(s[h+1]==1)r=s[h=k(s,h+2)];else{if(s[h+1]==2)return k(s,h+2);break}if(r==e||r==0)return k(s,h+1)}return 0}stateSlot(t,e){return this.states[t*6+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,s=>s==e?!0:null)}allActions(t,e){let s=this.stateSlot(t,4),i=s?e(s):void 0;for(let h=this.stateSlot(t,1);i==null;h+=3){if(this.data[h]==65535)if(this.data[h+1]==1)h=k(this.data,h+2);else break;i=e(k(this.data,h+1))}return i}nextStates(t){let e=[];for(let s=this.stateSlot(t,1);;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=k(this.data,s+2);else break;if((this.data[s+2]&1)==0){let i=this.data[s+1];e.some((h,r)=>r&1&&h==i)||e.push(this.data[s],i)}}return e}configure(t){let e=Object.assign(Object.create(w.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let s=this.topRules[t.top];if(!s)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=s}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(s=>{let i=t.tokenizers.find(h=>h.from==s);return i?i.to:s})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((s,i)=>{let h=t.specializers.find(n=>n.from==s.external);if(!h)return s;let r=Object.assign(Object.assign({},s),{external:h.to});return e.specializers[i]=F(r),r})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),t.bufferLength!=null&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return e==null?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),s=e.map(()=>!1);if(t)for(let h of t.split(" ")){let r=e.indexOf(h);r>=0&&(s[r]=!0)}let i=null;for(let h=0;h<e.length;h++)if(!s[h])for(let r=this.dialects[e[h]],n;(n=this.data[r++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[n]=1;return new V(t,s,i)}static deserialize(t){return new w(t)}}function k(l,t){return l[t]|l[t+1]<<16}function X(l){let t=null;for(let e of l){let s=e.p.stoppedAt;(e.pos==e.p.stream.end||s!=null&&e.pos>s)&&e.p.parser.stateFlag(e.state,2)&&(!t||t.score<e.score)&&(t=e)}return t}function F(l){if(l.external){let t=l.extend?1:0;return(e,s)=>l.external(e,s)<<1|t}return l.get}export{_ as C,Z as E,w as L,W as a};
1
+ import{P as L,N as $,g as E,D as j,h as y,T as S,I as G}from"./index-DIJdZqg2.js";var N={};class v{constructor(t,e,s,i,h,r,n,o,a,u=0,f){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=h,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new v(t,[],e,s,s,0,[],0,i?new R(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=t&65535,{parser:h}=this.p,r=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),n=h.dynamicPrecedence(i);if(n&&(this.score+=n),s==0){i<h.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(h.getGoto(this.state,i,!0),this.reducePos),i<h.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,r?8:4,!0),this.reduceContext(i,this.reducePos);return}let o=this.stack.length-(s-1)*3-(t&262144?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from;i<h.minRepeatTerm&&a==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let u=this.reducePos-a;u>=2e3&&!(!((e=this.p.parser.nodeSet.types[i])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=u));let f=o?this.stack[o-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<h.minRepeatTerm||t&131072){let c=h.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,c,d+4,!0)}if(t&262144)this.state=this.stack[o];else{let c=this.stack[o-3];this.state=h.getGoto(c,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,h=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this.buffer.length;if(r>0&&this.buffer[r-4]==0&&this.buffer[r-1]>-1){if(e==s)return;if(this.buffer[r-2]>=e){this.buffer[r-2]=s;return}}}if(!h||this.pos==s)this.buffer.push(t,e,s,i);else{let r=this.buffer.length;if(r>0&&(this.buffer[r-4]!=0||this.buffer[r-1]<0)){let n=!1;for(let o=r;o>0&&this.buffer[o-2]>s;o-=4)if(this.buffer[o-1]>=0){n=!0;break}if(n)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}}shift(t,e,s,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let h=t,{parser:r}=this.p;this.pos=i;let n=r.stateFlag(h,1);!n&&(i>s||e<=r.maxNode)&&(this.reducePos=i),this.pushState(h,n?s:Math.min(s,this.reducePos)),this.shiftContext(e,s),e<=r.maxNode&&this.buffer.push(e,s,i,4)}else this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4)}apply(t,e,s,i){t&65536?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(e&&t.buffer[e-4]==0&&(e-=4);e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new v(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new U(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(s==0)return!1;if((s&65536)==0)return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let h=0,r;h<e.length;h+=2)(r=e[h+1])!=this.state&&this.p.parser.hasAction(r,t)&&i.push(e[h],r);if(this.stack.length<120)for(let h=0;i.length<8&&h<e.length;h+=2){let r=e[h+1];i.some((n,o)=>o&1&&n==r)||i.push(e[h],r)}e=i}let s=[];for(let i=0;i<e.length&&s.length<4;i+=2){let h=e[i+1];if(h==this.state)continue;let r=this.split();r.pushState(h,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[i],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if((e&65536)==0)return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=e&65535,h=this.stack.length-s*3;if(h<0||t.getGoto(this.stack[h],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;e=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],s=(i,h)=>{if(!e.includes(i))return e.push(i),t.allActions(i,r=>{if(!(r&393216))if(r&65536){let n=(r>>19)-h;if(n>1){let o=r&65535,a=this.stack.length-n*3;if(a>=0&&t.getGoto(this.stack[a],o,!1)>=0)return n<<19|65536|o}}else{let n=s(r,h+1);if(n!=null)return n}})};return s(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new R(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return t<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class R{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class U{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=t&65535,s=t>>19;s==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(s-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class A{constructor(t,e,s){this.stack=t,this.pos=e,this.index=s,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new A(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new A(this.stack,this.pos,this.index)}}function x(l,t=Uint16Array){if(typeof l!="string")return l;let e=null;for(let s=0,i=0;s<l.length;){let h=0;for(;;){let r=l.charCodeAt(s++),n=!1;if(r==126){h=65535;break}r>=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,n=!0),h+=o,n)break;h*=46}e?e[i++]=h:e=new t(h)}return e}class P{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const z=new P;class H{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=z,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let s=this.range,i=this.rangeIndex,h=this.pos+t;for(;h<s.from;){if(!i)return null;let r=this.ranges[--i];h-=s.from-r.to,s=r}for(;e<0?h>s.to:h>=s.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];h+=r.from-s.to,s=r}return h}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e=this.chunkOff+t,s,i;if(e>=0&&e<this.chunk.length)s=this.pos+t,i=this.chunk.charCodeAt(e);else{let h=this.resolveOffset(t,1);if(h==null)return-1;if(s=h,s>=this.chunk2Pos&&s<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(s-this.chunk2Pos);else{let r=this.rangeIndex,n=this.range;for(;n.to<=s;)n=this.ranges[++r];this.chunk2=this.input.chunk(this.chunk2Pos=s),s+this.chunk2.length>n.to&&(this.chunk2=this.chunk2.slice(0,n.to-s)),i=this.chunk2.charCodeAt(0)}}return s>=this.token.lookAhead&&(this.token.lookAhead=s+1),i}acceptToken(t,e=0){let s=e?this.resolveOffset(e,-1):this.pos;if(s==null||s<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=s}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=z,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let s="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(s+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return s}}class m{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:s}=e.p;O(this.data,t,e,this.id,s.data,s.tokenPrecTable)}}m.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class W{constructor(t,e,s){this.precTable=e,this.elseToken=s,this.data=typeof t=="string"?x(t):t}token(t,e){let s=t.pos,i=0;for(;;){let h=t.next<0,r=t.resolveOffset(1,1);if(O(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(this.elseToken==null)return;if(h||i++,r==null)break;t.reset(r,t.token)}i&&(t.reset(s,t.token),t.acceptToken(this.elseToken,i))}}W.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class Z{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function O(l,t,e,s,i,h){let r=0,n=1<<s,{dialect:o}=e.p.parser;t:for(;(n&l[r])!=0;){let a=l[r+1];for(let c=r+3;c<a;c+=2)if((l[c+1]&n)>0){let p=l[c];if(o.allows(p)&&(t.token.value==-1||t.token.value==p||q(p,t.token.value,i,h))){t.acceptToken(p);break}}let u=t.next,f=0,d=l[r+2];if(t.next<0&&d>f&&l[a+d*3-3]==65535){r=l[a+d*3-1];continue t}for(;f<d;){let c=f+d>>1,p=a+c+(c<<1),b=l[p],M=l[p+1]||65536;if(u<b)d=c;else if(u>=M)f=c+1;else{r=l[p+2],t.advance();continue t}}break}}function I(l,t,e){for(let s=t,i;(i=l[s])!=65535;s++)if(i==e)return s-t;return-1}function q(l,t,e,s){let i=I(e,s,t);return i<0||I(e,s,l)<i}const g=typeof process<"u"&&N&&/\bparse\b/.test(N.LOG);let T=null;function D(l,t,e){let s=l.cursor(G.IncludeAnonymous);for(s.moveTo(t);;)if(!(e<0?s.childBefore(t):s.childAfter(t)))for(;;){if((e<0?s.to<t:s.from>t)&&!s.type.isError)return e<0?Math.max(0,Math.min(s.to-1,t-25)):Math.min(l.length,Math.max(s.from+1,t+25));if(e<0?s.prevSibling():s.nextSibling())break;if(!s.parent())return e<0?0:l.length}}class J{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?D(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?D(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let s=this.trees[e],i=this.index[e];if(i==s.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let h=s.children[i],r=this.start[e]+s.positions[i];if(r>t)return this.nextStart=r,null;if(h instanceof S){if(r==t){if(r<this.safeFrom)return null;let n=r+h.length;if(n<=this.safeTo){let o=h.prop(y.lookAhead);if(!o||n+o<this.fragment.to)return h}}this.index[e]++,r+h.length>=Math.max(this.safeFrom,t)&&(this.trees.push(h),this.start.push(r),this.index.push(0))}else this.index[e]++,this.nextStart=r+h.length}}}class K{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(s=>new P)}getActions(t){let e=0,s=null,{parser:i}=t.p,{tokenizers:h}=i,r=i.stateSlot(t.state,3),n=t.curContext?t.curContext.hash:0,o=0;for(let a=0;a<h.length;a++){if((1<<a&r)==0)continue;let u=h[a],f=this.tokens[a];if(!(s&&!u.fallback)&&((u.contextual||f.start!=t.pos||f.mask!=r||f.context!=n)&&(this.updateCachedToken(f,u,t),f.mask=r,f.context=n),f.lookAhead>f.end+25&&(o=Math.max(f.lookAhead,o)),f.value!=0)){let d=e;if(f.extended>-1&&(e=this.addActions(t,f.extended,f.end,e)),e=this.addActions(t,f.value,f.end,e),!u.extend&&(s=f,e>d))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),!s&&t.pos==this.stream.end&&(s=new P,s.value=t.p.parser.eofTerm,s.start=s.end=t.pos,e=this.addActions(t,s.value,s.end,e)),this.mainToken=s,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new P,{pos:s,p:i}=t;return e.start=s,e.end=Math.min(s+1,i.stream.end),e.value=s==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,s){let i=this.stream.clipPos(s.pos);if(e.token(this.stream.reset(i,t),s),t.value>-1){let{parser:h}=s.p;for(let r=0;r<h.specialized.length;r++)if(h.specialized[r]==t.value){let n=h.specializers[r](this.stream.read(t.start,t.end),s);if(n>=0&&s.p.parser.dialect.allows(n>>1)){(n&1)==0?t.value=n>>1:t.extended=n>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,s,i){for(let h=0;h<i;h+=3)if(this.actions[h]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=s,i}addActions(t,e,s,i){let{state:h}=t,{parser:r}=t.p,{data:n}=r;for(let o=0;o<2;o++)for(let a=r.stateSlot(h,o?2:1);;a+=3){if(n[a]==65535)if(n[a+1]==1)a=k(n,a+2);else{i==0&&n[a+1]==2&&(i=this.putAction(k(n,a+2),e,s,i));break}n[a]==e&&(i=this.putAction(k(n,a+1),e,s,i))}return i}}class Q{constructor(t,e,s,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new H(e,i),this.tokens=new K(t,this.stream),this.topTerm=t.top[1];let{from:h}=i[0];this.stacks=[v.start(this,t.top[0],h)],this.fragments=s.length&&this.stream.end-h>t.bufferLength*4?new J(s,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,e=this.minStackPos,s=this.stacks=[],i,h;if(this.bigReductionCount>300&&t.length==1){let[r]=t;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;r<t.length;r++){let n=t[r];for(;;){if(this.tokens.mainToken=null,n.pos>e)s.push(n);else{if(this.advanceStack(n,s,t))continue;{i||(i=[],h=[]),i.push(n);let o=this.tokens.getMainToken(n);h.push(o.value,o.end)}}break}}if(!s.length){let r=i&&X(i);if(r)return g&&console.log("Finish with "+this.stackID(r)),this.stackToTree(r);if(this.parser.strict)throw g&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,h,s);if(r)return g&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(s.length>r)for(s.sort((n,o)=>o.score-n.score);s.length>r;)s.pop();s.some(n=>n.reducePos>e)&&this.recovering--}else if(s.length>1){t:for(let r=0;r<s.length-1;r++){let n=s[r];for(let o=r+1;o<s.length;o++){let a=s[o];if(n.sameState(a)||n.buffer.length>500&&a.buffer.length>500)if((n.score-a.score||n.buffer.length-a.buffer.length)>0)s.splice(o--,1);else{s.splice(r--,1);continue t}}}s.length>12&&(s.sort((r,n)=>n.score-r.score),s.splice(12,s.length-12))}this.minStackPos=s[0].pos;for(let r=1;r<s.length;r++)s[r].pos<this.minStackPos&&(this.minStackPos=s[r].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,s){let i=t.pos,{parser:h}=this,r=g?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let a=t.curContext&&t.curContext.tracker.strict,u=a?t.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?h.getGoto(t.state,f.type.id):-1;if(d>-1&&f.length&&(!a||(f.prop(y.contextHash)||0)==u))return t.useNode(f,d),g&&console.log(r+this.stackID(t)+` (via reuse of ${h.getName(f.type.id)})`),!0;if(!(f instanceof S)||f.children.length==0||f.positions[0]>0)break;let c=f.children[0];if(c instanceof S&&f.positions[0]==0)f=c;else break}}let n=h.stateSlot(t.state,4);if(n>0)return t.reduce(n),g&&console.log(r+this.stackID(t)+` (via always-reduce ${h.getName(n&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let o=this.tokens.getActions(t);for(let a=0;a<o.length;){let u=o[a++],f=o[a++],d=o[a++],c=a==o.length||!s,p=c?t:t.split(),b=this.tokens.mainToken;if(p.apply(u,f,b?b.start:p.pos,d),g&&console.log(r+this.stackID(p)+` (via ${(u&65536)==0?"shift":`reduce of ${h.getName(u&65535)}`} for ${h.getName(f)} @ ${i}${p==t?"":", split"})`),c)return!0;p.pos>i?e.push(p):s.push(p)}return!1}advanceFully(t,e){let s=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>s)return B(t,e),!0}}runRecovery(t,e,s){let i=null,h=!1;for(let r=0;r<t.length;r++){let n=t[r],o=e[r<<1],a=e[(r<<1)+1],u=g?this.stackID(n)+" -> ":"";if(n.deadEnd&&(h||(h=!0,n.restart(),g&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,s))))continue;let f=n.split(),d=u;for(let c=0;c<10&&f.forceReduce()&&(g&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,s));c++)g&&(d=this.stackID(f)+" -> ");for(let c of n.recoverByInsert(o))g&&console.log(u+this.stackID(c)+" (via recover-insert)"),this.advanceFully(c,s);this.stream.end>n.pos?(a==n.pos&&(a++,o=0),n.recoverByDelete(o,a),g&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),B(n,s)):(!i||i.score<f.score)&&(i=f)}return i}stackToTree(t){return t.close(),S.build({buffer:A.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(T||(T=new WeakMap)).get(t);return e||T.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function B(l,t){for(let e=0;e<t.length;e++){let s=t[e];if(s.pos==l.pos&&s.sameState(l)){t[e].score<l.score&&(t[e]=l);return}}t.push(l)}class V{constructor(t,e,s){this.source=t,this.flags=e,this.disabled=s}allows(t){return!this.disabled||this.disabled[t]==0}}const C=l=>l;class _{constructor(t){this.start=t.start,this.shift=t.shift||C,this.reduce=t.reduce||C,this.reuse=t.reuse||C,this.hash=t.hash||(()=>0),this.strict=t.strict!==!1}}class w extends L{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let n=0;n<t.repeatNodeCount;n++)e.push("");let s=Object.keys(t.topRules).map(n=>t.topRules[n][1]),i=[];for(let n=0;n<e.length;n++)i.push([]);function h(n,o,a){i[n].push([o,o.deserialize(String(a))])}if(t.nodeProps)for(let n of t.nodeProps){let o=n[0];typeof o=="string"&&(o=y[o]);for(let a=1;a<n.length;){let u=n[a++];if(u>=0)h(u,o,n[a++]);else{let f=n[a+-u];for(let d=-u;d>0;d--)h(n[a++],o,f);a++}}}this.nodeSet=new $(e.map((n,o)=>E.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:s.indexOf(o)>-1,error:o==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(o)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=j;let r=x(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;n<this.specializerSpecs.length;n++)this.specialized[n]=this.specializerSpecs[n].term;this.specializers=this.specializerSpecs.map(F),this.states=x(t.states,Uint32Array),this.data=x(t.stateData),this.goto=x(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(n=>typeof n=="number"?new m(r,n):n),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,s){let i=new Q(this,t,e,s);for(let h of this.wrappers)i=h(i,t,e,s);return i}getGoto(t,e,s=!1){let i=this.goto;if(e>=i[0])return-1;for(let h=i[e+1];;){let r=i[h++],n=r&1,o=i[h++];if(n&&s)return o;for(let a=h+(r>>1);h<a;h++)if(i[h]==t)return o;if(n)return-1}}hasAction(t,e){let s=this.data;for(let i=0;i<2;i++)for(let h=this.stateSlot(t,i?2:1),r;;h+=3){if((r=s[h])==65535)if(s[h+1]==1)r=s[h=k(s,h+2)];else{if(s[h+1]==2)return k(s,h+2);break}if(r==e||r==0)return k(s,h+1)}return 0}stateSlot(t,e){return this.states[t*6+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,s=>s==e?!0:null)}allActions(t,e){let s=this.stateSlot(t,4),i=s?e(s):void 0;for(let h=this.stateSlot(t,1);i==null;h+=3){if(this.data[h]==65535)if(this.data[h+1]==1)h=k(this.data,h+2);else break;i=e(k(this.data,h+1))}return i}nextStates(t){let e=[];for(let s=this.stateSlot(t,1);;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=k(this.data,s+2);else break;if((this.data[s+2]&1)==0){let i=this.data[s+1];e.some((h,r)=>r&1&&h==i)||e.push(this.data[s],i)}}return e}configure(t){let e=Object.assign(Object.create(w.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let s=this.topRules[t.top];if(!s)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=s}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(s=>{let i=t.tokenizers.find(h=>h.from==s);return i?i.to:s})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((s,i)=>{let h=t.specializers.find(n=>n.from==s.external);if(!h)return s;let r=Object.assign(Object.assign({},s),{external:h.to});return e.specializers[i]=F(r),r})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),t.bufferLength!=null&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return e==null?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),s=e.map(()=>!1);if(t)for(let h of t.split(" ")){let r=e.indexOf(h);r>=0&&(s[r]=!0)}let i=null;for(let h=0;h<e.length;h++)if(!s[h])for(let r=this.dialects[e[h]],n;(n=this.data[r++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[n]=1;return new V(t,s,i)}static deserialize(t){return new w(t)}}function k(l,t){return l[t]|l[t+1]<<16}function X(l){let t=null;for(let e of l){let s=e.p.stoppedAt;(e.pos==e.p.stream.end||s!=null&&e.pos>s)&&e.p.parser.stateFlag(e.state,2)&&(!t||t.score<e.score)&&(t=e)}return t}function F(l){if(l.external){let t=l.extend?1:0;return(e,s)=>l.external(e,s)<<1|t}return l.get}export{_ as C,Z as E,w as L,W as a};
@@ -1 +1 @@
1
- import{j as e,ct as j,ck as w,er as T,es as L,et as O,aZ as E,eu as z,B as u,ev as _,ew as B,Z as F,ex as Q,_ as M,ey as q,l as y,af as D}from"./index-YUtEyz7O.js";import{u as H}from"./use-is-below-desktop-BjWA-tqP.js";import{u as A}from"./use-pending-read-C1oA2H00.js";import{A as U}from"./AttentionSignalRow-CqKZyoxB.js";import{T as V,a as W}from"./table-CfLst6CF.js";import{u as Z}from"./use-pulse-freshness-Y11Ibit1.js";import{a as de}from"./use-pulse-freshness-Y11Ibit1.js";import{A as Y}from"./ActivityRow-DJhDehIR.js";import"./use-full-activity-feed-GWBg-_1B.js";function N({label:a,empty:i,allClear:n,action:o,children:l}){return e.jsxs("section",{children:[e.jsxs("div",{className:"mb-2 flex min-h-6 items-center justify-between gap-2",children:[e.jsx("h3",{className:"text-muted-foreground text-xs font-medium tracking-widest uppercase",children:a}),!i&&o]}),i?e.jsx("p",{className:"text-muted-foreground/70 text-xs",children:n}):l]})}const d=5,G={animate:{transition:{staggerChildren:.04}}};function J(){const a=j(),i=w(),{schedules:n,errors:o,activity:l,isLoading:m,total:c}=T(),t=L(),h=H(),b=A(m||t.isLoading),S=O(),C=E(s=>s.setRightPanelOpen),x=z(n),P=i==="/"&&!h,r=x.slice(0,d),p=o.slice(0,d-r.length),k=l.slice(0,d-r.length-p.length),I=new Set(n.map(s=>s.id)),g=x.slice(d).filter(s=>I.has(s.id)),R={...t,schedules:g},f=t.items.filter(s=>s.kind!=="schedule-approval").length+g.length,v=t.isAnyError;return P?null:e.jsxs(N,{label:"Needs attention",empty:!b&&c===0&&r.length===0&&f===0&&!v,allClear:"All quiet. Nothing needs you.",action:e.jsx(u,{variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>a({...y.home()}),children:"View all →"}),children:[v&&e.jsxs("div",{"data-slot":"pulse-waiting-unreadable",className:"mb-2 flex min-w-0 items-center gap-2.5 rounded-md px-2 py-1",children:[e.jsx("span",{className:"text-muted-foreground min-w-0 flex-1 text-xs",children:"Couldn’t check everything waiting on you."}),e.jsx(u,{variant:"ghost",size:"sm",className:"h-6 shrink-0 px-2 text-xs",onClick:t.retryFailed,children:"Try again"})]}),f>0&&e.jsxs("div",{"data-slot":"pulse-waiting-line",className:"mb-2 flex min-w-0 items-center gap-2.5 rounded-md px-2 py-1",children:[e.jsx("span",{className:"bg-status-warning size-1.5 shrink-0 rounded-full","aria-hidden":!0}),e.jsx("span",{className:"text-foreground/90 min-w-0 flex-1 text-xs",children:_(R)}),e.jsx(u,{variant:"ghost",size:"sm",className:"h-6 shrink-0 px-2 text-xs",onClick:()=>{h&&C(!1),B()},children:"Open Inbox"})]}),e.jsx(F,{initial:!1,children:r.map(s=>e.jsx(Q,{task:s,className:"mb-2"},s.id))}),e.jsxs(M.div,{variants:G,initial:"initial",animate:"animate",children:[p.map(s=>e.jsx(U,{signal:s},s.id)),k.map(s=>e.jsx(q,{notification:s,onOpen:()=>S(s)},s.id))]})]})}const K=5;function X(){const a=j(),i=w(),n=D(),{groups:o,isLoading:l}=Z(),m=A(l);if(i==="/activity"&&!n)return null;const c=o.flatMap(t=>t.items).slice(0,K);return e.jsx(N,{label:"Activity",empty:!m&&c.length===0,allClear:"No recent activity.",action:e.jsx(u,{variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>a({...y.activity()}),children:"Open activity →"}),children:e.jsx(V,{children:e.jsx(W,{children:c.map(t=>e.jsx(Y,{item:t},t.id))})})})}function le(){return e.jsxs("div",{"data-slot":"pulse",className:"flex h-full flex-col gap-6 overflow-y-auto p-4",children:[e.jsx(J,{}),e.jsx(X,{})]})}export{le as PulsePanel,de as usePulseFreshness};
1
+ import{j as e,ct as j,ck as w,eB as T,eC as E,eD as L,aZ as O,eE as z,B as u,eF as B,eG as F,Z as _,eH as Q,_ as D,eI as H,l as y,af as M}from"./index-MHIn2TC9.js";import{u as q}from"./use-is-below-desktop-ClzGXlRb.js";import{u as A}from"./use-pending-read-CnAnzOt_.js";import{A as U}from"./AttentionSignalRow-Cpu0lKYg.js";import{T as V,a as W}from"./table-NGiWzPO4.js";import{u as Z}from"./use-pulse-freshness-DMySxN8D.js";import{a as de}from"./use-pulse-freshness-DMySxN8D.js";import{A as G}from"./ActivityRow-Vy4aXWk-.js";import"./use-full-activity-feed-DlY_ZbRZ.js";function N({label:a,empty:i,allClear:n,action:o,children:l}){return e.jsxs("section",{children:[e.jsxs("div",{className:"mb-2 flex min-h-6 items-center justify-between gap-2",children:[e.jsx("h3",{className:"text-muted-foreground text-xs font-medium tracking-widest uppercase",children:a}),!i&&o]}),i?e.jsx("p",{className:"text-muted-foreground/70 text-xs",children:n}):l]})}const d=5,Y={animate:{transition:{staggerChildren:.04}}};function J(){const a=j(),i=w(),{schedules:n,errors:o,activity:l,isLoading:m,total:c}=T(),t=E(),h=q(),b=A(m||t.isLoading),C=L(),S=O(s=>s.setRightPanelOpen),x=z(n),P=i==="/"&&!h,r=x.slice(0,d),p=o.slice(0,d-r.length),k=l.slice(0,d-r.length-p.length),I=new Set(n.map(s=>s.id)),g=x.slice(d).filter(s=>I.has(s.id)),R={...t,schedules:g},f=t.items.filter(s=>s.kind!=="schedule-approval").length+g.length,v=t.isAnyError;return P?null:e.jsxs(N,{label:"Needs attention",empty:!b&&c===0&&r.length===0&&f===0&&!v,allClear:"All quiet. Nothing needs you.",action:e.jsx(u,{variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>a({...y.home()}),children:"View all →"}),children:[v&&e.jsxs("div",{"data-slot":"pulse-waiting-unreadable",className:"mb-2 flex min-w-0 items-center gap-2.5 rounded-md px-2 py-1",children:[e.jsx("span",{className:"text-muted-foreground min-w-0 flex-1 text-xs",children:"Couldn’t check everything waiting on you."}),e.jsx(u,{variant:"ghost",size:"sm",className:"h-6 shrink-0 px-2 text-xs",onClick:t.retryFailed,children:"Try again"})]}),f>0&&e.jsxs("div",{"data-slot":"pulse-waiting-line",className:"mb-2 flex min-w-0 items-center gap-2.5 rounded-md px-2 py-1",children:[e.jsx("span",{className:"bg-status-warning size-1.5 shrink-0 rounded-full","aria-hidden":!0}),e.jsx("span",{className:"text-foreground/90 min-w-0 flex-1 text-xs",children:B(R)}),e.jsx(u,{variant:"ghost",size:"sm",className:"h-6 shrink-0 px-2 text-xs",onClick:()=>{h&&S(!1),F()},children:"Open Inbox"})]}),e.jsx(_,{initial:!1,children:r.map(s=>e.jsx(Q,{task:s,className:"mb-2"},s.id))}),e.jsxs(D.div,{variants:Y,initial:"initial",animate:"animate",children:[p.map(s=>e.jsx(U,{signal:s},s.id)),k.map(s=>e.jsx(H,{notification:s,onOpen:()=>C(s)},s.id))]})]})}const K=5;function X(){const a=j(),i=w(),n=M(),{groups:o,isLoading:l}=Z(),m=A(l);if(i==="/activity"&&!n)return null;const c=o.flatMap(t=>t.items).slice(0,K);return e.jsx(N,{label:"Activity",empty:!m&&c.length===0,allClear:"No recent activity.",action:e.jsx(u,{variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>a({...y.activity()}),children:"Open activity →"}),children:e.jsx(V,{children:e.jsx(W,{children:c.map(t=>e.jsx(G,{item:t},t.id))})})})}function le(){return e.jsxs("div",{"data-slot":"pulse",className:"flex h-full flex-col gap-6 overflow-y-auto p-4",children:[e.jsx(J,{}),e.jsx(X,{})]})}export{le as PulsePanel,de as usePulseFreshness};
@@ -1,4 +1,4 @@
1
- import{a5 as wo,r as q,h3 as Ka,gP as qa,j as ne,G as $s,h4 as bo,X as Va,f as Ya,aZ as Ur,h5 as Ga,gm as ja,h6 as hs,B as Xa}from"./index-YUtEyz7O.js";import{u as Za}from"./use-roving-tab-list-DK0OzOUz.js";const Ja="dork.terminal.tabs",Fi=new Map;function Qa(t,e,i){const s=ts(t,e),r=Fi.get(s)??new Set;return r.add(i),Fi.set(s,r),()=>{r.delete(i),r.size||Fi.delete(s)}}function eh(t,e,i){const s=Er(t,e);s.ids.includes(i.id)||yo(t,e,{ids:[...s.ids,i.id],activeIndex:s.activeIndex,closedIds:[...s.closedIds??[],...i.closed?[i.id]:[]]});for(const r of Fi.get(ts(t,e))??[])r(i)}const ls={ids:[],activeIndex:0};function ts(t,e){return`${Ja}:${t??""}:${e}`}function Co(t,e){return e<=0||!Number.isInteger(t)||t<0?0:Math.min(t,e-1)}function Er(t,e){try{const i=sessionStorage.getItem(ts(t,e));if(!i)return ls;const s=JSON.parse(i);if(typeof s!="object"||s===null)return ls;const{ids:r,activeIndex:n,closedIds:o}=s,a=Array.isArray(r)?r.filter(c=>typeof c=="string"&&c.length>0):[],l=typeof n=="number"?n:0,h=Array.isArray(o)?a.filter(c=>o.includes(c)):[];return{ids:a,activeIndex:Co(l,a.length),...h.length?{closedIds:h}:{}}}catch{return ls}}function yo(t,e,i){try{const s={ids:i.ids,activeIndex:Co(i.activeIndex,i.ids.length)},r=i.ids.filter(n=>{var o;return(o=i.closedIds)==null?void 0:o.includes(n)});r.length&&(s.closedIds=r),sessionStorage.setItem(ts(t,e),JSON.stringify(s))}catch{}}/**
1
+ import{a5 as wo,r as q,h6 as Ka,gS as qa,j as ne,G as $s,h7 as bo,X as Va,f as Ya,aZ as Ur,h8 as Ga,gp as ja,h9 as hs,B as Xa}from"./index-MHIn2TC9.js";import{u as Za}from"./use-roving-tab-list-BO8kbs-w.js";const Ja="dork.terminal.tabs",Fi=new Map;function Qa(t,e,i){const s=ts(t,e),r=Fi.get(s)??new Set;return r.add(i),Fi.set(s,r),()=>{r.delete(i),r.size||Fi.delete(s)}}function eh(t,e,i){const s=Er(t,e);s.ids.includes(i.id)||yo(t,e,{ids:[...s.ids,i.id],activeIndex:s.activeIndex,closedIds:[...s.closedIds??[],...i.closed?[i.id]:[]]});for(const r of Fi.get(ts(t,e))??[])r(i)}const ls={ids:[],activeIndex:0};function ts(t,e){return`${Ja}:${t??""}:${e}`}function Co(t,e){return e<=0||!Number.isInteger(t)||t<0?0:Math.min(t,e-1)}function Er(t,e){try{const i=sessionStorage.getItem(ts(t,e));if(!i)return ls;const s=JSON.parse(i);if(typeof s!="object"||s===null)return ls;const{ids:r,activeIndex:n,closedIds:o}=s,a=Array.isArray(r)?r.filter(c=>typeof c=="string"&&c.length>0):[],l=typeof n=="number"?n:0,h=Array.isArray(o)?a.filter(c=>o.includes(c)):[];return{ids:a,activeIndex:Co(l,a.length),...h.length?{closedIds:h}:{}}}catch{return ls}}function yo(t,e,i){try{const s={ids:i.ids,activeIndex:Co(i.activeIndex,i.ids.length)},r=i.ids.filter(n=>{var o;return(o=i.closedIds)==null?void 0:o.includes(n)});r.length&&(s.closedIds=r),sessionStorage.setItem(ts(t,e),JSON.stringify(s))}catch{}}/**
2
2
  * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
3
3
  * @license MIT
4
4
  *
@@ -1 +1 @@
1
- import{j as n,r as u,a5 as oe,a7 as re,aZ as F,B as k,I as ae,f3 as ce,cl as le,gk as ie,gl as de,gm as ue}from"./index-YUtEyz7O.js";import{u as he,L as z}from"./use-local-browser-C-V2n_wd.js";const G={embedded:"DorkOS browser","new-window":"New browser window"},me={embedded:"Browse here. Saved logins stay separate from your usual browser.","new-window":"Opens on the computer running DorkOS. Saved logins stay separate."};function we({value:t,onChange:s,capabilities:r,disabled:i}){var d;const a={embedded:!!(r!=null&&r.embedded)&&!!((d=window.electronAPI)!=null&&d.localBrowser),"new-window":!!(r!=null&&r.newWindow)};return n.jsxs("fieldset",{disabled:i,className:"space-y-2",children:[n.jsx("legend",{className:"sr-only",children:"Browser"}),Object.keys(G).map(l=>{var e;return n.jsxs("label",{className:"bg-muted/40 flex items-start gap-2 rounded-lg p-3",children:[n.jsx("input",{type:"radio",name:"local-browser-mode",value:l,checked:t===l,disabled:!a[l],onChange:()=>s(l),className:"mt-1"}),n.jsxs("span",{className:"min-w-0 space-y-1",children:[n.jsx("span",{className:"block text-sm font-medium",children:G[l]}),n.jsx("span",{className:"text-muted-foreground block text-xs",children:me[l]}),!a[l]&&n.jsx("span",{className:"text-muted-foreground block text-xs",children:((e=r==null?void 0:r.unavailableReasons)==null?void 0:e[l])??(l==="embedded"?"Requires the DorkOS desktop app.":"Available on your DorkOS computer.")})]})]},l)})]})}function pe(t,s,r,i){u.useEffect(()=>{var m,L;const a=(m=window.electronAPI)==null?void 0:m.localBrowser;if(!a||!s||!r)return;let d=!1,l=!1,e="",h=0,v=!1;const q=[];for(let c=(L=t.current)==null?void 0:L.parentElement;c;c=c.parentElement){const w=getComputedStyle(c);/(hidden|clip|auto|scroll)/.test(`${w.overflowX} ${w.overflowY}`)&&q.push(c)}const j=()=>{v=[...document.querySelectorAll('[role="dialog"][aria-modal="true"], [role="alertdialog"], [role="menu"], [data-radix-popper-content-wrapper]')].some(c=>!c.contains(t.current)&&c.getClientRects().length>0&&!c.hidden),R()},R=()=>{var T;if(d||l)return;const c=(T=t.current)==null?void 0:T.getBoundingClientRect();let w=(c==null?void 0:c.x)??0,p=(c==null?void 0:c.y)??0,A=w+((c==null?void 0:c.width)??0),x=p+((c==null?void 0:c.height)??0);for(const _ of q){const b=_.getBoundingClientRect();w=Math.max(w,b.x),p=Math.max(p,b.y),A=Math.min(A,b.x+b.width),x=Math.min(x,b.y+b.height)}const I=Math.max(0,A-w),g=Math.max(0,x-p),E=!!c&&!v&&document.visibilityState!=="hidden"&&I>0&&g>0,D={connectionId:s,x:w,y:p,width:I,height:g,visible:E},B=JSON.stringify(D);B!==e&&(e=B,a.setBounds(D).catch(()=>{d||(l=!0,i())}))},O=()=>{R(),!d&&!l&&(h=requestAnimationFrame(O))},C=new MutationObserver(j);return C.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state","hidden","aria-modal","style","class"]}),j(),O(),()=>{d=!0,C.disconnect(),cancelAnimationFrame(h),a.setBounds({connectionId:s,x:0,y:0,width:0,height:0,visible:!1}).catch(()=>{})}},[t,s,r,i])}const ee={stale_page:"Page changed. Read it again before continuing.",navigation_uncertain:"Check what happened before continuing.",uncertain:"Check what happened before continuing.",paused:"Agent paused. Resume when ready.",busy:"Browser is busy. Wait a moment.",browser_download:"Couldn’t download the browser. Check your connection and try again.",cancelled:"Browser setup stopped. Open it again to continue.",focus_unavailable:"This tab stopped responding. Choose it again."},fe=["Free some space, then open the browser again.","Check folder permissions, then open the browser again."];function ge(t){const s=t;return(s==null?void 0:s.code)==="busy"&&s.message==="The browser is still closing. Wait before opening it again."?"The browser is still closing. Wait, then try again.":(s==null?void 0:s.code)==="busy"&&s.message==="Restart DorkOS to finish closing this browser."?"Restart DorkOS to finish closing this browser.":(s==null?void 0:s.code)==="browser_storage"?fe.find(i=>i===s.message)??"Couldn’t save the browser. Check free space and folder permissions.":(s!=null&&s.code&&Object.hasOwn(ee,s.code)?ee[s.code]:void 0)??"Couldn’t reach the browser. Reconnect and try again."}function xe(t){const s=u.useRef(null),r=u.useRef(null),i=a=>{r.current=document.activeElement===a?{action:a,interrupted:!1}:null};return u.useEffect(()=>{const a=l=>{const e=r.current;e&&l.target!==e.action&&!(l.type==="focusin"&&l.target===document.body)&&(e.interrupted=!0)},d=()=>{r.current&&(r.current.interrupted=!0)};return document.addEventListener("pointerdown",a,!0),document.addEventListener("keydown",a,!0),document.addEventListener("focusin",a,!0),window.addEventListener("blur",d),()=>{r.current=null,document.removeEventListener("pointerdown",a,!0),document.removeEventListener("keydown",a,!0),document.removeEventListener("focusin",a,!0),window.removeEventListener("blur",d)}},[]),u.useEffect(()=>{if(t||!r.current)return;const a=r.current;if(r.current=null,!a.interrupted&&document.activeElement===document.body&&document.hasFocus()){const d=s.current;d&&!d.disabled&&d.focus()}},[t]),{openButton:s,rememberFocus:i}}function be({preparation:t}){const s=t.stage==="checking"?"Checking browser files…":t.stage==="launching"?"Opening the browser…":t.component==="chromium"?"Downloading the browser…":t.component==="headless-shell"?"Downloading browser support…":t.component==="ffmpeg"?"Downloading video support…":"Downloading browser files…",r=t.component==="chromium"?"Browser download":t.component==="headless-shell"?"Browser support download":"Video support download",i=t.stage==="downloading"&&t.component&&t.percent!==null&&Number.isFinite(t.percent)&&t.percent>=0&&t.percent<=100?t.percent:null;return n.jsxs("div",{className:"space-y-1 text-xs","aria-live":"polite",children:[n.jsx("p",{children:s}),i!==null&&n.jsxs(n.Fragment,{children:[n.jsx("progress",{"aria-label":r,max:100,value:i,className:"w-full"}),n.jsxs("p",{children:[i,"%"]})]})]})}function ye({visible:t=!0,sessionId:s=null,agentName:r=null}){var J,X,Z;const i=oe(),a=re(),{state:d,capabilities:l}=he(),e=d.data,h=l.data,v=(J=d.error??l.error)==null?void 0:J.code,q=v==="local_only"?"Open DorkOS on your computer to use its browser.":v==="owner_only"?"Only this DorkOS owner can choose its browser.":"Couldn’t reach the browser. Reconnect and try again.",j=F(o=>o.localBrowserChoice),R=F(o=>o.localBrowserChoiceIssue),O=F(o=>o.setLocalBrowserChoice),C=!j&&R!==null,[m,L]=u.useState(!1),[c,w]=u.useState(!1),[p,A]=u.useState(null),[x,I]=u.useState(!1),g=u.useRef(0),E=u.useRef(null),[D,B]=u.useState(null),[T,_]=u.useState(null),[b,K]=u.useState(!1),U=u.useRef(null),S=(e==null?void 0:e.status)==="connected",W=!!(e!=null&&e.sessionId)&&e.sessionId!==s,f=S&&e.mode?e.mode:(j==null?void 0:j.mode)??(h!=null&&h.embedded&&((X=window.electronAPI)!=null&&X.localBrowser)?"embedded":"new-window"),Q=e==null?void 0:e.tabs.find(o=>o.id===e.selectedTabId),ne=u.useCallback(()=>K(!0),[]);u.useEffect(()=>()=>{g.current+=1},[]),pe(U,(e==null?void 0:e.connectionId)??null,t&&S&&!d.isError&&!W&&f==="embedded"&&!b,ne);const N=async(o,P=!1)=>{const y=++g.current;L(!0),w(P),B(null);try{if(P&&(await a.cancelQueries({queryKey:z}),y!==g.current))return!1;const M=await o();return y!==g.current||(await a.cancelQueries({queryKey:z}),y!==g.current)?!1:(a.setQueryData(z,M),!0)}catch(M){return y!==g.current||B(ge(M)),!1}finally{y===g.current&&(L(!1),w(!1))}},Y=()=>{O({mode:f}),A({sessionId:s,mode:f,previousConnectionId:(e==null?void 0:e.connectionId)??null,startedAt:Date.now()}),K(!1);const o=N(()=>i.openLocalBrowser({mode:f,...s?{sessionId:s}:{}}),!0);E.current=o,o.finally(()=>{E.current===o&&(E.current=null)})},se=async()=>{const o=E.current;I(!0);try{await N(()=>i.disconnectLocalBrowser())&&await a.invalidateQueries({queryKey:z}),await o}finally{I(!1)}},$=h&&(f==="embedded"?h.embedded&&!!((Z=window.electronAPI)!=null&&Z.localBrowser):h.newWindow),{openButton:te,rememberFocus:V}=xe(m||x||S||C||!$),H=c&&!x&&p&&(e!=null&&e.preparation)&&e.status==="disconnected"&&e.sessionId===p.sessionId&&e.mode===p.mode&&e.connectionId&&e.connectionId!==p.previousConnectionId&&d.dataUpdatedAt>=p.startedAt?e.preparation:null;return n.jsxs("section",{"aria-label":"Local browser","data-slot":"local-browser-panel",className:"flex h-full min-h-0 flex-col gap-3 p-3",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("h3",{className:"text-sm font-medium",children:S?G[f]:"Browser"}),n.jsx("span",{role:"status",className:"text-muted-foreground text-xs",children:x?"Cancelling…":c?"Preparing browser":m?"Updating…":(e==null?void 0:e.status)==="closed"?"Browser closed":S?e.paused?"Agent paused":"Connected":"Disconnected"})]}),c&&n.jsx(k,{size:"sm",variant:"outline",onClick:o=>{V(o.currentTarget),se()},children:"Cancel"}),H&&n.jsx(be,{preparation:H}),(D||d.isError||l.isError)&&n.jsx("p",{role:"alert",className:"text-sm",children:D??q}),(d.isError||l.isError)&&v!=="local_only"&&v!=="owner_only"&&n.jsx(k,{size:"sm",variant:"outline",onClick:()=>{d.refetch(),l.refetch()},children:"Reconnect"}),!S&&n.jsxs("div",{className:"min-h-0 space-y-3 overflow-y-auto",children:[R&&n.jsx("p",{className:"text-muted-foreground text-xs",children:C?"Choose a browser. The saved choice couldn’t be read.":"Browser choice couldn’t be saved. It lasts until this window closes."}),n.jsx(we,{value:C?null:f,onChange:o=>{O({mode:o})},capabilities:h,disabled:m||x}),(e==null?void 0:e.status)==="closed"&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Open it again to reconnect. Saved logins are kept."}),n.jsx(k,{ref:te,disabled:m||x||C||!$,onClick:Y,children:e!=null&&e.mode?"Reconnect":"Open browser"})]}),S&&n.jsxs(n.Fragment,{children:[W&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Shared with another chat. Disconnect to use it here."}),!e.sessionId&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Only you can use this page. Open from an agent chat to share it."}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(k,{size:"sm",variant:"outline",disabled:m,onClick:()=>void N(()=>e.paused?i.resumeLocalBrowser():i.pauseLocalBrowser()),children:e.paused?"Resume agent":"Pause agent"}),n.jsx(k,{size:"sm",variant:"ghost",disabled:m,onClick:o=>{V(o.currentTarget),N(()=>i.disconnectLocalBrowser())},children:"Disconnect"})]}),n.jsxs("label",{className:"text-sm",children:[e.sessionId?W?"Shared with another chat":`Shared with ${r||"this chat’s agent"}`:"Browser tab",n.jsxs("select",{className:"bg-muted/40 mt-1 block w-full rounded-md p-2",value:e.selectedTabId??"",disabled:m,onChange:o=>{_(null),N(()=>i.selectLocalBrowserTab(o.target.value))},children:[!e.selectedTabId&&n.jsx("option",{value:"",children:"Choose a tab"}),e.tabs.map(o=>n.jsx("option",{value:o.id,children:o.title||(o.url==="about:blank"?"New tab":o.url)},o.id))]})]}),Q&&n.jsxs("form",{className:"flex gap-2",onSubmit:o=>{o.preventDefault();const P=T??Q.url;try{const y=new URL(P);if(!["http:","https:"].includes(y.protocol))throw new Error("unsupported");N(()=>i.navigateLocalBrowser(y.href)).then(M=>{M&&_(null)})}catch{B("Enter a full web address, starting with https:// or http://.")}},children:[n.jsx(ae,{"aria-label":"Web address",value:T??Q.url,onChange:o=>_(o.target.value),className:"min-w-0"}),n.jsx(k,{size:"sm",variant:"outline",type:"submit",disabled:m,children:"Go"})]}),e.paused&&n.jsxs("div",{className:"text-muted-foreground space-y-1 text-xs",children:[n.jsx("p",{children:"Pause stops new actions. An action already started may finish."}),n.jsx("p",{children:"Your mouse and keyboard still work."})]}),f!=="embedded"&&n.jsx("p",{className:"text-muted-foreground text-sm",children:"This page is in the separate browser window."}),f==="embedded"&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"This page stays in the right panel."}),f==="embedded"&&!W&&n.jsx("p",{className:"text-muted-foreground text-xs",children:e.sessionId?"Extra windows are for you. Your agent stays on this page.":"Extra windows are for you."}),f==="embedded"&&n.jsx("div",{ref:U,"data-slot":"native-browser-surface",className:"bg-muted/20 relative min-h-48 flex-1 rounded-lg",children:b&&n.jsxs("div",{className:"space-y-2 p-3",children:[n.jsx("p",{role:"alert",className:"text-sm",children:"Couldn’t show the page. Reconnect to try again."}),n.jsx(k,{size:"sm",variant:"outline",onClick:Y,disabled:m,children:"Reconnect"})]})})]})]})}function Ce(){const t=ce({select:h=>h.location.pathname}),[s]=le(),r=t==="/session"?s:null,{data:i}=ie(r,{enabled:!!r,nameOnly:!0}),{data:a}=de((i==null?void 0:i.cwd)??null),d=u.useContext(ue),l=F(h=>h.rightPanelOpen),e=F(h=>h.activeRightPanelTab);return n.jsx(ye,{visible:d&&l&&e==="local-browser",sessionId:t==="/session"?s:null,agentName:t==="/session"?a==null?void 0:a.name:null},t==="/session"?`chat:${s??""}`:"human-only")}export{Ce as LocalBrowserContent,ye as LocalBrowserPanel};
1
+ import{j as n,r as u,a5 as oe,a7 as re,aZ as F,B as E,I as ae,fd as ce,cl as le,gn as ie,go as de,gp as ue}from"./index-MHIn2TC9.js";import{u as he,L as z}from"./use-local-browser-WwZd-FOP.js";const G={embedded:"DorkOS browser","new-window":"New browser window"},me={embedded:"Browse here. Saved logins stay separate from your usual browser.","new-window":"Opens on the computer running DorkOS. Saved logins stay separate."};function pe({value:t,onChange:s,capabilities:r,disabled:i}){var d;const a={embedded:!!(r!=null&&r.embedded)&&!!((d=window.electronAPI)!=null&&d.localBrowser),"new-window":!!(r!=null&&r.newWindow)};return n.jsxs("fieldset",{disabled:i,className:"space-y-2",children:[n.jsx("legend",{className:"sr-only",children:"Browser"}),Object.keys(G).map(l=>{var e;return n.jsxs("label",{className:"bg-muted/40 flex items-start gap-2 rounded-lg p-3",children:[n.jsx("input",{type:"radio",name:"local-browser-mode",value:l,checked:t===l,disabled:!a[l],onChange:()=>s(l),className:"mt-1"}),n.jsxs("span",{className:"min-w-0 space-y-1",children:[n.jsx("span",{className:"block text-sm font-medium",children:G[l]}),n.jsx("span",{className:"text-muted-foreground block text-xs",children:me[l]}),!a[l]&&n.jsx("span",{className:"text-muted-foreground block text-xs",children:((e=r==null?void 0:r.unavailableReasons)==null?void 0:e[l])??(l==="embedded"?"Requires the DorkOS desktop app.":"Available on your DorkOS computer.")})]})]},l)})]})}function we(t,s,r,i){u.useEffect(()=>{var m,L;const a=(m=window.electronAPI)==null?void 0:m.localBrowser;if(!a||!s||!r)return;let d=!1,l=!1,e="",h=0,v=!1;const q=[];for(let c=(L=t.current)==null?void 0:L.parentElement;c;c=c.parentElement){const p=getComputedStyle(c);/(hidden|clip|auto|scroll)/.test(`${p.overflowX} ${p.overflowY}`)&&q.push(c)}const j=()=>{v=[...document.querySelectorAll('[role="dialog"][aria-modal="true"], [role="alertdialog"], [role="menu"], [data-radix-popper-content-wrapper]')].some(c=>!c.contains(t.current)&&c.getClientRects().length>0&&!c.hidden),R()},R=()=>{var T;if(d||l)return;const c=(T=t.current)==null?void 0:T.getBoundingClientRect();let p=(c==null?void 0:c.x)??0,w=(c==null?void 0:c.y)??0,A=p+((c==null?void 0:c.width)??0),x=w+((c==null?void 0:c.height)??0);for(const _ of q){const b=_.getBoundingClientRect();p=Math.max(p,b.x),w=Math.max(w,b.y),A=Math.min(A,b.x+b.width),x=Math.min(x,b.y+b.height)}const I=Math.max(0,A-p),g=Math.max(0,x-w),k=!!c&&!v&&document.visibilityState!=="hidden"&&I>0&&g>0,D={connectionId:s,x:p,y:w,width:I,height:g,visible:k},B=JSON.stringify(D);B!==e&&(e=B,a.setBounds(D).catch(()=>{d||(l=!0,i())}))},O=()=>{R(),!d&&!l&&(h=requestAnimationFrame(O))},C=new MutationObserver(j);return C.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state","hidden","aria-modal","style","class"]}),j(),O(),()=>{d=!0,C.disconnect(),cancelAnimationFrame(h),a.setBounds({connectionId:s,x:0,y:0,width:0,height:0,visible:!1}).catch(()=>{})}},[t,s,r,i])}const ee={stale_page:"Page changed. Read it again before continuing.",navigation_uncertain:"Check what happened before continuing.",uncertain:"Check what happened before continuing.",paused:"Agent paused. Resume when ready.",busy:"Browser is busy. Wait a moment.",browser_download:"Couldn’t download the browser. Check your connection and try again.",cancelled:"Browser setup stopped. Open it again to continue.",focus_unavailable:"This tab stopped responding. Choose it again."},fe=["Free some space, then open the browser again.","Check folder permissions, then open the browser again."];function ge(t){const s=t;return(s==null?void 0:s.code)==="busy"&&s.message==="The browser is still closing. Wait before opening it again."?"The browser is still closing. Wait, then try again.":(s==null?void 0:s.code)==="busy"&&s.message==="Restart DorkOS to finish closing this browser."?"Restart DorkOS to finish closing this browser.":(s==null?void 0:s.code)==="browser_storage"?fe.find(i=>i===s.message)??"Couldn’t save the browser. Check free space and folder permissions.":(s!=null&&s.code&&Object.hasOwn(ee,s.code)?ee[s.code]:void 0)??"Couldn’t reach the browser. Reconnect and try again."}function xe(t){const s=u.useRef(null),r=u.useRef(null),i=a=>{r.current=document.activeElement===a?{action:a,interrupted:!1}:null};return u.useEffect(()=>{const a=l=>{const e=r.current;e&&l.target!==e.action&&!(l.type==="focusin"&&l.target===document.body)&&(e.interrupted=!0)},d=()=>{r.current&&(r.current.interrupted=!0)};return document.addEventListener("pointerdown",a,!0),document.addEventListener("keydown",a,!0),document.addEventListener("focusin",a,!0),window.addEventListener("blur",d),()=>{r.current=null,document.removeEventListener("pointerdown",a,!0),document.removeEventListener("keydown",a,!0),document.removeEventListener("focusin",a,!0),window.removeEventListener("blur",d)}},[]),u.useEffect(()=>{if(t||!r.current)return;const a=r.current;if(r.current=null,!a.interrupted&&document.activeElement===document.body&&document.hasFocus()){const d=s.current;d&&!d.disabled&&d.focus()}},[t]),{openButton:s,rememberFocus:i}}function be({preparation:t}){const s=t.stage==="checking"?"Checking browser files…":t.stage==="launching"?"Opening the browser…":t.component==="chromium"?"Downloading the browser…":t.component==="headless-shell"?"Downloading browser support…":t.component==="ffmpeg"?"Downloading video support…":"Downloading browser files…",r=t.component==="chromium"?"Browser download":t.component==="headless-shell"?"Browser support download":"Video support download",i=t.stage==="downloading"&&t.component&&t.percent!==null&&Number.isFinite(t.percent)&&t.percent>=0&&t.percent<=100?t.percent:null;return n.jsxs("div",{className:"space-y-1 text-xs","aria-live":"polite",children:[n.jsx("p",{children:s}),i!==null&&n.jsxs(n.Fragment,{children:[n.jsx("progress",{"aria-label":r,max:100,value:i,className:"w-full"}),n.jsxs("p",{children:[i,"%"]})]})]})}function ye({visible:t=!0,sessionId:s=null,agentName:r=null}){var J,X,Z;const i=oe(),a=re(),{state:d,capabilities:l}=he(),e=d.data,h=l.data,v=(J=d.error??l.error)==null?void 0:J.code,q=v==="local_only"?"Open DorkOS on your computer to use its browser.":v==="owner_only"?"Only this DorkOS owner can choose its browser.":"Couldn’t reach the browser. Reconnect and try again.",j=F(o=>o.localBrowserChoice),R=F(o=>o.localBrowserChoiceIssue),O=F(o=>o.setLocalBrowserChoice),C=!j&&R!==null,[m,L]=u.useState(!1),[c,p]=u.useState(!1),[w,A]=u.useState(null),[x,I]=u.useState(!1),g=u.useRef(0),k=u.useRef(null),[D,B]=u.useState(null),[T,_]=u.useState(null),[b,K]=u.useState(!1),U=u.useRef(null),S=(e==null?void 0:e.status)==="connected",W=!!(e!=null&&e.sessionId)&&e.sessionId!==s,f=S&&e.mode?e.mode:(j==null?void 0:j.mode)??(h!=null&&h.embedded&&((X=window.electronAPI)!=null&&X.localBrowser)?"embedded":"new-window"),Q=e==null?void 0:e.tabs.find(o=>o.id===e.selectedTabId),ne=u.useCallback(()=>K(!0),[]);u.useEffect(()=>()=>{g.current+=1},[]),we(U,(e==null?void 0:e.connectionId)??null,t&&S&&!d.isError&&!W&&f==="embedded"&&!b,ne);const N=async(o,P=!1)=>{const y=++g.current;L(!0),p(P),B(null);try{if(P&&(await a.cancelQueries({queryKey:z}),y!==g.current))return!1;const M=await o();return y!==g.current||(await a.cancelQueries({queryKey:z}),y!==g.current)?!1:(a.setQueryData(z,M),!0)}catch(M){return y!==g.current||B(ge(M)),!1}finally{y===g.current&&(L(!1),p(!1))}},Y=()=>{O({mode:f}),A({sessionId:s,mode:f,previousConnectionId:(e==null?void 0:e.connectionId)??null,startedAt:Date.now()}),K(!1);const o=N(()=>i.openLocalBrowser({mode:f,...s?{sessionId:s}:{}}),!0);k.current=o,o.finally(()=>{k.current===o&&(k.current=null)})},se=async()=>{const o=k.current;I(!0);try{await N(()=>i.disconnectLocalBrowser())&&await a.invalidateQueries({queryKey:z}),await o}finally{I(!1)}},$=h&&(f==="embedded"?h.embedded&&!!((Z=window.electronAPI)!=null&&Z.localBrowser):h.newWindow),{openButton:te,rememberFocus:V}=xe(m||x||S||C||!$),H=c&&!x&&w&&(e!=null&&e.preparation)&&e.status==="disconnected"&&e.sessionId===w.sessionId&&e.mode===w.mode&&e.connectionId&&e.connectionId!==w.previousConnectionId&&d.dataUpdatedAt>=w.startedAt?e.preparation:null;return n.jsxs("section",{"aria-label":"Local browser","data-slot":"local-browser-panel",className:"flex h-full min-h-0 flex-col gap-3 p-3",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("h3",{className:"text-sm font-medium",children:S?G[f]:"Browser"}),n.jsx("span",{role:"status",className:"text-muted-foreground text-xs",children:x?"Cancelling…":c?"Preparing browser":m?"Updating…":(e==null?void 0:e.status)==="closed"?"Browser closed":S?e.paused?"Agent paused":"Connected":"Disconnected"})]}),c&&n.jsx(E,{size:"sm",variant:"outline",onClick:o=>{V(o.currentTarget),se()},children:"Cancel"}),H&&n.jsx(be,{preparation:H}),(D||d.isError||l.isError)&&n.jsx("p",{role:"alert",className:"text-sm",children:D??q}),(d.isError||l.isError)&&v!=="local_only"&&v!=="owner_only"&&n.jsx(E,{size:"sm",variant:"outline",onClick:()=>{d.refetch(),l.refetch()},children:"Reconnect"}),!S&&n.jsxs("div",{className:"min-h-0 space-y-3 overflow-y-auto",children:[R&&n.jsx("p",{className:"text-muted-foreground text-xs",children:C?"Choose a browser. The saved choice couldn’t be read.":"Browser choice couldn’t be saved. It lasts until this window closes."}),n.jsx(pe,{value:C?null:f,onChange:o=>{O({mode:o})},capabilities:h,disabled:m||x}),(e==null?void 0:e.status)==="closed"&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Open it again to reconnect. Saved logins are kept."}),n.jsx(E,{ref:te,disabled:m||x||C||!$,onClick:Y,children:e!=null&&e.mode?"Reconnect":"Open browser"})]}),S&&n.jsxs(n.Fragment,{children:[W&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Shared with another chat. Disconnect to use it here."}),!e.sessionId&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Only you can use this page. Open from an agent chat to share it."}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(E,{size:"sm",variant:"outline",disabled:m,onClick:()=>void N(()=>e.paused?i.resumeLocalBrowser():i.pauseLocalBrowser()),children:e.paused?"Resume agent":"Pause agent"}),n.jsx(E,{size:"sm",variant:"ghost",disabled:m,onClick:o=>{V(o.currentTarget),N(()=>i.disconnectLocalBrowser())},children:"Disconnect"})]}),n.jsxs("label",{className:"text-sm",children:[e.sessionId?W?"Shared with another chat":`Shared with ${r||"this chat’s agent"}`:"Browser tab",n.jsxs("select",{className:"bg-muted/40 mt-1 block w-full rounded-md p-2",value:e.selectedTabId??"",disabled:m,onChange:o=>{_(null),N(()=>i.selectLocalBrowserTab(o.target.value))},children:[!e.selectedTabId&&n.jsx("option",{value:"",children:"Choose a tab"}),e.tabs.map(o=>n.jsx("option",{value:o.id,children:o.title||(o.url==="about:blank"?"New tab":o.url)},o.id))]})]}),Q&&n.jsxs("form",{className:"flex gap-2",onSubmit:o=>{o.preventDefault();const P=T??Q.url;try{const y=new URL(P);if(!["http:","https:"].includes(y.protocol))throw new Error("unsupported");N(()=>i.navigateLocalBrowser(y.href)).then(M=>{M&&_(null)})}catch{B("Enter a full web address, starting with https:// or http://.")}},children:[n.jsx(ae,{"aria-label":"Web address",value:T??Q.url,onChange:o=>_(o.target.value),className:"min-w-0"}),n.jsx(E,{size:"sm",variant:"outline",type:"submit",disabled:m,children:"Go"})]}),e.paused&&n.jsxs("div",{className:"text-muted-foreground space-y-1 text-xs",children:[n.jsx("p",{children:"Pause stops new actions. An action already started may finish."}),n.jsx("p",{children:"Your mouse and keyboard still work."})]}),f!=="embedded"&&n.jsx("p",{className:"text-muted-foreground text-sm",children:"This page is in the separate browser window."}),f==="embedded"&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"This page stays in the right panel."}),f==="embedded"&&!W&&n.jsx("p",{className:"text-muted-foreground text-xs",children:e.sessionId?"Extra windows are for you. Your agent stays on this page.":"Extra windows are for you."}),f==="embedded"&&n.jsx("div",{ref:U,"data-slot":"native-browser-surface",className:"bg-muted/20 relative min-h-48 flex-1 rounded-lg",children:b&&n.jsxs("div",{className:"space-y-2 p-3",children:[n.jsx("p",{role:"alert",className:"text-sm",children:"Couldn’t show the page. Reconnect to try again."}),n.jsx(E,{size:"sm",variant:"outline",onClick:Y,disabled:m,children:"Reconnect"})]})})]})]})}function Ce(){const t=ce({select:h=>h.location.pathname}),[s]=le(),r=t==="/session"?s:null,{data:i}=ie(r,{enabled:!!r,nameOnly:!0}),{data:a}=de((i==null?void 0:i.cwd)??null),d=u.useContext(ue),l=F(h=>h.rightPanelOpen),e=F(h=>h.activeRightPanelTab);return n.jsx(ye,{visible:d&&l&&e==="local-browser",sessionId:t==="/session"?s:null,agentName:t==="/session"?a==null?void 0:a.name:null},t==="/session"?`chat:${s??""}`:"human-only")}export{Ce as LocalBrowserContent,ye as LocalBrowserPanel};
@@ -1,4 +1,4 @@
1
- import{R as ni,r as Y,j as L}from"./index-YUtEyz7O.js";var R=function(i,n){return Number(i.toFixed(n))},pe=function(i,n){return typeof i=="number"?i:n},P=function(i,n,e){e&&typeof e=="function"&&e(i,n)},fe=function(i){return-Math.cos(i*Math.PI)/2+.5},me=function(i){return i},he=function(i){return i*i},ce=function(i){return i*(2-i)},ge=function(i){return i<.5?2*i*i:-1+(4-2*i)*i},we=function(i){return i*i*i},ye=function(i){return--i*i*i+1},be=function(i){return i<.5?4*i*i*i:(i-1)*(2*i-2)*(2*i-2)+1},Pe=function(i){return i*i*i*i},Se=function(i){return 1- --i*i*i*i},Ce=function(i){return i<.5?8*i*i*i*i:1-8*--i*i*i*i},Te=function(i){return i*i*i*i*i},Ae=function(i){return 1+--i*i*i*i*i},Ye=function(i){return i<.5?16*i*i*i*i*i:1+16*--i*i*i*i*i},Bi={easeOut:fe,linear:me,easeInQuad:he,easeOutQuad:ce,easeInOutQuad:ge,easeInCubic:we,easeOutCubic:ye,easeInOutCubic:be,easeInQuart:Pe,easeOutQuart:Se,easeInOutQuart:Ce,easeInQuint:Te,easeOutQuint:Ae,easeInOutQuint:Ye},Xe=function(i){var n=i.animationResolve;i.animationResolve=null,n==null||n()},_=function(i){i.animationFrame!==null&&cancelAnimationFrame(i.animationFrame),i.animationFrame=null,i.isAnimating=!1,i.animation=null,i.velocity=null,Xe(i)};function Li(i,n,e,r,o){if(!i.mounted){o==null||o();return}var a=new Date().getTime(),t=1;_(i);var l=function(){if(!(!i.mounted||i.animation!==l)){var s=new Date().getTime()-a,d=s/e,u=Bi[n],v=u(d);if(s>=e){i.animation=null,i.animationFrame=null;var p=i.animationResolve;i.animationResolve=null,r(t),p==null||p(),i.flushResizeAlignment()}else r(v),i.animationFrame=requestAnimationFrame(l)}};i.animation=l,i.animationResolve=o??null,i.animationFrame=requestAnimationFrame(l)}function Ee(i){var n=i.scale,e=i.positionX,r=i.positionY;return!(Number.isNaN(n)||Number.isNaN(e)||Number.isNaN(r))}function H(i,n,e,r){var o=Ee(n);if(!i.mounted||!o)return Promise.resolve();var a=i.setState,t=i.state,l=t.scale,s=t.positionX,d=t.positionY,u=n.scale-l,v=n.positionX-s,p=n.positionY-d;return e===0?(a(n.scale,n.positionX,n.positionY),Promise.resolve()):new Promise(function(m){Li(i,r,e,function(f){f!==1?i.isAnimating=!0:i.isAnimating=!1;var h=l+u*f,g=s+v*f,c=d+p*f;a(h,g,c)},m)})}function ze(i,n,e){var r=i.clientWidth,o=i.clientHeight,a=n.offsetWidth,t=n.offsetHeight,l=a*e,s=t*e,d=r-l,u=o-s;return{wrapperWidth:r,wrapperHeight:o,newContentWidth:l,newDiffWidth:d,newContentHeight:s,newDiffHeight:u}}var _e=function(i,n,e,r,o,a,t){var l=i>n?e*(t?.5:1):0,s=r>o?a*(t?.5:1):0,d=i-n-l,u=l,v=r-o-s,p=s;return{minPositionX:d,maxPositionX:u,minPositionY:v,maxPositionY:p,scaleWidthFactor:l,scaleHeightFactor:s}},bi=function(i,n){var e=i.wrapperComponent,r=i.contentComponent,o=i.setup,a=o.centerZoomedOut,t=o.disablePadding;if(!e||!r)throw new Error("Components are not mounted");var l=ze(e,r,n),s=l.wrapperWidth,d=l.wrapperHeight,u=l.newContentWidth,v=l.newContentHeight,p=l.newDiffWidth,m=l.newDiffHeight,f=_e(s,u,p,d,v,m,!!a),h=s>=u&&d>=v;t&&h&&!a&&(f.minPositionX=0,f.maxPositionX=0,f.minPositionY=0,f.maxPositionY=0);var g=i.setup,c=g.minPositionX,y=g.maxPositionX,w=g.minPositionY,S=g.maxPositionY;return c!=null&&(f.minPositionX=s*(1-n)+c*n),y!=null&&(f.maxPositionX=y*n),w!=null&&(f.minPositionY=d*(1-n)+w*n),S!=null&&(f.maxPositionY=S*n),f},G=function(i,n,e,r){return r?i<n?R(n,2):i>e?R(e,2):R(i,2):R(i,2)},k=function(i,n){var e=bi(i,n);return i.bounds=e,e};function F(i,n,e,r,o,a,t){var l=e.minPositionX,s=e.minPositionY,d=e.maxPositionX,u=e.maxPositionY,v=0,p=0;t&&(v=o,p=a);var m=G(i,l-v,d+v,r),f=G(n,s-p,u+p,r);return{x:m,y:f}}function oi(i,n,e,r,o,a){var t=i.state,l=t.scale,s=t.positionX,d=t.positionY,u=r-l;if(!Number.isFinite(n)||!Number.isFinite(e))return console.error("Mouse X and Y position were not provided!"),{x:s,y:d};var v=s-n*u,p=d-e*u,m=F(v,p,o,a,0,0,null);return m}var _i=1e-7;function V(i,n,e,r,o){var a=o?r:0,t=Math.max(n-a,_i),l=e+a;return!Number.isNaN(e)&&i>=l?l:!Number.isNaN(n)&&i<=t?t:Math.max(i,_i)}var ki=function(i,n){var e=i.setup.panning.excluded,r=i.isInitialized,o=i.wrapperComponent,a=n.target,t=function(u){return!!u&&typeof u=="object"&&u.nodeType===1&&typeof u.contains=="function"},l=typeof n.composedPath=="function"?n.composedPath().some(function(u){return t(u)&&!!(o!=null&&o.contains(u))}):!!(o!=null&&o.contains(a)),s=r&&a&&l;if(!s)return!1;var d=j(a,e);return!(d||ur(a)||Ci(a))},Wi=function(i){var n=i.isInitialized,e=i.isPanning,r=i.setup,o=r.panning.disabled,a=n&&e&&!o;return!!a},ke=function(i,n){var e=i.state,r=e.positionX,o=e.positionY;i.isPanning=!0;var a=n.clientX,t=n.clientY;i.startCoords={x:a-r,y:t-o}},We=function(i,n){var e=n.touches,r=i.state,o=r.positionX,a=r.positionY;i.isPanning=!0;var t=e.length===1;if(t){var l=e[0].clientX,s=e[0].clientY;i.startCoords={x:l-o,y:s-a}}};function Oe(i){var n=i.state,e=n.positionX,r=n.positionY,o=n.scale,a=i.setup,t=a.disabled,l=a.limitToBounds,s=a.centerZoomedOut,d=i.wrapperComponent;if(!(t||!d||!i.bounds)){var u=i.bounds,v=u.maxPositionX,p=u.minPositionX,m=u.maxPositionY,f=u.minPositionY,h=e>v||e<p,g=r>m||r<f,c=e>v?d.clientWidth:i.setup.minPositionX||0,y=r>m?d.clientHeight:i.setup.minPositionY||0,w=oi(i,c,y,o,i.bounds,l||s),S=w.x,X=w.y;return{scale:o,positionX:h?S:e,positionY:g?X:r}}}function Ki(i,n,e,r,o){var a=i.setup.limitToBounds,t=i.wrapperComponent,l=i.bounds,s=i.state,d=s.scale,u=s.positionX,v=s.positionY;if(!(t===null||l===null||n===u&&e===v)){var p=F(n,e,l,a,r,o,t),m=p.x,f=p.y;i.setState(d,m,f)}}var Me=function(i,n,e){var r=i.startCoords,o=i.state,a=i.setup.panning,t=a.lockAxisX,l=a.lockAxisY,s=o.positionX,d=o.positionY;if(!r)return{x:s,y:d};var u=n-r.x,v=e-r.y,p=t?s:u,m=l?d:v;return{x:p,y:m}},K=function(i,n,e){var r=i.setup,o=i.state,a=r.minScale,t=r.disablePadding,l=r.centerZoomedOut,s=e??o.scale;return n>0&&s>=a&&!t&&!l?n:0},B;(function(i){i.TRACK_PAD="track_pad",i.MOUSE="mouse",i.TOUCH="touch"})(B||(B={}));var De=function(i){var n=i.mounted,e=i.wrapperComponent,r=i.contentComponent,o=i.setup,a=o.disabled,t=o.velocityAnimation,l=o.limitToBounds,s=i.state.scale,d=t.disabled;if(d||a||!n||!e||!r)return!1;if(!l)return!0;var u=e.clientWidth<r.offsetWidth*s||e.clientHeight<r.offsetHeight*s;return u},Ne=function(i){var n=i.mounted,e=i.velocity,r=i.bounds,o=i.setup,a=o.disabled,t=o.velocityAnimation,l=t.disabled,s=!l&&!a&&n;return!(!s||!e||!r)};function Re(i,n){var e=i.setup.velocityAnimation,r=e.animationTime,o=e.maxAnimationTime,a=e.inertia;return Math.min(r*Math.max(1,Math.abs(n/a)),o)}function Oi(i,n,e,r,o,a,t,l,s,d){if(o){if(n>t&&e>t){var u=t+(i-t)*d;return u>s?s:u<t?t:u}if(n<a&&e<a){var u=a+(i-a)*d;return u<l?l:u>a?a:u}}return r?n:G(i,a,t,o)}function Be(i){var n=1,e=i.clientWidth/window.innerWidth;return Number.isNaN(e)?n:Math.min(n,e)}var fi=function(i,n,e){var r=0,o=i*e;return Number.isNaN(o)?r:i<0?Math.max(o,-n):Math.min(o,n)};function Le(i,n,e){var r,o,a=De(i);if(a){var t=i.lastMousePosition,l=i.velocityTime,s=i.setup,d=i.wrapperComponent,u=s.velocityAnimation,v=u.maxStrengthMouse,p=u.maxStrengthTouch,m=u.sensitivityTouch,f=u.sensitivityMouse,h=Date.now();if(t&&l&&d){var g=Be(d),c=(r={},r[B.TOUCH]=m,r[B.MOUSE]=f,r)[e],y=(o={},o[B.TOUCH]=p,o[B.MOUSE]=v,o)[e],w=n.x-t.x,S=n.y-t.y,X=fi(w/g,y,c),T=fi(S/g,y,c),C=h-l,E=w*w+S*S,A=fi(Math.sqrt(E)/C,y,c);i.velocity={velocityX:X,velocityY:T,total:A}}i.lastMousePosition=n,i.velocityTime=h}}function Ke(i){var n=i.velocity,e=i.bounds,r=i.setup,o=i.wrapperComponent,a=Ne(i);if(!(!a||!n||!e||!o)){var t=n.velocityX,l=n.velocityY,s=n.total,d=e.maxPositionX,u=e.minPositionX,v=e.maxPositionY,p=e.minPositionY,m=r.limitToBounds,f=r.autoAlignment,h=r.zoomAnimation,g=r.panning,c=g.lockAxisY,y=g.lockAxisX,w=h.animationType,S=f.sizeX,X=f.sizeY,T=f.velocityAlignmentTime,C=T,E=Re(i,s),A=Math.max(E,C),M=K(i,S),z=K(i,X),D=M*o.clientWidth/100,W=z*o.clientHeight/100,N=d+D,U=u-D,li=v+W,si=p-W,I=i.state,ui=new Date().getTime();Li(i,w,A,function(ii){var Q=i.state,di=Q.scale,vi=Q.positionX,pi=Q.positionY,le=new Date().getTime()-ui,se=le/C,ue=Bi[f.animationType],Ai=1-ue(Math.min(1,se)),Yi=1-ii,Xi=vi+t*Yi,Ei=pi+l*Yi,de=Oi(Xi,I.positionX,vi,y,m,u,d,U,N,Ai),ve=Oi(Ei,I.positionY,pi,c,m,p,v,si,li,Ai);if(vi!==Xi||pi!==Ei){i.setState(di,de,ve);var zi=i.props.onPanning;zi&&zi(b(i),{})}})}}function Mi(i,n){var e=i.state,r=e.scale,o=e.positionX,a=e.positionY;i.panStartPosition={x:o,y:a},_(i),k(i,r),"touches"in n?We(i,n):ke(i,n)}function Hi(i,n){var e=i.state.scale,r=i.setup,o=r.minScale,a=r.autoAlignment,t=a.disabled,l=a.sizeX,s=a.sizeY,d=a.animationTime,u=a.animationType,v=t||e<o||!l&&!s;if(!v){i.isResizeAlignmentPending&&k(i,e);var p=Oe(i);if(p){var m=i.state,f=m.positionX,h=m.positionY,g=p.positionX===f&&p.positionY===h;g||H(i,p,d,u)}}}function Di(i,n,e,r){var o=i.startCoords,a=i.setup,t=a.autoAlignment,l=t.sizeX,s=t.sizeY;if(o){var d=Me(i,n,e),u=d.x,v=d.y,p=K(i,l),m=K(i,s);Le(i,{x:u,y:v},r),Ki(i,u,v,p,m)}}function He(i,n){if(i.isPanning){var e=i.velocity,r=i.wrapperComponent,o=i.contentComponent;i.isPanning=!1;var a=i.state,t=a.positionX,l=a.positionY,s=a.scale,d=i.panStartPosition;if(i.panStartPosition=null,d){var u=t-d.x,v=l-d.y;if(u*u+v*v<=25)return}i.isAnimating=!1,i.animation=null,i.isResizeAlignmentPending&&k(i,s);var p=(r==null?void 0:r.clientWidth)||0,m=(r==null?void 0:r.clientHeight)||0,f=((o==null?void 0:o.offsetWidth)||0)*s,h=((o==null?void 0:o.offsetHeight)||0)*s,g=!i.setup.limitToBounds||p<f||m<h,c=!n&&e&&e.total>.1&&g;c?Ke(i):Hi(i)}}function ai(i,n,e,r){var o=i.setup,a=o.minScale,t=o.maxScale,l=o.limitToBounds,s=V(R(n,2),a,t,0,!1),d=k(i,s),u=oi(i,e,r,s,d,l),v=u.x,p=u.y;return{scale:s,positionX:v,positionY:p}}function Pi(i,n,e){var r=i.state.scale,o=i.wrapperComponent,a=i.setup,t=a.minScale,l=a.maxScale,s=a.limitToBounds,d=a.zoomAnimation,u=d.disabled,v=d.animationTime,p=d.animationType,m=r>=t&&r<=l,f=u||m;if((r>=1||s)&&Hi(i),!(f||!o||!i.mounted)){var h=n||o.clientWidth/2,g=e||o.clientHeight/2,c=r<t?t:l,y=ai(i,c,h,g);y&&H(i,y,v,p)}}var O=function(){return O=Object.assign||function(n){for(var e,r=1,o=arguments.length;r<o;r++){e=arguments[r];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a])}return n},O.apply(this,arguments)};function Ni(i,n,e){for(var r=0,o=n.length,a;r<o;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return i.concat(a||Array.prototype.slice.call(n))}var mi={scale:1,positionX:0,positionY:0},Z={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,fitOnInit:!1,disablePadding:!1,smooth:!0,detached:!1,wheel:{step:.015,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},trackPadPanning:{disabled:!0,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,allowLeftClickPan:!0,allowMiddleClickPan:!0,allowRightClickPan:!0,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,allowPanning:!0,excluded:[]},keyboard:{disabled:!0,panStep:50,zoomStep:.25,animationTime:100,animationType:"easeOut",excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},autoAlignment:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivityMouse:1,sensitivityTouch:1.2,maxStrengthMouse:20,maxStrengthTouch:40,inertia:1,animationTime:300,maxAnimationTime:800,animationType:"easeOut"}},gi={wrapperClass:"react-transform-wrapper",contentClass:"react-transform-component"},Zi=function(i){var n,e,r,o,a,t,l,s,d,u=Math.max((n=i.minScale)!==null&&n!==void 0?n:Z.minScale,1e-7),v=(e=i.maxScale)!==null&&e!==void 0?e:Z.maxScale,p=(r=i.initialScale)!==null&&r!==void 0?r:mi.scale,m=Math.min(Math.max(p,u),v),f=G((o=i.initialPositionX)!==null&&o!==void 0?o:mi.positionX,(a=i.minPositionX)!==null&&a!==void 0?a:-1/0,(t=i.maxPositionX)!==null&&t!==void 0?t:1/0,i.minPositionX!=null||i.maxPositionX!=null),h=G((l=i.initialPositionY)!==null&&l!==void 0?l:mi.positionY,(s=i.minPositionY)!==null&&s!==void 0?s:-1/0,(d=i.maxPositionY)!==null&&d!==void 0?d:1/0,i.minPositionY!=null||i.maxPositionY!=null);return{previousScale:m,scale:m,positionX:f,positionY:h}},Ri=function(i){var n=O({},Z);return Object.keys(i).forEach(function(e){var r=e,o=typeof i[r]<"u",a=typeof Z[r]<"u";if(a&&o){var t=Object.prototype.toString.call(Z[r]),l=t==="[object Object]",s=t==="[object Array]";l?n[r]=O(O({},Z[r]),i[r]):s?n[r]=Ni(Ni([],Z[r],!0),i[r]):n[r]=i[r]}}),n.minScale<=0&&(n.minScale=1e-7),n},Fi=function(i,n,e){var r=i.state.scale,o=i.wrapperComponent,a=i.setup,t=a.maxScale,l=a.minScale,s=a.zoomAnimation,d=s.size;if(!o)throw new Error("Wrapper is not mounted");var u=r+n*e,v=V(R(u,3),l,t,d,!1);return v};function q(i,n,e,r){var o,a,t=i.wrapperComponent,l=i.props,s=l.onZoomStart,d=l.onZoom,u=l.onZoomStop,v=new MouseEvent("mousemove",{bubbles:!0}),p=b(i);P(p,v,s),P(p,v,d);var m=H(i,n,e,r),f=(a=(o=t==null?void 0:t.ownerDocument)===null||o===void 0?void 0:o.defaultView)!==null&&a!==void 0?a:typeof window<"u"?window:null;return f&&f.setTimeout(function(){i.mounted&&P(b(i),v,u)},e),m}function Vi(i,n,e,r,o){var a=i.wrapperComponent,t=i.state,l=t.scale,s=t.positionX,d=t.positionY,u=i.setup.zoomAnimation;if(!a)return console.error("No WrapperComponent found"),Promise.resolve();var v=u.disabled?0:r,p=a.clientWidth,m=a.clientHeight,f=(p/2-s)/l,h=(m/2-d)/l,g=Fi(i,n,e),c=ai(i,g,f,h);return c?q(i,c,v,o):(console.error("Error during zoom event. New transformation state was not calculated."),Promise.resolve())}function Ze(i,n,e,r){var o,a,t=i.wrapperComponent,l=i.props,s=l.onPanningStart,d=l.onPanning,u=l.onPanningStop,v=new MouseEvent("mousemove",{bubbles:!0}),p=b(i);P(p,v,s),P(p,v,d);var m=H(i,n,e,r),f=(a=(o=t==null?void 0:t.ownerDocument)===null||o===void 0?void 0:o.defaultView)!==null&&a!==void 0?a:typeof window<"u"?window:null;return f&&f.setTimeout(function(){i.mounted&&P(b(i),v,u)},e),m}function Si(i,n,e,r){n===void 0&&(n="contain");var o=i.wrapperComponent,a=i.contentComponent,t=i.setup;if(!o||!a)return null;var l=a.offsetWidth,s=a.offsetHeight,d=o.clientWidth,u=o.clientHeight;if(!l||!s||!d||!u)return null;var v=d/l,p=u/s,m=n==="cover"?Math.max(v,p):Math.min(v,p);return r!==void 0&&(m=Math.min(m,r)),e!==void 0&&(m=Math.max(m,e)),m=V(m,t.minScale,t.maxScale,0,!1),ti(m,o,a)}function ji(i,n,e,r){var o=i.setup,a=i.wrapperComponent,t=i.contentComponent,l=o.limitToBounds,s=o.centerOnInit,d=o.fitOnInit,u=Zi(i.props),v=i.state,p=v.scale,m=v.positionX,f=v.positionY;if(!a)return Promise.resolve();if(d){var h=Si(i,d==="cover"?"cover":"contain");if(h)return p===h.scale&&m===h.positionX&&f===h.positionY?Promise.resolve():(r==null||r(),q(i,h,n,e))}var g=u.positionX,c=u.positionY;if(s&&t){var y=ti(u.scale,a,t);g=y.positionX,c=y.positionY}var w=bi(i,u.scale),S=F(g,c,w,l,0,0,a),X={scale:u.scale,positionX:S.x,positionY:S.y};return p===u.scale&&m===u.positionX&&f===u.positionY?Promise.resolve():(r==null||r(),q(i,X,n,e))}var Ui=function(i){if("getBoundingClientRect"in i){var n=i.getBoundingClientRect();return{x:n.left,y:n.top,width:n.width,height:n.height}}return i};function Fe(i){var n=i.map(Ui),e=Math.min.apply(Math,n.map(function(t){return t.x})),r=Math.min.apply(Math,n.map(function(t){return t.y})),o=Math.max.apply(Math,n.map(function(t){return t.x+t.width})),a=Math.max.apply(Math,n.map(function(t){return t.y+t.height}));return{x:e,y:r,width:o-e,height:a-r}}function Ve(i,n,e,r){var o=Ui(i),a=n.getBoundingClientRect(),t=e.getBoundingClientRect(),l=a.x*r.scale,s=a.y*r.scale;return{x:(o.x-t.x+l)/r.scale,y:(o.y-t.y+s)/r.scale}}function je(i,n,e,r,o,a,t){r===void 0&&(r=0),o===void 0&&(o=0);var l=i.wrapperComponent,s=i.contentComponent,d=i.state,u=i.setup,v=u.limitToBounds,p=u.minScale,m=u.maxScale;if(!l||!s)return d;var f=l.getBoundingClientRect(),h=Ve(n,l,s,d),g=h.x,c=h.y,y=n.width/d.scale,w=n.height/d.scale,S=l.clientWidth/y,X=l.clientHeight/w,T=e||Math.min(S,X);t!==void 0&&(T=Math.min(T,t)),a!==void 0&&(T=Math.max(T,a));var C=V(T,p,m,0,!1),E=(f.width-y*C)/2,A=(f.height-w*C)/2,M=(f.left-g)*C+E+r,z=(f.top-c)*C+A+o,D=bi(i,C),W=F(M,z,D,v,0,0,l),N=W.x,U=W.y;return{positionX:N,positionY:U,scale:C}}function Qi(i,n,e){var r=i.wrapperComponent,o=i.state;if(!r)return{x:0,y:0};var a=r.getBoundingClientRect();return{x:(n-a.left-o.positionX)/o.scale,y:(e-a.top-o.positionY)/o.scale}}function Ue(i,n,e){var r=i.wrapperComponent,o=i.state;if(!r)return{x:0,y:0};var a=r.getBoundingClientRect();return{x:a.left+o.positionX+n*o.scale,y:a.top+o.positionY+e*o.scale}}var Qe=function(i){return function(n,e,r){return n===void 0&&(n=.5),e===void 0&&(e=300),r===void 0&&(r="easeOut"),Vi(i,1,n,e,r)}},Ge=function(i){return function(n,e,r){return n===void 0&&(n=.5),e===void 0&&(e=300),r===void 0&&(r="easeOut"),Vi(i,-1,n,e,r)}},qe=function(i){return function(n,e,r,o,a){o===void 0&&(o=300),a===void 0&&(a="easeOut");var t=i.state,l=t.positionX,s=t.positionY,d=t.scale,u=i.wrapperComponent,v=i.contentComponent,p=i.setup.disabled;if(p||!u||!v)return Promise.resolve();var m={positionX:Number.isNaN(n)?l:n,positionY:Number.isNaN(e)?s:e,scale:Number.isNaN(r)?d:r};return H(i,m,o,a)}},Je=function(i){return function(n,e){return n===void 0&&(n=200),e===void 0&&(e="easeOut"),ji(i,n,e)}},$e=function(i){return function(n,e,r){e===void 0&&(e=200),r===void 0&&(r="easeOut");var o=i.state,a=i.wrapperComponent,t=i.contentComponent;if(a&&t){var l=ti(n||o.scale,a,t);return H(i,l,e,r)}return Promise.resolve()}},xe=function(i){return function(n,e,r,o,a){o===void 0&&(o=300),a===void 0&&(a="easeOut");var t=i.wrapperComponent,l=i.contentComponent,s=i.setup;if(s.disabled||!t||!l)return Promise.resolve();var d=Qi(i,e,r),u=ai(i,n,d.x,d.y);if(!u)return Promise.resolve();var v=s.zoomAnimation.disabled?0:o;return q(i,u,v,a)}},Ie=function(i){return function(n,e){return Qi(i,n,e)}},ir=function(i){return function(n,e){return Ue(i,n,e)}},er=function(i,n){var e,r=i.wrapperComponent;if(!r)return[];var o=r.getRootNode(),a=o&&"getElementById"in o?o:(e=r.ownerDocument)!==null&&e!==void 0?e:typeof document<"u"?document:null,t=Array.isArray(n)?n:[n];return t.map(function(l){return typeof l=="string"?a==null?void 0:a.getElementById(l):l}).filter(function(l){return!!l&&r.contains(l)})},rr=function(i){return function(n,e,r,o,a,t){var l,s,d,u;r===void 0&&(r=600),o===void 0&&(o="easeOut"),a===void 0&&(a=0),t===void 0&&(t=0),_(i);var v=typeof e=="object"&&e!==null?e:{scale:e},p=er(i,n);if(!i.wrapperComponent||p.length===0)return Promise.resolve();var m=je(i,Fe(p),v.scale,(l=v.offsetX)!==null&&l!==void 0?l:a,(s=v.offsetY)!==null&&s!==void 0?s:t,v.minScale,v.maxScale);return H(i,m,(d=v.animationTime)!==null&&d!==void 0?d:r,(u=v.animationType)!==null&&u!==void 0?u:o)}},nr=function(i){return function(n){var e,r,o;n===void 0&&(n={});var a=i.wrapperComponent,t=i.contentComponent,l=i.setup;if(l.disabled||!a||!t)return Promise.resolve();var s=Si(i,(e=n.mode)!==null&&e!==void 0?e:"contain",n.minScale,n.maxScale);if(!s)return Promise.resolve();var d=l.zoomAnimation.disabled?0:(r=n.animationTime)!==null&&r!==void 0?r:200;return q(i,s,d,(o=n.animationType)!==null&&o!==void 0?o:"easeOut")}},or=function(i){return function(n,e,r,o){r===void 0&&(r=200),o===void 0&&(o="easeOut");var a=i.wrapperComponent,t=i.contentComponent,l=i.setup,s=i.state;if(l.disabled||!a||!t||!Number.isFinite(n)||!Number.isFinite(e))return Promise.resolve();var d=k(i,s.scale),u=F(s.positionX+n,s.positionY+e,d,l.limitToBounds,0,0,a),v=u.x,p=u.y;return v===s.positionX&&p===s.positionY?Promise.resolve():Ze(i,{scale:s.scale,positionX:v,positionY:p},r,o)}},J=function(i){return{instance:i,state:i.state,zoomIn:Qe(i),zoomOut:Ge(i),setTransform:qe(i),resetTransform:Je(i),centerView:$e(i),zoomToElement:rr(i),zoomToPoint:xe(i),clientToContent:Ie(i),contentToClient:ir(i),fitToView:nr(i),panBy:or(i)}},ar=function(i){return{instance:i,state:i.state}},b=function(i){var n={};return Object.assign(n,ar(i)),Object.assign(n,J(i)),n},hi=!1;function ei(){try{var i={get passive(){return hi=!0,!1}};return i}catch{return hi=!1,hi}}var ri=".".concat(gi.wrapperClass),j=function(i,n){return n.some(function(e){return i.matches("".concat(ri," ").concat(e,", ").concat(ri," .").concat(e,", ").concat(ri," ").concat(e," *, ").concat(ri," .").concat(e," *"))})},tr=new Set(["INPUT","TEXTAREA","SELECT","OPTION"]),lr='[contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]',sr='[draggable="true"]',Gi=function(i){return!i||typeof i.closest!="function"?null:i},Ci=function(i){var n=Gi(i);return n?tr.has(n.tagName)||n.isContentEditable?!0:n.closest(lr)!==null:!1},ur=function(i){var n=Gi(i);return n?n.closest(sr)!==null:!1},$=function(i){i&&clearTimeout(i)},dr=function(i){return Number.parseFloat(i.toFixed(8))},qi=function(i,n,e){var r=dr(e);return"translate(".concat(i,"px, ").concat(n,"px) scale(").concat(r,")")},ti=function(i,n,e){var r=e.offsetWidth*i,o=e.offsetHeight*i,a=(n.clientWidth-r)/2,t=(n.clientHeight-o)/2;return{scale:i,positionX:a,positionY:t}};function vr(i,n){i!=null&&(typeof i=="function"?i(n):i.current=n)}function pr(i){return function(n){i.forEach(function(e){typeof e=="function"?e(n):e!=null&&(e.current=n)})}}var Ti=typeof window<"u"?Y.useLayoutEffect:Y.useEffect,fr={panLeft:["ArrowLeft"],panRight:["ArrowRight"],panUp:["ArrowUp"],panDown:["ArrowDown"],zoomIn:["+","="],zoomOut:["-","_"],reset:["0"]},mr=function(i){return Object.values(fr).some(function(n){return n.includes(i)})};function hr(i,n){var e=i.setup,r=e.disabled,o=e.keyboard,a=e.panning;if(r||o.disabled||n.defaultPrevented||n.ctrlKey||n.metaKey||n.altKey||!mr(n.key))return!1;var t=n.target;if(Ci(t)||t&&typeof t.matches=="function"&&j(t,o.excluded))return!1;var l=o.panStep,s=o.zoomStep,d=o.animationTime,u=o.animationType,v=J(i),p=n.key,m=a.lockAxisX?0:l,f=a.lockAxisY?0:l;return p==="ArrowLeft"?v.panBy(m,0,d,u):p==="ArrowRight"?v.panBy(-m,0,d,u):p==="ArrowUp"?v.panBy(0,f,d,u):p==="ArrowDown"?v.panBy(0,-f,d,u):p==="+"||p==="="?v.zoomIn(s,d,u):p==="-"||p==="_"?v.zoomOut(s,d,u):p==="0"&&v.resetTransform(d,u),n.cancelable&&n.preventDefault(),n.stopPropagation(),!0}var wi=function(i,n){return{wrapperWidth:i.offsetWidth,wrapperHeight:i.offsetHeight,contentWidth:n.offsetWidth,contentHeight:n.offsetHeight}},cr=function(i,n){return!i||i.wrapperWidth!==n.wrapperWidth||i.wrapperHeight!==n.wrapperHeight||i.contentWidth!==n.contentWidth||i.contentHeight!==n.contentHeight},Ji=function(i){return i.isPanning||i.isPinching},gr=function(i){return Ji(i)||i.wheelStopEventTimer!==null||i.wheelAnimationTimer!==null};function $i(i){var n=i.wrapperComponent,e=i.contentComponent,r=i.setup,o=i.state;if(!n||!e)return null;var a=k(i,o.scale),t=r.limitToBounds,l=r.centerZoomedOut;if(!t&&!l)return null;var s=F(o.positionX,o.positionY,a,!0,0,0,n),d=s.x,u=s.y,v=d===R(o.positionX,2)&&u===R(o.positionY,2);return v?null:{scale:o.scale,positionX:d,positionY:u}}var yi=function(i){i.animation=null,i.animationFrame=null,i.isAnimating=!1,i.resizeAnimation=null};function wr(i){var n=i.setup.autoAlignment.animationTime,e=Math.max(n/5,1);_(i);var r=Date.now(),o=function(){if(!(!i.mounted||i.animation!==o)){var a=Date.now(),t=Math.max(a-r,1);r=a;var l=$i(i);if(!l){yi(i);return}var s=i.state,d=s.scale,u=s.positionX,v=s.positionY,p=1-Math.exp(-t/e),m=u+(l.positionX-u)*p,f=v+(l.positionY-v)*p,h=Math.abs(l.positionX-m)<.5&&Math.abs(l.positionY-f)<.5;if(h&&(m=l.positionX,f=l.positionY),i.isAnimating=!h,i.setState(d,m,f),h){yi(i);return}i.animationFrame=requestAnimationFrame(o)}};i.animation=o,i.resizeAnimation=o,i.animationResolve=null,i.animationFrame=requestAnimationFrame(o)}function xi(i){if(i.setup.disabled){k(i,i.state.scale);return}if(Ji(i)){i.isResizeAlignmentPending=!0;return}var n=i.animation!==null&&i.animation===i.resizeAnimation;if(i.animation&&!n){var e=i.state.scale,r=i.setup,o=r.minScale,a=r.maxScale;if(e<o||e>a){i.isResizeAlignmentPending=!0;return}_(i)}var t=$i(i);if(!t){n&&yi(i);return}if(!n){if(i.setup.autoAlignment.animationTime===0){i.setState(t.scale,t.positionX,t.positionY);return}wr(i)}}function yr(i){var n=i.wrapperComponent,e=i.contentComponent;if(!(!n||!e)){var r=wi(n,e);cr(i.measuredSizes,r)&&(i.measuredSizes=r,xi(i))}}var Ii=function(i,n){var e=i.setup.wheel,r=e.disabled,o=e.wheelDisabled,a=e.touchPadDisabled,t=e.excluded,l=i.isInitialized,s=i.isPanning,d=n.target,u=l&&!s&&!r&&d;if(!u||n.deltaY===0||o&&!n.ctrlKey||a&&n.ctrlKey)return!1;var v=j(d,t);if(v)return!1;var p=i.isPressingKeys(i.setup.wheel.activationKeys);return!!p},br=function(i,n){var e=i.setup,r=e.disabled,o=e.trackPadPanning,a=o.activationKeys,t=o.excluded;if(!i.wrapperComponent||!i.contentComponent||r||o.disabled||n.ctrlKey)return!1;var l=Ii(i,n);if(l)return!1;var s=n.target,d=j(s,t);if(d)return!1;var u=i.isPressingKeys(a);return!!u},Pr=function(i){return i?i.deltaY<0?1:-1:0};function Sr(i,n){var e=Pr(i),r=pe(n,e);return r}function ie(i,n,e){var r=n.getBoundingClientRect(),o=0,a=0;if("clientX"in i)o=(i.clientX-r.left)/e,a=(i.clientY-r.top)/e;else{var t=i.touches[0];o=(t.clientX-r.left)/e,a=(t.clientY-r.top)/e}return Number.isNaN(o)||Number.isNaN(a)?(console.error("No mouse or touch offset found"),{x:0,y:0}):{x:o,y:a}}var Cr=function(i,n,e,r,o){var a=i.state.scale,t=i.wrapperComponent,l=i.setup,s=l.maxScale,d=l.minScale,u=l.zoomAnimation,v=l.disablePadding,p=u.size,m=u.disabled;if(!t)throw new Error("Wrapper is not mounted");var f=a+n*e,h=r?!1:!m,g=V(f,d,s,p,h&&!v);return g},ee=function(i,n){var e=i.previousWheelEvent,r=i.state.scale,o=i.setup,a=o.maxScale,t=o.minScale;return e?r<a||r>t||Math.sign(e.deltaY)!==Math.sign(n.deltaY)||e.deltaY>0&&e.deltaY<n.deltaY||e.deltaY<0&&e.deltaY>n.deltaY||Math.sign(e.deltaY)!==Math.sign(n.deltaY):!1},Tr=function(i,n){var e=i.setup.pinch,r=e.disabled,o=e.excluded,a=i.isInitialized,t=n.target,l=a&&!r&&t;if(!l)return!1;var s=j(t,o);return!s},Ar=function(i){var n=i.setup.pinch.disabled,e=i.isInitialized,r=i.pinchStartDistance,o=e&&!n&&r!==null;return!!o},Yr=function(i,n,e){var r=e.getBoundingClientRect(),o=i.touches,a=o[0].clientX-r.left,t=o[0].clientY-r.top,l=o[1].clientX-r.left,s=o[1].clientY-r.top;return{x:(a+l)/2/n,y:(t+s)/2/n}},re=function(i){return Math.sqrt(Math.pow(i.touches[0].pageX-i.touches[1].pageX,2)+Math.pow(i.touches[0].pageY-i.touches[1].pageY,2))},Xr=5,Er=function(i,n){var e=i.pinchStartScale,r=i.pinchStartDistance,o=i.setup,a=o.maxScale,t=o.minScale,l=o.zoomAnimation,s=o.disablePadding,d=o.pinch,u=l.size,v=l.disabled,p=d.step;if(!e||r===null)throw new Error("Pinch touches distance was not provided");if(n<0)return i.state.scale;var m=n/r,f=m*e,h=(f-e)*(p/Xr),g=e+h,c=g===1/0?0:R(g,10);return V(c,t,a,u,!v&&!s)},ne=160,oe=100,zr=function(i,n){var e=i.props,r=e.onWheelStart,o=e.onZoomStart;_(i),i.wheelStopEventTimer||(P(b(i),n,r),P(b(i),n,o))},_r=function(i,n){var e=i.props,r=e.onWheel,o=e.onZoom,a=i.contentComponent,t=i.setup,l=i.state,s=l.scale,d=t.limitToBounds,u=t.centerZoomedOut,v=t.zoomAnimation,p=t.wheel,m=t.disablePadding,f=t.smooth,h=v.size,g=v.disabled,c=p.step;if(!a)throw new Error("Component not mounted");n.cancelable&&n.preventDefault(),n.stopPropagation();var y=Sr(n,null),w=f?c*Math.abs(n.deltaY):c,S=Cr(i,y,w,!n.ctrlKey);if(s!==S){var X=k(i,S),T=ie(n,a,s),C=g||h===0||u||m,E=d&&C,A=oi(i,T.x,T.y,S,X,E),M=A.x,z=A.y;i.previousWheelEvent=n,i.setState(S,M,z),P(b(i),n,r),P(b(i),n,o)}},kr=function(i,n){var e=i.props,r=e.onWheelStop,o=e.onZoomStop;$(i.wheelAnimationTimer),i.wheelAnimationTimer=setTimeout(function(){i.mounted&&(Pi(i,n.x,n.y),i.wheelAnimationTimer=null,i.flushResizeAlignment())},oe);var a=ee(i,n);a&&($(i.wheelStopEventTimer),i.wheelStopEventTimer=setTimeout(function(){i.mounted&&(i.wheelStopEventTimer=null,P(b(i),n,r),P(b(i),n,o),i.flushResizeAlignment())},ne))},Wr=function(i,n){var e=i.props,r=e.onWheelStart,o=e.onPanningStart;_(i),i.wheelStopEventTimer||(i.wheelAnimationTimer||k(i,i.state.scale),P(b(i),n,r),P(b(i),n,o))},Or=function(i,n){var e=i.props,r=e.onWheelStop,o=e.onPanningStop;$(i.wheelAnimationTimer),i.wheelAnimationTimer=setTimeout(function(){i.mounted&&(Pi(i,n.x,n.y),i.wheelAnimationTimer=null,i.flushResizeAlignment())},oe);var a=ee(i,n);a&&($(i.wheelStopEventTimer),i.wheelStopEventTimer=setTimeout(function(){i.mounted&&(i.wheelStopEventTimer=null,P(b(i),n,r),P(b(i),n,o),i.flushResizeAlignment())},ne))},ae=function(i){for(var n=0,e=0,r=0;r<2;r+=1)n+=i.touches[r].clientX,e+=i.touches[r].clientY;var o=n/2,a=e/2;return{x:o,y:a}},Mr=function(i,n){var e=re(n);i.pinchStartDistance=e,i.lastDistance=e,i.pinchStartScale=i.state.scale,i.isPanning=!1,i.isPinching=!0,i.pinchPreviousCenter=ae(n),_(i)},Dr=function(i,n){var e=i.contentComponent,r=i.pinchStartDistance,o=i.wrapperComponent,a=i.pinchPreviousCenter,t=i.state.scale,l=i.setup,s=l.limitToBounds,d=l.centerZoomedOut,u=l.zoomAnimation,v=l.autoAlignment,p=l.pinch,m=l.panning,f=u.disabled,h=u.size,g=p.allowPanning;if(!(r===null||!e)){var c=Yr(n,t,e);if(!(!Number.isFinite(c.x)||!Number.isFinite(c.y))){var y=re(n),w=Er(i,y),S=ae(n),X=t/w,T=(S.x-((a==null?void 0:a.x)||0))*X,C=(S.y-((a==null?void 0:a.y)||0))*X;if(!(w===t&&T===0&&C===0)){i.pinchPreviousCenter=S;var E=k(i,w),A=f||h===0||d,M=s&&A,z=oi(i,c.x,c.y,w,E,M),D=z.x,W=z.y;if(i.pinchMidpoint=c,i.lastDistance=y,m.disabled||!g)i.setState(w,D,W);else{var N=v.sizeX,U=v.sizeY,li=K(i,N,w),si=K(i,U,w),I=D+T,ui=W+C,ii=F(I,ui,E,s,li,si,o),Q=ii.x,di=ii.y;i.setState(w,Q,di)}}}}},Nr=function(i){var n=i.pinchMidpoint;i.velocity=null,i.lastDistance=null,i.pinchMidpoint=null,i.pinchStartScale=null,i.pinchStartDistance=null,i.isPinching=!1,Pi(i,n==null?void 0:n.x,n==null?void 0:n.y)},te=function(i,n){var e=i.props.onZoomStop,r=i.setup.doubleClick.animationTime;$(i.doubleClickStopEventTimer),i.doubleClickStopEventTimer=setTimeout(function(){i.doubleClickStopEventTimer=null,i.mounted&&P(b(i),n,e)},r)},Rr=function(i,n){var e=i.props,r=e.onZoomStart,o=e.onZoom,a=i.setup.doubleClick,t=a.animationTime,l=a.animationType;P(b(i),n,r),ji(i,t,l,function(){return P(b(i),n,o)}),te(i,n)};function Br(i,n){return i==="toggle"?n===1?1:-1:i==="zoomOut"?-1:1}function Lr(i,n){var e=i.setup,r=i.doubleClickStopEventTimer,o=i.state,a=i.contentComponent,t=o.scale,l=i.props,s=l.onZoomStart,d=l.onZoom,u=e.doubleClick,v=u.disabled,p=u.mode,m=u.step,f=u.animationTime,h=u.animationType;if(!v&&!r){if(p==="reset")return Rr(i,n);if(!a)return console.error("No ContentComponent found");var g=Br(p,i.state.scale),c=Fi(i,g,m);if(t!==c){P(b(i),n,s);var y=ie(n,a,t),w=ai(i,c,y.x,y.y);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");P(b(i),n,d),H(i,w,f,h),te(i,n)}}}var Kr=function(i,n){var e=i.isInitialized,r=i.setup,o=i.wrapperComponent,a=r.doubleClick,t=a.disabled,l=a.excluded,s=n.target,d=o==null?void 0:o.contains(s),u=e&&s&&d&&!t;if(!u)return!1;var v=j(s,l);return!(v||Ci(s))},Hr=(function(){function i(n){var e=this;this.mounted=!0,this.onChangeCallbacks=new Set,this.onInitCallbacks=new Set,this.onTransformCallbacks=new Set,this.wrapperComponent=null,this.contentComponent=null,this.isInitialized=!1,this.bounds=null,this.previousWheelEvent=null,this.wheelStopEventTimer=null,this.wheelAnimationTimer=null,this.isPanning=!1,this.isWheelPanning=!1,this.startCoords=null,this.panStartPosition=null,this.lastTouch=null,this.isPinching=!1,this.distance=null,this.lastDistance=null,this.pinchStartDistance=null,this.pinchStartScale=null,this.pinchMidpoint=null,this.pinchPreviousCenter=null,this.doubleClickStopEventTimer=null,this.velocity=null,this.velocityTime=null,this.lastMousePosition=null,this.isAnimating=!1,this.animation=null,this.animationFrame=null,this.animationResolve=null,this.initObserverTimer=null,this.isInitialLayoutPending=!1,this.measuredSizes=null,this.isResizeAlignmentPending=!1,this.resizeAnimation=null,this.pressedKeys={},this.selectionLock=null,this.mount=function(){e.mounted=!0,e.initializeWindowEvents()},this.unmount=function(){e.mounted=!1,e.cleanupWindowEvents()},this.update=function(r){e.props=r,e.setup=Ri(r),e.wrapperComponent&&e.contentComponent&&!gr(e)&&k(e,e.state.scale)},this.clearTimers=function(){e.wheelStopEventTimer&&clearTimeout(e.wheelStopEventTimer),e.wheelAnimationTimer&&clearTimeout(e.wheelAnimationTimer),e.doubleClickStopEventTimer&&clearTimeout(e.doubleClickStopEventTimer),e.initObserverTimer&&clearTimeout(e.initObserverTimer),e.wheelStopEventTimer=null,e.wheelAnimationTimer=null,e.doubleClickStopEventTimer=null,e.initObserverTimer=null},this.initializeWindowEvents=function(){var r,o,a,t,l=ei(),s=(r=e.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,d=s==null?void 0:s.defaultView;(o=e.wrapperComponent)===null||o===void 0||o.addEventListener("wheel",e.onWheelPanning,l),(a=e.wrapperComponent)===null||a===void 0||a.addEventListener("keyup",e.setKeyUnPressed,l),(t=e.wrapperComponent)===null||t===void 0||t.addEventListener("keydown",e.setKeyPressed,l),d==null||d.addEventListener("mousedown",e.onPanningStart,l),d==null||d.addEventListener("mousemove",e.onPanning,l),d==null||d.addEventListener("mouseup",e.onPanningStop,l),s==null||s.addEventListener("mouseleave",e.clearPanning,l),d==null||d.addEventListener("keyup",e.setKeyUnPressed,l),d==null||d.addEventListener("keydown",e.setKeyPressed,l),d==null||d.addEventListener("blur",e.handleWindowBlur)},this.cleanupWindowEvents=function(){var r,o,a,t,l,s=ei(),d=(r=e.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,u=d==null?void 0:d.defaultView;u==null||u.removeEventListener("mousedown",e.onPanningStart,s),u==null||u.removeEventListener("mousemove",e.onPanning,s),u==null||u.removeEventListener("mouseup",e.onPanningStop,s),d==null||d.removeEventListener("mouseleave",e.clearPanning,s),u==null||u.removeEventListener("keyup",e.setKeyUnPressed,s),u==null||u.removeEventListener("keydown",e.setKeyPressed,s),u==null||u.removeEventListener("blur",e.handleWindowBlur),(o=e.wrapperComponent)===null||o===void 0||o.removeEventListener("wheel",e.onWheelPanning,s),(a=e.wrapperComponent)===null||a===void 0||a.removeEventListener("keyup",e.setKeyUnPressed,s),(t=e.wrapperComponent)===null||t===void 0||t.removeEventListener("keydown",e.setKeyPressed,s),e.cleanupWrapperEvents(),e.clearTimers(),_(e),e.unlockTextSelection(),(l=e.observer)===null||l===void 0||l.disconnect(),e.observer=void 0,e.isInitialLayoutPending=!1,e.isResizeAlignmentPending=!1,e.resizeAnimation=null},this.cleanupWrapperEvents=function(){var r=e.wrapperComponent;if(r){var o=ei();r.removeEventListener("wheel",e.onWheelZoom,o),r.removeEventListener("dblclick",e.onDoubleClick,o),r.removeEventListener("keydown",e.onKeyboardNavigation,o),r.removeEventListener("touchstart",e.onTouchPanningStart,o),r.removeEventListener("touchmove",e.onTouchPanning,o),r.removeEventListener("touchend",e.onTouchPanningStop,o)}},this.handleInitializeWrapperEvents=function(r){var o=ei();r.addEventListener("wheel",e.onWheelZoom,o),r.addEventListener("dblclick",e.onDoubleClick,o),r.addEventListener("keydown",e.onKeyboardNavigation,o),r.addEventListener("touchstart",e.onTouchPanningStart,o),r.addEventListener("touchmove",e.onTouchPanning,o),r.addEventListener("touchend",e.onTouchPanningStop,o)},this.handleInitialize=function(){var r=e.setup,o=r.centerOnInit,a=r.fitOnInit;if(e.applyTransformation(),e.onInitCallbacks.forEach(function(l){return l(b(e))}),o||a){var t=e.applyInitialLayout();e.isInitialLayoutPending=!0,e.initObserverTimer&&clearTimeout(e.initObserverTimer),t&&(e.initObserverTimer=setTimeout(function(){e.initObserverTimer=null,e.isInitialLayoutPending=!1},5e3))}},this.observeSizes=function(r,o){var a;(a=e.observer)===null||a===void 0||a.disconnect(),e.observer=void 0,e.measuredSizes=wi(r,o),!(typeof ResizeObserver>"u")&&(e.observer=new ResizeObserver(e.onSizeChange),e.observer.observe(r),e.observer.observe(o))},this.onSizeChange=function(){var r=e,o=r.wrapperComponent,a=r.contentComponent;if(!(!e.mounted||!o||!a)){if(e.isInitialLayoutPending){var t=(a.offsetWidth>0||a.offsetHeight>0)&&o.clientWidth>0&&o.clientHeight>0;if(!t)return;e.isInitialLayoutPending=!1,e.initObserverTimer&&clearTimeout(e.initObserverTimer),e.initObserverTimer=null,e.onInitCallbacks.forEach(function(l){return l(b(e))}),e.applyInitialLayout(),e.measuredSizes=wi(o,a),k(e,e.state.scale);return}yr(e)}},this.flushResizeAlignment=function(){e.isResizeAlignmentPending&&(e.isResizeAlignmentPending=!1,xi(e))},this.onWheelZoom=function(r){var o=e.setup.disabled;if(!o){e.syncModifierKeys(r);var a=Ii(e,r);a&&(zr(e,r),_r(e,r),kr(e,r))}},this.onWheelPanning=function(r){var o=e.props.onPanning,a=e.setup.trackPadPanning,t=a.lockAxisX,l=a.lockAxisY;e.syncModifierKeys(r);var s=br(e,r);if(s){r.cancelable&&r.preventDefault(),r.stopPropagation();var d=e.state,u=d.positionX,v=d.positionY,p=u-r.deltaX,m=v-r.deltaY,f=t?u:p,h=l?v:m,g=e.setup.autoAlignment,c=g.sizeX,y=g.sizeY,w=K(e,c),S=K(e,y);f===u&&h===v||(Wr(e,r),Ki(e,f,h,w,S),P(b(e),r,o),Or(e,r))}},this.onPanningStart=function(r){var o=e.setup,a=o.disabled,t=o.panning,l=e.props.onPanningStart;if(!(a||t.disabled)){e.syncModifierKeys(r);var s=ki(e,r);if(s){var d=e.isPressingKeys(e.setup.panning.activationKeys);d&&(r.button===0&&!e.setup.panning.allowLeftClickPan||r.button===1&&!e.setup.panning.allowMiddleClickPan||r.button===2&&!e.setup.panning.allowRightClickPan||(r.cancelable&&r.preventDefault(),r.stopPropagation(),_(e),Mi(e,r),e.lockTextSelection(),e.focusForKeyboard(),P(b(e),r,l)))}}},this.onPanning=function(r){var o=e.setup.disabled,a=e.props.onPanning;if(!o){if(e.syncModifierKeys(r),e.isPanning&&r.buttons===0){e.clearPanning(r);return}var t=Wi(e);if(t){var l=e.isPressingKeys(e.setup.panning.activationKeys);l&&(r.cancelable&&r.preventDefault(),r.stopPropagation(),Di(e,r.clientX,r.clientY,B.MOUSE),P(b(e),r,a))}}},this.onPanningStop=function(r){var o=e.setup.panning.velocityDisabled,a=e.props.onPanningStop;e.isPanning&&(e.unlockTextSelection(),He(e,o),P(b(e),r,a),e.flushResizeAlignment())},this.onPinchStart=function(r){var o=e.setup.disabled,a=e.props.onPinchStart;if(!o){var t=Tr(e,r);t&&(Mr(e,r),_(e),P(b(e),r,a))}},this.onPinch=function(r){var o=e.setup.disabled,a=e.props.onPinch;if(!o){var t=Ar(e);t&&(r.cancelable&&r.preventDefault(),r.stopPropagation(),Dr(e,r),P(b(e),r,a))}},this.onPinchStop=function(r){var o=e.props.onPinchStop;e.pinchStartScale&&(Nr(e),P(b(e),r,o),e.flushResizeAlignment())},this.onTouchPanningStart=function(r){var o=e.setup,a=o.disabled,t=o.doubleClick,l=e.props.onPanningStart;if(!a){var s=!(t!=null&&t.disabled),d=e.lastTouch&&+new Date-e.lastTouch<200;if(s&&d&&r.touches.length===1)e.lastTouch=null,e.onDoubleClick(r);else{e.lastTouch=+new Date,_(e);var u=r.touches,v=u.length===1,p=u.length===2,m=ki(e,r);if(v){if(!m||e.setup.panning.disabled)return;_(e),Mi(e,r),e.lockTextSelection(),e.focusForKeyboard(),P(b(e),r,l)}p&&e.onPinchStart(r)}}},this.onTouchPanning=function(r){var o=e.setup.disabled,a=e.props.onPanning;if(e.isPanning&&r.touches.length===1){if(o)return;var t=Wi(e);if(!t)return;r.cancelable&&r.preventDefault(),r.stopPropagation();var l=r.touches[0];Di(e,l.clientX,l.clientY,B.TOUCH),P(b(e),r,a)}else r.touches.length>1&&e.onPinch(r)},this.onTouchPanningStop=function(r){e.onPanningStop(r),e.onPinchStop(r)},this.onDoubleClick=function(r){var o=e.setup.disabled;if(!o){var a=Kr(e,r);a&&Lr(e,r)}},this.clearPanning=function(r){e.isPanning&&e.onPanningStop(r)},this.handleWindowBlur=function(){e.pressedKeys={},e.isPanning&&(e.isPanning=!1,e.startCoords=null),e.unlockTextSelection(),e.flushResizeAlignment()},this.syncModifierKeys=function(r){var o=r.ctrlKey,a=r.metaKey,t=r.shiftKey,l=r.altKey;typeof o=="boolean"&&(e.pressedKeys.Control=o),typeof a=="boolean"&&(e.pressedKeys.Meta=a),typeof t=="boolean"&&(e.pressedKeys.Shift=t),typeof l=="boolean"&&(e.pressedKeys.Alt=l)},this.setKeyPressed=function(r){e.pressedKeys[r.key]=!0},this.setKeyUnPressed=function(r){e.pressedKeys[r.key]=!1},this.isPressingKeys=function(r){return typeof r=="function"?r(Object.entries(e.pressedKeys).filter(function(o){var a=o[1];return a}).map(function(o){var a=o[0];return a})):r.length?!!r.every(function(o){return e.pressedKeys[o]}):!0},this.onKeyboardNavigation=function(r){hr(e,r)},this.focusForKeyboard=function(){var r,o=e.wrapperComponent;if(!(!o||e.setup.keyboard.disabled)){var a=(r=o.ownerDocument)===null||r===void 0?void 0:r.activeElement;a&&o.contains(a)||typeof o.focus=="function"&&o.focus({preventScroll:!0})}},this.lockTextSelection=function(){var r=e.wrapperComponent;!r||e.selectionLock||(e.selectionLock={userSelect:r.style.userSelect,webkitUserSelect:r.style.webkitUserSelect},r.style.userSelect="none",r.style.webkitUserSelect="none")},this.unlockTextSelection=function(){var r=e.selectionLock;e.selectionLock=null;var o=e.wrapperComponent;!o||!r||(o.style.userSelect=r.userSelect,o.style.webkitUserSelect=r.webkitUserSelect)},this.applyInitialLayout=function(){var r=e.setup.fitOnInit,o=e,a=o.wrapperComponent,t=o.contentComponent,l=!!a&&!!t&&a.clientWidth>0&&a.clientHeight>0&&(t.offsetWidth>0||t.offsetHeight>0);if(r){var s=Si(e,r==="cover"?"cover":"contain");if(s)return e.setState(s.scale,s.positionX,s.positionY),l}return e.setCenter(),l},this.setCenter=function(){if(e.wrapperComponent&&e.contentComponent){var r=ti(e.state.scale,e.wrapperComponent,e.contentComponent);e.setState(r.scale,r.positionX,r.positionY)}},this.handleTransformStyles=function(r,o,a){return e.props.customTransform?e.props.customTransform(r,o,a):qi(r,o,a)},this.getContext=function(){return b(e)},this.applyTransformation=function(){if(!(!e.mounted||!e.contentComponent)){var r=e.state,o=r.scale,a=r.positionX,t=r.positionY,l=e.handleTransformStyles(a,t,o);e.props.detached||(e.contentComponent.style.transform=l),e.onTransformCallbacks.forEach(function(s){return s({scale:o,positionX:a,positionY:t,previousScale:e.state.previousScale,ref:b(e)})})}},this.setState=function(r,o,a){var t=e.props.onTransform;if(!Number.isNaN(r)&&!Number.isNaN(o)&&!Number.isNaN(a)){var l=Math.max(r,1e-7);l!==e.state.scale&&(e.state.previousScale=e.state.scale,e.state.scale=l),e.state.positionX=o,e.state.positionY=a,e.applyTransformation();var s=b(e);e.onChangeCallbacks.forEach(function(d){return d(s)}),P(s,{scale:e.state.scale,positionX:o,positionY:a},t)}else console.error("Detected NaN set state values")},this.onTransform=function(r){return e.onTransformCallbacks.has(r)||e.onTransformCallbacks.add(r),function(){e.onTransformCallbacks.delete(r)}},this.onChange=function(r){return e.onChangeCallbacks.has(r)||e.onChangeCallbacks.add(r),function(){e.onChangeCallbacks.delete(r)}},this.onInit=function(r){return e.onInitCallbacks.has(r)||e.onInitCallbacks.add(r),function(){e.onInitCallbacks.delete(r)}},this.init=function(r,o){e.mounted=!0,e.cleanupWindowEvents(),e.wrapperComponent=r,e.contentComponent=o,k(e,e.state.scale),e.handleInitializeWrapperEvents(r),e.handleInitialize(),e.observeSizes(r,o),e.initializeWindowEvents(),e.isInitialized=!0;var a=b(e);P(a,void 0,e.props.onInit),vr(e.props.ref,a)},this.props=n,this.setup=Ri(this.props),this.state=Zi(this.props)}return i})(),x=ni.createContext(null),Zr=function(i,n){return typeof i=="function"?i(n):i},qr=ni.forwardRef(function(i,n){var e=Y.useRef(null);e.current===null&&(e.current=new Hr(i));var r=e.current,o=Zr(i.children,J(r));return Y.useImperativeHandle(n,function(){return J(r)},[r]),Y.useEffect(function(){return r.mount(),function(){r.unmount()}},[r]),Y.useEffect(function(){r.update(i)},[r,i]),L.jsx(x.Provider,O({value:r},{children:o}))});ni.forwardRef(function(i,n){var e=Y.useRef(null),r=Y.useContext(x);return Ti(function(){var o=function(a){if(e.current){var t=0,l=0;e.current.style.transform=r.handleTransformStyles(t,l,1/a)}};return o(r.state.scale),r.onChange(function(a){o(a.instance.state.scale)})},[r]),L.jsx("div",O({},i,{ref:pr([e,n])}))});function Fr(i,n){n===void 0&&(n={});var e=n.insertAt;if(!(typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=i:o.appendChild(document.createTextNode(i))}}var Vr=`.transform-component-module_wrapper__SPB86 {
1
+ import{R as ni,r as Y,j as L}from"./index-MHIn2TC9.js";var R=function(i,n){return Number(i.toFixed(n))},pe=function(i,n){return typeof i=="number"?i:n},P=function(i,n,e){e&&typeof e=="function"&&e(i,n)},fe=function(i){return-Math.cos(i*Math.PI)/2+.5},me=function(i){return i},he=function(i){return i*i},ce=function(i){return i*(2-i)},ge=function(i){return i<.5?2*i*i:-1+(4-2*i)*i},we=function(i){return i*i*i},ye=function(i){return--i*i*i+1},be=function(i){return i<.5?4*i*i*i:(i-1)*(2*i-2)*(2*i-2)+1},Pe=function(i){return i*i*i*i},Se=function(i){return 1- --i*i*i*i},Ce=function(i){return i<.5?8*i*i*i*i:1-8*--i*i*i*i},Te=function(i){return i*i*i*i*i},Ae=function(i){return 1+--i*i*i*i*i},Ye=function(i){return i<.5?16*i*i*i*i*i:1+16*--i*i*i*i*i},Bi={easeOut:fe,linear:me,easeInQuad:he,easeOutQuad:ce,easeInOutQuad:ge,easeInCubic:we,easeOutCubic:ye,easeInOutCubic:be,easeInQuart:Pe,easeOutQuart:Se,easeInOutQuart:Ce,easeInQuint:Te,easeOutQuint:Ae,easeInOutQuint:Ye},Xe=function(i){var n=i.animationResolve;i.animationResolve=null,n==null||n()},_=function(i){i.animationFrame!==null&&cancelAnimationFrame(i.animationFrame),i.animationFrame=null,i.isAnimating=!1,i.animation=null,i.velocity=null,Xe(i)};function Li(i,n,e,r,o){if(!i.mounted){o==null||o();return}var a=new Date().getTime(),t=1;_(i);var l=function(){if(!(!i.mounted||i.animation!==l)){var s=new Date().getTime()-a,d=s/e,u=Bi[n],v=u(d);if(s>=e){i.animation=null,i.animationFrame=null;var p=i.animationResolve;i.animationResolve=null,r(t),p==null||p(),i.flushResizeAlignment()}else r(v),i.animationFrame=requestAnimationFrame(l)}};i.animation=l,i.animationResolve=o??null,i.animationFrame=requestAnimationFrame(l)}function Ee(i){var n=i.scale,e=i.positionX,r=i.positionY;return!(Number.isNaN(n)||Number.isNaN(e)||Number.isNaN(r))}function H(i,n,e,r){var o=Ee(n);if(!i.mounted||!o)return Promise.resolve();var a=i.setState,t=i.state,l=t.scale,s=t.positionX,d=t.positionY,u=n.scale-l,v=n.positionX-s,p=n.positionY-d;return e===0?(a(n.scale,n.positionX,n.positionY),Promise.resolve()):new Promise(function(m){Li(i,r,e,function(f){f!==1?i.isAnimating=!0:i.isAnimating=!1;var h=l+u*f,g=s+v*f,c=d+p*f;a(h,g,c)},m)})}function ze(i,n,e){var r=i.clientWidth,o=i.clientHeight,a=n.offsetWidth,t=n.offsetHeight,l=a*e,s=t*e,d=r-l,u=o-s;return{wrapperWidth:r,wrapperHeight:o,newContentWidth:l,newDiffWidth:d,newContentHeight:s,newDiffHeight:u}}var _e=function(i,n,e,r,o,a,t){var l=i>n?e*(t?.5:1):0,s=r>o?a*(t?.5:1):0,d=i-n-l,u=l,v=r-o-s,p=s;return{minPositionX:d,maxPositionX:u,minPositionY:v,maxPositionY:p,scaleWidthFactor:l,scaleHeightFactor:s}},bi=function(i,n){var e=i.wrapperComponent,r=i.contentComponent,o=i.setup,a=o.centerZoomedOut,t=o.disablePadding;if(!e||!r)throw new Error("Components are not mounted");var l=ze(e,r,n),s=l.wrapperWidth,d=l.wrapperHeight,u=l.newContentWidth,v=l.newContentHeight,p=l.newDiffWidth,m=l.newDiffHeight,f=_e(s,u,p,d,v,m,!!a),h=s>=u&&d>=v;t&&h&&!a&&(f.minPositionX=0,f.maxPositionX=0,f.minPositionY=0,f.maxPositionY=0);var g=i.setup,c=g.minPositionX,y=g.maxPositionX,w=g.minPositionY,S=g.maxPositionY;return c!=null&&(f.minPositionX=s*(1-n)+c*n),y!=null&&(f.maxPositionX=y*n),w!=null&&(f.minPositionY=d*(1-n)+w*n),S!=null&&(f.maxPositionY=S*n),f},G=function(i,n,e,r){return r?i<n?R(n,2):i>e?R(e,2):R(i,2):R(i,2)},k=function(i,n){var e=bi(i,n);return i.bounds=e,e};function F(i,n,e,r,o,a,t){var l=e.minPositionX,s=e.minPositionY,d=e.maxPositionX,u=e.maxPositionY,v=0,p=0;t&&(v=o,p=a);var m=G(i,l-v,d+v,r),f=G(n,s-p,u+p,r);return{x:m,y:f}}function oi(i,n,e,r,o,a){var t=i.state,l=t.scale,s=t.positionX,d=t.positionY,u=r-l;if(!Number.isFinite(n)||!Number.isFinite(e))return console.error("Mouse X and Y position were not provided!"),{x:s,y:d};var v=s-n*u,p=d-e*u,m=F(v,p,o,a,0,0,null);return m}var _i=1e-7;function V(i,n,e,r,o){var a=o?r:0,t=Math.max(n-a,_i),l=e+a;return!Number.isNaN(e)&&i>=l?l:!Number.isNaN(n)&&i<=t?t:Math.max(i,_i)}var ki=function(i,n){var e=i.setup.panning.excluded,r=i.isInitialized,o=i.wrapperComponent,a=n.target,t=function(u){return!!u&&typeof u=="object"&&u.nodeType===1&&typeof u.contains=="function"},l=typeof n.composedPath=="function"?n.composedPath().some(function(u){return t(u)&&!!(o!=null&&o.contains(u))}):!!(o!=null&&o.contains(a)),s=r&&a&&l;if(!s)return!1;var d=j(a,e);return!(d||ur(a)||Ci(a))},Wi=function(i){var n=i.isInitialized,e=i.isPanning,r=i.setup,o=r.panning.disabled,a=n&&e&&!o;return!!a},ke=function(i,n){var e=i.state,r=e.positionX,o=e.positionY;i.isPanning=!0;var a=n.clientX,t=n.clientY;i.startCoords={x:a-r,y:t-o}},We=function(i,n){var e=n.touches,r=i.state,o=r.positionX,a=r.positionY;i.isPanning=!0;var t=e.length===1;if(t){var l=e[0].clientX,s=e[0].clientY;i.startCoords={x:l-o,y:s-a}}};function Oe(i){var n=i.state,e=n.positionX,r=n.positionY,o=n.scale,a=i.setup,t=a.disabled,l=a.limitToBounds,s=a.centerZoomedOut,d=i.wrapperComponent;if(!(t||!d||!i.bounds)){var u=i.bounds,v=u.maxPositionX,p=u.minPositionX,m=u.maxPositionY,f=u.minPositionY,h=e>v||e<p,g=r>m||r<f,c=e>v?d.clientWidth:i.setup.minPositionX||0,y=r>m?d.clientHeight:i.setup.minPositionY||0,w=oi(i,c,y,o,i.bounds,l||s),S=w.x,X=w.y;return{scale:o,positionX:h?S:e,positionY:g?X:r}}}function Ki(i,n,e,r,o){var a=i.setup.limitToBounds,t=i.wrapperComponent,l=i.bounds,s=i.state,d=s.scale,u=s.positionX,v=s.positionY;if(!(t===null||l===null||n===u&&e===v)){var p=F(n,e,l,a,r,o,t),m=p.x,f=p.y;i.setState(d,m,f)}}var Me=function(i,n,e){var r=i.startCoords,o=i.state,a=i.setup.panning,t=a.lockAxisX,l=a.lockAxisY,s=o.positionX,d=o.positionY;if(!r)return{x:s,y:d};var u=n-r.x,v=e-r.y,p=t?s:u,m=l?d:v;return{x:p,y:m}},K=function(i,n,e){var r=i.setup,o=i.state,a=r.minScale,t=r.disablePadding,l=r.centerZoomedOut,s=e??o.scale;return n>0&&s>=a&&!t&&!l?n:0},B;(function(i){i.TRACK_PAD="track_pad",i.MOUSE="mouse",i.TOUCH="touch"})(B||(B={}));var De=function(i){var n=i.mounted,e=i.wrapperComponent,r=i.contentComponent,o=i.setup,a=o.disabled,t=o.velocityAnimation,l=o.limitToBounds,s=i.state.scale,d=t.disabled;if(d||a||!n||!e||!r)return!1;if(!l)return!0;var u=e.clientWidth<r.offsetWidth*s||e.clientHeight<r.offsetHeight*s;return u},Ne=function(i){var n=i.mounted,e=i.velocity,r=i.bounds,o=i.setup,a=o.disabled,t=o.velocityAnimation,l=t.disabled,s=!l&&!a&&n;return!(!s||!e||!r)};function Re(i,n){var e=i.setup.velocityAnimation,r=e.animationTime,o=e.maxAnimationTime,a=e.inertia;return Math.min(r*Math.max(1,Math.abs(n/a)),o)}function Oi(i,n,e,r,o,a,t,l,s,d){if(o){if(n>t&&e>t){var u=t+(i-t)*d;return u>s?s:u<t?t:u}if(n<a&&e<a){var u=a+(i-a)*d;return u<l?l:u>a?a:u}}return r?n:G(i,a,t,o)}function Be(i){var n=1,e=i.clientWidth/window.innerWidth;return Number.isNaN(e)?n:Math.min(n,e)}var fi=function(i,n,e){var r=0,o=i*e;return Number.isNaN(o)?r:i<0?Math.max(o,-n):Math.min(o,n)};function Le(i,n,e){var r,o,a=De(i);if(a){var t=i.lastMousePosition,l=i.velocityTime,s=i.setup,d=i.wrapperComponent,u=s.velocityAnimation,v=u.maxStrengthMouse,p=u.maxStrengthTouch,m=u.sensitivityTouch,f=u.sensitivityMouse,h=Date.now();if(t&&l&&d){var g=Be(d),c=(r={},r[B.TOUCH]=m,r[B.MOUSE]=f,r)[e],y=(o={},o[B.TOUCH]=p,o[B.MOUSE]=v,o)[e],w=n.x-t.x,S=n.y-t.y,X=fi(w/g,y,c),T=fi(S/g,y,c),C=h-l,E=w*w+S*S,A=fi(Math.sqrt(E)/C,y,c);i.velocity={velocityX:X,velocityY:T,total:A}}i.lastMousePosition=n,i.velocityTime=h}}function Ke(i){var n=i.velocity,e=i.bounds,r=i.setup,o=i.wrapperComponent,a=Ne(i);if(!(!a||!n||!e||!o)){var t=n.velocityX,l=n.velocityY,s=n.total,d=e.maxPositionX,u=e.minPositionX,v=e.maxPositionY,p=e.minPositionY,m=r.limitToBounds,f=r.autoAlignment,h=r.zoomAnimation,g=r.panning,c=g.lockAxisY,y=g.lockAxisX,w=h.animationType,S=f.sizeX,X=f.sizeY,T=f.velocityAlignmentTime,C=T,E=Re(i,s),A=Math.max(E,C),M=K(i,S),z=K(i,X),D=M*o.clientWidth/100,W=z*o.clientHeight/100,N=d+D,U=u-D,li=v+W,si=p-W,I=i.state,ui=new Date().getTime();Li(i,w,A,function(ii){var Q=i.state,di=Q.scale,vi=Q.positionX,pi=Q.positionY,le=new Date().getTime()-ui,se=le/C,ue=Bi[f.animationType],Ai=1-ue(Math.min(1,se)),Yi=1-ii,Xi=vi+t*Yi,Ei=pi+l*Yi,de=Oi(Xi,I.positionX,vi,y,m,u,d,U,N,Ai),ve=Oi(Ei,I.positionY,pi,c,m,p,v,si,li,Ai);if(vi!==Xi||pi!==Ei){i.setState(di,de,ve);var zi=i.props.onPanning;zi&&zi(b(i),{})}})}}function Mi(i,n){var e=i.state,r=e.scale,o=e.positionX,a=e.positionY;i.panStartPosition={x:o,y:a},_(i),k(i,r),"touches"in n?We(i,n):ke(i,n)}function Hi(i,n){var e=i.state.scale,r=i.setup,o=r.minScale,a=r.autoAlignment,t=a.disabled,l=a.sizeX,s=a.sizeY,d=a.animationTime,u=a.animationType,v=t||e<o||!l&&!s;if(!v){i.isResizeAlignmentPending&&k(i,e);var p=Oe(i);if(p){var m=i.state,f=m.positionX,h=m.positionY,g=p.positionX===f&&p.positionY===h;g||H(i,p,d,u)}}}function Di(i,n,e,r){var o=i.startCoords,a=i.setup,t=a.autoAlignment,l=t.sizeX,s=t.sizeY;if(o){var d=Me(i,n,e),u=d.x,v=d.y,p=K(i,l),m=K(i,s);Le(i,{x:u,y:v},r),Ki(i,u,v,p,m)}}function He(i,n){if(i.isPanning){var e=i.velocity,r=i.wrapperComponent,o=i.contentComponent;i.isPanning=!1;var a=i.state,t=a.positionX,l=a.positionY,s=a.scale,d=i.panStartPosition;if(i.panStartPosition=null,d){var u=t-d.x,v=l-d.y;if(u*u+v*v<=25)return}i.isAnimating=!1,i.animation=null,i.isResizeAlignmentPending&&k(i,s);var p=(r==null?void 0:r.clientWidth)||0,m=(r==null?void 0:r.clientHeight)||0,f=((o==null?void 0:o.offsetWidth)||0)*s,h=((o==null?void 0:o.offsetHeight)||0)*s,g=!i.setup.limitToBounds||p<f||m<h,c=!n&&e&&e.total>.1&&g;c?Ke(i):Hi(i)}}function ai(i,n,e,r){var o=i.setup,a=o.minScale,t=o.maxScale,l=o.limitToBounds,s=V(R(n,2),a,t,0,!1),d=k(i,s),u=oi(i,e,r,s,d,l),v=u.x,p=u.y;return{scale:s,positionX:v,positionY:p}}function Pi(i,n,e){var r=i.state.scale,o=i.wrapperComponent,a=i.setup,t=a.minScale,l=a.maxScale,s=a.limitToBounds,d=a.zoomAnimation,u=d.disabled,v=d.animationTime,p=d.animationType,m=r>=t&&r<=l,f=u||m;if((r>=1||s)&&Hi(i),!(f||!o||!i.mounted)){var h=n||o.clientWidth/2,g=e||o.clientHeight/2,c=r<t?t:l,y=ai(i,c,h,g);y&&H(i,y,v,p)}}var O=function(){return O=Object.assign||function(n){for(var e,r=1,o=arguments.length;r<o;r++){e=arguments[r];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a])}return n},O.apply(this,arguments)};function Ni(i,n,e){for(var r=0,o=n.length,a;r<o;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return i.concat(a||Array.prototype.slice.call(n))}var mi={scale:1,positionX:0,positionY:0},Z={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,fitOnInit:!1,disablePadding:!1,smooth:!0,detached:!1,wheel:{step:.015,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},trackPadPanning:{disabled:!0,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,allowLeftClickPan:!0,allowMiddleClickPan:!0,allowRightClickPan:!0,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,allowPanning:!0,excluded:[]},keyboard:{disabled:!0,panStep:50,zoomStep:.25,animationTime:100,animationType:"easeOut",excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},autoAlignment:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivityMouse:1,sensitivityTouch:1.2,maxStrengthMouse:20,maxStrengthTouch:40,inertia:1,animationTime:300,maxAnimationTime:800,animationType:"easeOut"}},gi={wrapperClass:"react-transform-wrapper",contentClass:"react-transform-component"},Zi=function(i){var n,e,r,o,a,t,l,s,d,u=Math.max((n=i.minScale)!==null&&n!==void 0?n:Z.minScale,1e-7),v=(e=i.maxScale)!==null&&e!==void 0?e:Z.maxScale,p=(r=i.initialScale)!==null&&r!==void 0?r:mi.scale,m=Math.min(Math.max(p,u),v),f=G((o=i.initialPositionX)!==null&&o!==void 0?o:mi.positionX,(a=i.minPositionX)!==null&&a!==void 0?a:-1/0,(t=i.maxPositionX)!==null&&t!==void 0?t:1/0,i.minPositionX!=null||i.maxPositionX!=null),h=G((l=i.initialPositionY)!==null&&l!==void 0?l:mi.positionY,(s=i.minPositionY)!==null&&s!==void 0?s:-1/0,(d=i.maxPositionY)!==null&&d!==void 0?d:1/0,i.minPositionY!=null||i.maxPositionY!=null);return{previousScale:m,scale:m,positionX:f,positionY:h}},Ri=function(i){var n=O({},Z);return Object.keys(i).forEach(function(e){var r=e,o=typeof i[r]<"u",a=typeof Z[r]<"u";if(a&&o){var t=Object.prototype.toString.call(Z[r]),l=t==="[object Object]",s=t==="[object Array]";l?n[r]=O(O({},Z[r]),i[r]):s?n[r]=Ni(Ni([],Z[r],!0),i[r]):n[r]=i[r]}}),n.minScale<=0&&(n.minScale=1e-7),n},Fi=function(i,n,e){var r=i.state.scale,o=i.wrapperComponent,a=i.setup,t=a.maxScale,l=a.minScale,s=a.zoomAnimation,d=s.size;if(!o)throw new Error("Wrapper is not mounted");var u=r+n*e,v=V(R(u,3),l,t,d,!1);return v};function q(i,n,e,r){var o,a,t=i.wrapperComponent,l=i.props,s=l.onZoomStart,d=l.onZoom,u=l.onZoomStop,v=new MouseEvent("mousemove",{bubbles:!0}),p=b(i);P(p,v,s),P(p,v,d);var m=H(i,n,e,r),f=(a=(o=t==null?void 0:t.ownerDocument)===null||o===void 0?void 0:o.defaultView)!==null&&a!==void 0?a:typeof window<"u"?window:null;return f&&f.setTimeout(function(){i.mounted&&P(b(i),v,u)},e),m}function Vi(i,n,e,r,o){var a=i.wrapperComponent,t=i.state,l=t.scale,s=t.positionX,d=t.positionY,u=i.setup.zoomAnimation;if(!a)return console.error("No WrapperComponent found"),Promise.resolve();var v=u.disabled?0:r,p=a.clientWidth,m=a.clientHeight,f=(p/2-s)/l,h=(m/2-d)/l,g=Fi(i,n,e),c=ai(i,g,f,h);return c?q(i,c,v,o):(console.error("Error during zoom event. New transformation state was not calculated."),Promise.resolve())}function Ze(i,n,e,r){var o,a,t=i.wrapperComponent,l=i.props,s=l.onPanningStart,d=l.onPanning,u=l.onPanningStop,v=new MouseEvent("mousemove",{bubbles:!0}),p=b(i);P(p,v,s),P(p,v,d);var m=H(i,n,e,r),f=(a=(o=t==null?void 0:t.ownerDocument)===null||o===void 0?void 0:o.defaultView)!==null&&a!==void 0?a:typeof window<"u"?window:null;return f&&f.setTimeout(function(){i.mounted&&P(b(i),v,u)},e),m}function Si(i,n,e,r){n===void 0&&(n="contain");var o=i.wrapperComponent,a=i.contentComponent,t=i.setup;if(!o||!a)return null;var l=a.offsetWidth,s=a.offsetHeight,d=o.clientWidth,u=o.clientHeight;if(!l||!s||!d||!u)return null;var v=d/l,p=u/s,m=n==="cover"?Math.max(v,p):Math.min(v,p);return r!==void 0&&(m=Math.min(m,r)),e!==void 0&&(m=Math.max(m,e)),m=V(m,t.minScale,t.maxScale,0,!1),ti(m,o,a)}function ji(i,n,e,r){var o=i.setup,a=i.wrapperComponent,t=i.contentComponent,l=o.limitToBounds,s=o.centerOnInit,d=o.fitOnInit,u=Zi(i.props),v=i.state,p=v.scale,m=v.positionX,f=v.positionY;if(!a)return Promise.resolve();if(d){var h=Si(i,d==="cover"?"cover":"contain");if(h)return p===h.scale&&m===h.positionX&&f===h.positionY?Promise.resolve():(r==null||r(),q(i,h,n,e))}var g=u.positionX,c=u.positionY;if(s&&t){var y=ti(u.scale,a,t);g=y.positionX,c=y.positionY}var w=bi(i,u.scale),S=F(g,c,w,l,0,0,a),X={scale:u.scale,positionX:S.x,positionY:S.y};return p===u.scale&&m===u.positionX&&f===u.positionY?Promise.resolve():(r==null||r(),q(i,X,n,e))}var Ui=function(i){if("getBoundingClientRect"in i){var n=i.getBoundingClientRect();return{x:n.left,y:n.top,width:n.width,height:n.height}}return i};function Fe(i){var n=i.map(Ui),e=Math.min.apply(Math,n.map(function(t){return t.x})),r=Math.min.apply(Math,n.map(function(t){return t.y})),o=Math.max.apply(Math,n.map(function(t){return t.x+t.width})),a=Math.max.apply(Math,n.map(function(t){return t.y+t.height}));return{x:e,y:r,width:o-e,height:a-r}}function Ve(i,n,e,r){var o=Ui(i),a=n.getBoundingClientRect(),t=e.getBoundingClientRect(),l=a.x*r.scale,s=a.y*r.scale;return{x:(o.x-t.x+l)/r.scale,y:(o.y-t.y+s)/r.scale}}function je(i,n,e,r,o,a,t){r===void 0&&(r=0),o===void 0&&(o=0);var l=i.wrapperComponent,s=i.contentComponent,d=i.state,u=i.setup,v=u.limitToBounds,p=u.minScale,m=u.maxScale;if(!l||!s)return d;var f=l.getBoundingClientRect(),h=Ve(n,l,s,d),g=h.x,c=h.y,y=n.width/d.scale,w=n.height/d.scale,S=l.clientWidth/y,X=l.clientHeight/w,T=e||Math.min(S,X);t!==void 0&&(T=Math.min(T,t)),a!==void 0&&(T=Math.max(T,a));var C=V(T,p,m,0,!1),E=(f.width-y*C)/2,A=(f.height-w*C)/2,M=(f.left-g)*C+E+r,z=(f.top-c)*C+A+o,D=bi(i,C),W=F(M,z,D,v,0,0,l),N=W.x,U=W.y;return{positionX:N,positionY:U,scale:C}}function Qi(i,n,e){var r=i.wrapperComponent,o=i.state;if(!r)return{x:0,y:0};var a=r.getBoundingClientRect();return{x:(n-a.left-o.positionX)/o.scale,y:(e-a.top-o.positionY)/o.scale}}function Ue(i,n,e){var r=i.wrapperComponent,o=i.state;if(!r)return{x:0,y:0};var a=r.getBoundingClientRect();return{x:a.left+o.positionX+n*o.scale,y:a.top+o.positionY+e*o.scale}}var Qe=function(i){return function(n,e,r){return n===void 0&&(n=.5),e===void 0&&(e=300),r===void 0&&(r="easeOut"),Vi(i,1,n,e,r)}},Ge=function(i){return function(n,e,r){return n===void 0&&(n=.5),e===void 0&&(e=300),r===void 0&&(r="easeOut"),Vi(i,-1,n,e,r)}},qe=function(i){return function(n,e,r,o,a){o===void 0&&(o=300),a===void 0&&(a="easeOut");var t=i.state,l=t.positionX,s=t.positionY,d=t.scale,u=i.wrapperComponent,v=i.contentComponent,p=i.setup.disabled;if(p||!u||!v)return Promise.resolve();var m={positionX:Number.isNaN(n)?l:n,positionY:Number.isNaN(e)?s:e,scale:Number.isNaN(r)?d:r};return H(i,m,o,a)}},Je=function(i){return function(n,e){return n===void 0&&(n=200),e===void 0&&(e="easeOut"),ji(i,n,e)}},$e=function(i){return function(n,e,r){e===void 0&&(e=200),r===void 0&&(r="easeOut");var o=i.state,a=i.wrapperComponent,t=i.contentComponent;if(a&&t){var l=ti(n||o.scale,a,t);return H(i,l,e,r)}return Promise.resolve()}},xe=function(i){return function(n,e,r,o,a){o===void 0&&(o=300),a===void 0&&(a="easeOut");var t=i.wrapperComponent,l=i.contentComponent,s=i.setup;if(s.disabled||!t||!l)return Promise.resolve();var d=Qi(i,e,r),u=ai(i,n,d.x,d.y);if(!u)return Promise.resolve();var v=s.zoomAnimation.disabled?0:o;return q(i,u,v,a)}},Ie=function(i){return function(n,e){return Qi(i,n,e)}},ir=function(i){return function(n,e){return Ue(i,n,e)}},er=function(i,n){var e,r=i.wrapperComponent;if(!r)return[];var o=r.getRootNode(),a=o&&"getElementById"in o?o:(e=r.ownerDocument)!==null&&e!==void 0?e:typeof document<"u"?document:null,t=Array.isArray(n)?n:[n];return t.map(function(l){return typeof l=="string"?a==null?void 0:a.getElementById(l):l}).filter(function(l){return!!l&&r.contains(l)})},rr=function(i){return function(n,e,r,o,a,t){var l,s,d,u;r===void 0&&(r=600),o===void 0&&(o="easeOut"),a===void 0&&(a=0),t===void 0&&(t=0),_(i);var v=typeof e=="object"&&e!==null?e:{scale:e},p=er(i,n);if(!i.wrapperComponent||p.length===0)return Promise.resolve();var m=je(i,Fe(p),v.scale,(l=v.offsetX)!==null&&l!==void 0?l:a,(s=v.offsetY)!==null&&s!==void 0?s:t,v.minScale,v.maxScale);return H(i,m,(d=v.animationTime)!==null&&d!==void 0?d:r,(u=v.animationType)!==null&&u!==void 0?u:o)}},nr=function(i){return function(n){var e,r,o;n===void 0&&(n={});var a=i.wrapperComponent,t=i.contentComponent,l=i.setup;if(l.disabled||!a||!t)return Promise.resolve();var s=Si(i,(e=n.mode)!==null&&e!==void 0?e:"contain",n.minScale,n.maxScale);if(!s)return Promise.resolve();var d=l.zoomAnimation.disabled?0:(r=n.animationTime)!==null&&r!==void 0?r:200;return q(i,s,d,(o=n.animationType)!==null&&o!==void 0?o:"easeOut")}},or=function(i){return function(n,e,r,o){r===void 0&&(r=200),o===void 0&&(o="easeOut");var a=i.wrapperComponent,t=i.contentComponent,l=i.setup,s=i.state;if(l.disabled||!a||!t||!Number.isFinite(n)||!Number.isFinite(e))return Promise.resolve();var d=k(i,s.scale),u=F(s.positionX+n,s.positionY+e,d,l.limitToBounds,0,0,a),v=u.x,p=u.y;return v===s.positionX&&p===s.positionY?Promise.resolve():Ze(i,{scale:s.scale,positionX:v,positionY:p},r,o)}},J=function(i){return{instance:i,state:i.state,zoomIn:Qe(i),zoomOut:Ge(i),setTransform:qe(i),resetTransform:Je(i),centerView:$e(i),zoomToElement:rr(i),zoomToPoint:xe(i),clientToContent:Ie(i),contentToClient:ir(i),fitToView:nr(i),panBy:or(i)}},ar=function(i){return{instance:i,state:i.state}},b=function(i){var n={};return Object.assign(n,ar(i)),Object.assign(n,J(i)),n},hi=!1;function ei(){try{var i={get passive(){return hi=!0,!1}};return i}catch{return hi=!1,hi}}var ri=".".concat(gi.wrapperClass),j=function(i,n){return n.some(function(e){return i.matches("".concat(ri," ").concat(e,", ").concat(ri," .").concat(e,", ").concat(ri," ").concat(e," *, ").concat(ri," .").concat(e," *"))})},tr=new Set(["INPUT","TEXTAREA","SELECT","OPTION"]),lr='[contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]',sr='[draggable="true"]',Gi=function(i){return!i||typeof i.closest!="function"?null:i},Ci=function(i){var n=Gi(i);return n?tr.has(n.tagName)||n.isContentEditable?!0:n.closest(lr)!==null:!1},ur=function(i){var n=Gi(i);return n?n.closest(sr)!==null:!1},$=function(i){i&&clearTimeout(i)},dr=function(i){return Number.parseFloat(i.toFixed(8))},qi=function(i,n,e){var r=dr(e);return"translate(".concat(i,"px, ").concat(n,"px) scale(").concat(r,")")},ti=function(i,n,e){var r=e.offsetWidth*i,o=e.offsetHeight*i,a=(n.clientWidth-r)/2,t=(n.clientHeight-o)/2;return{scale:i,positionX:a,positionY:t}};function vr(i,n){i!=null&&(typeof i=="function"?i(n):i.current=n)}function pr(i){return function(n){i.forEach(function(e){typeof e=="function"?e(n):e!=null&&(e.current=n)})}}var Ti=typeof window<"u"?Y.useLayoutEffect:Y.useEffect,fr={panLeft:["ArrowLeft"],panRight:["ArrowRight"],panUp:["ArrowUp"],panDown:["ArrowDown"],zoomIn:["+","="],zoomOut:["-","_"],reset:["0"]},mr=function(i){return Object.values(fr).some(function(n){return n.includes(i)})};function hr(i,n){var e=i.setup,r=e.disabled,o=e.keyboard,a=e.panning;if(r||o.disabled||n.defaultPrevented||n.ctrlKey||n.metaKey||n.altKey||!mr(n.key))return!1;var t=n.target;if(Ci(t)||t&&typeof t.matches=="function"&&j(t,o.excluded))return!1;var l=o.panStep,s=o.zoomStep,d=o.animationTime,u=o.animationType,v=J(i),p=n.key,m=a.lockAxisX?0:l,f=a.lockAxisY?0:l;return p==="ArrowLeft"?v.panBy(m,0,d,u):p==="ArrowRight"?v.panBy(-m,0,d,u):p==="ArrowUp"?v.panBy(0,f,d,u):p==="ArrowDown"?v.panBy(0,-f,d,u):p==="+"||p==="="?v.zoomIn(s,d,u):p==="-"||p==="_"?v.zoomOut(s,d,u):p==="0"&&v.resetTransform(d,u),n.cancelable&&n.preventDefault(),n.stopPropagation(),!0}var wi=function(i,n){return{wrapperWidth:i.offsetWidth,wrapperHeight:i.offsetHeight,contentWidth:n.offsetWidth,contentHeight:n.offsetHeight}},cr=function(i,n){return!i||i.wrapperWidth!==n.wrapperWidth||i.wrapperHeight!==n.wrapperHeight||i.contentWidth!==n.contentWidth||i.contentHeight!==n.contentHeight},Ji=function(i){return i.isPanning||i.isPinching},gr=function(i){return Ji(i)||i.wheelStopEventTimer!==null||i.wheelAnimationTimer!==null};function $i(i){var n=i.wrapperComponent,e=i.contentComponent,r=i.setup,o=i.state;if(!n||!e)return null;var a=k(i,o.scale),t=r.limitToBounds,l=r.centerZoomedOut;if(!t&&!l)return null;var s=F(o.positionX,o.positionY,a,!0,0,0,n),d=s.x,u=s.y,v=d===R(o.positionX,2)&&u===R(o.positionY,2);return v?null:{scale:o.scale,positionX:d,positionY:u}}var yi=function(i){i.animation=null,i.animationFrame=null,i.isAnimating=!1,i.resizeAnimation=null};function wr(i){var n=i.setup.autoAlignment.animationTime,e=Math.max(n/5,1);_(i);var r=Date.now(),o=function(){if(!(!i.mounted||i.animation!==o)){var a=Date.now(),t=Math.max(a-r,1);r=a;var l=$i(i);if(!l){yi(i);return}var s=i.state,d=s.scale,u=s.positionX,v=s.positionY,p=1-Math.exp(-t/e),m=u+(l.positionX-u)*p,f=v+(l.positionY-v)*p,h=Math.abs(l.positionX-m)<.5&&Math.abs(l.positionY-f)<.5;if(h&&(m=l.positionX,f=l.positionY),i.isAnimating=!h,i.setState(d,m,f),h){yi(i);return}i.animationFrame=requestAnimationFrame(o)}};i.animation=o,i.resizeAnimation=o,i.animationResolve=null,i.animationFrame=requestAnimationFrame(o)}function xi(i){if(i.setup.disabled){k(i,i.state.scale);return}if(Ji(i)){i.isResizeAlignmentPending=!0;return}var n=i.animation!==null&&i.animation===i.resizeAnimation;if(i.animation&&!n){var e=i.state.scale,r=i.setup,o=r.minScale,a=r.maxScale;if(e<o||e>a){i.isResizeAlignmentPending=!0;return}_(i)}var t=$i(i);if(!t){n&&yi(i);return}if(!n){if(i.setup.autoAlignment.animationTime===0){i.setState(t.scale,t.positionX,t.positionY);return}wr(i)}}function yr(i){var n=i.wrapperComponent,e=i.contentComponent;if(!(!n||!e)){var r=wi(n,e);cr(i.measuredSizes,r)&&(i.measuredSizes=r,xi(i))}}var Ii=function(i,n){var e=i.setup.wheel,r=e.disabled,o=e.wheelDisabled,a=e.touchPadDisabled,t=e.excluded,l=i.isInitialized,s=i.isPanning,d=n.target,u=l&&!s&&!r&&d;if(!u||n.deltaY===0||o&&!n.ctrlKey||a&&n.ctrlKey)return!1;var v=j(d,t);if(v)return!1;var p=i.isPressingKeys(i.setup.wheel.activationKeys);return!!p},br=function(i,n){var e=i.setup,r=e.disabled,o=e.trackPadPanning,a=o.activationKeys,t=o.excluded;if(!i.wrapperComponent||!i.contentComponent||r||o.disabled||n.ctrlKey)return!1;var l=Ii(i,n);if(l)return!1;var s=n.target,d=j(s,t);if(d)return!1;var u=i.isPressingKeys(a);return!!u},Pr=function(i){return i?i.deltaY<0?1:-1:0};function Sr(i,n){var e=Pr(i),r=pe(n,e);return r}function ie(i,n,e){var r=n.getBoundingClientRect(),o=0,a=0;if("clientX"in i)o=(i.clientX-r.left)/e,a=(i.clientY-r.top)/e;else{var t=i.touches[0];o=(t.clientX-r.left)/e,a=(t.clientY-r.top)/e}return Number.isNaN(o)||Number.isNaN(a)?(console.error("No mouse or touch offset found"),{x:0,y:0}):{x:o,y:a}}var Cr=function(i,n,e,r,o){var a=i.state.scale,t=i.wrapperComponent,l=i.setup,s=l.maxScale,d=l.minScale,u=l.zoomAnimation,v=l.disablePadding,p=u.size,m=u.disabled;if(!t)throw new Error("Wrapper is not mounted");var f=a+n*e,h=r?!1:!m,g=V(f,d,s,p,h&&!v);return g},ee=function(i,n){var e=i.previousWheelEvent,r=i.state.scale,o=i.setup,a=o.maxScale,t=o.minScale;return e?r<a||r>t||Math.sign(e.deltaY)!==Math.sign(n.deltaY)||e.deltaY>0&&e.deltaY<n.deltaY||e.deltaY<0&&e.deltaY>n.deltaY||Math.sign(e.deltaY)!==Math.sign(n.deltaY):!1},Tr=function(i,n){var e=i.setup.pinch,r=e.disabled,o=e.excluded,a=i.isInitialized,t=n.target,l=a&&!r&&t;if(!l)return!1;var s=j(t,o);return!s},Ar=function(i){var n=i.setup.pinch.disabled,e=i.isInitialized,r=i.pinchStartDistance,o=e&&!n&&r!==null;return!!o},Yr=function(i,n,e){var r=e.getBoundingClientRect(),o=i.touches,a=o[0].clientX-r.left,t=o[0].clientY-r.top,l=o[1].clientX-r.left,s=o[1].clientY-r.top;return{x:(a+l)/2/n,y:(t+s)/2/n}},re=function(i){return Math.sqrt(Math.pow(i.touches[0].pageX-i.touches[1].pageX,2)+Math.pow(i.touches[0].pageY-i.touches[1].pageY,2))},Xr=5,Er=function(i,n){var e=i.pinchStartScale,r=i.pinchStartDistance,o=i.setup,a=o.maxScale,t=o.minScale,l=o.zoomAnimation,s=o.disablePadding,d=o.pinch,u=l.size,v=l.disabled,p=d.step;if(!e||r===null)throw new Error("Pinch touches distance was not provided");if(n<0)return i.state.scale;var m=n/r,f=m*e,h=(f-e)*(p/Xr),g=e+h,c=g===1/0?0:R(g,10);return V(c,t,a,u,!v&&!s)},ne=160,oe=100,zr=function(i,n){var e=i.props,r=e.onWheelStart,o=e.onZoomStart;_(i),i.wheelStopEventTimer||(P(b(i),n,r),P(b(i),n,o))},_r=function(i,n){var e=i.props,r=e.onWheel,o=e.onZoom,a=i.contentComponent,t=i.setup,l=i.state,s=l.scale,d=t.limitToBounds,u=t.centerZoomedOut,v=t.zoomAnimation,p=t.wheel,m=t.disablePadding,f=t.smooth,h=v.size,g=v.disabled,c=p.step;if(!a)throw new Error("Component not mounted");n.cancelable&&n.preventDefault(),n.stopPropagation();var y=Sr(n,null),w=f?c*Math.abs(n.deltaY):c,S=Cr(i,y,w,!n.ctrlKey);if(s!==S){var X=k(i,S),T=ie(n,a,s),C=g||h===0||u||m,E=d&&C,A=oi(i,T.x,T.y,S,X,E),M=A.x,z=A.y;i.previousWheelEvent=n,i.setState(S,M,z),P(b(i),n,r),P(b(i),n,o)}},kr=function(i,n){var e=i.props,r=e.onWheelStop,o=e.onZoomStop;$(i.wheelAnimationTimer),i.wheelAnimationTimer=setTimeout(function(){i.mounted&&(Pi(i,n.x,n.y),i.wheelAnimationTimer=null,i.flushResizeAlignment())},oe);var a=ee(i,n);a&&($(i.wheelStopEventTimer),i.wheelStopEventTimer=setTimeout(function(){i.mounted&&(i.wheelStopEventTimer=null,P(b(i),n,r),P(b(i),n,o),i.flushResizeAlignment())},ne))},Wr=function(i,n){var e=i.props,r=e.onWheelStart,o=e.onPanningStart;_(i),i.wheelStopEventTimer||(i.wheelAnimationTimer||k(i,i.state.scale),P(b(i),n,r),P(b(i),n,o))},Or=function(i,n){var e=i.props,r=e.onWheelStop,o=e.onPanningStop;$(i.wheelAnimationTimer),i.wheelAnimationTimer=setTimeout(function(){i.mounted&&(Pi(i,n.x,n.y),i.wheelAnimationTimer=null,i.flushResizeAlignment())},oe);var a=ee(i,n);a&&($(i.wheelStopEventTimer),i.wheelStopEventTimer=setTimeout(function(){i.mounted&&(i.wheelStopEventTimer=null,P(b(i),n,r),P(b(i),n,o),i.flushResizeAlignment())},ne))},ae=function(i){for(var n=0,e=0,r=0;r<2;r+=1)n+=i.touches[r].clientX,e+=i.touches[r].clientY;var o=n/2,a=e/2;return{x:o,y:a}},Mr=function(i,n){var e=re(n);i.pinchStartDistance=e,i.lastDistance=e,i.pinchStartScale=i.state.scale,i.isPanning=!1,i.isPinching=!0,i.pinchPreviousCenter=ae(n),_(i)},Dr=function(i,n){var e=i.contentComponent,r=i.pinchStartDistance,o=i.wrapperComponent,a=i.pinchPreviousCenter,t=i.state.scale,l=i.setup,s=l.limitToBounds,d=l.centerZoomedOut,u=l.zoomAnimation,v=l.autoAlignment,p=l.pinch,m=l.panning,f=u.disabled,h=u.size,g=p.allowPanning;if(!(r===null||!e)){var c=Yr(n,t,e);if(!(!Number.isFinite(c.x)||!Number.isFinite(c.y))){var y=re(n),w=Er(i,y),S=ae(n),X=t/w,T=(S.x-((a==null?void 0:a.x)||0))*X,C=(S.y-((a==null?void 0:a.y)||0))*X;if(!(w===t&&T===0&&C===0)){i.pinchPreviousCenter=S;var E=k(i,w),A=f||h===0||d,M=s&&A,z=oi(i,c.x,c.y,w,E,M),D=z.x,W=z.y;if(i.pinchMidpoint=c,i.lastDistance=y,m.disabled||!g)i.setState(w,D,W);else{var N=v.sizeX,U=v.sizeY,li=K(i,N,w),si=K(i,U,w),I=D+T,ui=W+C,ii=F(I,ui,E,s,li,si,o),Q=ii.x,di=ii.y;i.setState(w,Q,di)}}}}},Nr=function(i){var n=i.pinchMidpoint;i.velocity=null,i.lastDistance=null,i.pinchMidpoint=null,i.pinchStartScale=null,i.pinchStartDistance=null,i.isPinching=!1,Pi(i,n==null?void 0:n.x,n==null?void 0:n.y)},te=function(i,n){var e=i.props.onZoomStop,r=i.setup.doubleClick.animationTime;$(i.doubleClickStopEventTimer),i.doubleClickStopEventTimer=setTimeout(function(){i.doubleClickStopEventTimer=null,i.mounted&&P(b(i),n,e)},r)},Rr=function(i,n){var e=i.props,r=e.onZoomStart,o=e.onZoom,a=i.setup.doubleClick,t=a.animationTime,l=a.animationType;P(b(i),n,r),ji(i,t,l,function(){return P(b(i),n,o)}),te(i,n)};function Br(i,n){return i==="toggle"?n===1?1:-1:i==="zoomOut"?-1:1}function Lr(i,n){var e=i.setup,r=i.doubleClickStopEventTimer,o=i.state,a=i.contentComponent,t=o.scale,l=i.props,s=l.onZoomStart,d=l.onZoom,u=e.doubleClick,v=u.disabled,p=u.mode,m=u.step,f=u.animationTime,h=u.animationType;if(!v&&!r){if(p==="reset")return Rr(i,n);if(!a)return console.error("No ContentComponent found");var g=Br(p,i.state.scale),c=Fi(i,g,m);if(t!==c){P(b(i),n,s);var y=ie(n,a,t),w=ai(i,c,y.x,y.y);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");P(b(i),n,d),H(i,w,f,h),te(i,n)}}}var Kr=function(i,n){var e=i.isInitialized,r=i.setup,o=i.wrapperComponent,a=r.doubleClick,t=a.disabled,l=a.excluded,s=n.target,d=o==null?void 0:o.contains(s),u=e&&s&&d&&!t;if(!u)return!1;var v=j(s,l);return!(v||Ci(s))},Hr=(function(){function i(n){var e=this;this.mounted=!0,this.onChangeCallbacks=new Set,this.onInitCallbacks=new Set,this.onTransformCallbacks=new Set,this.wrapperComponent=null,this.contentComponent=null,this.isInitialized=!1,this.bounds=null,this.previousWheelEvent=null,this.wheelStopEventTimer=null,this.wheelAnimationTimer=null,this.isPanning=!1,this.isWheelPanning=!1,this.startCoords=null,this.panStartPosition=null,this.lastTouch=null,this.isPinching=!1,this.distance=null,this.lastDistance=null,this.pinchStartDistance=null,this.pinchStartScale=null,this.pinchMidpoint=null,this.pinchPreviousCenter=null,this.doubleClickStopEventTimer=null,this.velocity=null,this.velocityTime=null,this.lastMousePosition=null,this.isAnimating=!1,this.animation=null,this.animationFrame=null,this.animationResolve=null,this.initObserverTimer=null,this.isInitialLayoutPending=!1,this.measuredSizes=null,this.isResizeAlignmentPending=!1,this.resizeAnimation=null,this.pressedKeys={},this.selectionLock=null,this.mount=function(){e.mounted=!0,e.initializeWindowEvents()},this.unmount=function(){e.mounted=!1,e.cleanupWindowEvents()},this.update=function(r){e.props=r,e.setup=Ri(r),e.wrapperComponent&&e.contentComponent&&!gr(e)&&k(e,e.state.scale)},this.clearTimers=function(){e.wheelStopEventTimer&&clearTimeout(e.wheelStopEventTimer),e.wheelAnimationTimer&&clearTimeout(e.wheelAnimationTimer),e.doubleClickStopEventTimer&&clearTimeout(e.doubleClickStopEventTimer),e.initObserverTimer&&clearTimeout(e.initObserverTimer),e.wheelStopEventTimer=null,e.wheelAnimationTimer=null,e.doubleClickStopEventTimer=null,e.initObserverTimer=null},this.initializeWindowEvents=function(){var r,o,a,t,l=ei(),s=(r=e.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,d=s==null?void 0:s.defaultView;(o=e.wrapperComponent)===null||o===void 0||o.addEventListener("wheel",e.onWheelPanning,l),(a=e.wrapperComponent)===null||a===void 0||a.addEventListener("keyup",e.setKeyUnPressed,l),(t=e.wrapperComponent)===null||t===void 0||t.addEventListener("keydown",e.setKeyPressed,l),d==null||d.addEventListener("mousedown",e.onPanningStart,l),d==null||d.addEventListener("mousemove",e.onPanning,l),d==null||d.addEventListener("mouseup",e.onPanningStop,l),s==null||s.addEventListener("mouseleave",e.clearPanning,l),d==null||d.addEventListener("keyup",e.setKeyUnPressed,l),d==null||d.addEventListener("keydown",e.setKeyPressed,l),d==null||d.addEventListener("blur",e.handleWindowBlur)},this.cleanupWindowEvents=function(){var r,o,a,t,l,s=ei(),d=(r=e.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,u=d==null?void 0:d.defaultView;u==null||u.removeEventListener("mousedown",e.onPanningStart,s),u==null||u.removeEventListener("mousemove",e.onPanning,s),u==null||u.removeEventListener("mouseup",e.onPanningStop,s),d==null||d.removeEventListener("mouseleave",e.clearPanning,s),u==null||u.removeEventListener("keyup",e.setKeyUnPressed,s),u==null||u.removeEventListener("keydown",e.setKeyPressed,s),u==null||u.removeEventListener("blur",e.handleWindowBlur),(o=e.wrapperComponent)===null||o===void 0||o.removeEventListener("wheel",e.onWheelPanning,s),(a=e.wrapperComponent)===null||a===void 0||a.removeEventListener("keyup",e.setKeyUnPressed,s),(t=e.wrapperComponent)===null||t===void 0||t.removeEventListener("keydown",e.setKeyPressed,s),e.cleanupWrapperEvents(),e.clearTimers(),_(e),e.unlockTextSelection(),(l=e.observer)===null||l===void 0||l.disconnect(),e.observer=void 0,e.isInitialLayoutPending=!1,e.isResizeAlignmentPending=!1,e.resizeAnimation=null},this.cleanupWrapperEvents=function(){var r=e.wrapperComponent;if(r){var o=ei();r.removeEventListener("wheel",e.onWheelZoom,o),r.removeEventListener("dblclick",e.onDoubleClick,o),r.removeEventListener("keydown",e.onKeyboardNavigation,o),r.removeEventListener("touchstart",e.onTouchPanningStart,o),r.removeEventListener("touchmove",e.onTouchPanning,o),r.removeEventListener("touchend",e.onTouchPanningStop,o)}},this.handleInitializeWrapperEvents=function(r){var o=ei();r.addEventListener("wheel",e.onWheelZoom,o),r.addEventListener("dblclick",e.onDoubleClick,o),r.addEventListener("keydown",e.onKeyboardNavigation,o),r.addEventListener("touchstart",e.onTouchPanningStart,o),r.addEventListener("touchmove",e.onTouchPanning,o),r.addEventListener("touchend",e.onTouchPanningStop,o)},this.handleInitialize=function(){var r=e.setup,o=r.centerOnInit,a=r.fitOnInit;if(e.applyTransformation(),e.onInitCallbacks.forEach(function(l){return l(b(e))}),o||a){var t=e.applyInitialLayout();e.isInitialLayoutPending=!0,e.initObserverTimer&&clearTimeout(e.initObserverTimer),t&&(e.initObserverTimer=setTimeout(function(){e.initObserverTimer=null,e.isInitialLayoutPending=!1},5e3))}},this.observeSizes=function(r,o){var a;(a=e.observer)===null||a===void 0||a.disconnect(),e.observer=void 0,e.measuredSizes=wi(r,o),!(typeof ResizeObserver>"u")&&(e.observer=new ResizeObserver(e.onSizeChange),e.observer.observe(r),e.observer.observe(o))},this.onSizeChange=function(){var r=e,o=r.wrapperComponent,a=r.contentComponent;if(!(!e.mounted||!o||!a)){if(e.isInitialLayoutPending){var t=(a.offsetWidth>0||a.offsetHeight>0)&&o.clientWidth>0&&o.clientHeight>0;if(!t)return;e.isInitialLayoutPending=!1,e.initObserverTimer&&clearTimeout(e.initObserverTimer),e.initObserverTimer=null,e.onInitCallbacks.forEach(function(l){return l(b(e))}),e.applyInitialLayout(),e.measuredSizes=wi(o,a),k(e,e.state.scale);return}yr(e)}},this.flushResizeAlignment=function(){e.isResizeAlignmentPending&&(e.isResizeAlignmentPending=!1,xi(e))},this.onWheelZoom=function(r){var o=e.setup.disabled;if(!o){e.syncModifierKeys(r);var a=Ii(e,r);a&&(zr(e,r),_r(e,r),kr(e,r))}},this.onWheelPanning=function(r){var o=e.props.onPanning,a=e.setup.trackPadPanning,t=a.lockAxisX,l=a.lockAxisY;e.syncModifierKeys(r);var s=br(e,r);if(s){r.cancelable&&r.preventDefault(),r.stopPropagation();var d=e.state,u=d.positionX,v=d.positionY,p=u-r.deltaX,m=v-r.deltaY,f=t?u:p,h=l?v:m,g=e.setup.autoAlignment,c=g.sizeX,y=g.sizeY,w=K(e,c),S=K(e,y);f===u&&h===v||(Wr(e,r),Ki(e,f,h,w,S),P(b(e),r,o),Or(e,r))}},this.onPanningStart=function(r){var o=e.setup,a=o.disabled,t=o.panning,l=e.props.onPanningStart;if(!(a||t.disabled)){e.syncModifierKeys(r);var s=ki(e,r);if(s){var d=e.isPressingKeys(e.setup.panning.activationKeys);d&&(r.button===0&&!e.setup.panning.allowLeftClickPan||r.button===1&&!e.setup.panning.allowMiddleClickPan||r.button===2&&!e.setup.panning.allowRightClickPan||(r.cancelable&&r.preventDefault(),r.stopPropagation(),_(e),Mi(e,r),e.lockTextSelection(),e.focusForKeyboard(),P(b(e),r,l)))}}},this.onPanning=function(r){var o=e.setup.disabled,a=e.props.onPanning;if(!o){if(e.syncModifierKeys(r),e.isPanning&&r.buttons===0){e.clearPanning(r);return}var t=Wi(e);if(t){var l=e.isPressingKeys(e.setup.panning.activationKeys);l&&(r.cancelable&&r.preventDefault(),r.stopPropagation(),Di(e,r.clientX,r.clientY,B.MOUSE),P(b(e),r,a))}}},this.onPanningStop=function(r){var o=e.setup.panning.velocityDisabled,a=e.props.onPanningStop;e.isPanning&&(e.unlockTextSelection(),He(e,o),P(b(e),r,a),e.flushResizeAlignment())},this.onPinchStart=function(r){var o=e.setup.disabled,a=e.props.onPinchStart;if(!o){var t=Tr(e,r);t&&(Mr(e,r),_(e),P(b(e),r,a))}},this.onPinch=function(r){var o=e.setup.disabled,a=e.props.onPinch;if(!o){var t=Ar(e);t&&(r.cancelable&&r.preventDefault(),r.stopPropagation(),Dr(e,r),P(b(e),r,a))}},this.onPinchStop=function(r){var o=e.props.onPinchStop;e.pinchStartScale&&(Nr(e),P(b(e),r,o),e.flushResizeAlignment())},this.onTouchPanningStart=function(r){var o=e.setup,a=o.disabled,t=o.doubleClick,l=e.props.onPanningStart;if(!a){var s=!(t!=null&&t.disabled),d=e.lastTouch&&+new Date-e.lastTouch<200;if(s&&d&&r.touches.length===1)e.lastTouch=null,e.onDoubleClick(r);else{e.lastTouch=+new Date,_(e);var u=r.touches,v=u.length===1,p=u.length===2,m=ki(e,r);if(v){if(!m||e.setup.panning.disabled)return;_(e),Mi(e,r),e.lockTextSelection(),e.focusForKeyboard(),P(b(e),r,l)}p&&e.onPinchStart(r)}}},this.onTouchPanning=function(r){var o=e.setup.disabled,a=e.props.onPanning;if(e.isPanning&&r.touches.length===1){if(o)return;var t=Wi(e);if(!t)return;r.cancelable&&r.preventDefault(),r.stopPropagation();var l=r.touches[0];Di(e,l.clientX,l.clientY,B.TOUCH),P(b(e),r,a)}else r.touches.length>1&&e.onPinch(r)},this.onTouchPanningStop=function(r){e.onPanningStop(r),e.onPinchStop(r)},this.onDoubleClick=function(r){var o=e.setup.disabled;if(!o){var a=Kr(e,r);a&&Lr(e,r)}},this.clearPanning=function(r){e.isPanning&&e.onPanningStop(r)},this.handleWindowBlur=function(){e.pressedKeys={},e.isPanning&&(e.isPanning=!1,e.startCoords=null),e.unlockTextSelection(),e.flushResizeAlignment()},this.syncModifierKeys=function(r){var o=r.ctrlKey,a=r.metaKey,t=r.shiftKey,l=r.altKey;typeof o=="boolean"&&(e.pressedKeys.Control=o),typeof a=="boolean"&&(e.pressedKeys.Meta=a),typeof t=="boolean"&&(e.pressedKeys.Shift=t),typeof l=="boolean"&&(e.pressedKeys.Alt=l)},this.setKeyPressed=function(r){e.pressedKeys[r.key]=!0},this.setKeyUnPressed=function(r){e.pressedKeys[r.key]=!1},this.isPressingKeys=function(r){return typeof r=="function"?r(Object.entries(e.pressedKeys).filter(function(o){var a=o[1];return a}).map(function(o){var a=o[0];return a})):r.length?!!r.every(function(o){return e.pressedKeys[o]}):!0},this.onKeyboardNavigation=function(r){hr(e,r)},this.focusForKeyboard=function(){var r,o=e.wrapperComponent;if(!(!o||e.setup.keyboard.disabled)){var a=(r=o.ownerDocument)===null||r===void 0?void 0:r.activeElement;a&&o.contains(a)||typeof o.focus=="function"&&o.focus({preventScroll:!0})}},this.lockTextSelection=function(){var r=e.wrapperComponent;!r||e.selectionLock||(e.selectionLock={userSelect:r.style.userSelect,webkitUserSelect:r.style.webkitUserSelect},r.style.userSelect="none",r.style.webkitUserSelect="none")},this.unlockTextSelection=function(){var r=e.selectionLock;e.selectionLock=null;var o=e.wrapperComponent;!o||!r||(o.style.userSelect=r.userSelect,o.style.webkitUserSelect=r.webkitUserSelect)},this.applyInitialLayout=function(){var r=e.setup.fitOnInit,o=e,a=o.wrapperComponent,t=o.contentComponent,l=!!a&&!!t&&a.clientWidth>0&&a.clientHeight>0&&(t.offsetWidth>0||t.offsetHeight>0);if(r){var s=Si(e,r==="cover"?"cover":"contain");if(s)return e.setState(s.scale,s.positionX,s.positionY),l}return e.setCenter(),l},this.setCenter=function(){if(e.wrapperComponent&&e.contentComponent){var r=ti(e.state.scale,e.wrapperComponent,e.contentComponent);e.setState(r.scale,r.positionX,r.positionY)}},this.handleTransformStyles=function(r,o,a){return e.props.customTransform?e.props.customTransform(r,o,a):qi(r,o,a)},this.getContext=function(){return b(e)},this.applyTransformation=function(){if(!(!e.mounted||!e.contentComponent)){var r=e.state,o=r.scale,a=r.positionX,t=r.positionY,l=e.handleTransformStyles(a,t,o);e.props.detached||(e.contentComponent.style.transform=l),e.onTransformCallbacks.forEach(function(s){return s({scale:o,positionX:a,positionY:t,previousScale:e.state.previousScale,ref:b(e)})})}},this.setState=function(r,o,a){var t=e.props.onTransform;if(!Number.isNaN(r)&&!Number.isNaN(o)&&!Number.isNaN(a)){var l=Math.max(r,1e-7);l!==e.state.scale&&(e.state.previousScale=e.state.scale,e.state.scale=l),e.state.positionX=o,e.state.positionY=a,e.applyTransformation();var s=b(e);e.onChangeCallbacks.forEach(function(d){return d(s)}),P(s,{scale:e.state.scale,positionX:o,positionY:a},t)}else console.error("Detected NaN set state values")},this.onTransform=function(r){return e.onTransformCallbacks.has(r)||e.onTransformCallbacks.add(r),function(){e.onTransformCallbacks.delete(r)}},this.onChange=function(r){return e.onChangeCallbacks.has(r)||e.onChangeCallbacks.add(r),function(){e.onChangeCallbacks.delete(r)}},this.onInit=function(r){return e.onInitCallbacks.has(r)||e.onInitCallbacks.add(r),function(){e.onInitCallbacks.delete(r)}},this.init=function(r,o){e.mounted=!0,e.cleanupWindowEvents(),e.wrapperComponent=r,e.contentComponent=o,k(e,e.state.scale),e.handleInitializeWrapperEvents(r),e.handleInitialize(),e.observeSizes(r,o),e.initializeWindowEvents(),e.isInitialized=!0;var a=b(e);P(a,void 0,e.props.onInit),vr(e.props.ref,a)},this.props=n,this.setup=Ri(this.props),this.state=Zi(this.props)}return i})(),x=ni.createContext(null),Zr=function(i,n){return typeof i=="function"?i(n):i},qr=ni.forwardRef(function(i,n){var e=Y.useRef(null);e.current===null&&(e.current=new Hr(i));var r=e.current,o=Zr(i.children,J(r));return Y.useImperativeHandle(n,function(){return J(r)},[r]),Y.useEffect(function(){return r.mount(),function(){r.unmount()}},[r]),Y.useEffect(function(){r.update(i)},[r,i]),L.jsx(x.Provider,O({value:r},{children:o}))});ni.forwardRef(function(i,n){var e=Y.useRef(null),r=Y.useContext(x);return Ti(function(){var o=function(a){if(e.current){var t=0,l=0;e.current.style.transform=r.handleTransformStyles(t,l,1/a)}};return o(r.state.scale),r.onChange(function(a){o(a.instance.state.scale)})},[r]),L.jsx("div",O({},i,{ref:pr([e,n])}))});function Fr(i,n){n===void 0&&(n={});var e=n.insertAt;if(!(typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=i:o.appendChild(document.createTextNode(i))}}var Vr=`.transform-component-module_wrapper__SPB86 {
2
2
  position: relative;
3
3
  width: -moz-fit-content;
4
4
  width: fit-content;
@@ -1,2 +1,2 @@
1
- import{_ as e,l as o,R as i,d as n}from"./mermaid.core-C-qvGQ5g.js";import{p}from"./cynefin-EF2NZ3EQ-CB_HMIZ8.js";import"./index-YUtEyz7O.js";import"./BlintzCanvas-BgIQdpTx.js";import"./index-Bktc0aFV.js";import"./index-CLTrC-a-.js";import"./transform-BqqRT-Iy.js";var g={parse:e(async r=>{const a=await p("info",r);o.debug(a)},"parse")},d={version:"12.2.0"},m=e(()=>d.version,"getVersion"),v={getVersion:m},c=e((r,a,s)=>{o.debug(`rendering info diagram
1
+ import{_ as e,l as o,R as i,d as n}from"./mermaid.core-ovqlC4PC.js";import{p}from"./cynefin-EF2NZ3EQ-DkmPO3hK.js";import"./index-MHIn2TC9.js";import"./BlintzCanvas-DCXIQZM_.js";import"./index-U5jTIqzv.js";import"./index-DIJdZqg2.js";import"./transform-BqqRT-Iy.js";var g={parse:e(async r=>{const a=await p("info",r);o.debug(a)},"parse")},d={version:"12.2.0"},m=e(()=>d.version,"getVersion"),v={getVersion:m},c=e((r,a,s)=>{o.debug(`rendering info diagram
2
2
  `+r);const t=i(a);n(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${s}`)},"draw"),l={draw:c},z={parser:g,db:v,renderer:l};export{z as diagram};
@@ -1 +1 @@
1
- import{j as t,G as a}from"./index-YUtEyz7O.js";function r({className:e,children:o,...n}){return t.jsx("code",{"data-slot":"inline-code",className:a("bg-muted rounded px-1.5 py-0.5 font-mono text-[0.85em] break-all",e),...n,children:o})}export{r as I};
1
+ import{j as t,G as a}from"./index-MHIn2TC9.js";function r({className:e,children:o,...n}){return t.jsx("code",{"data-slot":"inline-code",className:a("bg-muted rounded px-1.5 py-0.5 font-mono text-[0.85em] break-all",e),...n,children:o})}export{r as I};
@@ -1,4 +1,4 @@
1
- import{_ as o,c as ot,aa as ut,R as dt,ar as yt,A as pt,k as ft,t as it,a as gt,b as kt,g as mt,s as wt,v as _t,d as bt}from"./mermaid.core-C-qvGQ5g.js";import"./index-YUtEyz7O.js";import"./BlintzCanvas-BgIQdpTx.js";import"./index-Bktc0aFV.js";import"./index-CLTrC-a-.js";import"./transform-BqqRT-Iy.js";var tt=(function(){var e=o(function(M,t,s,i){for(s=s||{},i=M.length;i--;s[M[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],p=[1,20],d=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],N={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o(function(t,s,i,u,f,n,v){var w=n.length-1;switch(f){case 6:case 7:return u;case 15:u.addNode(n[w-1].length,n[w].trim());break;case 16:u.addNode(0,n[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:p,7:d,10:17,11:m},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:p,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(c,[2,15]),e(k,[2,13],{7:g,11:_}),e(x,[2,11]),e(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],u=[],f=[null],n=[],v=this.table,w="",I=0,S=0,L=2,E=1,R=n.slice.call(arguments,1),b=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);b.setInput(t,C.yy),C.yy.lexer=b,C.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var T=b.yylloc;n.push(T);var D=b.options&&b.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(P){i.length=i.length-2*P,f.length=f.length-P,n.length=n.length-P}o(j,"popStack");function z(){var P;return P=u.pop()||b.lex()||E,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}o(z,"lex");for(var A,W,B,q,H={},X,V,et,Y;;){if(W=i[i.length-1],this.defaultActions[W]?B=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=z()),B=v[W]&&v[W][A]),typeof B>"u"||!B.length||!B[0]){var Q="";Y=[];for(X in v[W])this.terminals_[X]&&X>L&&Y.push("'"+this.terminals_[X]+"'");b.showPosition?Q="Parse error on line "+(I+1)+`:
1
+ import{_ as o,c as ot,aa as ut,R as dt,ar as yt,A as pt,k as ft,t as it,a as gt,b as kt,g as mt,s as wt,v as _t,d as bt}from"./mermaid.core-ovqlC4PC.js";import"./index-MHIn2TC9.js";import"./BlintzCanvas-DCXIQZM_.js";import"./index-U5jTIqzv.js";import"./index-DIJdZqg2.js";import"./transform-BqqRT-Iy.js";var tt=(function(){var e=o(function(M,t,s,i){for(s=s||{},i=M.length;i--;s[M[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],p=[1,20],d=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],N={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o(function(t,s,i,u,f,n,v){var w=n.length-1;switch(f){case 6:case 7:return u;case 15:u.addNode(n[w-1].length,n[w].trim());break;case 16:u.addNode(0,n[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:p,7:d,10:17,11:m},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:p,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(c,[2,15]),e(k,[2,13],{7:g,11:_}),e(x,[2,11]),e(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],u=[],f=[null],n=[],v=this.table,w="",I=0,S=0,L=2,E=1,R=n.slice.call(arguments,1),b=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);b.setInput(t,C.yy),C.yy.lexer=b,C.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var T=b.yylloc;n.push(T);var D=b.options&&b.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(P){i.length=i.length-2*P,f.length=f.length-P,n.length=n.length-P}o(j,"popStack");function z(){var P;return P=u.pop()||b.lex()||E,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}o(z,"lex");for(var A,W,B,q,H={},X,V,et,Y;;){if(W=i[i.length-1],this.defaultActions[W]?B=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=z()),B=v[W]&&v[W][A]),typeof B>"u"||!B.length||!B[0]){var Q="";Y=[];for(X in v[W])this.terminals_[X]&&X>L&&Y.push("'"+this.terminals_[X]+"'");b.showPosition?Q="Parse error on line "+(I+1)+`:
2
2
  `+b.showPosition()+`
3
3
  Expecting `+Y.join(", ")+", got '"+(this.terminals_[A]||A)+"'":Q="Parse error on line "+(I+1)+": Unexpected "+(A==E?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(Q,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:T,expected:Y})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(B[0]){case 1:i.push(A),f.push(b.yytext),n.push(b.yylloc),i.push(B[1]),A=null,S=b.yyleng,w=b.yytext,I=b.yylineno,T=b.yylloc;break;case 2:if(V=this.productions_[B[1]][1],H.$=f[f.length-V],H._$={first_line:n[n.length-(V||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(V||1)].first_column,last_column:n[n.length-1].last_column},D&&(H._$.range=[n[n.length-(V||1)].range[0],n[n.length-1].range[1]]),q=this.performAction.apply(H,[w,S,I,C.yy,B[1],f,n].concat(R)),typeof q<"u")return q;V&&(i=i.slice(0,-1*V*2),f=f.slice(0,-1*V),n=n.slice(0,-1*V)),i.push(this.productions_[B[1]][0]),f.push(H.$),n.push(H._$),et=v[i[i.length-2]][i[i.length-1]],i.push(et);break;case 3:return!0}}return!0},"parse")},O=(function(){var M={EOF:1,parseError:o(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:o(function(t,s){return this.yy=s||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{g as gt}from"./chunk-5VM5RSS4-Bi0yIWW1.js";import{a as mt,b as lt,h as xt,d as kt}from"./chunk-55XCU76K-CDmULSeY.js";import{g as _t,s as vt,a as bt,b as wt,v as Tt,t as St,_ as s,c as R,d as $t,A as Mt}from"./mermaid.core-C-qvGQ5g.js";import{s as X}from"./transform-BqqRT-Iy.js";import{d as it}from"./arc-BfTE_VoF.js";import"./index-YUtEyz7O.js";import"./BlintzCanvas-BgIQdpTx.js";import"./index-Bktc0aFV.js";import"./index-CLTrC-a-.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`:
1
+ import{g as gt}from"./chunk-5VM5RSS4-Qg9lQpPO.js";import{a as mt,b as lt,h as xt,d as kt}from"./chunk-55XCU76K-BdbLnE56.js";import{g as _t,s as vt,a as bt,b as wt,v as Tt,t as St,_ as s,c as R,d as $t,A as Mt}from"./mermaid.core-ovqlC4PC.js";import{s as X}from"./transform-BqqRT-Iy.js";import{d as it}from"./arc-t4OhsI5R.js";import"./index-MHIn2TC9.js";import"./BlintzCanvas-DCXIQZM_.js";import"./index-U5jTIqzv.js";import"./index-DIJdZqg2.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`:
2
2
  `+_.showPosition()+`
3
3
  Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":H="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(H,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,Q=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,Q,C,I.yy,T[1],d,c].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`