@camera.ui/server 0.0.75 → 0.0.76

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 (257) hide show
  1. package/dist/interface/assets/{404-CcdWXeq3.js → 404-BvkajsAN.js} +1 -1
  2. package/dist/interface/assets/{About-DZnt1f9P.js → About-D3w6wB-C.js} +1 -1
  3. package/dist/interface/assets/{Adminpanel-Ws4ukQ4s.js → Adminpanel-Dl6CGett.js} +1 -1
  4. package/dist/interface/assets/Automation-CsQomMnQ.js +2 -0
  5. package/dist/interface/assets/{Automations-mzmcpAlI.js → Automations-ZmPzbYRc.js} +1 -1
  6. package/dist/interface/assets/{Camera-GD3DvfzU.js → Camera-BD89WTrM.js} +2 -2
  7. package/dist/interface/assets/{CameraConsole-C4Ck212I.js → CameraConsole-CDFo09ch.js} +1 -1
  8. package/dist/interface/assets/{Cameras-D7GTdVoA.js → Cameras-C5MLRlQt.js} +1 -1
  9. package/dist/interface/assets/{Camview-Bx3Gi5EF.js → Camview-BXwTF330.js} +1 -1
  10. package/dist/interface/assets/{Config-Dl5YR8-r.js → Config-Bcs8TK2T.js} +2 -2
  11. package/dist/interface/assets/{ConfigActionCameraControl-Dev1d0NS.js → ConfigActionCameraControl-DoIIrBay.js} +1 -1
  12. package/dist/interface/assets/{ConfigActionDelay-BfzUepys.js → ConfigActionDelay-BQ6T2dIQ.js} +1 -1
  13. package/dist/interface/assets/{ConfigActionHttp-DpXIYMSY.js → ConfigActionHttp-3piUQ_xd.js} +1 -1
  14. package/dist/interface/assets/{ConfigActionImageInput-CF5Z-g67.js → ConfigActionImageInput-DNtCNXJv.js} +1 -1
  15. package/dist/interface/assets/{ConfigActionNotification-k9hduPfr.js → ConfigActionNotification-Brn8klrZ.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionOutput-DnJn9m7e.js → ConfigActionOutput-B1vavdKH.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionPlugin-CJVj9cS0.js → ConfigActionPlugin-DALhMneh.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionSensor-vWdEBCqz.js → ConfigActionSensor-D4YSq2b7.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionSnapshot-DwIMeNVQ.js → ConfigActionSnapshot-wqE9-Yza.js} +1 -1
  20. package/dist/interface/assets/{ConfigActionVariable-M2LUNu-P.js → ConfigActionVariable-_qOTtJaU.js} +1 -1
  21. package/dist/interface/assets/{ConfigConditionIfElse-CdzShwLs.js → ConfigConditionIfElse-Qh_TSsp6.js} +1 -1
  22. package/dist/interface/assets/{ConfigConditionSensorState-ClrpJdq5.js → ConfigConditionSensorState-DY3qC-jV.js} +1 -1
  23. package/dist/interface/assets/{ConfigConditionSwitch-BGKnBPAG.js → ConfigConditionSwitch-CO6GugGi.js} +1 -1
  24. package/dist/interface/assets/ConfigConditionTime-Bis881x9.js +1 -0
  25. package/dist/interface/assets/ConfigTriggerDetection-78FurfGv.js +1 -0
  26. package/dist/interface/assets/{ConfigTriggerGeofence-v0OHycAQ.js → ConfigTriggerGeofence-Csm9Krfq.js} +1 -1
  27. package/dist/interface/assets/{ConfigTriggerManual-CDUdcVkq.js → ConfigTriggerManual-mtAOiU-R.js} +1 -1
  28. package/dist/interface/assets/{ConfigTriggerSchedule-Be3lnp9p.js → ConfigTriggerSchedule-m2Q0vw3t.js} +1 -1
  29. package/dist/interface/assets/{ConfigTriggerSensor-jJHNR2Ge.js → ConfigTriggerSensor-BH8UrMLq.js} +1 -1
  30. package/dist/interface/assets/{ConfigTriggerSystem-B5-a4mHJ.js → ConfigTriggerSystem-CuqiTtf5.js} +1 -1
  31. package/dist/interface/assets/{ConfigTriggerWebhook-B2DZ2EJY.js → ConfigTriggerWebhook-ByNdWu_n.js} +1 -1
  32. package/dist/interface/assets/{Console-CV4QWa3U.js → Console-DBXu0iKa.js} +1 -1
  33. package/dist/interface/assets/{CuiActionButton-Ch1eUoGE.js → CuiActionButton-BIR2fQ-I.js} +1 -1
  34. package/dist/interface/assets/{CuiAvatar-CLw2MwNX.js → CuiAvatar-CqKr0qrz.js} +1 -1
  35. package/dist/interface/assets/{CuiBBoxPlayground-DZQHrudD.js → CuiBBoxPlayground-BEYO128c.js} +1 -1
  36. package/dist/interface/assets/CuiBottomSheet-CeCMvh1K.js +1 -0
  37. package/dist/interface/assets/{CuiBottomSheet-DMQYKJw-.js → CuiBottomSheet-PBDYQFLH.js} +1 -1
  38. package/dist/interface/assets/{CuiCameraCard-CDIT5FiP.js → CuiCameraCard-CH8wRfqD.js} +1 -1
  39. package/dist/interface/assets/{CuiCameraPipCard-ryTNZVDU.js → CuiCameraPipCard-DLhWqYGR.js} +1 -1
  40. package/dist/interface/assets/{CuiCameraRecordings-DiM3eLJ9.js → CuiCameraRecordings-CALgktei.js} +1 -1
  41. package/dist/interface/assets/{CuiCameraShares-9erJMqEa.js → CuiCameraShares-B9jYiJ9p.js} +1 -1
  42. package/dist/interface/assets/{CuiCameraSnapshot-kTrRSdaI.js → CuiCameraSnapshot-DBlooBWY.js} +1 -1
  43. package/dist/interface/assets/{CuiCameraTable-CeQfi9kf.js → CuiCameraTable-BAdLq5hy.js} +1 -1
  44. package/dist/interface/assets/{CuiFloatingButton-B2F5R0HF.js → CuiFloatingButton-CYP3wZAj.js} +1 -1
  45. package/dist/interface/assets/{CuiImage-B3h2GNXR.js → CuiImage-BR35PcJ-.js} +1 -1
  46. package/dist/interface/assets/{CuiMarkdownContent-CI47o5kG.js → CuiMarkdownContent-CFfh6mTv.js} +1 -1
  47. package/dist/interface/assets/{CuiMenu-DcxeaYkb.js → CuiMenu-DwGJrz2-.js} +1 -1
  48. package/dist/interface/assets/{CuiPluginCard-CcirWNCo.js → CuiPluginCard-CMxEkiWE.js} +2 -2
  49. package/dist/interface/assets/{CuiPluginOAuthButton-DdpafNYi.js → CuiPluginOAuthButton-ClmuZ91f.js} +2 -2
  50. package/dist/interface/assets/{CuiQRCode-CCP0SCSl.js → CuiQRCode-V_yG_KUN.js} +1 -1
  51. package/dist/interface/assets/{CuiRecordingsGrid-CwlkzCVR.js → CuiRecordingsGrid-BaGvFhVs.js} +1 -1
  52. package/dist/interface/assets/{CuiSchema-BRKnAPMV.js → CuiSchema-CbMtJJnY.js} +1 -1
  53. package/dist/interface/assets/{CuiTopNavbarItem-B8CTaRte.js → CuiTopNavbarItem-CXmxI8Wn.js} +1 -1
  54. package/dist/interface/assets/{CuiTopbarSlot-CKDf_KwL.js → CuiTopbarSlot-Bo2vH_kI.js} +1 -1
  55. package/dist/interface/assets/{Faces-B7ecoXr4.js → Faces-pLWD7GFV.js} +1 -1
  56. package/dist/interface/assets/{FirstSteps-C8ZU0Dsx.js → FirstSteps-Cowo-kpk.js} +1 -1
  57. package/dist/interface/assets/{Instances-3rtyZqv5.js → Instances-CJSxOTS5.js} +1 -1
  58. package/dist/interface/assets/{Menu-DYOqiMqO.js → Menu-BV2Npq07.js} +1 -1
  59. package/dist/interface/assets/{OAuthDeviceFlow-CEQli9li.js → OAuthDeviceFlow-C2_Rpjxt.js} +1 -1
  60. package/dist/interface/assets/{Plugin-B9CjAnCo.js → Plugin-C8KnaxI5.js} +1 -1
  61. package/dist/interface/assets/{PluginConsole-DnaclRSR.js → PluginConsole-DPQFT6GB.js} +1 -1
  62. package/dist/interface/assets/{PluginSchema-ekCSaV7S.js → PluginSchema-BVZcuMh7.js} +1 -1
  63. package/dist/interface/assets/{Plugins-CTBkq7MK.js → Plugins-tauNbtus.js} +2 -2
  64. package/dist/interface/assets/{Recordings-DlW7a5fy.js → Recordings-BxczmYsS.js} +1 -1
  65. package/dist/interface/assets/{Settings-Ux3YMlKL.js → Settings-B22NP1uX.js} +1 -1
  66. package/dist/interface/assets/SettingsAccount-D9YRXC2V.js +1 -0
  67. package/dist/interface/assets/{SettingsAccount-Diwv1UqX.js → SettingsAccount-Dm4MKhXA.js} +1 -1
  68. package/dist/interface/assets/SettingsAppearance-BICuFMxO.js +1 -0
  69. package/dist/interface/assets/{SettingsAppearance-CCdCTEEX.js → SettingsAppearance-BRzzO7Tp.js} +1 -1
  70. package/dist/interface/assets/{SettingsBackup-DWdj3Ia1.js → SettingsBackup-B9L8WRBn.js} +1 -1
  71. package/dist/interface/assets/{SettingsNotifications-MHaUZLba.js → SettingsNotifications-CYFuyAb8.js} +2 -2
  72. package/dist/interface/assets/{SettingsRecordings-H6RylYWR.js → SettingsRecordings-C2BVYt_b.js} +1 -1
  73. package/dist/interface/assets/{SettingsRemote-pJ98hS-1.js → SettingsRemote-14DByUYb.js} +1 -1
  74. package/dist/interface/assets/{SettingsSystem-gS06zbFh.js → SettingsSystem-DGjWaU3j.js} +2 -2
  75. package/dist/interface/assets/{SettingsUsers-Dk6T6-B0.js → SettingsUsers-BunfJfFX.js} +1 -1
  76. package/dist/interface/assets/{Terminal-BN_Tsd-I.js → Terminal-B62d7hZL.js} +1 -1
  77. package/dist/interface/assets/{VariableInput-Lc1kxFYZ.js → VariableInput-6KBjycfw.js} +1 -1
  78. package/dist/interface/assets/{VariableSuggestions-_6ChrEYD.js → VariableSuggestions-BCUwMbk2.js} +1 -1
  79. package/dist/interface/assets/{VersionsHandler-CtSlx1Is.js → VersionsHandler-Cb6WnQiP.js} +1 -1
  80. package/dist/interface/assets/{Workers-DAAY6I3q.js → Workers-DouAZ6IN.js} +1 -1
  81. package/dist/interface/assets/ace-DQ1lNH50.js +1 -0
  82. package/dist/interface/assets/{ace.config-fXRdG20S.js → ace.config-D884GuRj.js} +1 -1
  83. package/dist/interface/assets/{alert-outline-ECU-QGl_.js → alert-outline-C4DaI8XN.js} +1 -1
  84. package/dist/interface/assets/{api-BrBREPs7.js → api-NtCA6-OA.js} +2 -2
  85. package/dist/interface/assets/{api-CjId5C28.js → api-e-E4EslC.js} +1 -1
  86. package/dist/interface/assets/{auth-BdnNT7Ku.js → auth-DaVXT_yR.js} +1 -1
  87. package/dist/interface/assets/{automation-DghSnBKq.js → automation-1ZEEkuHf.js} +1 -1
  88. package/dist/interface/assets/{automations-B7-W1jrR.js → automations-D-pcb6DP.js} +1 -1
  89. package/dist/interface/assets/{automations-DMOjMEq5.js → automations-Dcjr9n0g.js} +1 -1
  90. package/dist/interface/assets/{back-filled-BkiOF93D.js → back-filled-D7yFvzR6.js} +1 -1
  91. package/dist/interface/assets/{backup-yi1kw7Gp.js → backup-DxSE0DNH.js} +1 -1
  92. package/dist/interface/assets/{bell-outline-DaJcbVUn.js → bell-outline-XAqc3I7S.js} +1 -1
  93. package/dist/interface/assets/{cameras-BSxz_xUG.js → cameras-CKYu9vm7.js} +1 -1
  94. package/dist/interface/assets/{cameras.schema-QTfayB__.js → cameras.schema-MCmXBV5E.js} +1 -1
  95. package/dist/interface/assets/{cctv-BAcUIJMp.js → cctv-BK9p1URj.js} +1 -1
  96. package/dist/interface/assets/{check-B7v7seIz.js → check-C8Q3pZRh.js} +1 -1
  97. package/dist/interface/assets/{chevron-down-CVwnfdXV.js → chevron-down-DY3yQG2A.js} +1 -1
  98. package/dist/interface/assets/{chevron-right-Cg-pww_Z.js → chevron-right--xa71qcO.js} +1 -1
  99. package/dist/interface/assets/{circular-connection-CMVczvHt.js → circular-connection-BTgxVifK.js} +1 -1
  100. package/dist/interface/assets/{close-Dm2d7__t.js → close-BVMcLU5Z.js} +1 -1
  101. package/dist/interface/assets/{close--p6pjhzm.js → close-BvciW6Wg.js} +1 -1
  102. package/dist/interface/assets/{close-circle-DBnyH7Q3.js → close-circle-B_OAX5Zy.js} +1 -1
  103. package/dist/interface/assets/{close-rounded-G94TmxOw.js → close-rounded-BhUZzZeA.js} +1 -1
  104. package/dist/interface/assets/{cloud-check-CAnawIkG.js → cloud-check-E6wIIVuz.js} +1 -1
  105. package/dist/interface/assets/{cloud-outline-DaiWou7I.js → cloud-outline-BrU3S7IS.js} +1 -1
  106. package/dist/interface/assets/{cloud-outline-CN39Bfx-.js → cloud-outline-BuQTDaKh.js} +1 -1
  107. package/dist/interface/assets/cloudHandoff-DoUXb29N.js +1 -0
  108. package/dist/interface/assets/{cog-aSOYKXny.js → cog-DiL--KjL.js} +1 -1
  109. package/dist/interface/assets/{copy-16-filled-B6NJ1-UI.js → copy-16-filled-UD4hjH-4.js} +1 -1
  110. package/dist/interface/assets/{copy-nv4aM1XQ.js → copy-Dperv2E1.js} +1 -1
  111. package/dist/interface/assets/{delete-CAlbPVRO.js → delete-BzeGTp2V.js} +1 -1
  112. package/dist/interface/assets/{dist-CGuKzKCw.js → dist-V4RgRFpY.js} +1 -1
  113. package/dist/interface/assets/{download-DONQv071.js → download-Dvs3QCvp.js} +1 -1
  114. package/dist/interface/assets/esm-BCkYzkzU.js +1 -0
  115. package/dist/interface/assets/esm-BF5SJFVX.js +1 -0
  116. package/dist/interface/assets/esm-BZmF9iVQ.js +1 -0
  117. package/dist/interface/assets/esm-C9lo7BUF.js +1 -0
  118. package/dist/interface/assets/esm-CDdS2Yz3.js +1 -0
  119. package/dist/interface/assets/esm-CQe5aysd.js +1 -0
  120. package/dist/interface/assets/esm-ClQQ50Pr.js +1 -0
  121. package/dist/interface/assets/esm-DCr-CrXJ.js +1 -0
  122. package/dist/interface/assets/esm-DFpXZBbM.js +1 -0
  123. package/dist/interface/assets/esm-DRiFxNFc.js +1 -0
  124. package/dist/interface/assets/esm-FnjhXZPB.js +1 -0
  125. package/dist/interface/assets/esm-Wd_bXzJb.js +1 -0
  126. package/dist/interface/assets/esm-klti7Xiu.js +1 -0
  127. package/dist/interface/assets/{eventIcons-M249HkTY.js → eventIcons-BPti5ma5.js} +1 -1
  128. package/dist/interface/assets/{face-recognition-k77NfLPZ.js → face-recognition-vNgsuvZQ.js} +1 -1
  129. package/dist/interface/assets/{github-D1pqtpqx.js → github-3U8UNWEo.js} +1 -1
  130. package/dist/interface/assets/{grid-fill-CpGYpDXA.js → grid-fill-BmsHxwDf.js} +1 -1
  131. package/dist/interface/assets/{hasPermission-YDMNKzsE.js → hasPermission-rf-FHUEM.js} +1 -1
  132. package/dist/interface/assets/{home-Cu1WDLML.js → home-QHsGVBGd.js} +1 -1
  133. package/dist/interface/assets/{information-outline-CvnYcEj_.js → information-outline-C1VdAtHq.js} +1 -1
  134. package/dist/interface/assets/{instances-CmR4--RY.js → instances-IBssFzSt.js} +1 -1
  135. package/dist/interface/assets/{lightbulb-outline-BPMkcQB4.js → lightbulb-outline-DnqcItJU.js} +1 -1
  136. package/dist/interface/assets/locale-Ddd4TTHX.js +1 -0
  137. package/dist/interface/assets/{main-DvSM6lCu.js → main-9TGn6n93.js} +3 -3
  138. package/dist/interface/assets/{microphone-Cr6zggXu.js → microphone-Ctgn-sl1.js} +1 -1
  139. package/dist/interface/assets/native-DL2MbvlB.js +1 -0
  140. package/dist/interface/assets/native-DjYQQw9J.js +1 -0
  141. package/dist/interface/assets/{nodeDefinitions-BHkMC69w.js → nodeDefinitions-D0AwVtA3.js} +1 -1
  142. package/dist/interface/assets/{notifications-OMXn7SME.js → notifications-iSDZTfsc.js} +1 -1
  143. package/dist/interface/assets/{play-solid-BWgGY6fq.js → play-solid-BgmJ89Sh.js} +1 -1
  144. package/dist/interface/assets/plugin-CCoI9xnD.js +1 -0
  145. package/dist/interface/assets/{plugins-BNQe6lpM.js → plugins-BSosZ7mD.js} +1 -1
  146. package/dist/interface/assets/{plus-BJOT8Imn.js → plus-B5POQ2Ue.js} +1 -1
  147. package/dist/interface/assets/{plus-Da6fFyiW.js → plus-DO_I5Ekc.js} +1 -1
  148. package/dist/interface/assets/{power-GIFDE9Rq.js → power-2WnCmUq_.js} +1 -1
  149. package/dist/interface/assets/{ring-resize-CQmI59ia.js → ring-resize-DX9lIn8S.js} +1 -1
  150. package/dist/interface/assets/rolldown-runtime-DAXXjFlN.js +1 -0
  151. package/dist/interface/assets/{round-alt-arrow-left-bold-CwmBVJNh.js → round-alt-arrow-left-bold-CLoPDaOh.js} +1 -1
  152. package/dist/interface/assets/{round-restart-alt-CFgCkJHY.js → round-restart-alt-CRIrMOlo.js} +1 -1
  153. package/dist/interface/assets/{router-DaWw5n-0.js → router-t0j7Kqm7.js} +2 -2
  154. package/dist/interface/assets/{routerState-CVQAXVhL.js → routerState-Buu48zeq.js} +1 -1
  155. package/dist/interface/assets/{search-C-hEuQfC.js → search-DZ9xVXRP.js} +1 -1
  156. package/dist/interface/assets/{server-BwLRXqcQ.js → server-DIS79xtm.js} +1 -1
  157. package/dist/interface/assets/{settings-Cp3gCNpO.js → settings-NKsXc7ux.js} +1 -1
  158. package/dist/interface/assets/{shares-CKXoGqdz.js → shares-bO9z1yJK.js} +1 -1
  159. package/dist/interface/assets/{shield-check-Dt5J0QfO.js → shield-check-D55EbdY5.js} +1 -1
  160. package/dist/interface/assets/{terminal-B3QFYAj2.js → terminal-DNYYAFl5.js} +1 -1
  161. package/dist/interface/assets/{theme-Dv7QY3Tq.js → theme-C4hbpNuJ.js} +1 -1
  162. package/dist/interface/assets/{trash-2-6p7jG9fU.js → trash-2-Cq12InWC.js} +1 -1
  163. package/dist/interface/assets/{trash-can-M-xPddVK.js → trash-can-BFdf_rAq.js} +1 -1
  164. package/dist/interface/assets/{trash-fill-D0Sdr94f.js → trash-fill-f4lTEnbR.js} +1 -1
  165. package/dist/interface/assets/{types-COF_C2Ts.js → types-DllqnzAz.js} +1 -1
  166. package/dist/interface/assets/{types-BjGfTbvC.js → types-Wl5Ty2yP.js} +1 -1
  167. package/dist/interface/assets/{ui-BXkpPR2i.js → ui-CBRpDu-c.js} +1 -1
  168. package/dist/interface/assets/{upload-DInbUoWy.js → upload-C3Tc1apC.js} +1 -1
  169. package/dist/interface/assets/{useBiometricCredentials-BhaNJ-zf.js → useBiometricCredentials-DnB31QCq.js} +1 -1
  170. package/dist/interface/assets/{useCameraOptions-NYoHVumE.js → useCameraOptions-CZUtka_F.js} +1 -1
  171. package/dist/interface/assets/{useCuiCameraDrawer-BgL2YF5H.js → useCuiCameraDrawer-DW9-Cdys.js} +1 -1
  172. package/dist/interface/assets/{useCuiDialog-nSzSQhdJ.js → useCuiDialog-DrBTif-3.js} +2 -2
  173. package/dist/interface/assets/{useFileDownload-CfbHIntK.js → useFileDownload-DksvUFZ8.js} +1 -1
  174. package/dist/interface/assets/{useLogsSocket-ChKJayrk.js → useLogsSocket-HNen2ftk.js} +1 -1
  175. package/dist/interface/assets/{useSharedComposables-BFG26laC.js → useSharedComposables-DUNE9Fjf.js} +1 -1
  176. package/dist/interface/assets/{useStreamStatus-BXuND7We.js → useStreamStatus-BXUMDut2.js} +1 -1
  177. package/dist/interface/assets/{users.schema-jSJl4_7i.js → users.schema-B7Gwrqjw.js} +1 -1
  178. package/dist/interface/assets/{vendor-BNffsu2J.js → vendor-CF-D4B9g.js} +6 -6
  179. package/dist/interface/assets/{vendor-ace-B9YSA4ub.js → vendor-ace-DdrK3_G3.js} +4 -4
  180. package/dist/interface/assets/{vendor-cameraui-DQWbrxPA.js → vendor-cameraui-DpqS51DT.js} +1 -1
  181. package/dist/interface/assets/{vendor-capacitor-DM8avPyc.js → vendor-capacitor-Dqo8SY0p.js} +2 -2
  182. package/dist/interface/assets/{vendor-chart-BnRvbhz4.js → vendor-chart-CYhHo97f.js} +1 -1
  183. package/dist/interface/assets/{vendor-core-BFQDzztK.js → vendor-core-DAinYQ9K.js} +1 -1
  184. package/dist/interface/assets/{vendor-dnd-BbPi4fU-.js → vendor-dnd-BuMMZfLh.js} +1 -1
  185. package/dist/interface/assets/{vendor-draggabilly-jG1H8JBb.js → vendor-draggabilly-DCZR9BMa.js} +1 -1
  186. package/dist/interface/assets/{vendor-gridstack-Dxjc1EeA.js → vendor-gridstack-DD5uGA3X.js} +1 -1
  187. package/dist/interface/assets/{vendor-leaflet-B5L2Aw8Y.js → vendor-leaflet-7XZntJjG.js} +1 -1
  188. package/dist/interface/assets/{vendor-markdown-CaiSLMSg.js → vendor-markdown-BZSidpyh.js} +2 -2
  189. package/dist/interface/assets/{vendor-primevue-DBjEgzpl.js → vendor-primevue-CG0iLCzA.js} +271 -271
  190. package/dist/interface/assets/{vendor-vueflow-B7zZMbJe.js → vendor-vueflow--Q_FmuVt.js} +1 -1
  191. package/dist/interface/assets/vendor-xterm-BRN-hOYD.js +145 -0
  192. package/dist/interface/assets/{vendor-zod-CmGeQCqy.js → vendor-zod-V2qTUMVc.js} +3 -3
  193. package/dist/interface/assets/{view-grid-Ca06lw8Y.js → view-grid-DQkfCMI_.js} +1 -1
  194. package/dist/interface/assets/web-BftsHHuf.js +1 -0
  195. package/dist/interface/assets/web-BjKL51lK-Cj0lDX11.js +1 -0
  196. package/dist/interface/assets/web-C57m-s7x.js +1 -0
  197. package/dist/interface/assets/web-CGlVLo8n.js +1 -0
  198. package/dist/interface/assets/web-CMdr3-OF.js +1 -0
  199. package/dist/interface/assets/web-CPFJ-p7f.js +1 -0
  200. package/dist/interface/assets/web-CpHwGmy3.js +1 -0
  201. package/dist/interface/assets/web-CtXgcuPK.js +1 -0
  202. package/dist/interface/assets/web-CyrAb8gv.js +1 -0
  203. package/dist/interface/assets/web-N07cxGeP.js +1 -0
  204. package/dist/interface/assets/web-qvBKJC37.js +1 -0
  205. package/dist/interface/assets/web-yGUE_lY4.js +1 -0
  206. package/dist/interface/assets/workbox-window.prod.es5-GcTH5iVv.js +1 -0
  207. package/dist/interface/assets/{zoom-in-q2gdyi5g.js → zoom-in-BfBU52rQ.js} +1 -1
  208. package/dist/interface/index.html +70 -70
  209. package/dist/interface/sw.js +1 -1
  210. package/dist/server/package.json +2 -2
  211. package/dist/server/src/camera/decoder/detection-coordinator.js +71 -0
  212. package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
  213. package/dist/server/src/camera/decoder/event-manager.js +8 -0
  214. package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
  215. package/dist/server/src/camera/decoder/ptz-autotracker.js +19 -1
  216. package/dist/server/src/camera/decoder/ptz-autotracker.js.map +1 -1
  217. package/package.json +2 -2
  218. package/dist/interface/assets/Automation-BV_DAud8.js +0 -2
  219. package/dist/interface/assets/ConfigConditionTime-D_OjngG5.js +0 -1
  220. package/dist/interface/assets/ConfigTriggerDetection-ChiCfe25.js +0 -1
  221. package/dist/interface/assets/CuiBottomSheet-B0jjHK8L.js +0 -1
  222. package/dist/interface/assets/SettingsAccount-MWAS-I9i.js +0 -1
  223. package/dist/interface/assets/SettingsAppearance-Nlgl8zgW.js +0 -1
  224. package/dist/interface/assets/ace-BRyQJK-L.js +0 -1
  225. package/dist/interface/assets/cloudHandoff-DiSIi-3j.js +0 -1
  226. package/dist/interface/assets/esm-BiqkLF7c.js +0 -1
  227. package/dist/interface/assets/esm-Bsur9240.js +0 -1
  228. package/dist/interface/assets/esm-BtNCmUvf.js +0 -1
  229. package/dist/interface/assets/esm-CJhFtjrE.js +0 -1
  230. package/dist/interface/assets/esm-CP_lj71C.js +0 -1
  231. package/dist/interface/assets/esm-CPg8utc7.js +0 -1
  232. package/dist/interface/assets/esm-CiNWHZ50.js +0 -1
  233. package/dist/interface/assets/esm-DFolS-mg.js +0 -1
  234. package/dist/interface/assets/esm-DiiqV-cs.js +0 -1
  235. package/dist/interface/assets/esm-DqWvGq2n.js +0 -1
  236. package/dist/interface/assets/esm-Dzs8IFoE.js +0 -1
  237. package/dist/interface/assets/esm-mz8xTH--.js +0 -1
  238. package/dist/interface/assets/esm-wThsSMEz.js +0 -1
  239. package/dist/interface/assets/locale-CBDLc-O2.js +0 -1
  240. package/dist/interface/assets/native-BltAgW8y.js +0 -1
  241. package/dist/interface/assets/native-BqvVT_E9.js +0 -1
  242. package/dist/interface/assets/plugin-coV37Q5h.js +0 -1
  243. package/dist/interface/assets/rolldown-runtime-CMxvf4Kt.js +0 -1
  244. package/dist/interface/assets/vendor-xterm-D8Z_h2U0.js +0 -145
  245. package/dist/interface/assets/web-BSvcrUCP.js +0 -1
  246. package/dist/interface/assets/web-BW9BMGDM.js +0 -1
  247. package/dist/interface/assets/web-BjKL51lK-CuvyBK7m.js +0 -1
  248. package/dist/interface/assets/web-BqE-VQ9r.js +0 -1
  249. package/dist/interface/assets/web-C8ljZ5y2.js +0 -1
  250. package/dist/interface/assets/web-CbzSuVIn.js +0 -1
  251. package/dist/interface/assets/web-D0Lon5vH.js +0 -1
  252. package/dist/interface/assets/web-D4AJra8f.js +0 -1
  253. package/dist/interface/assets/web-D5gbyro9.js +0 -1
  254. package/dist/interface/assets/web-DP_PODrb.js +0 -1
  255. package/dist/interface/assets/web-DbRq1uG3.js +0 -1
  256. package/dist/interface/assets/web-j4KTTwz3.js +0 -1
  257. package/dist/interface/assets/workbox-window.prod.es5-BmndO3vJ.js +0 -1
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-CMxvf4Kt.js";var t=e(((e,t)=>{(function(){var e=`ace`,t=(function(){return this})();if(!t&&typeof window<`u`&&(t=window),!e&&typeof requirejs<`u`)return;var n=function(e,t,r){if(typeof e!=`string`){n.original?n.original.apply(this,arguments):(console.error(`dropping module because define wasn't a string.`),console.trace());return}arguments.length==2&&(r=t),n.modules[e]||(n.payloads[e]=r,n.modules[e]=null)};n.modules={},n.payloads={};var r=function(e,t,n){if(typeof t==`string`){var r=o(e,t);if(r!=null)return n&&n(),r}else if(Object.prototype.toString.call(t)===`[object Array]`){for(var a=[],s=0,c=t.length;s<c;++s){var l=o(e,t[s]);if(l==null&&i.original)return;a.push(l)}return n&&n.apply(null,a)||!0}},i=function(e,t){var n=r(``,e,t);return n==null&&i.original?i.original.apply(this,arguments):n},a=function(e,t){if(t.indexOf(`!`)!==-1){var n=t.split(`!`);return a(e,n[0])+`!`+a(e,n[1])}if(t.charAt(0)==`.`)for(t=e.split(`/`).slice(0,-1).join(`/`)+`/`+t;t.indexOf(`.`)!==-1&&r!=t;){var r=t;t=t.replace(/\/\.\//,`/`).replace(/[^\/]+\/\.\.\//,``)}return t},o=function(e,t){t=a(e,t);var i=n.modules[t];if(!i){if(i=n.payloads[t],typeof i==`function`){var o={},s={id:t,uri:``,exports:o,packaged:!0};o=i(function(e,n){return r(t,e,n)},o,s)||s.exports,n.modules[t]=o,delete n.payloads[t]}i=n.modules[t]=o||i}return i};function s(e){var r=t;e&&(t[e]||(t[e]={}),r=t[e]),(!r.define||!r.define.packaged)&&(n.original=r.define,r.define=n,r.define.packaged=!0),(!r.require||!r.require.packaged)&&(i.original=r.require,r.require=i,r.require.packaged=!0)}s(e)})(),ace.define(`ace/lib/es6-shim`,[`require`,`exports`,`module`],function(e,t,n){function r(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||r(String.prototype,`startsWith`,function(e,t){return t||=0,this.lastIndexOf(e,t)===t}),String.prototype.endsWith||r(String.prototype,`endsWith`,function(e,t){var n=this;(t===void 0||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return r!==-1&&r===t}),String.prototype.repeat||r(String.prototype,`repeat`,function(e){for(var t=``,n=this;e>0;)e&1&&(t+=n),(e>>=1)&&(n+=n);return t}),String.prototype.includes||r(String.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Object.assign||(Object.assign=function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];r!=null&&Object.keys(r).forEach(function(e){t[e]=r[e]})}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map(function(t){return e[t]})}),Array.prototype.find||r(Array.prototype,`find`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return i}}),Array.prototype.findIndex||r(Array.prototype,`findIndex`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return r}}),Array.prototype.includes||r(Array.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Array.prototype.fill||r(Array.prototype,`fill`,function(e){for(var t=this,n=t.length>>>0,r=arguments[1]>>0,i=r<0?Math.max(n+r,0):Math.min(r,n),a=arguments[2],o=a===void 0?n:a>>0,s=o<0?Math.max(n+o,0):Math.min(o,n);i<s;)t[i]=e,i++;return t}),Array.of||r(Array,`of`,function(){return Array.prototype.slice.call(arguments)})}),ace.define(`ace/lib/fixoldbrowsers`,[`require`,`exports`,`module`,`ace/lib/es6-shim`],function(e,t,n){e("./es6-shim")}),ace.define(`ace/lib/deep_copy`,[`require`,`exports`,`module`],function(e,t,n){t.deepCopy=function e(t){if(typeof t!=`object`||!t)return t;var n;if(Array.isArray(t)){n=[];for(var r=0;r<t.length;r++)n[r]=e(t[r]);return n}if(Object.prototype.toString.call(t)!==`[object Object]`)return t;for(var r in n={},t)n[r]=e(t[r]);return n}}),ace.define(`ace/lib/lang`,[`require`,`exports`,`module`,`ace/lib/deep_copy`],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split(``).reverse().join(``)},t.stringRepeat=function(e,t){for(var n=``;t>0;)t&1&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,``)},t.stringTrimRight=function(e){return e.replace(i,``)},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]==`object`?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,`\\$1`)},t.escapeHTML=function(e){return(``+e).replace(/&/g,`&#38;`).replace(/"/g,`&#34;`).replace(/'/g,`&#39;`).replace(/</g,`&#60;`)},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n??=setTimeout(r,e||t)};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.sleep=function(e){return new Promise(function(t){setTimeout(t,e)})},t.supportsLookbehind=function(){return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}),ace.define(`ace/lib/useragent`,[`require`,`exports`,`module`],function(e,t,n){t.OS={LINUX:`LINUX`,MAC:`MAC`,WINDOWS:`WINDOWS`},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var r=typeof navigator==`object`?navigator:{},i=(/mac|win|linux/i.exec(r.platform)||[`other`])[0].toLowerCase(),a=r.userAgent||``,o=r.appName||``;t.isWin=i==`win`,t.isMac=i==`mac`,t.isLinux=i==`linux`,t.isIE=o==`Microsoft Internet Explorer`||o.indexOf(`MSAppHost`)>=0?parseFloat((a.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((a.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=a.match(/ Gecko\/\d+/),t.isOpera=typeof opera==`object`&&Object.prototype.toString.call(window.opera)==`[object Opera]`,t.isWebKit=parseFloat(a.split(`WebKit/`)[1])||void 0,t.isChrome=parseFloat(a.split(` Chrome/`)[1])||void 0,t.isSafari=parseFloat(a.split(` Safari/`)[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(a.split(` Edge/`)[1])||void 0,t.isAIR=a.indexOf(`AdobeAIR`)>=0,t.isAndroid=a.indexOf(`Android`)>=0,t.isChromeOS=a.indexOf(` CrOS `)>=0,t.isIOS=/iPad|iPhone|iPod/.test(a)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define(`ace/lib/dom`,[`require`,`exports`,`module`,`ace/lib/useragent`],function(e,t,n){var r=e("./useragent"),i=`http://www.w3.org/1999/xhtml`;t.buildDom=function e(t,n,r){if(typeof t==`string`&&t){var i=document.createTextNode(t);return n&&n.appendChild(i),i}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if(typeof t[0]!=`string`||!t[0]){for(var a=[],o=0;o<t.length;o++){var s=e(t[o],n,r);s&&a.push(s)}return a}var c=document.createElement(t[0]),l=t[1],u=1;l&&typeof l==`object`&&!Array.isArray(l)&&(u=2);for(var o=u;o<t.length;o++)e(t[o],c,r);return u==2&&Object.keys(l).forEach(function(e){var t=l[e];e===`class`?c.className=Array.isArray(t)?t.join(` `):t:typeof t==`function`||e==`value`||e[0]==`$`?c[e]=t:e===`ref`?r&&(r[t]=c):e===`style`?typeof t==`string`&&(c.style.cssText=t):t!=null&&c.setAttribute(e,t)}),n&&n.appendChild(c),c},t.getDocumentHead=function(e){return e||=document,e.head||e.getElementsByTagName(`head`)[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||i,e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=``},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return(e.className+``).split(/\s+/g).indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=` `+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(` `)},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(` `),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n=0,r;if(t||=document,r=t.querySelectorAll(`style`)){for(;n<r.length;)if(r[n++].id===e)return!0}},t.removeElementById=function(e,t){t||=document,t.getElementById(e)&&t.getElementById(e).remove()};var a,o=[];t.useStrictCSP=function(e){a=e,e==0?s():o||=[]};function s(){var e=o;o=null,e&&e.forEach(function(e){c(e[0],e[1])})}function c(e,n,r){if(!(typeof document>`u`)){if(o){if(r)s();else if(r===!1)return o.push([e,n])}if(!a){var i=r;!r||!r.getRootNode?i=document:(i=r.getRootNode(),(!i||i==r)&&(i=document));var c=i.ownerDocument||i;if(n&&t.hasCssString(n,i))return null;n&&(e+=`
1
+ import{t as e}from"./rolldown-runtime-DAXXjFlN.js";var t=e(((e,t)=>{(function(){var e=`ace`,t=(function(){return this})();if(!t&&typeof window<`u`&&(t=window),!e&&typeof requirejs<`u`)return;var n=function(e,t,r){if(typeof e!=`string`){n.original?n.original.apply(this,arguments):(console.error(`dropping module because define wasn't a string.`),console.trace());return}arguments.length==2&&(r=t),n.modules[e]||(n.payloads[e]=r,n.modules[e]=null)};n.modules={},n.payloads={};var r=function(e,t,n){if(typeof t==`string`){var r=o(e,t);if(r!=null)return n&&n(),r}else if(Object.prototype.toString.call(t)===`[object Array]`){for(var a=[],s=0,c=t.length;s<c;++s){var l=o(e,t[s]);if(l==null&&i.original)return;a.push(l)}return n&&n.apply(null,a)||!0}},i=function(e,t){var n=r(``,e,t);return n==null&&i.original?i.original.apply(this,arguments):n},a=function(e,t){if(t.indexOf(`!`)!==-1){var n=t.split(`!`);return a(e,n[0])+`!`+a(e,n[1])}if(t.charAt(0)==`.`)for(t=e.split(`/`).slice(0,-1).join(`/`)+`/`+t;t.indexOf(`.`)!==-1&&r!=t;){var r=t;t=t.replace(/\/\.\//,`/`).replace(/[^\/]+\/\.\.\//,``)}return t},o=function(e,t){t=a(e,t);var i=n.modules[t];if(!i){if(i=n.payloads[t],typeof i==`function`){var o={},s={id:t,uri:``,exports:o,packaged:!0};o=i(function(e,n){return r(t,e,n)},o,s)||s.exports,n.modules[t]=o,delete n.payloads[t]}i=n.modules[t]=o||i}return i};function s(e){var r=t;e&&(t[e]||(t[e]={}),r=t[e]),(!r.define||!r.define.packaged)&&(n.original=r.define,r.define=n,r.define.packaged=!0),(!r.require||!r.require.packaged)&&(i.original=r.require,r.require=i,r.require.packaged=!0)}s(e)})(),ace.define(`ace/lib/es6-shim`,[`require`,`exports`,`module`],function(e,t,n){function r(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||r(String.prototype,`startsWith`,function(e,t){return t||=0,this.lastIndexOf(e,t)===t}),String.prototype.endsWith||r(String.prototype,`endsWith`,function(e,t){var n=this;(t===void 0||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return r!==-1&&r===t}),String.prototype.repeat||r(String.prototype,`repeat`,function(e){for(var t=``,n=this;e>0;)e&1&&(t+=n),(e>>=1)&&(n+=n);return t}),String.prototype.includes||r(String.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Object.assign||(Object.assign=function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];r!=null&&Object.keys(r).forEach(function(e){t[e]=r[e]})}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map(function(t){return e[t]})}),Array.prototype.find||r(Array.prototype,`find`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return i}}),Array.prototype.findIndex||r(Array.prototype,`findIndex`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return r}}),Array.prototype.includes||r(Array.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Array.prototype.fill||r(Array.prototype,`fill`,function(e){for(var t=this,n=t.length>>>0,r=arguments[1]>>0,i=r<0?Math.max(n+r,0):Math.min(r,n),a=arguments[2],o=a===void 0?n:a>>0,s=o<0?Math.max(n+o,0):Math.min(o,n);i<s;)t[i]=e,i++;return t}),Array.of||r(Array,`of`,function(){return Array.prototype.slice.call(arguments)})}),ace.define(`ace/lib/fixoldbrowsers`,[`require`,`exports`,`module`,`ace/lib/es6-shim`],function(e,t,n){e("./es6-shim")}),ace.define(`ace/lib/deep_copy`,[`require`,`exports`,`module`],function(e,t,n){t.deepCopy=function e(t){if(typeof t!=`object`||!t)return t;var n;if(Array.isArray(t)){n=[];for(var r=0;r<t.length;r++)n[r]=e(t[r]);return n}if(Object.prototype.toString.call(t)!==`[object Object]`)return t;for(var r in n={},t)n[r]=e(t[r]);return n}}),ace.define(`ace/lib/lang`,[`require`,`exports`,`module`,`ace/lib/deep_copy`],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split(``).reverse().join(``)},t.stringRepeat=function(e,t){for(var n=``;t>0;)t&1&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,``)},t.stringTrimRight=function(e){return e.replace(i,``)},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]==`object`?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,`\\$1`)},t.escapeHTML=function(e){return(``+e).replace(/&/g,`&#38;`).replace(/"/g,`&#34;`).replace(/'/g,`&#39;`).replace(/</g,`&#60;`)},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n??=setTimeout(r,e||t)};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.sleep=function(e){return new Promise(function(t){setTimeout(t,e)})},t.supportsLookbehind=function(){return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}),ace.define(`ace/lib/useragent`,[`require`,`exports`,`module`],function(e,t,n){t.OS={LINUX:`LINUX`,MAC:`MAC`,WINDOWS:`WINDOWS`},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var r=typeof navigator==`object`?navigator:{},i=(/mac|win|linux/i.exec(r.platform)||[`other`])[0].toLowerCase(),a=r.userAgent||``,o=r.appName||``;t.isWin=i==`win`,t.isMac=i==`mac`,t.isLinux=i==`linux`,t.isIE=o==`Microsoft Internet Explorer`||o.indexOf(`MSAppHost`)>=0?parseFloat((a.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((a.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=a.match(/ Gecko\/\d+/),t.isOpera=typeof opera==`object`&&Object.prototype.toString.call(window.opera)==`[object Opera]`,t.isWebKit=parseFloat(a.split(`WebKit/`)[1])||void 0,t.isChrome=parseFloat(a.split(` Chrome/`)[1])||void 0,t.isSafari=parseFloat(a.split(` Safari/`)[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(a.split(` Edge/`)[1])||void 0,t.isAIR=a.indexOf(`AdobeAIR`)>=0,t.isAndroid=a.indexOf(`Android`)>=0,t.isChromeOS=a.indexOf(` CrOS `)>=0,t.isIOS=/iPad|iPhone|iPod/.test(a)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define(`ace/lib/dom`,[`require`,`exports`,`module`,`ace/lib/useragent`],function(e,t,n){var r=e("./useragent"),i=`http://www.w3.org/1999/xhtml`;t.buildDom=function e(t,n,r){if(typeof t==`string`&&t){var i=document.createTextNode(t);return n&&n.appendChild(i),i}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if(typeof t[0]!=`string`||!t[0]){for(var a=[],o=0;o<t.length;o++){var s=e(t[o],n,r);s&&a.push(s)}return a}var c=document.createElement(t[0]),l=t[1],u=1;l&&typeof l==`object`&&!Array.isArray(l)&&(u=2);for(var o=u;o<t.length;o++)e(t[o],c,r);return u==2&&Object.keys(l).forEach(function(e){var t=l[e];e===`class`?c.className=Array.isArray(t)?t.join(` `):t:typeof t==`function`||e==`value`||e[0]==`$`?c[e]=t:e===`ref`?r&&(r[t]=c):e===`style`?typeof t==`string`&&(c.style.cssText=t):t!=null&&c.setAttribute(e,t)}),n&&n.appendChild(c),c},t.getDocumentHead=function(e){return e||=document,e.head||e.getElementsByTagName(`head`)[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||i,e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=``},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return(e.className+``).split(/\s+/g).indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=` `+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(` `)},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(` `),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n=0,r;if(t||=document,r=t.querySelectorAll(`style`)){for(;n<r.length;)if(r[n++].id===e)return!0}},t.removeElementById=function(e,t){t||=document,t.getElementById(e)&&t.getElementById(e).remove()};var a,o=[];t.useStrictCSP=function(e){a=e,e==0?s():o||=[]};function s(){var e=o;o=null,e&&e.forEach(function(e){c(e[0],e[1])})}function c(e,n,r){if(!(typeof document>`u`)){if(o){if(r)s();else if(r===!1)return o.push([e,n])}if(!a){var i=r;!r||!r.getRootNode?i=document:(i=r.getRootNode(),(!i||i==r)&&(i=document));var c=i.ownerDocument||i;if(n&&t.hasCssString(n,i))return null;n&&(e+=`
2
2
  /*# sourceURL=ace/css/`+n+` */`);var l=t.createElement(`style`);l.appendChild(c.createTextNode(e)),n&&(l.id=n),i==c&&(i=t.getDocumentHead(c)),i.insertBefore(l,i.firstChild)}}}if(t.importCssString=c,t.importCssStylsheet=function(e,n){t.buildDom([`link`,{rel:`stylesheet`,href:e}],t.getDocumentHead(n))},t.$fixPositionBug=function(e){var t=e.getBoundingClientRect();if(e.style.left){var n=parseFloat(e.style.left),r=+t.left;Math.abs(n-r)>1&&(e.style.left=2*n-r+`px`)}if(e.style.right){var n=parseFloat(e.style.right),r=window.innerWidth-t.right;Math.abs(n-r)>1&&(e.style.right=2*n-r+`px`)}if(e.style.top){var n=parseFloat(e.style.top),r=+t.top;Math.abs(n-r)>1&&(e.style.top=2*n-r+`px`)}if(e.style.bottom){var n=parseFloat(e.style.bottom),r=window.innerHeight-t.bottom;Math.abs(n-r)>1&&(e.style.bottom=2*n-r+`px`)}},t.scrollbarWidth=function(e){var n=t.createElement(`ace_inner`);n.style.width=`100%`,n.style.minWidth=`0px`,n.style.height=`200px`,n.style.display=`block`;var r=t.createElement(`ace_outer`),i=r.style;i.position=`absolute`,i.left=`-10000px`,i.overflow=`hidden`,i.width=`200px`,i.minWidth=`0px`,i.height=`150px`,i.display=`block`,r.appendChild(n);var a=e&&e.documentElement||document&&document.documentElement;if(!a)return 0;a.appendChild(r);var o=n.offsetWidth;i.overflow=`scroll`;var s=n.offsetWidth;return o===s&&(s=r.clientWidth),a.removeChild(r),o-s},t.computedStyle=function(e,t){return window.getComputedStyle(e,``)||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=r.isWin?typeof window<`u`&&window.devicePixelRatio>=1.5:!0,r.isChromeOS&&(t.HI_DPI=!1),typeof document<`u`){var l=document.createElement(`div`);t.HI_DPI&&l.style.transform!==void 0&&(t.HAS_CSS_TRANSFORMS=!0),!r.isEdge&&l.style.animationName!==void 0&&(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform=`translate(`+Math.round(t)+`px, `+Math.round(n)+`px)`}:t.translate=function(e,t,n){e.style.top=Math.round(n)+`px`,e.style.left=Math.round(t)+`px`}}),ace.define(`ace/lib/net`,[`require`,`exports`,`module`,`ace/lib/dom`],function(e,t,n){var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open(`GET`,e,!0),n.onreadystatechange=function(){n.readyState===4&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement(`script`);i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){(n||!i.readyState||i.readyState==`loaded`||i.readyState==`complete`)&&(i=i.onload=i.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement(`a`);return t.href=e,t.href}}),ace.define(`ace/lib/oop`,[`require`,`exports`,`module`],function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define(`ace/lib/event_emitter`,[`require`,`exports`,`module`],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},a=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||={},this._defaultHandlers||={};var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!(!n.length&&!r)){(typeof t!=`object`||!t)&&(t={}),t.type||=e,t.stopPropagation||=i,t.preventDefault||=a,n=n.slice();for(var o=0;o<n.length&&(n[o](t,this),!t.propagationStopped);o++);if(r&&!t.defaultPrevented)return r(t,this)}},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)}},r.once=function(e,t){var n=this;if(this.on(e,function r(){n.off(e,r),t.apply(null,arguments)}),!t)return new Promise(function(e){t=e})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||=this._defaultHandlers={_disabled_:{}},n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var a=i.indexOf(t);a!=-1&&i.splice(a,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var i=r.indexOf(t);i!=-1&&r.splice(i,1)}}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||=this._eventRegistry[e]=[],r.indexOf(t)==-1&&r[n?`unshift`:`push`](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var r=n.indexOf(t);r!==-1&&n.splice(r,1)}},r.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=r}),ace.define(`ace/lib/report_error`,[`require`,`exports`,`module`],function(e,t,n){t.reportError=function(e,t){var n=Error(e);n.data=t,typeof console==`object`&&console.error&&console.error(n),setTimeout(function(){throw n})}}),ace.define(`ace/lib/default_english_messages`,[`require`,`exports`,`module`],function(e,t,n){t.defaultEnglishMessages={"autocomplete.popup.aria-roledescription":`Autocomplete suggestions`,"autocomplete.popup.aria-label":`Autocomplete suggestions`,"autocomplete.popup.item.aria-roledescription":`item`,"autocomplete.loading":`Loading...`,"editor.scroller.aria-roledescription":`editor`,"editor.scroller.aria-label":`Editor content, press Enter to start editing, press Escape to exit`,"editor.gutter.aria-roledescription":`editor gutter`,"editor.gutter.aria-label":`Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit`,"error-marker.good-state":`Looks good!`,"prompt.recently-used":`Recently used`,"prompt.other-commands":`Other commands`,"prompt.no-matching-commands":`No matching commands`,"search-box.find.placeholder":`Search for`,"search-box.find-all.text":`All`,"search-box.replace.placeholder":`Replace with`,"search-box.replace-next.text":`Replace`,"search-box.replace-all.text":`All`,"search-box.toggle-replace.title":`Toggle Replace mode`,"search-box.toggle-regexp.title":`RegExp Search`,"search-box.toggle-case.title":`CaseSensitive Search`,"search-box.toggle-whole-word.title":`Whole Word Search`,"search-box.toggle-in-selection.title":`Search In Selection`,"search-box.search-counter":`$0 of $1`,"text-input.aria-roledescription":`editor`,"text-input.aria-label":`Cursor at row $0`,"gutter.code-folding.range.aria-label":`Toggle code folding, rows $0 through $1`,"gutter.code-folding.closed.aria-label":`Toggle code folding, rows $0 through $1`,"gutter.code-folding.open.aria-label":`Toggle code folding, row $0`,"gutter.code-folding.closed.title":`Unfold code`,"gutter.code-folding.open.title":`Fold code`,"gutter.annotation.aria-label.error":`Error, read annotations row $0`,"gutter.annotation.aria-label.warning":`Warning, read annotations row $0`,"gutter.annotation.aria-label.info":`Info, read annotations row $0`,"inline-fold.closed.title":`Unfold code`,"gutter-tooltip.aria-label.error.singular":`error`,"gutter-tooltip.aria-label.error.plural":`errors`,"gutter-tooltip.aria-label.warning.singular":`warning`,"gutter-tooltip.aria-label.warning.plural":`warnings`,"gutter-tooltip.aria-label.info.singular":`information message`,"gutter-tooltip.aria-label.info.plural":`information messages`,"gutter.annotation.aria-label.security":`Security finding, read annotations row $0`,"gutter.annotation.aria-label.hint":`Suggestion, read annotations row $0`,"gutter-tooltip.aria-label.security.singular":`security finding`,"gutter-tooltip.aria-label.security.plural":`security findings`,"gutter-tooltip.aria-label.hint.singular":`suggestion`,"gutter-tooltip.aria-label.hint.plural":`suggestions`,"editor.tooltip.disable-editing":`Editing is disabled`}}),ace.define(`ace/lib/app_config`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/event_emitter`,`ace/lib/report_error`,`ace/lib/default_english_messages`],function(e,t,n){"no use strict";var r=e("./oop"),i=e("./event_emitter").EventEmitter,a=e("./report_error").reportError,o=e("./default_english_messages").defaultEnglishMessages,s={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var n=this.$options;e=Object.keys(n).filter(function(e){return!n[e].hidden})}return e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this[`$`+e]!==t){var n=this.$options[e];if(!n)return c(`misspelled option "`+e+`"`);if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this[`$`+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this[`$`+e]:c(`misspelled option "`+e+`"`)}};function c(e){typeof console<`u`&&console.warn&&console.warn.apply(console,arguments)}var l,u,d=function(){function e(){this.$defaultOptions={},l=o,u=`dollarSigns`}return e.prototype.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var r=n[t];typeof r==`string`&&(r={forwardTo:r}),r.name||=t,e.$options[r.name]=r,`initialValue`in r&&(e[`$`+r.name]=r.initialValue)}),r.implement(e,s),this},e.prototype.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];`value`in n&&e.setOption(t,n.value)})},e.prototype.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var r=this.$defaultOptions[e]||(this.$defaultOptions[e]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,n):r[t].value=n)},e.prototype.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},e.prototype.setMessages=function(e,t){l=e,t&&t.placeholders&&(u=t.placeholders)},e.prototype.nls=function(e,t,n){l[e]||(c(`No message found for the key '`+e+`' in messages with id `+l.$id+`, trying to find a translation for the default string '`+t+`'.`),l[t]||c(`No message found for the default string '`+t+`' in the provided messages. Falling back to the default English message.`));var r=l[e]||l[t]||t;return n&&(u===`dollarSigns`&&(r=r.replace(/\$(\$|[\d]+)/g,function(e,t){return t==`$`?`$`:n[t]})),u===`curlyBrackets`&&(r=r.replace(/\{([^\}]+)\}/g,function(e,t){return n[t]}))),r},e}();d.prototype.warn=c,d.prototype.reportError=a,r.implement(d.prototype,i),t.AppConfig=d}),ace.define(`ace/theme/textmate-css`,[`require`,`exports`,`module`],function(e,t,n){n.exports=`.ace-tm .ace_gutter {
3
3
  background: #f0f0f0;
4
4
  color: #333;
@@ -157,7 +157,7 @@ import{t as e}from"./rolldown-runtime-CMxvf4Kt.js";var t=e(((e,t)=>{(function(){
157
157
  .ace-tm .ace_indent-guide-active {
158
158
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
159
159
  }
160
- `}),ace.define(`ace/theme/textmate`,[`require`,`exports`,`module`,`ace/theme/textmate-css`,`ace/lib/dom`],function(e,t,n){t.isDark=!1,t.cssClass=`ace-tm`,t.cssText=e("./textmate-css"),t.$id=`ace/theme/textmate`,e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)}),ace.define(`ace/config`,[`require`,`exports`,`module`,`ace/lib/lang`,`ace/lib/net`,`ace/lib/dom`,`ace/lib/app_config`,`ace/theme/textmate`],function(e,t,n){"no use strict";var r=e("./lib/lang"),i=e("./lib/net"),a=e("./lib/dom"),o=e("./lib/app_config").AppConfig;n.exports=t=new o;var s={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:``,suffix:`.js`,$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};t.get=function(e){if(!s.hasOwnProperty(e))throw Error(`Unknown config key: `+e);return s[e]},t.set=function(e,t){if(s.hasOwnProperty(e))s[e]=t;else if(this.setDefaultValue(``,e,t)==0)throw Error(`Unknown config key: `+e);e==`useStrictCSP`&&a.useStrictCSP(t)},t.all=function(){return r.copyObject(s)},t.$modes={},t.moduleUrl=function(e,t){if(s.$moduleUrls[e])return s.$moduleUrls[e];var n=e.split(`/`);t=t||n[n.length-2]||``;var r=t==`snippets`?`/`:`-`,i=n[n.length-1];if(t==`worker`&&r==`-`){var a=RegExp(`^`+t+`[\\-_]|[\\-_]`+t+`$`,`g`);i=i.replace(a,``)}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var o=s[t+`Path`];return o==null?o=s.basePath:r==`/`&&(t=r=``),o&&o.slice(-1)!=`/`&&(o+=`/`),o+t+r+i+this.get(`suffix`)},t.setModuleUrl=function(e,t){return s.$moduleUrls[e]=t};var c=function(t,n){if(t===`ace/theme/textmate`||t===`./theme/textmate`)return n(null,e("./theme/textmate"));if(l)return l(t,n);console.error(`loader is not configured`)},l;t.setLoader=function(e){l=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(e,n){var r;if(Array.isArray(e))var a=e[0],o=e[1];else if(typeof e==`string`)var o=e;var s=function(e){if(e&&!t.$loading[o])return n&&n(e);if(t.$loading[o]||(t.$loading[o]=[]),t.$loading[o].push(n),!(t.$loading[o].length>1)){var r=function(){c(o,function(e,n){n&&(t.$loaded[o]=n),t._emit(`load.module`,{name:o,module:n});var r=t.$loading[o];t.$loading[o]=null,r.forEach(function(e){e&&e(n)})})};if(!t.get(`packaged`))return r();i.loadScript(t.moduleUrl(o,a),r),u()}};if(t.dynamicModules[o])t.dynamicModules[o]().then(function(e){e.default?s(e.default):s(e)});else{try{r=this.$require(o)}catch{}s(r||t.$loaded[o])}},t.$require=function(e){if(typeof n.require==`function`)return n.require(e)},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var u=function(){!s.basePath&&!s.workerPath&&!s.modePath&&!s.themePath&&!Object.keys(s.$moduleUrls).length&&(console.error(`Unable to infer path to ace from script src,`,`use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes`,`or with webpack use ace/webpack-resolver`),u=function(){})};t.version=`1.44.0`}),ace.define(`ace/loader_build`,[`require`,`exports`,`module`,`ace/lib/fixoldbrowsers`,`ace/config`],function(e,t,n){e("./lib/fixoldbrowsers");var r=e("./config");r.setLoader(function(t,n){e([t],function(e){n(null,e)})});var i=(function(){return this||typeof window<`u`&&window})();n.exports=function(t){r.init=a,r.$require=e,t.require=e,typeof define==`function`&&(t.define=define)},a(!0);function a(t){if(!(!i||!i.document)){r.set(`packaged`,t||e.packaged||n.packaged||i.define&&define.packaged);var a={},s=``,c=document.currentScript||document._currentScript,l=c&&c.ownerDocument||document;c&&c.src&&(s=c.src.split(/[?#]/)[0].split(`/`).slice(0,-1).join(`/`)||``);for(var u=l.getElementsByTagName(`script`),d=0;d<u.length;d++){var f=u[d],p=f.src||f.getAttribute(`src`);if(p){for(var m=f.attributes,h=0,g=m.length;h<g;h++){var _=m[h];_.name.indexOf(`data-ace-`)===0&&(a[o(_.name.replace(/^data-ace-/,``))]=_.value)}var v=p.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);v&&(s=v[1])}}for(var y in s&&(a.base=a.base||s,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base,a)a[y]!==void 0&&r.set(y,a[y])}}function o(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}}),ace.define(`ace/range`,[`require`,`exports`,`module`],function(e,t,n){var r=function(){function e(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return`Range: [`+this.start.row+`/`+this.start.column+`] -> [`+this.end.row+`/`+this.end.column+`]`},e.prototype.contains=function(e,t){return this.compare(e,t)==0},e.prototype.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:+(t==0)):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},e.prototype.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){typeof e==`object`?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){typeof e==`object`?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return this.compare(e,t)==0?!(this.isEnd(e,t)||this.isStart(e,t)):!1},e.prototype.insideStart=function(e,t){return this.compare(e,t)==0?!this.isEnd(e,t):!1},e.prototype.insideEnd=function(e,t){return this.compare(e,t)==0?!this.isStart(e,t):!1},e.prototype.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:+(t>this.end.column):e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var r={row:n+1,column:0};else if(this.end.row<t)var r={row:t,column:0};if(this.start.row>n)var i={row:n+1,column:0};else if(this.start.row<t)var i={row:t,column:0};return e.fromPoints(i||this.start,r||this.end)},e.prototype.extend=function(t,n){var r=this.compare(t,n);if(r==0)return this;if(r==-1)var i={row:t,column:n};else var a={row:t,column:n};return e.fromPoints(i||this.start,a||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return this.end.column==0?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),r=t.documentToScreenPosition(this.end);return new e(n.row,n.column,r.row,r.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},r.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=r}),ace.define(`ace/lib/keys`,[`require`,`exports`,`module`,`ace/lib/oop`],function(e,t,n){for(var r=e("./oop"),i={MODIFIER_KEYS:{16:`Shift`,17:`Ctrl`,18:`Alt`,224:`Meta`,91:`MetaLeft`,92:`MetaRight`,93:`ContextMenu`},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:`Backspace`,9:`Tab`,13:`Return`,19:`Pause`,27:`Esc`,32:`Space`,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`Left`,38:`Up`,39:`Right`,40:`Down`,44:`Print`,45:`Insert`,46:`Delete`,"-13":`NumpadEnter`,144:`Numlock`,145:`Scrolllock`},PRINTABLE_KEYS:{32:` `,59:`;`,61:`=`,107:`+`,109:`-`,110:`.`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`,111:`/`,106:`*`}},a={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},o=0;o<10;o++)a[`Digit`+o]=48+o,a[`Numpad`+o]=96+o,i.PRINTABLE_KEYS[48+o]=``+o,i.FUNCTION_KEYS[96+o]=`Numpad`+o;for(var o=65;o<91;o++){var s=String.fromCharCode(o+32);a[`Key`+s.toUpperCase()]=o,i.PRINTABLE_KEYS[o]=s}for(var o=1;o<13;o++)a[`F`+o]=111+o,i.FUNCTION_KEYS[111+o]=`F`+o;var c={Shift:16,Control:17,Alt:18,Meta:224};for(var l in c)a[l]=a[l+`Left`]=a[l+`Right`]=c[l];for(var u in t.$codeToKeyCode=a,i.PRINTABLE_KEYS[173]=`-`,i.FUNCTION_KEYS){var d=i.FUNCTION_KEYS[u].toLowerCase();i[d]=parseInt(u,10)}for(var u in i.PRINTABLE_KEYS){var d=i.PRINTABLE_KEYS[u].toLowerCase();i[d]=parseInt(u,10)}r.mixin(i,i.MODIFIER_KEYS),r.mixin(i,i.PRINTABLE_KEYS),r.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,(function(){for(var e=[`cmd`,`ctrl`,`alt`,`shift`],t=2**e.length;t--;)i.KEY_MODS[t]=e.filter(function(e){return t&i.KEY_MODS[e]}).join(`-`)+`-`})(),i.KEY_MODS[0]=``,i.KEY_MODS[-1]=`input-`,r.mixin(t,i),t.default=t,t.keyCodeToString=function(e){var t=i[e];return typeof t!=`string`&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define(`ace/lib/event`,[`require`,`exports`,`module`,`ace/lib/keys`,`ace/lib/useragent`],function(e,t,n){var r=e("./keys"),i=e("./useragent"),a=null,o=0,s;function c(){s=!1;try{document.createComment(``).addEventListener(`test`,function(){},{get passive(){return s={passive:!1},!0}})}catch{}}function l(){return s??c(),s}function u(e,t,n){this.elem=e,this.type=t,this.callback=n}u.prototype.destroy=function(){f(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var d=t.addListener=function(e,t,n,r){e.addEventListener(t,n,l()),r&&r.$toDestroy.push(new u(e,t,n))},f=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return e.type==`dblclick`?0:e.type==`contextmenu`||i.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var r=e&&e.ownerDocument||document;function i(e){t&&t(e),n&&n(e),f(r,`mousemove`,t),f(r,`mouseup`,i),f(r,`dragstart`,i)}return d(r,`mousemove`,t),d(r,`mouseup`,i),d(r,`dragstart`,i),i},t.addMouseWheelListener=function(e,t,n){d(e,`wheel`,function(e){var n=.15,r=e.deltaX||0,i=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=r*n,e.wheelY=i*n;break;case e.DOM_DELTA_LINE:var a=15;e.wheelX=r*a,e.wheelY=i*a;break;case e.DOM_DELTA_PAGE:var o=150;e.wheelX=r*o,e.wheelY=i*o;break}t(e)},n)},t.addMultiMouseDownListener=function(e,n,r,a,o){var s=0,c,l,u,f={2:`dblclick`,3:`tripleclick`,4:`quadclick`};function p(e){if(t.getButton(e)===0?e.detail>1?(s++,s>4&&(s=1)):s=1:s=0,i.isIE){var o=Math.abs(e.clientX-c)>5||Math.abs(e.clientY-l)>5;(!u||o)&&(s=1),u&&clearTimeout(u),u=setTimeout(function(){u=null},n[s-1]||600),s==1&&(c=e.clientX,l=e.clientY)}if(e._clicks=s,r[a](`mousedown`,e),s>4)s=0;else if(s>1)return r[a](f[s],e)}Array.isArray(e)||(e=[e]),e.forEach(function(e){d(e,`mousedown`,p,o)})};function p(e){return 0|!!e.ctrlKey|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}t.getModifierString=function(e){return r.KEY_MODS[p(e)]};function m(e,t,n){var s=p(t);if(!n&&t.code&&(n=r.$codeToKeyCode[t.code]||n),!i.isMac&&a){if(t.getModifierState&&(t.getModifierState(`OS`)||t.getModifierState(`Win`))&&(s|=8),a.altGr)if((3&s)!=3)a.altGr=0;else return;if(n===18||n===17){var c=t.location;n===17&&c===1?a[n]==1&&(o=t.timeStamp):n===18&&s===3&&c===2&&t.timeStamp-o<50&&(a.altGr=!0)}}if(n in r.MODIFIER_KEYS&&(n=-1),!(!s&&n===13&&t.location===3&&(e(t,s,-n),t.defaultPrevented))){if(i.isChromeOS&&s&8){if(e(t,s,n),t.defaultPrevented)return;s&=-9}return!s&&!(n in r.FUNCTION_KEYS)&&!(n in r.PRINTABLE_KEYS)?!1:e(t,s,n)}}t.addCommandKeyListener=function(e,n,r){var i=null;d(e,`keydown`,function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=m(n,e,e.keyCode);return i=e.defaultPrevented,t},r),d(e,`keypress`,function(e){i&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),i=null)},r),d(e,`keyup`,function(e){a[e.keyCode]=null},r),a||(h(),d(window,`focus`,h))};function h(){a=Object.create(null)}if(typeof window==`object`&&window.postMessage&&!i.isOldIE){var g=1;t.nextTick=function(e,n){n||=window;var r=`zero-timeout-message-`+ g++,i=function(a){a.data==r&&(t.stopPropagation(a),f(n,`message`,i),e())};d(n,`message`,i),n.postMessage(r,`*`)}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout(function n(){t.$idleBlocked?setTimeout(n,100):e()},n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout(function(){t.$idleBlocked=!1},e||100)},t.nextFrame=typeof window==`object`&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define(`ace/clipboard`,[`require`,`exports`,`module`],function(e,t,n){var r;n.exports={lineMode:!1,pasteCancelled:function(){return r&&r>Date.now()-50?!0:r=!1},cancel:function(){r=Date.now()}}}),ace.define(`ace/keyboard/textinput`,[`require`,`exports`,`module`,`ace/lib/event`,`ace/config`,`ace/lib/useragent`,`ace/lib/dom`,`ace/lib/lang`,`ace/clipboard`,`ace/lib/keys`],function(e,t,n){var r=e("../lib/event"),i=e("../config").nls,a=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),c=e("../clipboard"),l=a.isChrome<18,u=a.isIE,d=a.isChrome>63,f=400,p=e("../lib/keys"),m=p.KEY_MODS,h=a.isIOS,g=h?/\s/:/\n/,_=a.isMobile;t.TextInput=function(){function e(e,t){var n=this;this.host=t,this.text=o.createElement(`textarea`),this.text.className=`ace_text-input`,this.text.setAttribute(`wrap`,`off`),this.text.setAttribute(`autocomplete`,`off`),this.text.setAttribute(`autocorrect`,`off`),this.text.setAttribute(`autocapitalize`,`off`),this.text.setAttribute(`spellcheck`,`false`),this.text.style.opacity=`0`,e.insertBefore(this.text,e.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle=``,_||(this.text.style.fontSize=`1px`),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue=``,this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=2**53-1,this.rowEnd=-(2**53-1),this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:`textbox`}),r.addListener(this.text,`blur`,function(e){n.ignoreFocusEvents||(t.onBlur(e),n.$isFocused=!1)},t),r.addListener(this.text,`focus`,function(e){if(!n.ignoreFocusEvents){if(n.$isFocused=!0,a.isEdge)try{if(!document.hasFocus())return}catch{}t.onFocus(e),a.isEdge?setTimeout(n.resetSelection.bind(n)):n.resetSelection()}},t),this.$focusScroll=!1,t.on(`beforeEndOperation`,function(){var e=t.curOp,r=e&&e.command&&e.command.name;if(r!=`insertstring`){var i=r&&(e.docChanged||e.selectionChanged);n.inComposition&&i&&(n.lastValue=n.text.value=``,n.onCompositionEnd()),n.resetSelection()}}),t.on(`changeSelection`,this.setAriaLabel.bind(this)),this.resetSelection=h?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&t.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,r.addCommandKeyListener(this.text,function(e,r,i){if(!n.inComposition)return t.onCommandKey(e,r,i)},t),r.addListener(this.text,`select`,this.onSelect.bind(this),t),r.addListener(this.text,`input`,this.onInput.bind(this),t),r.addListener(this.text,`cut`,this.onCut.bind(this),t),r.addListener(this.text,`copy`,this.onCopy.bind(this),t),r.addListener(this.text,`paste`,this.onPaste.bind(this),t),(!(`oncut`in this.text)||!(`oncopy`in this.text)||!(`onpaste`in this.text))&&r.addListener(e,`keydown`,function(e){if(!(a.isMac&&!e.metaKey||!e.ctrlKey))switch(e.keyCode){case 67:n.onCopy(e);break;case 86:n.onPaste(e);break;case 88:n.onCut(e);break}},t),this.syncComposition=s.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),r.addListener(this.text,`compositionstart`,this.onCompositionStart.bind(this),t),r.addListener(this.text,`compositionupdate`,this.onCompositionUpdate.bind(this),t),r.addListener(this.text,`keyup`,this.onKeyup.bind(this),t),r.addListener(this.text,`keydown`,this.syncComposition.bind(this),t),r.addListener(this.text,`compositionend`,this.onCompositionEnd.bind(this),t),this.closeTimeout,r.addListener(this.text,`mouseup`,this.$onContextMenu.bind(this),t),r.addListener(this.text,`mousedown`,function(e){e.preventDefault(),n.onContextMenuClose()},t),r.addListener(t.renderer.scroller,`contextmenu`,this.$onContextMenu.bind(this),t),r.addListener(this.text,`contextmenu`,this.$onContextMenu.bind(this),t),h&&this.addIosSelectionHandler(e,t,this.text)}return e.prototype.addIosSelectionHandler=function(e,t,n){var r=this,i=null,a=!1;n.addEventListener(`keydown`,function(e){i&&clearTimeout(i),a=!0},!0),n.addEventListener(`keyup`,function(e){i=setTimeout(function(){a=!1},100)},!0);var o=function(e){if(document.activeElement===n&&!(a||r.inComposition||t.$mouseHandler.isMousePressed)&&!r.copied){var i=n.selectionStart,o=n.selectionEnd,s=null,c=0;if(i==0?s=p.up:i==1?s=p.home:o>r.lastSelectionEnd&&r.lastValue[o]==`
160
+ `}),ace.define(`ace/theme/textmate`,[`require`,`exports`,`module`,`ace/theme/textmate-css`,`ace/lib/dom`],function(e,t,n){t.isDark=!1,t.cssClass=`ace-tm`,t.cssText=e("./textmate-css"),t.$id=`ace/theme/textmate`,e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)}),ace.define(`ace/config`,[`require`,`exports`,`module`,`ace/lib/lang`,`ace/lib/net`,`ace/lib/dom`,`ace/lib/app_config`,`ace/theme/textmate`],function(e,t,n){"no use strict";var r=e("./lib/lang"),i=e("./lib/net"),a=e("./lib/dom"),o=e("./lib/app_config").AppConfig;n.exports=t=new o;var s={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:``,suffix:`.js`,$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};t.get=function(e){if(!s.hasOwnProperty(e))throw Error(`Unknown config key: `+e);return s[e]},t.set=function(e,t){if(s.hasOwnProperty(e))s[e]=t;else if(this.setDefaultValue(``,e,t)==0)throw Error(`Unknown config key: `+e);e==`useStrictCSP`&&a.useStrictCSP(t)},t.all=function(){return r.copyObject(s)},t.$modes={},t.moduleUrl=function(e,t){if(s.$moduleUrls[e])return s.$moduleUrls[e];var n=e.split(`/`);t=t||n[n.length-2]||``;var r=t==`snippets`?`/`:`-`,i=n[n.length-1];if(t==`worker`&&r==`-`){var a=RegExp(`^`+t+`[\\-_]|[\\-_]`+t+`$`,`g`);i=i.replace(a,``)}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var o=s[t+`Path`];return o==null?o=s.basePath:r==`/`&&(t=r=``),o&&o.slice(-1)!=`/`&&(o+=`/`),o+t+r+i+this.get(`suffix`)},t.setModuleUrl=function(e,t){return s.$moduleUrls[e]=t};var c=function(t,n){if(t===`ace/theme/textmate`||t===`./theme/textmate`)return n(null,e("./theme/textmate"));if(l)return l(t,n);console.error(`loader is not configured`)},l;t.setLoader=function(e){l=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(e,n){var r;if(Array.isArray(e))var a=e[0],o=e[1];else if(typeof e==`string`)var o=e;var s=function(e){if(e&&!t.$loading[o])return n&&n(e);if(t.$loading[o]||(t.$loading[o]=[]),t.$loading[o].push(n),!(t.$loading[o].length>1)){var r=function(){c(o,function(e,n){n&&(t.$loaded[o]=n),t._emit(`load.module`,{name:o,module:n});var r=t.$loading[o];t.$loading[o]=null,r.forEach(function(e){e&&e(n)})})};if(!t.get(`packaged`))return r();i.loadScript(t.moduleUrl(o,a),r),u()}};if(t.dynamicModules[o])t.dynamicModules[o]().then(function(e){e.default?s(e.default):s(e)});else{try{r=this.$require(o)}catch{}s(r||t.$loaded[o])}},t.$require=function(e){if(typeof n.require==`function`)return n.require(e)},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var u=function(){!s.basePath&&!s.workerPath&&!s.modePath&&!s.themePath&&!Object.keys(s.$moduleUrls).length&&(console.error(`Unable to infer path to ace from script src,`,`use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes`,`or with webpack use ace/webpack-resolver`),u=function(){})};t.version=`1.44.0`}),ace.define(`ace/loader_build`,[`require`,`exports`,`module`,`ace/lib/fixoldbrowsers`,`ace/config`],function(e,t,n){e("./lib/fixoldbrowsers");var r=e("./config");r.setLoader(function(t,n){e([t],function(e){n(null,e)})});var i=(function(){return this||typeof window<`u`&&window})();n.exports=function(t){r.init=a,r.$require=e,t.require=e,typeof define==`function`&&(t.define=define)},a(!0);function a(t){if(!(!i||!i.document)){r.set(`packaged`,t||e.packaged||n.packaged||i.define&&define.packaged);var a={},s=``,c=document.currentScript||document._currentScript,l=c&&c.ownerDocument||document;c&&c.src&&(s=c.src.split(/[?#]/)[0].split(`/`).slice(0,-1).join(`/`)||``);for(var u=l.getElementsByTagName(`script`),d=0;d<u.length;d++){var f=u[d],p=f.src||f.getAttribute(`src`);if(p){for(var m=f.attributes,h=0,g=m.length;h<g;h++){var _=m[h];_.name.indexOf(`data-ace-`)===0&&(a[o(_.name.replace(/^data-ace-/,``))]=_.value)}var v=p.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);v&&(s=v[1])}}for(var y in s&&(a.base=a.base||s,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base,a)a[y]!==void 0&&r.set(y,a[y])}}function o(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}}),ace.define(`ace/range`,[`require`,`exports`,`module`],function(e,t,n){var r=function(){function e(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return`Range: [`+this.start.row+`/`+this.start.column+`] -> [`+this.end.row+`/`+this.end.column+`]`},e.prototype.contains=function(e,t){return this.compare(e,t)==0},e.prototype.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:+(t==0)):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},e.prototype.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){typeof e==`object`?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){typeof e==`object`?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return this.compare(e,t)==0?!(this.isEnd(e,t)||this.isStart(e,t)):!1},e.prototype.insideStart=function(e,t){return this.compare(e,t)==0?!this.isEnd(e,t):!1},e.prototype.insideEnd=function(e,t){return this.compare(e,t)==0?!this.isStart(e,t):!1},e.prototype.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:+(t>this.end.column):e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var r={row:n+1,column:0};else if(this.end.row<t)var r={row:t,column:0};if(this.start.row>n)var i={row:n+1,column:0};else if(this.start.row<t)var i={row:t,column:0};return e.fromPoints(i||this.start,r||this.end)},e.prototype.extend=function(t,n){var r=this.compare(t,n);if(r==0)return this;if(r==-1)var i={row:t,column:n};else var a={row:t,column:n};return e.fromPoints(i||this.start,a||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return this.end.column==0?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),r=t.documentToScreenPosition(this.end);return new e(n.row,n.column,r.row,r.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},r.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=r}),ace.define(`ace/lib/keys`,[`require`,`exports`,`module`,`ace/lib/oop`],function(e,t,n){for(var r=e("./oop"),i={MODIFIER_KEYS:{16:`Shift`,17:`Ctrl`,18:`Alt`,224:`Meta`,91:`MetaLeft`,92:`MetaRight`,93:`ContextMenu`},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:`Backspace`,9:`Tab`,13:`Return`,19:`Pause`,27:`Esc`,32:`Space`,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`Left`,38:`Up`,39:`Right`,40:`Down`,44:`Print`,45:`Insert`,46:`Delete`,"-13":`NumpadEnter`,144:`Numlock`,145:`Scrolllock`},PRINTABLE_KEYS:{32:` `,59:`;`,61:`=`,107:`+`,109:`-`,110:`.`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`,111:`/`,106:`*`}},a={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},o=0;o<10;o++)a[`Digit`+o]=48+o,a[`Numpad`+o]=96+o,i.PRINTABLE_KEYS[48+o]=``+o,i.FUNCTION_KEYS[96+o]=`Numpad`+o;for(var o=65;o<91;o++){var s=String.fromCharCode(o+32);a[`Key`+s.toUpperCase()]=o,i.PRINTABLE_KEYS[o]=s}for(var o=1;o<13;o++)a[`F`+o]=111+o,i.FUNCTION_KEYS[111+o]=`F`+o;var c={Shift:16,Control:17,Alt:18,Meta:224};for(var l in c)a[l]=a[l+`Left`]=a[l+`Right`]=c[l];for(var u in t.$codeToKeyCode=a,i.PRINTABLE_KEYS[173]=`-`,i.FUNCTION_KEYS){var d=i.FUNCTION_KEYS[u].toLowerCase();i[d]=parseInt(u,10)}for(var u in i.PRINTABLE_KEYS){var d=i.PRINTABLE_KEYS[u].toLowerCase();i[d]=parseInt(u,10)}r.mixin(i,i.MODIFIER_KEYS),r.mixin(i,i.PRINTABLE_KEYS),r.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,(function(){for(var e=[`cmd`,`ctrl`,`alt`,`shift`],t=2**e.length;t--;)i.KEY_MODS[t]=e.filter(function(e){return t&i.KEY_MODS[e]}).join(`-`)+`-`})(),i.KEY_MODS[0]=``,i.KEY_MODS[-1]=`input-`,r.mixin(t,i),t.default=t,t.keyCodeToString=function(e){var t=i[e];return typeof t!=`string`&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define(`ace/lib/event`,[`require`,`exports`,`module`,`ace/lib/keys`,`ace/lib/useragent`],function(e,t,n){var r=e("./keys"),i=e("./useragent"),a=null,o=0,s;function c(){s=!1;try{document.createComment(``).addEventListener(`test`,function(){},{get passive(){return s={passive:!1},!0}})}catch{}}function l(){return s??c(),s}function u(e,t,n){this.elem=e,this.type=t,this.callback=n}u.prototype.destroy=function(){f(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var d=t.addListener=function(e,t,n,r){e.addEventListener(t,n,l()),r&&r.$toDestroy.push(new u(e,t,n))},f=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return e.type==`dblclick`?0:e.type==`contextmenu`||i.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var r=e&&e.ownerDocument||document;function i(e){t&&t(e),n&&n(e),f(r,`mousemove`,t),f(r,`mouseup`,i),f(r,`dragstart`,i)}return d(r,`mousemove`,t),d(r,`mouseup`,i),d(r,`dragstart`,i),i},t.addMouseWheelListener=function(e,t,n){d(e,`wheel`,function(e){var n=.15,r=e.deltaX||0,i=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=r*n,e.wheelY=i*n;break;case e.DOM_DELTA_LINE:var a=15;e.wheelX=r*a,e.wheelY=i*a;break;case e.DOM_DELTA_PAGE:var o=150;e.wheelX=r*o,e.wheelY=i*o;break}t(e)},n)},t.addMultiMouseDownListener=function(e,n,r,a,o){var s=0,c,l,u,f={2:`dblclick`,3:`tripleclick`,4:`quadclick`};function p(e){if(t.getButton(e)===0?e.detail>1?(s++,s>4&&(s=1)):s=1:s=0,i.isIE){var o=Math.abs(e.clientX-c)>5||Math.abs(e.clientY-l)>5;(!u||o)&&(s=1),u&&clearTimeout(u),u=setTimeout(function(){u=null},n[s-1]||600),s==1&&(c=e.clientX,l=e.clientY)}if(e._clicks=s,r[a](`mousedown`,e),s>4)s=0;else if(s>1)return r[a](f[s],e)}Array.isArray(e)||(e=[e]),e.forEach(function(e){d(e,`mousedown`,p,o)})};function p(e){return 0|!!e.ctrlKey|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}t.getModifierString=function(e){return r.KEY_MODS[p(e)]};function m(e,t,n){var s=p(t);if(!n&&t.code&&(n=r.$codeToKeyCode[t.code]||n),!i.isMac&&a){if(t.getModifierState&&(t.getModifierState(`OS`)||t.getModifierState(`Win`))&&(s|=8),a.altGr)if((3&s)!=3)a.altGr=0;else return;if(n===18||n===17){var c=t.location;n===17&&c===1?a[n]==1&&(o=t.timeStamp):n===18&&s===3&&c===2&&t.timeStamp-o<50&&(a.altGr=!0)}}if(n in r.MODIFIER_KEYS&&(n=-1),!(!s&&n===13&&t.location===3&&(e(t,s,-n),t.defaultPrevented))){if(i.isChromeOS&&s&8){if(e(t,s,n),t.defaultPrevented)return;s&=-9}return!s&&!(n in r.FUNCTION_KEYS)&&!(n in r.PRINTABLE_KEYS)?!1:e(t,s,n)}}t.addCommandKeyListener=function(e,n,r){var i=null;d(e,`keydown`,function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=m(n,e,e.keyCode);return i=e.defaultPrevented,t},r),d(e,`keypress`,function(e){i&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),i=null)},r),d(e,`keyup`,function(e){a[e.keyCode]=null},r),a||(h(),d(window,`focus`,h))};function h(){a=Object.create(null)}if(typeof window==`object`&&window.postMessage&&!i.isOldIE){var g=1;t.nextTick=function(e,n){n||=window;var r=`zero-timeout-message-`+g++,i=function(a){a.data==r&&(t.stopPropagation(a),f(n,`message`,i),e())};d(n,`message`,i),n.postMessage(r,`*`)}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout(function n(){t.$idleBlocked?setTimeout(n,100):e()},n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout(function(){t.$idleBlocked=!1},e||100)},t.nextFrame=typeof window==`object`&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define(`ace/clipboard`,[`require`,`exports`,`module`],function(e,t,n){var r;n.exports={lineMode:!1,pasteCancelled:function(){return r&&r>Date.now()-50?!0:r=!1},cancel:function(){r=Date.now()}}}),ace.define(`ace/keyboard/textinput`,[`require`,`exports`,`module`,`ace/lib/event`,`ace/config`,`ace/lib/useragent`,`ace/lib/dom`,`ace/lib/lang`,`ace/clipboard`,`ace/lib/keys`],function(e,t,n){var r=e("../lib/event"),i=e("../config").nls,a=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),c=e("../clipboard"),l=a.isChrome<18,u=a.isIE,d=a.isChrome>63,f=400,p=e("../lib/keys"),m=p.KEY_MODS,h=a.isIOS,g=h?/\s/:/\n/,_=a.isMobile;t.TextInput=function(){function e(e,t){var n=this;this.host=t,this.text=o.createElement(`textarea`),this.text.className=`ace_text-input`,this.text.setAttribute(`wrap`,`off`),this.text.setAttribute(`autocomplete`,`off`),this.text.setAttribute(`autocorrect`,`off`),this.text.setAttribute(`autocapitalize`,`off`),this.text.setAttribute(`spellcheck`,`false`),this.text.style.opacity=`0`,e.insertBefore(this.text,e.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle=``,_||(this.text.style.fontSize=`1px`),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue=``,this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=2**53-1,this.rowEnd=-(2**53-1),this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:`textbox`}),r.addListener(this.text,`blur`,function(e){n.ignoreFocusEvents||(t.onBlur(e),n.$isFocused=!1)},t),r.addListener(this.text,`focus`,function(e){if(!n.ignoreFocusEvents){if(n.$isFocused=!0,a.isEdge)try{if(!document.hasFocus())return}catch{}t.onFocus(e),a.isEdge?setTimeout(n.resetSelection.bind(n)):n.resetSelection()}},t),this.$focusScroll=!1,t.on(`beforeEndOperation`,function(){var e=t.curOp,r=e&&e.command&&e.command.name;if(r!=`insertstring`){var i=r&&(e.docChanged||e.selectionChanged);n.inComposition&&i&&(n.lastValue=n.text.value=``,n.onCompositionEnd()),n.resetSelection()}}),t.on(`changeSelection`,this.setAriaLabel.bind(this)),this.resetSelection=h?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&t.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,r.addCommandKeyListener(this.text,function(e,r,i){if(!n.inComposition)return t.onCommandKey(e,r,i)},t),r.addListener(this.text,`select`,this.onSelect.bind(this),t),r.addListener(this.text,`input`,this.onInput.bind(this),t),r.addListener(this.text,`cut`,this.onCut.bind(this),t),r.addListener(this.text,`copy`,this.onCopy.bind(this),t),r.addListener(this.text,`paste`,this.onPaste.bind(this),t),(!(`oncut`in this.text)||!(`oncopy`in this.text)||!(`onpaste`in this.text))&&r.addListener(e,`keydown`,function(e){if(!(a.isMac&&!e.metaKey||!e.ctrlKey))switch(e.keyCode){case 67:n.onCopy(e);break;case 86:n.onPaste(e);break;case 88:n.onCut(e);break}},t),this.syncComposition=s.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),r.addListener(this.text,`compositionstart`,this.onCompositionStart.bind(this),t),r.addListener(this.text,`compositionupdate`,this.onCompositionUpdate.bind(this),t),r.addListener(this.text,`keyup`,this.onKeyup.bind(this),t),r.addListener(this.text,`keydown`,this.syncComposition.bind(this),t),r.addListener(this.text,`compositionend`,this.onCompositionEnd.bind(this),t),this.closeTimeout,r.addListener(this.text,`mouseup`,this.$onContextMenu.bind(this),t),r.addListener(this.text,`mousedown`,function(e){e.preventDefault(),n.onContextMenuClose()},t),r.addListener(t.renderer.scroller,`contextmenu`,this.$onContextMenu.bind(this),t),r.addListener(this.text,`contextmenu`,this.$onContextMenu.bind(this),t),h&&this.addIosSelectionHandler(e,t,this.text)}return e.prototype.addIosSelectionHandler=function(e,t,n){var r=this,i=null,a=!1;n.addEventListener(`keydown`,function(e){i&&clearTimeout(i),a=!0},!0),n.addEventListener(`keyup`,function(e){i=setTimeout(function(){a=!1},100)},!0);var o=function(e){if(document.activeElement===n&&!(a||r.inComposition||t.$mouseHandler.isMousePressed)&&!r.copied){var i=n.selectionStart,o=n.selectionEnd,s=null,c=0;if(i==0?s=p.up:i==1?s=p.home:o>r.lastSelectionEnd&&r.lastValue[o]==`
161
161
  `?s=p.end:i<r.lastSelectionStart&&r.lastValue[i-1]==` `?(s=p.left,c=m.option):i<r.lastSelectionStart||i==r.lastSelectionStart&&r.lastSelectionEnd!=r.lastSelectionStart&&i==o?s=p.left:o>r.lastSelectionEnd&&r.lastValue.slice(0,o).split(`
162
162
  `).length>2?s=p.down:o>r.lastSelectionEnd&&r.lastValue[o-1]==` `?(s=p.right,c=m.option):(o>r.lastSelectionEnd||o==r.lastSelectionEnd&&r.lastSelectionEnd!=r.lastSelectionStart&&i==o)&&(s=p.right),i!==o&&(c|=m.shift),s){if(!t.onCommandKey({},c,s)&&t.commands){s=p.keyCodeToString(s);var l=t.commands.findKeyCommand(c,s);l&&t.execCommand(l)}r.lastSelectionStart=i,r.lastSelectionEnd=o,r.resetSelection(``)}}};document.addEventListener(`selectionchange`,o),t.on(`destroy`,function(){document.removeEventListener(`selectionchange`,o)})},e.prototype.onContextMenuClose=function(){var e=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){e.tempStyle&&=(e.text.style.cssText=e.tempStyle,``),e.host.renderer.$isMousePressed=!1,e.host.renderer.$keepTextAreaAtCursor&&e.host.renderer.$moveTextAreaToCursor()},0)},e.prototype.$onContextMenu=function(e){this.host.textInput.onContextMenu(e),this.onContextMenuClose()},e.prototype.onKeyup=function(e){e.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},e.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},e.prototype.onCompositionStart=function(e){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){e.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal(`compositionStart`),this.host.on(`mousedown`,this.cancelComposition);var t=this.host.getSelectionRange();t.end.row=t.start.row,t.end.column=t.start.column,this.inComposition.markerRange=t,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value=``,this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},e.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var e=this.text.value;this.sendText(e),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},e.prototype.onCompositionEnd=function(e){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off(`mousedown`,this.cancelComposition),e&&this.onInput())},e.prototype.onCut=function(e){this.doCopy(e,!0)},e.prototype.onCopy=function(e){this.doCopy(e,!1)},e.prototype.onPaste=function(e){var t=this.handleClipboardData(e);c.pasteCancelled()||(typeof t==`string`?(t&&this.host.onPaste(t,e),a.isIE&&setTimeout(this.resetSelection),r.preventDefault(e)):(this.text.value=``,this.pasted=!0))},e.prototype.doCopy=function(e,t){var n=this,i=this.host.getCopyText();if(!i)return r.preventDefault(e);this.handleClipboardData(e,i)?(h&&(this.resetSelection(i),this.copied=i,setTimeout(function(){n.copied=!1},10)),t?this.host.onCut():this.host.onCopy(),r.preventDefault(e)):(this.copied=!0,this.text.value=i,this.text.select(),setTimeout(function(){n.copied=!1,n.resetSelection(),t?n.host.onCut():n.host.onCopy()}))},e.prototype.handleClipboardData=function(e,t,n){var r=e.clipboardData||window.clipboardData;if(!(!r||l)){var i=u||n?`Text`:`text/plain`;try{return t?r.setData(i,t)!==!1:r.getData(i)}catch(e){if(!n)return this.handleClipboardData(e,t,!0)}}},e.prototype.onInput=function(e){if(this.inComposition)return this.onCompositionUpdate();if(e&&e.inputType){if(e.inputType==`historyUndo`)return this.host.execCommand(`undo`);if(e.inputType==`historyRedo`)return this.host.execCommand(`redo`)}var t=this.text.value,n=this.sendText(t,!0);(t.length>f+100||g.test(n)||_&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},e.prototype.sendText=function(e,t){if(this.afterContextMenu&&=!1,this.pasted)return this.resetSelection(),e&&this.host.onPaste(e),this.pasted=!1,``;for(var n=this.text.selectionStart,r=this.text.selectionEnd,i=this.lastSelectionStart,o=this.lastValue.length-this.lastSelectionEnd,s=e,c=e.length-n,l=e.length-r,u=0;i>0&&this.lastValue[u]==e[u];)u++,i--;for(s=s.slice(u),u=1;o>0&&this.lastValue.length-u>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-u]==e[e.length-u];)u++,o--;c-=u-1,l-=u-1;var d=s.length-u+1;if(d<0&&(i=-d,d=0),s=s.slice(0,d),!t&&!s&&!c&&!i&&!o&&!l)return``;this.sendingText=!0;var f=!1;return a.isAndroid&&s==`. `&&(s=` `,f=!0),s&&!i&&!o&&!c&&!l||this.commandMode?this.host.onTextInput(s):this.host.onTextInput(s,{extendLeft:i,extendRight:o,restoreStart:c,restoreEnd:l}),this.sendingText=!1,this.lastValue=e,this.lastSelectionStart=n,this.lastSelectionEnd=r,this.lastRestoreEnd=l,f?`
163
163
  `:s},e.prototype.onSelect=function(e){var t=this;this.inComposition||(this.copied?this.copied=!1:function(e){return e.selectionStart===0&&e.selectionEnd>=t.lastValue.length&&e.value===t.lastValue&&t.lastValue&&e.selectionEnd!==t.lastSelectionEnd}(this.text)?(this.host.selectAll(),this.resetSelection()):_&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection())},e.prototype.$resetSelectionIOS=function(e){if(!(!this.$isFocused||this.copied&&!e||this.sendingText)){e||=``;var t=`
@@ -187,7 +187,7 @@ import{t as e}from"./rolldown-runtime-CMxvf4Kt.js";var t=e(((e,t)=>{(function(){
187
187
  `+l(this.$redoStack)},e}();r.prototype.hasUndo=r.prototype.canUndo,r.prototype.hasRedo=r.prototype.canRedo,r.prototype.isClean=r.prototype.isAtBookmark,r.prototype.markClean=r.prototype.bookmark;function i(e,t){for(var n=t;n--;){var r=e[n];if(r&&!r[0].ignore){for(;n<t-1;){var i=f(e[n],e[n+1]);e[n]=i[0],e[n+1]=i[1],n++}return!0}}}var a=e("./range").Range,o=a.comparePoints;a.comparePoints;function s(e){return{row:e.row,column:e.column}}function c(e){return{start:s(e.start),end:s(e.end),action:e.action,lines:e.lines.slice()}}function l(e){if(e||=this,Array.isArray(e))return e.map(l).join(`
188
188
  `);var t=``;return e.action?(t=e.action==`insert`?`+`:`-`,t+=`[`+e.lines+`]`):e.value&&(t=Array.isArray(e.value)?e.value.map(u).join(`
189
189
  `):u(e.value)),e.start&&(t+=u(e)),(e.id||e.rev)&&(t+=` (`+(e.id||e.rev)+`)`),t}function u(e){return e.start.row+`:`+e.start.column+`=>`+e.end.row+`:`+e.end.column}function d(e,t){var n=e.action==`insert`,r=t.action==`insert`;if(n&&r)if(o(t.start,e.end)>=0)m(t,e,-1);else if(o(t.start,e.start)<=0)m(e,t,1);else return null;else if(n&&!r)if(o(t.start,e.end)>=0)m(t,e,-1);else if(o(t.end,e.start)<=0)m(e,t,-1);else return null;else if(!n&&r)if(o(t.start,e.start)>=0)m(t,e,1);else if(o(t.start,e.start)<=0)m(e,t,1);else return null;else if(!n&&!r)if(o(t.start,e.start)>=0)m(t,e,1);else if(o(t.end,e.start)<=0)m(e,t,-1);else return null;return[t,e]}function f(e,t){for(var n=e.length;n--;)for(var r=0;r<t.length;r++)if(!d(e[n],t[r])){for(;n<e.length;){for(;r--;)d(t[r],e[n]);r=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}function p(e,t){var n=e.action==`insert`,r=t.action==`insert`;if(n&&r)o(e.start,t.start)<0?m(t,e,1):m(e,t,1);else if(n&&!r)o(e.start,t.end)>=0?m(e,t,-1):(o(e.start,t.start)<=0||m(e,a.fromPoints(t.start,e.start),-1),m(t,e,1));else if(!n&&r)o(t.start,e.end)>=0?m(t,e,-1):(o(t.start,e.start)<=0||m(t,a.fromPoints(e.start,t.start),-1),m(e,t,1));else if(!n&&!r)if(o(t.start,e.end)>=0)m(t,e,-1);else if(o(t.end,e.start)<=0)m(e,t,-1);else{var i,s;return o(e.start,t.start)<0&&(i=e,e=g(e,t.start)),o(e.end,t.end)>0&&(s=g(e,t.end)),h(t.end,e.start,e.end,-1),s&&!i&&(e.lines=s.lines,e.start=s.start,e.end=s.end,s=e),[t,i,s].filter(Boolean)}return[t,e]}function m(e,t,n){h(e.start,t.start,t.end,n),h(e.end,t.start,t.end,n)}function h(e,t,n,r){e.row==(r==1?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function g(e,t){var n=e.lines,r=e.end;e.end=s(t);var i=e.end.row-e.start.row,a=n.splice(i,n.length),o=i?t.column:t.column-e.start.column;return n.push(a[0].substring(0,o)),a[0]=a[0].substr(o),{start:s(t),end:r,lines:a,action:e.action}}function _(e,t){t=c(t);for(var n=e.length;n--;){for(var r=e[n],i=0;i<r.length;i++){var a=r[i],o=p(a,t);t=o[0],o.length!=2&&(o[2]?(r.splice(i+1,1,o[1],o[2]),i++):o[1]||(r.splice(i,1),i--))}r.length||e.splice(n,1)}return e}function v(e,t){for(var n=0;n<t.length;n++)for(var r=t[n],i=0;i<r.length;i++)_(e,r[i])}t.UndoManager=r}),ace.define(`ace/edit_session/fold_line`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e("../range").Range;t.FoldLine=function(){function e(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}return e.prototype.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},e.prototype.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw Error(`Can't add a fold to this FoldLine as it has no connection`);this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else if(e.end.row==this.start.row)this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column;else throw Error(`Trying to add fold to FoldRow that doesn't have a matching row`);e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,n){var r=0,i=this.folds,a,o,s,c=!0;t??(t=this.end.row,n=this.end.column);for(var l=0;l<i.length;l++){if(a=i[l],o=a.range.compareStart(t,n),o==-1){e(null,t,n,r,c);return}if(s=e(null,a.start.row,a.start.column,r,c),s=!s&&e(a.placeholder,a.start.row,a.start.column,r),s||o===0)return;c=!a.sameRow,r=a.end.column}e(null,t,n,r,c)},e.prototype.getNextFoldTo=function(e,t){for(var n,r,i=0;i<this.folds.length;i++){if(n=this.folds[i],r=n.range.compareEnd(e,t),r==-1)return{fold:n,kind:`after`};if(r===0)return{fold:n,kind:`inside`}}return null},e.prototype.addRemoveChars=function(e,t,n){var r=this.getNextFoldTo(e,t),i,a;if(r){if(i=r.fold,r.kind==`inside`&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){a=this.folds;var o=a.indexOf(i);for(o===0&&(this.start.column+=n);o<a.length;o++){if(i=a[o],i.start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}}},e.prototype.split=function(t,n){var r=this.getNextFoldTo(t,n);if(!r||r.kind==`inside`)return null;var i=r.fold,a=this.folds,o=this.foldData,s=a.indexOf(i),c=a[s-1];this.end.row=c.end.row,this.end.column=c.end.column,a=a.splice(s,a.length-s);var l=new e(o,a);return o.splice(o.indexOf(this)+1,0,l),l},e.prototype.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},e.prototype.toString=function(){var e=[this.range.toString()+`: [`];return this.folds.forEach(function(t){e.push(` `+t.toString())}),e.push(`]`),e.join(`
190
- `)},e.prototype.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var r=this.folds[n];if(e-=r.start.column-t,e<0)return{row:r.start.row,column:r.start.column+e};if(e-=r.placeholder.length,e<0)return r.start;t=r.end.column}return{row:this.end.row,column:this.end.column+e}},e}()}),ace.define(`ace/range_list`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e("./range").Range.comparePoints,i=function(){function e(){this.ranges=[],this.$bias=1}return e.prototype.pointIndex=function(e,t,n){for(var i=this.ranges,a=n||0;a<i.length;a++){var o=i[a],s=r(e,o.end);if(!(s>0)){var c=r(e,o.start);return s===0?t&&c!==0?-a-2:a:c>0||c===0&&!t?a:-a-1}}return-a-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},e.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return r(e.start,t.start)});for(var n=t[0],i,a=1;a<t.length;a++){i=n,n=t[a];var o=r(i.end,n.start);o<0||o==0&&!i.isEmpty()&&!n.isEmpty()||(r(i.end,n.end)<0&&(i.end.row=n.end.row,i.end.column=n.end.column),t.splice(a,1),e.push(n),n=i,a--)}return this.ranges=t,e},e.prototype.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);for(var a=[],o=r;o<i;o++)a.push(n[o]);return a},e.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},e.prototype.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on(`change`,this.onChange)},e.prototype.detach=function(){this.session&&=(this.session.removeListener(`change`,this.onChange),null)},e.prototype.$onChange=function(e){for(var t=e.start,n=e.end,r=t.row,i=n.row,a=this.ranges,o=0,s=a.length;o<s;o++){var c=a[o];if(c.end.row>=r)break}if(e.action==`insert`)for(var l=i-r,u=-t.column+n.column;o<s;o++){var c=a[o];if(c.start.row>r)break;if(c.start.row==r&&c.start.column>=t.column&&(c.start.column==t.column&&this.$bias<=0||(c.start.column+=u,c.start.row+=l)),c.end.row==r&&c.end.column>=t.column){if(c.end.column==t.column&&this.$bias<0)continue;c.end.column==t.column&&u>0&&o<s-1&&c.end.column>c.start.column&&c.end.column==a[o+1].start.column&&(c.end.column-=u),c.end.column+=u,c.end.row+=l}}else for(var l=r-i,u=t.column-n.column;o<s;o++){var c=a[o];if(c.start.row>i)break;c.end.row<i&&(r<c.end.row||r==c.end.row&&t.column<c.end.column)?(c.end.row=r,c.end.column=t.column):c.end.row==i?c.end.column<=n.column?(l||c.end.column>t.column)&&(c.end.column=t.column,c.end.row=t.row):(c.end.column+=u,c.end.row+=l):c.end.row>i&&(c.end.row+=l),c.start.row<i&&(r<c.start.row||r==c.start.row&&t.column<c.start.column)?(c.start.row=r,c.start.column=t.column):c.start.row==i?c.start.column<=n.column?(l||c.start.column>t.column)&&(c.start.column=t.column,c.start.row=t.row):(c.start.column+=u,c.start.row+=l):c.start.row>i&&(c.start.row+=l)}if(l!=0&&o<s)for(;o<s;o++){var c=a[o];c.start.row+=l,c.end.row+=l}},e}();i.prototype.comparePoints=r,t.RangeList=i}),ace.define(`ace/edit_session/fold`,[`require`,`exports`,`module`,`ace/range_list`],function(e,t,n){var r=this&&this.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=function(e){r(t,e);function t(t,n){var r=e.call(this)||this;return r.foldLine=null,r.placeholder=n,r.range=t,r.start=t.start,r.end=t.end,r.sameRow=t.start.row==t.end.row,r.subFolds=r.ranges=[],r}return t.prototype.toString=function(){return`"`+this.placeholder+`" `+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},t.prototype.clone=function(){var e=new t(this.range.clone(),this.placeholder);return this.subFolds.forEach(function(t){e.subFolds.push(t.clone())}),e.collapseChildren=this.collapseChildren,e},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){o(e,this.start);for(var t=e.start.row,n=e.start.column,r=0,i=-1;r<this.subFolds.length&&(i=this.subFolds[r].range.compare(t,n),i==1);r++);var a=this.subFolds[r],s=0;if(i==0){if(a.range.containsRange(e))return a.addSubFold(e);s=1}for(var t=e.range.end.row,n=e.range.end.column,c=r,i=-1;c<this.subFolds.length&&(i=this.subFolds[c].range.compare(t,n),i==1);c++);i==0&&c++;for(var l=this.subFolds.splice(r,c-r,e),u=i==0?l.length-1:l.length,d=s;d<u;d++)e.addSubFold(l[d]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return c(e,this.start)},t}(e("../range_list").RangeList);function a(e,t){e.row-=t.row,e.row==0&&(e.column-=t.column)}function o(e,t){a(e.start,t),a(e.end,t)}function s(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row}function c(e,t){s(e.start,t),s(e.end,t)}t.Fold=i}),ace.define(`ace/edit_session/folding`,[`require`,`exports`,`module`,`ace/range`,`ace/edit_session/fold_line`,`ace/edit_session/fold`,`ace/token_iterator`,`ace/mouse/mouse_event`],function(e,t,n){var r=e("../range").Range,i=e("./fold_line").FoldLine,a=e("./fold").Fold,o=e("../token_iterator").TokenIterator,s=e("../mouse/mouse_event").MouseEvent;function c(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;for(var i=r.folds,a=0;a<i.length;a++){var o=i[a].range;if(o.contains(e,t)){if(n==1&&o.isEnd(e,t)&&!o.isEmpty()||n==-1&&o.isStart(e,t)&&!o.isEmpty())continue;return i[a]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,--n.column;for(var a=0;a<r.length;a++){var o=r[a].range.compareRange(e);if(o!=2){if(o==-2)break;for(var s=r[a].folds,c=0;c<s.length;c++){var l=s[c];if(o=l.range.compareRange(e),o==-2)break;if(o!=2){if(o==42)break;i.push(l)}}}}return--t.column,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else var t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var r=0;r<t[n].folds.length;r++)e.push(t[n].folds[r]);return e},this.getFoldStringAt=function(e,t,n,r){if(r||=this.getFoldLine(e),!r)return null;for(var i={end:{column:0}},a,o,s=0;s<r.folds.length;s++){o=r.folds[s];var c=o.range.compareEnd(e,t);if(c==-1){a=this.getLine(o.start.row).substring(i.end.column,o.start.column);break}else if(c===0)return null;i=o}return a||=this.getLine(o.start.row).substring(i.end.column),n==-1?a.substring(0,t-i.end.column):n==1?a.substring(t-i.end.column):a},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),r==-1&&(r=0);r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),r==-1&&(r=0);r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i<n.length;i++){var a=n[i],o=a.end.row,s=a.start.row;if(o>=t){s<t&&(s>=e?r-=t-s:r=0);break}else o>=e&&(s>=e?r-=o-s:r-=o-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n=this.$foldData,r=!1,o;e instanceof a?o=e:(o=new a(t,e),o.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(o.range);var s=o.start.row,c=o.start.column,l=o.end.row,u=o.end.column,d=this.getFoldAt(s,c,1),f=this.getFoldAt(l,u,-1);if(d&&f==d)return d.addSubFold(o);d&&!d.range.isStart(s,c)&&this.removeFold(d),f&&!f.range.isEnd(l,u)&&this.removeFold(f);var p=this.getFoldsInRange(o.range);p.length>0&&(this.removeFolds(p),o.collapseChildren||p.forEach(function(e){o.addSubFold(e)}));for(var m=0;m<n.length;m++){var h=n[m];if(l==h.start.row){h.addFold(o),r=!0;break}else if(s==h.end.row){if(h.addFold(o),r=!0,!o.sameRow){var g=n[m+1];if(g&&g.start.row==l){h.merge(g);break}}break}else if(l<=h.start.row)break}return r||(h=this.$addFoldLine(new i(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(h.start.row,h.start.row):this.$updateRowLengthCache(h.start.row,h.start.row),this.$modified=!0,this._signal(`changeFold`,{data:o,action:`add`}),o},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,a=t.folds;if(a.length==1)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))a.pop(),t.end.row=a[a.length-1].end.row,t.end.column=a[a.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))a.shift(),t.start.row=a[0].start.row,t.start.column=a[0].start.column;else if(e.sameRow)a.splice(a.indexOf(e),1);else{var o=t.split(e.start.row,e.start.column);a=o.folds,a.shift(),o.start.row=a[0].start.row,o.start.column=a[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),this.$modified=!0,this._signal(`changeFold`,{data:e,action:`remove`})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;if(e==null)n=new r(0,0,this.getLength(),0),t??=!0;else if(typeof e==`number`)n=new r(e,0,e,this.getLine(e).length);else if(`row`in e)n=r.fromPoints(e,e);else if(Array.isArray(e))return i=[],e.forEach(function(e){i=i.concat(this.unfold(e))},this),i;else n=e;i=this.getFoldsInRangeList(n);for(var a=i;i.length==1&&r.comparePoints(i[0].start,n.start)<0&&r.comparePoints(i[0].end,n.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(n);if(t==0?this.expandFolds(i):this.removeFolds(i),a.length)return a},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){r??=e.start.row,i??=0,t??=e.end.row,n??=this.getLine(t).length;var a=this.doc,o=``;return e.walk(function(e,t,n,s){if(!(t<r)){if(t==r){if(n<i)return;s=Math.max(i,s)}e==null?o+=a.getLine(t).substring(s,n):o+=e}},t,n),o},this.getDisplayLine=function(e,t,n,r){var i=this.getFoldLine(e);if(i)return this.getFoldDisplayLine(i,e,t,n,r);var a=this.doc.getLine(e);return a.substring(r||0,t||a.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new i(e,n)}),e},this.toggleFold=function(e){var t=this.selection.getRange(),n,r;if(t.isEmpty()){var i=t.start;if(n=this.getFoldAt(i.row,i.column),n){this.expandFold(n);return}else if(e){var a=this.getFoldLine(i.row);a&&this.expandFolds(a.folds);return}else (r=this.findMatchingBracket(i))?t.comparePoint(r)==1?t.end=r:(t.start=r,t.start.column++,t.end.column--):(r=this.findMatchingBracket({row:i.row,column:i.column+1}))?(t.comparePoint(r)==1?t.end=r:t.start=r,t.start.column++):t=this.getCommentFoldRange(i.row,i.column)||t}else{var o=this.getFoldsInRange(t);if(e&&o.length){this.expandFolds(o);return}else o.length==1&&(n=o[0])}if(n||=this.getFoldAt(t.start.row,t.start.column),n&&n.range.toString()==t.toString()){this.expandFold(n);return}var s=`...`;if(!t.isMultiLine()){if(s=this.getTextRange(t),s.length<4)return;s=s.trim().substring(0,2)+`..`}this.addFold(s,t)},this.getCommentFoldRange=function(e,t,n){var i=new o(this,e,t),a=i.getCurrentToken(),s=a&&a.type;if(a&&/^comment|string/.test(s)){s=s.match(/comment|string/)[0],s==`comment`&&(s+=`|doc-start|\\.doc`);var c=new RegExp(s),l=new r;if(n!=1){do a=i.stepBackward();while(a&&c.test(a.type));a=i.stepForward()}l.start.row=i.getCurrentTokenRow(),l.start.column=i.getCurrentTokenColumn()+a.value.length,i=new o(this,e,t);var u=this.getState(i.$row);if(n!=-1){var d=-1;do if(a=i.stepForward(),d==-1){var f=this.getState(i.$row);u.toString()!==f.toString()&&(d=i.$row)}else if(i.$row>d)break;while(a&&c.test(a.type));a=i.stepBackward()}else a=i.getCurrentToken();return l.end.row=i.getCurrentTokenRow(),l.end.column=i.getCurrentTokenColumn(),l.start.row==l.end.row&&l.start.column>l.end.column?void 0:l}},this.foldAll=function(e,t,n,r){n??=1e5;var i=this.foldWidgets;if(i){t||=this.getLength(),e||=0;for(var a=e;a<t;a++)if(i[a]??(i[a]=this.getFoldWidget(a)),i[a]==`start`&&!(r&&!r(a))){var o=this.getFoldWidgetRange(a);o&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e&&(a=o.end.row,o.collapseChildren=n,this.addFold(`...`,o))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,function(t){for(var n=e.getTokens(t),r=0;r<n.length;r++){var i=n[r];if(!(i.type==`text`&&/^\s+$/.test(i.value)))return!!/comment/.test(i.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle=`markbegin`,this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw Error(`invalid fold style: `+e+`[`+Object.keys(this.$foldStyles).join(`, `)+`]`);if(this.$foldStyle!=e){this.$foldStyle=e,e==`manual`&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){if(this.$foldMode!=e){if(this.$foldMode=e,this.off(`change`,this.$updateFoldWidgets),this.off(`tokenizerUpdate`,this.$tokenizerUpdateFoldWidgets),this._signal(`changeAnnotation`),!e||this.$foldStyle==`manual`){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on(`change`,this.$updateFoldWidgets),this.on(`tokenizerUpdate`,this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var r=e-1,i;r>=0;){var a=n[r];if(a??=n[r]=this.getFoldWidget(r),a==`start`){var o=this.getFoldWidgetRange(r);if(i||=o,o&&o.end.row>=e)break}r--}return{range:r!==-1&&o,firstRange:i}},this.onFoldWidgetClick=function(e,t){t instanceof s&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=` ace_invalid`)}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i=n===`end`?-1:1,a=this.getFoldAt(e,i===-1?0:r.length,i);if(a)return t.children||t.all?this.removeFold(a):this.expandFold(a),a;var o=this.getFoldWidgetRange(e,!0);if(o&&!o.isMultiLine()&&(a=this.getFoldAt(o.start.row,o.start.column,1),a&&o.isEqual(a.range)))return this.removeFold(a),a;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var c=s.range.start.row+1,l=s.range.end.row;this.foldAll(c,l,t.all?1e4:0)}else t.children?(l=o?o.end.row:this.getLength(),this.foldAll(e+1,l,t.all?1e4:0)):o&&(t.all&&(o.collapseChildren=1e4),this.addFold(`...`,o));return o}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange,n){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold(`...`,n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(n===0)this.foldWidgets[t]=null;else if(e.action==`remove`)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}t.Folding=c}),ace.define(`ace/edit_session/bracket_match`,[`require`,`exports`,`module`,`ace/token_iterator`,`ace/range`],function(e,t,n){var r=e("../token_iterator").TokenIterator,i=e("../range").Range;function a(){this.findMatchingBracket=function(e,t){if(e.column==0)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(n==``)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t=this.getLine(e.row),n=!0,r,a=t.charAt(e.column-1),o=a&&a.match(/([\(\[\{])|([\)\]\}])/);if(o||(a=t.charAt(e.column),e={row:e.row,column:e.column+1},o=a&&a.match(/([\(\[\{])|([\)\]\}])/),n=!1),!o)return null;if(o[1]){var s=this.$findClosingBracket(o[1],e);if(!s)return null;r=i.fromPoints(e,s),n||(r.end.column++,r.start.column--),r.cursor=r.end}else{var s=this.$findOpeningBracket(o[2],e);if(!s)return null;r=i.fromPoints(s,e),n||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),r=/([\(\[\{])|([\)\]\}])/,a=!t&&n.charAt(e.column-1),o=a&&a.match(r);if(o||=(a=(t===void 0||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},a&&a.match(r)),!o)return null;var s=new i(e.row,e.column-1,e.row,e.column),c=o[1]?this.$findClosingBracket(o[1],e):this.$findOpeningBracket(o[2],e);return c?[s,new i(c.row,c.column,c.row,c.column+1)]:[s]},this.$brackets={")":`(`,"(":`)`,"]":`[`,"[":`]`,"{":`}`,"}":`{`,"<":`>`,">":`<`},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],a=1,o=new r(this,t.row,t.column),s=o.getCurrentToken();if(s||=o.stepForward(),s){n||=RegExp(`(\\.?`+s.type.replace(`.`,`\\.`).replace(`rparen`,`.paren`).replace(/\b(?:end)\b/,`(?:start|begin|end)`).replace(/-close\b/,`-(close|open)`)+`)+`);for(var c=t.column-o.getCurrentTokenColumn()-2,l=s.value;;){for(;c>=0;){var u=l.charAt(c);if(u==i){if(--a,a==0)return{row:o.getCurrentTokenRow(),column:c+o.getCurrentTokenColumn()}}else u==e&&(a+=1);--c}do s=o.stepBackward();while(s&&!n.test(s.type));if(s==null)break;l=s.value,c=l.length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],a=1,o=new r(this,t.row,t.column),s=o.getCurrentToken();if(s||=o.stepForward(),s){n||=RegExp(`(\\.?`+s.type.replace(`.`,`\\.`).replace(`lparen`,`.paren`).replace(/\b(?:start|begin)\b/,`(?:start|begin|end)`).replace(/-open\b/,`-(close|open)`)+`)+`);for(var c=t.column-o.getCurrentTokenColumn();;){for(var l=s.value,u=l.length;c<u;){var d=l.charAt(c);if(d==i){if(--a,a==0)return{row:o.getCurrentTokenRow(),column:c+o.getCurrentTokenColumn()}}else d==e&&(a+=1);c+=1}do s=o.stepForward();while(s&&!n.test(s.type));if(s==null)break;c=0}return null}},this.getMatchingTags=function(e){var t=new r(this,e.row,e.column),n=this.$findTagName(t);if(n)return t.stepBackward().value===`<`?this.$findClosingTag(t,n):this.$findOpeningTag(t,n)},this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,r=!1;if(t&&t.type.indexOf(`tag-name`)===-1)do t=r?e.stepBackward():e.stepForward(),t&&(t.value===`/>`?r=!0:t.type.indexOf(`tag-name`)!==-1&&(n=!0));while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,r=t.value,a=t.value,o=0,s=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var c=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),l=!1;do{if(n=t,n.type.indexOf(`tag-close`)!==-1&&!l){var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);l=!0}if(t=e.stepForward(),t){if(t.value===`>`&&!l){var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);l=!0}if(t.type.indexOf(`tag-name`)!==-1){if(r=t.value,a===r){if(n.value===`<`)o++;else if(n.value===`</`&&(o--,o<0)){e.stepBackward();var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2);t=e.stepForward();var f=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(t.type.indexOf(`tag-close`)===-1&&(t=e.stepForward()),t&&t.value===`>`)var p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);else return}}}else if(a===r&&t.value===`/>`&&(o--,o<0))var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),f=d,p=f,u=new i(c.end.row,c.end.column,c.end.row,c.end.column+1)}}while(t&&o>=0);if(s&&u&&d&&p&&c&&f)return{openTag:new i(s.start.row,s.start.column,u.end.row,u.end.column),closeTag:new i(d.start.row,d.start.column,p.end.row,p.end.column),openTagName:c,closeTagName:f}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),r=t.value,a=0,o=e.getCurrentTokenRow(),s=e.getCurrentTokenColumn(),c=s+2,l=new i(o,s,o,c);e.stepForward();var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(t.type.indexOf(`tag-close`)===-1&&(t=e.stepForward()),!(!t||t.value!==`>`)){var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do if(t=n,o=e.getCurrentTokenRow(),s=e.getCurrentTokenColumn(),c=s+t.value.length,n=e.stepBackward(),t){if(t.type.indexOf(`tag-name`)!==-1){if(r===t.value)if(n.value===`<`){if(a++,a>0){var f=new i(o,s,o,c),p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do t=e.stepForward();while(t&&t.value!==`>`);var m=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else n.value===`</`&&a--}else if(t.value===`/>`){for(var h=0,g=n;g;){if(g.type.indexOf(`tag-name`)!==-1&&g.value===r){a--;break}else if(g.value===`<`)break;g=e.stepBackward(),h++}for(var _=0;_<h;_++)e.stepForward()}}while(n&&a<=0);if(p&&m&&l&&d&&f&&u)return{openTag:new i(p.start.row,p.start.column,m.end.row,m.end.column),closeTag:new i(l.start.row,l.start.column,d.end.row,d.end.column),openTagName:f,closeTagName:u}}}}t.BracketMatch=a}),ace.define(`ace/edit_session`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/lang`,`ace/bidihandler`,`ace/config`,`ace/lib/event_emitter`,`ace/selection`,`ace/mode/text`,`ace/range`,`ace/line_widgets`,`ace/document`,`ace/background_tokenizer`,`ace/search_highlight`,`ace/undomanager`,`ace/edit_session/folding`,`ace/edit_session/bracket_match`],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/lang"),a=e("./bidihandler").BidiHandler,o=e("./config"),s=e("./lib/event_emitter").EventEmitter,c=e("./selection").Selection,l=e("./mode/text").Mode,u=e("./range").Range,d=e("./line_widgets").LineWidgets,f=e("./document").Document,p=e("./background_tokenizer").BackgroundTokenizer,m=e("./search_highlight").SearchHighlight,h=e("./undomanager").UndoManager,g=function(){function e(t,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id=`session`+ ++e.$uid,this.$foldData.toString=function(){return this.join(`
190
+ `)},e.prototype.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var r=this.folds[n];if(e-=r.start.column-t,e<0)return{row:r.start.row,column:r.start.column+e};if(e-=r.placeholder.length,e<0)return r.start;t=r.end.column}return{row:this.end.row,column:this.end.column+e}},e}()}),ace.define(`ace/range_list`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e("./range").Range.comparePoints,i=function(){function e(){this.ranges=[],this.$bias=1}return e.prototype.pointIndex=function(e,t,n){for(var i=this.ranges,a=n||0;a<i.length;a++){var o=i[a],s=r(e,o.end);if(!(s>0)){var c=r(e,o.start);return s===0?t&&c!==0?-a-2:a:c>0||c===0&&!t?a:-a-1}}return-a-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},e.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return r(e.start,t.start)});for(var n=t[0],i,a=1;a<t.length;a++){i=n,n=t[a];var o=r(i.end,n.start);o<0||o==0&&!i.isEmpty()&&!n.isEmpty()||(r(i.end,n.end)<0&&(i.end.row=n.end.row,i.end.column=n.end.column),t.splice(a,1),e.push(n),n=i,a--)}return this.ranges=t,e},e.prototype.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);for(var a=[],o=r;o<i;o++)a.push(n[o]);return a},e.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},e.prototype.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on(`change`,this.onChange)},e.prototype.detach=function(){this.session&&=(this.session.removeListener(`change`,this.onChange),null)},e.prototype.$onChange=function(e){for(var t=e.start,n=e.end,r=t.row,i=n.row,a=this.ranges,o=0,s=a.length;o<s;o++){var c=a[o];if(c.end.row>=r)break}if(e.action==`insert`)for(var l=i-r,u=-t.column+n.column;o<s;o++){var c=a[o];if(c.start.row>r)break;if(c.start.row==r&&c.start.column>=t.column&&(c.start.column==t.column&&this.$bias<=0||(c.start.column+=u,c.start.row+=l)),c.end.row==r&&c.end.column>=t.column){if(c.end.column==t.column&&this.$bias<0)continue;c.end.column==t.column&&u>0&&o<s-1&&c.end.column>c.start.column&&c.end.column==a[o+1].start.column&&(c.end.column-=u),c.end.column+=u,c.end.row+=l}}else for(var l=r-i,u=t.column-n.column;o<s;o++){var c=a[o];if(c.start.row>i)break;c.end.row<i&&(r<c.end.row||r==c.end.row&&t.column<c.end.column)?(c.end.row=r,c.end.column=t.column):c.end.row==i?c.end.column<=n.column?(l||c.end.column>t.column)&&(c.end.column=t.column,c.end.row=t.row):(c.end.column+=u,c.end.row+=l):c.end.row>i&&(c.end.row+=l),c.start.row<i&&(r<c.start.row||r==c.start.row&&t.column<c.start.column)?(c.start.row=r,c.start.column=t.column):c.start.row==i?c.start.column<=n.column?(l||c.start.column>t.column)&&(c.start.column=t.column,c.start.row=t.row):(c.start.column+=u,c.start.row+=l):c.start.row>i&&(c.start.row+=l)}if(l!=0&&o<s)for(;o<s;o++){var c=a[o];c.start.row+=l,c.end.row+=l}},e}();i.prototype.comparePoints=r,t.RangeList=i}),ace.define(`ace/edit_session/fold`,[`require`,`exports`,`module`,`ace/range_list`],function(e,t,n){var r=this&&this.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=function(e){r(t,e);function t(t,n){var r=e.call(this)||this;return r.foldLine=null,r.placeholder=n,r.range=t,r.start=t.start,r.end=t.end,r.sameRow=t.start.row==t.end.row,r.subFolds=r.ranges=[],r}return t.prototype.toString=function(){return`"`+this.placeholder+`" `+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},t.prototype.clone=function(){var e=new t(this.range.clone(),this.placeholder);return this.subFolds.forEach(function(t){e.subFolds.push(t.clone())}),e.collapseChildren=this.collapseChildren,e},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){o(e,this.start);for(var t=e.start.row,n=e.start.column,r=0,i=-1;r<this.subFolds.length&&(i=this.subFolds[r].range.compare(t,n),i==1);r++);var a=this.subFolds[r],s=0;if(i==0){if(a.range.containsRange(e))return a.addSubFold(e);s=1}for(var t=e.range.end.row,n=e.range.end.column,c=r,i=-1;c<this.subFolds.length&&(i=this.subFolds[c].range.compare(t,n),i==1);c++);i==0&&c++;for(var l=this.subFolds.splice(r,c-r,e),u=i==0?l.length-1:l.length,d=s;d<u;d++)e.addSubFold(l[d]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return c(e,this.start)},t}(e("../range_list").RangeList);function a(e,t){e.row-=t.row,e.row==0&&(e.column-=t.column)}function o(e,t){a(e.start,t),a(e.end,t)}function s(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row}function c(e,t){s(e.start,t),s(e.end,t)}t.Fold=i}),ace.define(`ace/edit_session/folding`,[`require`,`exports`,`module`,`ace/range`,`ace/edit_session/fold_line`,`ace/edit_session/fold`,`ace/token_iterator`,`ace/mouse/mouse_event`],function(e,t,n){var r=e("../range").Range,i=e("./fold_line").FoldLine,a=e("./fold").Fold,o=e("../token_iterator").TokenIterator,s=e("../mouse/mouse_event").MouseEvent;function c(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;for(var i=r.folds,a=0;a<i.length;a++){var o=i[a].range;if(o.contains(e,t)){if(n==1&&o.isEnd(e,t)&&!o.isEmpty()||n==-1&&o.isStart(e,t)&&!o.isEmpty())continue;return i[a]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,--n.column;for(var a=0;a<r.length;a++){var o=r[a].range.compareRange(e);if(o!=2){if(o==-2)break;for(var s=r[a].folds,c=0;c<s.length;c++){var l=s[c];if(o=l.range.compareRange(e),o==-2)break;if(o!=2){if(o==42)break;i.push(l)}}}}return--t.column,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else var t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var r=0;r<t[n].folds.length;r++)e.push(t[n].folds[r]);return e},this.getFoldStringAt=function(e,t,n,r){if(r||=this.getFoldLine(e),!r)return null;for(var i={end:{column:0}},a,o,s=0;s<r.folds.length;s++){o=r.folds[s];var c=o.range.compareEnd(e,t);if(c==-1){a=this.getLine(o.start.row).substring(i.end.column,o.start.column);break}else if(c===0)return null;i=o}return a||=this.getLine(o.start.row).substring(i.end.column),n==-1?a.substring(0,t-i.end.column):n==1?a.substring(t-i.end.column):a},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),r==-1&&(r=0);r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),r==-1&&(r=0);r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i<n.length;i++){var a=n[i],o=a.end.row,s=a.start.row;if(o>=t){s<t&&(s>=e?r-=t-s:r=0);break}else o>=e&&(s>=e?r-=o-s:r-=o-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n=this.$foldData,r=!1,o;e instanceof a?o=e:(o=new a(t,e),o.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(o.range);var s=o.start.row,c=o.start.column,l=o.end.row,u=o.end.column,d=this.getFoldAt(s,c,1),f=this.getFoldAt(l,u,-1);if(d&&f==d)return d.addSubFold(o);d&&!d.range.isStart(s,c)&&this.removeFold(d),f&&!f.range.isEnd(l,u)&&this.removeFold(f);var p=this.getFoldsInRange(o.range);p.length>0&&(this.removeFolds(p),o.collapseChildren||p.forEach(function(e){o.addSubFold(e)}));for(var m=0;m<n.length;m++){var h=n[m];if(l==h.start.row){h.addFold(o),r=!0;break}else if(s==h.end.row){if(h.addFold(o),r=!0,!o.sameRow){var g=n[m+1];if(g&&g.start.row==l){h.merge(g);break}}break}else if(l<=h.start.row)break}return r||(h=this.$addFoldLine(new i(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(h.start.row,h.start.row):this.$updateRowLengthCache(h.start.row,h.start.row),this.$modified=!0,this._signal(`changeFold`,{data:o,action:`add`}),o},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,a=t.folds;if(a.length==1)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))a.pop(),t.end.row=a[a.length-1].end.row,t.end.column=a[a.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))a.shift(),t.start.row=a[0].start.row,t.start.column=a[0].start.column;else if(e.sameRow)a.splice(a.indexOf(e),1);else{var o=t.split(e.start.row,e.start.column);a=o.folds,a.shift(),o.start.row=a[0].start.row,o.start.column=a[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),this.$modified=!0,this._signal(`changeFold`,{data:e,action:`remove`})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;if(e==null)n=new r(0,0,this.getLength(),0),t??=!0;else if(typeof e==`number`)n=new r(e,0,e,this.getLine(e).length);else if(`row`in e)n=r.fromPoints(e,e);else if(Array.isArray(e))return i=[],e.forEach(function(e){i=i.concat(this.unfold(e))},this),i;else n=e;i=this.getFoldsInRangeList(n);for(var a=i;i.length==1&&r.comparePoints(i[0].start,n.start)<0&&r.comparePoints(i[0].end,n.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(n);if(t==0?this.expandFolds(i):this.removeFolds(i),a.length)return a},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){r??=e.start.row,i??=0,t??=e.end.row,n??=this.getLine(t).length;var a=this.doc,o=``;return e.walk(function(e,t,n,s){if(!(t<r)){if(t==r){if(n<i)return;s=Math.max(i,s)}e==null?o+=a.getLine(t).substring(s,n):o+=e}},t,n),o},this.getDisplayLine=function(e,t,n,r){var i=this.getFoldLine(e);if(i)return this.getFoldDisplayLine(i,e,t,n,r);var a=this.doc.getLine(e);return a.substring(r||0,t||a.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new i(e,n)}),e},this.toggleFold=function(e){var t=this.selection.getRange(),n,r;if(t.isEmpty()){var i=t.start;if(n=this.getFoldAt(i.row,i.column),n){this.expandFold(n);return}else if(e){var a=this.getFoldLine(i.row);a&&this.expandFolds(a.folds);return}else(r=this.findMatchingBracket(i))?t.comparePoint(r)==1?t.end=r:(t.start=r,t.start.column++,t.end.column--):(r=this.findMatchingBracket({row:i.row,column:i.column+1}))?(t.comparePoint(r)==1?t.end=r:t.start=r,t.start.column++):t=this.getCommentFoldRange(i.row,i.column)||t}else{var o=this.getFoldsInRange(t);if(e&&o.length){this.expandFolds(o);return}else o.length==1&&(n=o[0])}if(n||=this.getFoldAt(t.start.row,t.start.column),n&&n.range.toString()==t.toString()){this.expandFold(n);return}var s=`...`;if(!t.isMultiLine()){if(s=this.getTextRange(t),s.length<4)return;s=s.trim().substring(0,2)+`..`}this.addFold(s,t)},this.getCommentFoldRange=function(e,t,n){var i=new o(this,e,t),a=i.getCurrentToken(),s=a&&a.type;if(a&&/^comment|string/.test(s)){s=s.match(/comment|string/)[0],s==`comment`&&(s+=`|doc-start|\\.doc`);var c=new RegExp(s),l=new r;if(n!=1){do a=i.stepBackward();while(a&&c.test(a.type));a=i.stepForward()}l.start.row=i.getCurrentTokenRow(),l.start.column=i.getCurrentTokenColumn()+a.value.length,i=new o(this,e,t);var u=this.getState(i.$row);if(n!=-1){var d=-1;do if(a=i.stepForward(),d==-1){var f=this.getState(i.$row);u.toString()!==f.toString()&&(d=i.$row)}else if(i.$row>d)break;while(a&&c.test(a.type));a=i.stepBackward()}else a=i.getCurrentToken();return l.end.row=i.getCurrentTokenRow(),l.end.column=i.getCurrentTokenColumn(),l.start.row==l.end.row&&l.start.column>l.end.column?void 0:l}},this.foldAll=function(e,t,n,r){n??=1e5;var i=this.foldWidgets;if(i){t||=this.getLength(),e||=0;for(var a=e;a<t;a++)if(i[a]??(i[a]=this.getFoldWidget(a)),i[a]==`start`&&!(r&&!r(a))){var o=this.getFoldWidgetRange(a);o&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e&&(a=o.end.row,o.collapseChildren=n,this.addFold(`...`,o))}}},this.foldToLevel=function(e){for(this.foldAll();e-->0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,function(t){for(var n=e.getTokens(t),r=0;r<n.length;r++){var i=n[r];if(!(i.type==`text`&&/^\s+$/.test(i.value)))return!!/comment/.test(i.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle=`markbegin`,this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw Error(`invalid fold style: `+e+`[`+Object.keys(this.$foldStyles).join(`, `)+`]`);if(this.$foldStyle!=e){this.$foldStyle=e,e==`manual`&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){if(this.$foldMode!=e){if(this.$foldMode=e,this.off(`change`,this.$updateFoldWidgets),this.off(`tokenizerUpdate`,this.$tokenizerUpdateFoldWidgets),this._signal(`changeAnnotation`),!e||this.$foldStyle==`manual`){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on(`change`,this.$updateFoldWidgets),this.on(`tokenizerUpdate`,this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var r=e-1,i;r>=0;){var a=n[r];if(a??=n[r]=this.getFoldWidget(r),a==`start`){var o=this.getFoldWidgetRange(r);if(i||=o,o&&o.end.row>=e)break}r--}return{range:r!==-1&&o,firstRange:i}},this.onFoldWidgetClick=function(e,t){t instanceof s&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=` ace_invalid`)}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i=n===`end`?-1:1,a=this.getFoldAt(e,i===-1?0:r.length,i);if(a)return t.children||t.all?this.removeFold(a):this.expandFold(a),a;var o=this.getFoldWidgetRange(e,!0);if(o&&!o.isMultiLine()&&(a=this.getFoldAt(o.start.row,o.start.column,1),a&&o.isEqual(a.range)))return this.removeFold(a),a;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var c=s.range.start.row+1,l=s.range.end.row;this.foldAll(c,l,t.all?1e4:0)}else t.children?(l=o?o.end.row:this.getLength(),this.foldAll(e+1,l,t.all?1e4:0)):o&&(t.all&&(o.collapseChildren=1e4),this.addFold(`...`,o));return o}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange,n){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold(`...`,n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(n===0)this.foldWidgets[t]=null;else if(e.action==`remove`)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}t.Folding=c}),ace.define(`ace/edit_session/bracket_match`,[`require`,`exports`,`module`,`ace/token_iterator`,`ace/range`],function(e,t,n){var r=e("../token_iterator").TokenIterator,i=e("../range").Range;function a(){this.findMatchingBracket=function(e,t){if(e.column==0)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(n==``)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t=this.getLine(e.row),n=!0,r,a=t.charAt(e.column-1),o=a&&a.match(/([\(\[\{])|([\)\]\}])/);if(o||(a=t.charAt(e.column),e={row:e.row,column:e.column+1},o=a&&a.match(/([\(\[\{])|([\)\]\}])/),n=!1),!o)return null;if(o[1]){var s=this.$findClosingBracket(o[1],e);if(!s)return null;r=i.fromPoints(e,s),n||(r.end.column++,r.start.column--),r.cursor=r.end}else{var s=this.$findOpeningBracket(o[2],e);if(!s)return null;r=i.fromPoints(s,e),n||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),r=/([\(\[\{])|([\)\]\}])/,a=!t&&n.charAt(e.column-1),o=a&&a.match(r);if(o||=(a=(t===void 0||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},a&&a.match(r)),!o)return null;var s=new i(e.row,e.column-1,e.row,e.column),c=o[1]?this.$findClosingBracket(o[1],e):this.$findOpeningBracket(o[2],e);return c?[s,new i(c.row,c.column,c.row,c.column+1)]:[s]},this.$brackets={")":`(`,"(":`)`,"]":`[`,"[":`]`,"{":`}`,"}":`{`,"<":`>`,">":`<`},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],a=1,o=new r(this,t.row,t.column),s=o.getCurrentToken();if(s||=o.stepForward(),s){n||=RegExp(`(\\.?`+s.type.replace(`.`,`\\.`).replace(`rparen`,`.paren`).replace(/\b(?:end)\b/,`(?:start|begin|end)`).replace(/-close\b/,`-(close|open)`)+`)+`);for(var c=t.column-o.getCurrentTokenColumn()-2,l=s.value;;){for(;c>=0;){var u=l.charAt(c);if(u==i){if(--a,a==0)return{row:o.getCurrentTokenRow(),column:c+o.getCurrentTokenColumn()}}else u==e&&(a+=1);--c}do s=o.stepBackward();while(s&&!n.test(s.type));if(s==null)break;l=s.value,c=l.length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],a=1,o=new r(this,t.row,t.column),s=o.getCurrentToken();if(s||=o.stepForward(),s){n||=RegExp(`(\\.?`+s.type.replace(`.`,`\\.`).replace(`lparen`,`.paren`).replace(/\b(?:start|begin)\b/,`(?:start|begin|end)`).replace(/-open\b/,`-(close|open)`)+`)+`);for(var c=t.column-o.getCurrentTokenColumn();;){for(var l=s.value,u=l.length;c<u;){var d=l.charAt(c);if(d==i){if(--a,a==0)return{row:o.getCurrentTokenRow(),column:c+o.getCurrentTokenColumn()}}else d==e&&(a+=1);c+=1}do s=o.stepForward();while(s&&!n.test(s.type));if(s==null)break;c=0}return null}},this.getMatchingTags=function(e){var t=new r(this,e.row,e.column),n=this.$findTagName(t);if(n)return t.stepBackward().value===`<`?this.$findClosingTag(t,n):this.$findOpeningTag(t,n)},this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,r=!1;if(t&&t.type.indexOf(`tag-name`)===-1)do t=r?e.stepBackward():e.stepForward(),t&&(t.value===`/>`?r=!0:t.type.indexOf(`tag-name`)!==-1&&(n=!0));while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,r=t.value,a=t.value,o=0,s=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var c=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),l=!1;do{if(n=t,n.type.indexOf(`tag-close`)!==-1&&!l){var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);l=!0}if(t=e.stepForward(),t){if(t.value===`>`&&!l){var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);l=!0}if(t.type.indexOf(`tag-name`)!==-1){if(r=t.value,a===r){if(n.value===`<`)o++;else if(n.value===`</`&&(o--,o<0)){e.stepBackward();var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2);t=e.stepForward();var f=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(t.type.indexOf(`tag-close`)===-1&&(t=e.stepForward()),t&&t.value===`>`)var p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);else return}}}else if(a===r&&t.value===`/>`&&(o--,o<0))var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),f=d,p=f,u=new i(c.end.row,c.end.column,c.end.row,c.end.column+1)}}while(t&&o>=0);if(s&&u&&d&&p&&c&&f)return{openTag:new i(s.start.row,s.start.column,u.end.row,u.end.column),closeTag:new i(d.start.row,d.start.column,p.end.row,p.end.column),openTagName:c,closeTagName:f}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),r=t.value,a=0,o=e.getCurrentTokenRow(),s=e.getCurrentTokenColumn(),c=s+2,l=new i(o,s,o,c);e.stepForward();var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(t.type.indexOf(`tag-close`)===-1&&(t=e.stepForward()),!(!t||t.value!==`>`)){var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do if(t=n,o=e.getCurrentTokenRow(),s=e.getCurrentTokenColumn(),c=s+t.value.length,n=e.stepBackward(),t){if(t.type.indexOf(`tag-name`)!==-1){if(r===t.value)if(n.value===`<`){if(a++,a>0){var f=new i(o,s,o,c),p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do t=e.stepForward();while(t&&t.value!==`>`);var m=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else n.value===`</`&&a--}else if(t.value===`/>`){for(var h=0,g=n;g;){if(g.type.indexOf(`tag-name`)!==-1&&g.value===r){a--;break}else if(g.value===`<`)break;g=e.stepBackward(),h++}for(var _=0;_<h;_++)e.stepForward()}}while(n&&a<=0);if(p&&m&&l&&d&&f&&u)return{openTag:new i(p.start.row,p.start.column,m.end.row,m.end.column),closeTag:new i(l.start.row,l.start.column,d.end.row,d.end.column),openTagName:f,closeTagName:u}}}}t.BracketMatch=a}),ace.define(`ace/edit_session`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/lang`,`ace/bidihandler`,`ace/config`,`ace/lib/event_emitter`,`ace/selection`,`ace/mode/text`,`ace/range`,`ace/line_widgets`,`ace/document`,`ace/background_tokenizer`,`ace/search_highlight`,`ace/undomanager`,`ace/edit_session/folding`,`ace/edit_session/bracket_match`],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/lang"),a=e("./bidihandler").BidiHandler,o=e("./config"),s=e("./lib/event_emitter").EventEmitter,c=e("./selection").Selection,l=e("./mode/text").Mode,u=e("./range").Range,d=e("./line_widgets").LineWidgets,f=e("./document").Document,p=e("./background_tokenizer").BackgroundTokenizer,m=e("./search_highlight").SearchHighlight,h=e("./undomanager").UndoManager,g=function(){function e(t,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id=`session`+ ++e.$uid,this.$foldData.toString=function(){return this.join(`
191
191
  `)},this.$gutterCustomWidgets={},this.bgTokenizer=new p(new l().getTokenizer(),this);var r=this;this.bgTokenizer.on(`update`,function(e){r._signal(`tokenizerUpdate`,e)}),this.on(`changeFold`,this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof t!=`object`||!t.getLine)&&(t=new f(t)),this.setDocument(t),this.selection=new c(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on(`changeSelection`,this.$onSelectionChange),this.selection.on(`changeCursor`,this.$onSelectionChange),this.$bidiHandler=new a(this),o.resetOptions(this),this.setMode(n),o._signal(`session`,this),this.destroyed=!1,this.$initOperationListeners()}return e.prototype.$initOperationListeners=function(){var e=this;this.curOp=null,this.on(`change`,function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.docChanged=!0},!0),this.on(`changeSelection`,function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.selectionChanged=!0},!0),this.$operationResetTimer=i.delayedCall(this.endOperation.bind(this,!0))},e.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||={},this.$operationResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal(`startOperation`,e)},e.prototype.endOperation=function(e){if(this.curOp){if(e&&e.returnValue===!1){this.curOp=null,this._signal(`endOperation`,e);return}if(e==1&&this.curOp.command&&this.curOp.command.name==`mouse`)return;var t=this.selection.toJSON();this.curOp.selectionAfter=t,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(t),this._signal(`beforeEndOperation`),this.prevOp=this.curOp,this.curOp=null,this._signal(`endOperation`,e)}},e.prototype.setDocument=function(e){this.doc&&this.doc.off(`change`,this.$onChange),this.doc=e,e.on(`change`,this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},e.prototype.getDocument=function(){return this.doc},Object.defineProperty(e.prototype,"widgetManager",{get:function(){var e=new d(this);return this.widgetManager=e,this.$editor&&e.attach(this.$editor),e},set:function(e){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:e})},enumerable:!1,configurable:!0}),e.prototype.$resetRowCache=function(e){if(!e){this.$docRowCache=[],this.$screenRowCache=[];return}var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>1,a=e[i];if(t>a)n=i+1;else if(t<a)r=i-1;else return i}return n-1},e.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},e.prototype.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},e.prototype.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:`removeFolds`,folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(e),this._signal(`change`,e)},e.prototype.onSelectionChange=function(){this._signal(`changeSelection`)},e.prototype.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},e.fromJSON=function(t){typeof t==`string`&&(t=JSON.parse(t));var n=new h;n.$undoStack=t.history.$undoStack,n.$redoStack=t.history.$redoStack,n.mark=t.history.mark,n.$rev=t.history.rev;var r=new e(t.value);return t.folds.forEach(function(e){r.addFold(`...`,u.fromPoints(e.start,e.end))}),r.setAnnotations(t.annotations),r.setBreakpoints(t.breakpoints),r.setMode(t.mode),r.setScrollLeft(t.scrollLeft),r.setScrollTop(t.scrollTop),r.setUndoManager(n),r.selection.fromJSON(t.selection),r},e.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(e){return e.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},e.prototype.toString=function(){return this.doc.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.getState=function(e){return this.bgTokenizer.getState(e)},e.prototype.getTokens=function(e){return this.bgTokenizer.getTokens(e)},e.prototype.getTokenAt=function(e,t){var n=this.bgTokenizer.getTokens(e),r,i=0;if(t==null){var a=n.length-1;i=this.getLine(e).length}else for(var a=0;a<n.length&&(i+=n[a].value.length,!(i>=t));a++);return r=n[a],r?(r.index=a,r.start=i-r.value.length,r):null},e.prototype.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(` `,this.getTabSize()):` `},e.prototype.setUseSoftTabs=function(e){this.setOption(`useSoftTabs`,e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption(`tabSize`,e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption(`navigateWithinSoftTabs`,e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption(`overwrite`,e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=``),this.$decorations[e]+=` `+t,this._signal(`changeBreakpoint`,{})},e.prototype.removeGutterCustomWidget=function(e){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(e)},e.prototype.addGutterCustomWidget=function(e,t){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||``).replace(` `+t,``),this._signal(`changeBreakpoint`,{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]=`ace_breakpoint`;this._signal(`changeBreakpoint`,{})},e.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal(`changeBreakpoint`,{})},e.prototype.setBreakpoint=function(e,t){t===void 0&&(t=`ace_breakpoint`),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal(`changeBreakpoint`,{})},e.prototype.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal(`changeBreakpoint`,{})},e.prototype.addMarker=function(e,t,n,r){var i=this.$markerId++,a={range:e,type:n||`line`,renderer:typeof n==`function`?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=a,this._signal(`changeFrontMarker`)):(this.$backMarkers[i]=a,this._signal(`changeBackMarker`)),i},e.prototype.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal(`changeFrontMarker`)):(this.$backMarkers[n]=e,this._signal(`changeBackMarker`)),e}},e.prototype.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(t){var n=t.inFront?this.$frontMarkers:this.$backMarkers;delete n[e],this._signal(t.inFront?`changeFrontMarker`:`changeBackMarker`)}},e.prototype.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},e.prototype.highlight=function(e){if(!this.$searchHighlight){var t=new m(null,`ace_selected-word`,`text`);this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},e.prototype.highlightLines=function(e,t,n,r){typeof t!=`number`&&(n=t,t=e),n||=`ace_step`;var i=new u(e,0,t,1/0);return i.id=this.addMarker(i,n,`fullLine`,r),i},e.prototype.setAnnotations=function(e){this.$annotations=e,this._signal(`changeAnnotation`,{})},e.prototype.getAnnotations=function(){return this.$annotations||[]},e.prototype.clearAnnotations=function(){this.setAnnotations([])},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine=`
192
192
  `},e.prototype.getWordRange=function(e,t){var n=this.getLine(e),r=!1;if(t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||=!!n.charAt(t).match(this.tokenRe),r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var a=t;if(a>0){do a--;while(a>=0&&n.charAt(a).match(i));a++}for(var o=t;o<n.length&&n.charAt(o).match(i);)o++;return new u(e,a,e,o)},e.prototype.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),r=this.getLine(n.end.row);r.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},e.prototype.setNewLineMode=function(e){this.doc.setNewLineMode(e)},e.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},e.prototype.setUseWorker=function(e){this.setOption(`useWorker`,e)},e.prototype.getUseWorker=function(){return this.$useWorker},e.prototype.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal(`tokenizerUpdate`,e)},e.prototype.setMode=function(e,t){if(e&&typeof e==`object`){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,r=n.path}else r=e||`ace/mode/text`;if(this.$modes[`ace/mode/text`]||(this.$modes[`ace/mode/text`]=new l),this.$modes[r]&&!n){this.$onChangeMode(this.$modes[r]),t&&t();return}this.$modeId=r,o.loadModule([`mode`,r],function(e){if(!this.destroyed){if(this.$modeId!==r)return t&&t();this.$modes[r]&&!n?this.$onChangeMode(this.$modes[r]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[r]=e,e.$id=r),this.$onChangeMode(e)),t&&t()}}.bind(this)),this.$mode||this.$onChangeMode(this.$modes[`ace/mode/text`],!0)},e.prototype.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var r=e.getTokenizer();if(r.on!==void 0){var i=this.onReloadTokenizer.bind(this);r.on(`update`,i)}this.bgTokenizer.setTokenizer(r),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit(`changeMode`,{oldMode:n,mode:e}))}},e.prototype.$stopWorker=function(){this.$worker&&=(this.$worker.terminate(),null)},e.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){o.warn(`Could not load worker`,e),this.$worker=null}},e.prototype.getMode=function(){return this.$mode},e.prototype.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal(`changeScrollTop`,e))},e.prototype.getScrollTop=function(){return this.$scrollTop},e.prototype.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal(`changeScrollLeft`,e))},e.prototype.getScrollLeft=function(){return this.$scrollLeft},e.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},e.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,a=this.$foldData[i],o=a?a.start.row:1/0,s=t.length,c=0;c<s;c++){if(c>o){if(c=a.end.row+1,c>=s)break;a=this.$foldData[i++],o=a?a.start.row:1/0}n[c]??(n[c]=this.$getStringScreenWidth(t[c])[0]),n[c]>r&&(r=n[c])}this.screenWidth=r}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;n!=-1;n--){var r=e[n];r.action==`insert`||r.action==`remove`?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var r=e[n];(r.action==`insert`||r.action==`remove`)&&this.doc.$safeApplyDelta(r)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},e.prototype.setUndoSelect=function(e){this.$undoSelect=e},e.prototype.$getUndoSelection=function(e,t){function n(e){return t?e.action!==`insert`:e.action===`insert`}for(var r,i,a=0;a<e.length;a++){var o=e[a];if(o.start){if(!r){r=n(o)?u.fromPoints(o.start,o.end):u.fromPoints(o.start,o.start);continue}n(o)?(i=o.start,r.compare(i.row,i.column)==-1&&r.setStart(i),i=o.end,r.compare(i.row,i.column)==1&&r.setEnd(i)):(i=o.start,r.compare(i.row,i.column)==-1&&(r=u.fromPoints(o.start,o.start)))}}return r},e.prototype.replace=function(e,t){return this.doc.replace(e,t)},e.prototype.moveText=function(e,t,n){var r=this.getTextRange(e),i=this.getFoldsInRange(e),a=u.fromPoints(t,t);if(!n){this.remove(e);var o=e.start.row-e.end.row,s=o?-e.end.column:e.start.column-e.end.column;s&&(a.start.row==e.end.row&&a.start.column>e.end.column&&(a.start.column+=s),a.end.row==e.end.row&&a.end.column>e.end.column&&(a.end.column+=s)),o&&a.start.row>=e.end.row&&(a.start.row+=o,a.end.row+=o)}if(a.end=this.insert(a.start,r),i.length){var c=e.start,l=a.start,o=l.row-c.row,s=l.column-c.column;this.addFolds(i.map(function(e){return e=e.clone(),e.start.row==c.row&&(e.start.column+=s),e.end.row==c.row&&(e.end.column+=s),e.start.row+=o,e.end.row+=o,e}))}return a},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),r=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var a=this.getLine(i);n.start.row=i,n.end.row=i;for(var o=0;o<r&&a.charAt(o)==` `;++o);o<r&&a.charAt(o)==` `?(n.start.column=o,n.end.column=o+1):(n.start.column=0,n.end.column=o),this.remove(n)}},e.prototype.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){var r=this.getRowFoldStart(e+n);if(r<0)return 0;var i=r-e}else if(n>0){var r=this.getRowFoldEnd(t+n);if(r>this.doc.getLength()-1)return 0;var i=r-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var i=t-e+1}var a=new u(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(a).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),s=n==0?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,s),o.length&&this.addFolds(o),i},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal(`changeWrapMode`)}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)&&(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal(`changeWrapMode`))},e.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1?(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal(`changeWrapLimit`)),!0):!1},e.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,a=r.row,o=i.row,s=o-a,c=null;if(this.$updating=!0,s!=0)if(n===`remove`){this[t?`$wrapData`:`$rowLengthCache`].splice(a,s);var l=this.$foldData;c=this.getFoldsInRange(e),this.removeFolds(c);var u=this.getFoldLine(i.row),d=0;if(u){u.addRemoveChars(i.row,i.column,r.column-i.column),u.shiftRow(-s);var f=this.getFoldLine(a);f&&f!==u&&(f.merge(u),u=f),d=l.indexOf(u)+1}for(;d<l.length;d++){var u=l[d];u.start.row>=i.row&&u.shiftRow(-s)}o=a}else{var p=Array(s);p.unshift(a,0);var m=t?this.$wrapData:this.$rowLengthCache;m.splice.apply(m,p);var l=this.$foldData,u=this.getFoldLine(a),d=0;if(u){var h=u.range.compareInside(r.row,r.column);h==0?(u=u.split(r.row,r.column),u&&(u.shiftRow(s),u.addRemoveChars(o,0,i.column-r.column))):h==-1&&(u.addRemoveChars(a,0,i.column-r.column),u.shiftRow(s)),d=l.indexOf(u)+1}for(;d<l.length;d++){var u=l[d];u.start.row>=a&&u.shiftRow(s)}}else{s=Math.abs(e.start.column-e.end.column),n===`remove`&&(c=this.getFoldsInRange(e),this.removeFolds(c),s=-s);var u=this.getFoldLine(a);u&&u.addRemoveChars(a,r.column,s)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error(`doc.getLength() and $wrapData.length have to be the same!`),this.$updating=!1,t?this.$updateWrapData(a,o):this.$updateRowLengthCache(a,o),c},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var n=this.doc.getAllLines(),r=this.getTabSize(),i=this.$wrapData,a=this.$wrapLimit,o,s,c=e;for(t=Math.min(t,n.length-1);c<=t;)s=this.getFoldLine(c,s),s?(o=[],s.walk(function(e,t,r,i){var a;if(e!=null){a=this.$getDisplayTokens(e,o.length),a[0]=y;for(var s=1;s<a.length;s++)a[s]=b}else a=this.$getDisplayTokens(n[t].substring(i,r),o.length);o=o.concat(a)}.bind(this),s.end.row,n[s.end.row].length+1),i[s.start.row]=this.$computeWrapSplits(o,a,r),c=s.end.row+1):(o=this.$getDisplayTokens(n[c]),i[c]=this.$computeWrapSplits(o,a,r),c++)},e.prototype.$computeWrapSplits=function(e,t,n){if(e.length==0)return[];var r=[],i=e.length,a=0,o=0,s=this.$wrapAsCode,c=this.$indentedSoftWrap,l=t<=Math.max(2*n,8)||c===!1?0:Math.floor(t/2);function u(){var t=0;if(l===0)return t;if(c)for(var r=0;r<e.length;r++){var i=e[r];if(i==S)t+=1;else if(i==C)t+=n;else if(i==w)continue;else break}return s&&c!==!1&&(t+=n),Math.min(t,l)}function d(t){for(var n=t-a,i=a;i<t;i++){var s=e[i];(s===12||s===2)&&--n}r.length||(f=u(),r.indent=f),o+=n,r.push(o),a=t}for(var f=0;i-a>t-f;){var p=a+t-f;if(e[p-1]>=S&&e[p]>=S){d(p);continue}if(e[p]==y||e[p]==b){for(;p!=a-1&&e[p]!=y;p--);if(p>a){d(p);continue}for(p=a+t;p<e.length&&e[p]==b;p++);if(p==e.length)break;d(p);continue}for(var m=Math.max(p-(t-(t>>2)),a-1);p>m&&e[p]<y;)p--;if(s){for(;p>m&&e[p]<y;)p--;for(;p>m&&e[p]==x;)p--}else for(;p>m&&e[p]<S;)p--;if(p>m){d(++p);continue}p=a+t,e[p]==v&&p--,d(p-f)}return r},e.prototype.$getDisplayTokens=function(e,t){var n=[],r;t||=0;for(var i=0;i<e.length;i++){var a=e.charCodeAt(i);if(a==9){r=this.getScreenTabSize(n.length+t),n.push(C);for(var o=1;o<r;o++)n.push(w)}else a==32?n.push(S):a>39&&a<48||a>57&&a<64?n.push(x):a>=4352&&T(a)?n.push(_,v):n.push(_)}return n},e.prototype.$getStringScreenWidth=function(e,t,n){if(t==0)return[0,0];t??=1/0,n||=0;var r,i;for(i=0;i<e.length&&(r=e.charCodeAt(i),r==9?n+=this.getScreenTabSize(n):r>=4352&&T(r)?n+=2:n+=1,!(n>t));i++);return[n,i]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),!this.$useWrapMode||!this.$wrapData[e]?t:this.$wrapData[e].length+t},e.prototype.getRowLineCount=function(e){return!this.$useWrapMode||!this.$wrapData[e]?1:this.$wrapData[e].length+1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}else return 0},e.prototype.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},e.prototype.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},e.prototype.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},e.prototype.getRowSplitData=function(e){if(this.$useWrapMode)return this.$wrapData[e]},e.prototype.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},e.prototype.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},e.prototype.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},e.prototype.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var r,i=0,a=0,o,s=0,c=0,l=this.$screenRowCache,u=this.$getRowCacheIndex(l,e),d=l.length;if(d&&u>=0)var s=l[u],i=this.$docRowCache[u],f=e>l[d-1];else var f=!d;for(var p=this.getLength()-1,m=this.getNextFoldLine(i),h=m?m.start.row:1/0;s<=e&&(c=this.getRowLength(i),!(s+c>e||i>=p));)s+=c,i++,i>h&&(i=m.end.row+1,m=this.getNextFoldLine(i,m),h=m?m.start.row:1/0),f&&(this.$docRowCache.push(i),this.$screenRowCache.push(s));if(m&&m.start.row<=i)r=this.getFoldDisplayLine(m),i=m.start.row;else if(s+c<=e||i>p)return{row:p,column:this.getLine(p).length};else r=this.getLine(i),m=null;var g=0,_=Math.floor(e-s);if(this.$useWrapMode){var v=this.$wrapData[i];v&&(o=v[_],_>0&&v.length&&(g=v.indent,a=v[_-1]||v[v.length-1],r=r.substring(a)))}return n!==void 0&&this.$bidiHandler.isBidiRow(s+_,i,_)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(r,t-g)[1],this.$useWrapMode&&a>=o&&(a=o-1),m?m.idxToPosition(a):{row:i,column:a}},e.prototype.documentToScreenPosition=function(e,t){if(t===void 0)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,a=null;a=this.getFoldAt(e,t,1),a&&(e=a.start.row,t=a.start.column);var o,s=0,c=this.$docRowCache,l=this.$getRowCacheIndex(c,e),u=c.length;if(u&&l>=0)var s=c[l],r=this.$screenRowCache[l],d=e>c[u-1];else var d=!u;for(var f=this.getNextFoldLine(s),p=f?f.start.row:1/0;s<e;){if(s>=p){if(o=f.end.row+1,o>e)break;f=this.getNextFoldLine(o,f),p=f?f.start.row:1/0}else o=s+1;r+=this.getRowLength(s),s=o,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(r))}var m=``;f&&s>=p?(m=this.getFoldDisplayLine(f,e,t),i=f.start.row):(m=this.getLine(e).substring(0,t),i=e);var h=0;if(this.$useWrapMode){var g=this.$wrapData[i];if(g){for(var _=0;m.length>=g[_];)r++,_++;m=m.substring(g[_-1]||0,m.length),h=_>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[s]&&this.lineWidgets[s].rowsAbove&&(r+=this.lineWidgets[s].rowsAbove),{row:r,column:h+this.$getStringScreenWidth(m)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,i=0,t=this.$foldData[i++],a=t?t.start.row:1/0;r<n;){var o=this.$wrapData[r];e+=o?o.length+1:1,r++,r>a&&(r=t.end.row+1,t=this.$foldData[i++],a=t?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,i=0;i<s.length;i++)t=s[i],e-=t.end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},e.prototype.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,r){if(n===0)return[0,0];n||=1/0,r||=0;var i,a;for(a=0;a<t.length&&(i=t.charAt(a),i===` `?r+=this.getScreenTabSize(r):r+=e.getCharacterWidth(i),!(r>n));a++);return[r,a]})},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();return e.column===0?e.row===0?``:this.doc.getNewLineCharacter():this.getLine(e.row)[e.column-1]},e.prototype.destroy=function(){this.destroyed||=(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off(`change`,this.$onChange),this.selection&&(this.selection.off(`changeCursor`,this.$onSelectionChange),this.selection.off(`changeSelection`,this.$onSelectionChange)),this.selection.detach()},e}();g.$uid=0,g.prototype.$modes=o.$modes,g.prototype.getValue=g.prototype.toString,g.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},g.prototype.$overwrite=!1,g.prototype.$mode=null,g.prototype.$modeId=null,g.prototype.$scrollTop=0,g.prototype.$scrollLeft=0,g.prototype.$wrapLimit=80,g.prototype.$useWrapMode=!1,g.prototype.$wrapLimitRange={min:null,max:null},g.prototype.lineWidgets=null,g.prototype.isFullWidth=T,r.implement(g.prototype,s);var _=1,v=2,y=3,b=4,x=9,S=10,C=11,w=12;function T(e){return e<4352?!1:e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510}e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),o.defineOptions(g.prototype,`session`,{wrap:{set:function(e){if(!e||e==`off`?e=!1:e==`free`?e=!0:e==`printMargin`?e=-1:typeof e==`string`&&(e=parseInt(e,10)||!1),this.$wrap!=e)if(this.$wrap=e,!e)this.setUseWrapMode(!1);else{var t=typeof e==`number`?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?`printMargin`:this.getWrapLimitRange().min?this.$wrap:`free`:`off`},handlesSet:!0},wrapMethod:{set:function(e){e=e==`auto`?this.$mode.type!=`text`:e!=`text`,e!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:`auto`},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal(`changeBreakpoint`)},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){e=parseInt(e),e>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal(`changeTabSize`))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal(`changeOverwrite`)},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=g}),ace.define(`ace/search`,[`require`,`exports`,`module`,`ace/lib/lang`,`ace/lib/oop`,`ace/range`],function(e,t,n){var r=e("./lib/lang"),i=e("./lib/oop"),a=e("./range").Range,o=function(){function e(){this.$options={}}return e.prototype.set=function(e){return i.mixin(this.$options,e),this},e.prototype.getOptions=function(){return r.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach(function(e,n,i,o){return r=new a(e,n,i,o),n==o&&t.start&&t.start.start&&t.skipCurrent!=0&&r.isEqual(t.start)?(r=null,!1):!0}),r},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],s=t.re;if(t.$isMultiLine){var c=s.length,l=i.length-c,u;outer:for(var d=s.offset||0;d<=l;d++){for(var f=0;f<c;f++)if(i[d+f].search(s[f])==-1)continue outer;var p=i[d],m=i[d+c-1],h=p.length-p.match(s[0])[0].length,g=m.match(s[c-1])[0].length;u&&u.end.row===d&&u.end.column>h||(o.push(u=new a(d,h,d+c-1,g)),c>2&&(d=d+c-2))}}else for(var _,v=0;v<i.length;v++)if(this.$isMultilineSearch(t)){var y=i.length-1;if(_=this.$multiLineForward(e,s,v,y),_){var b=_.endRow<=y?_.endRow-1:y;b>v&&(v=b),o.push(new a(_.startRow,_.startCol,_.endRow,_.endCol))}}else{_=r.getMatchOffsets(i[v],s);for(var f=0;f<_.length;f++){var x=_[f];o.push(new a(v,x.offset,v,x.offset+x.length))}}if(n){for(var S=n.start.column,C=n.end.column,v=0,f=o.length-1;v<f&&o[v].start.column<S&&o[v].start.row==0;)v++;for(var w=n.end.row-n.start.row;v<f&&o[f].end.column>C&&o[f].end.row==w;)f--;for(o=o.slice(v,f+1),v=0,f=o.length;v<f;v++)o[v].start.row+=n.start.row,o[v].end.row+=n.start.row}return o},e.prototype.parseReplaceString=function(e){for(var t={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},n=``,r=0,i=e.length;r<i;r++){var a=e.charCodeAt(r);if(a===t.Backslash){if(r++,r>=i){n+=`\\`;break}switch(e.charCodeAt(r)){case t.Backslash:n+=`\\`;break;case t.n:n+=`
193
193
  `;break;case t.t:n+=` `;break}continue}if(a===t.DollarSign){if(r++,r>=i){n+=`$`;break}var o=e.charCodeAt(r);if(o===t.DollarSign){n+=`$$`;continue}if(o===t.Digit0||o===t.Ampersand){n+=`$&`;continue}if(t.Digit1<=o&&o<=t.Digit9){n+=`$`+e[r];continue}}n+=e[r]}return n||e},e.prototype.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(r){var i=this.$isMultilineSearch(n);i&&(e=e.replace(/\r\n|\r|\n/g,`
@@ -206,7 +206,7 @@ import{t as e}from"./rolldown-runtime-CMxvf4Kt.js";var t=e(((e,t)=>{(function(){
206
206
  `||e==`\r
207
207
  `){var s=n.getLine(i.row);if(i.column>s.search(/\S|$/)){var c=s.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+c)}}this.clearSelection();var l=i.column,u=n.getState(i.row),s=n.getLine(i.row),d=r.checkOutdent(u,s,e);if(n.insert(i,e),a&&a.selection&&(a.selection.length==2?this.selection.setSelectionRange(new m(i.row,l+a.selection[0],i.row,l+a.selection[1])):this.selection.setSelectionRange(new m(i.row+a.selection[0],a.selection[1],i.row+a.selection[2],a.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var f=r.getNextLineIndent(u,s.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},f)}d&&r.autoOutdent(u,n,i.row)}},e.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new m(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),r=``,i=``,a=``,o=e.getTabString(),s=0;s<n.length;s++)for(var c=n[s].start.row,l=n[s].end.row,u=c;u<=l;u++){u>0&&(r=e.getState(u-1),i=e.getLine(u-1),a=t.getNextLineIndent(r,i,o));var d=e.getLine(u),f=t.$getIndent(d);if(a!==f){if(f.length>0){var p=new m(u,0,u,f.length);e.remove(p)}a.length>0&&e.insert({row:u,column:0},a)}t.autoOutdent(r,e,u)}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:`insertstring`}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},e.prototype.applyComposition=function(e,t){if(t.extendLeft||t.extendRight){var n=this.selection.getRange();n.start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),!e&&!n.isEmpty()&&this.remove()}if((e||!this.selection.isEmpty())&&this.insert(e,!0),t.restoreStart||t.restoreEnd){var n=this.selection.getRange();n.start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n)}},e.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption(`scrollSpeed`,e)},e.prototype.getScrollSpeed=function(){return this.getOption(`scrollSpeed`)},e.prototype.setDragDelay=function(e){this.setOption(`dragDelay`,e)},e.prototype.getDragDelay=function(){return this.getOption(`dragDelay`)},e.prototype.setSelectionStyle=function(e){this.setOption(`selectionStyle`,e)},e.prototype.getSelectionStyle=function(){return this.getOption(`selectionStyle`)},e.prototype.setHighlightActiveLine=function(e){this.setOption(`highlightActiveLine`,e)},e.prototype.getHighlightActiveLine=function(){return this.getOption(`highlightActiveLine`)},e.prototype.setHighlightGutterLine=function(e){this.setOption(`highlightGutterLine`,e)},e.prototype.getHighlightGutterLine=function(){return this.getOption(`highlightGutterLine`)},e.prototype.setHighlightSelectedWord=function(e){this.setOption(`highlightSelectedWord`,e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption(`readOnly`,e)},e.prototype.getReadOnly=function(){return this.getOption(`readOnly`)},e.prototype.setBehavioursEnabled=function(e){this.setOption(`behavioursEnabled`,e)},e.prototype.getBehavioursEnabled=function(){return this.getOption(`behavioursEnabled`)},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption(`wrapBehavioursEnabled`,e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption(`wrapBehavioursEnabled`)},e.prototype.setShowFoldWidgets=function(e){this.setOption(`showFoldWidgets`,e)},e.prototype.getShowFoldWidgets=function(){return this.getOption(`showFoldWidgets`)},e.prototype.setFadeFoldWidgets=function(e){this.setOption(`fadeFoldWidgets`,e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption(`fadeFoldWidgets`)},e.prototype.remove=function(e){this.selection.isEmpty()&&(e==`left`?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,`deletion`,this,n,t);if(t.end.column===0){var a=n.getTextRange(t);if(a[a.length-1]==`
208
208
  `){var o=n.getLine(t.end.row);/^\s+$/.test(o)&&(t.end.column=o.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert(`
209
- `),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(t!==0){var n=this.session.getLine(e.row),r,i;t<n.length?(r=n.charAt(t)+n.charAt(t-1),i=new m(e.row,t-1,e.row,t+1)):(r=n.charAt(t-1)+n.charAt(t-2),i=new m(e.row,t-2,e.row,t)),this.session.replace(i,r),this.session.selection.moveToPosition(i.end)}}},e.prototype.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},e.prototype.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},e.prototype.indent=function(){var e=this.session,t=this.getSelectionRange();if(t.start.row<t.end.row){var n=this.$getSelectedRows();e.indentRows(n.first,n.last,` `);return}else if(t.start.column<t.end.column){var r=e.getTextRange(t);if(!/^\s+$/.test(r)){var n=this.$getSelectedRows();e.indentRows(n.first,n.last,` `);return}}var i=e.getLine(t.start.row),a=t.start,s=e.getTabSize(),c=e.documentToScreenColumn(a.row,a.column);if(this.session.getUseSoftTabs())var l=s-c%s,u=o.stringRepeat(` `,l);else{for(var l=c%s;i[t.start.column-1]==` `&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),u=` `}return this.insert(u)},e.prototype.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,` `)},e.prototype.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},e.prototype.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],r=e.first;r<=e.last;r++)n.push(t.getLine(r));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:+(e.toLowerCase()>t.toLowerCase())});for(var i=new m(0,0,0,0),r=e.first;r<=e.last;r++){var a=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=a.length,t.replace(i,n[r-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex<t;){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t)return{value:i[0],start:i.index,end:i.index+i[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new m(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var a=this.getNumberAt(t,n);if(a){var o=a.value.indexOf(`.`)>=0?a.start+a.value.indexOf(`.`)+1:a.end,s=a.start+a.value.length-o,c=parseFloat(a.value);c*=10**s,o!==a.end&&n<o?e*=10**(a.end-n-1):e*=10**(a.end-n),c+=e,c/=10**s;var l=c.toFixed(s),u=new m(t,a.start,t,a.end);this.session.replace(u,l),this.moveCursorTo(t,Math.max(a.start+1,n+l.length-a.value.length))}}else this.toggleWord()},e.prototype.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),r=this.selection.getWordRange().start.column,i=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,`$1 `).split(/\s/),a=t-r-1;a<0&&(a=0);var s=0,c=0,l=this;n.match(/[A-Za-z0-9_]+/)&&i.forEach(function(t,i){c=s+t.length,a>=s&&a<=c&&(n=t,l.selection.clearSelection(),l.moveCursorTo(e,s+r),l.selection.selectTo(e,c+r)),s=c});for(var u=this.$toggleWordPairs,d,f=0;f<u.length;f++)for(var p=u[f],m=0;m<=1;m++){var h=+!m,g=n.match(RegExp(`^\\s?_?(`+o.escapeRegExp(p[m])+`)\\s?$`,`i`));g&&n.match(RegExp(`([_]|^|\\s)(`+o.escapeRegExp(g[1])+`)($|\\s)`,`g`))&&(d=n.replace(new RegExp(o.escapeRegExp(p[m]),`i`),function(e){var t=p[h];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+p[h].charAt(0).toUpperCase()+t.substr(1)),t}),this.insert(d),d=``)}},e.prototype.findLinkAt=function(e,t){var n,i,a=this.session.getLine(e).split(/((?:https?|ftp):\/\/[\S]+)/),o=t;o<0&&(o=0);var s=0,c=0,l;try{for(var u=r(a),d=u.next();!d.done;d=u.next()){var f=d.value;if(c=s+f.length,o>=s&&o<=c&&f.match(/((?:https?|ftp):\/\/[\S]+)/)){l=f.replace(/[\s:.,'";}\]]+$/,``);break}s=c}}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return l},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,`_blank`),t!=null},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var a=r?n.start:n.end,o=t.insert(a,t.getTextRange(n));n.start=a,n.end=o,e.setSelectionRange(n,r)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,r,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var a=i.toOrientedRange();n=this.$getSelectedRows(a),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&e==-1&&(r=0),a.moveBy(r,0),i.fromOrientedRange(a)}else{var o=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var s=0,c=0,l=o.length,u=0;u<l;u++){var d=u;o[u].moveBy(s,0),n=this.$getSelectedRows(o[u]);for(var f=n.first,p=n.last;++u<l;){c&&o[u].moveBy(c,0);var m=this.$getSelectedRows(o[u]);if(t&&m.first!=p||!t&&m.first>p+1)break;p=m.last}for(u--,s=this.session.$moveLines(f,p,t?0:e),t&&e==-1&&(d=u+1);d<=u;)o[d].moveBy(s,0),d++;t||(s=0),c+=s}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):t===!1&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var a=n.scrollTop;n.scrollBy(0,i*r.lineHeight),t!=null&&n.scrollCursorIntoView(null,.5),n.animateScrolling(a)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new y(this.session,n.row,n.column),i=r.getCurrentToken(),a=0;i&&i.type.indexOf(`tag-name`)!==-1&&(i=r.stepBackward());var o=i||r.stepForward();if(o){var s,c=!1,l={},u=n.column-o.start,d,f={")":`(`,"(":`(`,"]":`[`,"[":`[`,"{":`{`,"}":`{`};do{if(o.value.match(/[{}()\[\]]/g)){for(;u<o.value.length&&!c;u++)if(f[o.value[u]])switch(d=f[o.value[u]]+`.`+o.type.replace(`rparen`,`lparen`),isNaN(l[d])&&(l[d]=0),o.value[u]){case`(`:case`[`:case`{`:l[d]++;break;case`)`:case`]`:case`}`:l[d]--,l[d]===-1&&(s=`bracket`,c=!0);break}}else o.type.indexOf(`tag-name`)!==-1&&(isNaN(l[o.value])&&(l[o.value]=0),i.value===`<`&&a>1?l[o.value]++:i.value===`</`&&l[o.value]--,l[o.value]===-1&&(s=`tag`,c=!0));c||(i=o,a++,o=r.stepForward(),u=0)}while(o&&!c);if(s){var p,h;if(s===`bracket`)p=this.session.getBracketRange(n),p||(p=new m(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+u-1,r.getCurrentTokenRow(),r.getCurrentTokenColumn()+u-1),h=p.start,(t||h.row===n.row&&Math.abs(h.column-n.column)<2)&&(p=this.session.getBracketRange(h)));else if(s===`tag`){if(!o||o.type.indexOf(`tag-name`)===-1)return;if(p=new m(r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2,r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2),p.compare(n.row,n.column)===0){var g=this.session.getMatchingTags(n);g&&(g.openTag.contains(n.row,n.column)?(p=g.closeTag,h=p.start):(p=g.openTag,h=g.closeTag.start.row===n.row&&g.closeTag.start.column===n.column?p.end:p.start))}h||=p.start}h=p&&p.cursor||h,h&&(e?p&&t?this.selection.setRange(p):p&&p.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(h.row,h.column):this.selection.moveTo(h.row,h.column))}}},e.prototype.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},e.prototype.navigateTo=function(e,t){this.selection.moveTo(e,t)},e.prototype.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},e.prototype.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},e.prototype.navigateLeft=function(e){if(this.selection.isEmpty())for(e||=1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateRight=function(e){if(this.selection.isEmpty())for(e||=1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},e.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},e.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},e.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},e.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},e.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},e.prototype.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),r):r},e.prototype.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var a=n.length-1;a>=0;--a)this.$tryReplace(n[a],e)&&r++;return this.selection.setSelectionRange(i),r},e.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),t===null?null:(e.end=this.session.replace(e,t),e)},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||={},typeof e==`string`||e instanceof RegExp?t.needle=e:typeof e==`object`&&i.mixin(t,e);var r=this.selection.getRange();t.needle??(e=this.session.getTextRange(r)||this.$search.$options.needle,e||=(r=this.session.getWordRange(r.start.row,r.start.column),this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var a=this.$search.find(this.session);if(t.preventScroll)return a;if(a)return this.revealRange(a,n),a;t.backwards?r.start=r.end:r.end=r.start,this.selection.setRange(r)},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(n)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&=(this.$toDestroy.forEach(function(e){e.destroy()}),[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal(`destroy`,this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||=document.createElement(`div`);var i=this.$scrollAnchor;i.style.cssText=`position:absolute`,this.container.insertBefore(i,this.container.firstChild);var a=this.on(`changeSelection`,function(){r=!0}),o=this.renderer.on(`beforeRender`,function(){r&&(t=n.renderer.container.getBoundingClientRect())}),s=this.renderer.on(`afterRender`,function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,a=e.$cursorLayer.$pixelPos,o=e.layerConfig,s=a.top-o.offset;r=a.top>=0&&s+t.top<0?!0:a.top<o.height&&a.top+t.top+o.lineHeight>window.innerHeight?!1:null,r!=null&&(i.style.top=s+`px`,i.style.left=a.left+`px`,i.style.height=o.lineHeight+`px`,i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off(`changeSelection`,a),this.renderer.off(`afterRender`,s),this.renderer.off(`beforeRender`,o))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||`ace`,t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&e!=`wide`,a.setCssClass(t.element,`ace_slim-cursors`,/slim/.test(e)))},e.prototype.prompt=function(e,t,n){var r=this;v.loadModule(`ace/ext/prompt`,function(i){i.prompt(r,e,t,n)})},Object.defineProperty(e.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||=new T(this.container)},set:function(e){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=e},enumerable:!1,configurable:!0}),e}();E.$uid=0,E.prototype.curOp=null,E.prototype.prevOp={},E.prototype.$mergeableCommands=[`backspace`,`del`,`insertstring`],E.prototype.$toggleWordPairs=[[`first`,`last`],[`true`,`false`],[`yes`,`no`],[`width`,`height`],[`top`,`bottom`],[`right`,`left`],[`on`,`off`],[`x`,`y`],[`get`,`set`],[`max`,`min`],[`horizontal`,`vertical`],[`show`,`hide`],[`add`,`remove`],[`up`,`down`],[`before`,`after`],[`even`,`odd`],[`in`,`out`],[`inside`,`outside`],[`next`,`previous`],[`increase`,`decrease`],[`attach`,`detach`],[`&&`,`||`],[`==`,`!=`]],i.implement(E.prototype,h),v.defineOptions(E.prototype,`editor`,{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal(`changeSelectionStyle`,{data:e})},initialValue:`line`},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){var t=this;if(this.textInput.setReadOnly(e),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||=function(e){var n=!1;if(e&&e.type==`keydown`){if(e&&e.key&&!e.ctrlKey&&!e.metaKey&&(e.key==` `&&e.preventDefault(),n=e.key.length==1),!n)return}else e&&e.type!==`exec`&&(n=!0);if(n){var r=a.createElement(`div`);r.textContent=x(`editor.tooltip.disable-editing`,`Editing is disabled`),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),r)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()};var n=this.textInput.getElement();e?(w.addListener(n,`keydown`,this.$readOnlyCallback,this),this.commands.on(`exec`,this.$readOnlyCallback),this.commands.on(`commandUnavailable`,this.$readOnlyCallback)):(w.removeListener(n,`keydown`,this.$readOnlyCallback),this.commands.off(`exec`,this.$readOnlyCallback),this.commands.off(`commandUnavailable`,this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:[`ace`,`slim`,`smooth`,`wide`],initialValue:`ace`},mergeUndoDeltas:{values:[!1,!0,`always`],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?D.attach(this):D.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?D.attach(this):D.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off(`afterRender`,this.$updatePlaceholder),a.removeCssClass(this.container,`ace_hasPlaceholder`),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!e&&!this.renderer.placeholderNode){this.renderer.on(`afterRender`,this.$updatePlaceholder),a.addCssClass(this.container,`ace_hasPlaceholder`);var t=a.createElement(`div`);t.className=`ace_placeholder`,t.textContent=this.$placeholder||``,this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}else !e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||``)}.bind(this),this.on(`input`,this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t={name:`blurTextInput`,description:`Set focus to the editor content div to allow tabbing through the page`,bindKey:`Esc`,exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},n=function(e){if(e.target==this.renderer.scroller&&e.keyCode===C.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}},r;e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName=`ace_keyboard-focus`,this.textInput.getElement().setAttribute(`tabindex`,-1),this.textInput.setNumberOfExtraLines(s.isWin?3:0),this.renderer.scroller.setAttribute(`tabindex`,0),this.renderer.scroller.setAttribute(`role`,`group`),this.renderer.scroller.setAttribute(`aria-roledescription`,x(`editor.scroller.aria-roledescription`,`editor`)),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute(`aria-label`,x(`editor.scroller.aria-label`,`Editor content, press Enter to start editing, press Escape to exit`)),this.renderer.scroller.addEventListener(`keyup`,n.bind(this)),this.commands.addCommand(t),this.renderer.$gutter.setAttribute(`tabindex`,0),this.renderer.$gutter.setAttribute(`aria-hidden`,!1),this.renderer.$gutter.setAttribute(`role`,`group`),this.renderer.$gutter.setAttribute(`aria-roledescription`,x(`editor.gutter.aria-roledescription`,`editor gutter`)),this.renderer.$gutter.setAttribute(`aria-label`,x(`editor.gutter.aria-label`,`Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit`)),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute(`aria-hidden`,!0),r||=new b(this),r.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute(`tabindex`,0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute(`tabindex`,-1),this.renderer.scroller.removeAttribute(`role`),this.renderer.scroller.removeAttribute(`aria-roledescription`),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute(`aria-label`),this.renderer.scroller.removeEventListener(`keyup`,n.bind(this)),this.commands.removeCommand(t),this.renderer.content.removeAttribute(`aria-hidden`),this.renderer.$gutter.setAttribute(`tabindex`,-1),this.renderer.$gutter.setAttribute(`aria-hidden`,!0),this.renderer.$gutter.removeAttribute(`role`),this.renderer.$gutter.removeAttribute(`aria-roledescription`),this.renderer.$gutter.removeAttribute(`aria-label`),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),r&&r.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:``},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},initialValue:!0},customScrollbar:`renderer`,hScrollBarAlwaysVisible:`renderer`,vScrollBarAlwaysVisible:`renderer`,highlightGutterLine:`renderer`,animatedScroll:`renderer`,showInvisibles:`renderer`,showPrintMargin:`renderer`,printMarginColumn:`renderer`,printMargin:`renderer`,fadeFoldWidgets:`renderer`,showFoldWidgets:`renderer`,displayIndentGuides:`renderer`,highlightIndentGuides:`renderer`,showGutter:`renderer`,fontSize:`renderer`,fontFamily:`renderer`,maxLines:`renderer`,minLines:`renderer`,scrollPastEnd:`renderer`,fixedWidthGutter:`renderer`,theme:`renderer`,hasCssTransforms:`renderer`,maxPixelHeight:`renderer`,useTextareaForIME:`renderer`,useResizeObserver:`renderer`,useSvgGutterIcons:`renderer`,showFoldedAnnotations:`renderer`,scrollSpeed:`$mouseHandler`,dragDelay:`$mouseHandler`,dragEnabled:`$mouseHandler`,focusTimeout:`$mouseHandler`,firstLineNumber:`session`,overwrite:`session`,newLineMode:`session`,useWorker:`session`,useSoftTabs:`session`,navigateWithinSoftTabs:`session`,tabSize:`session`,wrap:`session`,indentedSoftWrap:`session`,foldStyle:`session`,mode:`session`});var D={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?`·`:``))+``},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on(`changeSelection`,this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off(`changeSelection`,this.update),this.update(null,e)}};t.Editor=E}),ace.define(`ace/layer/lines`,[`require`,`exports`,`module`,`ace/lib/dom`],function(e,t,n){var r=e("../lib/dom");t.Lines=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=this.canvasHeight*2+`px`,this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){r.translate(this.element,0,-(e.firstRowScreen*e.lineHeight%this.canvasHeight)-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var r=t.firstRowScreen*t.lineHeight,i=Math.floor(r/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-i*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},e.prototype.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement(`afterbegin`,e.element)},e.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},e.prototype.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},e.prototype.createCell=function(e,t,n,i){var a=this.cellCache.pop();if(!a){var o=r.createElement(`div`);i&&i(o),this.element.appendChild(o),a={element:o,text:``,row:e}}return a.row=e,a},e}()}),ace.define(`ace/layer/gutter`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/lib/oop`,`ace/lib/lang`,`ace/lib/event_emitter`,`ace/layer/lines`,`ace/config`],function(e,t,n){var r=e("../lib/dom"),i=e("../lib/oop"),a=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,s=e("./lines").Lines,c=e("../config").nls,l=function(){function e(e){this.$showCursorMarker=null,this.element=r.createElement(`div`),this.element.className=`ace_layer ace_gutter-layer`,e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new s(this.element),this.$lines.$offsetCoefficient=1}return e.prototype.setSession=function(e){this.session&&this.session.off(`change`,this.$updateAnnotations),this.session=e,e&&e.on(`change`,this.$updateAnnotations)},e.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn(`deprecated use session.addGutterDecoration`),this.session.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn(`deprecated use session.removeGutterDecoration`),this.session.removeGutterDecoration(e,t)},e.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=this.$annotations[r];i||=this.$annotations[r]={text:[],type:[],displayText:[]};var o=n.text,s=n.text,c=n.type;o=o?a.escapeHTML(o):n.html||``,s=s||n.html||``,i.text.indexOf(o)===-1&&(i.text.push(o),i.type.push(c),i.displayText.push(s));var l=n.className;l?i.className=l:c===`error`?i.className=` ace_error`:c===`security`&&!/\bace_error\b/.test(i.className)?i.className=` ace_security`:c===`warning`&&!/\bace_(error|security)\b/.test(i.className)?i.className=` ace_warning`:c===`info`&&!i.className?i.className=` ace_info`:c===`hint`&&!i.className&&(i.className=` ace_hint`)}},e.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(n!==0)if(e.action==`remove`)this.$annotations.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.$annotations.splice.apply(this.$annotations,r)}}},e.prototype.update=function(e){this.config=e;var t=this.session,n=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=r,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var i=t.getNextFoldLine(n),a=i?i.start.row:1/0,o=null,s=-1,c=n;;){if(c>a&&(c=i.end.row+1,i=t.getNextFoldLine(c,i),a=i?i.start.row:1/0),c>r){for(;this.$lines.getLength()>s+1;)this.$lines.pop();break}o=this.$lines.get(++s),o?o.row=c:(o=this.$lines.createCell(c,e,this.session,u),this.$lines.push(o)),this.$renderCell(o,e,i,c),c++}this._signal(`afterRender`),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:``;(this.$fixedWidth||t.$useWrapMode)&&(i=t.getLength()+r-1);var a=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,o=this.$padding||this.$computePadding();a+=o.left+o.right,a!==this.gutterWidth&&!isNaN(a)&&(this.gutterWidth=a,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+`px`,this._signal(`changeGutterWidth`,a))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace(`ace_gutter-active-line `,``));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var r=t[n];if(r.row>=this.$cursorRow){if(r.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(n>0&&i&&i.start.row==t[n-1].row)r=t[n-1];else break}r.element.className=`ace_gutter-active-line `+r.element.className,this.$cursorCell=r;break}}}}},e.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=r.createElement(`div`),this.$highlightElement.className=`ace_gutter-cursor`,this.$highlightElement.style.pointerEvents=`none`,this.element.appendChild(this.$highlightElement));var t=e.selection.cursor,n=this.config,i=this.$lines,a=n.firstRowScreen*n.lineHeight,o=Math.floor(a/i.canvasHeight),s=e.documentToScreenRow(t)*n.lineHeight-o*i.canvasHeight;r.setStyle(this.$highlightElement.style,`height`,n.lineHeight+`px`),r.setStyle(this.$highlightElement.style,`top`,s+`px`)}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;if(this.oldLastRow=n,!t||r<e.firstRow||n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(r>n)for(var i=this.session.getFoldedRowCount(n+1,r);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>r&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal(`afterRender`),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){for(var r=[],i=t,a=this.session.getNextFoldLine(i),o=a?a.start.row:1/0;i>o&&(i=a.end.row+1,a=this.session.getNextFoldLine(i,a),o=a?a.start.row:1/0),!(i>n);){var s=this.$lines.createCell(i,e,this.session,u);this.$renderCell(s,e,a,i),r.push(s),i++}return r},e.prototype.$renderCell=function(e,t,n,i){var a=e.element,o=this.session,s=a.childNodes[0],l=a.childNodes[1],u=a.childNodes[2],d=a.childNodes[3],f=u.firstChild,p=o.$firstLineNumber,m=o.$breakpoints,h=o.$decorations,g=o.gutterRenderer||this.$renderer,_=this.$showFoldWidgets&&o.foldWidgets,v=n?n.start.row:Number.MAX_VALUE,y=t.lineHeight+`px`,b=this.$useSvgGutterIcons?`ace_gutter-cell_svg-icons `:`ace_gutter-cell `,x=this.$useSvgGutterIcons?`ace_icon_svg`:`ace_icon`,S=(g?g.getText(o,i):i+p).toString();if(this.$highlightGutterLine&&(i==this.$cursorRow||n&&i<this.$cursorRow&&i>=v&&this.$cursorRow<=n.end.row)&&(b+=`ace_gutter-active-line `,this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace(`ace_gutter-active-line `,``)),this.$cursorCell=e)),m[i]&&(b+=m[i]),h[i]&&(b+=h[i]),this.$annotations[i]&&i!==v&&(b+=this.$annotations[i].className),_){var C=_[i];C??=_[i]=o.getFoldWidget(i)}if(C){var w=`ace_fold-widget ace_`+C,T=C==`start`&&i==v&&i<n.end.row;if(T){w+=` ace_closed`;for(var E=``,D=!1,O=i+1;O<=n.end.row;O++)if(this.$annotations[O]){if(this.$annotations[O].className===` ace_error`){D=!0,E=` ace_error_fold`;break}this.$annotations[O].className===` ace_security`?(D=!0,E=` ace_security_fold`):this.$annotations[O].className===` ace_warning`&&E!==` ace_security_fold`&&(D=!0,E=` ace_warning_fold`)}b+=E}else w+=` ace_open`;l.className!=w&&(l.className=w),r.setStyle(l.style,`height`,y),r.setStyle(l.style,`display`,`inline-block`),l.setAttribute(`role`,`button`),l.setAttribute(`tabindex`,`-1`);var k=o.getFoldWidgetRange(i);k?l.setAttribute(`aria-label`,c(`gutter.code-folding.range.aria-label`,`Toggle code folding, rows $0 through $1`,[k.start.row+1,k.end.row+1])):n?l.setAttribute(`aria-label`,c(`gutter.code-folding.closed.aria-label`,`Toggle code folding, rows $0 through $1`,[n.start.row+1,n.end.row+1])):l.setAttribute(`aria-label`,c(`gutter.code-folding.open.aria-label`,`Toggle code folding, row $0`,[i+1])),T?(l.setAttribute(`aria-expanded`,`false`),l.setAttribute(`title`,c(`gutter.code-folding.closed.title`,`Unfold code`))):(l.setAttribute(`aria-expanded`,`true`),l.setAttribute(`title`,c(`gutter.code-folding.open.title`,`Fold code`)))}else l&&(r.setStyle(l.style,`display`,`none`),l.setAttribute(`tabindex`,`0`),l.removeAttribute(`role`),l.removeAttribute(`aria-label`));var A=this.session.$gutterCustomWidgets[i];if(A?this.$addCustomWidget(i,A,e):d&&this.$removeCustomWidget(i,e),D&&this.$showFoldedAnnotations){u.className=`ace_gutter_annotation`,f.className=x,f.className+=E,r.setStyle(f.style,`height`,y),r.setStyle(u.style,`display`,`block`),r.setStyle(u.style,`height`,y);var j;switch(E){case` ace_error_fold`:j=c(`gutter.annotation.aria-label.error`,`Error, read annotations row $0`,[S]);break;case` ace_security_fold`:j=c(`gutter.annotation.aria-label.security`,`Security finding, read annotations row $0`,[S]);break;case` ace_warning_fold`:j=c(`gutter.annotation.aria-label.warning`,`Warning, read annotations row $0`,[S]);break}u.setAttribute(`aria-label`,j),u.setAttribute(`tabindex`,`-1`),u.setAttribute(`role`,`button`)}else if(this.$annotations[i]){u.className=`ace_gutter_annotation`,f.className=x,this.$useSvgGutterIcons?f.className+=this.$annotations[i].className:a.classList.add(this.$annotations[i].className.replace(` `,``)),r.setStyle(f.style,`height`,y),r.setStyle(u.style,`display`,`block`),r.setStyle(u.style,`height`,y);var j;switch(this.$annotations[i].className){case` ace_error`:j=c(`gutter.annotation.aria-label.error`,`Error, read annotations row $0`,[S]);break;case` ace_security`:j=c(`gutter.annotation.aria-label.security`,`Security finding, read annotations row $0`,[S]);break;case` ace_warning`:j=c(`gutter.annotation.aria-label.warning`,`Warning, read annotations row $0`,[S]);break;case` ace_info`:j=c(`gutter.annotation.aria-label.info`,`Info, read annotations row $0`,[S]);break;case` ace_hint`:j=c(`gutter.annotation.aria-label.hint`,`Suggestion, read annotations row $0`,[S]);break}u.setAttribute(`aria-label`,j),u.setAttribute(`tabindex`,`-1`),u.setAttribute(`role`,`button`)}else r.setStyle(u.style,`display`,`none`),u.removeAttribute(`aria-label`),u.removeAttribute(`role`),u.setAttribute(`tabindex`,`0`);return S!==s.data&&(s.data=S),a.className!=b&&(a.className=b),r.setStyle(e.element.style,`height`,this.$lines.computeLineHeight(i,t,o)+`px`),r.setStyle(e.element.style,`top`,this.$lines.computeLineTop(i,t,o)+`px`),e.text=S,u.style.display===`none`&&l.style.display===`none`&&!A?e.element.setAttribute(`aria-hidden`,!0):e.element.setAttribute(`aria-hidden`,!1),e},e.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e,!e&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},e.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return``}}},e.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},e.prototype.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,`ace_folding-enabled`):r.removeCssClass(this.element,`ace_folding-enabled`),this.$showFoldWidgets=e,this.$padding=null},e.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},e.prototype.$hideFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var i=n.element.childNodes[1];i&&r.setStyle(i.style,`display`,`none`)}},e.prototype.$showFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var i=n.element.childNodes[1];i&&this.session.foldWidgets&&this.session.foldWidgets[n.row]&&r.setStyle(i.style,`display`,`inline-block`)}},e.prototype.$getGutterCell=function(e){var t=this.$lines.cells,n=0,r=t.length-1;if(!(e<t[0].row||e>t[r].row)){for(;n<=r;){var i=Math.floor((n+r)/2),a=t[i];if(a.row>e)r=i-1;else if(a.row<e)n=i+1;else return a}return a}},e.prototype.$addCustomWidget=function(e,t,n){var i=t.className,a=t.label,o=t.title,s=t.callbacks;this.session.$gutterCustomWidgets[e]={className:i,label:a,title:o,callbacks:s},this.$hideFoldWidget(e,n);var c=n||this.$getGutterCell(e);if(c&&c.element){var l=c.element.querySelector(`.ace_custom-widget`);l&&l.remove(),l=r.createElement(`span`),l.className=`ace_custom-widget ${i}`,l.setAttribute(`tabindex`,`-1`),l.setAttribute(`role`,`button`),l.setAttribute(`aria-label`,a),l.setAttribute(`title`,o),r.setStyle(l.style,`display`,`inline-block`),r.setStyle(l.style,`height`,`inherit`),s&&s.onClick&&l.addEventListener(`click`,function(t){s.onClick(t,e),t.stopPropagation()}),c.element.appendChild(l)}},e.prototype.$removeCustomWidget=function(e,t){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,t);var n=t||this.$getGutterCell(e);if(n&&n.element){var r=n.element.querySelector(`.ace_custom-widget`);r&&n.element.removeChild(r)}},e.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},e.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();if(e.x<t.left+n.left)return`markers`;if(this.$showFoldWidgets&&e.x>n.right-t.right)return`foldWidgets`},e}();l.prototype.$fixedWidth=!1,l.prototype.$highlightGutterLine=!0,l.prototype.$renderer=void 0,l.prototype.$showLineNumbers=!0,l.prototype.$showFoldWidgets=!0,i.implement(l.prototype,o);function u(e){var t=document.createTextNode(``);e.appendChild(t);var n=r.createElement(`span`);e.appendChild(n);var i=r.createElement(`span`);e.appendChild(i);var a=r.createElement(`span`);return i.appendChild(a),e}t.Gutter=l}),ace.define(`ace/layer/marker`,[`require`,`exports`,`module`,`ace/range`,`ace/lib/dom`],function(e,t,n){var r=e("../range").Range,i=e("../lib/dom"),a=function(){function e(e){this.element=i.createElement(`div`),this.element.className=`ace_layer ace_marker-layer`,e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement(`div`),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},e.prototype.update=function(e){if(e){this.config=e,this.i=0;var t;for(var n in this.markers){var r=this.markers[n];if(!r.range){r.update(t,this,this.session,e);continue}var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var a=this.$getTop(i.start.row,e),o=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,o,a,e)}else r.type==`fullLine`?this.drawFullLineMarker(t,i,r.clazz,e):r.type==`screenLine`?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?r.type==`text`?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+` ace_start ace_br15`,e)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},e.prototype.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},e.prototype.drawTextMarker=function(e,t,n,i,a){for(var s=this.session,c=t.start.row,l=t.end.row,u=c,d=0,f=0,p=s.getScreenLastRowColumn(u),m=new r(u,t.start.column,u,f);u<=l;u++)m.start.row=m.end.row=u,m.start.column=u==c?t.start.column:s.getRowWrapIndent(u),m.end.column=p,d=f,f=p,p=u+1<l?s.getScreenLastRowColumn(u+1):u==l?0:t.end.column,this.drawSingleLineMarker(e,m,n+(u==c?` ace_start`:``)+` ace_br`+o(u==c||u==c+1&&t.start.column,d<f,f>p,u==l),i,u==l?0:1,a)},e.prototype.drawMultiLineMarker=function(e,t,n,r,i){var a=this.$padding,o=r.lineHeight,s=this.$getTop(t.start.row,r),c=a+t.start.column*r.characterWidth;if(i||=``,this.session.$bidiHandler.isBidiRow(t.start.row)){var l=t.clone();l.end.row=l.start.row,l.end.column=this.session.getLine(l.start.row).length,this.drawBidiSingleLineMarker(e,l,n+` ace_br1 ace_start`,r,null,i)}else this.elt(n+` ace_br1 ace_start`,`height:`+o+`px;right:`+a+`px;top:`+s+`px;left:`+c+`px;`+(i||``));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var l=t.clone();l.start.row=l.end.row,l.start.column=0,this.drawBidiSingleLineMarker(e,l,n+` ace_br12`,r,null,i)}else{s=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;this.elt(n+` ace_br12`,`height:`+o+`px;width:`+u+`px;top:`+s+`px;left:`+a+`px;`+(i||``))}if(o=(t.end.row-t.start.row-1)*r.lineHeight,!(o<=0)){s=this.$getTop(t.start.row+1,r);var d=!!t.start.column|(t.end.column?0:8);this.elt(n+(d?` ace_br`+d:``),`height:`+o+`px;right:`+a+`px;top:`+s+`px;left:`+a+`px;`+(i||``))}},e.prototype.drawSingleLineMarker=function(e,t,n,r,i,a){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,i,a);var o=r.lineHeight,s=(t.end.column+(i||0)-t.start.column)*r.characterWidth,c=this.$getTop(t.start.row,r),l=this.$padding+t.start.column*r.characterWidth;this.elt(n,`height:`+o+`px;width:`+s+`px;top:`+c+`px;left:`+l+`px;`+(a||``))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,r,i,a){var o=r.lineHeight,s=this.$getTop(t.start.row,r),c=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(e){this.elt(n,`height:`+o+`px;width:`+(e.width+(i||0))+`px;top:`+s+`px;left:`+(c+e.left)+`px;`+(a||``))},this)},e.prototype.drawFullLineMarker=function(e,t,n,r,i){var a=this.$getTop(t.start.row,r),o=r.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,r)-a),this.elt(n,`height:`+o+`px;top:`+a+`px;left:0;right:0;`+(i||``))},e.prototype.drawScreenLineMarker=function(e,t,n,r,i){var a=this.$getTop(t.start.row,r),o=r.lineHeight;this.elt(n,`height:`+o+`px;top:`+a+`px;left:0;right:0;`+(i||``))},e}();a.prototype.$padding=0;function o(e,t,n,r){return!!e|(t?2:0)|(n?4:0)|(r?8:0)}t.Marker=a}),ace.define(`ace/layer/text_util`,[`require`,`exports`,`module`],function(e,t,n){var r=new Set([`text`,`rparen`,`lparen`]);t.isTextToken=function(e){return r.has(e)}}),ace.define(`ace/layer/text`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/dom`,`ace/lib/lang`,`ace/layer/lines`,`ace/lib/event_emitter`,`ace/config`,`ace/layer/text_util`],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),a=e("../lib/lang"),o=e("./lines").Lines,s=e("../lib/event_emitter").EventEmitter,c=e("../config").nls,l=e("./text_util").isTextToken,u=function(){function e(e){this.dom=i,this.element=this.dom.createElement(`div`),this.element.className=`ace_layer ace_text-layer`,e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t=e.getNewLineCharacter()==`
209
+ `),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(t!==0){var n=this.session.getLine(e.row),r,i;t<n.length?(r=n.charAt(t)+n.charAt(t-1),i=new m(e.row,t-1,e.row,t+1)):(r=n.charAt(t-1)+n.charAt(t-2),i=new m(e.row,t-2,e.row,t)),this.session.replace(i,r),this.session.selection.moveToPosition(i.end)}}},e.prototype.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},e.prototype.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},e.prototype.indent=function(){var e=this.session,t=this.getSelectionRange();if(t.start.row<t.end.row){var n=this.$getSelectedRows();e.indentRows(n.first,n.last,` `);return}else if(t.start.column<t.end.column){var r=e.getTextRange(t);if(!/^\s+$/.test(r)){var n=this.$getSelectedRows();e.indentRows(n.first,n.last,` `);return}}var i=e.getLine(t.start.row),a=t.start,s=e.getTabSize(),c=e.documentToScreenColumn(a.row,a.column);if(this.session.getUseSoftTabs())var l=s-c%s,u=o.stringRepeat(` `,l);else{for(var l=c%s;i[t.start.column-1]==` `&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),u=` `}return this.insert(u)},e.prototype.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,` `)},e.prototype.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},e.prototype.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],r=e.first;r<=e.last;r++)n.push(t.getLine(r));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:+(e.toLowerCase()>t.toLowerCase())});for(var i=new m(0,0,0,0),r=e.first;r<=e.last;r++){var a=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=a.length,t.replace(i,n[r-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex<t;){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t)return{value:i[0],start:i.index,end:i.index+i[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new m(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var a=this.getNumberAt(t,n);if(a){var o=a.value.indexOf(`.`)>=0?a.start+a.value.indexOf(`.`)+1:a.end,s=a.start+a.value.length-o,c=parseFloat(a.value);c*=10**s,o!==a.end&&n<o?e*=10**(a.end-n-1):e*=10**(a.end-n),c+=e,c/=10**s;var l=c.toFixed(s),u=new m(t,a.start,t,a.end);this.session.replace(u,l),this.moveCursorTo(t,Math.max(a.start+1,n+l.length-a.value.length))}}else this.toggleWord()},e.prototype.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),r=this.selection.getWordRange().start.column,i=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,`$1 `).split(/\s/),a=t-r-1;a<0&&(a=0);var s=0,c=0,l=this;n.match(/[A-Za-z0-9_]+/)&&i.forEach(function(t,i){c=s+t.length,a>=s&&a<=c&&(n=t,l.selection.clearSelection(),l.moveCursorTo(e,s+r),l.selection.selectTo(e,c+r)),s=c});for(var u=this.$toggleWordPairs,d,f=0;f<u.length;f++)for(var p=u[f],m=0;m<=1;m++){var h=+!m,g=n.match(RegExp(`^\\s?_?(`+o.escapeRegExp(p[m])+`)\\s?$`,`i`));g&&n.match(RegExp(`([_]|^|\\s)(`+o.escapeRegExp(g[1])+`)($|\\s)`,`g`))&&(d=n.replace(new RegExp(o.escapeRegExp(p[m]),`i`),function(e){var t=p[h];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+p[h].charAt(0).toUpperCase()+t.substr(1)),t}),this.insert(d),d=``)}},e.prototype.findLinkAt=function(e,t){var n,i,a=this.session.getLine(e).split(/((?:https?|ftp):\/\/[\S]+)/),o=t;o<0&&(o=0);var s=0,c=0,l;try{for(var u=r(a),d=u.next();!d.done;d=u.next()){var f=d.value;if(c=s+f.length,o>=s&&o<=c&&f.match(/((?:https?|ftp):\/\/[\S]+)/)){l=f.replace(/[\s:.,'";}\]]+$/,``);break}s=c}}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return l},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,`_blank`),t!=null},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var a=r?n.start:n.end,o=t.insert(a,t.getTextRange(n));n.start=a,n.end=o,e.setSelectionRange(n,r)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,r,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var a=i.toOrientedRange();n=this.$getSelectedRows(a),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&e==-1&&(r=0),a.moveBy(r,0),i.fromOrientedRange(a)}else{var o=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var s=0,c=0,l=o.length,u=0;u<l;u++){var d=u;o[u].moveBy(s,0),n=this.$getSelectedRows(o[u]);for(var f=n.first,p=n.last;++u<l;){c&&o[u].moveBy(c,0);var m=this.$getSelectedRows(o[u]);if(t&&m.first!=p||!t&&m.first>p+1)break;p=m.last}for(u--,s=this.session.$moveLines(f,p,t?0:e),t&&e==-1&&(d=u+1);d<=u;)o[d].moveBy(s,0),d++;t||(s=0),c+=s}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):t===!1&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var a=n.scrollTop;n.scrollBy(0,i*r.lineHeight),t!=null&&n.scrollCursorIntoView(null,.5),n.animateScrolling(a)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new y(this.session,n.row,n.column),i=r.getCurrentToken(),a=0;i&&i.type.indexOf(`tag-name`)!==-1&&(i=r.stepBackward());var o=i||r.stepForward();if(o){var s,c=!1,l={},u=n.column-o.start,d,f={")":`(`,"(":`(`,"]":`[`,"[":`[`,"{":`{`,"}":`{`};do{if(o.value.match(/[{}()\[\]]/g)){for(;u<o.value.length&&!c;u++)if(f[o.value[u]])switch(d=f[o.value[u]]+`.`+o.type.replace(`rparen`,`lparen`),isNaN(l[d])&&(l[d]=0),o.value[u]){case`(`:case`[`:case`{`:l[d]++;break;case`)`:case`]`:case`}`:l[d]--,l[d]===-1&&(s=`bracket`,c=!0);break}}else o.type.indexOf(`tag-name`)!==-1&&(isNaN(l[o.value])&&(l[o.value]=0),i.value===`<`&&a>1?l[o.value]++:i.value===`</`&&l[o.value]--,l[o.value]===-1&&(s=`tag`,c=!0));c||(i=o,a++,o=r.stepForward(),u=0)}while(o&&!c);if(s){var p,h;if(s===`bracket`)p=this.session.getBracketRange(n),p||(p=new m(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+u-1,r.getCurrentTokenRow(),r.getCurrentTokenColumn()+u-1),h=p.start,(t||h.row===n.row&&Math.abs(h.column-n.column)<2)&&(p=this.session.getBracketRange(h)));else if(s===`tag`){if(!o||o.type.indexOf(`tag-name`)===-1)return;if(p=new m(r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2,r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2),p.compare(n.row,n.column)===0){var g=this.session.getMatchingTags(n);g&&(g.openTag.contains(n.row,n.column)?(p=g.closeTag,h=p.start):(p=g.openTag,h=g.closeTag.start.row===n.row&&g.closeTag.start.column===n.column?p.end:p.start))}h||=p.start}h=p&&p.cursor||h,h&&(e?p&&t?this.selection.setRange(p):p&&p.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(h.row,h.column):this.selection.moveTo(h.row,h.column))}}},e.prototype.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},e.prototype.navigateTo=function(e,t){this.selection.moveTo(e,t)},e.prototype.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},e.prototype.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},e.prototype.navigateLeft=function(e){if(this.selection.isEmpty())for(e||=1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateRight=function(e){if(this.selection.isEmpty())for(e||=1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},e.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},e.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},e.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},e.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},e.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},e.prototype.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),r):r},e.prototype.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var a=n.length-1;a>=0;--a)this.$tryReplace(n[a],e)&&r++;return this.selection.setSelectionRange(i),r},e.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),t===null?null:(e.end=this.session.replace(e,t),e)},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||={},typeof e==`string`||e instanceof RegExp?t.needle=e:typeof e==`object`&&i.mixin(t,e);var r=this.selection.getRange();t.needle??(e=this.session.getTextRange(r)||this.$search.$options.needle,e||=(r=this.session.getWordRange(r.start.row,r.start.column),this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var a=this.$search.find(this.session);if(t.preventScroll)return a;if(a)return this.revealRange(a,n),a;t.backwards?r.start=r.end:r.end=r.start,this.selection.setRange(r)},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(n)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&=(this.$toDestroy.forEach(function(e){e.destroy()}),[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal(`destroy`,this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||=document.createElement(`div`);var i=this.$scrollAnchor;i.style.cssText=`position:absolute`,this.container.insertBefore(i,this.container.firstChild);var a=this.on(`changeSelection`,function(){r=!0}),o=this.renderer.on(`beforeRender`,function(){r&&(t=n.renderer.container.getBoundingClientRect())}),s=this.renderer.on(`afterRender`,function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,a=e.$cursorLayer.$pixelPos,o=e.layerConfig,s=a.top-o.offset;r=a.top>=0&&s+t.top<0?!0:a.top<o.height&&a.top+t.top+o.lineHeight>window.innerHeight?!1:null,r!=null&&(i.style.top=s+`px`,i.style.left=a.left+`px`,i.style.height=o.lineHeight+`px`,i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off(`changeSelection`,a),this.renderer.off(`afterRender`,s),this.renderer.off(`beforeRender`,o))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||`ace`,t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&e!=`wide`,a.setCssClass(t.element,`ace_slim-cursors`,/slim/.test(e)))},e.prototype.prompt=function(e,t,n){var r=this;v.loadModule(`ace/ext/prompt`,function(i){i.prompt(r,e,t,n)})},Object.defineProperty(e.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||=new T(this.container)},set:function(e){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=e},enumerable:!1,configurable:!0}),e}();E.$uid=0,E.prototype.curOp=null,E.prototype.prevOp={},E.prototype.$mergeableCommands=[`backspace`,`del`,`insertstring`],E.prototype.$toggleWordPairs=[[`first`,`last`],[`true`,`false`],[`yes`,`no`],[`width`,`height`],[`top`,`bottom`],[`right`,`left`],[`on`,`off`],[`x`,`y`],[`get`,`set`],[`max`,`min`],[`horizontal`,`vertical`],[`show`,`hide`],[`add`,`remove`],[`up`,`down`],[`before`,`after`],[`even`,`odd`],[`in`,`out`],[`inside`,`outside`],[`next`,`previous`],[`increase`,`decrease`],[`attach`,`detach`],[`&&`,`||`],[`==`,`!=`]],i.implement(E.prototype,h),v.defineOptions(E.prototype,`editor`,{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal(`changeSelectionStyle`,{data:e})},initialValue:`line`},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){var t=this;if(this.textInput.setReadOnly(e),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||=function(e){var n=!1;if(e&&e.type==`keydown`){if(e&&e.key&&!e.ctrlKey&&!e.metaKey&&(e.key==` `&&e.preventDefault(),n=e.key.length==1),!n)return}else e&&e.type!==`exec`&&(n=!0);if(n){var r=a.createElement(`div`);r.textContent=x(`editor.tooltip.disable-editing`,`Editing is disabled`),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),r)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()};var n=this.textInput.getElement();e?(w.addListener(n,`keydown`,this.$readOnlyCallback,this),this.commands.on(`exec`,this.$readOnlyCallback),this.commands.on(`commandUnavailable`,this.$readOnlyCallback)):(w.removeListener(n,`keydown`,this.$readOnlyCallback),this.commands.off(`exec`,this.$readOnlyCallback),this.commands.off(`commandUnavailable`,this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:[`ace`,`slim`,`smooth`,`wide`],initialValue:`ace`},mergeUndoDeltas:{values:[!1,!0,`always`],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?D.attach(this):D.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?D.attach(this):D.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off(`afterRender`,this.$updatePlaceholder),a.removeCssClass(this.container,`ace_hasPlaceholder`),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!e&&!this.renderer.placeholderNode){this.renderer.on(`afterRender`,this.$updatePlaceholder),a.addCssClass(this.container,`ace_hasPlaceholder`);var t=a.createElement(`div`);t.className=`ace_placeholder`,t.textContent=this.$placeholder||``,this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||``)}.bind(this),this.on(`input`,this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t={name:`blurTextInput`,description:`Set focus to the editor content div to allow tabbing through the page`,bindKey:`Esc`,exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},n=function(e){if(e.target==this.renderer.scroller&&e.keyCode===C.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}},r;e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName=`ace_keyboard-focus`,this.textInput.getElement().setAttribute(`tabindex`,-1),this.textInput.setNumberOfExtraLines(s.isWin?3:0),this.renderer.scroller.setAttribute(`tabindex`,0),this.renderer.scroller.setAttribute(`role`,`group`),this.renderer.scroller.setAttribute(`aria-roledescription`,x(`editor.scroller.aria-roledescription`,`editor`)),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute(`aria-label`,x(`editor.scroller.aria-label`,`Editor content, press Enter to start editing, press Escape to exit`)),this.renderer.scroller.addEventListener(`keyup`,n.bind(this)),this.commands.addCommand(t),this.renderer.$gutter.setAttribute(`tabindex`,0),this.renderer.$gutter.setAttribute(`aria-hidden`,!1),this.renderer.$gutter.setAttribute(`role`,`group`),this.renderer.$gutter.setAttribute(`aria-roledescription`,x(`editor.gutter.aria-roledescription`,`editor gutter`)),this.renderer.$gutter.setAttribute(`aria-label`,x(`editor.gutter.aria-label`,`Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit`)),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute(`aria-hidden`,!0),r||=new b(this),r.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute(`tabindex`,0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute(`tabindex`,-1),this.renderer.scroller.removeAttribute(`role`),this.renderer.scroller.removeAttribute(`aria-roledescription`),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute(`aria-label`),this.renderer.scroller.removeEventListener(`keyup`,n.bind(this)),this.commands.removeCommand(t),this.renderer.content.removeAttribute(`aria-hidden`),this.renderer.$gutter.setAttribute(`tabindex`,-1),this.renderer.$gutter.setAttribute(`aria-hidden`,!0),this.renderer.$gutter.removeAttribute(`role`),this.renderer.$gutter.removeAttribute(`aria-roledescription`),this.renderer.$gutter.removeAttribute(`aria-label`),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),r&&r.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:``},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},initialValue:!0},customScrollbar:`renderer`,hScrollBarAlwaysVisible:`renderer`,vScrollBarAlwaysVisible:`renderer`,highlightGutterLine:`renderer`,animatedScroll:`renderer`,showInvisibles:`renderer`,showPrintMargin:`renderer`,printMarginColumn:`renderer`,printMargin:`renderer`,fadeFoldWidgets:`renderer`,showFoldWidgets:`renderer`,displayIndentGuides:`renderer`,highlightIndentGuides:`renderer`,showGutter:`renderer`,fontSize:`renderer`,fontFamily:`renderer`,maxLines:`renderer`,minLines:`renderer`,scrollPastEnd:`renderer`,fixedWidthGutter:`renderer`,theme:`renderer`,hasCssTransforms:`renderer`,maxPixelHeight:`renderer`,useTextareaForIME:`renderer`,useResizeObserver:`renderer`,useSvgGutterIcons:`renderer`,showFoldedAnnotations:`renderer`,scrollSpeed:`$mouseHandler`,dragDelay:`$mouseHandler`,dragEnabled:`$mouseHandler`,focusTimeout:`$mouseHandler`,firstLineNumber:`session`,overwrite:`session`,newLineMode:`session`,useWorker:`session`,useSoftTabs:`session`,navigateWithinSoftTabs:`session`,tabSize:`session`,wrap:`session`,indentedSoftWrap:`session`,foldStyle:`session`,mode:`session`});var D={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?`·`:``))+``},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on(`changeSelection`,this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off(`changeSelection`,this.update),this.update(null,e)}};t.Editor=E}),ace.define(`ace/layer/lines`,[`require`,`exports`,`module`,`ace/lib/dom`],function(e,t,n){var r=e("../lib/dom");t.Lines=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=this.canvasHeight*2+`px`,this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){r.translate(this.element,0,-(e.firstRowScreen*e.lineHeight%this.canvasHeight)-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var r=t.firstRowScreen*t.lineHeight,i=Math.floor(r/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-i*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},e.prototype.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement(`afterbegin`,e.element)},e.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},e.prototype.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},e.prototype.createCell=function(e,t,n,i){var a=this.cellCache.pop();if(!a){var o=r.createElement(`div`);i&&i(o),this.element.appendChild(o),a={element:o,text:``,row:e}}return a.row=e,a},e}()}),ace.define(`ace/layer/gutter`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/lib/oop`,`ace/lib/lang`,`ace/lib/event_emitter`,`ace/layer/lines`,`ace/config`],function(e,t,n){var r=e("../lib/dom"),i=e("../lib/oop"),a=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,s=e("./lines").Lines,c=e("../config").nls,l=function(){function e(e){this.$showCursorMarker=null,this.element=r.createElement(`div`),this.element.className=`ace_layer ace_gutter-layer`,e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new s(this.element),this.$lines.$offsetCoefficient=1}return e.prototype.setSession=function(e){this.session&&this.session.off(`change`,this.$updateAnnotations),this.session=e,e&&e.on(`change`,this.$updateAnnotations)},e.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn(`deprecated use session.addGutterDecoration`),this.session.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn(`deprecated use session.removeGutterDecoration`),this.session.removeGutterDecoration(e,t)},e.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=this.$annotations[r];i||=this.$annotations[r]={text:[],type:[],displayText:[]};var o=n.text,s=n.text,c=n.type;o=o?a.escapeHTML(o):n.html||``,s=s||n.html||``,i.text.indexOf(o)===-1&&(i.text.push(o),i.type.push(c),i.displayText.push(s));var l=n.className;l?i.className=l:c===`error`?i.className=` ace_error`:c===`security`&&!/\bace_error\b/.test(i.className)?i.className=` ace_security`:c===`warning`&&!/\bace_(error|security)\b/.test(i.className)?i.className=` ace_warning`:c===`info`&&!i.className?i.className=` ace_info`:c===`hint`&&!i.className&&(i.className=` ace_hint`)}},e.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(n!==0)if(e.action==`remove`)this.$annotations.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.$annotations.splice.apply(this.$annotations,r)}}},e.prototype.update=function(e){this.config=e;var t=this.session,n=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=r,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var i=t.getNextFoldLine(n),a=i?i.start.row:1/0,o=null,s=-1,c=n;;){if(c>a&&(c=i.end.row+1,i=t.getNextFoldLine(c,i),a=i?i.start.row:1/0),c>r){for(;this.$lines.getLength()>s+1;)this.$lines.pop();break}o=this.$lines.get(++s),o?o.row=c:(o=this.$lines.createCell(c,e,this.session,u),this.$lines.push(o)),this.$renderCell(o,e,i,c),c++}this._signal(`afterRender`),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:``;(this.$fixedWidth||t.$useWrapMode)&&(i=t.getLength()+r-1);var a=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,o=this.$padding||this.$computePadding();a+=o.left+o.right,a!==this.gutterWidth&&!isNaN(a)&&(this.gutterWidth=a,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+`px`,this._signal(`changeGutterWidth`,a))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace(`ace_gutter-active-line `,``));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var r=t[n];if(r.row>=this.$cursorRow){if(r.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(n>0&&i&&i.start.row==t[n-1].row)r=t[n-1];else break}r.element.className=`ace_gutter-active-line `+r.element.className,this.$cursorCell=r;break}}}}},e.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=r.createElement(`div`),this.$highlightElement.className=`ace_gutter-cursor`,this.$highlightElement.style.pointerEvents=`none`,this.element.appendChild(this.$highlightElement));var t=e.selection.cursor,n=this.config,i=this.$lines,a=n.firstRowScreen*n.lineHeight,o=Math.floor(a/i.canvasHeight),s=e.documentToScreenRow(t)*n.lineHeight-o*i.canvasHeight;r.setStyle(this.$highlightElement.style,`height`,n.lineHeight+`px`),r.setStyle(this.$highlightElement.style,`top`,s+`px`)}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;if(this.oldLastRow=n,!t||r<e.firstRow||n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(r>n)for(var i=this.session.getFoldedRowCount(n+1,r);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>r&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal(`afterRender`),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){for(var r=[],i=t,a=this.session.getNextFoldLine(i),o=a?a.start.row:1/0;i>o&&(i=a.end.row+1,a=this.session.getNextFoldLine(i,a),o=a?a.start.row:1/0),!(i>n);){var s=this.$lines.createCell(i,e,this.session,u);this.$renderCell(s,e,a,i),r.push(s),i++}return r},e.prototype.$renderCell=function(e,t,n,i){var a=e.element,o=this.session,s=a.childNodes[0],l=a.childNodes[1],u=a.childNodes[2],d=a.childNodes[3],f=u.firstChild,p=o.$firstLineNumber,m=o.$breakpoints,h=o.$decorations,g=o.gutterRenderer||this.$renderer,_=this.$showFoldWidgets&&o.foldWidgets,v=n?n.start.row:Number.MAX_VALUE,y=t.lineHeight+`px`,b=this.$useSvgGutterIcons?`ace_gutter-cell_svg-icons `:`ace_gutter-cell `,x=this.$useSvgGutterIcons?`ace_icon_svg`:`ace_icon`,S=(g?g.getText(o,i):i+p).toString();if(this.$highlightGutterLine&&(i==this.$cursorRow||n&&i<this.$cursorRow&&i>=v&&this.$cursorRow<=n.end.row)&&(b+=`ace_gutter-active-line `,this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace(`ace_gutter-active-line `,``)),this.$cursorCell=e)),m[i]&&(b+=m[i]),h[i]&&(b+=h[i]),this.$annotations[i]&&i!==v&&(b+=this.$annotations[i].className),_){var C=_[i];C??=_[i]=o.getFoldWidget(i)}if(C){var w=`ace_fold-widget ace_`+C,T=C==`start`&&i==v&&i<n.end.row;if(T){w+=` ace_closed`;for(var E=``,D=!1,O=i+1;O<=n.end.row;O++)if(this.$annotations[O]){if(this.$annotations[O].className===` ace_error`){D=!0,E=` ace_error_fold`;break}this.$annotations[O].className===` ace_security`?(D=!0,E=` ace_security_fold`):this.$annotations[O].className===` ace_warning`&&E!==` ace_security_fold`&&(D=!0,E=` ace_warning_fold`)}b+=E}else w+=` ace_open`;l.className!=w&&(l.className=w),r.setStyle(l.style,`height`,y),r.setStyle(l.style,`display`,`inline-block`),l.setAttribute(`role`,`button`),l.setAttribute(`tabindex`,`-1`);var k=o.getFoldWidgetRange(i);k?l.setAttribute(`aria-label`,c(`gutter.code-folding.range.aria-label`,`Toggle code folding, rows $0 through $1`,[k.start.row+1,k.end.row+1])):n?l.setAttribute(`aria-label`,c(`gutter.code-folding.closed.aria-label`,`Toggle code folding, rows $0 through $1`,[n.start.row+1,n.end.row+1])):l.setAttribute(`aria-label`,c(`gutter.code-folding.open.aria-label`,`Toggle code folding, row $0`,[i+1])),T?(l.setAttribute(`aria-expanded`,`false`),l.setAttribute(`title`,c(`gutter.code-folding.closed.title`,`Unfold code`))):(l.setAttribute(`aria-expanded`,`true`),l.setAttribute(`title`,c(`gutter.code-folding.open.title`,`Fold code`)))}else l&&(r.setStyle(l.style,`display`,`none`),l.setAttribute(`tabindex`,`0`),l.removeAttribute(`role`),l.removeAttribute(`aria-label`));var A=this.session.$gutterCustomWidgets[i];if(A?this.$addCustomWidget(i,A,e):d&&this.$removeCustomWidget(i,e),D&&this.$showFoldedAnnotations){u.className=`ace_gutter_annotation`,f.className=x,f.className+=E,r.setStyle(f.style,`height`,y),r.setStyle(u.style,`display`,`block`),r.setStyle(u.style,`height`,y);var j;switch(E){case` ace_error_fold`:j=c(`gutter.annotation.aria-label.error`,`Error, read annotations row $0`,[S]);break;case` ace_security_fold`:j=c(`gutter.annotation.aria-label.security`,`Security finding, read annotations row $0`,[S]);break;case` ace_warning_fold`:j=c(`gutter.annotation.aria-label.warning`,`Warning, read annotations row $0`,[S]);break}u.setAttribute(`aria-label`,j),u.setAttribute(`tabindex`,`-1`),u.setAttribute(`role`,`button`)}else if(this.$annotations[i]){u.className=`ace_gutter_annotation`,f.className=x,this.$useSvgGutterIcons?f.className+=this.$annotations[i].className:a.classList.add(this.$annotations[i].className.replace(` `,``)),r.setStyle(f.style,`height`,y),r.setStyle(u.style,`display`,`block`),r.setStyle(u.style,`height`,y);var j;switch(this.$annotations[i].className){case` ace_error`:j=c(`gutter.annotation.aria-label.error`,`Error, read annotations row $0`,[S]);break;case` ace_security`:j=c(`gutter.annotation.aria-label.security`,`Security finding, read annotations row $0`,[S]);break;case` ace_warning`:j=c(`gutter.annotation.aria-label.warning`,`Warning, read annotations row $0`,[S]);break;case` ace_info`:j=c(`gutter.annotation.aria-label.info`,`Info, read annotations row $0`,[S]);break;case` ace_hint`:j=c(`gutter.annotation.aria-label.hint`,`Suggestion, read annotations row $0`,[S]);break}u.setAttribute(`aria-label`,j),u.setAttribute(`tabindex`,`-1`),u.setAttribute(`role`,`button`)}else r.setStyle(u.style,`display`,`none`),u.removeAttribute(`aria-label`),u.removeAttribute(`role`),u.setAttribute(`tabindex`,`0`);return S!==s.data&&(s.data=S),a.className!=b&&(a.className=b),r.setStyle(e.element.style,`height`,this.$lines.computeLineHeight(i,t,o)+`px`),r.setStyle(e.element.style,`top`,this.$lines.computeLineTop(i,t,o)+`px`),e.text=S,u.style.display===`none`&&l.style.display===`none`&&!A?e.element.setAttribute(`aria-hidden`,!0):e.element.setAttribute(`aria-hidden`,!1),e},e.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e,!e&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},e.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return``}}},e.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},e.prototype.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,`ace_folding-enabled`):r.removeCssClass(this.element,`ace_folding-enabled`),this.$showFoldWidgets=e,this.$padding=null},e.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},e.prototype.$hideFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var i=n.element.childNodes[1];i&&r.setStyle(i.style,`display`,`none`)}},e.prototype.$showFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var i=n.element.childNodes[1];i&&this.session.foldWidgets&&this.session.foldWidgets[n.row]&&r.setStyle(i.style,`display`,`inline-block`)}},e.prototype.$getGutterCell=function(e){var t=this.$lines.cells,n=0,r=t.length-1;if(!(e<t[0].row||e>t[r].row)){for(;n<=r;){var i=Math.floor((n+r)/2),a=t[i];if(a.row>e)r=i-1;else if(a.row<e)n=i+1;else return a}return a}},e.prototype.$addCustomWidget=function(e,t,n){var i=t.className,a=t.label,o=t.title,s=t.callbacks;this.session.$gutterCustomWidgets[e]={className:i,label:a,title:o,callbacks:s},this.$hideFoldWidget(e,n);var c=n||this.$getGutterCell(e);if(c&&c.element){var l=c.element.querySelector(`.ace_custom-widget`);l&&l.remove(),l=r.createElement(`span`),l.className=`ace_custom-widget ${i}`,l.setAttribute(`tabindex`,`-1`),l.setAttribute(`role`,`button`),l.setAttribute(`aria-label`,a),l.setAttribute(`title`,o),r.setStyle(l.style,`display`,`inline-block`),r.setStyle(l.style,`height`,`inherit`),s&&s.onClick&&l.addEventListener(`click`,function(t){s.onClick(t,e),t.stopPropagation()}),c.element.appendChild(l)}},e.prototype.$removeCustomWidget=function(e,t){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,t);var n=t||this.$getGutterCell(e);if(n&&n.element){var r=n.element.querySelector(`.ace_custom-widget`);r&&n.element.removeChild(r)}},e.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},e.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();if(e.x<t.left+n.left)return`markers`;if(this.$showFoldWidgets&&e.x>n.right-t.right)return`foldWidgets`},e}();l.prototype.$fixedWidth=!1,l.prototype.$highlightGutterLine=!0,l.prototype.$renderer=void 0,l.prototype.$showLineNumbers=!0,l.prototype.$showFoldWidgets=!0,i.implement(l.prototype,o);function u(e){var t=document.createTextNode(``);e.appendChild(t);var n=r.createElement(`span`);e.appendChild(n);var i=r.createElement(`span`);e.appendChild(i);var a=r.createElement(`span`);return i.appendChild(a),e}t.Gutter=l}),ace.define(`ace/layer/marker`,[`require`,`exports`,`module`,`ace/range`,`ace/lib/dom`],function(e,t,n){var r=e("../range").Range,i=e("../lib/dom"),a=function(){function e(e){this.element=i.createElement(`div`),this.element.className=`ace_layer ace_marker-layer`,e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement(`div`),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},e.prototype.update=function(e){if(e){this.config=e,this.i=0;var t;for(var n in this.markers){var r=this.markers[n];if(!r.range){r.update(t,this,this.session,e);continue}var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var a=this.$getTop(i.start.row,e),o=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,o,a,e)}else r.type==`fullLine`?this.drawFullLineMarker(t,i,r.clazz,e):r.type==`screenLine`?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?r.type==`text`?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+` ace_start ace_br15`,e)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},e.prototype.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},e.prototype.drawTextMarker=function(e,t,n,i,a){for(var s=this.session,c=t.start.row,l=t.end.row,u=c,d=0,f=0,p=s.getScreenLastRowColumn(u),m=new r(u,t.start.column,u,f);u<=l;u++)m.start.row=m.end.row=u,m.start.column=u==c?t.start.column:s.getRowWrapIndent(u),m.end.column=p,d=f,f=p,p=u+1<l?s.getScreenLastRowColumn(u+1):u==l?0:t.end.column,this.drawSingleLineMarker(e,m,n+(u==c?` ace_start`:``)+` ace_br`+o(u==c||u==c+1&&t.start.column,d<f,f>p,u==l),i,u==l?0:1,a)},e.prototype.drawMultiLineMarker=function(e,t,n,r,i){var a=this.$padding,o=r.lineHeight,s=this.$getTop(t.start.row,r),c=a+t.start.column*r.characterWidth;if(i||=``,this.session.$bidiHandler.isBidiRow(t.start.row)){var l=t.clone();l.end.row=l.start.row,l.end.column=this.session.getLine(l.start.row).length,this.drawBidiSingleLineMarker(e,l,n+` ace_br1 ace_start`,r,null,i)}else this.elt(n+` ace_br1 ace_start`,`height:`+o+`px;right:`+a+`px;top:`+s+`px;left:`+c+`px;`+(i||``));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var l=t.clone();l.start.row=l.end.row,l.start.column=0,this.drawBidiSingleLineMarker(e,l,n+` ace_br12`,r,null,i)}else{s=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;this.elt(n+` ace_br12`,`height:`+o+`px;width:`+u+`px;top:`+s+`px;left:`+a+`px;`+(i||``))}if(o=(t.end.row-t.start.row-1)*r.lineHeight,!(o<=0)){s=this.$getTop(t.start.row+1,r);var d=!!t.start.column|(t.end.column?0:8);this.elt(n+(d?` ace_br`+d:``),`height:`+o+`px;right:`+a+`px;top:`+s+`px;left:`+a+`px;`+(i||``))}},e.prototype.drawSingleLineMarker=function(e,t,n,r,i,a){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,i,a);var o=r.lineHeight,s=(t.end.column+(i||0)-t.start.column)*r.characterWidth,c=this.$getTop(t.start.row,r),l=this.$padding+t.start.column*r.characterWidth;this.elt(n,`height:`+o+`px;width:`+s+`px;top:`+c+`px;left:`+l+`px;`+(a||``))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,r,i,a){var o=r.lineHeight,s=this.$getTop(t.start.row,r),c=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(e){this.elt(n,`height:`+o+`px;width:`+(e.width+(i||0))+`px;top:`+s+`px;left:`+(c+e.left)+`px;`+(a||``))},this)},e.prototype.drawFullLineMarker=function(e,t,n,r,i){var a=this.$getTop(t.start.row,r),o=r.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,r)-a),this.elt(n,`height:`+o+`px;top:`+a+`px;left:0;right:0;`+(i||``))},e.prototype.drawScreenLineMarker=function(e,t,n,r,i){var a=this.$getTop(t.start.row,r),o=r.lineHeight;this.elt(n,`height:`+o+`px;top:`+a+`px;left:0;right:0;`+(i||``))},e}();a.prototype.$padding=0;function o(e,t,n,r){return!!e|(t?2:0)|(n?4:0)|(r?8:0)}t.Marker=a}),ace.define(`ace/layer/text_util`,[`require`,`exports`,`module`],function(e,t,n){var r=new Set([`text`,`rparen`,`lparen`]);t.isTextToken=function(e){return r.has(e)}}),ace.define(`ace/layer/text`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/dom`,`ace/lib/lang`,`ace/layer/lines`,`ace/lib/event_emitter`,`ace/config`,`ace/layer/text_util`],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),a=e("../lib/lang"),o=e("./lines").Lines,s=e("../lib/event_emitter").EventEmitter,c=e("../config").nls,l=e("./text_util").isTextToken,u=function(){function e(e){this.dom=i,this.element=this.dom.createElement(`div`),this.element.className=`ace_layer ace_text-layer`,e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t=e.getNewLineCharacter()==`
210
210
  `&&e.getNewLineMode()!=`windows`?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin=`0 `+e+`px`},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on(`changeCharacterSize`,function(e){this._signal(`changeCharacterSize`,e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e==`string`?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++)if(this.showTabs){var r=this.dom.createElement(`span`);r.className=`ace_invisible ace_invisible_tab`,r.textContent=a.stringRepeat(this.TAB_CHAR,n),t.push(r)}else t.push(this.dom.createTextNode(a.stringRepeat(` `,n),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var i=`ace_indent-guide`,o=this.showSpaces?` ace_invisible ace_invisible_space`:``,s=this.showSpaces?a.stringRepeat(this.SPACE_CHAR,this.tabSize):a.stringRepeat(` `,this.tabSize),c=this.showTabs?` ace_invisible ace_invisible_tab`:``,l=this.showTabs?a.stringRepeat(this.TAB_CHAR,this.tabSize):s,r=this.dom.createElement(`span`);r.className=i+o,r.textContent=s,this.$tabStrings[` `]=r;var r=this.dom.createElement(`span`);r.className=i+c,r.textContent=l,this.$tabStrings[` `]=r}},e.prototype.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),a=this.element.childNodes,o=0,s=e.firstRow;s<r;s++){var c=this.session.getFoldLine(s);if(c)if(c.containsRow(r)){r=c.start.row;break}else s=c.end.row;o++}for(var l=!1,s=r,c=this.session.getNextFoldLine(s),u=c?c.start.row:1/0;s>u&&(s=c.end.row+1,c=this.session.getNextFoldLine(s,c),u=c?c.start.row:1/0),!(s>i);){var d=a[o++];if(d){this.dom.removeChildren(d),this.$renderLine(d,s,s==u?c:!1),l&&(d.style.top=this.$lines.computeLineTop(s,e,this.session)+`px`);var f=e.lineHeight*this.session.getRowLength(s)+`px`;d.style.height!=f&&(l=!0,d.style.height=f)}s++}if(l)for(;o<this.$lines.cells.length;){var p=this.$lines.cells[o++];p.element.style.top=this.$lines.computeLineTop(p.row,e,this.session)+`px`}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,r=t?t.lastRow:-1;if(!t||r<e.firstRow||n<t.firstRow||!t||t.lastRow<e.firstRow||e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(t.lastRow>e.lastRow)for(var i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){for(var r=[],a=t,o=this.session.getNextFoldLine(a),s=o?o.start.row:1/0;a>s&&(a=o.end.row+1,o=this.session.getNextFoldLine(a,o),s=o?o.start.row:1/0),!(a>n);){var c=this.$lines.createCell(a,e,this.session),l=c.element;this.dom.removeChildren(l),i.setStyle(l.style,`height`,this.$lines.computeLineHeight(a,e,this.session)+`px`),i.setStyle(l.style,`top`,this.$lines.computeLineTop(a,e,this.session)+`px`),this.$renderLine(l,a,a==s?o:!1),this.$useLineGroups()?l.className=`ace_line_group`:l.className=`ace_line`,r.push(c),a++}return r},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,r){for(var i=this,o=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,s=this.dom.createFragment(this.element),u,d=0;u=o.exec(r);){var f=u[1],p=u[2],m=u[3],h=u[4],g=u[5];if(!(!i.showSpaces&&p)){var _=d==u.index?``:r.slice(d,u.index);if(d=u.index+u[0].length,_&&s.appendChild(this.dom.createTextNode(_,this.element)),f){var v=i.session.getScreenTabSize(t+u.index),y=i.$tabStrings[v].cloneNode(!0);y.charCount=1,s.appendChild(y),t+=v-1}else if(p)if(i.showSpaces){var b=this.dom.createElement(`span`);b.className=`ace_invisible ace_invisible_space`,b.textContent=a.stringRepeat(i.SPACE_CHAR,p.length),s.appendChild(b)}else s.appendChild(this.dom.createTextNode(p,this.element));else if(m){var b=this.dom.createElement(`span`);b.className=`ace_invisible ace_invisible_space ace_invalid`,b.textContent=a.stringRepeat(i.SPACE_CHAR,m.length),s.appendChild(b)}else if(h){t+=1;var b=this.dom.createElement(`span`);b.style.width=i.config.characterWidth*2+`px`,b.className=i.showSpaces?`ace_cjk ace_invisible ace_invisible_space`:`ace_cjk`,b.textContent=i.showSpaces?i.SPACE_CHAR:h,s.appendChild(b)}else if(g){t+=1;var b=this.dom.createElement(`span`);b.style.width=i.config.characterWidth*2+`px`,b.className=`ace_cjk`,b.textContent=g,s.appendChild(b)}}}if(s.appendChild(this.dom.createTextNode(d?r.slice(d):r,this.element)),l(n.type))e.appendChild(s);else{var x=`ace_`+n.type.replace(/\./g,` ace_`),b=this.dom.createElement(`span`);n.type==`fold`&&(b.style.width=n.value.length*this.config.characterWidth+`px`,b.setAttribute(`title`,c(`inline-fold.closed.title`,`Unfold code`))),b.className=x,b.appendChild(s),e.appendChild(b)}return t+r.length},e.prototype.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(t[0]==` `){r-=r%this.tabSize;for(var i=r/this.tabSize,a=0;a<i;a++)e.appendChild(this.$tabStrings[` `].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(r)}else if(t[0]==` `){for(var a=0;a<r;a++){var o=this.$tabStrings[` `].cloneNode(!0);o.charCount=1,e.appendChild(o)}return this.$highlightIndentGuide(),t.substr(r)}return this.$highlightIndentGuide(),t},e.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,r=Math.floor(n/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:r,start:t.row},this.session.$bracketHighlight){for(var i=this.session.$bracketHighlight.ranges,a=0;a<i.length;a++)if(t.row!==i[a].start.row){this.$highlightIndentGuideMarker.end=i[a].start.row+1,t.row>i[a].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[t.row]!==``&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(var a=t.row+1;a<e.length;a++){var o=e[a],s=/^\s*/.exec(o)[0].length;if(o!==``&&(this.$highlightIndentGuideMarker.end=a,s<=n))break}}this.$renderHighlightIndentGuide()}}},e.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(`.ace_indent-guide-active`),t=0;t<e.length;t++)e[t].classList.remove(`ace_indent-guide-active`)},e.prototype.$setIndentGuideActive=function(e,t){if(this.session.doc.getLine(e.row)!==``){var n=e.element;if(e.element.classList&&e.element.classList.contains(`ace_line_group`))if(e.element.childNodes.length>0)n=e.element.childNodes[0];else return;var r=n.childNodes;if(r){var i=r[t-1];i&&i.classList&&i.classList.contains(`ace_indent-guide`)&&i.classList.add(`ace_indent-guide-active`)}}},e.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(t!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var n=0;n<e.length;n++){var r=e[n];if(this.$highlightIndentGuideMarker.end&&r.row>=this.$highlightIndentGuideMarker.start+1){if(r.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}else for(var n=e.length-1;n>=0;n--){var r=e[n];if(this.$highlightIndentGuideMarker.end&&r.row<this.$highlightIndentGuideMarker.start){if(r.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}}},e.prototype.$createLineElement=function(e){var t=this.dom.createElement(`div`);return t.className=`ace_line`,t.style.height=this.config.lineHeight+`px`,t},e.prototype.$renderWrappedLine=function(e,t,n){var r=0,i=0,o=n[0],s=0,c=this.$createLineElement();e.appendChild(c);for(var l=0;l<t.length;l++){var u=t[l],d=u.value;if(l==0&&this.displayIndentGuides){if(r=d.length,d=this.renderIndentGuide(c,d,o),!d)continue;r-=d.length}if(r+d.length<o)s=this.$renderToken(c,s,u,d),r+=d.length;else{for(;r+d.length>=o;){s=this.$renderToken(c,s,u,d.substring(0,o-r)),d=d.substring(o-r),r=o,c=this.$createLineElement(),e.appendChild(c);var f=this.dom.createTextNode(a.stringRepeat(`\xA0`,n.indent),this.element);f.charCount=0,c.appendChild(f),i++,s=0,o=n[i]||Number.MAX_VALUE}d.length!=0&&(r+=d.length,s=this.$renderToken(c,s,u,d))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(c,s,null,``,!0)},e.prototype.$renderSimpleLine=function(e,t){for(var n=0,r=0;r<t.length;r++){var i=t[r],a=i.value;if(!(r==0&&this.displayIndentGuides&&(a=this.renderIndentGuide(e,a),!a))){if(n+a.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,a);n=this.$renderToken(e,n,i,a)}}},e.prototype.$renderOverflowMessage=function(e,t,n,r,i){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var a=this.dom.createElement(`span`);a.className=`ace_inline_button ace_keyword ace_toggle_wrap`,a.textContent=i?`<hide>`:`<click to see more...>`,e.appendChild(a)},e.prototype.$renderLine=function(e,t,n){if(!n&&n!=0&&(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else var r=this.session.getTokens(t);var i=e;if(r.length){var a=this.session.getRowSplitData(t);if(a&&a.length){this.$renderWrappedLine(e,r,a);var i=e.lastChild}else{var i=e;this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i)),this.$renderSimpleLine(i,r)}}else this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i));if(this.showEOL&&i){n&&(t=n.end.row);var o=this.dom.createElement(`span`);o.className=`ace_invisible ace_invisible_eol`,o.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,i.appendChild(o)}},e.prototype.$getFoldLineTokens=function(e,t){var n=this.session,r=[];function i(e,t,n){for(var i=0,a=0;a+e[i].value.length<t;)if(a+=e[i].value.length,i++,i==e.length)return;if(a!=t){var o=e[i].value.substring(t-a);o.length>n-t&&(o=o.substring(0,n-t)),r.push({type:e[i].type,value:o}),a=t+o.length,i+=1}for(;a<n&&i<e.length;){var o=e[i].value;o.length+a>n?r.push({type:e[i].type,value:o.substring(0,n-a)}):r.push(e[i]),a+=o.length,i+=1}}var a=n.getTokens(e);return t.walk(function(e,t,o,s,c){e==null?(c&&(a=n.getTokens(t)),a.length&&i(a,s,o)):r.push({type:`fold`,value:e})},t.end.row,this.session.getLine(t.end.row).length),r},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();u.prototype.EOF_CHAR=`¶`,u.prototype.EOL_CHAR_LF=`¬`,u.prototype.EOL_CHAR_CRLF=`¤`,u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR=`—`,u.prototype.SPACE_CHAR=`·`,u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,r.implement(u.prototype,s),t.Text=u}),ace.define(`ace/layer/cursor`,[`require`,`exports`,`module`,`ace/lib/dom`],function(e,t,n){var r=e("../lib/dom"),i=function(){function e(e){this.element=r.createElement(`div`),this.element.className=`ace_layer ace_cursor-layer`,e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,`ace_hidden-cursors`),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)r.setStyle(t[n].style,`opacity`,e?``:`0`)},e.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+`ms`;this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&r.addCssClass(this.element,`ace_animate-blinking`)}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,r.removeCssClass(this.element,`ace_animate-blinking`)},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,`ace_smooth-blinking`,e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=r.createElement(`div`);return e.className=`ace_cursor`,this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,`ace_hidden-cursors`),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,`ace_hidden-cursors`),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,r.removeCssClass(this.element,`ace_smooth-blinking`)),e(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&r.addCssClass(this.element,`ace_smooth-blinking`)}.bind(this))),r.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||=this.session.selection.getCursor();var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.top<t.maxHeight},e.prototype.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;(t===void 0||t.length===0)&&(t=[{cursor:null}]);for(var n=0,a=t.length;n<a;n++){var o=this.getPixelPosition(t[n].cursor,!0);if(!((o.top>e.height+e.offset||o.top<0)&&n>1)){var s=this.cursors[i++]||this.addCursor(),c=s.style;this.drawCursor?this.drawCursor(s,o,e,t[n],this.session):this.isCursorInView(o,e)?(r.setStyle(c,`display`,`block`),r.translate(s,o.left,o.top),r.setStyle(c,`width`,Math.round(e.characterWidth)+`px`),r.setStyle(c,`height`,e.lineHeight+`px`)):r.setStyle(c,`display`,`none`)}}for(;this.cursors.length>i;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=o,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,`ace_overwrite-cursors`):r.removeCssClass(this.element,`ace_overwrite-cursors`))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();i.prototype.$padding=0,i.prototype.drawCursor=null,t.Cursor=i}),ace.define(`ace/scrollbar`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/dom`,`ace/lib/event`,`ace/lib/event_emitter`],function(e,t,n){var r=this&&this.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=e("./lib/oop"),a=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,c=32768,l=function(){function e(e,t){this.element=a.createElement(`div`),this.element.className=`ace_scrollbar ace_scrollbar`+t,this.element.tabIndex=-1,this.inner=a.createElement(`div`),this.inner.className=`ace_scrollbar-inner`,this.inner.textContent=`\xA0`,this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,`scroll`,this.onScroll.bind(this)),o.addListener(this.element,`mousedown`,o.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?``:`none`,this.isVisible=e,this.coeff=1},e}();i.implement(l.prototype,s);var u=function(e){r(t,e);function t(t,n){var r=e.call(this,t,`-v`)||this;return r.scrollTop=0,r.scrollHeight=0,n.$scrollbarWidth=r.width=a.scrollbarWidth(t.ownerDocument),r.inner.style.width=r.element.style.width=(r.width||15)+5+`px`,r.$minWidth=0,r}return t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit(`scroll`,{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+`px`},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>c?(this.coeff=c/e,e=c):this.coeff!=1&&(this.coeff=1),this.inner.style.height=e+`px`},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(l);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var d=function(e){r(t,e);function t(t,n){var r=e.call(this,t,`-h`)||this;return r.scrollLeft=0,r.height=n.$scrollbarWidth,r.inner.style.height=r.element.style.height=(r.height||15)+5+`px`,r}return t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit(`scroll`,{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+`px`},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+`px`},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+`px`},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(l);t.ScrollBar=u,t.ScrollBarV=u,t.ScrollBarH=d,t.VScrollBar=u,t.HScrollBar=d}),ace.define(`ace/scrollbar_custom`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/dom`,`ace/lib/event`,`ace/lib/event_emitter`],function(e,t,n){var r=this&&this.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=e("./lib/oop"),a=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter;a.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
211
211
  position: absolute;
212
212
  background: rgba(128, 128, 128, 0.6);