@openc3/vue-common 7.0.0-rc3 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (434) hide show
  1. package/dist/{ArrayWidget-B2-n1K3r.cjs → ArrayWidget-BHjh3qLF.cjs} +2 -2
  2. package/dist/{ArrayWidget-B2-n1K3r.cjs.map → ArrayWidget-BHjh3qLF.cjs.map} +1 -1
  3. package/dist/{ArrayWidget-dQWDMMrn.js → ArrayWidget-Dh6zDiC7.js} +6 -6
  4. package/dist/{ArrayWidget-dQWDMMrn.js.map → ArrayWidget-Dh6zDiC7.js.map} +1 -1
  5. package/dist/{ArrayplotWidget-BmBcPGUR.cjs → ArrayplotWidget-BHD-TGQO.cjs} +2 -2
  6. package/dist/{ArrayplotWidget-BmBcPGUR.cjs.map → ArrayplotWidget-BHD-TGQO.cjs.map} +1 -1
  7. package/dist/{ArrayplotWidget-DCnbK37q.js → ArrayplotWidget-CSc_TqNm.js} +6 -6
  8. package/dist/{ArrayplotWidget-DCnbK37q.js.map → ArrayplotWidget-CSc_TqNm.js.map} +1 -1
  9. package/dist/{BarColumn-DmOxuCa9.js → BarColumn-DmjMnw5l.js} +3 -3
  10. package/dist/{BarColumn-DmOxuCa9.js.map → BarColumn-DmjMnw5l.js.map} +1 -1
  11. package/dist/{BarColumn-CkecDAzn.cjs → BarColumn-Ym4P8YHC.cjs} +2 -2
  12. package/dist/{BarColumn-CkecDAzn.cjs.map → BarColumn-Ym4P8YHC.cjs.map} +1 -1
  13. package/dist/{BlockWidget-UejKxAxY.js → BlockWidget-BdR_HCVc.js} +6 -6
  14. package/dist/{BlockWidget-UejKxAxY.js.map → BlockWidget-BdR_HCVc.js.map} +1 -1
  15. package/dist/{BlockWidget-BZXHLTJt.cjs → BlockWidget-Bi1PfS1k.cjs} +2 -2
  16. package/dist/{BlockWidget-BZXHLTJt.cjs.map → BlockWidget-Bi1PfS1k.cjs.map} +1 -1
  17. package/dist/{ButtonWidget-CzRyY1N5.cjs → ButtonWidget-70hNWuEy.cjs} +2 -2
  18. package/dist/{ButtonWidget-CzRyY1N5.cjs.map → ButtonWidget-70hNWuEy.cjs.map} +1 -1
  19. package/dist/{ButtonWidget-DtAkhzCN.js → ButtonWidget-DZ4VCNWU.js} +6 -6
  20. package/dist/{ButtonWidget-DtAkhzCN.js.map → ButtonWidget-DZ4VCNWU.js.map} +1 -1
  21. package/dist/{CanvasWidget-cQqNxspP.cjs → CanvasWidget-DTEx-DpZ.cjs} +2 -2
  22. package/dist/{CanvasWidget-cQqNxspP.cjs.map → CanvasWidget-DTEx-DpZ.cjs.map} +1 -1
  23. package/dist/{CanvasWidget-YXQ8TLqA.js → CanvasWidget-DuXOo3jG.js} +4 -4
  24. package/dist/{CanvasWidget-YXQ8TLqA.js.map → CanvasWidget-DuXOo3jG.js.map} +1 -1
  25. package/dist/{CanvasdotWidget-BbmhHQV_.js → CanvasdotWidget-WoLpxI1u.js} +5 -5
  26. package/dist/{CanvasdotWidget-BbmhHQV_.js.map → CanvasdotWidget-WoLpxI1u.js.map} +1 -1
  27. package/dist/{CanvasdotWidget-CMIw-ga4.cjs → CanvasdotWidget-bbOquK8B.cjs} +2 -2
  28. package/dist/{CanvasdotWidget-CMIw-ga4.cjs.map → CanvasdotWidget-bbOquK8B.cjs.map} +1 -1
  29. package/dist/{CanvasimageWidget-DXxtYjGG.cjs → CanvasimageWidget-D2EqsK7w.cjs} +2 -2
  30. package/dist/{CanvasimageWidget-DXxtYjGG.cjs.map → CanvasimageWidget-D2EqsK7w.cjs.map} +1 -1
  31. package/dist/{CanvasimageWidget-CJf5NYEj.js → CanvasimageWidget-tWpK5rsv.js} +8 -8
  32. package/dist/{CanvasimageWidget-CJf5NYEj.js.map → CanvasimageWidget-tWpK5rsv.js.map} +1 -1
  33. package/dist/{CanvasimagevalueWidget-D86eJXbs.js → CanvasimagevalueWidget-BVzJYz3l.js} +9 -9
  34. package/dist/{CanvasimagevalueWidget-D86eJXbs.js.map → CanvasimagevalueWidget-BVzJYz3l.js.map} +1 -1
  35. package/dist/{CanvasimagevalueWidget-VPKlJrxM.cjs → CanvasimagevalueWidget-By_DiQ75.cjs} +2 -2
  36. package/dist/{CanvasimagevalueWidget-VPKlJrxM.cjs.map → CanvasimagevalueWidget-By_DiQ75.cjs.map} +1 -1
  37. package/dist/{CanvaslabelWidget-TkrVd-Dg.js → CanvaslabelWidget-CDFf8Vll.js} +5 -5
  38. package/dist/{CanvaslabelWidget-TkrVd-Dg.js.map → CanvaslabelWidget-CDFf8Vll.js.map} +1 -1
  39. package/dist/{CanvaslabelWidget-BgGRS0NS.cjs → CanvaslabelWidget-DiPxyXoX.cjs} +2 -2
  40. package/dist/{CanvaslabelWidget-BgGRS0NS.cjs.map → CanvaslabelWidget-DiPxyXoX.cjs.map} +1 -1
  41. package/dist/{CanvaslabelvalueWidget-W2QzOkQw.cjs → CanvaslabelvalueWidget-Cw5CCQTi.cjs} +2 -2
  42. package/dist/{CanvaslabelvalueWidget-W2QzOkQw.cjs.map → CanvaslabelvalueWidget-Cw5CCQTi.cjs.map} +1 -1
  43. package/dist/{CanvaslabelvalueWidget-BwsIN_MT.js → CanvaslabelvalueWidget-DzJKD6qs.js} +5 -5
  44. package/dist/{CanvaslabelvalueWidget-BwsIN_MT.js.map → CanvaslabelvalueWidget-DzJKD6qs.js.map} +1 -1
  45. package/dist/{CanvaslineWidget-yT7FUWs8.cjs → CanvaslineWidget-BECtKTPL.cjs} +2 -2
  46. package/dist/{CanvaslineWidget-yT7FUWs8.cjs.map → CanvaslineWidget-BECtKTPL.cjs.map} +1 -1
  47. package/dist/{CanvaslineWidget-BjBvF-vY.js → CanvaslineWidget-BttTXCZq.js} +5 -5
  48. package/dist/{CanvaslineWidget-BjBvF-vY.js.map → CanvaslineWidget-BttTXCZq.js.map} +1 -1
  49. package/dist/{CanvaslinevalueWidget-Dj4tsTBp.cjs → CanvaslinevalueWidget-5duJ98qu.cjs} +2 -2
  50. package/dist/{CanvaslinevalueWidget-Dj4tsTBp.cjs.map → CanvaslinevalueWidget-5duJ98qu.cjs.map} +1 -1
  51. package/dist/{CanvaslinevalueWidget-krBLp9yB.js → CanvaslinevalueWidget-i6G0JfnZ.js} +5 -5
  52. package/dist/{CanvaslinevalueWidget-krBLp9yB.js.map → CanvaslinevalueWidget-i6G0JfnZ.js.map} +1 -1
  53. package/dist/{CheckbuttonWidget-IMrIK9q4.js → CheckbuttonWidget-18jtf7sh.js} +5 -5
  54. package/dist/{CheckbuttonWidget-IMrIK9q4.js.map → CheckbuttonWidget-18jtf7sh.js.map} +1 -1
  55. package/dist/{CheckbuttonWidget-CT28NPNo.cjs → CheckbuttonWidget-CTMObPhX.cjs} +2 -2
  56. package/dist/{CheckbuttonWidget-CT28NPNo.cjs.map → CheckbuttonWidget-CTMObPhX.cjs.map} +1 -1
  57. package/dist/{ClassificationBanners-DiIkXqna.js → ClassificationBanners-BmnQODLn.js} +2 -2
  58. package/dist/{ClassificationBanners-DiIkXqna.js.map → ClassificationBanners-BmnQODLn.js.map} +1 -1
  59. package/dist/{ClassificationBanners-DC__VXBX.cjs → ClassificationBanners-DjGCuH-4.cjs} +2 -2
  60. package/dist/{ClassificationBanners-DC__VXBX.cjs.map → ClassificationBanners-DjGCuH-4.cjs.map} +1 -1
  61. package/dist/{ComboboxWidget-C9Zlc2Hy.js → ComboboxWidget-BjaVFbD4.js} +5 -5
  62. package/dist/{ComboboxWidget-C9Zlc2Hy.js.map → ComboboxWidget-BjaVFbD4.js.map} +1 -1
  63. package/dist/{ComboboxWidget-hFBSBFwy.cjs → ComboboxWidget-Cc0Acq9q.cjs} +2 -2
  64. package/dist/{ComboboxWidget-hFBSBFwy.cjs.map → ComboboxWidget-Cc0Acq9q.cjs.map} +1 -1
  65. package/dist/{CriticalCmdDialog-Cp-ykpQb.js → CriticalCmdDialog-CO-nvphS.js} +8 -8
  66. package/dist/{CriticalCmdDialog-Cp-ykpQb.js.map → CriticalCmdDialog-CO-nvphS.js.map} +1 -1
  67. package/dist/{CriticalCmdDialog-CCaStsM-.cjs → CriticalCmdDialog-eytxCQto.cjs} +2 -2
  68. package/dist/{CriticalCmdDialog-CCaStsM-.cjs.map → CriticalCmdDialog-eytxCQto.cjs.map} +1 -1
  69. package/dist/{CustomIcon-Cg3jCA_l.js → CustomIcon-DTR361si.js} +4 -4
  70. package/dist/{CustomIcon-Cg3jCA_l.js.map → CustomIcon-DTR361si.js.map} +1 -1
  71. package/dist/{DateWidget-C_QpCTxN.cjs → DateWidget-Cle8FY8Q.cjs} +2 -2
  72. package/dist/{DateWidget-C_QpCTxN.cjs.map → DateWidget-Cle8FY8Q.cjs.map} +1 -1
  73. package/dist/{DateWidget-Y6WAFGGt.js → DateWidget-DkFAFlc8.js} +5 -5
  74. package/dist/{DateWidget-Y6WAFGGt.js.map → DateWidget-DkFAFlc8.js.map} +1 -1
  75. package/dist/{DetailsDialog-Bq9BPuoe.cjs → DetailsDialog-BcMaTfuQ.cjs} +2 -2
  76. package/dist/{DetailsDialog-Bq9BPuoe.cjs.map → DetailsDialog-BcMaTfuQ.cjs.map} +1 -1
  77. package/dist/{DetailsDialog-DznGAE6i.js → DetailsDialog-sqja4Lzq.js} +5 -5
  78. package/dist/{DetailsDialog-DznGAE6i.js.map → DetailsDialog-sqja4Lzq.js.map} +1 -1
  79. package/dist/{DynamicWidget-Bym87woV.js → DynamicWidget-BuSbQVhf.js} +4 -4
  80. package/dist/{DynamicWidget-Bym87woV.js.map → DynamicWidget-BuSbQVhf.js.map} +1 -1
  81. package/dist/{EventListDialog-CktWO2jn.js → EventListDialog-DjCQAwGl.js} +17 -14
  82. package/dist/EventListDialog-DjCQAwGl.js.map +1 -0
  83. package/dist/EventListDialog-EmC7YW60.cjs +2 -0
  84. package/dist/EventListDialog-EmC7YW60.cjs.map +1 -0
  85. package/dist/{FilechecksumWidget-BZdmiTbb.cjs → FilechecksumWidget-2ta-UvLp.cjs} +2 -2
  86. package/dist/{FilechecksumWidget-BZdmiTbb.cjs.map → FilechecksumWidget-2ta-UvLp.cjs.map} +1 -1
  87. package/dist/{FilechecksumWidget-VbLODmHh.js → FilechecksumWidget-DqJ_hvN4.js} +8 -8
  88. package/dist/{FilechecksumWidget-VbLODmHh.js.map → FilechecksumWidget-DqJ_hvN4.js.map} +1 -1
  89. package/dist/{FiledisplayWidget-BI7GAQ4d.cjs → FiledisplayWidget-BUKXIQir.cjs} +2 -2
  90. package/dist/{FiledisplayWidget-BI7GAQ4d.cjs.map → FiledisplayWidget-BUKXIQir.cjs.map} +1 -1
  91. package/dist/{FiledisplayWidget-kixqcLtx.js → FiledisplayWidget-CYznG_tf.js} +6 -6
  92. package/dist/{FiledisplayWidget-kixqcLtx.js.map → FiledisplayWidget-CYznG_tf.js.map} +1 -1
  93. package/dist/{FormatvalueWidget--djAS0BE.js → FormatvalueWidget-BnVu4YGx.js} +6 -6
  94. package/dist/{FormatvalueWidget--djAS0BE.js.map → FormatvalueWidget-BnVu4YGx.js.map} +1 -1
  95. package/dist/{FormatvalueWidget-I1y_kf9t.cjs → FormatvalueWidget-BpFXnA_U.cjs} +2 -2
  96. package/dist/{FormatvalueWidget-I1y_kf9t.cjs.map → FormatvalueWidget-BpFXnA_U.cjs.map} +1 -1
  97. package/dist/{Graph-GhpiUBKI.js → Graph-CUFzx8Ti.js} +289 -281
  98. package/dist/Graph-CUFzx8Ti.js.map +1 -0
  99. package/dist/Graph-qxF4224c.cjs +2 -0
  100. package/dist/Graph-qxF4224c.cjs.map +1 -0
  101. package/dist/{GraphWidget-Bzo-klWV.cjs → GraphWidget-BvCQHVxQ.cjs} +2 -2
  102. package/dist/{GraphWidget-Bzo-klWV.cjs.map → GraphWidget-BvCQHVxQ.cjs.map} +1 -1
  103. package/dist/{GraphWidget-8T08osON.js → GraphWidget-DO5XbOGy.js} +2 -2
  104. package/dist/{GraphWidget-8T08osON.js.map → GraphWidget-DO5XbOGy.js.map} +1 -1
  105. package/dist/{HorizontalWidget-CusI1RiA.js → HorizontalWidget-BA9PiP3d.js} +4 -4
  106. package/dist/{HorizontalWidget-CusI1RiA.js.map → HorizontalWidget-BA9PiP3d.js.map} +1 -1
  107. package/dist/{HorizontalWidget-CAf9I0CU.cjs → HorizontalWidget-BBQE-dP-.cjs} +2 -2
  108. package/dist/{HorizontalWidget-CAf9I0CU.cjs.map → HorizontalWidget-BBQE-dP-.cjs.map} +1 -1
  109. package/dist/{HorizontalboxWidget-D5fIhINf.js → HorizontalboxWidget-B-7HOqgl.js} +7 -7
  110. package/dist/{HorizontalboxWidget-D5fIhINf.js.map → HorizontalboxWidget-B-7HOqgl.js.map} +1 -1
  111. package/dist/{HorizontalboxWidget-B7E5GEPu.cjs → HorizontalboxWidget-CX7J8RdA.cjs} +2 -2
  112. package/dist/{HorizontalboxWidget-B7E5GEPu.cjs.map → HorizontalboxWidget-CX7J8RdA.cjs.map} +1 -1
  113. package/dist/HorizontallineWidget-D-o9MGo0.js +16 -0
  114. package/dist/{HorizontallineWidget-CnRlq7hi.js.map → HorizontallineWidget-D-o9MGo0.js.map} +1 -1
  115. package/dist/{HorizontallineWidget-DqLKGhdz.cjs → HorizontallineWidget-odTFoB8u.cjs} +2 -2
  116. package/dist/{HorizontallineWidget-DqLKGhdz.cjs.map → HorizontallineWidget-odTFoB8u.cjs.map} +1 -1
  117. package/dist/{IframeWidget-DtF44NYM.js → IframeWidget-BzOka-fX.js} +5 -5
  118. package/dist/{IframeWidget-DtF44NYM.js.map → IframeWidget-BzOka-fX.js.map} +1 -1
  119. package/dist/{IframeWidget-BMtv8io0.cjs → IframeWidget-cTHu_Rmp.cjs} +2 -2
  120. package/dist/{IframeWidget-BMtv8io0.cjs.map → IframeWidget-cTHu_Rmp.cjs.map} +1 -1
  121. package/dist/{ImageLoader-jcIDHdUq.cjs → ImageLoader-BTEOukIw.cjs} +2 -2
  122. package/dist/{ImageLoader-jcIDHdUq.cjs.map → ImageLoader-BTEOukIw.cjs.map} +1 -1
  123. package/dist/{ImageLoader-B5rGuJ_H.js → ImageLoader-CstmWFM4.js} +2 -2
  124. package/dist/{ImageLoader-B5rGuJ_H.js.map → ImageLoader-CstmWFM4.js.map} +1 -1
  125. package/dist/{ImageviewerWidget-Ciu80vaC.js → ImageviewerWidget-BA9uOM1q.js} +5 -5
  126. package/dist/{ImageviewerWidget-Ciu80vaC.js.map → ImageviewerWidget-BA9uOM1q.js.map} +1 -1
  127. package/dist/{ImageviewerWidget-ox5FNYVP.cjs → ImageviewerWidget-CLAFwmaB.cjs} +2 -2
  128. package/dist/{ImageviewerWidget-ox5FNYVP.cjs.map → ImageviewerWidget-CLAFwmaB.cjs.map} +1 -1
  129. package/dist/{InterfacesTab-C14LErLZ.js → InterfacesTab-C3mDLkGC.js} +9 -9
  130. package/dist/{InterfacesTab-C14LErLZ.js.map → InterfacesTab-C3mDLkGC.js.map} +1 -1
  131. package/dist/{InterfacesTab-CUM5GGWs.cjs → InterfacesTab-CM0CGFVS.cjs} +2 -2
  132. package/dist/{InterfacesTab-CUM5GGWs.cjs.map → InterfacesTab-CM0CGFVS.cjs.map} +1 -1
  133. package/dist/{LabelWidget-B9J1Whh0.cjs → LabelWidget-CMmVq1mx.cjs} +2 -2
  134. package/dist/{LabelWidget-B9J1Whh0.cjs.map → LabelWidget-CMmVq1mx.cjs.map} +1 -1
  135. package/dist/{LabelWidget-78VnL1xc.js → LabelWidget-Da2howZF.js} +5 -5
  136. package/dist/{LabelWidget-78VnL1xc.js.map → LabelWidget-Da2howZF.js.map} +1 -1
  137. package/dist/{LabelledWidget-Cx2PI85E.js → LabelledWidget-BH8y3OXT.js} +7 -7
  138. package/dist/{LabelledWidget-Cx2PI85E.js.map → LabelledWidget-BH8y3OXT.js.map} +1 -1
  139. package/dist/{LabelledWidget-BMtqUP-E.cjs → LabelledWidget-CAqH0oWs.cjs} +2 -2
  140. package/dist/{LabelledWidget-BMtqUP-E.cjs.map → LabelledWidget-CAqH0oWs.cjs.map} +1 -1
  141. package/dist/{LabelprogressbarWidget-eC7VC7lY.js → LabelprogressbarWidget-Brl24F4c.js} +7 -7
  142. package/dist/{LabelprogressbarWidget-eC7VC7lY.js.map → LabelprogressbarWidget-Brl24F4c.js.map} +1 -1
  143. package/dist/{LabelprogressbarWidget-Ce3PRzaA.cjs → LabelprogressbarWidget-BxLGmW9T.cjs} +2 -2
  144. package/dist/{LabelprogressbarWidget-Ce3PRzaA.cjs.map → LabelprogressbarWidget-BxLGmW9T.cjs.map} +1 -1
  145. package/dist/{LabelsparklineWidget-DuCA67yl.cjs → LabelsparklineWidget-BUXOpBeB.cjs} +2 -2
  146. package/dist/{LabelsparklineWidget-DuCA67yl.cjs.map → LabelsparklineWidget-BUXOpBeB.cjs.map} +1 -1
  147. package/dist/{LabelsparklineWidget-CP5rD4ob.js → LabelsparklineWidget-D22MB7-4.js} +7 -7
  148. package/dist/{LabelsparklineWidget-CP5rD4ob.js.map → LabelsparklineWidget-D22MB7-4.js.map} +1 -1
  149. package/dist/{LabelvalueWidget-PM8DFnDm.js → LabelvalueWidget-_1JPbK-K.js} +7 -7
  150. package/dist/{LabelvalueWidget-PM8DFnDm.js.map → LabelvalueWidget-_1JPbK-K.js.map} +1 -1
  151. package/dist/{LabelvalueWidget-DxEvAoHT.cjs → LabelvalueWidget-bYqqgIGE.cjs} +2 -2
  152. package/dist/{LabelvalueWidget-DxEvAoHT.cjs.map → LabelvalueWidget-bYqqgIGE.cjs.map} +1 -1
  153. package/dist/{LabelvaluedescWidget-Dy3_fdkx.cjs → LabelvaluedescWidget-B2dFZoDE.cjs} +2 -2
  154. package/dist/{LabelvaluedescWidget-Dy3_fdkx.cjs.map → LabelvaluedescWidget-B2dFZoDE.cjs.map} +1 -1
  155. package/dist/{LabelvaluedescWidget-C8OmKnu-.js → LabelvaluedescWidget-BgduSJJb.js} +8 -8
  156. package/dist/{LabelvaluedescWidget-C8OmKnu-.js.map → LabelvaluedescWidget-BgduSJJb.js.map} +1 -1
  157. package/dist/{LabelvaluelimitsbarWidget-DWvSVvXl.cjs → LabelvaluelimitsbarWidget-BGag8V6k.cjs} +2 -2
  158. package/dist/{LabelvaluelimitsbarWidget-DWvSVvXl.cjs.map → LabelvaluelimitsbarWidget-BGag8V6k.cjs.map} +1 -1
  159. package/dist/{LabelvaluelimitsbarWidget-DIsTQqkO.js → LabelvaluelimitsbarWidget-C9PlEhWo.js} +7 -7
  160. package/dist/{LabelvaluelimitsbarWidget-DIsTQqkO.js.map → LabelvaluelimitsbarWidget-C9PlEhWo.js.map} +1 -1
  161. package/dist/{LabelvaluelimitscolumnWidget-ld556rRi.js → LabelvaluelimitscolumnWidget-Cay6AhoZ.js} +8 -8
  162. package/dist/{LabelvaluelimitscolumnWidget-ld556rRi.js.map → LabelvaluelimitscolumnWidget-Cay6AhoZ.js.map} +1 -1
  163. package/dist/{LabelvaluelimitscolumnWidget-CyPuEz7E.cjs → LabelvaluelimitscolumnWidget-SHVJIgGJ.cjs} +2 -2
  164. package/dist/{LabelvaluelimitscolumnWidget-CyPuEz7E.cjs.map → LabelvaluelimitscolumnWidget-SHVJIgGJ.cjs.map} +1 -1
  165. package/dist/{LabelvaluerangebarWidget-DdqgjjUc.cjs → LabelvaluerangebarWidget-Dbibpimv.cjs} +2 -2
  166. package/dist/{LabelvaluerangebarWidget-DdqgjjUc.cjs.map → LabelvaluerangebarWidget-Dbibpimv.cjs.map} +1 -1
  167. package/dist/{LabelvaluerangebarWidget-nCeoujui.js → LabelvaluerangebarWidget-s_8IgY-C.js} +7 -7
  168. package/dist/{LabelvaluerangebarWidget-nCeoujui.js.map → LabelvaluerangebarWidget-s_8IgY-C.js.map} +1 -1
  169. package/dist/{Layout-BcytiBn4.js → Layout-D7RGn0Fe.js} +2 -2
  170. package/dist/{Layout-BcytiBn4.js.map → Layout-D7RGn0Fe.js.map} +1 -1
  171. package/dist/{Layout-JCk8r88e.cjs → Layout-DwWEea79.cjs} +2 -2
  172. package/dist/{Layout-JCk8r88e.cjs.map → Layout-DwWEea79.cjs.map} +1 -1
  173. package/dist/{LedWidget-BEP-sFTh.cjs → LedWidget-BaiKDozd.cjs} +2 -2
  174. package/dist/{LedWidget-BEP-sFTh.cjs.map → LedWidget-BaiKDozd.cjs.map} +1 -1
  175. package/dist/{LedWidget-3pWKnZsD.js → LedWidget-DgMtvsiv.js} +6 -6
  176. package/dist/{LedWidget-3pWKnZsD.js.map → LedWidget-DgMtvsiv.js.map} +1 -1
  177. package/dist/{LimitsBar-BJ_cERjE.cjs → LimitsBar-BFM38vQL.cjs} +2 -2
  178. package/dist/{LimitsBar-BJ_cERjE.cjs.map → LimitsBar-BFM38vQL.cjs.map} +1 -1
  179. package/dist/{LimitsBar-DCco6Rwp.js → LimitsBar-CcOaAw0C.js} +7 -7
  180. package/dist/{LimitsBar-DCco6Rwp.js.map → LimitsBar-CcOaAw0C.js.map} +1 -1
  181. package/dist/{LimitsbarWidget-DiAnkXID.cjs → LimitsbarWidget-ConP3qI5.cjs} +2 -2
  182. package/dist/{LimitsbarWidget-DiAnkXID.cjs.map → LimitsbarWidget-ConP3qI5.cjs.map} +1 -1
  183. package/dist/{LimitsbarWidget-_BMzxWBm.js → LimitsbarWidget-DpmJn1Lo.js} +7 -7
  184. package/dist/{LimitsbarWidget-_BMzxWBm.js.map → LimitsbarWidget-DpmJn1Lo.js.map} +1 -1
  185. package/dist/{LimitscolorWidget-C2gZyqtI.js → LimitscolorWidget-BMXiEaDm.js} +20 -20
  186. package/dist/{LimitscolorWidget-C2gZyqtI.js.map → LimitscolorWidget-BMXiEaDm.js.map} +1 -1
  187. package/dist/{LimitscolorWidget-ByfzIE_O.cjs → LimitscolorWidget-veWQ4NXl.cjs} +2 -2
  188. package/dist/{LimitscolorWidget-ByfzIE_O.cjs.map → LimitscolorWidget-veWQ4NXl.cjs.map} +1 -1
  189. package/dist/{LimitscolumnWidget-CZwcXbLS.cjs → LimitscolumnWidget-CJABAor8.cjs} +2 -2
  190. package/dist/{LimitscolumnWidget-CZwcXbLS.cjs.map → LimitscolumnWidget-CJABAor8.cjs.map} +1 -1
  191. package/dist/{LimitscolumnWidget-Cv-6FXU3.js → LimitscolumnWidget-ufFMz6R-.js} +5 -5
  192. package/dist/{LimitscolumnWidget-Cv-6FXU3.js.map → LimitscolumnWidget-ufFMz6R-.js.map} +1 -1
  193. package/dist/{LinegraphWidget-so5ohfWF.cjs → LinegraphWidget-3E8L5CvM.cjs} +2 -2
  194. package/dist/{LinegraphWidget-so5ohfWF.cjs.map → LinegraphWidget-3E8L5CvM.cjs.map} +1 -1
  195. package/dist/{LinegraphWidget-BahyhwSt.js → LinegraphWidget-BC2wVOny.js} +7 -7
  196. package/dist/{LinegraphWidget-BahyhwSt.js.map → LinegraphWidget-BC2wVOny.js.map} +1 -1
  197. package/dist/{MatrixbycolumnsWidget-Dma8IsO-.cjs → MatrixbycolumnsWidget-DICgiNQo.cjs} +2 -2
  198. package/dist/{MatrixbycolumnsWidget-Dma8IsO-.cjs.map → MatrixbycolumnsWidget-DICgiNQo.cjs.map} +1 -1
  199. package/dist/{MatrixbycolumnsWidget-B1Hy9but.js → MatrixbycolumnsWidget-DfUAeBnO.js} +5 -5
  200. package/dist/{MatrixbycolumnsWidget-B1Hy9but.js.map → MatrixbycolumnsWidget-DfUAeBnO.js.map} +1 -1
  201. package/dist/{MicroservicesTab-BSXNA_Si.js → MicroservicesTab-B0SZVty3.js} +67 -62
  202. package/dist/MicroservicesTab-B0SZVty3.js.map +1 -0
  203. package/dist/MicroservicesTab-snXJDoYq.cjs +4 -0
  204. package/dist/MicroservicesTab-snXJDoYq.cjs.map +1 -0
  205. package/dist/{OpenC3TimePicker-LN9R7V31.js → OpenC3TimePicker-DpkbfbgC.js} +5 -5
  206. package/dist/{OpenC3TimePicker-LN9R7V31.js.map → OpenC3TimePicker-DpkbfbgC.js.map} +1 -1
  207. package/dist/{OpenC3TimePicker-BHX9fnlR.cjs → OpenC3TimePicker-Yl1jVi7p.cjs} +2 -2
  208. package/dist/{OpenC3TimePicker-BHX9fnlR.cjs.map → OpenC3TimePicker-Yl1jVi7p.cjs.map} +1 -1
  209. package/dist/{Openc3Screen-CJOTF-lu.cjs → Openc3Screen-D1RLlBgQ.cjs} +5 -5
  210. package/dist/Openc3Screen-D1RLlBgQ.cjs.map +1 -0
  211. package/dist/{Openc3Screen-BP7Ho9XC.js → Openc3Screen-DbUvz-3B.js} +254 -254
  212. package/dist/Openc3Screen-DbUvz-3B.js.map +1 -0
  213. package/dist/{OutputDialog-Dx5mkq19.cjs → OutputDialog-ChPCaQAE.cjs} +2 -2
  214. package/dist/{OutputDialog-Dx5mkq19.cjs.map → OutputDialog-ChPCaQAE.cjs.map} +1 -1
  215. package/dist/{OutputDialog-JdAxzpPD.js → OutputDialog-Ds-GdGyI.js} +5 -5
  216. package/dist/{OutputDialog-JdAxzpPD.js.map → OutputDialog-Ds-GdGyI.js.map} +1 -1
  217. package/dist/PackagesTab-BgQsbXRo.cjs +2 -0
  218. package/dist/PackagesTab-BgQsbXRo.cjs.map +1 -0
  219. package/dist/{PackagesTab-ByfVH001.js → PackagesTab-CWplBp_I.js} +70 -66
  220. package/dist/PackagesTab-CWplBp_I.js.map +1 -0
  221. package/dist/{PluginsTab-D7zpmf8s.js → PluginsTab-BiiL622n.js} +486 -448
  222. package/dist/PluginsTab-BiiL622n.js.map +1 -0
  223. package/dist/PluginsTab-RgIMk-F7.cjs +6 -0
  224. package/dist/PluginsTab-RgIMk-F7.cjs.map +1 -0
  225. package/dist/{ProgressbarWidget-mAVHKeok.js → ProgressbarWidget-D3ndYnq_.js} +5 -5
  226. package/dist/{ProgressbarWidget-mAVHKeok.js.map → ProgressbarWidget-D3ndYnq_.js.map} +1 -1
  227. package/dist/{ProgressbarWidget-BINuoD9p.cjs → ProgressbarWidget-DludJVUf.cjs} +2 -2
  228. package/dist/{ProgressbarWidget-BINuoD9p.cjs.map → ProgressbarWidget-DludJVUf.cjs.map} +1 -1
  229. package/dist/{RadiobuttonWidget-CL3QjTnZ.js → RadiobuttonWidget-CP0S9nWW.js} +5 -5
  230. package/dist/{RadiobuttonWidget-CL3QjTnZ.js.map → RadiobuttonWidget-CP0S9nWW.js.map} +1 -1
  231. package/dist/{RadiobuttonWidget-DDmgt0su.cjs → RadiobuttonWidget-DX4h94p1.cjs} +2 -2
  232. package/dist/{RadiobuttonWidget-DDmgt0su.cjs.map → RadiobuttonWidget-DX4h94p1.cjs.map} +1 -1
  233. package/dist/{RadiogroupWidget-RUwgtUTC.js → RadiogroupWidget-BXHfA21T.js} +4 -4
  234. package/dist/{RadiogroupWidget-RUwgtUTC.js.map → RadiogroupWidget-BXHfA21T.js.map} +1 -1
  235. package/dist/{RadiogroupWidget-q7h1v-ko.cjs → RadiogroupWidget-NqjBNUH6.cjs} +2 -2
  236. package/dist/{RadiogroupWidget-q7h1v-ko.cjs.map → RadiogroupWidget-NqjBNUH6.cjs.map} +1 -1
  237. package/dist/{RangebarWidget-CfDsKLZc.js → RangebarWidget-Bv2DqkPo.js} +5 -5
  238. package/dist/{RangebarWidget-CfDsKLZc.js.map → RangebarWidget-Bv2DqkPo.js.map} +1 -1
  239. package/dist/{RangebarWidget-BbPMpwMs.cjs → RangebarWidget-CRq2zpvw.cjs} +2 -2
  240. package/dist/{RangebarWidget-BbPMpwMs.cjs.map → RangebarWidget-CRq2zpvw.cjs.map} +1 -1
  241. package/dist/{RedisTab-YrX-5A3T.js → RedisTab-7TbOXFA_.js} +9 -9
  242. package/dist/{RedisTab-YrX-5A3T.js.map → RedisTab-7TbOXFA_.js.map} +1 -1
  243. package/dist/{RedisTab-dZE6KvLS.cjs → RedisTab-DpWPY1P0.cjs} +2 -2
  244. package/dist/{RedisTab-dZE6KvLS.cjs.map → RedisTab-DpWPY1P0.cjs.map} +1 -1
  245. package/dist/{RollupWidget-BmgRFIOo.cjs → RollupWidget-B7_Q_boi.cjs} +2 -2
  246. package/dist/{RollupWidget-BmgRFIOo.cjs.map → RollupWidget-B7_Q_boi.cjs.map} +1 -1
  247. package/dist/{RollupWidget-DCMoQUeJ.js → RollupWidget-o_huYU0x.js} +5 -5
  248. package/dist/{RollupWidget-DCMoQUeJ.js.map → RollupWidget-o_huYU0x.js.map} +1 -1
  249. package/dist/{RoutersTab-C6vejQrw.cjs → RoutersTab-CAbnSGHy.cjs} +2 -2
  250. package/dist/{RoutersTab-C6vejQrw.cjs.map → RoutersTab-CAbnSGHy.cjs.map} +1 -1
  251. package/dist/{RoutersTab-MA9KW_gu.js → RoutersTab-DN17iBBi.js} +9 -9
  252. package/dist/{RoutersTab-MA9KW_gu.js.map → RoutersTab-DN17iBBi.js.map} +1 -1
  253. package/dist/{ScriptChooser-Cm_HEyBf.cjs → ScriptChooser-CggwstfT.cjs} +2 -2
  254. package/dist/{ScriptChooser-Cm_HEyBf.cjs.map → ScriptChooser-CggwstfT.cjs.map} +1 -1
  255. package/dist/{ScriptChooser-DGbs03IW.js → ScriptChooser-CzzUJ1Zj.js} +6 -6
  256. package/dist/{ScriptChooser-DGbs03IW.js.map → ScriptChooser-CzzUJ1Zj.js.map} +1 -1
  257. package/dist/{ScrollwindowWidget-DarXe7-1.js → ScrollwindowWidget-DdjaML6D.js} +4 -4
  258. package/dist/{ScrollwindowWidget-DarXe7-1.js.map → ScrollwindowWidget-DdjaML6D.js.map} +1 -1
  259. package/dist/{ScrollwindowWidget-BbASNNcM.cjs → ScrollwindowWidget-kS5QjP-v.cjs} +2 -2
  260. package/dist/{ScrollwindowWidget-BbASNNcM.cjs.map → ScrollwindowWidget-kS5QjP-v.cjs.map} +1 -1
  261. package/dist/{SecretsTab-DwE3KJNI.cjs → SecretsTab-Cn6-o85L.cjs} +2 -2
  262. package/dist/{SecretsTab-DwE3KJNI.cjs.map → SecretsTab-Cn6-o85L.cjs.map} +1 -1
  263. package/dist/{SecretsTab-DTaPAHv3.js → SecretsTab-Cu3sx2OA.js} +4 -4
  264. package/dist/{SecretsTab-DTaPAHv3.js.map → SecretsTab-Cu3sx2OA.js.map} +1 -1
  265. package/dist/{SettingsTab-BhT5sui9.js → SettingsTab-B_vvSLvt.js} +6 -6
  266. package/dist/{SettingsTab-BhT5sui9.js.map → SettingsTab-B_vvSLvt.js.map} +1 -1
  267. package/dist/{SettingsTab-o9tfAuE4.cjs → SettingsTab-C6zIL2D6.cjs} +2 -2
  268. package/dist/{SettingsTab-o9tfAuE4.cjs.map → SettingsTab-C6zIL2D6.cjs.map} +1 -1
  269. package/dist/{SignalWidget-CO3UaFok.cjs → SignalWidget-BagcB92r.cjs} +2 -2
  270. package/dist/{SignalWidget-CO3UaFok.cjs.map → SignalWidget-BagcB92r.cjs.map} +1 -1
  271. package/dist/{SignalWidget-C-iEC5KL.js → SignalWidget-Dd54y28I.js} +5 -5
  272. package/dist/{SignalWidget-C-iEC5KL.js.map → SignalWidget-Dd54y28I.js.map} +1 -1
  273. package/dist/{SimpleTextDialog-B9ZurpdS.cjs → SimpleTextDialog-BJ50TbWh.cjs} +2 -2
  274. package/dist/{SimpleTextDialog-B9ZurpdS.cjs.map → SimpleTextDialog-BJ50TbWh.cjs.map} +1 -1
  275. package/dist/{SimpleTextDialog-Bqh3eT2B.js → SimpleTextDialog-DZv9n_kJ.js} +5 -5
  276. package/dist/{SimpleTextDialog-Bqh3eT2B.js.map → SimpleTextDialog-DZv9n_kJ.js.map} +1 -1
  277. package/dist/{SpacerWidget-CQh-LB4u.cjs → SpacerWidget-DWjBns9r.cjs} +2 -2
  278. package/dist/{SpacerWidget-CQh-LB4u.cjs.map → SpacerWidget-DWjBns9r.cjs.map} +1 -1
  279. package/dist/{SpacerWidget-FHxUhs1G.js → SpacerWidget-GPFYtIG1.js} +5 -5
  280. package/dist/{SpacerWidget-FHxUhs1G.js.map → SpacerWidget-GPFYtIG1.js.map} +1 -1
  281. package/dist/{SparklineWidget-ClT5Umm2.js → SparklineWidget-f11nrlLS.js} +7 -7
  282. package/dist/{SparklineWidget-ClT5Umm2.js.map → SparklineWidget-f11nrlLS.js.map} +1 -1
  283. package/dist/{SparklineWidget-BsMIozYC.cjs → SparklineWidget-xdPgolp3.cjs} +2 -2
  284. package/dist/{SparklineWidget-BsMIozYC.cjs.map → SparklineWidget-xdPgolp3.cjs.map} +1 -1
  285. package/dist/{TabbookWidget-So-oaWd4.cjs → TabbookWidget-CUIYWHRH.cjs} +2 -2
  286. package/dist/{TabbookWidget-So-oaWd4.cjs.map → TabbookWidget-CUIYWHRH.cjs.map} +1 -1
  287. package/dist/{TabbookWidget-D-b0v0oo.js → TabbookWidget-DeaC27yC.js} +4 -4
  288. package/dist/{TabbookWidget-D-b0v0oo.js.map → TabbookWidget-DeaC27yC.js.map} +1 -1
  289. package/dist/{TargetPacketItemChooser-DD7JgCD9.js → TargetPacketItemChooser-BoBqvs3T.js} +23 -23
  290. package/dist/TargetPacketItemChooser-BoBqvs3T.js.map +1 -0
  291. package/dist/TargetPacketItemChooser-C0Z90rss.cjs +2 -0
  292. package/dist/TargetPacketItemChooser-C0Z90rss.cjs.map +1 -0
  293. package/dist/{TargetsTab-BD0JGvAl.cjs → TargetsTab-BMcWjrZ_.cjs} +2 -2
  294. package/dist/{TargetsTab-BD0JGvAl.cjs.map → TargetsTab-BMcWjrZ_.cjs.map} +1 -1
  295. package/dist/{TargetsTab-hTLe_rba.js → TargetsTab-CjVaBN9O.js} +11 -11
  296. package/dist/{TargetsTab-hTLe_rba.js.map → TargetsTab-CjVaBN9O.js.map} +1 -1
  297. package/dist/{TextBoxDialog-BRwZOtzT.js → TextBoxDialog-R6GC8pMa.js} +4 -4
  298. package/dist/{TextBoxDialog-BRwZOtzT.js.map → TextBoxDialog-R6GC8pMa.js.map} +1 -1
  299. package/dist/{TextboxWidget-CF4iq315.cjs → TextboxWidget-CXA9rR02.cjs} +2 -2
  300. package/dist/{TextboxWidget-CF4iq315.cjs.map → TextboxWidget-CXA9rR02.cjs.map} +1 -1
  301. package/dist/{TextboxWidget-WM3eFUR_.js → TextboxWidget-tL41zWUX.js} +6 -6
  302. package/dist/{TextboxWidget-WM3eFUR_.js.map → TextboxWidget-tL41zWUX.js.map} +1 -1
  303. package/dist/{TextfieldWidget-D9BINKRU.cjs → TextfieldWidget-D-H2fOZG.cjs} +2 -2
  304. package/dist/{TextfieldWidget-D9BINKRU.cjs.map → TextfieldWidget-D-H2fOZG.cjs.map} +1 -1
  305. package/dist/{TextfieldWidget-lfc1Vg51.js → TextfieldWidget-D1qj14Qi.js} +5 -5
  306. package/dist/{TextfieldWidget-lfc1Vg51.js.map → TextfieldWidget-D1qj14Qi.js.map} +1 -1
  307. package/dist/{TimeWidget-CgtJbnnC.cjs → TimeWidget-CGk8Ze_I.cjs} +2 -2
  308. package/dist/{TimeWidget-CgtJbnnC.cjs.map → TimeWidget-CGk8Ze_I.cjs.map} +1 -1
  309. package/dist/{TimeWidget-B13aIVqG.js → TimeWidget-CSVGNong.js} +6 -6
  310. package/dist/{TimeWidget-B13aIVqG.js.map → TimeWidget-CSVGNong.js.map} +1 -1
  311. package/dist/{TitleWidget-CTAMgzU4.js → TitleWidget-CLx-tuYT.js} +5 -5
  312. package/dist/{TitleWidget-CTAMgzU4.js.map → TitleWidget-CLx-tuYT.js.map} +1 -1
  313. package/dist/{TitleWidget-BV2sDP_-.cjs → TitleWidget-ClhWhUf3.cjs} +2 -2
  314. package/dist/{TitleWidget-BV2sDP_-.cjs.map → TitleWidget-ClhWhUf3.cjs.map} +1 -1
  315. package/dist/{ToolsTab-DXK-L-kx.cjs → ToolsTab-DTHap-Nq.cjs} +2 -2
  316. package/dist/{ToolsTab-DXK-L-kx.cjs.map → ToolsTab-DTHap-Nq.cjs.map} +1 -1
  317. package/dist/{ToolsTab-CmhRtClS.js → ToolsTab-lBB_KhmA.js} +10 -10
  318. package/dist/{ToolsTab-CmhRtClS.js.map → ToolsTab-lBB_KhmA.js.map} +1 -1
  319. package/dist/{TopBar-D-lJHb6d.js → TopBar-C810rP_B.js} +4 -4
  320. package/dist/{TopBar-D-lJHb6d.js.map → TopBar-C810rP_B.js.map} +1 -1
  321. package/dist/{TopBar-BiE7GgIN.cjs → TopBar-Ctzx7o2k.cjs} +2 -2
  322. package/dist/{TopBar-BiE7GgIN.cjs.map → TopBar-Ctzx7o2k.cjs.map} +1 -1
  323. package/dist/TsdbTab-7F4mRKDo.js +125 -0
  324. package/dist/TsdbTab-7F4mRKDo.js.map +1 -0
  325. package/dist/TsdbTab-DVF6n9mq.cjs +2 -0
  326. package/dist/TsdbTab-DVF6n9mq.cjs.map +1 -0
  327. package/dist/{UpgradeToEnterpriseDialog-et3RrozN.js → UpgradeToEnterpriseDialog-D_S574Zb.js} +6 -6
  328. package/dist/{UpgradeToEnterpriseDialog-et3RrozN.js.map → UpgradeToEnterpriseDialog-D_S574Zb.js.map} +1 -1
  329. package/dist/{UpgradeToEnterpriseDialog-D1_viCAx.cjs → UpgradeToEnterpriseDialog-XJb6gVCY.cjs} +2 -2
  330. package/dist/{UpgradeToEnterpriseDialog-D1_viCAx.cjs.map → UpgradeToEnterpriseDialog-XJb6gVCY.cjs.map} +1 -1
  331. package/dist/{UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-D0cYHPwr.js → UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-BJxLUZhh.js} +11973 -11975
  332. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-BJxLUZhh.js.map +1 -0
  333. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-eKtA_EtD.cjs +1485 -0
  334. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-eKtA_EtD.cjs.map +1 -0
  335. package/dist/{VWidget-0kkhOxhV.js → VWidget-CxnaMF0w.js} +3 -3
  336. package/dist/{VWidget-0kkhOxhV.js.map → VWidget-CxnaMF0w.js.map} +1 -1
  337. package/dist/{VWidget-Dkji3VZ0.cjs → VWidget-dEHSEvZx.cjs} +2 -2
  338. package/dist/{VWidget-Dkji3VZ0.cjs.map → VWidget-dEHSEvZx.cjs.map} +1 -1
  339. package/dist/{ValueWidget-BoQfnx8U.js → ValueWidget-BYgpXfDo.js} +6 -6
  340. package/dist/{ValueWidget-BoQfnx8U.js.map → ValueWidget-BYgpXfDo.js.map} +1 -1
  341. package/dist/{ValueWidget-mkXMZvdK.cjs → ValueWidget-Bws1qOEI.cjs} +2 -2
  342. package/dist/{ValueWidget-mkXMZvdK.cjs.map → ValueWidget-Bws1qOEI.cjs.map} +1 -1
  343. package/dist/{ValuelimitsbarWidget-B8IUYgYx.cjs → ValuelimitsbarWidget-BoZSJvuq.cjs} +2 -2
  344. package/dist/{ValuelimitsbarWidget-B8IUYgYx.cjs.map → ValuelimitsbarWidget-BoZSJvuq.cjs.map} +1 -1
  345. package/dist/{ValuelimitsbarWidget-ZfgwDNqX.js → ValuelimitsbarWidget-Dc9-VNZ3.js} +7 -7
  346. package/dist/{ValuelimitsbarWidget-ZfgwDNqX.js.map → ValuelimitsbarWidget-Dc9-VNZ3.js.map} +1 -1
  347. package/dist/{ValuelimitscolumnWidget-B3x9DknL.js → ValuelimitscolumnWidget-b7W8K3mR.js} +7 -7
  348. package/dist/{ValuelimitscolumnWidget-B3x9DknL.js.map → ValuelimitscolumnWidget-b7W8K3mR.js.map} +1 -1
  349. package/dist/{ValuelimitscolumnWidget-B7DigaiC.cjs → ValuelimitscolumnWidget-ta9i_tiy.cjs} +2 -2
  350. package/dist/{ValuelimitscolumnWidget-B7DigaiC.cjs.map → ValuelimitscolumnWidget-ta9i_tiy.cjs.map} +1 -1
  351. package/dist/{ValuerangebarWidget-40InNHft.js → ValuerangebarWidget-DmhczZQb.js} +7 -7
  352. package/dist/{ValuerangebarWidget-40InNHft.js.map → ValuerangebarWidget-DmhczZQb.js.map} +1 -1
  353. package/dist/{ValuerangebarWidget-DA4X0MuO.cjs → ValuerangebarWidget-Ips-beG6.cjs} +2 -2
  354. package/dist/{ValuerangebarWidget-DA4X0MuO.cjs.map → ValuerangebarWidget-Ips-beG6.cjs.map} +1 -1
  355. package/dist/{VerticalWidget-BiFa3xbs.cjs → VerticalWidget-BVt7QPjO.cjs} +2 -2
  356. package/dist/{VerticalWidget-BiFa3xbs.cjs.map → VerticalWidget-BVt7QPjO.cjs.map} +1 -1
  357. package/dist/{VerticalWidget-abr1X6L7.js → VerticalWidget-BvsVh0Ob.js} +4 -4
  358. package/dist/{VerticalWidget-abr1X6L7.js.map → VerticalWidget-BvsVh0Ob.js.map} +1 -1
  359. package/dist/{VerticalboxWidget-Cx30rcqe.cjs → VerticalboxWidget-CNoXT3YW.cjs} +2 -2
  360. package/dist/{VerticalboxWidget-Cx30rcqe.cjs.map → VerticalboxWidget-CNoXT3YW.cjs.map} +1 -1
  361. package/dist/{VerticalboxWidget-DsbB17o-.js → VerticalboxWidget-ClTCDCQN.js} +7 -7
  362. package/dist/{VerticalboxWidget-DsbB17o-.js.map → VerticalboxWidget-ClTCDCQN.js.map} +1 -1
  363. package/dist/{Widget-VL9FlMQp.cjs → Widget-CB_BtOFw.cjs} +2 -2
  364. package/dist/{Widget-VL9FlMQp.cjs.map → Widget-CB_BtOFw.cjs.map} +1 -1
  365. package/dist/{Widget-DksaxMdD.js → Widget-DRhVdCLP.js} +2 -2
  366. package/dist/{Widget-DksaxMdD.js.map → Widget-DRhVdCLP.js.map} +1 -1
  367. package/dist/components.cjs +1 -1
  368. package/dist/components.js +19 -19
  369. package/dist/icons.js +2 -2
  370. package/dist/{index-Qy49-kGB.cjs → index-3sXOEKCU.cjs} +4 -4
  371. package/dist/index-3sXOEKCU.cjs.map +1 -0
  372. package/dist/{index-DqKiZufS.cjs → index-B34azWgs.cjs} +4 -4
  373. package/dist/index-B34azWgs.cjs.map +1 -0
  374. package/dist/{index-C7Uj4U87.js → index-CJcL4_a4.js} +6 -6
  375. package/dist/index-CJcL4_a4.js.map +1 -0
  376. package/dist/{index-BRc4sKEF.js → index-GYAZJDxn.js} +75 -69
  377. package/dist/index-GYAZJDxn.js.map +1 -0
  378. package/dist/plugins.cjs +1 -1
  379. package/dist/plugins.cjs.map +1 -1
  380. package/dist/plugins.js +3 -3
  381. package/dist/plugins.js.map +1 -1
  382. package/dist/purify.es-4pyphLiB.cjs +3 -0
  383. package/dist/purify.es-4pyphLiB.cjs.map +1 -0
  384. package/dist/{purify.es-DcWaZU6I.js → purify.es-BPDBzHtc.js} +115 -115
  385. package/dist/purify.es-BPDBzHtc.js.map +1 -0
  386. package/dist/{settings-D3MxiRHY.cjs → settings-B0AhztTk.cjs} +2 -2
  387. package/dist/{settings-D3MxiRHY.cjs.map → settings-B0AhztTk.cjs.map} +1 -1
  388. package/dist/{settings-BDlsBCNk.js → settings-C2auUQwX.js} +2 -2
  389. package/dist/{settings-BDlsBCNk.js.map → settings-C2auUQwX.js.map} +1 -1
  390. package/dist/tools/admin.cjs +1 -1
  391. package/dist/tools/admin.js +1 -1
  392. package/dist/tools/base.cjs +1 -1
  393. package/dist/tools/base.js +9 -9
  394. package/dist/tools/calendar.cjs +1 -1
  395. package/dist/tools/calendar.js +1 -1
  396. package/dist/tools/scriptrunner.cjs +8 -8
  397. package/dist/tools/scriptrunner.cjs.map +1 -1
  398. package/dist/tools/scriptrunner.js +3185 -2986
  399. package/dist/tools/scriptrunner.js.map +1 -1
  400. package/dist/vue-common.css +1 -1
  401. package/dist/widgets.cjs +1 -1
  402. package/dist/widgets.js +65 -65
  403. package/package.json +10 -10
  404. package/dist/EventListDialog-CktWO2jn.js.map +0 -1
  405. package/dist/EventListDialog-EAGLDaHc.cjs +0 -2
  406. package/dist/EventListDialog-EAGLDaHc.cjs.map +0 -1
  407. package/dist/Graph-9_EZ9aQx.cjs +0 -2
  408. package/dist/Graph-9_EZ9aQx.cjs.map +0 -1
  409. package/dist/Graph-GhpiUBKI.js.map +0 -1
  410. package/dist/HorizontallineWidget-CnRlq7hi.js +0 -16
  411. package/dist/MicroservicesTab-ARGtrfOb.cjs +0 -4
  412. package/dist/MicroservicesTab-ARGtrfOb.cjs.map +0 -1
  413. package/dist/MicroservicesTab-BSXNA_Si.js.map +0 -1
  414. package/dist/Openc3Screen-BP7Ho9XC.js.map +0 -1
  415. package/dist/Openc3Screen-CJOTF-lu.cjs.map +0 -1
  416. package/dist/PackagesTab-ByfVH001.js.map +0 -1
  417. package/dist/PackagesTab-HPNAXhzf.cjs +0 -2
  418. package/dist/PackagesTab-HPNAXhzf.cjs.map +0 -1
  419. package/dist/PluginsTab-D7zpmf8s.js.map +0 -1
  420. package/dist/PluginsTab-DfmpvAYa.cjs +0 -6
  421. package/dist/PluginsTab-DfmpvAYa.cjs.map +0 -1
  422. package/dist/TargetPacketItemChooser-DD7JgCD9.js.map +0 -1
  423. package/dist/TargetPacketItemChooser-PqyXKRlT.cjs +0 -2
  424. package/dist/TargetPacketItemChooser-PqyXKRlT.cjs.map +0 -1
  425. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-D0cYHPwr.js.map +0 -1
  426. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-DtL207xP.cjs +0 -1485
  427. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-DtL207xP.cjs.map +0 -1
  428. package/dist/index-BRc4sKEF.js.map +0 -1
  429. package/dist/index-C7Uj4U87.js.map +0 -1
  430. package/dist/index-DqKiZufS.cjs.map +0 -1
  431. package/dist/index-Qy49-kGB.cjs.map +0 -1
  432. package/dist/purify.es-B336bjAn.cjs +0 -3
  433. package/dist/purify.es-B336bjAn.cjs.map +0 -1
  434. package/dist/purify.es-DcWaZU6I.js.map +0 -1
@@ -1,1485 +0,0 @@
1
- "use strict";const Ge=require("vue"),Sx=require("./CustomIcon-8F08upeg.cjs"),Cx=require("./format-DOZQNf-X.cjs");var go=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function el(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var uc={exports:{}},zd;function kx(){return zd||(zd=1,(function(l,c){(function(){var e="ace",u=(function(){return this})();!u&&typeof window<"u"&&(u=window);var $=function(s,o,a){if(typeof s!="string"){$.original?$.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(a=o),$.modules[s]||($.payloads[s]=a,$.modules[s]=null)};$.modules={},$.payloads={};var b=function(s,o,a){if(typeof o=="string"){var r=f(s,o);if(r!=null)return a&&a(),r}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var n=[],i=0,h=o.length;i<h;++i){var m=f(s,o[i]);if(m==null&&v.original)return;n.push(m)}return a&&a.apply(null,n)||!0}},v=function(s,o){var a=b("",s,o);return a==null&&v.original?v.original.apply(this,arguments):a},x=function(s,o){if(o.indexOf("!")!==-1){var a=o.split("!");return x(s,a[0])+"!"+x(s,a[1])}if(o.charAt(0)=="."){var r=s.split("/").slice(0,-1).join("/");for(o=r+"/"+o;o.indexOf(".")!==-1&&n!=o;){var n=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},f=function(s,o){o=x(s,o);var a=$.modules[o];if(!a){if(a=$.payloads[o],typeof a=="function"){var r={},n={id:o,uri:"",exports:r,packaged:!0},i=function(m,y){return b(o,m,y)},h=a(i,r,n);r=h||n.exports,$.modules[o]=r,delete $.payloads[o]}a=$.modules[o]=r||a}return a};function p(s){var o=u;u[s]||(u[s]={}),o=u[s],(!o.define||!o.define.packaged)&&($.original=o.define,o.define=$,o.define.packaged=!0),(!o.require||!o.require.packaged)&&(v.original=o.require,o.require=v,o.require.packaged=!0)}p(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,u,$){function b(v,x,f){Object.defineProperty(v,x,{value:f,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||b(String.prototype,"startsWith",function(v,x){return x=x||0,this.lastIndexOf(v,x)===x}),String.prototype.endsWith||b(String.prototype,"endsWith",function(v,x){var f=this;(x===void 0||x>f.length)&&(x=f.length),x-=v.length;var p=f.indexOf(v,x);return p!==-1&&p===x}),String.prototype.repeat||b(String.prototype,"repeat",function(v){for(var x="",f=this;v>0;)v&1&&(x+=f),(v>>=1)&&(f+=f);return x}),String.prototype.includes||b(String.prototype,"includes",function(v,x){return this.indexOf(v,x)!=-1}),Object.assign||(Object.assign=function(v){if(v==null)throw new TypeError("Cannot convert undefined or null to object");for(var x=Object(v),f=1;f<arguments.length;f++){var p=arguments[f];p!=null&&Object.keys(p).forEach(function(s){x[s]=p[s]})}return x}),Object.values||(Object.values=function(v){return Object.keys(v).map(function(x){return v[x]})}),Array.prototype.find||b(Array.prototype,"find",function(v){for(var x=this.length,f=arguments[1],p=0;p<x;p++){var s=this[p];if(v.call(f,s,p,this))return s}}),Array.prototype.findIndex||b(Array.prototype,"findIndex",function(v){for(var x=this.length,f=arguments[1],p=0;p<x;p++){var s=this[p];if(v.call(f,s,p,this))return p}}),Array.prototype.includes||b(Array.prototype,"includes",function(v,x){return this.indexOf(v,x)!=-1}),Array.prototype.fill||b(Array.prototype,"fill",function(v){for(var x=this,f=x.length>>>0,p=arguments[1],s=p>>0,o=s<0?Math.max(f+s,0):Math.min(s,f),a=arguments[2],r=a===void 0?f:a>>0,n=r<0?Math.max(f+r,0):Math.min(r,f);o<n;)x[o]=v,o++;return x}),Array.of||b(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,u,$){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,u,$){u.deepCopy=function b(v){if(typeof v!="object"||!v)return v;var x;if(Array.isArray(v)){x=[];for(var f=0;f<v.length;f++)x[f]=b(v[f]);return x}if(Object.prototype.toString.call(v)!=="[object Object]")return v;x={};for(var f in v)x[f]=b(v[f]);return x}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,u,$){u.last=function(x){return x[x.length-1]},u.stringReverse=function(x){return x.split("").reverse().join("")},u.stringRepeat=function(x,f){for(var p="";f>0;)f&1&&(p+=x),(f>>=1)&&(x+=x);return p};var b=/^\s\s*/,v=/\s\s*$/;u.stringTrimLeft=function(x){return x.replace(b,"")},u.stringTrimRight=function(x){return x.replace(v,"")},u.copyObject=function(x){var f={};for(var p in x)f[p]=x[p];return f},u.copyArray=function(x){for(var f=[],p=0,s=x.length;p<s;p++)x[p]&&typeof x[p]=="object"?f[p]=this.copyObject(x[p]):f[p]=x[p];return f},u.deepCopy=e("./deep_copy").deepCopy,u.arrayToMap=function(x){for(var f={},p=0;p<x.length;p++)f[x[p]]=1;return f},u.createMap=function(x){var f=Object.create(null);for(var p in x)f[p]=x[p];return f},u.arrayRemove=function(x,f){for(var p=0;p<=x.length;p++)f===x[p]&&x.splice(p,1)},u.escapeRegExp=function(x){return x.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},u.escapeHTML=function(x){return(""+x).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},u.getMatchOffsets=function(x,f){var p=[];return x.replace(f,function(s){p.push({offset:arguments[arguments.length-2],length:s.length})}),p},u.deferredCall=function(x){var f=null,p=function(){f=null,x()},s=function(o){return s.cancel(),f=setTimeout(p,o||0),s};return s.schedule=s,s.call=function(){return this.cancel(),x(),s},s.cancel=function(){return clearTimeout(f),f=null,s},s.isPending=function(){return f},s},u.delayedCall=function(x,f){var p=null,s=function(){p=null,x()},o=function(a){p==null&&(p=setTimeout(s,a||f))};return o.delay=function(a){p&&clearTimeout(p),p=setTimeout(s,a||f)},o.schedule=o,o.call=function(){this.cancel(),x()},o.cancel=function(){p&&clearTimeout(p),p=null},o.isPending=function(){return p},o},u.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},u.skipEmptyMatch=function(x,f,p){return p&&x.codePointAt(f)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,u,$){u.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},u.getOS=function(){return u.isMac?u.OS.MAC:u.isLinux?u.OS.LINUX:u.OS.WINDOWS};var b=typeof navigator=="object"?navigator:{},v=(/mac|win|linux/i.exec(b.platform)||["other"])[0].toLowerCase(),x=b.userAgent||"",f=b.appName||"";u.isWin=v=="win",u.isMac=v=="mac",u.isLinux=v=="linux",u.isIE=f=="Microsoft Internet Explorer"||f.indexOf("MSAppHost")>=0?parseFloat((x.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((x.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),u.isOldIE=u.isIE&&u.isIE<9,u.isGecko=u.isMozilla=x.match(/ Gecko\/\d+/),u.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",u.isWebKit=parseFloat(x.split("WebKit/")[1])||void 0,u.isChrome=parseFloat(x.split(" Chrome/")[1])||void 0,u.isSafari=parseFloat(x.split(" Safari/")[1])&&!u.isChrome||void 0,u.isEdge=parseFloat(x.split(" Edge/")[1])||void 0,u.isAIR=x.indexOf("AdobeAIR")>=0,u.isAndroid=x.indexOf("Android")>=0,u.isChromeOS=x.indexOf(" CrOS ")>=0,u.isIOS=/iPad|iPhone|iPod/.test(x)&&!window.MSStream,u.isIOS&&(u.isMac=!0),u.isMobile=u.isIOS||u.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,u,$){var b=e("./useragent"),v="http://www.w3.org/1999/xhtml";u.buildDom=function a(r,n,i){if(typeof r=="string"&&r){var h=document.createTextNode(r);return n&&n.appendChild(h),h}if(!Array.isArray(r))return r&&r.appendChild&&n&&n.appendChild(r),r;if(typeof r[0]!="string"||!r[0]){for(var m=[],y=0;y<r.length;y++){var L=a(r[y],n,i);L&&m.push(L)}return m}var T=document.createElement(r[0]),k=r[1],w=1;k&&typeof k=="object"&&!Array.isArray(k)&&(w=2);for(var y=w;y<r.length;y++)a(r[y],T,i);return w==2&&Object.keys(k).forEach(function(R){var D=k[R];R==="class"?T.className=Array.isArray(D)?D.join(" "):D:typeof D=="function"||R=="value"||R[0]=="$"?T[R]=D:R==="ref"?i&&(i[D]=T):R==="style"?typeof D=="string"&&(T.style.cssText=D):D!=null&&T.setAttribute(R,D)}),n&&n.appendChild(T),T},u.getDocumentHead=function(a){return a||(a=document),a.head||a.getElementsByTagName("head")[0]||a.documentElement},u.createElement=function(a,r){return document.createElementNS?document.createElementNS(r||v,a):document.createElement(a)},u.removeChildren=function(a){a.innerHTML=""},u.createTextNode=function(a,r){var n=r?r.ownerDocument:document;return n.createTextNode(a)},u.createFragment=function(a){var r=a?a.ownerDocument:document;return r.createDocumentFragment()},u.hasCssClass=function(a,r){var n=(a.className+"").split(/\s+/g);return n.indexOf(r)!==-1},u.addCssClass=function(a,r){u.hasCssClass(a,r)||(a.className+=" "+r)},u.removeCssClass=function(a,r){for(var n=a.className.split(/\s+/g);;){var i=n.indexOf(r);if(i==-1)break;n.splice(i,1)}a.className=n.join(" ")},u.toggleCssClass=function(a,r){for(var n=a.className.split(/\s+/g),i=!0;;){var h=n.indexOf(r);if(h==-1)break;i=!1,n.splice(h,1)}return i&&n.push(r),a.className=n.join(" "),i},u.setCssClass=function(a,r,n){n?u.addCssClass(a,r):u.removeCssClass(a,r)},u.hasCssString=function(a,r){var n=0,i;if(r=r||document,i=r.querySelectorAll("style")){for(;n<i.length;)if(i[n++].id===a)return!0}},u.removeElementById=function(a,r){r=r||document,r.getElementById(a)&&r.getElementById(a).remove()};var x,f=[];u.useStrictCSP=function(a){x=a,a==!1?p():f||(f=[])};function p(){var a=f;f=null,a&&a.forEach(function(r){s(r[0],r[1])})}function s(a,r,n){if(!(typeof document>"u")){if(f){if(n)p();else if(n===!1)return f.push([a,r])}if(!x){var i=n;!n||!n.getRootNode?i=document:(i=n.getRootNode(),(!i||i==n)&&(i=document));var h=i.ownerDocument||i;if(r&&u.hasCssString(r,i))return null;r&&(a+=`
2
- /*# sourceURL=ace/css/`+r+" */");var m=u.createElement("style");m.appendChild(h.createTextNode(a)),r&&(m.id=r),i==h&&(i=u.getDocumentHead(h)),i.insertBefore(m,i.firstChild)}}}if(u.importCssString=s,u.importCssStylsheet=function(a,r){u.buildDom(["link",{rel:"stylesheet",href:a}],u.getDocumentHead(r))},u.$fixPositionBug=function(a){var r=a.getBoundingClientRect();if(a.style.left){var n=parseFloat(a.style.left),i=+r.left;Math.abs(n-i)>1&&(a.style.left=2*n-i+"px")}if(a.style.right){var n=parseFloat(a.style.right),i=window.innerWidth-r.right;Math.abs(n-i)>1&&(a.style.right=2*n-i+"px")}if(a.style.top){var n=parseFloat(a.style.top),i=+r.top;Math.abs(n-i)>1&&(a.style.top=2*n-i+"px")}if(a.style.bottom){var n=parseFloat(a.style.bottom),i=window.innerHeight-r.bottom;Math.abs(n-i)>1&&(a.style.bottom=2*n-i+"px")}},u.scrollbarWidth=function(a){var r=u.createElement("ace_inner");r.style.width="100%",r.style.minWidth="0px",r.style.height="200px",r.style.display="block";var n=u.createElement("ace_outer"),i=n.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",n.appendChild(r);var h=a&&a.documentElement||document&&document.documentElement;if(!h)return 0;h.appendChild(n);var m=r.offsetWidth;i.overflow="scroll";var y=r.offsetWidth;return m===y&&(y=n.clientWidth),h.removeChild(n),m-y},u.computedStyle=function(a,r){return window.getComputedStyle(a,"")||{}},u.setStyle=function(a,r,n){a[r]!==n&&(a[r]=n)},u.HAS_CSS_ANIMATION=!1,u.HAS_CSS_TRANSFORMS=!1,u.HI_DPI=b.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,b.isChromeOS&&(u.HI_DPI=!1),typeof document<"u"){var o=document.createElement("div");u.HI_DPI&&o.style.transform!==void 0&&(u.HAS_CSS_TRANSFORMS=!0),!b.isEdge&&typeof o.style.animationName<"u"&&(u.HAS_CSS_ANIMATION=!0),o=null}u.HAS_CSS_TRANSFORMS?u.translate=function(a,r,n){a.style.transform="translate("+Math.round(r)+"px, "+Math.round(n)+"px)"}:u.translate=function(a,r,n){a.style.top=Math.round(n)+"px",a.style.left=Math.round(r)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,u,$){var b=e("./dom");u.get=function(v,x){var f=new XMLHttpRequest;f.open("GET",v,!0),f.onreadystatechange=function(){f.readyState===4&&x(f.responseText)},f.send(null)},u.loadScript=function(v,x){var f=b.getDocumentHead(),p=document.createElement("script");p.src=v,f.appendChild(p),p.onload=p.onreadystatechange=function(s,o){(o||!p.readyState||p.readyState=="loaded"||p.readyState=="complete")&&(p=p.onload=p.onreadystatechange=null,o||x())}},u.qualifyURL=function(v){var x=document.createElement("a");return x.href=v,x.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,u,$){u.inherits=function(b,v){b.super_=v,b.prototype=Object.create(v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}})},u.mixin=function(b,v){for(var x in v)b[x]=v[x];return b},u.implement=function(b,v){u.mixin(b,v)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,u,$){var b={},v=function(){this.propagationStopped=!0},x=function(){this.defaultPrevented=!0};b._emit=b._dispatchEvent=function(f,p){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var s=this._eventRegistry[f]||[],o=this._defaultHandlers[f];if(!(!s.length&&!o)){(typeof p!="object"||!p)&&(p={}),p.type||(p.type=f),p.stopPropagation||(p.stopPropagation=v),p.preventDefault||(p.preventDefault=x),s=s.slice();for(var a=0;a<s.length&&(s[a](p,this),!p.propagationStopped);a++);if(o&&!p.defaultPrevented)return o(p,this)}},b._signal=function(f,p){var s=(this._eventRegistry||{})[f];if(s){s=s.slice();for(var o=0;o<s.length;o++)s[o](p,this)}},b.once=function(f,p){var s=this;if(this.on(f,function o(){s.off(f,o),p.apply(null,arguments)}),!p)return new Promise(function(o){p=o})},b.setDefaultHandler=function(f,p){var s=this._defaultHandlers;if(s||(s=this._defaultHandlers={_disabled_:{}}),s[f]){var o=s[f],a=s._disabled_[f];a||(s._disabled_[f]=a=[]),a.push(o);var r=a.indexOf(p);r!=-1&&a.splice(r,1)}s[f]=p},b.removeDefaultHandler=function(f,p){var s=this._defaultHandlers;if(s){var o=s._disabled_[f];if(s[f]==p)o&&this.setDefaultHandler(f,o.pop());else if(o){var a=o.indexOf(p);a!=-1&&o.splice(a,1)}}},b.on=b.addEventListener=function(f,p,s){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[f];return o||(o=this._eventRegistry[f]=[]),o.indexOf(p)==-1&&o[s?"unshift":"push"](p),p},b.off=b.removeListener=b.removeEventListener=function(f,p){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[f];if(s){var o=s.indexOf(p);o!==-1&&s.splice(o,1)}},b.removeAllListeners=function(f){f||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[f]=void 0),this._defaultHandlers&&(this._defaultHandlers[f]=void 0)},u.EventEmitter=b}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,u,$){u.reportError=function(v,x){var f=new Error(v);f.data=x,typeof console=="object"&&console.error&&console.error(f),setTimeout(function(){throw f})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,u,$){var b={"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"};u.defaultEnglishMessages=b}),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,u,$){"no use strict";var b=e("./oop"),v=e("./event_emitter").EventEmitter,x=e("./report_error").reportError,f=e("./default_english_messages").defaultEnglishMessages,p={setOptions:function(n){Object.keys(n).forEach(function(i){this.setOption(i,n[i])},this)},getOptions:function(n){var i={};if(n)Array.isArray(n)||(n=Object.keys(n));else{var h=this.$options;n=Object.keys(h).filter(function(m){return!h[m].hidden})}return n.forEach(function(m){i[m]=this.getOption(m)},this),i},setOption:function(n,i){if(this["$"+n]!==i){var h=this.$options[n];if(!h)return s('misspelled option "'+n+'"');if(h.forwardTo)return this[h.forwardTo]&&this[h.forwardTo].setOption(n,i);h.handlesSet||(this["$"+n]=i),h&&h.set&&h.set.call(this,i)}},getOption:function(n){var i=this.$options[n];return i?i.forwardTo?this[i.forwardTo]&&this[i.forwardTo].getOption(n):i&&i.get?i.get.call(this):this["$"+n]:s('misspelled option "'+n+'"')}};function s(n){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var o,a,r=(function(){function n(){this.$defaultOptions={},o=f,a="dollarSigns"}return n.prototype.defineOptions=function(i,h,m){return i.$options||(this.$defaultOptions[h]=i.$options={}),Object.keys(m).forEach(function(y){var L=m[y];typeof L=="string"&&(L={forwardTo:L}),L.name||(L.name=y),i.$options[L.name]=L,"initialValue"in L&&(i["$"+L.name]=L.initialValue)}),b.implement(i,p),this},n.prototype.resetOptions=function(i){Object.keys(i.$options).forEach(function(h){var m=i.$options[h];"value"in m&&i.setOption(h,m.value)})},n.prototype.setDefaultValue=function(i,h,m){if(!i){for(i in this.$defaultOptions)if(this.$defaultOptions[i][h])break;if(!this.$defaultOptions[i][h])return!1}var y=this.$defaultOptions[i]||(this.$defaultOptions[i]={});y[h]&&(y.forwardTo?this.setDefaultValue(y.forwardTo,h,m):y[h].value=m)},n.prototype.setDefaultValues=function(i,h){Object.keys(h).forEach(function(m){this.setDefaultValue(i,m,h[m])},this)},n.prototype.setMessages=function(i,h){o=i,h&&h.placeholders&&(a=h.placeholders)},n.prototype.nls=function(i,h,m){o[i]||(s("No message found for the key '"+i+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+h+"'."),o[h]||s("No message found for the default string '"+h+"' in the provided messages. Falling back to the default English message."));var y=o[i]||o[h]||h;return m&&(a==="dollarSigns"&&(y=y.replace(/\$(\$|[\d]+)/g,function(L,T){return T=="$"?"$":m[T]})),a==="curlyBrackets"&&(y=y.replace(/\{([^\}]+)\}/g,function(L,T){return m[T]}))),y},n})();r.prototype.warn=s,r.prototype.reportError=x,b.implement(r.prototype,v),u.AppConfig=r}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,u,$){$.exports=`.ace-tm .ace_gutter {
3
- background: #f0f0f0;
4
- color: #333;
5
- }
6
-
7
- .ace-tm .ace_print-margin {
8
- width: 1px;
9
- background: #e8e8e8;
10
- }
11
-
12
- .ace-tm .ace_fold {
13
- background-color: #6B72E6;
14
- }
15
-
16
- .ace-tm {
17
- background-color: #FFFFFF;
18
- color: black;
19
- }
20
-
21
- .ace-tm .ace_cursor {
22
- color: black;
23
- }
24
-
25
- .ace-tm .ace_invisible {
26
- color: rgb(191, 191, 191);
27
- }
28
-
29
- .ace-tm .ace_storage,
30
- .ace-tm .ace_keyword {
31
- color: blue;
32
- }
33
-
34
- .ace-tm .ace_constant {
35
- color: rgb(197, 6, 11);
36
- }
37
-
38
- .ace-tm .ace_constant.ace_buildin {
39
- color: rgb(88, 72, 246);
40
- }
41
-
42
- .ace-tm .ace_constant.ace_language {
43
- color: rgb(88, 92, 246);
44
- }
45
-
46
- .ace-tm .ace_constant.ace_library {
47
- color: rgb(6, 150, 14);
48
- }
49
-
50
- .ace-tm .ace_invalid {
51
- background-color: rgba(255, 0, 0, 0.1);
52
- color: red;
53
- }
54
-
55
- .ace-tm .ace_support.ace_function {
56
- color: rgb(60, 76, 114);
57
- }
58
-
59
- .ace-tm .ace_support.ace_constant {
60
- color: rgb(6, 150, 14);
61
- }
62
-
63
- .ace-tm .ace_support.ace_type,
64
- .ace-tm .ace_support.ace_class {
65
- color: rgb(109, 121, 222);
66
- }
67
-
68
- .ace-tm .ace_keyword.ace_operator {
69
- color: rgb(104, 118, 135);
70
- }
71
-
72
- .ace-tm .ace_string {
73
- color: rgb(3, 106, 7);
74
- }
75
-
76
- .ace-tm .ace_comment {
77
- color: rgb(76, 136, 107);
78
- }
79
-
80
- .ace-tm .ace_comment.ace_doc {
81
- color: rgb(0, 102, 255);
82
- }
83
-
84
- .ace-tm .ace_comment.ace_doc.ace_tag {
85
- color: rgb(128, 159, 191);
86
- }
87
-
88
- .ace-tm .ace_constant.ace_numeric {
89
- color: rgb(0, 0, 205);
90
- }
91
-
92
- .ace-tm .ace_variable {
93
- color: rgb(49, 132, 149);
94
- }
95
-
96
- .ace-tm .ace_xml-pe {
97
- color: rgb(104, 104, 91);
98
- }
99
-
100
- .ace-tm .ace_entity.ace_name.ace_function {
101
- color: #0000A2;
102
- }
103
-
104
-
105
- .ace-tm .ace_heading {
106
- color: rgb(12, 7, 255);
107
- }
108
-
109
- .ace-tm .ace_list {
110
- color:rgb(185, 6, 144);
111
- }
112
-
113
- .ace-tm .ace_meta.ace_tag {
114
- color:rgb(0, 22, 142);
115
- }
116
-
117
- .ace-tm .ace_string.ace_regex {
118
- color: rgb(255, 0, 0)
119
- }
120
-
121
- .ace-tm .ace_marker-layer .ace_selection {
122
- background: rgb(181, 213, 255);
123
- }
124
- .ace-tm.ace_multiselect .ace_selection.ace_start {
125
- box-shadow: 0 0 3px 0px white;
126
- }
127
- .ace-tm .ace_marker-layer .ace_step {
128
- background: rgb(252, 255, 0);
129
- }
130
-
131
- .ace-tm .ace_marker-layer .ace_stack {
132
- background: rgb(164, 229, 101);
133
- }
134
-
135
- .ace-tm .ace_marker-layer .ace_bracket {
136
- margin: -1px 0 0 -1px;
137
- border: 1px solid rgb(192, 192, 192);
138
- }
139
-
140
- .ace-tm .ace_marker-layer .ace_active-line {
141
- background: rgba(0, 0, 0, 0.07);
142
- }
143
-
144
- .ace-tm .ace_gutter-active-line {
145
- background-color : #dcdcdc;
146
- }
147
-
148
- .ace-tm .ace_marker-layer .ace_selected-word {
149
- background: rgb(250, 250, 255);
150
- border: 1px solid rgb(200, 200, 250);
151
- }
152
-
153
- .ace-tm .ace_indent-guide {
154
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
155
- }
156
-
157
- .ace-tm .ace_indent-guide-active {
158
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
159
- }
160
- `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,u,$){u.isDark=!1,u.cssClass="ace-tm",u.cssText=e("./textmate-css"),u.$id="ace/theme/textmate";var b=e("../lib/dom");b.importCssString(u.cssText,u.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,u,$){"no use strict";var b=e("./lib/lang"),v=e("./lib/net"),x=e("./lib/dom"),f=e("./lib/app_config").AppConfig;$.exports=u=new f;var p={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};u.get=function(r){if(!p.hasOwnProperty(r))throw new Error("Unknown config key: "+r);return p[r]},u.set=function(r,n){if(p.hasOwnProperty(r))p[r]=n;else if(this.setDefaultValue("",r,n)==!1)throw new Error("Unknown config key: "+r);r=="useStrictCSP"&&x.useStrictCSP(n)},u.all=function(){return b.copyObject(p)},u.$modes={},u.moduleUrl=function(r,n){if(p.$moduleUrls[r])return p.$moduleUrls[r];var i=r.split("/");n=n||i[i.length-2]||"";var h=n=="snippets"?"/":"-",m=i[i.length-1];if(n=="worker"&&h=="-"){var y=new RegExp("^"+n+"[\\-_]|[\\-_]"+n+"$","g");m=m.replace(y,"")}(!m||m==n)&&i.length>1&&(m=i[i.length-2]);var L=p[n+"Path"];return L==null?L=p.basePath:h=="/"&&(n=h=""),L&&L.slice(-1)!="/"&&(L+="/"),L+n+h+m+this.get("suffix")},u.setModuleUrl=function(r,n){return p.$moduleUrls[r]=n};var s=function(r,n){if(r==="ace/theme/textmate"||r==="./theme/textmate")return n(null,e("./theme/textmate"));if(o)return o(r,n);console.error("loader is not configured")},o;u.setLoader=function(r){o=r},u.dynamicModules=Object.create(null),u.$loading={},u.$loaded={},u.loadModule=function(r,n){var i;if(Array.isArray(r))var h=r[0],m=r[1];else if(typeof r=="string")var m=r;var y=function(L){if(L&&!u.$loading[m])return n&&n(L);if(u.$loading[m]||(u.$loading[m]=[]),u.$loading[m].push(n),!(u.$loading[m].length>1)){var T=function(){s(m,function(k,w){w&&(u.$loaded[m]=w),u._emit("load.module",{name:m,module:w});var R=u.$loading[m];u.$loading[m]=null,R.forEach(function(D){D&&D(w)})})};if(!u.get("packaged"))return T();v.loadScript(u.moduleUrl(m,h),T),a()}};if(u.dynamicModules[m])u.dynamicModules[m]().then(function(L){L.default?y(L.default):y(L)});else{try{i=this.$require(m)}catch{}y(i||u.$loaded[m])}},u.$require=function(r){if(typeof $.require=="function"){var n="require";return $[n](r)}},u.setModuleLoader=function(r,n){u.dynamicModules[r]=n};var a=function(){!p.basePath&&!p.workerPath&&!p.modePath&&!p.themePath&&!Object.keys(p.$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"),a=function(){})};u.version="1.43.6"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,u,$){e("./lib/fixoldbrowsers");var b=e("./config");b.setLoader(function(p,s){e([p],function(o){s(null,o)})});var v=(function(){return this||typeof window<"u"&&window})();$.exports=function(p){b.init=x,b.$require=e,p.require=e},x(!0);function x(p){if(!(!v||!v.document)){b.set("packaged",p||e.packaged||$.packaged||v.define&&(void 0).packaged);var s={},o="",a=document.currentScript||document._currentScript,r=a&&a.ownerDocument||document;a&&a.src&&(o=a.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var n=r.getElementsByTagName("script"),i=0;i<n.length;i++){var h=n[i],m=h.src||h.getAttribute("src");if(m){for(var y=h.attributes,L=0,T=y.length;L<T;L++){var k=y[L];k.name.indexOf("data-ace-")===0&&(s[f(k.name.replace(/^data-ace-/,""))]=k.value)}var w=m.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);w&&(o=w[1])}}o&&(s.base=s.base||o,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base;for(var R in s)typeof s[R]<"u"&&b.set(R,s[R])}}function f(p){return p.replace(/-(.)/g,function(s,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,u,$){var b=(function(){function v(x,f,p,s){this.start={row:x,column:f},this.end={row:p,column:s}}return v.prototype.isEqual=function(x){return this.start.row===x.start.row&&this.end.row===x.end.row&&this.start.column===x.start.column&&this.end.column===x.end.column},v.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},v.prototype.contains=function(x,f){return this.compare(x,f)==0},v.prototype.compareRange=function(x){var f,p=x.end,s=x.start;return f=this.compare(p.row,p.column),f==1?(f=this.compare(s.row,s.column),f==1?2:f==0?1:0):f==-1?-2:(f=this.compare(s.row,s.column),f==-1?-1:f==1?42:0)},v.prototype.comparePoint=function(x){return this.compare(x.row,x.column)},v.prototype.containsRange=function(x){return this.comparePoint(x.start)==0&&this.comparePoint(x.end)==0},v.prototype.intersects=function(x){var f=this.compareRange(x);return f==-1||f==0||f==1},v.prototype.isEnd=function(x,f){return this.end.row==x&&this.end.column==f},v.prototype.isStart=function(x,f){return this.start.row==x&&this.start.column==f},v.prototype.setStart=function(x,f){typeof x=="object"?(this.start.column=x.column,this.start.row=x.row):(this.start.row=x,this.start.column=f)},v.prototype.setEnd=function(x,f){typeof x=="object"?(this.end.column=x.column,this.end.row=x.row):(this.end.row=x,this.end.column=f)},v.prototype.inside=function(x,f){return this.compare(x,f)==0?!(this.isEnd(x,f)||this.isStart(x,f)):!1},v.prototype.insideStart=function(x,f){return this.compare(x,f)==0?!this.isEnd(x,f):!1},v.prototype.insideEnd=function(x,f){return this.compare(x,f)==0?!this.isStart(x,f):!1},v.prototype.compare=function(x,f){return!this.isMultiLine()&&x===this.start.row?f<this.start.column?-1:f>this.end.column?1:0:x<this.start.row?-1:x>this.end.row?1:this.start.row===x?f>=this.start.column?0:-1:this.end.row===x?f<=this.end.column?0:1:0},v.prototype.compareStart=function(x,f){return this.start.row==x&&this.start.column==f?-1:this.compare(x,f)},v.prototype.compareEnd=function(x,f){return this.end.row==x&&this.end.column==f?1:this.compare(x,f)},v.prototype.compareInside=function(x,f){return this.end.row==x&&this.end.column==f?1:this.start.row==x&&this.start.column==f?-1:this.compare(x,f)},v.prototype.clipRows=function(x,f){if(this.end.row>f)var p={row:f+1,column:0};else if(this.end.row<x)var p={row:x,column:0};if(this.start.row>f)var s={row:f+1,column:0};else if(this.start.row<x)var s={row:x,column:0};return v.fromPoints(s||this.start,p||this.end)},v.prototype.extend=function(x,f){var p=this.compare(x,f);if(p==0)return this;if(p==-1)var s={row:x,column:f};else var o={row:x,column:f};return v.fromPoints(s||this.start,o||this.end)},v.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},v.prototype.isMultiLine=function(){return this.start.row!==this.end.row},v.prototype.clone=function(){return v.fromPoints(this.start,this.end)},v.prototype.collapseRows=function(){return this.end.column==0?new v(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new v(this.start.row,0,this.end.row,0)},v.prototype.toScreenRange=function(x){var f=x.documentToScreenPosition(this.start),p=x.documentToScreenPosition(this.end);return new v(f.row,f.column,p.row,p.column)},v.prototype.moveBy=function(x,f){this.start.row+=x,this.start.column+=f,this.end.row+=x,this.end.column+=f},v})();b.fromPoints=function(v,x){return new b(v.row,v.column,x.row,x.column)},b.comparePoints=function(v,x){return v.row-x.row||v.column-x.column},u.Range=b}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,u,$){for(var b=e("./oop"),v={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:"*"}},x={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},f=0;f<10;f++)x["Digit"+f]=48+f,x["Numpad"+f]=96+f,v.PRINTABLE_KEYS[48+f]=""+f,v.FUNCTION_KEYS[96+f]="Numpad"+f;for(var f=65;f<91;f++){var p=String.fromCharCode(f+32);x["Key"+p.toUpperCase()]=f,v.PRINTABLE_KEYS[f]=p}for(var f=1;f<13;f++)x["F"+f]=111+f,v.FUNCTION_KEYS[111+f]="F"+f;var s={Shift:16,Control:17,Alt:18,Meta:224};for(var o in s)x[o]=x[o+"Left"]=x[o+"Right"]=s[o];u.$codeToKeyCode=x,v.PRINTABLE_KEYS[173]="-";for(var a in v.FUNCTION_KEYS){var r=v.FUNCTION_KEYS[a].toLowerCase();v[r]=parseInt(a,10)}for(var a in v.PRINTABLE_KEYS){var r=v.PRINTABLE_KEYS[a].toLowerCase();v[r]=parseInt(a,10)}b.mixin(v,v.MODIFIER_KEYS),b.mixin(v,v.PRINTABLE_KEYS),b.mixin(v,v.FUNCTION_KEYS),v.enter=v.return,v.escape=v.esc,v.del=v.delete,(function(){for(var n=["cmd","ctrl","alt","shift"],i=Math.pow(2,n.length);i--;)v.KEY_MODS[i]=n.filter(function(h){return i&v.KEY_MODS[h]}).join("-")+"-"})(),v.KEY_MODS[0]="",v.KEY_MODS[-1]="input-",b.mixin(u,v),u.default=u,u.keyCodeToString=function(n){var i=v[n];return typeof i!="string"&&(i=String.fromCharCode(n)),i.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,u,$){var b=e("./keys"),v=e("./useragent"),x=null,f=0,p;function s(){p=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return p={passive:!1},!0}})}catch{}}function o(){return p==null&&s(),p}function a(L,T,k){this.elem=L,this.type=T,this.callback=k}a.prototype.destroy=function(){n(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var r=u.addListener=function(L,T,k,w){L.addEventListener(T,k,o()),w&&w.$toDestroy.push(new a(L,T,k))},n=u.removeListener=function(L,T,k){L.removeEventListener(T,k,o())};u.stopEvent=function(L){return u.stopPropagation(L),u.preventDefault(L),!1},u.stopPropagation=function(L){L.stopPropagation&&L.stopPropagation()},u.preventDefault=function(L){L.preventDefault&&L.preventDefault()},u.getButton=function(L){return L.type=="dblclick"?0:L.type=="contextmenu"||v.isMac&&L.ctrlKey&&!L.altKey&&!L.shiftKey?2:L.button},u.capture=function(L,T,k){var w=L&&L.ownerDocument||document;function R(D){T&&T(D),k&&k(D),n(w,"mousemove",T),n(w,"mouseup",R),n(w,"dragstart",R)}return r(w,"mousemove",T),r(w,"mouseup",R),r(w,"dragstart",R),R},u.addMouseWheelListener=function(L,T,k){r(L,"wheel",function(w){var R=.15,D=w.deltaX||0,I=w.deltaY||0;switch(w.deltaMode){case w.DOM_DELTA_PIXEL:w.wheelX=D*R,w.wheelY=I*R;break;case w.DOM_DELTA_LINE:var E=15;w.wheelX=D*E,w.wheelY=I*E;break;case w.DOM_DELTA_PAGE:var z=150;w.wheelX=D*z,w.wheelY=I*z;break}T(w)},k)},u.addMultiMouseDownListener=function(L,T,k,w,R){var D=0,I,E,z,F={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(_){if(u.getButton(_)!==0?D=0:_.detail>1?(D++,D>4&&(D=1)):D=1,v.isIE){var S=Math.abs(_.clientX-I)>5||Math.abs(_.clientY-E)>5;(!z||S)&&(D=1),z&&clearTimeout(z),z=setTimeout(function(){z=null},T[D-1]||600),D==1&&(I=_.clientX,E=_.clientY)}if(_._clicks=D,k[w]("mousedown",_),D>4)D=0;else if(D>1)return k[w](F[D],_)}Array.isArray(L)||(L=[L]),L.forEach(function(_){r(_,"mousedown",O,R)})};function i(L){return 0|(L.ctrlKey?1:0)|(L.altKey?2:0)|(L.shiftKey?4:0)|(L.metaKey?8:0)}u.getModifierString=function(L){return b.KEY_MODS[i(L)]};function h(L,T,k){var w=i(T);if(!k&&T.code&&(k=b.$codeToKeyCode[T.code]||k),!v.isMac&&x){if(T.getModifierState&&(T.getModifierState("OS")||T.getModifierState("Win"))&&(w|=8),x.altGr)if((3&w)!=3)x.altGr=0;else return;if(k===18||k===17){var R=T.location;if(k===17&&R===1)x[k]==1&&(f=T.timeStamp);else if(k===18&&w===3&&R===2){var D=T.timeStamp-f;D<50&&(x.altGr=!0)}}}if(k in b.MODIFIER_KEYS&&(k=-1),!(!w&&k===13&&T.location===3&&(L(T,w,-k),T.defaultPrevented))){if(v.isChromeOS&&w&8){if(L(T,w,k),T.defaultPrevented)return;w&=-9}return!w&&!(k in b.FUNCTION_KEYS)&&!(k in b.PRINTABLE_KEYS)?!1:L(T,w,k)}}u.addCommandKeyListener=function(L,T,k){var w=null;r(L,"keydown",function(R){x[R.keyCode]=(x[R.keyCode]||0)+1;var D=h(T,R,R.keyCode);return w=R.defaultPrevented,D},k),r(L,"keypress",function(R){w&&(R.ctrlKey||R.altKey||R.shiftKey||R.metaKey)&&(u.stopEvent(R),w=null)},k),r(L,"keyup",function(R){x[R.keyCode]=null},k),x||(m(),r(window,"focus",m))};function m(){x=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!v.isOldIE){var y=1;u.nextTick=function(L,T){T=T||window;var k="zero-timeout-message-"+y++,w=function(R){R.data==k&&(u.stopPropagation(R),n(T,"message",w),L())};r(T,"message",w),T.postMessage(k,"*")}}u.$idleBlocked=!1,u.onIdle=function(L,T){return setTimeout(function k(){u.$idleBlocked?setTimeout(k,100):L()},T)},u.$idleBlockId=null,u.blockIdle=function(L){u.$idleBlockId&&clearTimeout(u.$idleBlockId),u.$idleBlocked=!0,u.$idleBlockId=setTimeout(function(){u.$idleBlocked=!1},L||100)},u.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),u.nextFrame?u.nextFrame=u.nextFrame.bind(window):u.nextFrame=function(L){setTimeout(L,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,u,$){var b;$.exports={lineMode:!1,pasteCancelled:function(){return b&&b>Date.now()-50?!0:b=!1},cancel:function(){b=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,u,$){var b=e("../lib/event"),v=e("../config").nls,x=e("../lib/useragent"),f=e("../lib/dom"),p=e("../lib/lang"),s=e("../clipboard"),o=x.isChrome<18,a=x.isIE,r=x.isChrome>63,n=400,i=e("../lib/keys"),h=i.KEY_MODS,m=x.isIOS,y=m?/\s/:/\n/,L=x.isMobile,T=(function(){function k(w,R){var D=this;this.host=R,this.text=f.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",w.insertBefore(this.text,w.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",L||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),b.addListener(this.text,"blur",function(I){D.ignoreFocusEvents||(R.onBlur(I),D.$isFocused=!1)},R),b.addListener(this.text,"focus",function(I){if(!D.ignoreFocusEvents){if(D.$isFocused=!0,x.isEdge)try{if(!document.hasFocus())return}catch{}R.onFocus(I),x.isEdge?setTimeout(D.resetSelection.bind(D)):D.resetSelection()}},R),this.$focusScroll=!1,R.on("beforeEndOperation",function(){var I=R.curOp,E=I&&I.command&&I.command.name;if(E!="insertstring"){var z=E&&(I.docChanged||I.selectionChanged);D.inComposition&&z&&(D.lastValue=D.text.value="",D.onCompositionEnd()),D.resetSelection()}}),R.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=m?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&R.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,b.addCommandKeyListener(this.text,function(I,E,z){if(!D.inComposition)return R.onCommandKey(I,E,z)},R),b.addListener(this.text,"select",this.onSelect.bind(this),R),b.addListener(this.text,"input",this.onInput.bind(this),R),b.addListener(this.text,"cut",this.onCut.bind(this),R),b.addListener(this.text,"copy",this.onCopy.bind(this),R),b.addListener(this.text,"paste",this.onPaste.bind(this),R),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&b.addListener(w,"keydown",function(I){if(!(x.isMac&&!I.metaKey||!I.ctrlKey))switch(I.keyCode){case 67:D.onCopy(I);break;case 86:D.onPaste(I);break;case 88:D.onCut(I);break}},R),this.syncComposition=p.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),b.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),R),b.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),R),b.addListener(this.text,"keyup",this.onKeyup.bind(this),R),b.addListener(this.text,"keydown",this.syncComposition.bind(this),R),b.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),R),this.closeTimeout,b.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),R),b.addListener(this.text,"mousedown",function(I){I.preventDefault(),D.onContextMenuClose()},R),b.addListener(R.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),R),b.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),R),m&&this.addIosSelectionHandler(w,R,this.text)}return k.prototype.addIosSelectionHandler=function(w,R,D){var I=this,E=null,z=!1;D.addEventListener("keydown",function(O){E&&clearTimeout(E),z=!0},!0),D.addEventListener("keyup",function(O){E=setTimeout(function(){z=!1},100)},!0);var F=function(O){if(document.activeElement===D&&!(z||I.inComposition||R.$mouseHandler.isMousePressed)&&!I.copied){var _=D.selectionStart,S=D.selectionEnd,N=null,W=0;if(_==0?N=i.up:_==1?N=i.home:S>I.lastSelectionEnd&&I.lastValue[S]==`
161
- `?N=i.end:_<I.lastSelectionStart&&I.lastValue[_-1]==" "?(N=i.left,W=h.option):_<I.lastSelectionStart||_==I.lastSelectionStart&&I.lastSelectionEnd!=I.lastSelectionStart&&_==S?N=i.left:S>I.lastSelectionEnd&&I.lastValue.slice(0,S).split(`
162
- `).length>2?N=i.down:S>I.lastSelectionEnd&&I.lastValue[S-1]==" "?(N=i.right,W=h.option):(S>I.lastSelectionEnd||S==I.lastSelectionEnd&&I.lastSelectionEnd!=I.lastSelectionStart&&_==S)&&(N=i.right),_!==S&&(W|=h.shift),N){var V=R.onCommandKey({},W,N);if(!V&&R.commands){N=i.keyCodeToString(N);var G=R.commands.findKeyCommand(W,N);G&&R.execCommand(G)}I.lastSelectionStart=_,I.lastSelectionEnd=S,I.resetSelection("")}}};document.addEventListener("selectionchange",F),R.on("destroy",function(){document.removeEventListener("selectionchange",F)})},k.prototype.onContextMenuClose=function(){var w=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){w.tempStyle&&(w.text.style.cssText=w.tempStyle,w.tempStyle=""),w.host.renderer.$isMousePressed=!1,w.host.renderer.$keepTextAreaAtCursor&&w.host.renderer.$moveTextAreaToCursor()},0)},k.prototype.$onContextMenu=function(w){this.host.textInput.onContextMenu(w),this.onContextMenuClose()},k.prototype.onKeyup=function(w){w.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()},k.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},k.prototype.onCompositionStart=function(w){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){w.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var R=this.host.getSelectionRange();R.end.row=R.start.row,R.end.column=R.start.column,this.inComposition.markerRange=R,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()))}},k.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 w=this.text.value;this.sendText(w),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)}}},k.prototype.onCompositionEnd=function(w){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),w&&this.onInput())},k.prototype.onCut=function(w){this.doCopy(w,!0)},k.prototype.onCopy=function(w){this.doCopy(w,!1)},k.prototype.onPaste=function(w){var R=this.handleClipboardData(w);s.pasteCancelled()||(typeof R=="string"?(R&&this.host.onPaste(R,w),x.isIE&&setTimeout(this.resetSelection),b.preventDefault(w)):(this.text.value="",this.pasted=!0))},k.prototype.doCopy=function(w,R){var D=this,I=this.host.getCopyText();if(!I)return b.preventDefault(w);this.handleClipboardData(w,I)?(m&&(this.resetSelection(I),this.copied=I,setTimeout(function(){D.copied=!1},10)),R?this.host.onCut():this.host.onCopy(),b.preventDefault(w)):(this.copied=!0,this.text.value=I,this.text.select(),setTimeout(function(){D.copied=!1,D.resetSelection(),R?D.host.onCut():D.host.onCopy()}))},k.prototype.handleClipboardData=function(w,R,D){var I=w.clipboardData||window.clipboardData;if(!(!I||o)){var E=a||D?"Text":"text/plain";try{return R?I.setData(E,R)!==!1:I.getData(E)}catch(z){if(!D)return this.handleClipboardData(z,R,!0)}}},k.prototype.onInput=function(w){if(this.inComposition)return this.onCompositionUpdate();if(w&&w.inputType){if(w.inputType=="historyUndo")return this.host.execCommand("undo");if(w.inputType=="historyRedo")return this.host.execCommand("redo")}var R=this.text.value,D=this.sendText(R,!0);(R.length>n+100||y.test(D)||L&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},k.prototype.sendText=function(w,R){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),w&&this.host.onPaste(w),this.pasted=!1,"";for(var D=this.text.selectionStart,I=this.text.selectionEnd,E=this.lastSelectionStart,z=this.lastValue.length-this.lastSelectionEnd,F=w,O=w.length-D,_=w.length-I,S=0;E>0&&this.lastValue[S]==w[S];)S++,E--;for(F=F.slice(S),S=1;z>0&&this.lastValue.length-S>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-S]==w[w.length-S];)S++,z--;O-=S-1,_-=S-1;var N=F.length-S+1;if(N<0&&(E=-N,N=0),F=F.slice(0,N),!R&&!F&&!O&&!E&&!z&&!_)return"";this.sendingText=!0;var W=!1;return x.isAndroid&&F==". "&&(F=" ",W=!0),F&&!E&&!z&&!O&&!_||this.commandMode?this.host.onTextInput(F):this.host.onTextInput(F,{extendLeft:E,extendRight:z,restoreStart:O,restoreEnd:_}),this.sendingText=!1,this.lastValue=w,this.lastSelectionStart=D,this.lastSelectionEnd=I,this.lastRestoreEnd=_,W?`
163
- `:F},k.prototype.onSelect=function(w){var R=this;if(!this.inComposition){var D=function(I){return I.selectionStart===0&&I.selectionEnd>=R.lastValue.length&&I.value===R.lastValue&&R.lastValue&&I.selectionEnd!==R.lastSelectionEnd};this.copied?this.copied=!1:D(this.text)?(this.host.selectAll(),this.resetSelection()):L&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},k.prototype.$resetSelectionIOS=function(w){if(!(!this.$isFocused||this.copied&&!w||this.sendingText)){w||(w="");var R=`
164
- ab`+w+`cde fg
165
- `;R!=this.text.value&&(this.text.value=this.lastValue=R);var D=4,I=4+(w.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=D||this.lastSelectionEnd!=I)&&this.text.setSelectionRange(D,I),this.lastSelectionStart=D,this.lastSelectionEnd=I}},k.prototype.$resetSelection=function(){var w=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var R=0,D=0,I="",E=function(G,Q){for(var te=Q,ce=1;ce<=G-w.rowStart&&ce<2*w.numberOfExtraLines+1;ce++)te+=w.host.session.getLine(G-ce).length+1;return te};if(this.host.session){var z=this.host.selection,F=z.getRange(),O=z.cursor.row;O===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):O===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(O<this.rowStart-1||O>this.rowEnd+1)&&(this.rowStart=O>this.numberOfExtraLines?O-this.numberOfExtraLines:0,this.rowEnd=O>this.numberOfExtraLines?O+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var _=[],S=this.rowStart;S<=this.rowEnd;S++)_.push(this.host.session.getLine(S));if(I=_.join(`
166
- `),R=E(F.start.row,F.start.column),D=E(F.end.row,F.end.column),F.start.row<this.rowStart){var N=this.host.session.getLine(this.rowStart-1);R=F.start.row<this.rowStart-1?0:R,D+=N.length+1,I=N+`
167
- `+I}else if(F.end.row>this.rowEnd){var W=this.host.session.getLine(this.rowEnd+1);D=F.end.row>this.rowEnd+1?W.length:F.end.column,D+=I.length+1,I=I+`
168
- `+W}else L&&O>0&&(I=`
169
- `+I,D+=1,R+=1);I.length>n&&(R<n&&D<n?I=I.slice(0,n):(I=`
170
- `,R==D?R=D=0:(R=0,D=1)));var V=I+`
171
-
172
- `;V!=this.lastValue&&(this.text.value=this.lastValue=V,this.lastSelectionStart=this.lastSelectionEnd=V.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=D||this.lastSelectionStart!=R||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(R,D),this.lastSelectionStart=R,this.lastSelectionEnd=D}catch{}this.inComposition=!1}},k.prototype.setHost=function(w){this.host=w},k.prototype.setNumberOfExtraLines=function(w){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,w<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=w},k.prototype.setAriaLabel=function(){var w="";if(this.host.$textInputAriaLabel&&(w+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var R=this.host.session.selection.cursor.row;w+=v("text-input.aria-label","Cursor at row $0",[R+1])}this.text.setAttribute("aria-label",w)},k.prototype.setAriaOptions=function(w){w.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",w.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",w.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),w.role&&this.text.setAttribute("role",w.role),w.setLabel&&(this.text.setAttribute("aria-roledescription",v("text-input.aria-roledescription","editor")),this.setAriaLabel())},k.prototype.focus=function(){var w=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||r||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var R=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var D=this.text.getBoundingClientRect().top!=0}catch{return}var I=[];if(D)for(var E=this.text.parentElement;E&&E.nodeType==1;)I.push(E),E.setAttribute("ace_nocontext","true"),!E.parentElement&&E.getRootNode?E=E.getRootNode().host:E=E.parentElement;this.text.focus({preventScroll:!0}),D&&I.forEach(function(z){z.removeAttribute("ace_nocontext")}),setTimeout(function(){w.text.style.position="",w.text.style.top=="0px"&&(w.text.style.top=R)},0)},k.prototype.blur=function(){this.text.blur()},k.prototype.isFocused=function(){return this.$isFocused},k.prototype.setInputHandler=function(w){this.inputHandler=w},k.prototype.getInputHandler=function(){return this.inputHandler},k.prototype.getElement=function(){return this.text},k.prototype.setCommandMode=function(w){this.commandMode=w,this.text.readOnly=!1},k.prototype.setReadOnly=function(w){this.commandMode||(this.text.readOnly=w)},k.prototype.setCopyWithEmptySelection=function(w){},k.prototype.onContextMenu=function(w){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:w}),this.moveToMouse(w,!0)},k.prototype.moveToMouse=function(w,R){var D=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(R?"z-index:100000;":"")+(x.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var I=this.host.container.getBoundingClientRect(),E=f.computedStyle(this.host.container),z=I.top+(parseInt(E.borderTopWidth)||0),F=I.left+(parseInt(E.borderLeftWidth)||0),O=I.bottom-z-this.text.clientHeight-2,_=function(S){f.translate(D.text,S.clientX-F-2,Math.min(S.clientY-z-2,O))};_(w),w.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),x.isWin&&b.capture(this.host.container,_,this.onContextMenuClose.bind(this)))},k.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},k})();u.TextInput=T,u.$setUserAgentForTests=function(k,w){L=k,m=w}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,u,$){var b=e("../lib/useragent"),v=0,x=550,f=(function(){function o(a){a.$clickSelection=null;var r=a.editor;r.setDefaultHandler("mousedown",this.onMouseDown.bind(a)),r.setDefaultHandler("dblclick",this.onDoubleClick.bind(a)),r.setDefaultHandler("tripleclick",this.onTripleClick.bind(a)),r.setDefaultHandler("quadclick",this.onQuadClick.bind(a)),r.setDefaultHandler("mousewheel",this.onMouseWheel.bind(a));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(i){a[i]=this[i]},this),a.selectByLines=this.extendSelectionBy.bind(a,"getLineRange"),a.selectByWords=this.extendSelectionBy.bind(a,"getWordRange")}return o.prototype.onMouseDown=function(a){var r=a.inSelection(),n=a.getDocumentPosition();this.mousedownEvent=a;var i=this.editor,h=a.getButton();if(h!==0){var m=i.getSelectionRange(),y=m.isEmpty();(y||h==1)&&i.selection.moveToPosition(n),h==2&&(i.textInput.onContextMenu(a.domEvent),b.isMozilla||a.preventDefault());return}if(this.mousedownEvent.time=Date.now(),r&&!i.isFocused()&&(i.focus(),this.$focusTimeout&&!this.$clickSelection&&!i.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(a);return}return this.captureMouse(a),this.startSelect(n,a.domEvent._clicks>1),a.preventDefault()},o.prototype.startSelect=function(a,r){a=a||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(a):r||n.selection.moveToPosition(a),r||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var a,r=this.editor,n=r.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(i==-1)a=this.$clickSelection.end;else if(i==1)a=this.$clickSelection.start;else{var h=s(this.$clickSelection,n,r.session);n=h.cursor,a=h.anchor}r.selection.setSelectionAnchor(a.row,a.column)}r.selection.selectToPosition(n),r.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(a){var r,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),h=n.selection[a](i.row,i.column);if(this.$clickSelection){var m=this.$clickSelection.comparePoint(h.start),y=this.$clickSelection.comparePoint(h.end);if(m==-1&&y<=0)r=this.$clickSelection.end,(h.end.row!=i.row||h.end.column!=i.column)&&(i=h.start);else if(y==1&&m>=0)r=this.$clickSelection.start,(h.start.row!=i.row||h.start.column!=i.column)&&(i=h.end);else if(m==-1&&y==1)i=h.end,r=h.start;else{var L=s(this.$clickSelection,i,n.session);i=L.cursor,r=L.anchor}n.selection.setSelectionAnchor(r.row,r.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var a=p(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),r=Date.now();(a>v||r-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(a){var r=a.getDocumentPosition(),n=this.editor,i=n.session,h=i.getBracketRange(r);h?(h.isEmpty()&&(h.start.column--,h.end.column++),this.setState("select")):(h=n.selection.getWordRange(r.row,r.column),this.setState("selectByWords")),this.$clickSelection=h,this.select()},o.prototype.onTripleClick=function(a){var r=a.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(r.row,r.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(r.row),this.select()},o.prototype.onQuadClick=function(a){var r=this.editor;r.selectAll(),this.$clickSelection=r.getSelectionRange(),this.setState("selectAll")},o.prototype.onMouseWheel=function(a){if(!a.getAccelKey()){a.getShiftKey()&&a.wheelY&&!a.wheelX&&(a.wheelX=a.wheelY,a.wheelY=0);var r=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=a.domEvent.timeStamp,h=i-n.t,m=h?a.wheelX/h:n.vx,y=h?a.wheelY/h:n.vy;h<x&&(m=(m+n.vx)/2,y=(y+n.vy)/2);var L=Math.abs(m/y),T=!1;if(L>=1&&r.renderer.isScrollableBy(a.wheelX*a.speed,0)&&(T=!0),L<=1&&r.renderer.isScrollableBy(0,a.wheelY*a.speed)&&(T=!0),T)n.allowed=i;else if(i-n.allowed<x){var k=Math.abs(m)<=1.5*Math.abs(n.vx)&&Math.abs(y)<=1.5*Math.abs(n.vy);k?(T=!0,n.allowed=i):n.allowed=0}if(n.t=i,n.vx=m,n.vy=y,T)return r.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed),a.stop()}},o})();f.prototype.selectEnd=f.prototype.selectByLinesEnd,f.prototype.selectAllEnd=f.prototype.selectByLinesEnd,f.prototype.selectByWordsEnd=f.prototype.selectByLinesEnd,u.DefaultHandlers=f;function p(o,a,r,n){return Math.sqrt(Math.pow(r-o,2)+Math.pow(n-a,2))}function s(o,a,r){if(o.start.row==o.end.row)var n=2*a.column-o.start.column-o.end.column;else if(o.start.row==o.end.row-1&&!o.start.column&&!o.end.column)var n=3*a.column-2*r.getLine(o.start.row).length;else var n=2*a.row-o.start.row-o.end.row;return n<0?{cursor:o.start,anchor:o.end}:{cursor:o.end,anchor:o.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,u,$){var b=e("../lib/event"),v=e("../lib/useragent"),x=(function(){function f(p,s){this.speed,this.wheelX,this.wheelY,this.domEvent=p,this.editor=s,this.x=this.clientX=p.clientX,this.y=this.clientY=p.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return f.prototype.stopPropagation=function(){b.stopPropagation(this.domEvent),this.propagationStopped=!0},f.prototype.preventDefault=function(){b.preventDefault(this.domEvent),this.defaultPrevented=!0},f.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},f.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},f.prototype.getGutterRow=function(){var p=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(p,0),o=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-o},f.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var p=this.editor,s=p.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=s.contains(o.row,o.column)}return this.$inSelection},f.prototype.getButton=function(){return b.getButton(this.domEvent)},f.prototype.getShiftKey=function(){return this.domEvent.shiftKey},f.prototype.getAccelKey=function(){return v.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},f})();u.MouseEvent=x}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,u,$){u.preventParentScroll=function(v){v.stopPropagation();var x=v.currentTarget,f=x.scrollHeight>x.clientHeight;f||v.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,u,$){var b=this&&this.__extends||(function(){var i=function(h,m){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,L){y.__proto__=L}||function(y,L){for(var T in L)Object.prototype.hasOwnProperty.call(L,T)&&(y[T]=L[T])},i(h,m)};return function(h,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");i(h,m);function y(){this.constructor=h}h.prototype=m===null?Object.create(m):(y.prototype=m.prototype,new y)}})(),v=this&&this.__values||function(i){var h=typeof Symbol=="function"&&Symbol.iterator,m=h&&i[h],y=0;if(m)return m.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&y>=i.length&&(i=void 0),{value:i&&i[y++],done:!i}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("./lib/dom");e("./lib/event");var f=e("./range").Range,p=e("./lib/scroll").preventParentScroll,s="ace_tooltip",o=(function(){function i(h){this.isOpen=!1,this.$element=null,this.$parentNode=h}return i.prototype.$init=function(){return this.$element=x.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},i.prototype.getElement=function(){return this.$element||this.$init()},i.prototype.setText=function(h){this.getElement().textContent=h},i.prototype.setHtml=function(h){this.getElement().innerHTML=h},i.prototype.setPosition=function(h,m){this.getElement().style.left=h+"px",this.getElement().style.top=m+"px"},i.prototype.setClassName=function(h){x.addCssClass(this.getElement(),h)},i.prototype.setTheme=function(h){this.theme&&(this.theme.isDark&&x.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&x.removeCssClass(this.getElement(),this.theme.cssClass)),h.isDark&&x.addCssClass(this.getElement(),"ace_dark"),h.cssClass&&x.addCssClass(this.getElement(),h.cssClass),this.theme={isDark:h.isDark,cssClass:h.cssClass}},i.prototype.show=function(h,m,y){h!=null&&this.setText(h),m!=null&&y!=null&&this.setPosition(m,y),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},i.prototype.hide=function(h){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},i.prototype.getHeight=function(){return this.getElement().offsetHeight},i.prototype.getWidth=function(){return this.getElement().offsetWidth},i.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},i})(),a=(function(){function i(){this.popups=[]}return i.prototype.addPopup=function(h){this.popups.push(h),this.updatePopups()},i.prototype.removePopup=function(h){var m=this.popups.indexOf(h);m!==-1&&(this.popups.splice(m,1),this.updatePopups())},i.prototype.updatePopups=function(){var h,m,y,L;this.popups.sort(function(F,O){return O.priority-F.priority});var T=[];try{for(var k=v(this.popups),w=k.next();!w.done;w=k.next()){var R=w.value,D=!0;try{for(var I=(y=void 0,v(T)),E=I.next();!E.done;E=I.next()){var z=E.value;if(this.doPopupsOverlap(z,R)){D=!1;break}}}catch(F){y={error:F}}finally{try{E&&!E.done&&(L=I.return)&&L.call(I)}finally{if(y)throw y.error}}D?T.push(R):R.hide()}}catch(F){h={error:F}}finally{try{w&&!w.done&&(m=k.return)&&m.call(k)}finally{if(h)throw h.error}}},i.prototype.doPopupsOverlap=function(h,m){var y=h.getElement().getBoundingClientRect(),L=m.getElement().getBoundingClientRect();return y.left<L.right&&y.right>L.left&&y.top<L.bottom&&y.bottom>L.top},i})(),r=new a;u.popupManager=r,u.Tooltip=o;var n=(function(i){b(h,i);function h(m){m===void 0&&(m=document.body);var y=i.call(this,m)||this;y.timeout=void 0,y.lastT=0,y.idleTime=350,y.lastEvent=void 0,y.onMouseOut=y.onMouseOut.bind(y),y.onMouseMove=y.onMouseMove.bind(y),y.waitForHover=y.waitForHover.bind(y),y.hide=y.hide.bind(y);var L=y.getElement();return L.style.whiteSpace="pre-wrap",L.style.pointerEvents="auto",L.addEventListener("mouseout",y.onMouseOut),L.tabIndex=-1,L.addEventListener("blur",(function(){L.contains(document.activeElement)||this.hide()}).bind(y)),L.addEventListener("wheel",p),y}return h.prototype.addToEditor=function(m){m.on("mousemove",this.onMouseMove),m.on("mousedown",this.hide);var y=m.renderer.getMouseEventTarget();y&&typeof y.removeEventListener=="function"&&y.addEventListener("mouseout",this.onMouseOut,!0)},h.prototype.removeFromEditor=function(m){m.off("mousemove",this.onMouseMove),m.off("mousedown",this.hide);var y=m.renderer.getMouseEventTarget();y&&typeof y.removeEventListener=="function"&&y.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},h.prototype.onMouseMove=function(m,y){this.lastEvent=m,this.lastT=Date.now();var L=y.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||L||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||L||(this.lastEvent=m,this.timeout=setTimeout(this.waitForHover,this.idleTime))},h.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var m=Date.now()-this.lastT;if(this.idleTime-m>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-m);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},h.prototype.isOutsideOfText=function(m){var y=m.editor,L=m.getDocumentPosition(),T=y.session.getLine(L.row);if(L.column==T.length){var k=y.renderer.pixelToScreenCoordinates(m.clientX,m.clientY),w=y.session.documentToScreenPosition(L.row,L.column);if(w.column!=k.column||w.row!=k.row)return!0}return!1},h.prototype.setDataProvider=function(m){this.$gatherData=m},h.prototype.showForRange=function(m,y,L,T){if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var k=m.renderer;this.isOpen||(r.addPopup(this),this.$registerCloseEvents(),this.setTheme(k.theme)),this.isOpen=!0,this.range=f.fromPoints(y.start,y.end);var w=k.textToScreenCoordinates(y.start.row,y.start.column),R=k.scroller.getBoundingClientRect();w.pageX<R.left&&(w.pageX=R.left);var D=this.getElement();D.innerHTML="",D.appendChild(L),D.style.maxHeight="",D.style.display="block",this.$setPosition(m,w,!0,y),x.$fixPositionBug(D)}},h.prototype.$setPosition=function(m,y,L,T){var k=10;L&&this.addMarker(T,m.session);var w=m.renderer,R=this.getElement(),D=R.offsetHeight,I=R.offsetWidth,E=y.pageY,z=y.pageX,F=window.innerHeight-E-w.lineHeight,O=this.$shouldPlaceAbove(D,E,F-k);R.style.maxHeight=(O?E:F)-k+"px",R.style.top=O?"":E+w.lineHeight+"px",R.style.bottom=O?window.innerHeight-E+"px":"",R.style.left=Math.min(z,window.innerWidth-I-k)+"px"},h.prototype.$shouldPlaceAbove=function(m,y,L){return!(y-m<0&&y<L)},h.prototype.addMarker=function(m,y){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=y,this.marker=y&&y.addMarker(m,"ace_highlight-marker","text")},h.prototype.hide=function(m){m&&this.$fromKeyboard&&m.type=="keydown"&&m.code=="Escape"||!m&&document.activeElement==this.getElement()||m&&m.target&&(m.type!="keydown"||m.ctrlKey||m.metaKey)&&this.$element.contains(m.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,r.removePopup(this)))},h.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},h.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},h.prototype.onMouseOut=function(m){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!m.relatedTarget||this.getElement().contains(m.relatedTarget)||m&&m.currentTarget.contains(m.relatedTarget)||m.relatedTarget.classList.contains("ace_content")||this.hide())},h})(o);u.HoverTooltip=n}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(e,u,$){var b=this&&this.__extends||(function(){var n=function(i,h){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,y){m.__proto__=y}||function(m,y){for(var L in y)Object.prototype.hasOwnProperty.call(y,L)&&(m[L]=y[L])},n(i,h)};return function(i,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");n(i,h);function m(){this.constructor=i}i.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}})(),v=this&&this.__values||function(n){var i=typeof Symbol=="function"&&Symbol.iterator,h=i&&n[i],m=0;if(h)return h.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&m>=n.length&&(n=void 0),{value:n&&n[m++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("../lib/dom"),f=e("./mouse_event").MouseEvent,p=e("../tooltip").HoverTooltip,s=e("../config").nls,o=e("../range").Range;function a(n){var i=n.editor,h=i.renderer.$gutterLayer;n.$tooltip=new r(i),n.$tooltip.addToEditor(i),n.$tooltip.setDataProvider(function(m,y){var L=m.getDocumentPosition().row;n.$tooltip.showTooltip(L)}),n.editor.setDefaultHandler("guttermousedown",function(m){if(!(!i.isFocused()||m.getButton()!=0)){var y=h.getRegion(m);if(y!="foldWidgets"){var L=m.getDocumentPosition().row,T=i.session.selection;if(m.getShiftKey())T.selectTo(L,0);else{if(m.domEvent.detail==2)return i.selectAll(),m.preventDefault();n.$clickSelection=i.selection.getLineRange(L)}return n.setState("selectByLines"),n.captureMouse(m),m.preventDefault()}}})}u.GutterHandler=a;var r=(function(n){b(i,n);function i(h){var m=n.call(this,h.container)||this;m.id="gt"+ ++i.$uid,m.editor=h,m.visibleTooltipRow;var y=m.getElement();return y.setAttribute("role","tooltip"),y.setAttribute("id",m.id),y.style.pointerEvents="auto",m.idleTime=50,m.onDomMouseMove=m.onDomMouseMove.bind(m),m.onDomMouseOut=m.onDomMouseOut.bind(m),m.setClassName("ace_gutter-tooltip"),m}return i.prototype.onDomMouseMove=function(h){var m=new f(h,this.editor);this.onMouseMove(m,this.editor)},i.prototype.onDomMouseOut=function(h){var m=new f(h,this.editor);this.onMouseOut(m)},i.prototype.addToEditor=function(h){var m=h.renderer.$gutter;m.addEventListener("mousemove",this.onDomMouseMove),m.addEventListener("mouseout",this.onDomMouseOut),n.prototype.addToEditor.call(this,h)},i.prototype.removeFromEditor=function(h){var m=h.renderer.$gutter;m.removeEventListener("mousemove",this.onDomMouseMove),m.removeEventListener("mouseout",this.onDomMouseOut),n.prototype.removeFromEditor.call(this,h)},i.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),n.prototype.destroy.call(this)},Object.defineProperty(i,"annotationLabels",{get:function(){return{error:{singular:s("gutter-tooltip.aria-label.error.singular","error"),plural:s("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:s("gutter-tooltip.aria-label.security.singular","security finding"),plural:s("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:s("gutter-tooltip.aria-label.warning.singular","warning"),plural:s("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:s("gutter-tooltip.aria-label.info.singular","information message"),plural:s("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:s("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:s("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),i.prototype.showTooltip=function(h){var m,y=this.editor.renderer.$gutterLayer,L=y.$annotations[h],T;L?T={displayText:Array.from(L.displayText),type:Array.from(L.type)}:T={displayText:[],type:[]};var k=y.session.getFoldLine(h);if(k&&y.$showFoldedAnnotations){for(var w={error:[],security:[],warning:[],info:[],hint:[]},R={error:1,security:2,warning:3,info:4,hint:5},D,I=h+1;I<=k.end.row;I++)if(y.$annotations[I])for(var E=0;E<y.$annotations[I].text.length;E++){var z=y.$annotations[I].type[E];w[z].push(y.$annotations[I].text[E]),(!D||R[z]<R[D])&&(D=z)}if(["error","security","warning"].includes(D)){var F="".concat(i.annotationsToSummaryString(w)," in folded code.");T.displayText.push(F),T.type.push(D+"_fold")}}if(T.displayText.length===0)return this.hide();for(var O={error:[],security:[],warning:[],info:[],hint:[]},_=y.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<T.displayText.length;I++){var S=x.createElement("span"),N=x.createElement("span");(m=N.classList).add.apply(m,["ace_".concat(T.type[I]),_]),N.setAttribute("aria-label","".concat(i.annotationLabels[T.type[I].replace("_fold","")].singular)),N.setAttribute("role","img"),N.appendChild(x.createTextNode(" ")),S.appendChild(N),S.appendChild(x.createTextNode(T.displayText[I])),S.appendChild(x.createElement("br")),O[T.type[I].replace("_fold","")].push(S)}var W=x.createElement("span");O.error.forEach(function(Q){return W.appendChild(Q)}),O.security.forEach(function(Q){return W.appendChild(Q)}),O.warning.forEach(function(Q){return W.appendChild(Q)}),O.info.forEach(function(Q){return W.appendChild(Q)}),O.hint.forEach(function(Q){return W.appendChild(Q)}),W.setAttribute("aria-live","polite");var V=this.$findLinkedAnnotationNode(h);V&&V.setAttribute("aria-describedby",this.id);var G=o.fromPoints({row:h,column:0},{row:h,column:0});this.showForRange(this.editor,G,W),this.visibleTooltipRow=h,this.editor._signal("showGutterTooltip",this)},i.prototype.$setPosition=function(h,m,y,L){var T=this.$findCellByRow(L.start.row);if(T){var k=T&&T.element,w=k&&k.querySelector(".ace_gutter_annotation");if(w){var R=w.getBoundingClientRect();if(R){var D={pageX:R.right,pageY:R.top};return n.prototype.$setPosition.call(this,h,D,!1,L)}}}},i.prototype.$shouldPlaceAbove=function(h,m,y){return y<h},i.prototype.$findLinkedAnnotationNode=function(h){var m=this.$findCellByRow(h);if(m){var y=m.element;if(y.childNodes.length>2)return y.childNodes[2]}},i.prototype.$findCellByRow=function(h){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(m){return m.row===h})},i.prototype.hide=function(h){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var m=this.$findLinkedAnnotationNode(this.visibleTooltipRow);m&&m.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),n.prototype.hide.call(this,h)}},i.annotationsToSummaryString=function(h){var m,y,L=[],T=["error","security","warning","info","hint"];try{for(var k=v(T),w=k.next();!w.done;w=k.next()){var R=w.value;if(h[R].length){var D=h[R].length===1?i.annotationLabels[R].singular:i.annotationLabels[R].plural;L.push("".concat(h[R].length," ").concat(D))}}}catch(I){m={error:I}}finally{try{w&&!w.done&&(y=k.return)&&y.call(k)}finally{if(m)throw m.error}}return L.join(", ")},i.prototype.isOutsideOfText=function(h){var m=h.editor,y=m.renderer.$gutter.getBoundingClientRect();return!(h.clientX>=y.left&&h.clientX<=y.right&&h.clientY>=y.top&&h.clientY<=y.bottom)},i})(p);r.$uid=0,u.GutterTooltip=r}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,u,$){var b=e("../lib/dom"),v=e("../lib/event"),x=e("../lib/useragent"),f=200,p=200,s=5;function o(r){var n=r.editor,i=b.createElement("div");i.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",i.textContent=" ";var h=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];h.forEach(function(ne){r[ne]=this[ne]},this),n.on("mousedown",this.onMouseDown.bind(r));var m=n.container,y,L,T,k,w,R,D=0,I,E,z,F,O;this.onDragStart=function(ne){if(this.cancelDrag||!m.draggable){var he=this;return setTimeout(function(){he.startSelect(),he.captureMouse(ne)},0),ne.preventDefault()}w=n.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=n.getReadOnly()?"copy":"copyMove",n.container.appendChild(i),ue.setDragImage&&ue.setDragImage(i,0,0),setTimeout(function(){n.container.removeChild(i)}),ue.clearData(),ue.setData("Text",n.session.getTextRange()),E=!0,this.setState("drag")},this.onDragEnd=function(ne){if(m.draggable=!1,E=!1,this.setState(null),!n.getReadOnly()){var he=ne.dataTransfer.dropEffect;!I&&he=="move"&&n.session.remove(n.getSelectionRange()),n.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(n.getReadOnly()||!te(ne.dataTransfer)))return L=ne.clientX,T=ne.clientY,y||W(),D++,ne.dataTransfer.dropEffect=I=ce(ne),v.preventDefault(ne)},this.onDragOver=function(ne){if(!(n.getReadOnly()||!te(ne.dataTransfer)))return L=ne.clientX,T=ne.clientY,y||(W(),D++),G!==null&&(G=null),ne.dataTransfer.dropEffect=I=ce(ne),v.preventDefault(ne)},this.onDragLeave=function(ne){if(D--,D<=0&&y)return V(),I=null,v.preventDefault(ne)},this.onDrop=function(ne){if(R){var he=ne.dataTransfer;if(E)switch(I){case"move":w.contains(R.row,R.column)?w={start:R,end:R}:w=n.moveText(w,R);break;case"copy":w=n.moveText(w,R,!0);break}else{var ue=he.getData("Text");w={start:R,end:n.session.insert(R,ue)},n.focus(),I=null}return V(),v.preventDefault(ne)}},v.addListener(m,"dragstart",this.onDragStart.bind(r),n),v.addListener(m,"dragend",this.onDragEnd.bind(r),n),v.addListener(m,"dragenter",this.onDragEnter.bind(r),n),v.addListener(m,"dragover",this.onDragOver.bind(r),n),v.addListener(m,"dragleave",this.onDragLeave.bind(r),n),v.addListener(m,"drop",this.onDrop.bind(r),n);function _(ne,he){var ue=Date.now(),le=!he||ne.row!=he.row,me=!he||ne.column!=he.column;if(!F||le||me)n.moveCursorToPosition(ne),F=ue,O={x:L,y:T};else{var _e=a(O.x,O.y,L,T);_e>s?F=null:ue-F>=p&&(n.renderer.scrollCursorIntoView(),F=null)}}function S(ne,he){var ue=Date.now(),le=n.renderer.layerConfig.lineHeight,me=n.renderer.layerConfig.characterWidth,_e=n.renderer.scroller.getBoundingClientRect(),Ae={x:{left:L-_e.left,right:_e.right-L},y:{top:T-_e.top,bottom:_e.bottom-T}},Me=Math.min(Ae.x.left,Ae.x.right),qe=Math.min(Ae.y.top,Ae.y.bottom),Ve={row:ne.row,column:ne.column};Me/me<=2&&(Ve.column+=Ae.x.left<Ae.x.right?-3:2),qe/le<=1&&(Ve.row+=Ae.y.top<Ae.y.bottom?-1:1);var ot=ne.row!=Ve.row,Je=ne.column!=Ve.column,lt=!he||ne.row!=he.row;ot||Je&&!lt?z?ue-z>=f&&n.renderer.scrollCursorIntoView(Ve):z=ue:z=null}function N(){var ne=R;R=n.renderer.screenToTextCoordinates(L,T),_(R,ne),S(R,ne)}function W(){w=n.selection.toOrientedRange(),y=n.session.addMarker(w,"ace_selection",n.getSelectionStyle()),n.clearSelection(),n.isFocused()&&n.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),N(),k=setInterval(N,20),D=0,v.addListener(document,"mousemove",Q)}function V(){clearInterval(k),n.session.removeMarker(y),y=null,n.selection.fromOrientedRange(w),n.isFocused()&&!E&&n.$resetCursorStyle(),w=null,R=null,D=0,z=null,F=null,v.removeListener(document,"mousemove",Q)}var G=null;function Q(){G==null&&(G=setTimeout(function(){G!=null&&y&&V()},20))}function te(ne){var he=ne.types;return!he||Array.prototype.some.call(he,function(ue){return ue=="text/plain"||ue=="Text"})}function ce(ne){var he=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],le=x.isMac?ne.altKey:ne.ctrlKey,me="uninitialized";try{me=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var _e="none";return le&&he.indexOf(me)>=0?_e="copy":ue.indexOf(me)>=0?_e="move":he.indexOf(me)>=0&&(_e="copy"),_e}}(function(){this.dragWait=function(){var r=Date.now()-this.mousedownEvent.time;r>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var r=this.editor.container;r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(r){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var r=this.editor,n=r.container;n.draggable=!0,r.renderer.$cursorLayer.setBlinking(!1),r.setStyle("ace_dragging");var i=x.isWin?"default":"move";r.renderer.setCursorStyle(i),this.setState("dragReady")},this.onMouseDrag=function(r){var n=this.editor.container;if(x.isIE&&this.state=="dragReady"){var i=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&n.dragDrop()}if(this.state==="dragWait"){var i=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(n.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(r){if(this.$dragEnabled){this.mousedownEvent=r;var n=this.editor,i=r.inSelection(),h=r.getButton(),m=r.domEvent.detail||1;if(m===1&&h===0&&i){if(r.editor.inMultiSelectMode&&(r.getAccelKey()||r.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=r.domEvent.target||r.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),n.getDragDelay()){if(x.isWebKit){this.cancelDrag=!0;var L=n.container;L.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(r,this.onMouseDrag.bind(this)),r.defaultPrevented=!0}}}}).call(o.prototype);function a(r,n,i,h){return Math.sqrt(Math.pow(i-r,2)+Math.pow(h-n,2))}u.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,u,$){var b=e("./mouse_event").MouseEvent,v=e("../lib/event"),x=e("../lib/dom");u.addTouchListeners=function(f,p){var s="scroll",o,a,r,n,i,h,m=0,y,L=0,T=0,k=0,w,R;function D(){var _=window.navigator&&window.navigator.clipboard,S=!1,N=function(){var G=p.getCopyText(),Q=p.session.getUndoManager().hasUndo();R.replaceChild(x.buildDom(S?["span",!G&&W("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],G&&W("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],G&&W("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],_&&W("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Q&&W("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],W("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],W("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),R.firstChild)},W=function(G){return p.commands.canExecute(G,p)},V=function(G){var Q=G.target.getAttribute("action");if(Q=="more"||!S)return S=!S,N();Q=="paste"?_.readText().then(function(te){p.execCommand(Q,te)}):Q&&((Q=="cut"||Q=="copy")&&(_?_.writeText(p.getCopyText()):document.execCommand("copy")),p.execCommand(Q)),R.firstChild.style.display="none",S=!1,Q!="openCommandPalette"&&p.focus()};R=x.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(G){s="menu",G.stopPropagation(),G.preventDefault(),p.textInput.focus()},ontouchend:function(G){G.stopPropagation(),G.preventDefault(),V(G)},onclick:V},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],p.container)}function I(){if(!p.getOption("enableMobileMenu")){R&&E();return}R||D();var _=p.selection.cursor,S=p.renderer.textToScreenCoordinates(_.row,_.column),N=p.renderer.textToScreenCoordinates(0,0).pageX,W=p.renderer.scrollLeft,V=p.container.getBoundingClientRect();R.style.top=S.pageY-V.top-3+"px",S.pageX-V.left<V.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=N+W-V.left+"px"),R.style.display="",R.firstChild.style.display="none",p.on("input",E)}function E(_){R&&(R.style.display="none"),p.off("input",E)}function z(){i=null,clearTimeout(i);var _=p.selection.getRange(),S=_.contains(y.row,y.column);(_.isEmpty()||!S)&&(p.selection.moveToPosition(y),p.selection.selectWord()),s="wait",I()}function F(){i=null,clearTimeout(i),p.selection.moveToPosition(y);var _=L>=2?p.selection.getLineRange(y.row):p.session.getBracketRange(y);_&&!_.isEmpty()?p.selection.setRange(_):p.selection.selectWord(),s="wait"}v.addListener(f,"contextmenu",function(_){if(w){var S=p.textInput.getElement();S.focus()}},p),v.addListener(f,"touchstart",function(_){var S=_.touches;if(i||S.length>1){clearTimeout(i),i=null,r=-1,s="zoom";return}w=p.$mouseHandler.isMousePressed=!0;var N=p.renderer.layerConfig.lineHeight,W=p.renderer.layerConfig.lineHeight,V=_.timeStamp;n=V;var G=S[0],Q=G.clientX,te=G.clientY;Math.abs(o-Q)+Math.abs(a-te)>N&&(r=-1),o=_.clientX=Q,a=_.clientY=te,T=k=0;var ce=new b(_,p);if(y=ce.getDocumentPosition(),V-r<500&&S.length==1&&!m)L++,_.preventDefault(),_.button=0,F();else{L=0;var ne=p.selection.cursor,he=p.selection.isEmpty()?ne:p.selection.anchor,ue=p.renderer.$cursorLayer.getPixelPosition(ne,!0),le=p.renderer.$cursorLayer.getPixelPosition(he,!0),me=p.renderer.scroller.getBoundingClientRect(),_e=p.renderer.layerConfig.offset,Ae=p.renderer.scrollLeft,Me=function(ot,Je){return ot=ot/W,Je=Je/N-.75,ot*ot+Je*Je};if(_.clientX<me.left){s="zoom";return}var qe=Me(_.clientX-me.left-ue.left+Ae,_.clientY-me.top-ue.top+_e),Ve=Me(_.clientX-me.left-le.left+Ae,_.clientY-me.top-le.top+_e);qe<3.5&&Ve<3.5&&(s=qe>Ve?"cursor":"anchor"),Ve<3.5?s="anchor":qe<3.5?s="cursor":s="scroll",i=setTimeout(z,450)}r=V},p),v.addListener(f,"touchend",function(_){w=p.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),s=="zoom"?(s="",m=0):i?(p.selection.moveToPosition(y),m=0,I()):s=="scroll"?(O(),E()):I(),clearTimeout(i),i=null},p),v.addListener(f,"touchmove",function(_){i&&(clearTimeout(i),i=null);var S=_.touches;if(!(S.length>1||s=="zoom")){var N=S[0],W=o-N.clientX,V=a-N.clientY;if(s=="wait")if(W*W+V*V>4)s="cursor";else return _.preventDefault();o=N.clientX,a=N.clientY,_.clientX=N.clientX,_.clientY=N.clientY;var G=_.timeStamp,Q=G-n;if(n=G,s=="scroll"){var te=new b(_,p);te.speed=1,te.wheelX=W,te.wheelY=V,10*Math.abs(W)<Math.abs(V)&&(W=0),10*Math.abs(V)<Math.abs(W)&&(V=0),Q!=0&&(T=W/Q,k=V/Q),p._emit("mousewheel",te),te.propagationStopped||(T=k=0)}else{var ce=new b(_,p),ne=ce.getDocumentPosition();s=="cursor"?p.selection.moveCursorToPosition(ne):s=="anchor"&&p.selection.setSelectionAnchor(ne.row,ne.column),p.renderer.scrollCursorIntoView(ne),_.preventDefault()}}},p);function O(){m+=60,h=setInterval(function(){m--<=0&&(clearInterval(h),h=null),Math.abs(T)<.01&&(T=0),Math.abs(k)<.01&&(k=0),m<20&&(T=.9*T),m<20&&(k=.9*k);var _=p.session.getScrollTop();p.renderer.scrollBy(10*T,10*k),_==p.session.getScrollTop()&&(m=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,u,$){var b=e("../lib/event"),v=e("../lib/useragent"),x=e("./default_handlers").DefaultHandlers,f=e("./default_gutter_handler").GutterHandler,p=e("./mouse_event").MouseEvent,s=e("./dragdrop_handler").DragdropHandler,o=e("./touch_handler").addTouchListeners,a=e("../config"),r=(function(){function n(i){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var h=this;this.editor=i,new x(this),new f(this),new s(this);var m=function(T){var k=!document.hasFocus||!document.hasFocus()||!i.isFocused()&&document.activeElement==(i.textInput&&i.textInput.getElement());k&&window.focus(),i.focus(),setTimeout(function(){i.isFocused()||i.focus()})},y=i.renderer.getMouseEventTarget();b.addListener(y,"click",this.onMouseEvent.bind(this,"click"),i),b.addListener(y,"mousemove",this.onMouseMove.bind(this,"mousemove"),i),b.addMultiMouseDownListener([y,i.renderer.scrollBarV&&i.renderer.scrollBarV.inner,i.renderer.scrollBarH&&i.renderer.scrollBarH.inner,i.textInput&&i.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",i),b.addMouseWheelListener(i.container,this.onMouseWheel.bind(this,"mousewheel"),i),o(i.container,i);var L=i.renderer.$gutter;b.addListener(L,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),i),b.addListener(L,"click",this.onMouseEvent.bind(this,"gutterclick"),i),b.addListener(L,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),i),b.addListener(L,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),i),b.addListener(y,"mousedown",m,i),b.addListener(L,"mousedown",m,i),v.isIE&&i.renderer.scrollBarV&&(b.addListener(i.renderer.scrollBarV.element,"mousedown",m,i),b.addListener(i.renderer.scrollBarH.element,"mousedown",m,i)),i.on("mousemove",function(T){if(!(h.state||h.$dragDelay||!h.$dragEnabled)){var k=i.renderer.screenToTextCoordinates(T.x,T.y),w=i.session.selection.getRange(),R=i.renderer;!w.isEmpty()&&w.insideStart(k.row,k.column)?R.setCursorStyle("default"):R.setCursorStyle("")}},i)}return n.prototype.onMouseEvent=function(i,h){this.editor.session&&this.editor._emit(i,new p(h,this.editor))},n.prototype.onMouseMove=function(i,h){var m=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!m||!m.length||this.editor._emit(i,new p(h,this.editor))},n.prototype.onMouseWheel=function(i,h){var m=new p(h,this.editor);m.speed=this.$scrollSpeed*2,m.wheelX=h.wheelX,m.wheelY=h.wheelY,this.editor._emit(i,m)},n.prototype.setState=function(i){this.state=i},n.prototype.captureMouse=function(i,h){this.x=i.x,this.y=i.y,this.isMousePressed=!0;var m=this.editor,y=this.editor.renderer;y.$isMousePressed=!0;var L=this,T=!0,k=function(E){if(E){if(v.isWebKit&&!E.which&&L.releaseMouse)return L.releaseMouse();L.x=E.clientX,L.y=E.clientY,h&&h(E),L.mouseEvent=new p(E,L.editor),L.$mouseMoved=!0}},w=function(E){m.off("beforeEndOperation",I),T=!1,m.session&&R(),L[L.state+"End"]&&L[L.state+"End"](E),L.state="",L.isMousePressed=y.$isMousePressed=!1,y.$keepTextAreaAtCursor&&y.$moveTextAreaToCursor(),L.$onCaptureMouseMove=L.releaseMouse=null,E&&L.onMouseEvent("mouseup",E),m.endOperation()},R=function(){L[L.state]&&L[L.state](),L.$mouseMoved=!1},D=function(){T&&(R(),b.nextFrame(D))};if(v.isOldIE&&i.domEvent.type=="dblclick")return setTimeout(function(){w(i)});var I=function(E){L.releaseMouse&&m.curOp.command.name&&m.curOp.selectionChanged&&(L[L.state+"End"]&&L[L.state+"End"](),L.state="",L.releaseMouse())};m.on("beforeEndOperation",I),m.startOperation({command:{name:"mouse"}}),L.$onCaptureMouseMove=k,L.releaseMouse=b.capture(this.editor.container,k,w),D()},n.prototype.cancelContextMenu=function(){var i=(function(h){h&&h.domEvent&&h.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",i),h&&h.domEvent&&b.stopEvent(h.domEvent))}).bind(this);setTimeout(i,10),this.editor.on("nativecontextmenu",i)},n.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},n})();r.prototype.releaseMouse=null,a.defineOptions(r.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:v.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),u.MouseHandler=r}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,u,$){var b=e("../lib/dom"),v=(function(){function x(f){f.on("click",function(p){var s=p.getDocumentPosition(),o=f.session,a=o.getFoldAt(s.row,s.column,1);a&&(p.getAccelKey()?o.removeFold(a):o.expandFold(a),p.stop());var r=p.domEvent&&p.domEvent.target;r&&b.hasCssClass(r,"ace_inline_button")&&b.hasCssClass(r,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),f.renderer.scrollCursorIntoView())}),f.on("gutterclick",function(p){var s=f.renderer.$gutterLayer.getRegion(p);if(s=="foldWidgets"){var o=p.getDocumentPosition().row,a=f.session;a.foldWidgets&&a.foldWidgets[o]&&f.session.onFoldWidgetClick(o,p),f.isFocused()||f.focus(),p.stop()}}),f.on("gutterdblclick",function(p){var s=f.renderer.$gutterLayer.getRegion(p);if(s=="foldWidgets"){var o=p.getDocumentPosition().row,a=f.session,r=a.getParentFoldRangeData(o,!0),n=r.range||r.firstRange;if(n){o=n.start.row;var i=a.getFoldAt(o,a.getLine(o).length,1);i?a.removeFold(i):(a.addFold("...",n),f.renderer.scrollCursorIntoView({row:n.start.row,column:0}))}p.stop()}})}return x})();u.FoldHandler=v}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,u,$){var b=e("../lib/keys"),v=e("../lib/event"),x=(function(){function f(p){this.$editor=p,this.$data={editor:p},this.$handlers=[],this.setDefaultHandler(p.commands)}return f.prototype.setDefaultHandler=function(p){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=p,this.addKeyboardHandler(p,0)},f.prototype.setKeyboardHandler=function(p){var s=this.$handlers;if(s[s.length-1]!=p){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(p,1)}},f.prototype.addKeyboardHandler=function(p,s){if(p){typeof p=="function"&&!p.handleKeyboard&&(p.handleKeyboard=p);var o=this.$handlers.indexOf(p);o!=-1&&this.$handlers.splice(o,1),s==null?this.$handlers.push(p):this.$handlers.splice(s,0,p),o==-1&&p.attach&&p.attach(this.$editor)}},f.prototype.removeKeyboardHandler=function(p){var s=this.$handlers.indexOf(p);return s==-1?!1:(this.$handlers.splice(s,1),p.detach&&p.detach(this.$editor),!0)},f.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},f.prototype.getStatusText=function(){var p=this.$data,s=p.editor;return this.$handlers.map(function(o){return o.getStatusText&&o.getStatusText(s,p)||""}).filter(Boolean).join(" ")},f.prototype.$callKeyboardHandlers=function(p,s,o,a){for(var r,n=!1,i=this.$editor.commands,h=this.$handlers.length;h--&&(r=this.$handlers[h].handleKeyboard(this.$data,p,s,o,a),!(!(!r||!r.command)&&(r.command=="null"?n=!0:n=i.exec(r.command,this.$editor,r.args,a),n&&a&&p!=-1&&r.passEvent!=!0&&r.command.passEvent!=!0&&v.stopEvent(a),n))););return!n&&p==-1&&(r={command:"insertstring"},n=i.exec("insertstring",this.$editor,s)),n&&this.$editor._signal&&this.$editor._signal("keyboardActivity",r),n},f.prototype.onCommandKey=function(p,s,o){var a=b.keyCodeToString(o);return this.$callKeyboardHandlers(s,a,o,p)},f.prototype.onTextInput=function(p){return this.$callKeyboardHandlers(-1,p)},f})();u.KeyBinding=x}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,u,$){var b=0,v=0,x=!1,f=!1,p=!1,s=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],o=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],a=0,r=1,n=0,i=1,h=2,m=3,y=4,L=5,T=6,k=7,w=8,R=9,D=10,I=11,E=12,z=13,F=14,O=15,_=16,S=17,N=18,W=[N,N,N,N,N,N,N,N,N,T,L,T,w,L,N,N,N,N,N,N,N,N,N,N,N,N,N,N,L,L,L,T,w,y,y,I,I,I,y,y,y,y,y,D,R,D,R,R,h,h,h,h,h,h,h,h,h,h,R,y,y,y,y,y,y,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,y,y,y,y,y,y,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,y,y,y,y,N,N,N,N,N,N,L,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,y,I,I,I,I,y,y,y,y,n,y,y,N,y,y,I,I,h,h,y,n,y,y,y,h,n,y,y,y,y,y],V=[w,w,w,w,w,w,w,w,w,w,w,N,N,N,n,i,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,w,L,z,F,O,_,S,R,I,I,I,I,I,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,R,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,w];function G(ne,he,ue,le){var me=b?o:s,_e=null,Ae=null,Me=null,qe=0,Ve=null,ot=null,Je=-1,lt=null,zt=null,vn=[];if(!le)for(lt=0,le=[];lt<ue;lt++)le[lt]=ce(ne[lt]);for(v=b,x=!1,f=!1,p=!1,zt=0;zt<ue;zt++){if(_e=qe,vn[zt]=Ae=te(ne,le,vn,zt),qe=me[_e][Ae],Ve=qe&240,qe&=15,he[zt]=Me=me[qe][5],Ve>0)if(Ve==16){for(lt=Je;lt<zt;lt++)he[lt]=1;Je=-1}else Je=-1;if(ot=me[qe][6],ot)Je==-1&&(Je=zt);else if(Je>-1){for(lt=Je;lt<zt;lt++)he[lt]=Me;Je=-1}le[zt]==L&&(he[zt]=0),v|=Me}if(p){for(lt=0;lt<ue;lt++)if(le[lt]==T){he[lt]=b;for(var Pt=lt-1;Pt>=0&&le[Pt]==w;Pt--)he[Pt]=b}}}function Q(ne,he,ue){if(!(v<ne)){if(ne==1&&b==r&&!f){ue.reverse();return}for(var le=ue.length,me=0,_e,Ae,Me,qe;me<le;){if(he[me]>=ne){for(_e=me+1;_e<le&&he[_e]>=ne;)_e++;for(Ae=me,Me=_e-1;Ae<Me;Ae++,Me--)qe=ue[Ae],ue[Ae]=ue[Me],ue[Me]=qe;me=_e}me++}}}function te(ne,he,ue,le){var me=he[le],_e,Ae,Me,qe;switch(me){case n:case i:x=!1;case y:case m:return me;case h:return x?m:h;case k:return x=!0,i;case w:return y;case R:return le<1||le+1>=he.length||(_e=ue[le-1])!=h&&_e!=m||(Ae=he[le+1])!=h&&Ae!=m?y:(x&&(Ae=m),Ae==_e?Ae:y);case D:return _e=le>0?ue[le-1]:L,_e==h&&le+1<he.length&&he[le+1]==h?h:y;case I:if(le>0&&ue[le-1]==h)return h;if(x)return y;for(qe=le+1,Me=he.length;qe<Me&&he[qe]==I;)qe++;return qe<Me&&he[qe]==h?h:y;case E:for(Me=he.length,qe=le+1;qe<Me&&he[qe]==E;)qe++;if(qe<Me){var Ve=ne[le],ot=Ve>=1425&&Ve<=2303||Ve==64286;if(_e=he[qe],ot&&(_e==i||_e==k))return i}return le<1||(_e=he[le-1])==L?y:ue[le-1];case L:return x=!1,f=!0,b;case T:return p=!0,y;case z:case F:case _:case S:case O:x=!1;case N:return y}}function ce(ne){var he=ne.charCodeAt(0),ue=he>>8;return ue==0?he>191?n:W[he]:ue==5?/[\u0591-\u05f4]/.test(ne)?i:n:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?E:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?m:he==1642?I:/[\u06f0-\u06f9]/.test(ne)?h:k:ue==32&&he<=8287?V[he&255]:ue==254&&he>=65136?k:y}u.L=n,u.R=i,u.EN=h,u.ON_R=3,u.AN=4,u.R_H=5,u.B=6,u.RLE=7,u.DOT="·",u.doBidiReorder=function(ne,he,ue){if(ne.length<2)return{};var le=ne.split(""),me=new Array(le.length),_e=new Array(le.length),Ae=[];b=ue?r:a,G(le,Ae,le.length,he);for(var Me=0;Me<me.length;me[Me]=Me,Me++);Q(2,Ae,me),Q(1,Ae,me);for(var Me=0;Me<me.length-1;Me++)he[Me]===m?Ae[Me]=u.AN:Ae[Me]===i&&(he[Me]>k&&he[Me]<z||he[Me]===y||he[Me]===N)?Ae[Me]=u.ON_R:Me>0&&le[Me-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(le[Me])&&(Ae[Me-1]=Ae[Me]=u.R_H,Me++);le[le.length-1]===u.DOT&&(Ae[le.length-1]=u.B),le[0]==="‫"&&(Ae[0]=u.RLE);for(var Me=0;Me<me.length;Me++)_e[Me]=Ae[me[Me]];return{logicalFromVisual:me,bidiLevels:_e}},u.hasBidiCharacters=function(ne,he){for(var ue=!1,le=0;le<ne.length;le++)he[le]=ce(ne.charAt(le)),!ue&&(he[le]==i||he[le]==k||he[le]==m)&&(ue=!0);return ue},u.getVisualFromLogicalIdx=function(ne,he){for(var ue=0;ue<he.logicalFromVisual.length;ue++)if(he.logicalFromVisual[ue]==ne)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,u,$){var b=e("./lib/bidiutil"),v=e("./lib/lang"),x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,f=(function(){function p(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=b,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=x.test(s.getValue())}return p.prototype.isBidiRow=function(s,o,a){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(o,a),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},p.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&x.test(s.lines.join(`
173
- `))&&(this.seenBidi=!0,this.currentRow=null)},p.prototype.getDocumentRow=function(){var s=0,o=this.session.$screenRowCache;if(o.length){var a=this.session.$getRowCacheIndex(o,this.currentRow);a>=0&&(s=this.session.$docRowCache[a])}return s},p.prototype.getSplitIndex=function(){var s=0,o=this.session.$screenRowCache;if(o.length)for(var a,r=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-s>0&&(a=this.session.$getRowCacheIndex(o,this.currentRow-s-1),a===r);)r=a,s++;else s=this.currentRow;return s},p.prototype.updateRowLine=function(s,o){s===void 0&&(s=this.getDocumentRow());var a=s===this.session.getLength()-1,r=a?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(s),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var n=this.session.$wrapData[s];n&&(o===void 0&&(o=this.getSplitIndex()),o>0&&n.length?(this.wrapIndent=n.indent,this.wrapOffset=this.wrapIndent*this.charWidths[b.L],this.line=o<n.length?this.line.substring(n[o-1],n[o]):this.line.substring(n[n.length-1])):this.line=this.line.substring(0,n[o]),o==n.length&&(this.line+=this.showInvisibles?r:b.DOT))}else this.line+=this.showInvisibles?r:b.DOT;var i=this.session,h=0,m;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(y,L){return y===" "||i.isFullWidth(y.charCodeAt(0))?(m=y===" "?i.getScreenTabSize(L+h):2,h+=m-1,v.stringRepeat(b.DOT,m)):y}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==b.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},p.prototype.updateBidiMap=function(){var s=[];b.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=b.doBidiReorder(this.line,s,this.isRtlDir):this.bidiMap={}},p.prototype.markAsDirty=function(){this.currentRow=null},p.prototype.updateCharacterWidths=function(s){if(this.characterWidth!==s.$characterSize.width){this.fontMetrics=s;var o=this.characterWidth=s.$characterSize.width,a=s.$measureCharWidth("ה");this.charWidths[b.L]=this.charWidths[b.EN]=this.charWidths[b.ON_R]=o,this.charWidths[b.R]=this.charWidths[b.AN]=a,this.charWidths[b.R_H]=a*.45,this.charWidths[b.B]=this.charWidths[b.RLE]=0,this.currentRow=null}},p.prototype.setShowInvisibles=function(s){this.showInvisibles=s,this.currentRow=null},p.prototype.setEolChar=function(s){this.EOL=s},p.prototype.setContentWidth=function(s){this.contentWidth=s},p.prototype.isRtlLine=function(s){return this.$isRtl?!0:s!=null?this.session.getLine(s).charAt(0)==this.RLE:this.isRtlDir},p.prototype.setRtlDirection=function(s,o){for(var a=s.getCursorPosition(),r=s.selection.getSelectionAnchor().row;r<=a.row;r++)!o&&s.session.getLine(r).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(r,0,1):o&&s.session.getLine(r).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:r},s.session.$bidiHandler.RLE)},p.prototype.getPosLeft=function(s){s-=this.wrapIndent;var o=this.line.charAt(0)===this.RLE?1:0,a=s>o?this.session.getOverwrite()?s:s-1:o,r=b.getVisualFromLogicalIdx(a,this.bidiMap),n=this.bidiMap.bidiLevels,i=0;!this.session.getOverwrite()&&s<=o&&n[r]%2!==0&&r++;for(var h=0;h<r;h++)i+=this.charWidths[n[h]];return!this.session.getOverwrite()&&s>o&&n[r]%2===0&&(i+=this.charWidths[n[r]]),this.wrapIndent&&(i+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(i+=this.rtlLineOffset),i},p.prototype.getSelections=function(s,o){var a=this.bidiMap,r=a.bidiLevels,n,i=[],h=0,m=Math.min(s,o)-this.wrapIndent,y=Math.max(s,o)-this.wrapIndent,L=!1,T=!1,k=0;this.wrapIndent&&(h+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var w,R=0;R<r.length;R++)w=a.logicalFromVisual[R],n=r[R],L=w>=m&&w<y,L&&!T?k=h:!L&&T&&i.push({left:k,width:h-k}),h+=this.charWidths[n],T=L;if(L&&R===r.length&&i.push({left:k,width:h-k}),this.isRtlDir)for(var D=0;D<i.length;D++)i[D].left+=this.rtlLineOffset;return i},p.prototype.offsetToCol=function(a){this.isRtlDir&&(a-=this.rtlLineOffset);var o=0,a=Math.max(a,0),r=0,n=0,i=this.bidiMap.bidiLevels,h=this.charWidths[i[n]];for(this.wrapIndent&&(a-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);a>r+h/2;){if(r+=h,n===i.length-1){h=0;break}h=this.charWidths[i[++n]]}return n>0&&i[n-1]%2!==0&&i[n]%2===0?(a<r&&n--,o=this.bidiMap.logicalFromVisual[n]):n>0&&i[n-1]%2===0&&i[n]%2!==0?o=1+(a>r?this.bidiMap.logicalFromVisual[n]:this.bidiMap.logicalFromVisual[n-1]):this.isRtlDir&&n===i.length-1&&h===0&&i[n-1]%2===0||!this.isRtlDir&&n===0&&i[n]%2!==0?o=1+this.bidiMap.logicalFromVisual[n]:(n>0&&i[n-1]%2!==0&&h!==0&&n--,o=this.bidiMap.logicalFromVisual[n]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},p})();u.BidiHandler=f}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,u,$){var b=e("./lib/oop"),v=e("./lib/lang"),x=e("./lib/event_emitter").EventEmitter,f=e("./range").Range,p=(function(){function s(o){this.session=o,this.doc=o.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var a=this;this.cursor.on("change",function(r){a.$cursorChanged=!0,a.$silent||a._emit("changeCursor"),!a.$isEmpty&&!a.$silent&&a._emit("changeSelection"),!a.$keepDesiredColumnOnChange&&r.old.column!=r.value.column&&(a.$desiredColumn=null)}),this.anchor.on("change",function(){a.$anchorChanged=!0,!a.$isEmpty&&!a.$silent&&a._emit("changeSelection")})}return s.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},s.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},s.prototype.getCursor=function(){return this.lead.getPosition()},s.prototype.setAnchor=function(o,a){this.$isEmpty=!1,this.anchor.setPosition(o,a)},s.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},s.prototype.getSelectionLead=function(){return this.lead.getPosition()},s.prototype.isBackwards=function(){var o=this.anchor,a=this.lead;return o.row>a.row||o.row==a.row&&o.column>a.column},s.prototype.getRange=function(){var o=this.anchor,a=this.lead;return this.$isEmpty?f.fromPoints(a,a):this.isBackwards()?f.fromPoints(a,o):f.fromPoints(o,a)},s.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},s.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},s.prototype.setRange=function(o,a){var r=a?o.end:o.start,n=a?o.start:o.end;this.$setSelection(r.row,r.column,n.row,n.column)},s.prototype.$setSelection=function(o,a,r,n){if(!this.$silent){var i=this.$isEmpty,h=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,a),this.cursor.setPosition(r,n),this.$isEmpty=!f.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||h)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(o){var a=this.lead;this.$isEmpty&&this.setSelectionAnchor(a.row,a.column),o.call(this)},s.prototype.selectTo=function(o,a){this.$moveSelection(function(){this.moveCursorTo(o,a)})},s.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},s.prototype.moveTo=function(o,a){this.clearSelection(),this.moveCursorTo(o,a)},s.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},s.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},s.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},s.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},s.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},s.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},s.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},s.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},s.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},s.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},s.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},s.prototype.getWordRange=function(o,a){if(typeof a>"u"){var r=o||this.lead;o=r.row,a=r.column}return this.session.getWordRange(o,a)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var o=this.getCursor(),a=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(a)},s.prototype.getLineRange=function(o,a){var r=typeof o=="number"?o:this.lead.row,n,i=this.session.getFoldLine(r);return i?(r=i.start.row,n=i.end.row):n=r,a===!0?new f(r,0,n,this.session.getLine(n).length):new f(r,0,n+1,0)},s.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},s.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},s.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},s.prototype.wouldMoveIntoSoftTab=function(o,a,r){var n=o.column,i=o.column+a;return r<0&&(n=o.column-a,i=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(n,i).split(" ").length-1==a},s.prototype.moveCursorLeft=function(){var o=this.lead.getPosition(),a;if(a=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(a.start.row,a.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var r=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,r,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-r):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var o=this.lead.getPosition(),a;if(a=this.session.getFoldAt(o.row,o.column,1))this.moveCursorTo(a.end.row,a.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var r=this.session.getTabSize(),o=this.lead;this.wouldMoveIntoSoftTab(o,r,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,r):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var o=this.lead.row,a=this.lead.column,r=this.session.documentToScreenRow(o,a),n=this.session.screenToDocumentPosition(r,0),i=this.session.getDisplayLine(o,null,n.row,n.column),h=i.match(/^\s*/);h[0].length!=a&&!this.session.$useEmacsStyleLineStart&&(n.column+=h[0].length),this.moveCursorToPosition(n)},s.prototype.moveCursorLineEnd=function(){var o=this.lead,a=this.session.getDocumentLastRowColumnPosition(o.row,o.column);if(this.lead.column==a.column){var r=this.session.getLine(a.row);if(a.column==r.length){var n=r.search(/\s+$/);n>0&&(a.column=n)}}this.moveCursorTo(a.row,a.column)},s.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,a=this.doc.getLine(o).length;this.moveCursorTo(o,a)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,a=this.lead.column,r=this.doc.getLine(o),n=r.substring(a);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(o,a,1);if(i){this.moveCursorTo(i.end.row,i.end.column);return}if(this.session.nonTokenRe.exec(n)&&(a+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=r.substring(a)),a>=r.length){this.moveCursorTo(o,r.length),this.moveCursorRight(),o<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(n)&&(a+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,a)},s.prototype.moveCursorLongWordLeft=function(){var o=this.lead.row,a=this.lead.column,r;if(r=this.session.getFoldAt(o,a,-1)){this.moveCursorTo(r.start.row,r.start.column);return}var n=this.session.getFoldStringAt(o,a,-1);n==null&&(n=this.doc.getLine(o).substring(0,a));var i=v.stringReverse(n);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(i)&&(a-=this.session.nonTokenRe.lastIndex,i=i.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),a<=0){this.moveCursorTo(o,0),this.moveCursorLeft(),o>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(i)&&(a-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,a)},s.prototype.$shortWordEndIndex=function(o){var a=0,r,n=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(o))a=this.session.tokenRe.lastIndex;else{for(;(r=o[a])&&n.test(r);)a++;if(a<1){for(i.lastIndex=0;(r=o[a])&&!i.test(r);)if(i.lastIndex=0,a++,n.test(r))if(a>2){a--;break}else{for(;(r=o[a])&&n.test(r);)a++;if(a>2)break}}}return i.lastIndex=0,a},s.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,a=this.lead.column,r=this.doc.getLine(o),n=r.substring(a),i=this.session.getFoldAt(o,a,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(a==r.length){var h=this.doc.getLength();do o++,n=this.doc.getLine(o);while(o<h&&/^\s*$/.test(n));/^\s+/.test(n)||(n=""),a=0}var m=this.$shortWordEndIndex(n);this.moveCursorTo(o,a+m)},s.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,a=this.lead.column,r;if(r=this.session.getFoldAt(o,a,-1))return this.moveCursorTo(r.start.row,r.start.column);var n=this.session.getLine(o).substring(0,a);if(a===0){do o--,n=this.doc.getLine(o);while(o>0&&/^\s*$/.test(n));a=n.length,/\s+$/.test(n)||(n="")}var i=v.stringReverse(n),h=this.$shortWordEndIndex(i);return this.moveCursorTo(o,a-h)},s.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},s.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},s.prototype.moveCursorBy=function(o,a){var r=this.session.documentToScreenPosition(this.lead.row,this.lead.column),n;if(a===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];o<0?o-=i.rowsAbove||0:o>0&&(o+=i.rowCount-(i.rowsAbove||0))}var h=this.session.screenToDocumentPosition(r.row+o,r.column,n);o!==0&&a===0&&h.row===this.lead.row&&(h.column,this.lead.column),this.moveCursorTo(h.row,h.column+a,a===0)},s.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},s.prototype.moveCursorTo=function(o,a,r){var n=this.session.getFoldAt(o,a,1);n&&(o=n.start.row,a=n.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(i.charAt(a))&&i.charAt(a-1)&&(this.lead.row==o&&this.lead.column==a+1?a=a-1:a=a+1),this.lead.setPosition(o,a),this.$keepDesiredColumnOnChange=!1,r||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(o,a,r){var n=this.session.screenToDocumentPosition(o,a);this.moveCursorTo(n.row,n.column,r)},s.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},s.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},s.prototype.toOrientedRange=function(o){var a=this.getRange();return o?(o.start.column=a.start.column,o.start.row=a.start.row,o.end.column=a.end.column,o.end.row=a.end.row):o=a,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},s.prototype.getRangeOfMovements=function(o){var a=this.getCursor();try{o(this);var r=this.getCursor();return f.fromPoints(a,r)}catch{return f.fromPoints(a,a)}finally{this.moveCursorToPosition(a)}},s.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(a){var r=a.clone();return r.isBackwards=a.cursor==a.start,r});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o},s.prototype.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var a=o.length;a--;){var r=f.fromPoints(o[a].start,o[a].end);o[a].isBackwards&&(r.cursor=r.start),this.addRange(r,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},s.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var a=this.ranges.length;a--;)if(!this.ranges[a].isEqual(o[a]))return!1;return!0},s})();p.prototype.setSelectionAnchor=p.prototype.setAnchor,p.prototype.getSelectionAnchor=p.prototype.getAnchor,p.prototype.setSelectionRange=p.prototype.setRange,b.implement(p.prototype,x),u.Selection=p}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,u,$){var b=e("./lib/report_error").reportError,v=2e3,x=(function(){function f(p){this.splitRegex,this.states=p,this.regExps={},this.matchMappings={};for(var s in this.states){for(var o=this.states[s],a=[],r=0,n=this.matchMappings[s]={defaultToken:"text"},i="g",h=[],m=0;m<o.length;m++){var y=o[m];if(y.defaultToken&&(n.defaultToken=y.defaultToken),y.caseInsensitive&&i.indexOf("i")===-1&&(i+="i"),y.unicode&&i.indexOf("u")===-1&&(i+="u"),y.regex!=null){y.regex instanceof RegExp&&(y.regex=y.regex.toString().slice(1,-1));var L=y.regex,T=new RegExp("(?:("+L+")|(.))").exec("a").length-2;Array.isArray(y.token)?y.token.length==1||T==1?y.token=y.token[0]:T-1!=y.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:y,groupCount:T-1}),y.token=y.token[0]):(y.tokenArray=y.token,y.token=null,y.onMatch=this.$arrayTokens):typeof y.token=="function"&&!y.onMatch&&(T>1?y.onMatch=this.$applyToken:y.onMatch=y.token),T>1&&(/\\\d/.test(y.regex)?L=y.regex.replace(/\\([0-9]+)/g,function(k,w){return"\\"+(parseInt(w,10)+r+1)}):(T=1,L=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&h.push(y)),n[r]=m,r+=T,a.push(L),y.onMatch||(y.onMatch=null)}}a.length||(n[0]=0,a.push("$")),h.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,i)},this),this.regExps[s]=new RegExp("("+a.join(")|(")+")|($)",i)}}return f.prototype.$setMaxTokenCount=function(p){v=p|0},f.prototype.$applyToken=function(p){var s=this.splitRegex.exec(p).slice(1),o=this.token.apply(this,s);if(typeof o=="string")return[{type:o,value:p}];for(var a=[],r=0,n=o.length;r<n;r++)s[r]&&(a[a.length]={type:o[r],value:s[r]});return a},f.prototype.$arrayTokens=function(p){if(!p)return[];var s=this.splitRegex.exec(p);if(!s)return"text";for(var o=[],a=this.tokenArray,r=0,n=a.length;r<n;r++)s[r+1]&&(o[o.length]={type:a[r],value:s[r+1]});return o},f.prototype.removeCapturingGroups=function(p){var s=p.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(o,a){return a?"(?:":o});return s},f.prototype.createSplitterRegexp=function(p,s){if(p.indexOf("(?=")!=-1){var o=0,a=!1,r={};p.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(n,i,h,m,y,L){return a?a=y!="]":y?a=!0:m?(o==r.stack&&(r.end=L+1,r.stack=-1),o--):h&&(o++,h.length!=1&&(r.stack=o,r.start=L)),n}),r.end!=null&&/^\)*$/.test(p.substr(r.end))&&(p=p.substring(0,r.start)+p.substr(r.end))}return p.charAt(0)!="^"&&(p="^"+p),p.charAt(p.length-1)!="$"&&(p+="$"),new RegExp(p,(s||"").replace("g",""))},f.prototype.getLineTokens=function(p,s){if(s&&typeof s!="string"){var o=s.slice(0);s=o[0],s==="#tmp"&&(o.shift(),s=o.shift())}else var o=[];var a=s||"start",r=this.states[a];r||(a="start",r=this.states[a]);var n=this.matchMappings[a],i=this.regExps[a];i.lastIndex=0;for(var h,m=[],y=0,L=0,T={type:null,value:""};h=i.exec(p);){var k=n.defaultToken,w=null,R=h[0],D=i.lastIndex;if(D-R.length>y){var I=p.substring(y,D-R.length);T.type==k?T.value+=I:(T.type&&m.push(T),T={type:k,value:I})}for(var E=0;E<h.length-2;E++)if(h[E+1]!==void 0){w=r[n[E]],w.onMatch?k=w.onMatch(R,a,o,p):k=w.token,w.next&&(typeof w.next=="string"?a=w.next:a=w.next(a,o),r=this.states[a],r||(this.reportError("state doesn't exist",a),a="start",r=this.states[a]),n=this.matchMappings[a],y=D,i=this.regExps[a],i.lastIndex=D),w.consumeLineEnd&&(y=D);break}if(R){if(typeof k=="string")(!w||w.merge!==!1)&&T.type===k?T.value+=R:(T.type&&m.push(T),T={type:k,value:R});else if(k){T.type&&m.push(T),T={type:null,value:""};for(var E=0;E<k.length;E++)m.push(k[E])}}if(y==p.length)break;if(y=D,L++>v){for(L>2*p.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:p});y<p.length;)T.type&&m.push(T),T={value:p.substring(y,y+=500),type:"overflow"};a="start",o=[];break}}return T.type&&m.push(T),o.length>1&&o[0]!==a&&o.unshift("#tmp",a),{tokens:m,state:o.length?o:a}},f})();x.prototype.reportError=b,u.Tokenizer=x}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,u,$){var b=e("../lib/deep_copy").deepCopy,v;v=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(p,s){if(!s){for(var o in p)this.$rules[o]=p[o];return}for(var o in p){for(var a=p[o],r=0;r<a.length;r++){var n=a[r];(n.next||n.onMatch)&&(typeof n.next=="string"&&n.next.indexOf(s)!==0&&(n.next=s+n.next),n.nextState&&n.nextState.indexOf(s)!==0&&(n.nextState=s+n.nextState))}this.$rules[s+o]=a}},this.getRules=function(){return this.$rules},this.embedRules=function(p,s,o,a,r){var n=typeof p=="function"?new p().getRules():p;if(a)for(var i=0;i<a.length;i++)a[i]=s+a[i];else{a=[];for(var h in n)a.push(s+h)}if(this.addRules(n,s),o)for(var m=Array.prototype[r?"push":"unshift"],i=0;i<a.length;i++)m.apply(this.$rules[a[i]],b(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(s)},this.getEmbeds=function(){return this.$embeds};var x=function(p,s){return(p!="start"||s.length)&&s.unshift(this.nextState,p),this.nextState},f=function(p,s){return s.shift(),s.shift()||"start"};this.normalizeRules=function(){var p=0,s=this.$rules;function o(a){var r=s[a];r.processed=!0;for(var n=0;n<r.length;n++){var i=r[n],h=null;Array.isArray(i)&&(h=i,i={}),!i.regex&&i.start&&(i.regex=i.start,i.next||(i.next=[]),i.next.push({defaultToken:i.token},{token:i.token+".end",regex:i.end||i.start,next:"pop"}),i.token=i.token+".start",i.push=!0);var m=i.next||i.push;if(m&&Array.isArray(m)){var y=i.stateName;y||(y=i.token,typeof y!="string"&&(y=y[0]||""),s[y]&&(y+=p++)),s[y]=m,i.next=y,o(y)}else m=="pop"&&(i.next=f);if(i.push&&(i.nextState=i.next||i.push,i.next=x,delete i.push),i.rules)for(var L in i.rules)s[L]?s[L].push&&s[L].push.apply(s[L],i.rules[L]):s[L]=i.rules[L];var T=typeof i=="string"?i:i.include;if(T&&(T==="$self"&&(T="start"),Array.isArray(T)?h=T.map(function(w){return s[w]}):h=s[T]),h){var k=[n,1].concat(h);i.noEscape&&(k=k.filter(function(w){return!w.next})),r.splice.apply(r,k),n--}i.keywordMap&&(i.token=this.createKeywordMapper(i.keywordMap,i.defaultToken||"text",i.caseInsensitive),delete i.defaultToken)}}Object.keys(s).forEach(o,this)},this.createKeywordMapper=function(p,s,o,a){var r=Object.create(null);return this.$keywordList=[],Object.keys(p).forEach(function(n){for(var i=p[n],h=i.split(a||"|"),m=h.length;m--;){var y=h[m];this.$keywordList.push(y),o&&(y=y.toLowerCase()),r[y]=n}},this),p=null,o?function(n){return r[n.toLowerCase()]||s}:function(n){return r[n]||s}},this.getKeywords=function(){return this.$keywords}}).call(v.prototype),u.TextHighlightRules=v}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,u,$){var b;b=function(){this.$behaviours={}},(function(){this.add=function(v,x,f){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[v]:this.$behaviours[v]={}}this.$behaviours[v][x]=f},this.addBehaviours=function(v){for(var x in v)for(var f in v[x])this.add(x,f,v[x][f])},this.remove=function(v){this.$behaviours&&this.$behaviours[v]&&delete this.$behaviours[v]},this.inherit=function(v,x){if(typeof v=="function")var f=new v().getBehaviours(x);else var f=v.getBehaviours(x);this.addBehaviours(f)},this.getBehaviours=function(v){if(v){for(var x={},f=0;f<v.length;f++)this.$behaviours[v[f]]&&(x[v[f]]=this.$behaviours[v[f]]);return x}else return this.$behaviours}}).call(b.prototype),u.Behaviour=b}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,u,$){var b=e("./range").Range,v=(function(){function x(f,p,s){this.$session=f,this.$row=p,this.$rowTokens=f.getTokens(p);var o=f.getTokenAt(p,s);this.$tokenIndex=o?o.index:-1}return x.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},x.prototype.stepForward=function(){this.$tokenIndex+=1;for(var f;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,f||(f=this.$session.getLength()),this.$row>=f)return this.$row=f-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentTokenRow=function(){return this.$row},x.prototype.getCurrentTokenColumn=function(){var f=this.$rowTokens,p=this.$tokenIndex,s=f[p].start;if(s!==void 0)return s;for(s=0;p>0;)p-=1,s+=f[p].value.length;return s},x.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},x.prototype.getCurrentTokenRange=function(){var f=this.$rowTokens[this.$tokenIndex],p=this.getCurrentTokenColumn();return new b(this.$row,p,this.$row,p+f.value.length)},x})();u.TokenIterator=v}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,u,$){var b=e("../../lib/oop"),v=e("../behaviour").Behaviour,x=e("../../token_iterator").TokenIterator,f=e("../../lib/lang"),p=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,a={},r={'"':'"',"'":"'"},n=function(m){var y=-1;if(m.multiSelect&&(y=m.selection.index,a.rangeCount!=m.multiSelect.rangeCount&&(a={rangeCount:m.multiSelect.rangeCount})),a[y])return o=a[y];o=a[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},i=function(m,y,L,T){var k=m.end.row-m.start.row;return{text:L+y+T,selection:[0,m.start.column+1,k,m.end.column+(k?0:1)]}},h;h=function(m){m=m||{},this.add("braces","insertion",function(y,L,T,k,w){var R=T.getCursorPosition(),D=k.doc.getLine(R.row);if(w=="{"){n(T);var I=T.getSelectionRange(),E=k.doc.getTextRange(I),z=k.getTokenAt(R.row,R.column);if(E!==""&&E!=="{"&&T.getWrapBehavioursEnabled())return i(I,E,"{","}");if(z&&/(?:string)\.quasi|\.xml/.test(z.type)){var F=[/tag\-(?:open|name)/,/attribute\-name/];return F.some(function(G){return G.test(z.type)})||/(string)\.quasi/.test(z.type)&&z.value[R.column-z.start-1]!=="$"?void 0:(h.recordAutoInsert(T,k,"}"),{text:"{}",selection:[1,1]})}else if(h.isSaneInsertion(T,k))return/[\]\}\)]/.test(D[R.column])||T.inMultiSelectMode||m.braces?(h.recordAutoInsert(T,k,"}"),{text:"{}",selection:[1,1]}):(h.recordMaybeInsert(T,k,"{"),{text:"{",selection:[1,1]})}else if(w=="}"){n(T);var O=D.substring(R.column,R.column+1);if(O=="}"){var _=k.$findOpeningBracket("}",{column:R.column+1,row:R.row});if(_!==null&&h.isAutoInsertedClosing(R,D,w))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(w==`
174
- `||w==`\r
175
- `){n(T);var S="";h.isMaybeInsertedClosing(R,D)&&(S=f.stringRepeat("}",o.maybeInsertedBrackets),h.clearMaybeInsertedClosing());var O=D.substring(R.column,R.column+1);if(O==="}"){var N=k.findMatchingBracket({row:R.row,column:R.column+1},"}");if(!N)return null;var W=this.$getIndent(k.getLine(N.row))}else if(S)var W=this.$getIndent(D);else{h.clearMaybeInsertedClosing();return}var V=W+k.getTabString();return{text:`
176
- `+V+`
177
- `+W+S,selection:[1,V.length,1,V.length]}}else h.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,L,T,k,w){var R=k.doc.getTextRange(w);if(!w.isMultiLine()&&R=="{"){n(T);var D=k.doc.getLine(w.start.row),I=D.substring(w.end.column,w.end.column+1);if(I=="}")return w.end.column++,w;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,L,T,k,w){if(w=="("){n(T);var R=T.getSelectionRange(),D=k.doc.getTextRange(R);if(D!==""&&T.getWrapBehavioursEnabled())return i(R,D,"(",")");if(h.isSaneInsertion(T,k))return h.recordAutoInsert(T,k,")"),{text:"()",selection:[1,1]}}else if(w==")"){n(T);var I=T.getCursorPosition(),E=k.doc.getLine(I.row),z=E.substring(I.column,I.column+1);if(z==")"){var F=k.$findOpeningBracket(")",{column:I.column+1,row:I.row});if(F!==null&&h.isAutoInsertedClosing(I,E,w))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,L,T,k,w){var R=k.doc.getTextRange(w);if(!w.isMultiLine()&&R=="("){n(T);var D=k.doc.getLine(w.start.row),I=D.substring(w.start.column+1,w.start.column+2);if(I==")")return w.end.column++,w}}),this.add("brackets","insertion",function(y,L,T,k,w){if(w=="["){n(T);var R=T.getSelectionRange(),D=k.doc.getTextRange(R);if(D!==""&&T.getWrapBehavioursEnabled())return i(R,D,"[","]");if(h.isSaneInsertion(T,k))return h.recordAutoInsert(T,k,"]"),{text:"[]",selection:[1,1]}}else if(w=="]"){n(T);var I=T.getCursorPosition(),E=k.doc.getLine(I.row),z=E.substring(I.column,I.column+1);if(z=="]"){var F=k.$findOpeningBracket("]",{column:I.column+1,row:I.row});if(F!==null&&h.isAutoInsertedClosing(I,E,w))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,L,T,k,w){var R=k.doc.getTextRange(w);if(!w.isMultiLine()&&R=="["){n(T);var D=k.doc.getLine(w.start.row),I=D.substring(w.start.column+1,w.start.column+2);if(I=="]")return w.end.column++,w}}),this.add("string_dquotes","insertion",function(y,L,T,k,w){var R=k.$mode.$quotes||r;if(w.length==1&&R[w]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(w)!=-1)return;n(T);var D=w,I=T.getSelectionRange(),E=k.doc.getTextRange(I);if(E!==""&&(E.length!=1||!R[E])&&T.getWrapBehavioursEnabled())return i(I,E,D,D);if(!E){var z=T.getCursorPosition(),F=k.doc.getLine(z.row),O=F.substring(z.column-1,z.column),_=F.substring(z.column,z.column+1),S=k.getTokenAt(z.row,z.column),N=k.getTokenAt(z.row,z.column+1);if(O=="\\"&&S&&/escape/.test(S.type))return null;var W=S&&/string|escape/.test(S.type),V=!N||/string|escape/.test(N.type),G;if(_==D)G=W!==V,G&&/string\.end/.test(N.type)&&(G=!1);else{if(W&&!V||W&&V)return null;var Q=k.$mode.tokenRe;Q.lastIndex=0;var te=Q.test(O);Q.lastIndex=0;var ce=Q.test(_),ne=k.$mode.$pairQuotesAfter,he=ne&&ne[D]&&ne[D].test(O);if(!he&&te||ce||_&&!/[\s;,.})\]\\]/.test(_))return null;var ue=F[z.column-2];if(O==D&&(ue==D||Q.test(ue)))return null;G=!0}return{text:G?D+D:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,L,T,k,w){var R=k.$mode.$quotes||r,D=k.doc.getTextRange(w);if(!w.isMultiLine()&&R.hasOwnProperty(D)){n(T);var I=k.doc.getLine(w.start.row),E=I.substring(w.start.column+1,w.start.column+2);if(E==D)return w.end.column++,w}}),m.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,L,T,k,w){if(y==="doc-start"&&(w===`
178
- `||w===`\r
179
- `)&&T.selection.isEmpty()){var R=T.getCursorPosition();if(R.column===0)return;for(var D=k.doc.getLine(R.row),I=k.doc.getLine(R.row+1),E=k.getTokens(R.row),z=0,F=0;F<E.length;F++){z+=E[F].value.length;var O=E[F];if(z>=R.column){if(z===R.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var _=E[F+1];if(!_||!/\.doc/.test(_.type))return}}var S=R.column-(z-O.value.length),N=O.value.indexOf("*/"),W=O.value.indexOf("/**",N>-1?N+2:0);if(W!==-1&&S>W&&S<W+3||N!==-1&&W!==-1&&S>=N&&S<=W||!/\.doc/.test(O.type))return;break}}var V=this.$getIndent(D);if(/\s*\*/.test(I))return/^\s*\*/.test(D)?{text:w+V+"* ",selection:[1,2+V.length,1,2+V.length]}:{text:w+V+" * ",selection:[1,3+V.length,1,3+V.length]};if(/\/\*\*/.test(D.substring(0,R.column)))return{text:w+V+" * "+w+" "+V+"*/",selection:[1,4+V.length,1,4+V.length]}}})},h.isSaneInsertion=function(m,y){var L=m.getCursorPosition(),T=new x(y,L.row,L.column);if(!this.$matchTokenType(T.getCurrentToken()||"text",p)){if(/[)}\]]/.test(m.session.getLine(L.row)[L.column]))return!0;var k=new x(y,L.row,L.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",p))return!1}return T.stepForward(),T.getCurrentTokenRow()!==L.row||this.$matchTokenType(T.getCurrentToken()||"text",s)},h.$matchTokenType=function(m,y){return y.indexOf(m.type||m)>-1},h.recordAutoInsert=function(m,y,L){var T=m.getCursorPosition(),k=y.doc.getLine(T.row);this.isAutoInsertedClosing(T,k,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=T.row,o.autoInsertedLineEnd=L+k.substr(T.column),o.autoInsertedBrackets++},h.recordMaybeInsert=function(m,y,L){var T=m.getCursorPosition(),k=y.doc.getLine(T.row);this.isMaybeInsertedClosing(T,k)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=T.row,o.maybeInsertedLineStart=k.substr(0,T.column)+L,o.maybeInsertedLineEnd=k.substr(T.column),o.maybeInsertedBrackets++},h.isAutoInsertedClosing=function(m,y,L){return o.autoInsertedBrackets>0&&m.row===o.autoInsertedRow&&L===o.autoInsertedLineEnd[0]&&y.substr(m.column)===o.autoInsertedLineEnd},h.isMaybeInsertedClosing=function(m,y){return o.maybeInsertedBrackets>0&&m.row===o.maybeInsertedRow&&y.substr(m.column)===o.maybeInsertedLineEnd&&y.substr(0,m.column)==o.maybeInsertedLineStart},h.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},h.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},b.inherits(h,v),u.CstyleBehaviour=h}),ace.define("ace/unicode",["require","exports","module"],function(e,u,$){for(var b=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],v=0,x=[],f=0;f<b.length;f+=2)x.push(v+=b[f]),b[f+1]&&x.push(45,v+=b[f+1]);u.wordChars=String.fromCharCode.apply(null,x)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,u,$){var b=e("../config"),v=e("../tokenizer").Tokenizer,x=e("./text_highlight_rules").TextHighlightRules,f=e("./behaviour/cstyle").CstyleBehaviour,p=e("../unicode"),s=e("../lib/lang"),o=e("../token_iterator").TokenIterator,a=e("../range").Range,r;r=function(){this.HighlightRules=x},(function(){this.$defaultBehaviour=new f,this.tokenRe=new RegExp("^["+p.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+p.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new v(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(n,i,h,m){var y=i.doc,L=!0,T=!0,k=1/0,w=i.getTabSize(),R=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var E=this.lineCommentStart.map(s.escapeRegExp).join("|"),D=this.lineCommentStart[0];else var E=s.escapeRegExp(this.lineCommentStart),D=this.lineCommentStart;E=new RegExp("^(\\s*)(?:"+E+") ?"),R=i.getUseSoftTabs();var O=function(ce,ne){var he=ce.match(E);if(he){var ue=he[1].length,le=he[0].length;!N(ce,ue,le)&&he[0][le-1]==" "&&le--,y.removeInLine(ne,ue,le)}},S=D+" ",F=function(ce,ne){(!L||/\S/.test(ce))&&(N(ce,k,k)?y.insertInLine({row:ne,column:k},S):y.insertInLine({row:ne,column:k},D))},_=function(ce,ne){return E.test(ce)},N=function(ce,ne,he){for(var ue=0;ne--&&ce.charAt(ne)==" ";)ue++;if(ue%w!=0)return!1;for(var ue=0;ce.charAt(he++)==" ";)ue++;return w>2?ue%w!=w-1:ue%w==0}}else{if(!this.blockComment)return!1;var D=this.blockComment.start,I=this.blockComment.end,E=new RegExp("^(\\s*)(?:"+s.escapeRegExp(D)+")"),z=new RegExp("(?:"+s.escapeRegExp(I)+")\\s*$"),F=function(G,Q){_(G,Q)||(!L||/\S/.test(G))&&(y.insertInLine({row:Q,column:G.length},I),y.insertInLine({row:Q,column:k},D))},O=function(G,Q){var te;(te=G.match(z))&&y.removeInLine(Q,G.length-te[0].length,G.length),(te=G.match(E))&&y.removeInLine(Q,te[1].length,te[0].length)},_=function(G,Q){if(E.test(G))return!0;for(var te=i.getTokens(Q),ce=0;ce<te.length;ce++)if(te[ce].type==="comment")return!0}}function W(G){for(var Q=h;Q<=m;Q++)G(y.getLine(Q),Q)}var V=1/0;W(function(G,Q){var te=G.search(/\S/);te!==-1?(te<k&&(k=te),T&&!_(G,Q)&&(T=!1)):V>G.length&&(V=G.length)}),k==1/0&&(k=V,L=!1,T=!1),R&&k%w!=0&&(k=Math.floor(k/w)*w),W(T?O:F)},this.toggleBlockComment=function(n,i,h,m){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var L=new o(i,m.row,m.column),T=L.getCurrentToken();i.selection;var k=i.selection.toOrientedRange(),w,R;if(T&&/comment/.test(T.type)){for(var D,I;T&&/comment/.test(T.type);){var E=T.value.indexOf(y.start);if(E!=-1){var z=L.getCurrentTokenRow(),F=L.getCurrentTokenColumn()+E;D=new a(z,F,z,F+y.start.length);break}T=L.stepBackward()}for(var L=new o(i,m.row,m.column),T=L.getCurrentToken();T&&/comment/.test(T.type);){var E=T.value.indexOf(y.end);if(E!=-1){var z=L.getCurrentTokenRow(),F=L.getCurrentTokenColumn()+E;I=new a(z,F,z,F+y.end.length);break}T=L.stepForward()}I&&i.remove(I),D&&(i.remove(D),w=D.start.row,R=-y.start.length)}else R=y.start.length,w=h.start.row,i.insert(h.end,y.end),i.insert(h.start,y.start);k.start.row==w&&(k.start.column+=R),k.end.row==w&&(k.end.column+=R),i.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(n,i,h){return this.$getIndent(i)},this.checkOutdent=function(n,i,h){return!1},this.autoOutdent=function(n,i,h){},this.$getIndent=function(n){return n.match(/^\s*/)[0]},this.createWorker=function(n){return null},this.createModeDelegates=function(n){this.$embeds=[],this.$modes={};for(var i in n)if(n[i]){var h=n[i],m=h.prototype.$id,y=b.$modes[m];y||(b.$modes[m]=y=new h),b.$modes[i]||(b.$modes[i]=y),this.$embeds.push(i),this.$modes[i]=y}for(var L=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],T=function(w){(function(R){var D=L[w],I=R[D];R[L[w]]=function(){return this.$delegator(D,arguments,I)}})(k)},k=this,i=0;i<L.length;i++)T(i)},this.$delegator=function(n,i,h){var m=i[0]||"start";if(typeof m!="string"){if(Array.isArray(m[2])){var y=m[2][m[2].length-1],L=this.$modes[y];if(L)return L[n].apply(L,[m[1]].concat([].slice.call(i,1)))}m=m[0]||"start"}for(var T=0;T<this.$embeds.length;T++)if(this.$modes[this.$embeds[T]]){var k=m.split(this.$embeds[T]);if(!k[0]&&k[1]){i[0]=k[1];var L=this.$modes[this.$embeds[T]];return L[n].apply(L,i)}}var w=h.apply(this,i);return h?w:void 0},this.transformAction=function(n,i,h,m,y){if(this.$behaviour){var L=this.$behaviour.getBehaviours();for(var T in L)if(L[T][i]){var k=L[T][i].apply(this,arguments);if(k)return k}}},this.getKeywords=function(n){if(!this.completionKeywords){var i=this.$tokenizer.rules,h=[];for(var m in i)for(var y=i[m],L=0,T=y.length;L<T;L++)if(typeof y[L].token=="string")/keyword|support|storage/.test(y[L].token)&&h.push(y[L].regex);else if(typeof y[L].token=="object"){for(var k=0,w=y[L].token.length;k<w;k++)if(/keyword|support|storage/.test(y[L].token[k])){var m=y[L].regex.match(/\(.+?\)/g)[k];h.push(m.substr(1,m.length-2))}}this.completionKeywords=h}return n?h.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(n,i,h,m){var y=this.$keywordList||this.$createKeywordList();return y.map(function(L){return{name:L,value:L,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(r.prototype),u.Mode=r}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,u,$){var b=e("./lib/dom"),v=(function(){function x(f){this.session=f,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return x.prototype.getRowLength=function(f){var p;return this.lineWidgets?p=this.lineWidgets[f]&&this.lineWidgets[f].rowCount||0:p=0,!this.$useWrapMode||!this.$wrapData[f]?1+p:this.$wrapData[f].length+1+p},x.prototype.$getWidgetScreenLength=function(){var f=0;return this.lineWidgets.forEach(function(p){p&&p.rowCount&&!p.hidden&&(f+=p.rowCount)}),f},x.prototype.$onChangeEditor=function(f){this.attach(f.editor)},x.prototype.attach=function(f){f&&f.widgetManager&&f.widgetManager!=this&&f.widgetManager.detach(),this.editor!=f&&(this.detach(),this.editor=f,f&&(f.widgetManager=this,f.renderer.on("beforeRender",this.measureWidgets),f.renderer.on("afterRender",this.renderWidgets)))},x.prototype.detach=function(f){var p=this.editor;if(p){this.editor=null,p.widgetManager=null,p.renderer.off("beforeRender",this.measureWidgets),p.renderer.off("afterRender",this.renderWidgets);var s=this.session.lineWidgets;s&&s.forEach(function(o){o&&o.el&&o.el.parentNode&&(o._inDocument=!1,o.el.parentNode.removeChild(o.el))})}},x.prototype.updateOnFold=function(f,p){var s=p.lineWidgets;if(!(!s||!f.action)){for(var o=f.data,a=o.start.row,r=o.end.row,n=f.action=="add",i=a+1;i<r;i++)s[i]&&(s[i].hidden=n);s[r]&&(n?s[a]?s[r].hidden=n:s[a]=s[r]:(s[a]==s[r]&&(s[a]=void 0),s[r].hidden=n))}},x.prototype.updateOnChange=function(f){var p=this.session.lineWidgets;if(p){var s=f.start.row,o=f.end.row-s;if(o!==0)if(f.action=="remove"){var a=p.splice(s+1,o);!p[s]&&a[a.length-1]&&(p[s]=a.pop()),a.forEach(function(n){n&&this.removeLineWidget(n)},this),this.$updateRows()}else{var r=new Array(o);p[s]&&p[s].column!=null&&f.start.column>p[s].column&&s++,r.unshift(s,0),p.splice.apply(p,r),this.$updateRows()}}},x.prototype.$updateRows=function(){var f=this.session.lineWidgets;if(f){var p=!0;f.forEach(function(s,o){if(s)for(p=!1,s.row=o;s.$oldWidget;)s.$oldWidget.row=o,s=s.$oldWidget}),p&&(this.session.lineWidgets=null)}},x.prototype.$registerLineWidget=function(f){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var p=this.session.lineWidgets[f.row];return p&&(f.$oldWidget=p,p.el&&p.el.parentNode&&(p.el.parentNode.removeChild(p.el),p._inDocument=!1)),this.session.lineWidgets[f.row]=f,f},x.prototype.addLineWidget=function(f){if(this.$registerLineWidget(f),f.session=this.session,!this.editor)return f;var p=this.editor.renderer;f.html&&!f.el&&(f.el=b.createElement("div"),f.el.innerHTML=f.html),f.text&&!f.el&&(f.el=b.createElement("div"),f.el.textContent=f.text),f.el&&(b.addCssClass(f.el,"ace_lineWidgetContainer"),f.className&&b.addCssClass(f.el,f.className),f.el.style.position="absolute",f.el.style.zIndex="5",p.container.appendChild(f.el),f._inDocument=!0,f.coverGutter||(f.el.style.zIndex="3"),f.pixelHeight==null&&(f.pixelHeight=f.el.offsetHeight)),f.rowCount==null&&(f.rowCount=f.pixelHeight/p.layerConfig.lineHeight);var s=this.session.getFoldAt(f.row,0);if(f.$fold=s,s){var o=this.session.lineWidgets;f.row==s.end.row&&!o[s.start.row]?o[s.start.row]=f:f.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:f.row}}}),this.$updateRows(),this.renderWidgets(null,p),this.onWidgetChanged(f),f},x.prototype.removeLineWidget=function(f){if(f._inDocument=!1,f.session=null,f.el&&f.el.parentNode&&f.el.parentNode.removeChild(f.el),f.editor&&f.editor.destroy)try{f.editor.destroy()}catch{}if(this.session.lineWidgets){var p=this.session.lineWidgets[f.row];if(p==f)this.session.lineWidgets[f.row]=f.$oldWidget,f.$oldWidget&&this.onWidgetChanged(f.$oldWidget);else for(;p;){if(p.$oldWidget==f){p.$oldWidget=f.$oldWidget;break}p=p.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:f.row}}}),this.$updateRows()},x.prototype.getWidgetsAtRow=function(f){for(var p=this.session.lineWidgets,s=p&&p[f],o=[];s;)o.push(s),s=s.$oldWidget;return o},x.prototype.onWidgetChanged=function(f){this.session._changedWidgets.push(f),this.editor&&this.editor.renderer.updateFull()},x.prototype.measureWidgets=function(f,p){var s=this.session._changedWidgets,o=p.layerConfig;if(!(!s||!s.length)){for(var a=1/0,r=0;r<s.length;r++){var n=s[r];if(!(!n||!n.el)&&n.session==this.session){if(!n._inDocument){if(this.session.lineWidgets[n.row]!=n)continue;n._inDocument=!0,p.container.appendChild(n.el)}n.h=n.el.offsetHeight,n.fixedWidth||(n.w=n.el.offsetWidth,n.screenWidth=Math.ceil(n.w/o.characterWidth));var i=n.h/o.lineHeight;n.coverLine&&(i-=this.session.getRowLineCount(n.row),i<0&&(i=0)),n.rowCount!=i&&(n.rowCount=i,n.row<a&&(a=n.row))}}a!=1/0&&(this.session._emit("changeFold",{data:{start:{row:a}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},x.prototype.renderWidgets=function(f,p){var s=p.layerConfig,o=this.session.lineWidgets;if(o){for(var a=Math.min(this.firstRow,s.firstRow),r=Math.max(this.lastRow,s.lastRow,o.length);a>0&&!o[a];)a--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,p.$cursorLayer.config=s;for(var n=a;n<=r;n++){var i=o[n];if(!(!i||!i.el)){if(i.hidden){i.el.style.top=-100-(i.pixelHeight||0)+"px";continue}i._inDocument||(i._inDocument=!0,p.container.appendChild(i.el));var h=p.$cursorLayer.getPixelPosition({row:n,column:0},!0).top;i.coverLine||(h+=s.lineHeight*this.session.getRowLineCount(i.row)),i.el.style.top=h-s.offset+"px";var m=i.coverGutter?0:p.gutterWidth;i.fixedWidth||(m-=p.scrollLeft),i.el.style.left=m+"px",i.fullWidth&&i.screenWidth&&(i.el.style.minWidth=s.width+2*s.padding+"px"),i.fixedWidth?i.el.style.right=p.scrollBar.getWidth()+"px":i.el.style.right=""}}}},x})();u.LineWidgets=v}),ace.define("ace/apply_delta",["require","exports","module"],function(e,u,$){u.applyDelta=function(b,v,x){var f=v.start.row,p=v.start.column,s=b[f]||"";switch(v.action){case"insert":var o=v.lines;if(o.length===1)b[f]=s.substring(0,p)+v.lines[0]+s.substring(p);else{var a=[f,1].concat(v.lines);b.splice.apply(b,a),b[f]=s.substring(0,p)+b[f],b[f+v.lines.length-1]+=s.substring(p)}break;case"remove":var r=v.end.column,n=v.end.row;f===n?b[f]=s.substring(0,p)+s.substring(r):b.splice(f,n-f+1,s.substring(0,p)+b[n].substring(r));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,u,$){var b=e("./lib/oop"),v=e("./lib/event_emitter").EventEmitter,x=(function(){function s(o,a,r){this.$onChange=this.onChange.bind(this),this.attach(o),typeof a!="number"?this.setPosition(a.row,a.column):this.setPosition(a,r)}return s.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},s.prototype.getDocument=function(){return this.document},s.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var a=p(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(a.row,a.column,!0)}},s.prototype.setPosition=function(o,a,r){var n;if(r?n={row:o,column:a}:n=this.$clipPositionToDocument(o,a),!(this.row==n.row&&this.column==n.column)){var i={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:i,value:n})}},s.prototype.detach=function(){this.document.off("change",this.$onChange)},s.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},s.prototype.$clipPositionToDocument=function(o,a){var r={};return o>=this.document.getLength()?(r.row=Math.max(0,this.document.getLength()-1),r.column=this.document.getLine(r.row).length):o<0?(r.row=0,r.column=0):(r.row=o,r.column=Math.min(this.document.getLine(r.row).length,Math.max(0,a))),a<0&&(r.column=0),r},s})();x.prototype.$insertRight=!1,b.implement(x.prototype,v);function f(s,o,a){var r=a?s.column<=o.column:s.column<o.column;return s.row<o.row||s.row==o.row&&r}function p(s,o,a){var r=s.action=="insert",n=(r?1:-1)*(s.end.row-s.start.row),i=(r?1:-1)*(s.end.column-s.start.column),h=s.start,m=r?h:s.end;return f(o,h,a)?{row:o.row,column:o.column}:f(m,o,!a)?{row:o.row+n,column:o.column+(o.row==m.row?i:0)}:{row:h.row,column:h.column}}u.Anchor=x}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,u,$){var b=e("./lib/oop"),v=e("./apply_delta").applyDelta,x=e("./lib/event_emitter").EventEmitter,f=e("./range").Range,p=e("./anchor").Anchor,s=(function(){function o(a){this.$lines=[""],a.length===0?this.$lines=[""]:Array.isArray(a)?this.insertMergedLines({row:0,column:0},a):this.insert({row:0,column:0},a)}return o.prototype.setValue=function(a){var r=this.getLength()-1;this.remove(new f(0,0,r,this.getLine(r).length)),this.insert({row:0,column:0},a||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(a,r){return new p(this,a,r)},o.prototype.$detectNewLine=function(a){var r=a.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=r?r[1]:`
180
- `,this._signal("changeNewLineMode")},o.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
181
- `;case"unix":return`
182
- `;default:return this.$autoNewLine||`
183
- `}},o.prototype.setNewLineMode=function(a){this.$newLineMode!==a&&(this.$newLineMode=a,this._signal("changeNewLineMode"))},o.prototype.getNewLineMode=function(){return this.$newLineMode},o.prototype.isNewLine=function(a){return a==`\r
184
- `||a=="\r"||a==`
185
- `},o.prototype.getLine=function(a){return this.$lines[a]||""},o.prototype.getLines=function(a,r){return this.$lines.slice(a,r+1)},o.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},o.prototype.getLength=function(){return this.$lines.length},o.prototype.getTextRange=function(a){return this.getLinesForRange(a).join(this.getNewLineCharacter())},o.prototype.getLinesForRange=function(a){var r;if(a.start.row===a.end.row)r=[this.getLine(a.start.row).substring(a.start.column,a.end.column)];else{r=this.getLines(a.start.row,a.end.row),r[0]=(r[0]||"").substring(a.start.column);var n=r.length-1;a.end.row-a.start.row==n&&(r[n]=r[n].substring(0,a.end.column))}return r},o.prototype.insertLines=function(a,r){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(a,r)},o.prototype.removeLines=function(a,r){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(a,r)},o.prototype.insertNewLine=function(a){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(a,["",""])},o.prototype.insert=function(a,r){return this.getLength()<=1&&this.$detectNewLine(r),this.insertMergedLines(a,this.$split(r))},o.prototype.insertInLine=function(a,r){var n=this.clippedPos(a.row,a.column),i=this.pos(a.row,a.column+r.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[r]},!0),this.clonePos(i)},o.prototype.clippedPos=function(a,r){var n=this.getLength();a===void 0?a=n:a<0?a=0:a>=n&&(a=n-1,r=void 0);var i=this.getLine(a);return r==null&&(r=i.length),r=Math.min(Math.max(r,0),i.length),{row:a,column:r}},o.prototype.clonePos=function(a){return{row:a.row,column:a.column}},o.prototype.pos=function(a,r){return{row:a,column:r}},o.prototype.$clipPosition=function(a){var r=this.getLength();return a.row>=r?(a.row=Math.max(0,r-1),a.column=this.getLine(r-1).length):(a.row=Math.max(0,a.row),a.column=Math.min(Math.max(a.column,0),this.getLine(a.row).length)),a},o.prototype.insertFullLines=function(a,r){a=Math.min(Math.max(a,0),this.getLength());var n=0;a<this.getLength()?(r=r.concat([""]),n=0):(r=[""].concat(r),a--,n=this.$lines[a].length),this.insertMergedLines({row:a,column:n},r)},o.prototype.insertMergedLines=function(a,r){var n=this.clippedPos(a.row,a.column),i={row:n.row+r.length-1,column:(r.length==1?n.column:0)+r[r.length-1].length};return this.applyDelta({start:n,end:i,action:"insert",lines:r}),this.clonePos(i)},o.prototype.remove=function(a){var r=this.clippedPos(a.start.row,a.start.column),n=this.clippedPos(a.end.row,a.end.column);return this.applyDelta({start:r,end:n,action:"remove",lines:this.getLinesForRange({start:r,end:n})}),this.clonePos(r)},o.prototype.removeInLine=function(a,r,n){var i=this.clippedPos(a,r),h=this.clippedPos(a,n);return this.applyDelta({start:i,end:h,action:"remove",lines:this.getLinesForRange({start:i,end:h})},!0),this.clonePos(i)},o.prototype.removeFullLines=function(a,r){a=Math.min(Math.max(0,a),this.getLength()-1),r=Math.min(Math.max(0,r),this.getLength()-1);var n=r==this.getLength()-1&&a>0,i=r<this.getLength()-1,h=n?a-1:a,m=n?this.getLine(h).length:0,y=i?r+1:r,L=i?0:this.getLine(y).length,T=new f(h,m,y,L),k=this.$lines.slice(a,r+1);return this.applyDelta({start:T.start,end:T.end,action:"remove",lines:this.getLinesForRange(T)}),k},o.prototype.removeNewLine=function(a){a<this.getLength()-1&&a>=0&&this.applyDelta({start:this.pos(a,this.getLine(a).length),end:this.pos(a+1,0),action:"remove",lines:["",""]})},o.prototype.replace=function(a,r){if(a instanceof f||(a=f.fromPoints(a.start,a.end)),r.length===0&&a.isEmpty())return a.start;if(r==this.getTextRange(a))return a.end;this.remove(a);var n;return r?n=this.insert(a.start,r):n=a.start,n},o.prototype.applyDeltas=function(a){for(var r=0;r<a.length;r++)this.applyDelta(a[r])},o.prototype.revertDeltas=function(a){for(var r=a.length-1;r>=0;r--)this.revertDelta(a[r])},o.prototype.applyDelta=function(a,r){var n=a.action=="insert";(n?a.lines.length<=1&&!a.lines[0]:!f.comparePoints(a.start,a.end))||(n&&a.lines.length>2e4?this.$splitAndapplyLargeDelta(a,2e4):(v(this.$lines,a,r),this._signal("change",a)))},o.prototype.$safeApplyDelta=function(a){var r=this.$lines.length;(a.action=="remove"&&a.start.row<r&&a.end.row<r||a.action=="insert"&&a.start.row<=r)&&this.applyDelta(a)},o.prototype.$splitAndapplyLargeDelta=function(a,r){for(var n=a.lines,i=n.length-r+1,h=a.start.row,m=a.start.column,y=0,L=0;y<i;y=L){L+=r-1;var T=n.slice(y,L);T.push(""),this.applyDelta({start:this.pos(h+y,m),end:this.pos(h+L,m=0),action:a.action,lines:T},!0)}a.lines=n.slice(y),a.start.row=h+y,a.start.column=m,this.applyDelta(a,!0)},o.prototype.revertDelta=function(a){this.$safeApplyDelta({start:this.clonePos(a.start),end:this.clonePos(a.end),action:a.action=="insert"?"remove":"insert",lines:a.lines.slice()})},o.prototype.indexToPosition=function(a,r){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,h=r||0,m=n.length;h<m;h++)if(a-=n[h].length+i,a<0)return{row:h,column:a+n[h].length+i};return{row:m-1,column:a+n[m-1].length+i}},o.prototype.positionToIndex=function(a,r){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,h=0,m=Math.min(a.row,n.length),y=r||0;y<m;++y)h+=n[y].length+i;return h+a.column},o.prototype.$split=function(a){return a.split(/\r\n|\r|\n/)},o})();s.prototype.$autoNewLine="",s.prototype.$newLineMode="auto",b.implement(s.prototype,x),u.Document=s}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,u,$){var b=e("./lib/oop"),v=e("./lib/event_emitter").EventEmitter,x=(function(){function f(p,s){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=p;var o=this;this.$worker=function(){if(o.running){for(var a=new Date,r=o.currentLine,n=-1,i=o.doc,h=r;o.lines[r];)r++;var m=i.getLength(),y=0;for(o.running=!1;r<m;){o.$tokenizeRow(r),n=r;do r++;while(o.lines[r]);if(y++,y%5===0&&new Date-a>20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=r,n==-1&&(n=r),h<=n&&o.fireUpdateEvent(h,n)}}}return f.prototype.setTokenizer=function(p){this.tokenizer=p,this.lines=[],this.states=[],this.start(0)},f.prototype.setDocument=function(p){this.doc=p,this.lines=[],this.states=[],this.stop()},f.prototype.fireUpdateEvent=function(p,s){var o={first:p,last:s};this._signal("update",{data:o})},f.prototype.start=function(p){this.currentLine=Math.min(p||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},f.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},f.prototype.$updateOnChange=function(p){var s=p.start.row,o=p.end.row-s;if(o===0)this.lines[s]=null;else if(p.action=="remove")this.lines.splice(s,o+1,null),this.states.splice(s,o+1,null);else{var a=Array(o+1);a.unshift(s,1),this.lines.splice.apply(this.lines,a),this.states.splice.apply(this.states,a)}this.currentLine=Math.min(s,this.currentLine,this.doc.getLength()),this.stop()},f.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},f.prototype.getTokens=function(p){return this.lines[p]||this.$tokenizeRow(p)},f.prototype.getState=function(p){return this.currentLine==p&&this.$tokenizeRow(p),this.states[p]||"start"},f.prototype.$tokenizeRow=function(p){var s=this.doc.getLine(p),o=this.states[p-1],a=this.tokenizer.getLineTokens(s,o,p);return this.states[p]+""!=a.state+""?(this.states[p]=a.state,this.lines[p+1]=null,this.currentLine>p+1&&(this.currentLine=p+1)):this.currentLine==p&&(this.currentLine=p+1),this.lines[p]=a.tokens},f.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},f})();b.implement(x.prototype,v),u.BackgroundTokenizer=x}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,u,$){var b=e("./lib/lang"),v=e("./range").Range,x=(function(){function f(p,s,o){o===void 0&&(o="text"),this.setRegexp(p),this.clazz=s,this.type=o,this.docLen=0}return f.prototype.setRegexp=function(p){this.regExp+""!=p+""&&(this.regExp=p,this.cache=[])},f.prototype.update=function(p,s,o,a){if(this.regExp){for(var r=a.firstRow,n=a.lastRow,i={},h=o.$editor&&o.$editor.$search,m=h&&h.$isMultilineSearch(o.$editor.getLastSearchOptions()),y=r;y<=n;y++){var L=this.cache[y];if(L==null||o.getValue().length!=this.docLen){if(m){L=[];var T=h.$multiLineForward(o,this.regExp,y,n);if(T){var k=T.endRow<=n?T.endRow-1:n;k>y&&(y=k),L.push(new v(T.startRow,T.startCol,T.endRow,T.endCol))}L.length>this.MAX_RANGES&&(L=L.slice(0,this.MAX_RANGES))}else L=b.getMatchOffsets(o.getLine(y),this.regExp),L.length>this.MAX_RANGES&&(L=L.slice(0,this.MAX_RANGES)),L=L.map(function(I){return new v(y,I.offset,y,I.offset+I.length)});this.cache[y]=L.length?L:""}if(L.length!==0)for(var w=L.length;w--;){var R=L[w].toScreenRange(o),D=R.toString();i[D]||(i[D]=!0,s.drawSingleLineMarker(p,R,this.clazz,a))}}this.docLen=o.getValue().length}},f})();x.prototype.MAX_RANGES=500,u.SearchHighlight=x}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,u,$){var b=(function(){function k(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(w){this.$session=w},k.prototype.add=function(w,R,D){if(!this.$fromUndo&&w!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),R===!1||!this.lastDeltas){this.lastDeltas=[];var I=this.$undoStack.length;I>this.$undoDepth-1&&this.$undoStack.splice(0,I-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),w.id=this.$rev=++this.$maxRev}(w.action=="remove"||w.action=="insert")&&(this.$lastDelta=w),this.lastDeltas.push(w)}},k.prototype.addSelection=function(w,R){this.selections.push({value:w,rev:R||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(w,R){R==null&&(R=this.$rev+1);for(var D=this.$undoStack,I=D.length;I--;){var E=D[I][0];if(E.id<=w)break;E.id<R&&(E.ignore=!0)}this.lastDeltas=null},k.prototype.getSelection=function(w,R){for(var D=this.selections,I=D.length;I--;){var E=D[I];if(E.rev<w)return R&&(E=D[I+1]),E}},k.prototype.getRevision=function(){return this.$rev},k.prototype.getDeltas=function(w,R){R==null&&(R=this.$rev+1);for(var D=this.$undoStack,I=null,E=0,z=D.length;z--;){var F=D[z][0];if(F.id<R&&!I&&(I=z+1),F.id<=w){E=z+1;break}}return D.slice(E,I)},k.prototype.getChangedRanges=function(w,R){R==null&&(R=this.$rev+1)},k.prototype.getChangedLines=function(w,R){R==null&&(R=this.$rev+1)},k.prototype.undo=function(w,R){this.lastDeltas=null;var D=this.$undoStack;if(v(D,D.length)){w||(w=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var I=D.pop(),E=null;return I&&(E=w.undoChanges(I,R),this.$redoStack.push(I),this.$syncRev()),this.$fromUndo=!1,E}},k.prototype.redo=function(w,R){if(this.lastDeltas=null,w||(w=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var D=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);T(this.$redoStack,D),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(z){z[0].id=++this.$maxRev},this)}var I=this.$redoStack.pop(),E=null;return I&&(E=w.redoChanges(I,R),this.$undoStack.push(I),this.$syncRev()),this.$fromUndo=!1,E},k.prototype.$syncRev=function(){var w=this.$undoStack,R=w[w.length-1],D=R&&R[0].id||0;this.$redoStackBaseRev=D,this.$rev=D},k.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},k.prototype.canUndo=function(){return this.$undoStack.length>0},k.prototype.canRedo=function(){return this.$redoStack.length>0},k.prototype.bookmark=function(w){w==null&&(w=this.$rev),this.mark=w},k.prototype.isAtBookmark=function(){return this.$rev===this.mark},k.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},k.prototype.fromJSON=function(w){this.reset(),this.$undoStack=w.$undoStack,this.$redoStack=w.$redoStack},k.prototype.$prettyPrint=function(w){return w?o(w):o(this.$undoStack)+`
186
- ---
187
- `+o(this.$redoStack)},k})();b.prototype.hasUndo=b.prototype.canUndo,b.prototype.hasRedo=b.prototype.canRedo,b.prototype.isClean=b.prototype.isAtBookmark,b.prototype.markClean=b.prototype.bookmark;function v(k,w){for(var R=w;R--;){var D=k[R];if(D&&!D[0].ignore){for(;R<w-1;){var I=n(k[R],k[R+1]);k[R]=I[0],k[R+1]=I[1],R++}return!0}}}var x=e("./range").Range,f=x.comparePoints;x.comparePoints;function p(k){return{row:k.row,column:k.column}}function s(k){return{start:p(k.start),end:p(k.end),action:k.action,lines:k.lines.slice()}}function o(k){if(k=k||this,Array.isArray(k))return k.map(o).join(`
188
- `);var w="";return k.action?(w=k.action=="insert"?"+":"-",w+="["+k.lines+"]"):k.value&&(Array.isArray(k.value)?w=k.value.map(a).join(`
189
- `):w=a(k.value)),k.start&&(w+=a(k)),(k.id||k.rev)&&(w+=" ("+(k.id||k.rev)+")"),w}function a(k){return k.start.row+":"+k.start.column+"=>"+k.end.row+":"+k.end.column}function r(k,w){var R=k.action=="insert",D=w.action=="insert";if(R&&D)if(f(w.start,k.end)>=0)h(w,k,-1);else if(f(w.start,k.start)<=0)h(k,w,1);else return null;else if(R&&!D)if(f(w.start,k.end)>=0)h(w,k,-1);else if(f(w.end,k.start)<=0)h(k,w,-1);else return null;else if(!R&&D)if(f(w.start,k.start)>=0)h(w,k,1);else if(f(w.start,k.start)<=0)h(k,w,1);else return null;else if(!R&&!D)if(f(w.start,k.start)>=0)h(w,k,1);else if(f(w.end,k.start)<=0)h(k,w,-1);else return null;return[w,k]}function n(k,w){for(var R=k.length;R--;)for(var D=0;D<w.length;D++)if(!r(k[R],w[D])){for(;R<k.length;){for(;D--;)r(w[D],k[R]);D=w.length,R++}return[k,w]}return k.selectionBefore=w.selectionBefore=k.selectionAfter=w.selectionAfter=null,[w,k]}function i(k,w){var R=k.action=="insert",D=w.action=="insert";if(R&&D)f(k.start,w.start)<0?h(w,k,1):h(k,w,1);else if(R&&!D)f(k.start,w.end)>=0?h(k,w,-1):(f(k.start,w.start)<=0||h(k,x.fromPoints(w.start,k.start),-1),h(w,k,1));else if(!R&&D)f(w.start,k.end)>=0?h(w,k,-1):(f(w.start,k.start)<=0||h(w,x.fromPoints(k.start,w.start),-1),h(k,w,1));else if(!R&&!D)if(f(w.start,k.end)>=0)h(w,k,-1);else if(f(w.end,k.start)<=0)h(k,w,-1);else{var I,E;return f(k.start,w.start)<0&&(I=k,k=y(k,w.start)),f(k.end,w.end)>0&&(E=y(k,w.end)),m(w.end,k.start,k.end,-1),E&&!I&&(k.lines=E.lines,k.start=E.start,k.end=E.end,E=k),[w,I,E].filter(Boolean)}return[w,k]}function h(k,w,R){m(k.start,w.start,w.end,R),m(k.end,w.start,w.end,R)}function m(k,w,R,D){k.row==(D==1?w:R).row&&(k.column+=D*(R.column-w.column)),k.row+=D*(R.row-w.row)}function y(k,w){var R=k.lines,D=k.end;k.end=p(w);var I=k.end.row-k.start.row,E=R.splice(I,R.length),z=I?w.column:w.column-k.start.column;R.push(E[0].substring(0,z)),E[0]=E[0].substr(z);var F={start:p(w),end:D,lines:E,action:k.action};return F}function L(k,w){w=s(w);for(var R=k.length;R--;){for(var D=k[R],I=0;I<D.length;I++){var E=D[I],z=i(E,w);w=z[0],z.length!=2&&(z[2]?(D.splice(I+1,1,z[1],z[2]),I++):z[1]||(D.splice(I,1),I--))}D.length||k.splice(R,1)}return k}function T(k,w){for(var R=0;R<w.length;R++)for(var D=w[R],I=0;I<D.length;I++)L(k,D[I])}u.UndoManager=b}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,u,$){var b=e("../range").Range,v=(function(){function x(f,p){this.foldData=f,Array.isArray(p)?this.folds=p:p=this.folds=[p];var s=p[p.length-1];this.range=new b(p[0].start.row,p[0].start.column,s.end.row,s.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(o){o.setFoldLine(this)},this)}return x.prototype.shiftRow=function(f){this.start.row+=f,this.end.row+=f,this.folds.forEach(function(p){p.start.row+=f,p.end.row+=f})},x.prototype.addFold=function(f){if(f.sameRow){if(f.start.row<this.startRow||f.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(f),this.folds.sort(function(p,s){return-p.range.compareEnd(s.start.row,s.start.column)}),this.range.compareEnd(f.start.row,f.start.column)>0?(this.end.row=f.end.row,this.end.column=f.end.column):this.range.compareStart(f.end.row,f.end.column)<0&&(this.start.row=f.start.row,this.start.column=f.start.column)}else if(f.start.row==this.end.row)this.folds.push(f),this.end.row=f.end.row,this.end.column=f.end.column;else if(f.end.row==this.start.row)this.folds.unshift(f),this.start.row=f.start.row,this.start.column=f.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");f.foldLine=this},x.prototype.containsRow=function(f){return f>=this.start.row&&f<=this.end.row},x.prototype.walk=function(f,p,s){var o=0,a=this.folds,r,n,i,h=!0;p==null&&(p=this.end.row,s=this.end.column);for(var m=0;m<a.length;m++){if(r=a[m],n=r.range.compareStart(p,s),n==-1){f(null,p,s,o,h);return}if(i=f(null,r.start.row,r.start.column,o,h),i=!i&&f(r.placeholder,r.start.row,r.start.column,o),i||n===0)return;h=!r.sameRow,o=r.end.column}f(null,p,s,o,h)},x.prototype.getNextFoldTo=function(f,p){for(var s,o,a=0;a<this.folds.length;a++){if(s=this.folds[a],o=s.range.compareEnd(f,p),o==-1)return{fold:s,kind:"after"};if(o===0)return{fold:s,kind:"inside"}}return null},x.prototype.addRemoveChars=function(f,p,s){var o=this.getNextFoldTo(f,p),a,r;if(o){if(a=o.fold,o.kind=="inside"&&a.start.column!=p&&a.start.row!=f)window.console&&window.console.log(f,p,a);else if(a.start.row==f){r=this.folds;var n=r.indexOf(a);for(n===0&&(this.start.column+=s),n;n<r.length;n++){if(a=r[n],a.start.column+=s,!a.sameRow)return;a.end.column+=s}this.end.column+=s}}},x.prototype.split=function(f,p){var s=this.getNextFoldTo(f,p);if(!s||s.kind=="inside")return null;var o=s.fold,a=this.folds,r=this.foldData,n=a.indexOf(o),i=a[n-1];this.end.row=i.end.row,this.end.column=i.end.column,a=a.splice(n,a.length-n);var h=new x(r,a);return r.splice(r.indexOf(this)+1,0,h),h},x.prototype.merge=function(f){for(var p=f.folds,s=0;s<p.length;s++)this.addFold(p[s]);var o=this.foldData;o.splice(o.indexOf(f),1)},x.prototype.toString=function(){var f=[this.range.toString()+": ["];return this.folds.forEach(function(p){f.push(" "+p.toString())}),f.push("]"),f.join(`
190
- `)},x.prototype.idxToPosition=function(f){for(var p=0,s=0;s<this.folds.length;s++){var o=this.folds[s];if(f-=o.start.column-p,f<0)return{row:o.start.row,column:o.start.column+f};if(f-=o.placeholder.length,f<0)return o.start;p=o.end.column}return{row:this.end.row,column:this.end.column+f}},x})();u.FoldLine=v}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,u,$){var b=e("./range").Range,v=b.comparePoints,x=(function(){function f(){this.ranges=[],this.$bias=1}return f.prototype.pointIndex=function(p,s,o){for(var a=this.ranges,r=o||0;r<a.length;r++){var n=a[r],i=v(p,n.end);if(!(i>0)){var h=v(p,n.start);return i===0?s&&h!==0?-r-2:r:h>0||h===0&&!s?r:-r-1}}return-r-1},f.prototype.add=function(p){var s=!p.isEmpty(),o=this.pointIndex(p.start,s);o<0&&(o=-o-1);var a=this.pointIndex(p.end,s,o);return a<0?a=-a-1:a++,this.ranges.splice(o,a-o,p)},f.prototype.addList=function(p){for(var s=[],o=p.length;o--;)s.push.apply(s,this.add(p[o]));return s},f.prototype.substractPoint=function(p){var s=this.pointIndex(p);if(s>=0)return this.ranges.splice(s,1)},f.prototype.merge=function(){var p=[],s=this.ranges;s=s.sort(function(i,h){return v(i.start,h.start)});for(var o=s[0],a,r=1;r<s.length;r++){a=o,o=s[r];var n=v(a.end,o.start);n<0||n==0&&!a.isEmpty()&&!o.isEmpty()||(v(a.end,o.end)<0&&(a.end.row=o.end.row,a.end.column=o.end.column),s.splice(r,1),p.push(o),o=a,r--)}return this.ranges=s,p},f.prototype.contains=function(p,s){return this.pointIndex({row:p,column:s})>=0},f.prototype.containsPoint=function(p){return this.pointIndex(p)>=0},f.prototype.rangeAtPoint=function(p){var s=this.pointIndex(p);if(s>=0)return this.ranges[s]},f.prototype.clipRows=function(p,s){var o=this.ranges;if(o[0].start.row>s||o[o.length-1].start.row<p)return[];var a=this.pointIndex({row:p,column:0});a<0&&(a=-a-1);var r=this.pointIndex({row:s,column:0},a);r<0&&(r=-r-1);for(var n=[],i=a;i<r;i++)n.push(o[i]);return n},f.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},f.prototype.attach=function(p){this.session&&this.detach(),this.session=p,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},f.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},f.prototype.$onChange=function(p){for(var s=p.start,o=p.end,a=s.row,r=o.row,n=this.ranges,i=0,h=n.length;i<h;i++){var m=n[i];if(m.end.row>=a)break}if(p.action=="insert")for(var y=r-a,L=-s.column+o.column;i<h;i++){var m=n[i];if(m.start.row>a)break;if(m.start.row==a&&m.start.column>=s.column&&(m.start.column==s.column&&this.$bias<=0||(m.start.column+=L,m.start.row+=y)),m.end.row==a&&m.end.column>=s.column){if(m.end.column==s.column&&this.$bias<0)continue;m.end.column==s.column&&L>0&&i<h-1&&m.end.column>m.start.column&&m.end.column==n[i+1].start.column&&(m.end.column-=L),m.end.column+=L,m.end.row+=y}}else for(var y=a-r,L=s.column-o.column;i<h;i++){var m=n[i];if(m.start.row>r)break;m.end.row<r&&(a<m.end.row||a==m.end.row&&s.column<m.end.column)?(m.end.row=a,m.end.column=s.column):m.end.row==r?m.end.column<=o.column?(y||m.end.column>s.column)&&(m.end.column=s.column,m.end.row=s.row):(m.end.column+=L,m.end.row+=y):m.end.row>r&&(m.end.row+=y),m.start.row<r&&(a<m.start.row||a==m.start.row&&s.column<m.start.column)?(m.start.row=a,m.start.column=s.column):m.start.row==r?m.start.column<=o.column?(y||m.start.column>s.column)&&(m.start.column=s.column,m.start.row=s.row):(m.start.column+=L,m.start.row+=y):m.start.row>r&&(m.start.row+=y)}if(y!=0&&i<h)for(;i<h;i++){var m=n[i];m.start.row+=y,m.end.row+=y}},f})();x.prototype.comparePoints=v,u.RangeList=x}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,u,$){var b=this&&this.__extends||(function(){var a=function(r,n){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,h){i.__proto__=h}||function(i,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(i[m]=h[m])},a(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");a(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),v=e("../range_list").RangeList,x=(function(a){b(r,a);function r(n,i){var h=a.call(this)||this;return h.foldLine=null,h.placeholder=i,h.range=n,h.start=n.start,h.end=n.end,h.sameRow=n.start.row==n.end.row,h.subFolds=h.ranges=[],h}return r.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},r.prototype.setFoldLine=function(n){this.foldLine=n,this.subFolds.forEach(function(i){i.setFoldLine(n)})},r.prototype.clone=function(){var n=this.range.clone(),i=new r(n,this.placeholder);return this.subFolds.forEach(function(h){i.subFolds.push(h.clone())}),i.collapseChildren=this.collapseChildren,i},r.prototype.addSubFold=function(n){if(!this.range.isEqual(n)){p(n,this.start);for(var L=n.start.row,T=n.start.column,i=0,h=-1;i<this.subFolds.length&&(h=this.subFolds[i].range.compare(L,T),h==1);i++);var m=this.subFolds[i],y=0;if(h==0){if(m.range.containsRange(n))return m.addSubFold(n);y=1}for(var L=n.range.end.row,T=n.range.end.column,k=i,h=-1;k<this.subFolds.length&&(h=this.subFolds[k].range.compare(L,T),h==1);k++);h==0&&k++;for(var w=this.subFolds.splice(i,k-i,n),R=h==0?w.length-1:w.length,D=y;D<R;D++)n.addSubFold(w[D]);return n.setFoldLine(this.foldLine),n}},r.prototype.restoreRange=function(n){return o(n,this.start)},r})(v);function f(a,r){a.row-=r.row,a.row==0&&(a.column-=r.column)}function p(a,r){f(a.start,r),f(a.end,r)}function s(a,r){a.row==0&&(a.column+=r.column),a.row+=r.row}function o(a,r){s(a.start,r),s(a.end,r)}u.Fold=x}),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,u,$){var b=e("../range").Range,v=e("./fold_line").FoldLine,x=e("./fold").Fold,f=e("../token_iterator").TokenIterator,p=e("../mouse/mouse_event").MouseEvent;function s(){this.getFoldAt=function(o,a,r){var n=this.getFoldLine(o);if(!n)return null;for(var i=n.folds,h=0;h<i.length;h++){var m=i[h].range;if(m.contains(o,a)){if(r==1&&m.isEnd(o,a)&&!m.isEmpty())continue;if(r==-1&&m.isStart(o,a)&&!m.isEmpty())continue;return i[h]}}},this.getFoldsInRange=function(o){var a=o.start,r=o.end,n=this.$foldData,i=[];a.column+=1,r.column-=1;for(var h=0;h<n.length;h++){var m=n[h].range.compareRange(o);if(m!=2){if(m==-2)break;for(var y=n[h].folds,L=0;L<y.length;L++){var T=y[L];if(m=T.range.compareRange(o),m==-2)break;if(m==2)continue;if(m==42)break;i.push(T)}}}return a.column-=1,r.column+=1,i},this.getFoldsInRangeList=function(o){if(Array.isArray(o)){var a=[];o.forEach(function(r){a=a.concat(this.getFoldsInRange(r))},this)}else var a=this.getFoldsInRange(o);return a},this.getAllFolds=function(){for(var o=[],a=this.$foldData,r=0;r<a.length;r++)for(var n=0;n<a[r].folds.length;n++)o.push(a[r].folds[n]);return o},this.getFoldStringAt=function(o,a,r,n){if(n=n||this.getFoldLine(o),!n)return null;for(var i={end:{column:0}},h,m,y=0;y<n.folds.length;y++){m=n.folds[y];var L=m.range.compareEnd(o,a);if(L==-1){h=this.getLine(m.start.row).substring(i.end.column,m.start.column);break}else if(L===0)return null;i=m}return h||(h=this.getLine(m.start.row).substring(i.end.column)),r==-1?h.substring(0,a-i.end.column):r==1?h.substring(a-i.end.column):h},this.getFoldLine=function(o,a){var r=this.$foldData,n=0;for(a&&(n=r.indexOf(a)),n==-1&&(n=0),n;n<r.length;n++){var i=r[n];if(i.start.row<=o&&i.end.row>=o)return i;if(i.end.row>o)return null}return null},this.getNextFoldLine=function(o,a){var r=this.$foldData,n=0;for(a&&(n=r.indexOf(a)),n==-1&&(n=0),n;n<r.length;n++){var i=r[n];if(i.end.row>=o)return i}return null},this.getFoldedRowCount=function(o,a){for(var r=this.$foldData,n=a-o+1,i=0;i<r.length;i++){var h=r[i],m=h.end.row,y=h.start.row;if(m>=a){y<a&&(y>=o?n-=a-y:n=0);break}else m>=o&&(y>=o?n-=m-y:n-=m-o+1)}return n},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(a,r){return a.start.row-r.start.row}),o},this.addFold=function(o,a){var r=this.$foldData,n=!1,i;o instanceof x?i=o:(i=new x(a,o),i.collapseChildren=a.collapseChildren),this.$clipRangeToDocument(i.range);var h=i.start.row,m=i.start.column,y=i.end.row,L=i.end.column,T=this.getFoldAt(h,m,1),k=this.getFoldAt(y,L,-1);if(T&&k==T)return T.addSubFold(i);T&&!T.range.isStart(h,m)&&this.removeFold(T),k&&!k.range.isEnd(y,L)&&this.removeFold(k);var w=this.getFoldsInRange(i.range);w.length>0&&(this.removeFolds(w),i.collapseChildren||w.forEach(function(E){i.addSubFold(E)}));for(var R=0;R<r.length;R++){var D=r[R];if(y==D.start.row){D.addFold(i),n=!0;break}else if(h==D.end.row){if(D.addFold(i),n=!0,!i.sameRow){var I=r[R+1];if(I&&I.start.row==y){D.merge(I);break}}break}else if(y<=D.start.row)break}return n||(D=this.$addFoldLine(new v(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(D.start.row,D.start.row):this.$updateRowLengthCache(D.start.row,D.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(o){o.forEach(function(a){this.addFold(a)},this)},this.removeFold=function(o){var a=o.foldLine,r=a.start.row,n=a.end.row,i=this.$foldData,h=a.folds;if(h.length==1)i.splice(i.indexOf(a),1);else if(a.range.isEnd(o.end.row,o.end.column))h.pop(),a.end.row=h[h.length-1].end.row,a.end.column=h[h.length-1].end.column;else if(a.range.isStart(o.start.row,o.start.column))h.shift(),a.start.row=h[0].start.row,a.start.column=h[0].start.column;else if(o.sameRow)h.splice(h.indexOf(o),1);else{var m=a.split(o.start.row,o.start.column);h=m.folds,h.shift(),m.start.row=h[0].start.row,m.start.column=h[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(r,n):this.$updateRowLengthCache(r,n)),this.$modified=!0,this._signal("changeFold",{data:o,action:"remove"})},this.removeFolds=function(o){for(var a=[],r=0;r<o.length;r++)a.push(o[r]);a.forEach(function(n){this.removeFold(n)},this),this.$modified=!0},this.expandFold=function(o){this.removeFold(o),o.subFolds.forEach(function(a){o.restoreRange(a),this.addFold(a)},this),o.collapseChildren>0&&this.foldAll(o.start.row+1,o.end.row,o.collapseChildren-1),o.subFolds=[]},this.expandFolds=function(o){o.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(o,a){var r,n;if(o==null)r=new b(0,0,this.getLength(),0),a==null&&(a=!0);else if(typeof o=="number")r=new b(o,0,o,this.getLine(o).length);else if("row"in o)r=b.fromPoints(o,o);else{if(Array.isArray(o))return n=[],o.forEach(function(h){n=n.concat(this.unfold(h))},this),n;r=o}n=this.getFoldsInRangeList(r);for(var i=n;n.length==1&&b.comparePoints(n[0].start,r.start)<0&&b.comparePoints(n[0].end,r.end)>0;)this.expandFolds(n),n=this.getFoldsInRangeList(r);if(a!=!1?this.removeFolds(n):this.expandFolds(n),i.length)return i},this.isRowFolded=function(o,a){return!!this.getFoldLine(o,a)},this.getRowFoldEnd=function(o,a){var r=this.getFoldLine(o,a);return r?r.end.row:o},this.getRowFoldStart=function(o,a){var r=this.getFoldLine(o,a);return r?r.start.row:o},this.getFoldDisplayLine=function(o,a,r,n,i){n==null&&(n=o.start.row),i==null&&(i=0),a==null&&(a=o.end.row),r==null&&(r=this.getLine(a).length);var h=this.doc,m="";return o.walk(function(y,L,T,k){if(!(L<n)){if(L==n){if(T<i)return;k=Math.max(i,k)}y!=null?m+=y:m+=h.getLine(L).substring(k,T)}},a,r),m},this.getDisplayLine=function(o,a,r,n){var i=this.getFoldLine(o);if(i)return this.getFoldDisplayLine(i,o,a,r,n);var h;return h=this.doc.getLine(o),h.substring(n||0,a||h.length)},this.$cloneFoldData=function(){var o=[];return o=this.$foldData.map(function(a){var r=a.folds.map(function(n){return n.clone()});return new v(o,r)}),o},this.toggleFold=function(o){var a=this.selection,r=a.getRange(),n,i;if(r.isEmpty()){var h=r.start;if(n=this.getFoldAt(h.row,h.column),n){this.expandFold(n);return}else if(o){var m=this.getFoldLine(h.row);m&&this.expandFolds(m.folds);return}else(i=this.findMatchingBracket(h))?r.comparePoint(i)==1?r.end=i:(r.start=i,r.start.column++,r.end.column--):(i=this.findMatchingBracket({row:h.row,column:h.column+1}))?(r.comparePoint(i)==1?r.end=i:r.start=i,r.start.column++):r=this.getCommentFoldRange(h.row,h.column)||r}else{var y=this.getFoldsInRange(r);if(o&&y.length){this.expandFolds(y);return}else y.length==1&&(n=y[0])}if(n||(n=this.getFoldAt(r.start.row,r.start.column)),n&&n.range.toString()==r.toString()){this.expandFold(n);return}var L="...";if(!r.isMultiLine()){if(L=this.getTextRange(r),L.length<4)return;L=L.trim().substring(0,2)+".."}this.addFold(L,r)},this.getCommentFoldRange=function(o,a,r){var n=new f(this,o,a),i=n.getCurrentToken(),h=i&&i.type;if(i&&/^comment|string/.test(h)){h=h.match(/comment|string/)[0],h=="comment"&&(h+="|doc-start|\\.doc");var m=new RegExp(h),y=new b;if(r!=1){do i=n.stepBackward();while(i&&m.test(i.type));i=n.stepForward()}y.start.row=n.getCurrentTokenRow(),y.start.column=n.getCurrentTokenColumn()+i.value.length,n=new f(this,o,a);var L=this.getState(n.$row);if(r!=-1){var T=-1;do if(i=n.stepForward(),T==-1){var k=this.getState(n.$row);L.toString()!==k.toString()&&(T=n.$row)}else if(n.$row>T)break;while(i&&m.test(i.type));i=n.stepBackward()}else i=n.getCurrentToken();return y.end.row=n.getCurrentTokenRow(),y.end.column=n.getCurrentTokenColumn(),y.start.row==y.end.row&&y.start.column>y.end.column?void 0:y}},this.foldAll=function(o,a,r,n){r==null&&(r=1e5);var i=this.foldWidgets;if(i){a=a||this.getLength(),o=o||0;for(var h=o;h<a;h++)if(i[h]==null&&(i[h]=this.getFoldWidget(h)),i[h]=="start"&&!(n&&!n(h))){var m=this.getFoldWidgetRange(h);m&&m.isMultiLine()&&m.end.row<=a&&m.start.row>=o&&(h=m.end.row,m.collapseChildren=r,this.addFold("...",m))}}},this.foldToLevel=function(o){for(this.foldAll();o-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var o=this;this.foldAll(null,null,null,function(a){for(var r=o.getTokens(a),n=0;n<r.length;n++){var i=r[n];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(o){if(!this.$foldStyles[o])throw new Error("invalid fold style: "+o+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=o){this.$foldStyle=o,o=="manual"&&this.unfold();var a=this.$foldMode;this.$setFolding(null),this.$setFolding(a)}},this.$setFolding=function(o){if(this.$foldMode!=o){if(this.$foldMode=o,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!o||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=o.getFoldWidget.bind(o,this,this.$foldStyle),this.getFoldWidgetRange=o.getFoldWidgetRange.bind(o,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(o,a){var r=this.foldWidgets;if(!r||a&&r[o])return{};for(var n=o-1,i;n>=0;){var h=r[n];if(h==null&&(h=r[n]=this.getFoldWidget(n)),h=="start"){var m=this.getFoldWidgetRange(n);if(i||(i=m),m&&m.end.row>=o)break}n--}return{range:n!==-1&&m,firstRange:i}},this.onFoldWidgetClick=function(o,a){a instanceof p&&(a=a.domEvent);var r={children:a.shiftKey,all:a.ctrlKey||a.metaKey,siblings:a.altKey},n=this.$toggleFoldWidget(o,r);if(!n){var i=a.target||a.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,a){if(this.getFoldWidget){var r=this.getFoldWidget(o),n=this.getLine(o),i=r==="end"?-1:1,h=this.getFoldAt(o,i===-1?0:n.length,i);if(h)return a.children||a.all?this.removeFold(h):this.expandFold(h),h;var m=this.getFoldWidgetRange(o,!0);if(m&&!m.isMultiLine()&&(h=this.getFoldAt(m.start.row,m.start.column,1),h&&m.isEqual(h.range)))return this.removeFold(h),h;if(a.siblings){var y=this.getParentFoldRangeData(o);if(y.range)var L=y.range.start.row+1,T=y.range.end.row;this.foldAll(L,T,a.all?1e4:0)}else a.children?(T=m?m.end.row:this.getLength(),this.foldAll(o+1,T,a.all?1e4:0)):m&&(a.all&&(m.collapseChildren=1e4),this.addFold("...",m));return m}},this.toggleFoldWidget=function(o){var a=this.selection.getCursor().row;a=this.getRowFoldStart(a);var r=this.$toggleFoldWidget(a,{});if(!r){var n=this.getParentFoldRangeData(a,!0);if(r=n.range||n.firstRange,r){a=r.start.row;var i=this.getFoldAt(a,this.getLine(a).length,1);i?this.removeFold(i):this.addFold("...",r)}}},this.updateFoldWidgets=function(o){var a=o.start.row,r=o.end.row-a;if(r===0)this.foldWidgets[a]=null;else if(o.action=="remove")this.foldWidgets.splice(a,r+1,null);else{var n=Array(r+1);n.unshift(a,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},this.tokenizerUpdateFoldWidgets=function(o){var a=o.data;a.first!=a.last&&this.foldWidgets.length>a.first&&this.foldWidgets.splice(a.first,this.foldWidgets.length)}}u.Folding=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,u,$){var b=e("../token_iterator").TokenIterator,v=e("../range").Range;function x(){this.findMatchingBracket=function(f,p){if(f.column==0)return null;var s=p||this.getLine(f.row).charAt(f.column-1);if(s=="")return null;var o=s.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],f):this.$findOpeningBracket(o[2],f):null},this.getBracketRange=function(f){var p=this.getLine(f.row),s=!0,o,a=p.charAt(f.column-1),r=a&&a.match(/([\(\[\{])|([\)\]\}])/);if(r||(a=p.charAt(f.column),f={row:f.row,column:f.column+1},r=a&&a.match(/([\(\[\{])|([\)\]\}])/),s=!1),!r)return null;if(r[1]){var n=this.$findClosingBracket(r[1],f);if(!n)return null;o=v.fromPoints(f,n),s||(o.end.column++,o.start.column--),o.cursor=o.end}else{var n=this.$findOpeningBracket(r[2],f);if(!n)return null;o=v.fromPoints(n,f),s||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(f,p){var s=this.getLine(f.row),o=/([\(\[\{])|([\)\]\}])/,a=!p&&s.charAt(f.column-1),r=a&&a.match(o);if(r||(a=(p===void 0||p)&&s.charAt(f.column),f={row:f.row,column:f.column+1},r=a&&a.match(o)),!r)return null;var n=new v(f.row,f.column-1,f.row,f.column),i=r[1]?this.$findClosingBracket(r[1],f):this.$findOpeningBracket(r[2],f);if(!i)return[n];var h=new v(i.row,i.column,i.row,i.column+1);return[n,h]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(f,p,s){var o=this.$brackets[f],a=1,r=new b(this,p.row,p.column),n=r.getCurrentToken();if(n||(n=r.stepForward()),!!n){s||(s=new RegExp("(\\.?"+n.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var i=p.column-r.getCurrentTokenColumn()-2,h=n.value;;){for(;i>=0;){var m=h.charAt(i);if(m==o){if(a-=1,a==0)return{row:r.getCurrentTokenRow(),column:i+r.getCurrentTokenColumn()}}else m==f&&(a+=1);i-=1}do n=r.stepBackward();while(n&&!s.test(n.type));if(n==null)break;h=n.value,i=h.length-1}return null}},this.$findClosingBracket=function(f,p,s){var o=this.$brackets[f],a=1,r=new b(this,p.row,p.column),n=r.getCurrentToken();if(n||(n=r.stepForward()),!!n){s||(s=new RegExp("(\\.?"+n.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var i=p.column-r.getCurrentTokenColumn();;){for(var h=n.value,m=h.length;i<m;){var y=h.charAt(i);if(y==o){if(a-=1,a==0)return{row:r.getCurrentTokenRow(),column:i+r.getCurrentTokenColumn()}}else y==f&&(a+=1);i+=1}do n=r.stepForward();while(n&&!s.test(n.type));if(n==null)break;i=0}return null}},this.getMatchingTags=function(f){var p=new b(this,f.row,f.column),s=this.$findTagName(p);if(s){var o=p.stepBackward();return o.value==="<"?this.$findClosingTag(p,s):this.$findOpeningTag(p,s)}},this.$findTagName=function(f){var p=f.getCurrentToken(),s=!1,o=!1;if(p&&p.type.indexOf("tag-name")===-1)do o?p=f.stepBackward():p=f.stepForward(),p&&(p.value==="/>"?o=!0:p.type.indexOf("tag-name")!==-1&&(s=!0));while(p&&!s);return p},this.$findClosingTag=function(f,p){var s,o=p.value,a=p.value,r=0,n=new v(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1);p=f.stepForward();var i=new v(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+p.value.length),h=!1;do{if(s=p,s.type.indexOf("tag-close")!==-1&&!h){var m=new v(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1);h=!0}if(p=f.stepForward(),p){if(p.value===">"&&!h){var m=new v(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1);h=!0}if(p.type.indexOf("tag-name")!==-1){if(o=p.value,a===o){if(s.value==="<")r++;else if(s.value==="</"&&(r--,r<0)){f.stepBackward();var y=new v(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+2);p=f.stepForward();var L=new v(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+p.value.length);if(p.type.indexOf("tag-close")===-1&&(p=f.stepForward()),p&&p.value===">")var T=new v(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1);else return}}}else if(a===o&&p.value==="/>"&&(r--,r<0))var y=new v(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+2),L=y,T=L,m=new v(i.end.row,i.end.column,i.end.row,i.end.column+1)}}while(p&&r>=0);if(n&&m&&y&&T&&i&&L)return{openTag:new v(n.start.row,n.start.column,m.end.row,m.end.column),closeTag:new v(y.start.row,y.start.column,T.end.row,T.end.column),openTagName:i,closeTagName:L}},this.$findOpeningTag=function(f,p){var s=f.getCurrentToken(),o=p.value,a=0,r=f.getCurrentTokenRow(),n=f.getCurrentTokenColumn(),i=n+2,h=new v(r,n,r,i);f.stepForward();var m=new v(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+p.value.length);if(p.type.indexOf("tag-close")===-1&&(p=f.stepForward()),!(!p||p.value!==">")){var y=new v(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1);f.stepBackward(),f.stepBackward();do if(p=s,r=f.getCurrentTokenRow(),n=f.getCurrentTokenColumn(),i=n+p.value.length,s=f.stepBackward(),p){if(p.type.indexOf("tag-name")!==-1){if(o===p.value)if(s.value==="<"){if(a++,a>0){var L=new v(r,n,r,i),T=new v(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1);do p=f.stepForward();while(p&&p.value!==">");var k=new v(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1)}}else s.value==="</"&&a--}else if(p.value==="/>"){for(var w=0,R=s;R;){if(R.type.indexOf("tag-name")!==-1&&R.value===o){a--;break}else if(R.value==="<")break;R=f.stepBackward(),w++}for(var D=0;D<w;D++)f.stepForward()}}while(s&&a<=0);if(T&&k&&h&&y&&L&&m)return{openTag:new v(T.start.row,T.start.column,k.end.row,k.end.column),closeTag:new v(h.start.row,h.start.column,y.end.row,y.end.column),openTagName:L,closeTagName:m}}}}u.BracketMatch=x}),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,u,$){var b=e("./lib/oop"),v=e("./lib/lang"),x=e("./bidihandler").BidiHandler,f=e("./config"),p=e("./lib/event_emitter").EventEmitter,s=e("./selection").Selection,o=e("./mode/text").Mode,a=e("./range").Range,r=e("./line_widgets").LineWidgets,n=e("./document").Document,i=e("./background_tokenizer").BackgroundTokenizer,h=e("./search_highlight").SearchHighlight,m=e("./undomanager").UndoManager,y=(function(){function F(O,_){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"+ ++F.$uid,this.$foldData.toString=function(){return this.join(`
191
- `)},this.$gutterCustomWidgets={},this.bgTokenizer=new i(new o().getTokenizer(),this);var S=this;this.bgTokenizer.on("update",function(N){S._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new n(O)),this.setDocument(O),this.selection=new s(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new x(this),f.resetOptions(this),this.setMode(_),f._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return F.prototype.$initOperationListeners=function(){var O=this;this.curOp=null,this.on("change",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.docChanged=!0},!0),this.on("changeSelection",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.selectionChanged=!0},!0),this.$operationResetTimer=v.delayedCall(this.endOperation.bind(this,!0))},F.prototype.startOperation=function(O){if(this.curOp){if(!O||this.curOp.command)return;this.prevOp=this.curOp}O||(O={}),this.$operationResetTimer.schedule(),this.curOp={command:O.command||{},args:O.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",O)},F.prototype.endOperation=function(O){if(this.curOp){if(O&&O.returnValue===!1){this.curOp=null,this._signal("endOperation",O);return}if(O==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var _=this.selection.toJSON();this.curOp.selectionAfter=_,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(_),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",O)}},F.prototype.setDocument=function(O){this.doc&&this.doc.off("change",this.$onChange),this.doc=O,O.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},F.prototype.getDocument=function(){return this.doc},Object.defineProperty(F.prototype,"widgetManager",{get:function(){var O=new r(this);return this.widgetManager=O,this.$editor&&O.attach(this.$editor),O},set:function(O){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:O})},enumerable:!1,configurable:!0}),F.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var _=this.$docRowCache.length,S=this.$getRowCacheIndex(this.$docRowCache,O)+1;_>S&&(this.$docRowCache.splice(S,_),this.$screenRowCache.splice(S,_))},F.prototype.$getRowCacheIndex=function(O,_){for(var S=0,N=O.length-1;S<=N;){var W=S+N>>1,V=O[W];if(_>V)S=W+1;else if(_<V)N=W-1;else return W}return S-1},F.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},F.prototype.onChangeFold=function(O){var _=O.data;this.$resetRowCache(_.start.row)},F.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var _=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(_&&_.length&&(this.$undoManager.add({action:"removeFolds",folds:_},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(O,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(O),this._signal("change",O)},F.prototype.onSelectionChange=function(){this._signal("changeSelection")},F.prototype.setValue=function(O){this.doc.setValue(O),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},F.fromJSON=function(O){typeof O=="string"&&(O=JSON.parse(O));var _=new m;_.$undoStack=O.history.undo,_.$redoStack=O.history.redo,_.mark=O.history.mark,_.$rev=O.history.rev;var S=new F(O.value);return O.folds.forEach(function(N){S.addFold("...",a.fromPoints(N.start,N.end))}),S.setAnnotations(O.annotations),S.setBreakpoints(O.breakpoints),S.setMode(O.mode),S.setScrollLeft(O.scrollLeft),S.setScrollTop(O.scrollTop),S.setUndoManager(_),S.selection.fromJSON(O.selection),S},F.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(O){return O.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},F.prototype.toString=function(){return this.doc.getValue()},F.prototype.getSelection=function(){return this.selection},F.prototype.getState=function(O){return this.bgTokenizer.getState(O)},F.prototype.getTokens=function(O){return this.bgTokenizer.getTokens(O)},F.prototype.getTokenAt=function(O,_){var S=this.bgTokenizer.getTokens(O),N,W=0;if(_==null){var V=S.length-1;W=this.getLine(O).length}else for(var V=0;V<S.length&&(W+=S[V].value.length,!(W>=_));V++);return N=S[V],N?(N.index=V,N.start=W-N.value.length,N):null},F.prototype.setUndoManager=function(O){if(this.$undoManager=O,this.$informUndoManager&&this.$informUndoManager.cancel(),O){var _=this;O.addSession(this),this.$syncInformUndoManager=function(){_.$informUndoManager.cancel(),_.mergeUndoDeltas=!1},this.$informUndoManager=v.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},F.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},F.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},F.prototype.getTabString=function(){return this.getUseSoftTabs()?v.stringRepeat(" ",this.getTabSize()):" "},F.prototype.setUseSoftTabs=function(O){this.setOption("useSoftTabs",O)},F.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},F.prototype.setTabSize=function(O){this.setOption("tabSize",O)},F.prototype.getTabSize=function(){return this.$tabSize},F.prototype.isTabStop=function(O){return this.$useSoftTabs&&O.column%this.$tabSize===0},F.prototype.setNavigateWithinSoftTabs=function(O){this.setOption("navigateWithinSoftTabs",O)},F.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},F.prototype.setOverwrite=function(O){this.setOption("overwrite",O)},F.prototype.getOverwrite=function(){return this.$overwrite},F.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},F.prototype.addGutterDecoration=function(O,_){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+_,this._signal("changeBreakpoint",{})},F.prototype.removeGutterCustomWidget=function(O){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(O)},F.prototype.addGutterCustomWidget=function(O,_){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(O,_)},F.prototype.removeGutterDecoration=function(O,_){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+_,""),this._signal("changeBreakpoint",{})},F.prototype.getBreakpoints=function(){return this.$breakpoints},F.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var _=0;_<O.length;_++)this.$breakpoints[O[_]]="ace_breakpoint";this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},F.prototype.setBreakpoint=function(O,_){_===void 0&&(_="ace_breakpoint"),_?this.$breakpoints[O]=_:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},F.prototype.addMarker=function(O,_,S,N){var W=this.$markerId++,V={range:O,type:S||"line",renderer:typeof S=="function"?S:null,clazz:_,inFront:!!N,id:W};return N?(this.$frontMarkers[W]=V,this._signal("changeFrontMarker")):(this.$backMarkers[W]=V,this._signal("changeBackMarker")),W},F.prototype.addDynamicMarker=function(O,_){if(O.update){var S=this.$markerId++;return O.id=S,O.inFront=!!_,_?(this.$frontMarkers[S]=O,this._signal("changeFrontMarker")):(this.$backMarkers[S]=O,this._signal("changeBackMarker")),O}},F.prototype.removeMarker=function(O){var _=this.$frontMarkers[O]||this.$backMarkers[O];if(_){var S=_.inFront?this.$frontMarkers:this.$backMarkers;delete S[O],this._signal(_.inFront?"changeFrontMarker":"changeBackMarker")}},F.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},F.prototype.highlight=function(O){if(!this.$searchHighlight){var _=new h(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(_)}this.$searchHighlight.setRegexp(O)},F.prototype.highlightLines=function(O,_,S,N){typeof _!="number"&&(S=_,_=O),S||(S="ace_step");var W=new a(O,0,_,1/0);return W.id=this.addMarker(W,S,"fullLine",N),W},F.prototype.setAnnotations=function(O){this.$annotations=O,this._signal("changeAnnotation",{})},F.prototype.getAnnotations=function(){return this.$annotations||[]},F.prototype.clearAnnotations=function(){this.setAnnotations([])},F.prototype.$detectNewLine=function(O){var _=O.match(/^.*?(\r?\n)/m);_?this.$autoNewLine=_[1]:this.$autoNewLine=`
192
- `},F.prototype.getWordRange=function(O,_){var S=this.getLine(O),N=!1;if(_>0&&(N=!!S.charAt(_-1).match(this.tokenRe)),N||(N=!!S.charAt(_).match(this.tokenRe)),N)var W=this.tokenRe;else if(/^\s+$/.test(S.slice(_-1,_+1)))var W=/\s/;else var W=this.nonTokenRe;var V=_;if(V>0){do V--;while(V>=0&&S.charAt(V).match(W));V++}for(var G=_;G<S.length&&S.charAt(G).match(W);)G++;return new a(O,V,O,G)},F.prototype.getAWordRange=function(O,_){for(var S=this.getWordRange(O,_),N=this.getLine(S.end.row);N.charAt(S.end.column).match(/[ \t]/);)S.end.column+=1;return S},F.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},F.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},F.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},F.prototype.getUseWorker=function(){return this.$useWorker},F.prototype.onReloadTokenizer=function(O){var _=O.data;this.bgTokenizer.start(_.first),this._signal("tokenizerUpdate",O)},F.prototype.setMode=function(O,_){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var S=O,N=S.path}else N=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[N]&&!S){this.$onChangeMode(this.$modes[N]),_&&_();return}this.$modeId=N,f.loadModule(["mode",N],(function(W){if(!this.destroyed){if(this.$modeId!==N)return _&&_();this.$modes[N]&&!S?this.$onChangeMode(this.$modes[N]):W&&W.Mode&&(W=new W.Mode(S),S||(this.$modes[N]=W,W.$id=N),this.$onChangeMode(W)),_&&_()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},F.prototype.$onChangeMode=function(O,_){if(_||(this.$modeId=O.$id),this.$mode!==O){var S=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var N=O.getTokenizer();if(N.on!==void 0){var W=this.onReloadTokenizer.bind(this);N.on("update",W)}this.bgTokenizer.setTokenizer(N),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=O.tokenRe,this.nonTokenRe=O.nonTokenRe,_||(O.attachToSession&&O.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(O.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:S,mode:O}))}},F.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},F.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){f.warn("Could not load worker",O),this.$worker=null}},F.prototype.getMode=function(){return this.$mode},F.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},F.prototype.getScrollTop=function(){return this.$scrollTop},F.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},F.prototype.getScrollLeft=function(){return this.$scrollLeft},F.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},F.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var O=0;return this.lineWidgets.forEach(function(_){_&&_.screenWidth>O&&(O=_.screenWidth)}),this.lineWidgetWidth=O},F.prototype.$computeWidth=function(O){if(this.$modified||O){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var _=this.doc.getAllLines(),S=this.$rowLengthCache,N=0,W=0,V=this.$foldData[W],G=V?V.start.row:1/0,Q=_.length,te=0;te<Q;te++){if(te>G){if(te=V.end.row+1,te>=Q)break;V=this.$foldData[W++],G=V?V.start.row:1/0}S[te]==null&&(S[te]=this.$getStringScreenWidth(_[te])[0]),S[te]>N&&(N=S[te])}this.screenWidth=N}},F.prototype.getLine=function(O){return this.doc.getLine(O)},F.prototype.getLines=function(O,_){return this.doc.getLines(O,_)},F.prototype.getLength=function(){return this.doc.getLength()},F.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},F.prototype.insert=function(O,_){return this.doc.insert(O,_)},F.prototype.remove=function(O){return this.doc.remove(O)},F.prototype.removeFullLines=function(O,_){return this.doc.removeFullLines(O,_)},F.prototype.undoChanges=function(O,_){if(O.length){this.$fromUndo=!0;for(var S=O.length-1;S!=-1;S--){var N=O[S];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!_&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},F.prototype.redoChanges=function(O,_){if(O.length){this.$fromUndo=!0;for(var S=0;S<O.length;S++){var N=O[S];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!_&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},F.prototype.setUndoSelect=function(O){this.$undoSelect=O},F.prototype.$getUndoSelection=function(O,_){function S(Q){return _?Q.action!=="insert":Q.action==="insert"}for(var N,W,V=0;V<O.length;V++){var G=O[V];if(G.start){if(!N){S(G)?N=a.fromPoints(G.start,G.end):N=a.fromPoints(G.start,G.start);continue}S(G)?(W=G.start,N.compare(W.row,W.column)==-1&&N.setStart(W),W=G.end,N.compare(W.row,W.column)==1&&N.setEnd(W)):(W=G.start,N.compare(W.row,W.column)==-1&&(N=a.fromPoints(G.start,G.start)))}}return N},F.prototype.replace=function(O,_){return this.doc.replace(O,_)},F.prototype.moveText=function(O,_,S){var N=this.getTextRange(O),W=this.getFoldsInRange(O),V=a.fromPoints(_,_);if(!S){this.remove(O);var G=O.start.row-O.end.row,Q=G?-O.end.column:O.start.column-O.end.column;Q&&(V.start.row==O.end.row&&V.start.column>O.end.column&&(V.start.column+=Q),V.end.row==O.end.row&&V.end.column>O.end.column&&(V.end.column+=Q)),G&&V.start.row>=O.end.row&&(V.start.row+=G,V.end.row+=G)}if(V.end=this.insert(V.start,N),W.length){var te=O.start,ce=V.start,G=ce.row-te.row,Q=ce.column-te.column;this.addFolds(W.map(function(ue){return ue=ue.clone(),ue.start.row==te.row&&(ue.start.column+=Q),ue.end.row==te.row&&(ue.end.column+=Q),ue.start.row+=G,ue.end.row+=G,ue}))}return V},F.prototype.indentRows=function(O,_,S){S=S.replace(/\t/g,this.getTabString());for(var N=O;N<=_;N++)this.doc.insertInLine({row:N,column:0},S)},F.prototype.outdentRows=function(O){for(var _=O.collapseRows(),S=new a(0,0,0,0),N=this.getTabSize(),W=_.start.row;W<=_.end.row;++W){var V=this.getLine(W);S.start.row=W,S.end.row=W;for(var G=0;G<N&&V.charAt(G)==" ";++G);G<N&&V.charAt(G)==" "?(S.start.column=G,S.end.column=G+1):(S.start.column=0,S.end.column=G),this.remove(S)}},F.prototype.$moveLines=function(O,_,S){if(O=this.getRowFoldStart(O),_=this.getRowFoldEnd(_),S<0){var N=this.getRowFoldStart(O+S);if(N<0)return 0;var W=N-O}else if(S>0){var N=this.getRowFoldEnd(_+S);if(N>this.doc.getLength()-1)return 0;var W=N-_}else{O=this.$clipRowToDocument(O),_=this.$clipRowToDocument(_);var W=_-O+1}var V=new a(O,0,_,Number.MAX_VALUE),G=this.getFoldsInRange(V).map(function(te){return te=te.clone(),te.start.row+=W,te.end.row+=W,te}),Q=S==0?this.doc.getLines(O,_):this.doc.removeFullLines(O,_);return this.doc.insertFullLines(O+W,Q),G.length&&this.addFolds(G),W},F.prototype.moveLinesUp=function(O,_){return this.$moveLines(O,_,-1)},F.prototype.moveLinesDown=function(O,_){return this.$moveLines(O,_,1)},F.prototype.duplicateLines=function(O,_){return this.$moveLines(O,_,0)},F.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},F.prototype.$clipColumnToRow=function(O,_){return _<0?0:Math.min(this.doc.getLine(O).length,_)},F.prototype.$clipPositionToDocument=function(O,_){if(_=Math.max(0,_),O<0)O=0,_=0;else{var S=this.doc.getLength();O>=S?(O=S-1,_=this.doc.getLine(S-1).length):_=Math.min(this.doc.getLine(O).length,_)}return{row:O,column:_}},F.prototype.$clipRangeToDocument=function(O){O.start.row<0?(O.start.row=0,O.start.column=0):O.start.column=this.$clipColumnToRow(O.start.row,O.start.column);var _=this.doc.getLength()-1;return O.end.row>_?(O.end.row=_,O.end.column=this.doc.getLine(_).length):O.end.column=this.$clipColumnToRow(O.end.row,O.end.column),O},F.prototype.setUseWrapMode=function(O){if(O!=this.$useWrapMode){if(this.$useWrapMode=O,this.$modified=!0,this.$resetRowCache(0),O){var _=this.getLength();this.$wrapData=Array(_),this.$updateWrapData(0,_-1)}this._signal("changeWrapMode")}},F.prototype.getUseWrapMode=function(){return this.$useWrapMode},F.prototype.setWrapLimitRange=function(O,_){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==_)&&(this.$wrapLimitRange={min:O,max:_},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},F.prototype.adjustWrapLimit=function(O,_){var S=this.$wrapLimitRange;S.max<0&&(S={min:_,max:_});var N=this.$constrainWrapLimit(O,S.min,S.max);return N!=this.$wrapLimit&&N>1?(this.$wrapLimit=N,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},F.prototype.$constrainWrapLimit=function(O,_,S){return _&&(O=Math.max(_,O)),S&&(O=Math.min(S,O)),O},F.prototype.getWrapLimit=function(){return this.$wrapLimit},F.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},F.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},F.prototype.$updateInternalDataOnChange=function(O){var _=this.$useWrapMode,S=O.action,N=O.start,W=O.end,V=N.row,G=W.row,Q=G-V,te=null;if(this.$updating=!0,Q!=0)if(S==="remove"){this[_?"$wrapData":"$rowLengthCache"].splice(V,Q);var ce=this.$foldData;te=this.getFoldsInRange(O),this.removeFolds(te);var ne=this.getFoldLine(W.row),he=0;if(ne){ne.addRemoveChars(W.row,W.column,N.column-W.column),ne.shiftRow(-Q);var ue=this.getFoldLine(V);ue&&ue!==ne&&(ue.merge(ne),ne=ue),he=ce.indexOf(ne)+1}for(he;he<ce.length;he++){var ne=ce[he];ne.start.row>=W.row&&ne.shiftRow(-Q)}G=V}else{var le=Array(Q);le.unshift(V,0);var me=_?this.$wrapData:this.$rowLengthCache;me.splice.apply(me,le);var ce=this.$foldData,ne=this.getFoldLine(V),he=0;if(ne){var _e=ne.range.compareInside(N.row,N.column);_e==0?(ne=ne.split(N.row,N.column),ne&&(ne.shiftRow(Q),ne.addRemoveChars(G,0,W.column-N.column))):_e==-1&&(ne.addRemoveChars(V,0,W.column-N.column),ne.shiftRow(Q)),he=ce.indexOf(ne)+1}for(he;he<ce.length;he++){var ne=ce[he];ne.start.row>=V&&ne.shiftRow(Q)}}else{Q=Math.abs(O.start.column-O.end.column),S==="remove"&&(te=this.getFoldsInRange(O),this.removeFolds(te),Q=-Q);var ne=this.getFoldLine(V);ne&&ne.addRemoveChars(V,N.column,Q)}return _&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,_?this.$updateWrapData(V,G):this.$updateRowLengthCache(V,G),te},F.prototype.$updateRowLengthCache=function(O,_){this.$rowLengthCache[O]=null,this.$rowLengthCache[_]=null},F.prototype.$updateWrapData=function(O,_){var S=this.doc.getAllLines(),N=this.getTabSize(),W=this.$wrapData,V=this.$wrapLimit,G,Q,te=O;for(_=Math.min(_,S.length-1);te<=_;)Q=this.getFoldLine(te,Q),Q?(G=[],Q.walk((function(ce,ne,he,ue){var le;if(ce!=null){le=this.$getDisplayTokens(ce,G.length),le[0]=k;for(var me=1;me<le.length;me++)le[me]=w}else le=this.$getDisplayTokens(S[ne].substring(ue,he),G.length);G=G.concat(le)}).bind(this),Q.end.row,S[Q.end.row].length+1),W[Q.start.row]=this.$computeWrapSplits(G,V,N),te=Q.end.row+1):(G=this.$getDisplayTokens(S[te]),W[te]=this.$computeWrapSplits(G,V,N),te++)},F.prototype.$computeWrapSplits=function(O,_,S){if(O.length==0)return[];var N=[],W=O.length,V=0,G=0,Q=this.$wrapAsCode,te=this.$indentedSoftWrap,ce=_<=Math.max(2*S,8)||te===!1?0:Math.floor(_/2);function ne(){var _e=0;if(ce===0)return _e;if(te)for(var Ae=0;Ae<O.length;Ae++){var Me=O[Ae];if(Me==D)_e+=1;else if(Me==I)_e+=S;else{if(Me==E)continue;break}}return Q&&te!==!1&&(_e+=S),Math.min(_e,ce)}function he(_e){for(var Ae=_e-V,Me=V;Me<_e;Me++){var qe=O[Me];(qe===12||qe===2)&&(Ae-=1)}N.length||(ue=ne(),N.indent=ue),G+=Ae,N.push(G),V=_e}for(var ue=0;W-V>_-ue;){var le=V+_-ue;if(O[le-1]>=D&&O[le]>=D){he(le);continue}if(O[le]==k||O[le]==w){for(le;le!=V-1&&O[le]!=k;le--);if(le>V){he(le);continue}for(le=V+_,le;le<O.length&&O[le]==w;le++);if(le==O.length)break;he(le);continue}for(var me=Math.max(le-(_-(_>>2)),V-1);le>me&&O[le]<k;)le--;if(Q){for(;le>me&&O[le]<k;)le--;for(;le>me&&O[le]==R;)le--}else for(;le>me&&O[le]<D;)le--;if(le>me){he(++le);continue}le=V+_,O[le]==T&&le--,he(le-ue)}return N},F.prototype.$getDisplayTokens=function(O,_){var S=[],N;_=_||0;for(var W=0;W<O.length;W++){var V=O.charCodeAt(W);if(V==9){N=this.getScreenTabSize(S.length+_),S.push(I);for(var G=1;G<N;G++)S.push(E)}else V==32?S.push(D):V>39&&V<48||V>57&&V<64?S.push(R):V>=4352&&z(V)?S.push(L,T):S.push(L)}return S},F.prototype.$getStringScreenWidth=function(O,_,S){if(_==0)return[0,0];_==null&&(_=1/0),S=S||0;var N,W;for(W=0;W<O.length&&(N=O.charCodeAt(W),N==9?S+=this.getScreenTabSize(S):N>=4352&&z(N)?S+=2:S+=1,!(S>_));W++);return[S,W]},F.prototype.getRowLength=function(O){var _=1;return this.lineWidgets&&(_+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?_:this.$wrapData[O].length+_},F.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},F.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var _=this.screenToDocumentPosition(O,Number.MAX_VALUE),S=this.$wrapData[_.row];return S.length&&S[0]<_.column?S.indent:0}else return 0},F.prototype.getScreenLastRowColumn=function(O){var _=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(_.row,_.column)},F.prototype.getDocumentLastRowColumn=function(O,_){var S=this.documentToScreenRow(O,_);return this.getScreenLastRowColumn(S)},F.prototype.getDocumentLastRowColumnPosition=function(O,_){var S=this.documentToScreenRow(O,_);return this.screenToDocumentPosition(S,Number.MAX_VALUE/10)},F.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},F.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},F.prototype.screenToDocumentRow=function(O,_){return this.screenToDocumentPosition(O,_).row},F.prototype.screenToDocumentColumn=function(O,_){return this.screenToDocumentPosition(O,_).column},F.prototype.screenToDocumentPosition=function(O,_,S){if(O<0)return{row:0,column:0};var N,W=0,V=0,G,Q=0,te=0,ce=this.$screenRowCache,ne=this.$getRowCacheIndex(ce,O),he=ce.length;if(he&&ne>=0)var Q=ce[ne],W=this.$docRowCache[ne],ue=O>ce[he-1];else var ue=!he;for(var le=this.getLength()-1,me=this.getNextFoldLine(W),_e=me?me.start.row:1/0;Q<=O&&(te=this.getRowLength(W),!(Q+te>O||W>=le));)Q+=te,W++,W>_e&&(W=me.end.row+1,me=this.getNextFoldLine(W,me),_e=me?me.start.row:1/0),ue&&(this.$docRowCache.push(W),this.$screenRowCache.push(Q));if(me&&me.start.row<=W)N=this.getFoldDisplayLine(me),W=me.start.row;else{if(Q+te<=O||W>le)return{row:le,column:this.getLine(le).length};N=this.getLine(W),me=null}var Ae=0,Me=Math.floor(O-Q);if(this.$useWrapMode){var qe=this.$wrapData[W];qe&&(G=qe[Me],Me>0&&qe.length&&(Ae=qe.indent,V=qe[Me-1]||qe[qe.length-1],N=N.substring(V)))}return S!==void 0&&this.$bidiHandler.isBidiRow(Q+Me,W,Me)&&(_=this.$bidiHandler.offsetToCol(S)),V+=this.$getStringScreenWidth(N,_-Ae)[1],this.$useWrapMode&&V>=G&&(V=G-1),me?me.idxToPosition(V):{row:W,column:V}},F.prototype.documentToScreenPosition=function(O,_){if(typeof _>"u")var S=this.$clipPositionToDocument(O.row,O.column);else S=this.$clipPositionToDocument(O,_);O=S.row,_=S.column;var N=0,W=null,V=null;V=this.getFoldAt(O,_,1),V&&(O=V.start.row,_=V.start.column);var G,Q=0,te=this.$docRowCache,ce=this.$getRowCacheIndex(te,O),ne=te.length;if(ne&&ce>=0)var Q=te[ce],N=this.$screenRowCache[ce],he=O>te[ne-1];else var he=!ne;for(var ue=this.getNextFoldLine(Q),le=ue?ue.start.row:1/0;Q<O;){if(Q>=le){if(G=ue.end.row+1,G>O)break;ue=this.getNextFoldLine(G,ue),le=ue?ue.start.row:1/0}else G=Q+1;N+=this.getRowLength(Q),Q=G,he&&(this.$docRowCache.push(Q),this.$screenRowCache.push(N))}var me="";ue&&Q>=le?(me=this.getFoldDisplayLine(ue,O,_),W=ue.start.row):(me=this.getLine(O).substring(0,_),W=O);var _e=0;if(this.$useWrapMode){var Ae=this.$wrapData[W];if(Ae){for(var Me=0;me.length>=Ae[Me];)N++,Me++;me=me.substring(Ae[Me-1]||0,me.length),_e=Me>0?Ae.indent:0}}return this.lineWidgets&&this.lineWidgets[Q]&&this.lineWidgets[Q].rowsAbove&&(N+=this.lineWidgets[Q].rowsAbove),{row:N,column:_e+this.$getStringScreenWidth(me)[0]}},F.prototype.documentToScreenColumn=function(O,_){return this.documentToScreenPosition(O,_).column},F.prototype.documentToScreenRow=function(O,_){return this.documentToScreenPosition(O,_).row},F.prototype.getScreenLength=function(){var O=0,_=null;if(this.$useWrapMode)for(var W=this.$wrapData.length,V=0,N=0,_=this.$foldData[N++],G=_?_.start.row:1/0;V<W;){var Q=this.$wrapData[V];O+=Q?Q.length+1:1,V++,V>G&&(V=_.end.row+1,_=this.$foldData[N++],G=_?_.start.row:1/0)}else{O=this.getLength();for(var S=this.$foldData,N=0;N<S.length;N++)_=S[N],O-=_.end.row-_.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},F.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(_,S,N){if(S===0)return[0,0];S||(S=1/0),N=N||0;var W,V;for(V=0;V<_.length&&(W=_.charAt(V),W===" "?N+=this.getScreenTabSize(N):N+=O.getCharacterWidth(W),!(N>S));V++);return[N,V]})},F.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var _=this.getLine(O.row);return _[O.column-1]},F.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!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()},F})();y.$uid=0,y.prototype.$modes=f.$modes,y.prototype.getValue=y.prototype.toString,y.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},y.prototype.$overwrite=!1,y.prototype.$mode=null,y.prototype.$modeId=null,y.prototype.$scrollTop=0,y.prototype.$scrollLeft=0,y.prototype.$wrapLimit=80,y.prototype.$useWrapMode=!1,y.prototype.$wrapLimitRange={min:null,max:null},y.prototype.lineWidgets=null,y.prototype.isFullWidth=z,b.implement(y.prototype,p);var L=1,T=2,k=3,w=4,R=9,D=10,I=11,E=12;function z(F){return F<4352?!1:F>=4352&&F<=4447||F>=4515&&F<=4519||F>=4602&&F<=4607||F>=9001&&F<=9002||F>=11904&&F<=11929||F>=11931&&F<=12019||F>=12032&&F<=12245||F>=12272&&F<=12283||F>=12288&&F<=12350||F>=12353&&F<=12438||F>=12441&&F<=12543||F>=12549&&F<=12589||F>=12593&&F<=12686||F>=12688&&F<=12730||F>=12736&&F<=12771||F>=12784&&F<=12830||F>=12832&&F<=12871||F>=12880&&F<=13054||F>=13056&&F<=19903||F>=19968&&F<=42124||F>=42128&&F<=42182||F>=43360&&F<=43388||F>=44032&&F<=55203||F>=55216&&F<=55238||F>=55243&&F<=55291||F>=63744&&F<=64255||F>=65040&&F<=65049||F>=65072&&F<=65106||F>=65108&&F<=65126||F>=65128&&F<=65131||F>=65281&&F<=65376||F>=65504&&F<=65510}e("./edit_session/folding").Folding.call(y.prototype),e("./edit_session/bracket_match").BracketMatch.call(y.prototype),f.defineOptions(y.prototype,"session",{wrap:{set:function(F){if(!F||F=="off"?F=!1:F=="free"?F=!0:F=="printMargin"?F=-1:typeof F=="string"&&(F=parseInt(F,10)||!1),this.$wrap!=F)if(this.$wrap=F,!F)this.setUseWrapMode(!1);else{var O=typeof F=="number"?F:null;this.setWrapLimitRange(O,O),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(F){F=F=="auto"?this.$mode.type!="text":F!="text",F!=this.$wrapAsCode&&(this.$wrapAsCode=F,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(F){this.$useWorker=F,this.$stopWorker(),F&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(F){F=parseInt(F),F>0&&this.$tabSize!==F&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=F,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(F){this.setFoldStyle(F)},handlesSet:!0},overwrite:{set:function(F){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(F){this.doc.setNewLineMode(F)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(F){this.setMode(F)},get:function(){return this.$modeId},handlesSet:!0}}),u.EditSession=y}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,u,$){var b=e("./lib/lang"),v=e("./lib/oop"),x=e("./range").Range,f=(function(){function a(){this.$options={}}return a.prototype.set=function(r){return v.mixin(this.$options,r),this},a.prototype.getOptions=function(){return b.copyObject(this.$options)},a.prototype.setOptions=function(r){this.$options=r},a.prototype.find=function(r){var n=this.$options,i=this.$matchIterator(r,n);if(!i)return!1;var h=null;return i.forEach(function(m,y,L,T){return h=new x(m,y,L,T),y==T&&n.start&&n.start.start&&n.skipCurrent!=!1&&h.isEqual(n.start)?(h=null,!1):!0}),h},a.prototype.findAll=function(r){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var i=n.range,h=i?r.getLines(i.start.row,i.end.row):r.doc.getAllLines(),m=[],y=n.re;if(n.$isMultiLine){var L=y.length,T=h.length-L,k;e:for(var w=y.offset||0;w<=T;w++){for(var R=0;R<L;R++)if(h[w+R].search(y[R])==-1)continue e;var D=h[w],I=h[w+L-1],E=D.length-D.match(y[0])[0].length,z=I.match(y[L-1])[0].length;k&&k.end.row===w&&k.end.column>E||(m.push(k=new x(w,E,w+L-1,z)),L>2&&(w=w+L-2))}}else for(var F,O=0;O<h.length;O++)if(this.$isMultilineSearch(n)){var _=h.length-1;if(F=this.$multiLineForward(r,y,O,_),F){var S=F.endRow<=_?F.endRow-1:_;S>O&&(O=S),m.push(new x(F.startRow,F.startCol,F.endRow,F.endCol))}}else{F=b.getMatchOffsets(h[O],y);for(var R=0;R<F.length;R++){var N=F[R];m.push(new x(O,N.offset,O,N.offset+N.length))}}if(i){for(var W=i.start.column,V=i.end.column,O=0,R=m.length-1;O<R&&m[O].start.column<W&&m[O].start.row==0;)O++;for(var G=i.end.row-i.start.row;O<R&&m[R].end.column>V&&m[R].end.row==G;)R--;for(m=m.slice(O,R+1),O=0,R=m.length;O<R;O++)m[O].start.row+=i.start.row,m[O].end.row+=i.start.row}return m},a.prototype.parseReplaceString=function(r){for(var n={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},i="",h=0,m=r.length;h<m;h++){var y=r.charCodeAt(h);if(y===n.Backslash){if(h++,h>=m){i+="\\";break}var L=r.charCodeAt(h);switch(L){case n.Backslash:i+="\\";break;case n.n:i+=`
193
- `;break;case n.t:i+=" ";break}continue}if(y===n.DollarSign){if(h++,h>=m){i+="$";break}var T=r.charCodeAt(h);if(T===n.DollarSign){i+="$$";continue}if(T===n.Digit0||T===n.Ampersand){i+="$&";continue}if(n.Digit1<=T&&T<=n.Digit9){i+="$"+r[h];continue}}i+=r[h]}return i||r},a.prototype.replace=function(r,n){var i=this.$options,h=this.$assembleRegExp(i);if(i.$isMultiLine)return n;if(h){var m=this.$isMultilineSearch(i);m&&(r=r.replace(/\r\n|\r|\n/g,`
194
- `));var y=h.exec(r);if(!y||!m&&y[0].length!=r.length)return null;if(n=i.regExp?this.parseReplaceString(n):n.replace(/\$/g,"$$$$"),n=r.replace(h,n),i.preserveCase){n=n.split("");for(var L=Math.min(r.length,r.length);L--;){var T=r[L];T&&T.toLowerCase()!=T?n[L]=n[L].toUpperCase():n[L]=n[L].toLowerCase()}n=n.join("")}return n}},a.prototype.$assembleRegExp=function(r,n){if(r.needle instanceof RegExp)return r.re=r.needle;var i=r.needle;if(!r.needle)return r.re=!1;r.regExp||(i=b.escapeRegExp(i));var h=r.caseSensitive?"gm":"gmi";try{new RegExp(i,"u"),r.$supportsUnicodeFlag=!0,h+="u"}catch{r.$supportsUnicodeFlag=!1}if(r.wholeWord&&(i=p(i,r)),r.$isMultiLine=!n&&/[\n\r]/.test(i),r.$isMultiLine)return r.re=this.$assembleMultilineRegExp(i,h);try{var m=new RegExp(i,h)}catch{m=!1}return r.re=m},a.prototype.$assembleMultilineRegExp=function(r,n){for(var i=r.replace(/\r\n|\r|\n/g,`$
195
- ^`).split(`
196
- `),h=[],m=0;m<i.length;m++)try{h.push(new RegExp(i[m],n))}catch{return!1}return h},a.prototype.$isMultilineSearch=function(r){return r.re&&/\\r\\n|\\r|\\n/.test(r.re.source)&&r.regExp&&!r.$isMultiLine},a.prototype.$multiLineForward=function(r,n,i,h){for(var m,y=o(r,i),L=i;L<=h;){for(var T=0;T<y&&!(L>h);T++){var k=r.getLine(L++);m=m==null?k:m+`
197
- `+k}var w=n.exec(m);if(n.lastIndex=0,w){var R=m.slice(0,w.index).split(`
198
- `),D=w[0].split(`
199
- `),I=i+R.length-1,E=R[R.length-1].length,z=I+D.length-1,F=D.length==1?E+D[0].length:D[D.length-1].length;return{startRow:I,startCol:E,endRow:z,endCol:F}}}return null},a.prototype.$multiLineBackward=function(r,n,i,h,m){for(var y,L=o(r,h),T=r.getLine(h).length-i,k=h;k>=m;){for(var w=0;w<L&&k>=m;w++){var R=r.getLine(k--);y=y==null?R:R+`
200
- `+y}var D=s(y,n,T);if(D){var I=y.slice(0,D.index).split(`
201
- `),E=D[0].split(`
202
- `),z=k+I.length,F=I[I.length-1].length,O=z+E.length-1,_=E.length==1?F+E[0].length:E[E.length-1].length;return{startRow:z,startCol:F,endRow:O,endCol:_}}}return null},a.prototype.$matchIterator=function(r,n){var i=this.$assembleRegExp(n);if(!i)return!1;var h=this.$isMultilineSearch(n),m=this.$multiLineForward,y=this.$multiLineBackward,L=n.backwards==!0,T=n.skipCurrent!=!1,k=i.unicode,w=n.range,R=n.start;R||(R=w?w[L?"end":"start"]:r.selection.getRange()),R.start&&(R=R[T!=L?"end":"start"]);var D=w?w.start.row:0,I=w?w.end.row:r.getLength()-1;if(L)var E=function(O){var _=R.row;if(!F(_,R.column,O)){for(_--;_>=D;_--)if(F(_,Number.MAX_VALUE,O))return;if(n.wrap!=!1){for(_=I,D=R.row;_>=D;_--)if(F(_,Number.MAX_VALUE,O))return}}};else var E=function(_){var S=R.row;if(!F(S,R.column,_)){for(S=S+1;S<=I;S++)if(F(S,0,_))return;if(n.wrap!=!1){for(S=D,I=R.row;S<=I;S++)if(F(S,0,_))return}}};if(n.$isMultiLine)var z=i.length,F=function(O,_,S){var N=L?O-z+1:O;if(!(N<0||N+z>r.getLength())){var W=r.getLine(N),V=W.search(i[0]);if(!(!L&&V<_||V===-1)){for(var G=1;G<z;G++)if(W=r.getLine(N+G),W.search(i[G])==-1)return;var Q=W.match(i[z-1])[0].length;if(!(L&&Q>_)&&S(N,V,N+z-1,Q))return!0}}};else if(L)var F=function(_,S,N){if(h){var W=y(r,i,S,_,D);if(!W)return!1;if(N(W.startRow,W.startCol,W.endRow,W.endCol))return!0}else{var V=r.getLine(_),G=[],Q,te=0;for(i.lastIndex=0;Q=i.exec(V);){var ce=Q[0].length;if(te=Q.index,!ce){if(te>=V.length)break;i.lastIndex=te+=b.skipEmptyMatch(V,te,k)}if(Q.index+ce>S)break;G.push(Q.index,ce)}for(var ne=G.length-1;ne>=0;ne-=2){var he=G[ne-1],ce=G[ne];if(N(_,he,_,he+ce))return!0}}};else var F=function(_,S,N){if(i.lastIndex=S,h){var W=m(r,i,_,I);if(W){var V=W.endRow<=I?W.endRow-1:I;V>_&&(_=V)}if(!W)return!1;if(N(W.startRow,W.startCol,W.endRow,W.endCol))return!0}else for(var G=r.getLine(_),Q,te;te=i.exec(G);){var ce=te[0].length;if(Q=te.index,N(_,Q,_,Q+ce))return!0;if(!ce&&(i.lastIndex=Q+=b.skipEmptyMatch(G,Q,k),Q>=G.length))return!1}};return{forEach:E}},a})();function p(a,r){var n=b.supportsLookbehind();function i(L,T){T===void 0&&(T=!0);var k=n&&r.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return k.test(L)||r.regExp?n&&r.$supportsUnicodeFlag?T?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var h=Array.from(a),m=h[0],y=h[h.length-1];return i(m)+a+i(y,!1)}function s(a,r,n){for(var i=null,h=0;h<=a.length;){r.lastIndex=h;var m=r.exec(a);if(!m)break;var y=m.index+m[0].length;if(y>a.length-n)break;(!i||y>i.index+i[0].length)&&(i=m),h=m.index+1}return i}function o(a,r){var n=5e3,i={row:r,column:0},h=a.doc.positionToIndex(i),m=h+n,y=a.doc.indexToPosition(m),L=y.row;return L+1}u.Search=f}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,u,$){var b=this&&this.__extends||(function(){var a=function(r,n){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,h){i.__proto__=h}||function(i,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(i[m]=h[m])},a(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");a(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),v=e("../lib/keys"),x=e("../lib/useragent"),f=v.KEY_MODS,p=(function(){function a(r,n){this.$init(r,n,!1)}return a.prototype.$init=function(r,n,i){this.platform=n||(x.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(r),this.$singleCommand=i},a.prototype.addCommand=function(r){this.commands[r.name]&&this.removeCommand(r),this.commands[r.name]=r,r.bindKey&&this._buildKeyHash(r)},a.prototype.removeCommand=function(r,n){var i=r&&(typeof r=="string"?r:r.name);r=this.commands[i],n||delete this.commands[i];var h=this.commandKeyBinding;for(var m in h){var y=h[m];if(y==r)delete h[m];else if(Array.isArray(y)){var L=y.indexOf(r);L!=-1&&(y.splice(L,1),y.length==1&&(h[m]=y[0]))}}},a.prototype.bindKey=function(r,n,i){if(typeof r=="object"&&r&&(i==null&&(i=r.position),r=r[this.platform]),!!r){if(typeof n=="function")return this.addCommand({exec:n,bindKey:r,name:n.name||r});r.split("|").forEach(function(h){var m="";if(h.indexOf(" ")!=-1){var y=h.split(/\s+/);h=y.pop(),y.forEach(function(k){var w=this.parseKeys(k),R=f[w.hashId]+w.key;m+=(m?" ":"")+R,this._addCommandToBinding(m,"chainKeys")},this),m+=" "}var L=this.parseKeys(h),T=f[L.hashId]+L.key;this._addCommandToBinding(m+T,n,i)},this)}},a.prototype._addCommandToBinding=function(r,n,i){var h=this.commandKeyBinding,m;if(!n)delete h[r];else if(!h[r]||this.$singleCommand)h[r]=n;else{Array.isArray(h[r])?(m=h[r].indexOf(n))!=-1&&h[r].splice(m,1):h[r]=[h[r]],typeof i!="number"&&(i=s(n));var y=h[r];for(m=0;m<y.length;m++){var L=y[m],T=s(L);if(T>i)break}y.splice(m,0,n)}},a.prototype.addCommands=function(r){r&&Object.keys(r).forEach(function(n){var i=r[n];if(i){if(typeof i=="string")return this.bindKey(i,n);typeof i=="function"&&(i={exec:i}),typeof i=="object"&&(i.name||(i.name=n),this.addCommand(i))}},this)},a.prototype.removeCommands=function(r){Object.keys(r).forEach(function(n){this.removeCommand(r[n])},this)},a.prototype.bindKeys=function(r){Object.keys(r).forEach(function(n){this.bindKey(n,r[n])},this)},a.prototype._buildKeyHash=function(r){this.bindKey(r.bindKey,r)},a.prototype.parseKeys=function(r){var n=r.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(T){return T}),i=n.pop(),h=v[i];if(v.FUNCTION_KEYS[h])i=v.FUNCTION_KEYS[h].toLowerCase();else if(n.length){if(n.length==1&&n[0]=="shift")return{key:i.toUpperCase(),hashId:-1}}else return{key:i,hashId:-1};for(var m=0,y=n.length;y--;){var L=v.KEY_MODS[n[y]];if(L==null)return typeof console<"u"&&console.error("invalid modifier "+n[y]+" in "+r),!1;m|=L}return{key:i,hashId:m}},a.prototype.findKeyCommand=function(r,n){var i=f[r]+n;return this.commandKeyBinding[i]},a.prototype.handleKeyboard=function(r,n,i,h){if(!(h<0)){var m=f[n]+i,y=this.commandKeyBinding[m];return r.$keyChain&&(r.$keyChain+=" "+m,y=this.commandKeyBinding[r.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(r.$keyChain=r.$keyChain||m,{command:"null"}):(r.$keyChain&&((!n||n==4)&&i.length==1?r.$keyChain=r.$keyChain.slice(0,-m.length-1):(n==-1||h>0)&&(r.$keyChain="")),{command:y})}},a.prototype.getStatusText=function(r,n){return n.$keyChain||""},a})();function s(a){return typeof a=="object"&&a.bindKey&&a.bindKey.position||(a.isDefault?-100:0)}var o=(function(a){b(r,a);function r(n,i){var h=a.call(this,n,i)||this;return h.$singleCommand=!0,h}return r})(p);o.call=function(a,r,n){p.prototype.$init.call(a,r,n,!0)},p.call=function(a,r,n){p.prototype.$init.call(a,r,n,!1)},u.HashHandler=o,u.MultiHashHandler=p}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,u,$){var b=this&&this.__extends||(function(){var s=function(o,a){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},s(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");s(o,a);function r(){this.constructor=o}o.prototype=a===null?Object.create(a):(r.prototype=a.prototype,new r)}})(),v=e("../lib/oop"),x=e("../keyboard/hash_handler").MultiHashHandler,f=e("../lib/event_emitter").EventEmitter,p=(function(s){b(o,s);function o(a,r){var n=s.call(this,r,a)||this;return n.byName=n.commands,n.setDefaultHandler("exec",function(i){return i.args?i.command.exec(i.editor,i.args,i.event,!1):i.command.exec(i.editor,{},i.event,!0)}),n}return o.prototype.exec=function(a,r,n){if(Array.isArray(a)){for(var i=a.length;i--;)if(this.exec(a[i],r,n))return!0;return!1}typeof a=="string"&&(a=this.commands[a]);var h={editor:r,command:a,args:n};return this.canExecute(a,r)?(h.returnValue=this._emit("exec",h),this._signal("afterExec",h),h.returnValue!==!1):(this._signal("commandUnavailable",h),!1)},o.prototype.canExecute=function(a,r){return typeof a=="string"&&(a=this.commands[a]),!(!a||r&&r.$readOnly&&!a.readOnly||this.$checkCommandState!=!1&&a.isAvailable&&!a.isAvailable(r))},o.prototype.toggleRecording=function(a){if(!this.$inReplay)return a&&a._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(r){this.macro.push([r.command,r.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},o.prototype.replay=function(a){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(a);try{this.$inReplay=!0,this.macro.forEach(function(r){typeof r=="string"?this.exec(r,a):this.exec(r[0],a,r[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(a){return a.map(function(r){return typeof r[0]!="string"&&(r[0]=r[0].name),r[1]||(r=r[0]),r})},o})(x);v.implement(p.prototype,f),u.CommandManager=p}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,u,$){var b=e("../lib/lang"),v=e("../config"),x=e("../range").Range;function f(s,o){return{win:s,mac:o}}u.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:f("Ctrl-,","Command-,"),exec:function(s){v.loadModule("ace/ext/settings_menu",function(o){o.init(s),s.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:f("Alt-E","F4"),exec:function(s){v.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(s,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:f("Alt-Shift-E","Shift-F4"),exec:function(s){v.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(s,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:f("Ctrl-A","Command-A"),exec:function(s){s.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:f(null,"Ctrl-L"),exec:function(s){s.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:f("Ctrl-L","Command-L"),exec:function(s,o){typeof o=="number"&&!isNaN(o)&&s.gotoLine(o),s.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:f("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(s){s.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:f("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(s){s.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:f("F2","F2"),exec:function(s){s.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:f("Alt-F2","Alt-F2"),exec:function(s){s.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:f(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:f(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:f("Alt-0","Command-Option-0"),exec:function(s){s.session.foldAll(),s.session.unfold(s.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:f("Alt-Shift-0","Command-Option-Shift-0"),exec:function(s){s.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:f("Ctrl-K","Command-G"),exec:function(s){s.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:f("Ctrl-Shift-K","Command-Shift-G"),exec:function(s){s.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:f("Alt-K","Ctrl-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:f("Alt-Shift-K","Ctrl-Shift-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:f("Ctrl-F","Command-F"),exec:function(s){v.loadModule("ace/ext/searchbox",function(o){o.Search(s)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(s){s.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:f("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(s){s.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:f("Ctrl-Home","Command-Home|Command-Up"),exec:function(s){s.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:f("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(s){s.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:f("Up","Up|Ctrl-P"),exec:function(s,o){s.navigateUp(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:f("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(s){s.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:f("Ctrl-End","Command-End|Command-Down"),exec:function(s){s.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:f("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(s){s.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:f("Down","Down|Ctrl-N"),exec:function(s,o){s.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:f("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(s){s.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:f("Ctrl-Left","Option-Left"),exec:function(s){s.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:f("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:f("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(s){s.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:f("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(s){s.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:f("Left","Left|Ctrl-B"),exec:function(s,o){s.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:f("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(s){s.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:f("Ctrl-Right","Option-Right"),exec:function(s){s.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:f("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:f("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(s){s.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:f("Shift-Right","Shift-Right"),exec:function(s){s.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:f("Right","Right|Ctrl-F"),exec:function(s,o){s.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(s){s.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:f(null,"Option-PageDown"),exec:function(s){s.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:f("PageDown","PageDown|Ctrl-V"),exec:function(s){s.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(s){s.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:f(null,"Option-PageUp"),exec:function(s){s.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(s){s.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:f("Ctrl-Up",null),exec:function(s){s.renderer.scrollBy(0,-2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:f("Ctrl-Down",null),exec:function(s){s.renderer.scrollBy(0,2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:f("Ctrl-Alt-E","Command-Option-E"),exec:function(s){s.commands.toggleRecording(s)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:f("Ctrl-Shift-E","Command-Shift-E"),exec:function(s){s.commands.replay(s)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:f("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(s){s.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:f("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(s){s.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:f("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(s){s.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:f(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(s){},readOnly:!0},{name:"cut",description:"Cut",exec:function(s){var o=s.$copyWithEmptySelection&&s.selection.isEmpty(),a=o?s.selection.getLineRange():s.selection.getRange();s._emit("cut",a),a.isEmpty()||s.session.remove(a),s.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(s,o){s.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:f("Ctrl-D","Command-D"),exec:function(s){s.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:f("Ctrl-Shift-D","Command-Shift-D"),exec:function(s){s.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:f("Ctrl-Alt-S","Command-Alt-S"),exec:function(s){s.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:f("Ctrl-/","Command-/"),exec:function(s){s.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:f("Ctrl-Shift-/","Command-Shift-/"),exec:function(s){s.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:f("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(s){s.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:f("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(s){s.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:f("Ctrl-H","Command-Option-F"),exec:function(s){v.loadModule("ace/ext/searchbox",function(o){o.Search(s,!0)})}},{name:"undo",description:"Undo",bindKey:f("Ctrl-Z","Command-Z"),exec:function(s){s.undo()}},{name:"redo",description:"Redo",bindKey:f("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(s){s.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:f("Alt-Shift-Up","Command-Option-Up"),exec:function(s){s.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:f("Alt-Up","Option-Up"),exec:function(s){s.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:f("Alt-Shift-Down","Command-Option-Down"),exec:function(s){s.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:f("Alt-Down","Option-Down"),exec:function(s){s.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:f("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(s){s.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:f("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(s){s.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:f("Shift-Delete",null),exec:function(s){if(s.selection.isEmpty())s.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:f("Alt-Backspace","Command-Backspace"),exec:function(s){s.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:f("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(s){s.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:f("Ctrl-Shift-Backspace",null),exec:function(s){var o=s.selection.getRange();o.start.column=0,s.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:f("Ctrl-Shift-Delete",null),exec:function(s){var o=s.selection.getRange();o.end.column=Number.MAX_VALUE,s.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:f("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(s){s.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:f("Ctrl-Delete","Alt-Delete"),exec:function(s){s.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:f("Shift-Tab","Shift-Tab"),exec:function(s){s.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:f("Tab","Tab"),exec:function(s){s.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:f("Ctrl-[","Ctrl-["),exec:function(s){s.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:f("Ctrl-]","Ctrl-]"),exec:function(s){s.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(s,o){s.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(s,o){s.insert(b.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:f(null,"Ctrl-O"),exec:function(s){s.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:f("Alt-Shift-X","Ctrl-T"),exec:function(s){s.transposeLetters()},multiSelectAction:function(s){s.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:f("Ctrl-U","Ctrl-U"),exec:function(s){s.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:f("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(s){s.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:f(null,null),exec:function(s){s.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:f("Ctrl-Shift-L","Command-Shift-L"),exec:function(s){var o=s.selection.getRange();o.start.column=o.end.column=0,o.end.row++,s.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:f("Ctrl+F3","F3"),exec:function(s){s.openLink()}},{name:"joinlines",description:"Join lines",bindKey:f(null,null),exec:function(s){for(var o=s.selection.isBackwards(),a=o?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),r=o?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),n=s.session.doc.getLine(a.row).length,i=s.session.doc.getTextRange(s.selection.getRange()),h=i.replace(/\n\s*/," ").length,m=s.session.doc.getLine(a.row),y=a.row+1;y<=r.row+1;y++){var L=b.stringTrimLeft(b.stringTrimRight(s.session.doc.getLine(y)));L.length!==0&&(L=" "+L),m+=L}r.row+1<s.session.doc.getLength()-1&&(m+=s.session.doc.getNewLineCharacter()),s.clearSelection(),s.session.doc.replace(new x(a.row,0,r.row+2,0),m),h>0?(s.selection.moveCursorTo(a.row,a.column),s.selection.selectTo(a.row,a.column+h)):(n=s.session.doc.getLine(a.row).length>n?n+1:n,s.selection.moveCursorTo(a.row,n))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:f(null,null),exec:function(s){var o=s.session.doc.getLength()-1,a=s.session.doc.getLine(o).length,r=s.selection.rangeList.ranges,n=[];r.length<1&&(r=[s.selection.getRange()]);for(var i=0;i<r.length;i++)i==r.length-1&&(r[i].end.row===o&&r[i].end.column===a||n.push(new x(r[i].end.row,r[i].end.column,o,a))),i===0?r[i].start.row===0&&r[i].start.column===0||n.push(new x(0,0,r[i].start.row,r[i].start.column)):n.push(new x(r[i-1].end.row,r[i-1].end.column,r[i].start.row,r[i].start.column));s.exitMultiSelectMode(),s.clearSelection();for(var i=0;i<n.length;i++)s.selection.addRange(n[i],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(s){s.selection.clearSelection(),s.navigateLineEnd(),s.insert(`
203
- `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(s){s.selection.clearSelection();var o=s.getCursorPosition();s.selection.moveTo(o.row-1,Number.MAX_VALUE),s.insert(`
204
- `),o.row===0&&s.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(s){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),s.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:f("F1","F1"),exec:function(s){s.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:f(null,null),exec:function(s){s.prompt({$type:"modes"})},readOnly:!0}];for(var p=1;p<9;p++)u.commands.push({name:"foldToLevel"+p,description:"Fold To Level "+p,level:p,exec:function(s){s.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(e,u,$){var b=e("../lib/keys"),v=(function(){function f(p){this.editor=p,this.gutterLayer=p.renderer.$gutterLayer,this.element=p.renderer.$gutter,this.lines=p.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return f.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},f.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},f.prototype.$onGutterKeyDown=function(p){if(this.annotationTooltip.isOpen){p.preventDefault(),p.keyCode===b.escape&&this.annotationTooltip.hide();return}if(p.target===this.element){if(p.keyCode!=b.enter)return;p.preventDefault();var s=this.editor.getCursorPosition().row;this.editor.isRowVisible(s)||this.editor.scrollToLine(s,!0,!0),setTimeout((function(){var o=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),a=this.$findNearestFoldLaneWidget(o),r=this.$findNearestAnnotation(o);if(!(a===null&&r===null)){var n=this.$findClosestNumber(a,r,o);if(n===a)if(this.activeLane="fold",this.activeRowIndex=a,this.$isCustomWidgetVisible(a)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=r,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(p),setTimeout((function(){this.editor._signal("gutterkeydown",new x(p,this))}).bind(this),10)},f.prototype.$handleGutterKeyboardInteraction=function(p){if(p.keyCode===b.tab){p.preventDefault();return}if(p.keyCode===b.escape){p.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(p.keyCode===b.up){switch(p.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(p.keyCode===b.down){switch(p.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(p.keyCode===b.left){p.preventDefault(),this.$switchLane("annotation");return}if(p.keyCode===b.right){p.preventDefault(),this.$switchLane("fold");return}if(p.keyCode===b.enter||p.keyCode===b.space){switch(p.preventDefault(),this.activeLane){case"fold":var s=this.$rowIndexToRow(this.activeRowIndex),o=this.editor.session.$gutterCustomWidgets[s];if(o)o.callbacks&&o.callbacks.onClick&&o.callbacks.onClick(p,s);else if(this.gutterLayer.session.foldWidgets[s]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),p),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==s&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(s),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},f.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},f.prototype.$isFoldWidgetVisible=function(p){var s=this.editor.isRowFullyVisible(this.$rowIndexToRow(p)),o=this.$getFoldWidget(p).style.display!=="none";return s&&o},f.prototype.$isCustomWidgetVisible=function(p){var s=this.editor.isRowFullyVisible(this.$rowIndexToRow(p)),o=!!this.$getCustomWidget(p);return s&&o},f.prototype.$isAnnotationVisible=function(p){var s=this.editor.isRowFullyVisible(this.$rowIndexToRow(p)),o=this.$getAnnotation(p).style.display!=="none";return s&&o},f.prototype.$getFoldWidget=function(p){var s=this.lines.get(p),o=s.element;return o.childNodes[1]},f.prototype.$getCustomWidget=function(p){var s=this.lines.get(p),o=s.element;return o.childNodes[3]},f.prototype.$getAnnotation=function(p){var s=this.lines.get(p),o=s.element;return o.childNodes[2]},f.prototype.$findNearestFoldLaneWidget=function(p){if(this.$isCustomWidgetVisible(p)||this.$isFoldWidgetVisible(p))return p;for(var s=0;p-s>0||p+s<this.lines.getLength()-1;){if(s++,p-s>=0&&this.$isCustomWidgetVisible(p-s))return p-s;if(p+s<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(p+s))return p+s;if(p-s>=0&&this.$isFoldWidgetVisible(p-s))return p-s;if(p+s<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(p+s))return p+s}return null},f.prototype.$findNearestAnnotation=function(p){if(this.$isAnnotationVisible(p))return p;for(var s=0;p-s>0||p+s<this.lines.getLength()-1;){if(s++,p-s>=0&&this.$isAnnotationVisible(p-s))return p-s;if(p+s<=this.lines.getLength()-1&&this.$isAnnotationVisible(p+s))return p+s}return null},f.prototype.$focusFoldWidget=function(p){if(p!=null){var s=this.$getFoldWidget(p);s.classList.add(this.editor.renderer.keyboardFocusClassName),s.focus()}},f.prototype.$focusCustomWidget=function(p){if(p!=null){var s=this.$getCustomWidget(p);s&&(s.classList.add(this.editor.renderer.keyboardFocusClassName),s.focus())}},f.prototype.$focusAnnotation=function(p){if(p!=null){var s=this.$getAnnotation(p);s.classList.add(this.editor.renderer.keyboardFocusClassName),s.focus()}},f.prototype.$blurFoldWidget=function(p){var s=this.$getFoldWidget(p);s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.blur()},f.prototype.$blurCustomWidget=function(p){var s=this.$getCustomWidget(p);s&&(s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.blur())},f.prototype.$blurAnnotation=function(p){var s=this.$getAnnotation(p);s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.blur()},f.prototype.$moveFoldWidgetUp=function(){for(var p=this.activeRowIndex;p>0;)if(p--,this.$isFoldWidgetVisible(p)||this.$isCustomWidgetVisible(p)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=p,this.$isFoldWidgetVisible(p)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},f.prototype.$moveFoldWidgetDown=function(){for(var p=this.activeRowIndex;p<this.lines.getLength()-1;)if(p++,this.$isFoldWidgetVisible(p)||this.$isCustomWidgetVisible(p)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=p,this.$isFoldWidgetVisible(p)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},f.prototype.$moveAnnotationUp=function(){for(var p=this.activeRowIndex;p>0;)if(p--,this.$isAnnotationVisible(p)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=p,this.$focusAnnotation(this.activeRowIndex);return}},f.prototype.$moveAnnotationDown=function(){for(var p=this.activeRowIndex;p<this.lines.getLength()-1;)if(p++,this.$isAnnotationVisible(p)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=p,this.$focusAnnotation(this.activeRowIndex);return}},f.prototype.$findClosestNumber=function(p,s,o){return p===null?s:s===null||Math.abs(o-p)<=Math.abs(o-s)?p:s},f.prototype.$switchLane=function(p){switch(p){case"annotation":if(this.activeLane==="annotation")break;var s=this.$findNearestAnnotation(this.activeRowIndex);if(s==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var o=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(o===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$isCustomWidgetVisible(o)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},f.prototype.$rowIndexToRow=function(p){var s=this.lines.get(p);return s?s.row:null},f.prototype.$rowToRowIndex=function(p){for(var s=0;s<this.lines.getLength();s++){var o=this.lines.get(s);if(o.row==p)return s}return null},f})();u.GutterKeyboardHandler=v;var x=(function(){function f(p,s){this.gutterKeyboardHandler=s,this.domEvent=p}return f.prototype.getKey=function(){return b.keyCodeToString(this.domEvent.keyCode)},f.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},f.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},f.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},f})();u.GutterKeyboardEvent=x}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(e,u,$){var b=this&&this.__values||function(_){var S=typeof Symbol=="function"&&Symbol.iterator,N=S&&_[S],W=0;if(N)return N.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&W>=_.length&&(_=void 0),{value:_&&_[W++],done:!_}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")},v=e("./lib/oop"),x=e("./lib/dom"),f=e("./lib/lang"),p=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,o=e("./mouse/mouse_handler").MouseHandler,a=e("./mouse/fold_handler").FoldHandler,r=e("./keyboard/keybinding").KeyBinding,n=e("./edit_session").EditSession,i=e("./search").Search,h=e("./range").Range,m=e("./lib/event_emitter").EventEmitter,y=e("./commands/command_manager").CommandManager,L=e("./commands/default_commands").commands,T=e("./config"),k=e("./token_iterator").TokenIterator,w=e("./keyboard/gutter_handler").GutterKeyboardHandler,R=e("./config").nls,D=e("./clipboard"),I=e("./lib/keys"),E=e("./lib/event"),z=e("./tooltip").HoverTooltip,F=(function(){function _(S,N,W){this.id="editor"+ ++_.$uid,this.session,this.$toDestroy=[];var V=S.getContainerElement();this.container=V,this.renderer=S,this.commands=new y(p.isMac?"mac":"win",L),typeof document=="object"&&(this.textInput=new s(S.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new a(this)),this.keyBinding=new r(this),this.$search=new i().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=f.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(G,Q){Q._$emitInputEvent.schedule(31)}),this.setSession(N||W&&W.session||new n("")),T.resetOptions(this),W&&this.setOptions(W),T._signal("editor",this)}return _.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},_.prototype.startOperation=function(S){this.session.startOperation(S)},_.prototype.endOperation=function(S){this.session.endOperation(S)},_.prototype.onStartOperation=function(S){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,S||(this.previousCommand=null)},_.prototype.onEndOperation=function(S){if(this.curOp&&this.session){if(S&&S.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var N=this.curOp.command,W=N&&N.scrollIntoView;if(W){switch(W){case"center-animate":W="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var V=this.selection.getRange(),G=this.renderer.layerConfig;(V.start.row>=G.lastRow||V.end.row<=G.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}W=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},_.prototype.$historyTracker=function(S){if(this.$mergeUndoDeltas){var N=this.prevOp,W=this.$mergeableCommands,V=N.command&&S.command.name==N.command.name;if(S.command.name=="insertstring"){var G=S.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),V=V&&this.mergeNextCommand&&(!/\s/.test(G)||/\s/.test(N.args)),this.mergeNextCommand=!0}else V=V&&W.indexOf(S.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(V=!1),V?this.session.mergeUndoDeltas=!0:W.indexOf(S.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},_.prototype.setKeyboardHandler=function(S,N){if(S&&typeof S=="string"&&S!="ace"){this.$keybindingId=S;var W=this;T.loadModule(["keybinding",S],function(V){W.$keybindingId==S&&W.keyBinding.setKeyboardHandler(V&&V.handler),N&&N()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(S),N&&N()},_.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},_.prototype.setSession=function(S){if(this.session!=S){this.curOp&&this.endOperation(),this.curOp={};var N=this.session;if(N){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var W=this.session.getSelection();W.off("changeCursor",this.$onCursorChange),W.off("changeSelection",this.$onSelectionChange)}this.session=S,S?(this.$onDocumentChange=this.onDocumentChange.bind(this),S.on("change",this.$onDocumentChange),this.renderer.setSession(S),this.$onChangeMode=this.onChangeMode.bind(this),S.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),S.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),S.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),S.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),S.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),S.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=S.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(S)),this._signal("changeSession",{session:S,oldSession:N}),this.curOp=null,N&&N._signal("changeEditor",{oldEditor:this}),N&&(N.$editor=null),S&&S._signal("changeEditor",{editor:this}),S&&(S.$editor=this),S&&!S.destroyed&&S.bgTokenizer.scheduleStart()}},_.prototype.getSession=function(){return this.session},_.prototype.setValue=function(S,N){return this.session.doc.setValue(S),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),S},_.prototype.getValue=function(){return this.session.getValue()},_.prototype.getSelection=function(){return this.selection},_.prototype.resize=function(S){this.renderer.onResize(S)},_.prototype.setTheme=function(S,N){this.renderer.setTheme(S,N)},_.prototype.getTheme=function(){return this.renderer.getTheme()},_.prototype.setStyle=function(S,N){this.renderer.setStyle(S,N)},_.prototype.unsetStyle=function(S){this.renderer.unsetStyle(S)},_.prototype.getFontSize=function(){return this.getOption("fontSize")||x.computedStyle(this.container).fontSize},_.prototype.setFontSize=function(S){this.setOption("fontSize",S)},_.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var S=this;this.$highlightPending=!0,setTimeout(function(){S.$highlightPending=!1;var N=S.session;if(!(!N||N.destroyed)){N.$bracketHighlight&&(N.$bracketHighlight.markerIds.forEach(function(ue){N.removeMarker(ue)}),N.$bracketHighlight=null);var W=S.getCursorPosition(),V=S.getKeyboardHandler(),G=V&&V.$getDirectionForHighlight&&V.$getDirectionForHighlight(S),Q=N.getMatchingBracketRanges(W,G);if(!Q){var te=new k(N,W.row,W.column),ce=te.getCurrentToken();if(ce&&/\b(?:tag-open|tag-name)/.test(ce.type)){var ne=N.getMatchingTags(W);ne&&(Q=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Q&&N.$mode.getMatching&&(Q=N.$mode.getMatching(S.session)),!Q){S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide();return}var he="ace_bracket";Array.isArray(Q)?Q.length==1&&(he="ace_error_bracket"):Q=[Q],Q.length==2&&(h.comparePoints(Q[0].end,Q[1].start)==0?Q=[h.fromPoints(Q[0].start,Q[1].end)]:h.comparePoints(Q[0].start,Q[1].end)==0&&(Q=[h.fromPoints(Q[1].start,Q[0].end)])),N.$bracketHighlight={ranges:Q,markerIds:Q.map(function(ue){return N.addMarker(ue,he,"text")})},S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide()}},50)}},_.prototype.focus=function(){this.textInput.focus()},_.prototype.isFocused=function(){return this.textInput.isFocused()},_.prototype.blur=function(){this.textInput.blur()},_.prototype.onFocus=function(S){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",S))},_.prototype.onBlur=function(S){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",S))},_.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},_.prototype.onDocumentChange=function(S){var N=this.session.$useWrapMode,W=S.start.row==S.end.row?S.end.row:1/0;this.renderer.updateLines(S.start.row,W,N),this._signal("change",S),this.$cursorChange()},_.prototype.onTokenizerUpdate=function(S){var N=S.data;this.renderer.updateLines(N.first,N.last)},_.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},_.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},_.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},_.prototype.$updateHighlightActiveLine=function(){var S=this.getSession(),N;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(N=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(N=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(N=!1)),S.$highlightLineMarker&&!N)S.removeMarker(S.$highlightLineMarker.id),S.$highlightLineMarker=null;else if(!S.$highlightLineMarker&&N){var W=new h(N.row,N.column,N.row,1/0);W.id=S.addMarker(W,"ace_active-line","screenLine"),S.$highlightLineMarker=W}else N&&(S.$highlightLineMarker.start.row=N.row,S.$highlightLineMarker.end.row=N.row,S.$highlightLineMarker.start.column=N.column,S._signal("changeBackMarker"))},_.prototype.onSelectionChange=function(S){var N=this.session;if(N.$selectionMarker&&N.removeMarker(N.$selectionMarker),N.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var W=this.selection.getRange(),V=this.getSelectionStyle();N.$selectionMarker=N.addMarker(W,"ace_selection",V)}var G=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(G),this._signal("changeSelection")},_.prototype.$getSelectionHighLightRegexp=function(){var S=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var W=N.start.column,V=N.end.column,G=S.getLine(N.start.row),Q=G.substring(W,V);if(!(Q.length>5e3||!/[\w\d]/.test(Q))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Q}),ce=G.substring(W-1,V+1);if(te.test(ce))return te}}},_.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},_.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},_.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},_.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},_.prototype.onChangeMode=function(S){this.renderer.updateText(),this._emit("changeMode",S)},_.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},_.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},_.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},_.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},_.prototype.getCopyText=function(){var S=this.getSelectedText(),N=this.session.doc.getNewLineCharacter(),W=!1;if(!S&&this.$copyWithEmptySelection){W=!0;for(var V=this.selection.getAllRanges(),G=0;G<V.length;G++){var Q=V[G];G&&V[G-1].start.row==Q.start.row||(S+=this.session.getLine(Q.start.row)+N)}}var te={text:S};return this._signal("copy",te),D.lineMode=W?te.text:!1,te.text},_.prototype.onCopy=function(){this.commands.exec("copy",this)},_.prototype.onCut=function(){this.commands.exec("cut",this)},_.prototype.onPaste=function(S,N){var W={text:S,event:N};this.commands.exec("paste",this,W)},_.prototype.$handlePaste=function(S){typeof S=="string"&&(S={text:S}),this._signal("paste",S);var N=S.text,W=N===D.lineMode,V=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)W?V.insert({row:this.selection.lead.row,column:0},N):this.insert(N);else if(W)this.selection.rangeList.ranges.forEach(function(he){V.insert({row:he.start.row,column:0},N)});else{var G=N.split(/\r\n|\r|\n/),Q=this.selection.rangeList.ranges,te=G.length==2&&(!G[0]||!G[1]);if(G.length!=Q.length||te)return this.commands.exec("insertstring",this,N);for(var ce=Q.length;ce--;){var ne=Q[ce];ne.isEmpty()||V.remove(ne),V.insert(ne.start,G[ce])}}},_.prototype.execCommand=function(S,N){return this.commands.exec(S,this,N)},_.prototype.insert=function(S,N){var W=this.session,V=W.getMode(),G=this.getCursorPosition();if(this.getBehavioursEnabled()&&!N){var Q=V.transformAction(W.getState(G.row),"insertion",this,W,S);Q&&(S!==Q.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),S=Q.text)}if(S==" "&&(S=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&S.indexOf(`
205
- `)==-1){var te=h.fromPoints(G,G);te.end.column+=S.length,this.session.remove(te)}}else{var te=this.getSelectionRange();G=this.session.remove(te),this.clearSelection()}if(S==`
206
- `||S==`\r
207
- `){var ue=W.getLine(G.row);if(G.column>ue.search(/\S|$/)){var ce=ue.substr(G.column).search(/\S|$/);W.doc.removeInLine(G.row,G.column,G.column+ce)}}this.clearSelection();var ne=G.column,he=W.getState(G.row),ue=W.getLine(G.row),le=V.checkOutdent(he,ue,S);if(W.insert(G,S),Q&&Q.selection&&(Q.selection.length==2?this.selection.setSelectionRange(new h(G.row,ne+Q.selection[0],G.row,ne+Q.selection[1])):this.selection.setSelectionRange(new h(G.row+Q.selection[0],Q.selection[1],G.row+Q.selection[2],Q.selection[3]))),this.$enableAutoIndent){if(W.getDocument().isNewLine(S)){var me=V.getNextLineIndent(he,ue.slice(0,G.column),W.getTabString());W.insert({row:G.row+1,column:0},me)}le&&V.autoOutdent(he,W,G.row)}},_.prototype.autoIndent=function(){for(var S=this.session,N=S.getMode(),W=this.selection.isEmpty()?[new h(0,0,S.doc.getLength()-1,0)]:this.selection.getAllRanges(),V="",G="",Q="",te=S.getTabString(),ce=0;ce<W.length;ce++)for(var ne=W[ce].start.row,he=W[ce].end.row,ue=ne;ue<=he;ue++){ue>0&&(V=S.getState(ue-1),G=S.getLine(ue-1),Q=N.getNextLineIndent(V,G,te));var le=S.getLine(ue),me=N.$getIndent(le);if(Q!==me){if(me.length>0){var _e=new h(ue,0,ue,me.length);S.remove(_e)}Q.length>0&&S.insert({row:ue,column:0},Q)}N.autoOutdent(V,S,ue)}},_.prototype.onTextInput=function(S,N){if(!N)return this.keyBinding.onTextInput(S);this.startOperation({command:{name:"insertstring"}});var W=this.applyComposition.bind(this,S,N);this.selection.rangeCount?this.forEachSelection(W):W(),this.endOperation()},_.prototype.applyComposition=function(S,N){if(N.extendLeft||N.extendRight){var W=this.selection.getRange();W.start.column-=N.extendLeft,W.end.column+=N.extendRight,W.start.column<0&&(W.start.row--,W.start.column+=this.session.getLine(W.start.row).length+1),this.selection.setRange(W),!S&&!W.isEmpty()&&this.remove()}if((S||!this.selection.isEmpty())&&this.insert(S,!0),N.restoreStart||N.restoreEnd){var W=this.selection.getRange();W.start.column-=N.restoreStart,W.end.column-=N.restoreEnd,this.selection.setRange(W)}},_.prototype.onCommandKey=function(S,N,W){return this.keyBinding.onCommandKey(S,N,W)},_.prototype.setOverwrite=function(S){this.session.setOverwrite(S)},_.prototype.getOverwrite=function(){return this.session.getOverwrite()},_.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},_.prototype.setScrollSpeed=function(S){this.setOption("scrollSpeed",S)},_.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},_.prototype.setDragDelay=function(S){this.setOption("dragDelay",S)},_.prototype.getDragDelay=function(){return this.getOption("dragDelay")},_.prototype.setSelectionStyle=function(S){this.setOption("selectionStyle",S)},_.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},_.prototype.setHighlightActiveLine=function(S){this.setOption("highlightActiveLine",S)},_.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},_.prototype.setHighlightGutterLine=function(S){this.setOption("highlightGutterLine",S)},_.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},_.prototype.setHighlightSelectedWord=function(S){this.setOption("highlightSelectedWord",S)},_.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},_.prototype.setAnimatedScroll=function(S){this.renderer.setAnimatedScroll(S)},_.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},_.prototype.setShowInvisibles=function(S){this.renderer.setShowInvisibles(S)},_.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},_.prototype.setDisplayIndentGuides=function(S){this.renderer.setDisplayIndentGuides(S)},_.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},_.prototype.setHighlightIndentGuides=function(S){this.renderer.setHighlightIndentGuides(S)},_.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},_.prototype.setShowPrintMargin=function(S){this.renderer.setShowPrintMargin(S)},_.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},_.prototype.setPrintMarginColumn=function(S){this.renderer.setPrintMarginColumn(S)},_.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},_.prototype.setReadOnly=function(S){this.setOption("readOnly",S)},_.prototype.getReadOnly=function(){return this.getOption("readOnly")},_.prototype.setBehavioursEnabled=function(S){this.setOption("behavioursEnabled",S)},_.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},_.prototype.setWrapBehavioursEnabled=function(S){this.setOption("wrapBehavioursEnabled",S)},_.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},_.prototype.setShowFoldWidgets=function(S){this.setOption("showFoldWidgets",S)},_.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},_.prototype.setFadeFoldWidgets=function(S){this.setOption("fadeFoldWidgets",S)},_.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},_.prototype.remove=function(S){this.selection.isEmpty()&&(S=="left"?this.selection.selectLeft():this.selection.selectRight());var N=this.getSelectionRange();if(this.getBehavioursEnabled()){var W=this.session,V=W.getState(N.start.row),G=W.getMode().transformAction(V,"deletion",this,W,N);if(N.end.column===0){var Q=W.getTextRange(N);if(Q[Q.length-1]==`
208
- `){var te=W.getLine(N.end.row);/^\s+$/.test(te)&&(N.end.column=te.length)}}G&&(N=G)}this.session.remove(N),this.clearSelection()},_.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var S=this.getSelectionRange();S.start.column==S.end.column&&S.start.row==S.end.row&&(S.end.column=0,S.end.row++),this.session.remove(S),this.clearSelection()},_.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var S=this.getCursorPosition();this.insert(`
209
- `),this.moveCursorToPosition(S)},_.prototype.setGhostText=function(S,N){this.renderer.setGhostText(S,N)},_.prototype.removeGhostText=function(){this.renderer.removeGhostText()},_.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var S=this.getCursorPosition(),N=S.column;if(N!==0){var W=this.session.getLine(S.row),V,G;N<W.length?(V=W.charAt(N)+W.charAt(N-1),G=new h(S.row,N-1,S.row,N+1)):(V=W.charAt(N-1)+W.charAt(N-2),G=new h(S.row,N-2,S.row,N)),this.session.replace(G,V),this.session.selection.moveToPosition(G.end)}}},_.prototype.toLowerCase=function(){var S=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),W=this.session.getTextRange(N);this.session.replace(N,W.toLowerCase()),this.selection.setSelectionRange(S)},_.prototype.toUpperCase=function(){var S=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),W=this.session.getTextRange(N);this.session.replace(N,W.toUpperCase()),this.selection.setSelectionRange(S)},_.prototype.indent=function(){var S=this.session,N=this.getSelectionRange();if(N.start.row<N.end.row){var W=this.$getSelectedRows();S.indentRows(W.first,W.last," ");return}else if(N.start.column<N.end.column){var V=S.getTextRange(N);if(!/^\s+$/.test(V)){var W=this.$getSelectedRows();S.indentRows(W.first,W.last," ");return}}var G=S.getLine(N.start.row),Q=N.start,te=S.getTabSize(),ce=S.documentToScreenColumn(Q.row,Q.column);if(this.session.getUseSoftTabs())var ne=te-ce%te,he=f.stringRepeat(" ",ne);else{for(var ne=ce%te;G[N.start.column-1]==" "&&ne;)N.start.column--,ne--;this.selection.setSelectionRange(N),he=" "}return this.insert(he)},_.prototype.blockIndent=function(){var S=this.$getSelectedRows();this.session.indentRows(S.first,S.last," ")},_.prototype.blockOutdent=function(){var S=this.session.getSelection();this.session.outdentRows(S.getRange())},_.prototype.sortLines=function(){for(var S=this.$getSelectedRows(),N=this.session,W=[],V=S.first;V<=S.last;V++)W.push(N.getLine(V));W.sort(function(te,ce){return te.toLowerCase()<ce.toLowerCase()?-1:te.toLowerCase()>ce.toLowerCase()?1:0});for(var G=new h(0,0,0,0),V=S.first;V<=S.last;V++){var Q=N.getLine(V);G.start.row=V,G.end.row=V,G.end.column=Q.length,N.replace(G,W[V-S.first])}},_.prototype.toggleCommentLines=function(){var S=this.session.getState(this.getCursorPosition().row),N=this.$getSelectedRows();this.session.getMode().toggleCommentLines(S,this.session,N.first,N.last)},_.prototype.toggleBlockComment=function(){var S=this.getCursorPosition(),N=this.session.getState(S.row),W=this.getSelectionRange();this.session.getMode().toggleBlockComment(N,this.session,W,S)},_.prototype.getNumberAt=function(S,N){var W=/[\-]?[0-9]+(?:\.[0-9]+)?/g;W.lastIndex=0;for(var V=this.session.getLine(S);W.lastIndex<N;){var G=W.exec(V);if(G.index<=N&&G.index+G[0].length>=N){var Q={value:G[0],start:G.index,end:G.index+G[0].length};return Q}}return null},_.prototype.modifyNumber=function(S){var N=this.selection.getCursor().row,W=this.selection.getCursor().column,V=new h(N,W-1,N,W),G=this.session.getTextRange(V);if(!isNaN(parseFloat(G))&&isFinite(G)){var Q=this.getNumberAt(N,W);if(Q){var te=Q.value.indexOf(".")>=0?Q.start+Q.value.indexOf(".")+1:Q.end,ce=Q.start+Q.value.length-te,ne=parseFloat(Q.value);ne*=Math.pow(10,ce),te!==Q.end&&W<te?S*=Math.pow(10,Q.end-W-1):S*=Math.pow(10,Q.end-W),ne+=S,ne/=Math.pow(10,ce);var he=ne.toFixed(ce),ue=new h(N,Q.start,N,Q.end);this.session.replace(ue,he),this.moveCursorTo(N,Math.max(Q.start+1,W+he.length-Q.value.length))}}else this.toggleWord()},_.prototype.toggleWord=function(){var S=this.selection.getCursor().row,N=this.selection.getCursor().column;this.selection.selectWord();var W=this.getSelectedText(),V=this.selection.getWordRange().start.column,G=W.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Q=N-V-1;Q<0&&(Q=0);var te=0,ce=0,ne=this;W.match(/[A-Za-z0-9_]+/)&&G.forEach(function(Ve,ot){ce=te+Ve.length,Q>=te&&Q<=ce&&(W=Ve,ne.selection.clearSelection(),ne.moveCursorTo(S,te+V),ne.selection.selectTo(S,ce+V)),te=ce});for(var he=this.$toggleWordPairs,ue,le=0;le<he.length;le++)for(var me=he[le],_e=0;_e<=1;_e++){var Ae=+!_e,Me=W.match(new RegExp("^\\s?_?("+f.escapeRegExp(me[_e])+")\\s?$","i"));if(Me){var qe=W.match(new RegExp("([_]|^|\\s)("+f.escapeRegExp(Me[1])+")($|\\s)","g"));qe&&(ue=W.replace(new RegExp(f.escapeRegExp(me[_e]),"i"),function(Ve){var ot=me[Ae];return Ve.toUpperCase()==Ve?ot=ot.toUpperCase():Ve.charAt(0).toUpperCase()==Ve.charAt(0)&&(ot=ot.substr(0,0)+me[Ae].charAt(0).toUpperCase()+ot.substr(1)),ot}),this.insert(ue),ue="")}}},_.prototype.findLinkAt=function(S,N){var W,V,G=this.session.getLine(S),Q=G.split(/((?:https?|ftp):\/\/[\S]+)/),te=N;te<0&&(te=0);var ce=0,ne=0,he;try{for(var ue=b(Q),le=ue.next();!le.done;le=ue.next()){var me=le.value;if(ne=ce+me.length,te>=ce&&te<=ne&&me.match(/((?:https?|ftp):\/\/[\S]+)/)){he=me.replace(/[\s:.,'";}\]]+$/,"");break}ce=ne}}catch(_e){W={error:_e}}finally{try{le&&!le.done&&(V=ue.return)&&V.call(ue)}finally{if(W)throw W.error}}return he},_.prototype.openLink=function(){var S=this.selection.getCursor(),N=this.findLinkAt(S.row,S.column);return N&&window.open(N,"_blank"),N!=null},_.prototype.removeLines=function(){var S=this.$getSelectedRows();this.session.removeFullLines(S.first,S.last),this.clearSelection()},_.prototype.duplicateSelection=function(){var S=this.selection,N=this.session,W=S.getRange(),V=S.isBackwards();if(W.isEmpty()){var G=W.start.row;N.duplicateLines(G,G)}else{var Q=V?W.start:W.end,te=N.insert(Q,N.getTextRange(W));W.start=Q,W.end=te,S.setSelectionRange(W,V)}},_.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},_.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},_.prototype.moveText=function(S,N,W){return this.session.moveText(S,N,W)},_.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},_.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},_.prototype.$moveLines=function(S,N){var W,V,G=this.selection;if(!G.inMultiSelectMode||this.inVirtualSelectionMode){var Q=G.toOrientedRange();W=this.$getSelectedRows(Q),V=this.session.$moveLines(W.first,W.last,N?0:S),N&&S==-1&&(V=0),Q.moveBy(V,0),G.fromOrientedRange(Q)}else{var te=G.rangeList.ranges;G.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var ce=0,ne=0,he=te.length,ue=0;ue<he;ue++){var le=ue;te[ue].moveBy(ce,0),W=this.$getSelectedRows(te[ue]);for(var me=W.first,_e=W.last;++ue<he;){ne&&te[ue].moveBy(ne,0);var Ae=this.$getSelectedRows(te[ue]);if(N&&Ae.first!=_e)break;if(!N&&Ae.first>_e+1)break;_e=Ae.last}for(ue--,ce=this.session.$moveLines(me,_e,N?0:S),N&&S==-1&&(le=ue+1);le<=ue;)te[le].moveBy(ce,0),le++;N||(ce=0),ne+=ce}G.fromOrientedRange(G.ranges[0]),G.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},_.prototype.$getSelectedRows=function(S){return S=(S||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(S.start.row),last:this.session.getRowFoldEnd(S.end.row)}},_.prototype.onCompositionStart=function(S){this.renderer.showComposition(S)},_.prototype.onCompositionUpdate=function(S){this.renderer.setCompositionText(S)},_.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},_.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},_.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},_.prototype.isRowVisible=function(S){return S>=this.getFirstVisibleRow()&&S<=this.getLastVisibleRow()},_.prototype.isRowFullyVisible=function(S){return S>=this.renderer.getFirstFullyVisibleRow()&&S<=this.renderer.getLastFullyVisibleRow()},_.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},_.prototype.$moveByPage=function(S,N){var W=this.renderer,V=this.renderer.layerConfig,G=S*Math.floor(V.height/V.lineHeight);N===!0?this.selection.$moveSelection(function(){this.moveCursorBy(G,0)}):N===!1&&(this.selection.moveCursorBy(G,0),this.selection.clearSelection());var Q=W.scrollTop;W.scrollBy(0,G*V.lineHeight),N!=null&&W.scrollCursorIntoView(null,.5),W.animateScrolling(Q)},_.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},_.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},_.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},_.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},_.prototype.scrollPageDown=function(){this.$moveByPage(1)},_.prototype.scrollPageUp=function(){this.$moveByPage(-1)},_.prototype.scrollToRow=function(S){this.renderer.scrollToRow(S)},_.prototype.scrollToLine=function(S,N,W,V){this.renderer.scrollToLine(S,N,W,V)},_.prototype.centerSelection=function(){var S=this.getSelectionRange(),N={row:Math.floor(S.start.row+(S.end.row-S.start.row)/2),column:Math.floor(S.start.column+(S.end.column-S.start.column)/2)};this.renderer.alignCursor(N,.5)},_.prototype.getCursorPosition=function(){return this.selection.getCursor()},_.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},_.prototype.getSelectionRange=function(){return this.selection.getRange()},_.prototype.selectAll=function(){this.selection.selectAll()},_.prototype.clearSelection=function(){this.selection.clearSelection()},_.prototype.moveCursorTo=function(S,N){this.selection.moveCursorTo(S,N)},_.prototype.moveCursorToPosition=function(S){this.selection.moveCursorToPosition(S)},_.prototype.jumpToMatching=function(S,N){var W=this.getCursorPosition(),V=new k(this.session,W.row,W.column),G=V.getCurrentToken(),Q=0;G&&G.type.indexOf("tag-name")!==-1&&(G=V.stepBackward());var te=G||V.stepForward();if(te){var ce,ne=!1,he={},ue=W.column-te.start,le,me={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(te.value.match(/[{}()\[\]]/g)){for(;ue<te.value.length&&!ne;ue++)if(me[te.value[ue]])switch(le=me[te.value[ue]]+"."+te.type.replace("rparen","lparen"),isNaN(he[le])&&(he[le]=0),te.value[ue]){case"(":case"[":case"{":he[le]++;break;case")":case"]":case"}":he[le]--,he[le]===-1&&(ce="bracket",ne=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(he[te.value])&&(he[te.value]=0),G.value==="<"&&Q>1?he[te.value]++:G.value==="</"&&he[te.value]--,he[te.value]===-1&&(ce="tag",ne=!0));ne||(G=te,Q++,te=V.stepForward(),ue=0)}while(te&&!ne);if(ce){var _e,Ae;if(ce==="bracket")_e=this.session.getBracketRange(W),_e||(_e=new h(V.getCurrentTokenRow(),V.getCurrentTokenColumn()+ue-1,V.getCurrentTokenRow(),V.getCurrentTokenColumn()+ue-1),Ae=_e.start,(N||Ae.row===W.row&&Math.abs(Ae.column-W.column)<2)&&(_e=this.session.getBracketRange(Ae)));else if(ce==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if(_e=new h(V.getCurrentTokenRow(),V.getCurrentTokenColumn()-2,V.getCurrentTokenRow(),V.getCurrentTokenColumn()-2),_e.compare(W.row,W.column)===0){var Me=this.session.getMatchingTags(W);Me&&(Me.openTag.contains(W.row,W.column)?(_e=Me.closeTag,Ae=_e.start):(_e=Me.openTag,Me.closeTag.start.row===W.row&&Me.closeTag.start.column===W.column?Ae=_e.end:Ae=_e.start))}Ae=Ae||_e.start}Ae=_e&&_e.cursor||Ae,Ae&&(S?_e&&N?this.selection.setRange(_e):_e&&_e.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Ae.row,Ae.column):this.selection.moveTo(Ae.row,Ae.column))}}},_.prototype.gotoLine=function(S,N,W){this.selection.clearSelection(),this.session.unfold({row:S-1,column:N||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(S-1,N||0),this.isRowFullyVisible(S-1)||this.scrollToLine(S-1,!0,W)},_.prototype.navigateTo=function(S,N){this.selection.moveTo(S,N)},_.prototype.navigateUp=function(S){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(-S||-1,0)},_.prototype.navigateDown=function(S){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(S||1,0)},_.prototype.navigateLeft=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorLeft();else{var N=this.getSelectionRange().start;this.moveCursorToPosition(N)}this.clearSelection()},_.prototype.navigateRight=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorRight();else{var N=this.getSelectionRange().end;this.moveCursorToPosition(N)}this.clearSelection()},_.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},_.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},_.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},_.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},_.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},_.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},_.prototype.replace=function(S,N){N&&this.$search.set(N);var W=this.$search.find(this.session),V=0;return W&&(this.$tryReplace(W,S)&&(V=1),this.selection.setSelectionRange(W),this.renderer.scrollSelectionIntoView(W.start,W.end)),V},_.prototype.replaceAll=function(S,N){N&&this.$search.set(N);var W=this.$search.findAll(this.session),V=0;if(!W.length)return V;var G=this.getSelectionRange();this.selection.moveTo(0,0);for(var Q=W.length-1;Q>=0;--Q)this.$tryReplace(W[Q],S)&&V++;return this.selection.setSelectionRange(G),V},_.prototype.$tryReplace=function(S,N){var W=this.session.getTextRange(S);return N=this.$search.replace(W,N),N!==null?(S.end=this.session.replace(S,N),S):null},_.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},_.prototype.find=function(S,N,W){N||(N={}),typeof S=="string"||S instanceof RegExp?N.needle=S:typeof S=="object"&&v.mixin(N,S);var V=this.selection.getRange();N.needle==null&&(S=this.session.getTextRange(V)||this.$search.$options.needle,S||(V=this.session.getWordRange(V.start.row,V.start.column),S=this.session.getTextRange(V)),this.$search.set({needle:S})),this.$search.set(N),N.start||this.$search.set({start:V});var G=this.$search.find(this.session);if(N.preventScroll)return G;if(G)return this.revealRange(G,W),G;N.backwards?V.start=V.end:V.end=V.start,this.selection.setRange(V)},_.prototype.findNext=function(S,N){this.find({skipCurrent:!0,backwards:!1},S,N)},_.prototype.findPrevious=function(S,N){this.find(S,{skipCurrent:!0,backwards:!0},N)},_.prototype.revealRange=function(S,N){this.session.unfold(S),this.selection.setSelectionRange(S);var W=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(S.start,S.end,.5),N!==!1&&this.renderer.animateScrolling(W)},_.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},_.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},_.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(S){S.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},_.prototype.setAutoScrollEditorIntoView=function(S){if(S){var N,W=this,V=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var G=this.$scrollAnchor;G.style.cssText="position:absolute",this.container.insertBefore(G,this.container.firstChild);var Q=this.on("changeSelection",function(){V=!0}),te=this.renderer.on("beforeRender",function(){V&&(N=W.renderer.container.getBoundingClientRect())}),ce=this.renderer.on("afterRender",function(){if(V&&N&&(W.isFocused()||W.searchBox&&W.searchBox.isFocused())){var ne=W.renderer,he=ne.$cursorLayer.$pixelPos,ue=ne.layerConfig,le=he.top-ue.offset;he.top>=0&&le+N.top<0?V=!0:he.top<ue.height&&he.top+N.top+ue.lineHeight>window.innerHeight?V=!1:V=null,V!=null&&(G.style.top=le+"px",G.style.left=he.left+"px",G.style.height=ue.lineHeight+"px",G.scrollIntoView(V)),V=N=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Q),this.renderer.off("afterRender",ce),this.renderer.off("beforeRender",te))}}},_.prototype.$resetCursorStyle=function(){var S=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(S)),N.isBlinking=!this.$readOnly&&S!="wide",x.setCssClass(N.element,"ace_slim-cursors",/slim/.test(S)))},_.prototype.prompt=function(S,N,W){var V=this;T.loadModule("ace/ext/prompt",function(G){G.prompt(V,S,N,W)})},Object.defineProperty(_.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new z(this.container))},set:function(S){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=S},enumerable:!1,configurable:!0}),_})();F.$uid=0,F.prototype.curOp=null,F.prototype.prevOp={},F.prototype.$mergeableCommands=["backspace","del","insertstring"],F.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"],["&&","||"],["==","!="]],v.implement(F.prototype,m),T.defineOptions(F.prototype,"editor",{selectionStyle:{set:function(_){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:_})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(_){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(_){var S=this;if(this.textInput.setReadOnly(_),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(W){var V=!1;if(W&&W.type=="keydown"){if(W&&W.key&&!W.ctrlKey&&!W.metaKey&&(W.key==" "&&W.preventDefault(),V=W.key.length==1),!V)return}else W&&W.type!=="exec"&&(V=!0);if(V){var G=x.createElement("div");G.textContent=R("editor.tooltip.disable-editing","Editing is disabled"),S.hoverTooltip.isOpen||S.hoverTooltip.showForRange(S,S.getSelectionRange(),G)}else S.hoverTooltip&&S.hoverTooltip.isOpen&&S.hoverTooltip.hide()});var N=this.textInput.getElement();_?(E.addListener(N,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(E.removeListener(N,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(_){this.textInput.setCopyWithEmptySelection(_)},initialValue:!1},cursorStyle:{set:function(_){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(_){this.setAutoScrollEditorIntoView(_)}},keyboardHandler:{set:function(_){this.setKeyboardHandler(_)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(_){this.session.setValue(_)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(_){this.setSession(_)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(_){this.renderer.$gutterLayer.setShowLineNumbers(_),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),_&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(_){this.$showLineNumbers&&_?O.attach(this):O.detach(this)}},placeholder:{set:function(_){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var S=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(S&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),x.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!S&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),x.addCssClass(this.container,"ace_hasPlaceholder");var N=x.createElement("div");N.className="ace_placeholder",N.textContent=this.$placeholder||"",this.renderer.placeholderNode=N,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!S&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(_){var S={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(V){V.blur(),V.renderer.scroller.focus()},readOnly:!0},N=function(V){if(V.target==this.renderer.scroller&&V.keyCode===I.enter){V.preventDefault();var G=this.getCursorPosition().row;this.isRowVisible(G)||this.scrollToLine(G,!0,!0),this.focus()}},W;_?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(p.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",R("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",R("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(S),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",R("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",R("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),W||(W=new w(this)),W.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(S),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),W&&W.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(_){this.$textInputAriaLabel=_},initialValue:""},enableMobileMenu:{set:function(_){this.$enableMobileMenu=_},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 O={getText:function(_,S){return(Math.abs(_.selection.lead.row-S)||S+1+(S<9?"·":""))+""},getWidth:function(_,S,N){return Math.max(S.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function(_,S){S.renderer.$loop.schedule(S.renderer.CHANGE_GUTTER)},attach:function(_){_.renderer.$gutterLayer.$renderer=this,_.on("changeSelection",this.update),this.update(null,_)},detach:function(_){_.renderer.$gutterLayer.$renderer==this&&(_.renderer.$gutterLayer.$renderer=null),_.off("changeSelection",this.update),this.update(null,_)}};u.Editor=F}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,u,$){var b=e("../lib/dom"),v=(function(){function x(f,p){this.element=f,this.canvasHeight=p||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return x.prototype.moveContainer=function(f){b.translate(this.element,0,-(f.firstRowScreen*f.lineHeight%this.canvasHeight)-f.offset*this.$offsetCoefficient)},x.prototype.pageChanged=function(f,p){return Math.floor(f.firstRowScreen*f.lineHeight/this.canvasHeight)!==Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)},x.prototype.computeLineTop=function(f,p,s){var o=p.firstRowScreen*p.lineHeight,a=Math.floor(o/this.canvasHeight),r=s.documentToScreenRow(f,0)*p.lineHeight;return r-a*this.canvasHeight},x.prototype.computeLineHeight=function(f,p,s){return p.lineHeight*s.getRowLineCount(f)},x.prototype.getLength=function(){return this.cells.length},x.prototype.get=function(f){return this.cells[f]},x.prototype.shift=function(){this.$cacheCell(this.cells.shift())},x.prototype.pop=function(){this.$cacheCell(this.cells.pop())},x.prototype.push=function(f){if(Array.isArray(f)){this.cells.push.apply(this.cells,f);for(var p=b.createFragment(this.element),s=0;s<f.length;s++)p.appendChild(f[s].element);this.element.appendChild(p)}else this.cells.push(f),this.element.appendChild(f.element)},x.prototype.unshift=function(f){if(Array.isArray(f)){this.cells.unshift.apply(this.cells,f);for(var p=b.createFragment(this.element),s=0;s<f.length;s++)p.appendChild(f[s].element);this.element.firstChild?this.element.insertBefore(p,this.element.firstChild):this.element.appendChild(p)}else this.cells.unshift(f),this.element.insertAdjacentElement("afterbegin",f.element)},x.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},x.prototype.$cacheCell=function(f){f&&(f.element.remove(),this.cellCache.push(f))},x.prototype.createCell=function(f,p,s,o){var a=this.cellCache.pop();if(!a){var r=b.createElement("div");o&&o(r),this.element.appendChild(r),a={element:r,text:"",row:f}}return a.row=f,a},x})();u.Lines=v}),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,u,$){var b=e("../lib/dom"),v=e("../lib/oop"),x=e("../lib/lang"),f=e("../lib/event_emitter").EventEmitter,p=e("./lines").Lines,s=e("../config").nls,o=(function(){function r(n){this.$showCursorMarker=null,this.element=b.createElement("div"),this.element.className="ace_layer ace_gutter-layer",n.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new p(this.element),this.$lines.$offsetCoefficient=1}return r.prototype.setSession=function(n){this.session&&this.session.off("change",this.$updateAnnotations),this.session=n,n&&n.on("change",this.$updateAnnotations)},r.prototype.addGutterDecoration=function(n,i){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(n,i)},r.prototype.removeGutterDecoration=function(n,i){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(n,i)},r.prototype.setAnnotations=function(n){this.$annotations=[];for(var i=0;i<n.length;i++){var h=n[i],m=h.row,y=this.$annotations[m];y||(y=this.$annotations[m]={text:[],type:[],displayText:[]});var L=h.text,T=h.text,k=h.type;L=L?x.escapeHTML(L):h.html||"",T=T||h.html||"",y.text.indexOf(L)===-1&&(y.text.push(L),y.type.push(k),y.displayText.push(T));var w=h.className;w?y.className=w:k==="error"?y.className=" ace_error":k==="security"&&!/\bace_error\b/.test(y.className)?y.className=" ace_security":k==="warning"&&!/\bace_(error|security)\b/.test(y.className)?y.className=" ace_warning":k==="info"&&!y.className?y.className=" ace_info":k==="hint"&&!y.className&&(y.className=" ace_hint")}},r.prototype.$updateAnnotations=function(n){if(this.$annotations.length){var i=n.start.row,h=n.end.row-i;if(h!==0)if(n.action=="remove")this.$annotations.splice(i,h+1,null);else{var m=new Array(h+1);m.unshift(i,1),this.$annotations.splice.apply(this.$annotations,m)}}},r.prototype.update=function(n){this.config=n;var i=this.session,h=n.firstRow,m=Math.min(n.lastRow+n.gutterOffset,i.getLength()-1);this.oldLastRow=m,this.config=n,this.$lines.moveContainer(n),this.$updateCursorRow();for(var y=i.getNextFoldLine(h),L=y?y.start.row:1/0,T=null,k=-1,w=h;;){if(w>L&&(w=y.end.row+1,y=i.getNextFoldLine(w,y),L=y?y.start.row:1/0),w>m){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}T=this.$lines.get(++k),T?T.row=w:(T=this.$lines.createCell(w,n,this.session,a),this.$lines.push(T)),this.$renderCell(T,n,y,w),w++}this._signal("afterRender"),this.$updateGutterWidth(n),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},r.prototype.$updateGutterWidth=function(n){var i=this.session,h=i.gutterRenderer||this.$renderer,m=i.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||i.$useWrapMode)&&(y=i.getLength()+m-1);var L=h?h.getWidth(i,y,n):y.toString().length*n.characterWidth,T=this.$padding||this.$computePadding();L+=T.left+T.right,L!==this.gutterWidth&&!isNaN(L)&&(this.gutterWidth=L,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",L))},r.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var n=this.session.selection.getCursor();this.$cursorRow!==n.row&&(this.$cursorRow=n.row)}},r.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var n=this.session.selection.cursor.row;if(this.$cursorRow=n,!(this.$cursorCell&&this.$cursorCell.row==n)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var i=this.$lines.cells;this.$cursorCell=null;for(var h=0;h<i.length;h++){var m=i[h];if(m.row>=this.$cursorRow){if(m.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(h>0&&y&&y.start.row==i[h-1].row)m=i[h-1];else break}m.element.className="ace_gutter-active-line "+m.element.className,this.$cursorCell=m;break}}}}},r.prototype.$updateCursorMarker=function(){if(this.session){var n=this.session;this.$highlightElement||(this.$highlightElement=b.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var i=n.selection.cursor,h=this.config,m=this.$lines,y=h.firstRowScreen*h.lineHeight,L=Math.floor(y/m.canvasHeight),T=n.documentToScreenRow(i)*h.lineHeight,k=T-L*m.canvasHeight;b.setStyle(this.$highlightElement.style,"height",h.lineHeight+"px"),b.setStyle(this.$highlightElement.style,"top",k+"px")}},r.prototype.scrollLines=function(n){var i=this.config;if(this.config=n,this.$updateCursorRow(),this.$lines.pageChanged(i,n))return this.update(n);this.$lines.moveContainer(n);var h=Math.min(n.lastRow+n.gutterOffset,this.session.getLength()-1),m=this.oldLastRow;if(this.oldLastRow=h,!i||m<n.firstRow)return this.update(n);if(h<i.firstRow)return this.update(n);if(i.firstRow<n.firstRow)for(var y=this.session.getFoldedRowCount(i.firstRow,n.firstRow-1);y>0;y--)this.$lines.shift();if(m>h)for(var y=this.session.getFoldedRowCount(h+1,m);y>0;y--)this.$lines.pop();n.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLines(n,n.firstRow,i.firstRow-1)),h>m&&this.$lines.push(this.$renderLines(n,m+1,h)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(n)},r.prototype.$renderLines=function(n,i,h){for(var m=[],y=i,L=this.session.getNextFoldLine(y),T=L?L.start.row:1/0;y>T&&(y=L.end.row+1,L=this.session.getNextFoldLine(y,L),T=L?L.start.row:1/0),!(y>h);){var k=this.$lines.createCell(y,n,this.session,a);this.$renderCell(k,n,L,y),m.push(k),y++}return m},r.prototype.$renderCell=function(n,i,h,m){var y=n.element,L=this.session,T=y.childNodes[0],k=y.childNodes[1],w=y.childNodes[2],R=y.childNodes[3],D=w.firstChild,I=L.$firstLineNumber,E=L.$breakpoints,z=L.$decorations,F=L.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&L.foldWidgets,_=h?h.start.row:Number.MAX_VALUE,S=i.lineHeight+"px",N=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",W=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",V=(F?F.getText(L,m):m+I).toString();if(this.$highlightGutterLine&&(m==this.$cursorRow||h&&m<this.$cursorRow&&m>=_&&this.$cursorRow<=h.end.row)&&(N+="ace_gutter-active-line ",this.$cursorCell!=n&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=n)),E[m]&&(N+=E[m]),z[m]&&(N+=z[m]),this.$annotations[m]&&m!==_&&(N+=this.$annotations[m].className),O){var G=O[m];G==null&&(G=O[m]=L.getFoldWidget(m))}if(G){var Q="ace_fold-widget ace_"+G,te=G=="start"&&m==_&&m<h.end.row;if(te){Q+=" ace_closed";for(var ce="",ne=!1,he=m+1;he<=h.end.row;he++)if(this.$annotations[he]){if(this.$annotations[he].className===" ace_error"){ne=!0,ce=" ace_error_fold";break}this.$annotations[he].className===" ace_security"?(ne=!0,ce=" ace_security_fold"):this.$annotations[he].className===" ace_warning"&&ce!==" ace_security_fold"&&(ne=!0,ce=" ace_warning_fold")}N+=ce}else Q+=" ace_open";k.className!=Q&&(k.className=Q),b.setStyle(k.style,"height",S),b.setStyle(k.style,"display","inline-block"),k.setAttribute("role","button"),k.setAttribute("tabindex","-1");var ue=L.getFoldWidgetRange(m);ue?k.setAttribute("aria-label",s("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ue.start.row+1,ue.end.row+1])):h?k.setAttribute("aria-label",s("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[h.start.row+1,h.end.row+1])):k.setAttribute("aria-label",s("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[m+1])),te?(k.setAttribute("aria-expanded","false"),k.setAttribute("title",s("gutter.code-folding.closed.title","Unfold code"))):(k.setAttribute("aria-expanded","true"),k.setAttribute("title",s("gutter.code-folding.open.title","Fold code")))}else k&&(b.setStyle(k.style,"display","none"),k.setAttribute("tabindex","0"),k.removeAttribute("role"),k.removeAttribute("aria-label"));var le=this.session.$gutterCustomWidgets[m];if(le?this.$addCustomWidget(m,le,n):R&&this.$removeCustomWidget(m,n),ne&&this.$showFoldedAnnotations){w.className="ace_gutter_annotation",D.className=W,D.className+=ce,b.setStyle(D.style,"height",S),b.setStyle(w.style,"display","block"),b.setStyle(w.style,"height",S);var me;switch(ce){case" ace_error_fold":me=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[V]);break;case" ace_security_fold":me=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[V]);break;case" ace_warning_fold":me=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[V]);break}w.setAttribute("aria-label",me),w.setAttribute("tabindex","-1"),w.setAttribute("role","button")}else if(this.$annotations[m]){w.className="ace_gutter_annotation",D.className=W,this.$useSvgGutterIcons?D.className+=this.$annotations[m].className:y.classList.add(this.$annotations[m].className.replace(" ","")),b.setStyle(D.style,"height",S),b.setStyle(w.style,"display","block"),b.setStyle(w.style,"height",S);var me;switch(this.$annotations[m].className){case" ace_error":me=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[V]);break;case" ace_security":me=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[V]);break;case" ace_warning":me=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[V]);break;case" ace_info":me=s("gutter.annotation.aria-label.info","Info, read annotations row $0",[V]);break;case" ace_hint":me=s("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[V]);break}w.setAttribute("aria-label",me),w.setAttribute("tabindex","-1"),w.setAttribute("role","button")}else b.setStyle(w.style,"display","none"),w.removeAttribute("aria-label"),w.removeAttribute("role"),w.setAttribute("tabindex","0");return V!==T.data&&(T.data=V),y.className!=N&&(y.className=N),b.setStyle(n.element.style,"height",this.$lines.computeLineHeight(m,i,L)+"px"),b.setStyle(n.element.style,"top",this.$lines.computeLineTop(m,i,L)+"px"),n.text=V,w.style.display==="none"&&k.style.display==="none"&&!le?n.element.setAttribute("aria-hidden",!0):n.element.setAttribute("aria-hidden",!1),n},r.prototype.setHighlightGutterLine=function(n){this.$highlightGutterLine=n,!n&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},r.prototype.setShowLineNumbers=function(n){this.$renderer=!n&&{getWidth:function(){return 0},getText:function(){return""}}},r.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},r.prototype.setShowFoldWidgets=function(n){n?b.addCssClass(this.element,"ace_folding-enabled"):b.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=n,this.$padding=null},r.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},r.prototype.$hideFoldWidget=function(n,i){var h=i||this.$getGutterCell(n);if(h&&h.element){var m=h.element.childNodes[1];m&&b.setStyle(m.style,"display","none")}},r.prototype.$showFoldWidget=function(n,i){var h=i||this.$getGutterCell(n);if(h&&h.element){var m=h.element.childNodes[1];m&&this.session.foldWidgets&&this.session.foldWidgets[h.row]&&b.setStyle(m.style,"display","inline-block")}},r.prototype.$getGutterCell=function(n){var i=this.$lines.cells,h=0,m=i.length-1;if(!(n<i[0].row||n>i[m].row)){for(;h<=m;){var y=Math.floor((h+m)/2),L=i[y];if(L.row>n)m=y-1;else if(L.row<n)h=y+1;else return L}return L}},r.prototype.$addCustomWidget=function(n,i,h){var m=i.className,y=i.label,L=i.title,T=i.callbacks;this.session.$gutterCustomWidgets[n]={className:m,label:y,title:L,callbacks:T},this.$hideFoldWidget(n,h);var k=h||this.$getGutterCell(n);if(k&&k.element){var w=k.element.querySelector(".ace_custom-widget");w&&w.remove(),w=b.createElement("span"),w.className="ace_custom-widget ".concat(m),w.setAttribute("tabindex","-1"),w.setAttribute("role","button"),w.setAttribute("aria-label",y),w.setAttribute("title",L),b.setStyle(w.style,"display","inline-block"),b.setStyle(w.style,"height","inherit"),T&&T.onClick&&w.addEventListener("click",function(R){T.onClick(R,n),R.stopPropagation()}),k.element.appendChild(w)}},r.prototype.$removeCustomWidget=function(n,i){delete this.session.$gutterCustomWidgets[n],this.$showFoldWidget(n,i);var h=i||this.$getGutterCell(n);if(h&&h.element){var m=h.element.querySelector(".ace_custom-widget");m&&h.element.removeChild(m)}},r.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var n=b.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(n.borderLeftWidth)||0)+(parseInt(n.paddingLeft)||0)+1,this.$padding.right=(parseInt(n.borderRightWidth)||0)+(parseInt(n.paddingRight)||0),this.$padding},r.prototype.getRegion=function(n){var i=this.$padding||this.$computePadding(),h=this.element.getBoundingClientRect();if(n.x<i.left+h.left)return"markers";if(this.$showFoldWidgets&&n.x>h.right-i.right)return"foldWidgets"},r})();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer=void 0,o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,v.implement(o.prototype,f);function a(r){var n=document.createTextNode("");r.appendChild(n);var i=b.createElement("span");r.appendChild(i);var h=b.createElement("span");r.appendChild(h);var m=b.createElement("span");return h.appendChild(m),r}u.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,u,$){var b=e("../range").Range,v=e("../lib/dom"),x=(function(){function p(s){this.element=v.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}return p.prototype.setPadding=function(s){this.$padding=s},p.prototype.setSession=function(s){this.session=s},p.prototype.setMarkers=function(s){this.markers=s},p.prototype.elt=function(s,o){var a=this.i!=-1&&this.element.childNodes[this.i];a?this.i++:(a=document.createElement("div"),this.element.appendChild(a),this.i=-1),a.style.cssText=o,a.className=s},p.prototype.update=function(s){if(s){this.config=s,this.i=0;var o;for(var a in this.markers){var r=this.markers[a];if(!r.range){r.update(o,this,this.session,s);continue}var n=r.range.clipRows(s.firstRow,s.lastRow);if(!n.isEmpty())if(n=n.toScreenRange(this.session),r.renderer){var i=this.$getTop(n.start.row,s),h=this.$padding+n.start.column*s.characterWidth;r.renderer(o,n,h,i,s)}else r.type=="fullLine"?this.drawFullLineMarker(o,n,r.clazz,s):r.type=="screenLine"?this.drawScreenLineMarker(o,n,r.clazz,s):n.isMultiLine()?r.type=="text"?this.drawTextMarker(o,n,r.clazz,s):this.drawMultiLineMarker(o,n,r.clazz,s):this.drawSingleLineMarker(o,n,r.clazz+" ace_start ace_br15",s)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},p.prototype.$getTop=function(s,o){return(s-o.firstRowScreen)*o.lineHeight},p.prototype.drawTextMarker=function(s,o,a,r,n){for(var i=this.session,h=o.start.row,m=o.end.row,y=h,L=0,T=0,k=i.getScreenLastRowColumn(y),w=new b(y,o.start.column,y,T);y<=m;y++)w.start.row=w.end.row=y,w.start.column=y==h?o.start.column:i.getRowWrapIndent(y),w.end.column=k,L=T,T=k,k=y+1<m?i.getScreenLastRowColumn(y+1):y==m?0:o.end.column,this.drawSingleLineMarker(s,w,a+(y==h?" ace_start":"")+" ace_br"+f(y==h||y==h+1&&o.start.column,L<T,T>k,y==m),r,y==m?0:1,n)},p.prototype.drawMultiLineMarker=function(s,o,a,r,n){var i=this.$padding,h=r.lineHeight,m=this.$getTop(o.start.row,r),y=i+o.start.column*r.characterWidth;if(n=n||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var L=o.clone();L.end.row=L.start.row,L.end.column=this.session.getLine(L.start.row).length,this.drawBidiSingleLineMarker(s,L,a+" ace_br1 ace_start",r,null,n)}else this.elt(a+" ace_br1 ace_start","height:"+h+"px;right:"+i+"px;top:"+m+"px;left:"+y+"px;"+(n||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var L=o.clone();L.start.row=L.end.row,L.start.column=0,this.drawBidiSingleLineMarker(s,L,a+" ace_br12",r,null,n)}else{m=this.$getTop(o.end.row,r);var T=o.end.column*r.characterWidth;this.elt(a+" ace_br12","height:"+h+"px;width:"+T+"px;top:"+m+"px;left:"+i+"px;"+(n||""))}if(h=(o.end.row-o.start.row-1)*r.lineHeight,!(h<=0)){m=this.$getTop(o.start.row+1,r);var k=(o.start.column?1:0)|(o.end.column?0:8);this.elt(a+(k?" ace_br"+k:""),"height:"+h+"px;right:"+i+"px;top:"+m+"px;left:"+i+"px;"+(n||""))}},p.prototype.drawSingleLineMarker=function(s,o,a,r,n,i){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(s,o,a,r,n,i);var h=r.lineHeight,m=(o.end.column+(n||0)-o.start.column)*r.characterWidth,y=this.$getTop(o.start.row,r),L=this.$padding+o.start.column*r.characterWidth;this.elt(a,"height:"+h+"px;width:"+m+"px;top:"+y+"px;left:"+L+"px;"+(i||""))},p.prototype.drawBidiSingleLineMarker=function(s,o,a,r,n,i){var h=r.lineHeight,m=this.$getTop(o.start.row,r),y=this.$padding,L=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);L.forEach(function(T){this.elt(a,"height:"+h+"px;width:"+(T.width+(n||0))+"px;top:"+m+"px;left:"+(y+T.left)+"px;"+(i||""))},this)},p.prototype.drawFullLineMarker=function(s,o,a,r,n){var i=this.$getTop(o.start.row,r),h=r.lineHeight;o.start.row!=o.end.row&&(h+=this.$getTop(o.end.row,r)-i),this.elt(a,"height:"+h+"px;top:"+i+"px;left:0;right:0;"+(n||""))},p.prototype.drawScreenLineMarker=function(s,o,a,r,n){var i=this.$getTop(o.start.row,r),h=r.lineHeight;this.elt(a,"height:"+h+"px;top:"+i+"px;left:0;right:0;"+(n||""))},p})();x.prototype.$padding=0;function f(p,s,o,a){return(p?1:0)|(s?2:0)|(o?4:0)|(a?8:0)}u.Marker=x}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,u,$){var b=new Set(["text","rparen","lparen"]);u.isTextToken=function(v){return b.has(v)}}),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,u,$){var b=e("../lib/oop"),v=e("../lib/dom"),x=e("../lib/lang"),f=e("./lines").Lines,p=e("../lib/event_emitter").EventEmitter,s=e("../config").nls,o=e("./text_util").isTextToken,a=(function(){function r(n){this.dom=v,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",n.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new f(this.element)}return r.prototype.$updateEolChar=function(){var n=this.session.doc,i=n.getNewLineCharacter()==`
210
- `&&n.getNewLineMode()!="windows",h=i?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=h)return this.EOL_CHAR=h,!0},r.prototype.setPadding=function(n){this.$padding=n,this.element.style.margin="0 "+n+"px"},r.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},r.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},r.prototype.$setFontMetrics=function(n){this.$fontMetrics=n,this.$fontMetrics.on("changeCharacterSize",(function(i){this._signal("changeCharacterSize",i)}).bind(this)),this.$pollSizeChanges()},r.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},r.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},r.prototype.setSession=function(n){this.session=n,n&&this.$computeTabString()},r.prototype.setShowInvisibles=function(n){return this.showInvisibles==n?!1:(this.showInvisibles=n,typeof n=="string"?(this.showSpaces=/tab/i.test(n),this.showTabs=/space/i.test(n),this.showEOL=/eol/i.test(n)):this.showSpaces=this.showTabs=this.showEOL=n,this.$computeTabString(),!0)},r.prototype.setDisplayIndentGuides=function(n){return this.displayIndentGuides==n?!1:(this.displayIndentGuides=n,this.$computeTabString(),!0)},r.prototype.setHighlightIndentGuides=function(n){return this.$highlightIndentGuides===n?!1:(this.$highlightIndentGuides=n,n)},r.prototype.$computeTabString=function(){var n=this.session.getTabSize();this.tabSize=n;for(var i=this.$tabStrings=[0],h=1;h<n+1;h++)if(this.showTabs){var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_tab",m.textContent=x.stringRepeat(this.TAB_CHAR,h),i.push(m)}else i.push(this.dom.createTextNode(x.stringRepeat(" ",h),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var y="ace_indent-guide",L=this.showSpaces?" ace_invisible ace_invisible_space":"",T=this.showSpaces?x.stringRepeat(this.SPACE_CHAR,this.tabSize):x.stringRepeat(" ",this.tabSize),k=this.showTabs?" ace_invisible ace_invisible_tab":"",w=this.showTabs?x.stringRepeat(this.TAB_CHAR,this.tabSize):T,m=this.dom.createElement("span");m.className=y+L,m.textContent=T,this.$tabStrings[" "]=m;var m=this.dom.createElement("span");m.className=y+k,m.textContent=w,this.$tabStrings[" "]=m}},r.prototype.updateLines=function(n,i,h){if(this.config.lastRow!=n.lastRow||this.config.firstRow!=n.firstRow)return this.update(n);this.config=n;for(var m=Math.max(i,n.firstRow),y=Math.min(h,n.lastRow),L=this.element.childNodes,T=0,w=n.firstRow;w<m;w++){var R=this.session.getFoldLine(w);if(R)if(R.containsRow(m)){m=R.start.row;break}else w=R.end.row;T++}for(var k=!1,w=m,R=this.session.getNextFoldLine(w),D=R?R.start.row:1/0;w>D&&(w=R.end.row+1,R=this.session.getNextFoldLine(w,R),D=R?R.start.row:1/0),!(w>y);){var I=L[T++];if(I){this.dom.removeChildren(I),this.$renderLine(I,w,w==D?R:!1),k&&(I.style.top=this.$lines.computeLineTop(w,n,this.session)+"px");var E=n.lineHeight*this.session.getRowLength(w)+"px";I.style.height!=E&&(k=!0,I.style.height=E)}w++}if(k)for(;T<this.$lines.cells.length;){var z=this.$lines.cells[T++];z.element.style.top=this.$lines.computeLineTop(z.row,n,this.session)+"px"}},r.prototype.scrollLines=function(n){var i=this.config;if(this.config=n,this.$lines.pageChanged(i,n))return this.update(n);this.$lines.moveContainer(n);var h=n.lastRow,m=i?i.lastRow:-1;if(!i||m<n.firstRow)return this.update(n);if(h<i.firstRow)return this.update(n);if(!i||i.lastRow<n.firstRow)return this.update(n);if(n.lastRow<i.firstRow)return this.update(n);if(i.firstRow<n.firstRow)for(var y=this.session.getFoldedRowCount(i.firstRow,n.firstRow-1);y>0;y--)this.$lines.shift();if(i.lastRow>n.lastRow)for(var y=this.session.getFoldedRowCount(n.lastRow+1,i.lastRow);y>0;y--)this.$lines.pop();n.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLinesFragment(n,n.firstRow,i.firstRow-1)),n.lastRow>i.lastRow&&this.$lines.push(this.$renderLinesFragment(n,i.lastRow+1,n.lastRow)),this.$highlightIndentGuide()},r.prototype.$renderLinesFragment=function(n,i,h){for(var m=[],y=i,L=this.session.getNextFoldLine(y),T=L?L.start.row:1/0;y>T&&(y=L.end.row+1,L=this.session.getNextFoldLine(y,L),T=L?L.start.row:1/0),!(y>h);){var k=this.$lines.createCell(y,n,this.session),w=k.element;this.dom.removeChildren(w),v.setStyle(w.style,"height",this.$lines.computeLineHeight(y,n,this.session)+"px"),v.setStyle(w.style,"top",this.$lines.computeLineTop(y,n,this.session)+"px"),this.$renderLine(w,y,y==T?L:!1),this.$useLineGroups()?w.className="ace_line_group":w.className="ace_line",m.push(k),y++}return m},r.prototype.update=function(n){this.$lines.moveContainer(n),this.config=n;for(var i=n.firstRow,h=n.lastRow,m=this.$lines;m.getLength();)m.pop();m.push(this.$renderLinesFragment(n,i,h))},r.prototype.$renderToken=function(n,i,h,m){for(var y=this,L=/(\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,T=this.dom.createFragment(this.element),k,w=0;k=L.exec(m);){var R=k[1],D=k[2],I=k[3],E=k[4],z=k[5];if(!(!y.showSpaces&&D)){var F=w!=k.index?m.slice(w,k.index):"";if(w=k.index+k[0].length,F&&T.appendChild(this.dom.createTextNode(F,this.element)),R){var O=y.session.getScreenTabSize(i+k.index),_=y.$tabStrings[O].cloneNode(!0);_.charCount=1,T.appendChild(_),i+=O-1}else if(D)if(y.showSpaces){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space",S.textContent=x.stringRepeat(y.SPACE_CHAR,D.length),T.appendChild(S)}else T.appendChild(this.dom.createTextNode(D,this.element));else if(I){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space ace_invalid",S.textContent=x.stringRepeat(y.SPACE_CHAR,I.length),T.appendChild(S)}else if(E){i+=1;var S=this.dom.createElement("span");S.style.width=y.config.characterWidth*2+"px",S.className=y.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",S.textContent=y.showSpaces?y.SPACE_CHAR:E,T.appendChild(S)}else if(z){i+=1;var S=this.dom.createElement("span");S.style.width=y.config.characterWidth*2+"px",S.className="ace_cjk",S.textContent=z,T.appendChild(S)}}}if(T.appendChild(this.dom.createTextNode(w?m.slice(w):m,this.element)),o(h.type))n.appendChild(T);else{var N="ace_"+h.type.replace(/\./g," ace_"),S=this.dom.createElement("span");h.type=="fold"&&(S.style.width=h.value.length*this.config.characterWidth+"px",S.setAttribute("title",s("inline-fold.closed.title","Unfold code"))),S.className=N,S.appendChild(T),n.appendChild(S)}return i+m.length},r.prototype.renderIndentGuide=function(n,i,h){var m=i.search(this.$indentGuideRe);if(m<=0||m>=h)return i;if(i[0]==" "){m-=m%this.tabSize;for(var y=m/this.tabSize,L=0;L<y;L++)n.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),i.substr(m)}else if(i[0]==" "){for(var L=0;L<m;L++)n.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),i.substr(m)}return this.$highlightIndentGuide(),i},r.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var n=this.session.doc.$lines;if(n){var i=this.session.selection.getCursor(),h=/^\s*/.exec(this.session.doc.getLine(i.row))[0].length,m=Math.floor(h/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:m,start:i.row};var y=this.session.$bracketHighlight;if(y){for(var L=this.session.$bracketHighlight.ranges,T=0;T<L.length;T++)if(i.row!==L[T].start.row){this.$highlightIndentGuideMarker.end=L[T].start.row+1,i.row>L[T].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&n[i.row]!==""&&i.column===n[i.row].length){this.$highlightIndentGuideMarker.dir=1;for(var T=i.row+1;T<n.length;T++){var k=n[T],w=/^\s*/.exec(k)[0].length;if(k!==""&&(this.$highlightIndentGuideMarker.end=T,w<=h))break}}this.$renderHighlightIndentGuide()}}},r.prototype.$clearActiveIndentGuide=function(){for(var n=this.element.querySelectorAll(".ace_indent-guide-active"),i=0;i<n.length;i++)n[i].classList.remove("ace_indent-guide-active")},r.prototype.$setIndentGuideActive=function(n,i){var h=this.session.doc.getLine(n.row);if(h!==""){var m=n.element;if(n.element.classList&&n.element.classList.contains("ace_line_group"))if(n.element.childNodes.length>0)m=n.element.childNodes[0];else return;var y=m.childNodes;if(y){var L=y[i-1];L&&L.classList&&L.classList.contains("ace_indent-guide")&&L.classList.add("ace_indent-guide-active")}}},r.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var n=this.$lines.cells;this.$clearActiveIndentGuide();var i=this.$highlightIndentGuideMarker.indentLevel;if(i!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var h=0;h<n.length;h++){var m=n[h];if(this.$highlightIndentGuideMarker.end&&m.row>=this.$highlightIndentGuideMarker.start+1){if(m.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(m,i)}}else for(var h=n.length-1;h>=0;h--){var m=n[h];if(this.$highlightIndentGuideMarker.end&&m.row<this.$highlightIndentGuideMarker.start){if(m.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(m,i)}}}},r.prototype.$createLineElement=function(n){var i=this.dom.createElement("div");return i.className="ace_line",i.style.height=this.config.lineHeight+"px",i},r.prototype.$renderWrappedLine=function(n,i,h){var m=0,y=0,L=h[0],T=0,k=this.$createLineElement();n.appendChild(k);for(var w=0;w<i.length;w++){var R=i[w],D=R.value;if(w==0&&this.displayIndentGuides){if(m=D.length,D=this.renderIndentGuide(k,D,L),!D)continue;m-=D.length}if(m+D.length<L)T=this.$renderToken(k,T,R,D),m+=D.length;else{for(;m+D.length>=L;){T=this.$renderToken(k,T,R,D.substring(0,L-m)),D=D.substring(L-m),m=L,k=this.$createLineElement(),n.appendChild(k);var I=this.dom.createTextNode(x.stringRepeat(" ",h.indent),this.element);I.charCount=0,k.appendChild(I),y++,T=0,L=h[y]||Number.MAX_VALUE}D.length!=0&&(m+=D.length,T=this.$renderToken(k,T,R,D))}}h[h.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,T,null,"",!0)},r.prototype.$renderSimpleLine=function(n,i){for(var h=0,m=0;m<i.length;m++){var y=i[m],L=y.value;if(!(m==0&&this.displayIndentGuides&&(L=this.renderIndentGuide(n,L),!L))){if(h+L.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(n,h,y,L);h=this.$renderToken(n,h,y,L)}}},r.prototype.$renderOverflowMessage=function(n,i,h,m,y){h&&this.$renderToken(n,i,h,m.slice(0,this.MAX_LINE_LENGTH-i));var L=this.dom.createElement("span");L.className="ace_inline_button ace_keyword ace_toggle_wrap",L.textContent=y?"<hide>":"<click to see more...>",n.appendChild(L)},r.prototype.$renderLine=function(n,i,h){if(!h&&h!=!1&&(h=this.session.getFoldLine(i)),h)var m=this.$getFoldLineTokens(i,h);else var m=this.session.getTokens(i);var y=n;if(m.length){var L=this.session.getRowSplitData(i);if(L&&L.length){this.$renderWrappedLine(n,m,L);var y=n.lastChild}else{var y=n;this.$useLineGroups()&&(y=this.$createLineElement(),n.appendChild(y)),this.$renderSimpleLine(y,m)}}else this.$useLineGroups()&&(y=this.$createLineElement(),n.appendChild(y));if(this.showEOL&&y){h&&(i=h.end.row);var T=this.dom.createElement("span");T.className="ace_invisible ace_invisible_eol",T.textContent=i==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,y.appendChild(T)}},r.prototype.$getFoldLineTokens=function(n,i){var h=this.session,m=[];function y(T,k,w){for(var R=0,D=0;D+T[R].value.length<k;)if(D+=T[R].value.length,R++,R==T.length)return;if(D!=k){var I=T[R].value.substring(k-D);I.length>w-k&&(I=I.substring(0,w-k)),m.push({type:T[R].type,value:I}),D=k+I.length,R+=1}for(;D<w&&R<T.length;){var I=T[R].value;I.length+D>w?m.push({type:T[R].type,value:I.substring(0,w-D)}):m.push(T[R]),D+=I.length,R+=1}}var L=h.getTokens(n);return i.walk(function(T,k,w,R,D){T!=null?m.push({type:"fold",value:T}):(D&&(L=h.getTokens(k)),L.length&&y(L,R,w))},i.end.row,this.session.getLine(i.end.row).length),m},r.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},r})();a.prototype.EOF_CHAR="¶",a.prototype.EOL_CHAR_LF="¬",a.prototype.EOL_CHAR_CRLF="¤",a.prototype.EOL_CHAR=a.prototype.EOL_CHAR_LF,a.prototype.TAB_CHAR="—",a.prototype.SPACE_CHAR="·",a.prototype.$padding=0,a.prototype.MAX_LINE_LENGTH=1e4,a.prototype.showInvisibles=!1,a.prototype.showSpaces=!1,a.prototype.showTabs=!1,a.prototype.showEOL=!1,a.prototype.displayIndentGuides=!0,a.prototype.$highlightIndentGuides=!0,a.prototype.$tabStrings=[],a.prototype.destroy={},a.prototype.onChangeTabSize=a.prototype.$computeTabString,b.implement(a.prototype,p),u.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,u,$){var b=e("../lib/dom"),v=(function(){function x(f){this.element=b.createElement("div"),this.element.className="ace_layer ace_cursor-layer",f.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),b.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return x.prototype.$updateOpacity=function(f){for(var p=this.cursors,s=p.length;s--;)b.setStyle(p[s].style,"opacity",f?"":"0")},x.prototype.$startCssAnimation=function(){for(var f=this.cursors,p=f.length;p--;)f[p].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&b.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},x.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,b.removeCssClass(this.element,"ace_animate-blinking")},x.prototype.setPadding=function(f){this.$padding=f},x.prototype.setSession=function(f){this.session=f},x.prototype.setBlinking=function(f){f!=this.isBlinking&&(this.isBlinking=f,this.restartTimer())},x.prototype.setBlinkInterval=function(f){f!=this.blinkInterval&&(this.blinkInterval=f,this.restartTimer())},x.prototype.setSmoothBlinking=function(f){f!=this.smoothBlinking&&(this.smoothBlinking=f,b.setCssClass(this.element,"ace_smooth-blinking",f),this.$updateCursors(!0),this.restartTimer())},x.prototype.addCursor=function(){var f=b.createElement("div");return f.className="ace_cursor",this.element.appendChild(f),this.cursors.push(f),f},x.prototype.removeCursor=function(){if(this.cursors.length>1){var f=this.cursors.pop();return f.parentNode.removeChild(f),f}},x.prototype.hideCursor=function(){this.isVisible=!1,b.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.showCursor=function(){this.isVisible=!0,b.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.restartTimer=function(){var f=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,b.removeCssClass(this.element,"ace_smooth-blinking")),f(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&b.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),b.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var p=(function(){this.timeoutId=setTimeout(function(){f(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){f(!0),p()},this.blinkInterval),p()}},x.prototype.getPixelPosition=function(f,p){if(!this.config||!this.session)return{left:0,top:0};f||(f=this.session.selection.getCursor());var s=this.session.documentToScreenPosition(f),o=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,f.row)?this.session.$bidiHandler.getPosLeft(s.column):s.column*this.config.characterWidth),a=(s.row-(p?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:a}},x.prototype.isCursorInView=function(f,p){return f.top>=0&&f.top<p.maxHeight},x.prototype.update=function(f){this.config=f;var p=this.session.$selectionMarkers,s=0,o=0;(p===void 0||p.length===0)&&(p=[{cursor:null}]);for(var s=0,a=p.length;s<a;s++){var r=this.getPixelPosition(p[s].cursor,!0);if(!((r.top>f.height+f.offset||r.top<0)&&s>1)){var n=this.cursors[o++]||this.addCursor(),i=n.style;this.drawCursor?this.drawCursor(n,r,f,p[s],this.session):this.isCursorInView(r,f)?(b.setStyle(i,"display","block"),b.translate(n,r.left,r.top),b.setStyle(i,"width",Math.round(f.characterWidth)+"px"),b.setStyle(i,"height",f.lineHeight+"px")):b.setStyle(i,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var h=this.session.getOverwrite();this.$setOverwrite(h),this.$pixelPos=r,this.restartTimer()},x.prototype.$setOverwrite=function(f){f!=this.overwrite&&(this.overwrite=f,f?b.addCssClass(this.element,"ace_overwrite-cursors"):b.removeCssClass(this.element,"ace_overwrite-cursors"))},x.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},x})();v.prototype.$padding=0,v.prototype.drawCursor=null,u.Cursor=v}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,u,$){var b=this&&this.__extends||(function(){var n=function(i,h){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,y){m.__proto__=y}||function(m,y){for(var L in y)Object.prototype.hasOwnProperty.call(y,L)&&(m[L]=y[L])},n(i,h)};return function(i,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");n(i,h);function m(){this.constructor=i}i.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}})(),v=e("./lib/oop"),x=e("./lib/dom"),f=e("./lib/event"),p=e("./lib/event_emitter").EventEmitter,s=32768,o=(function(){function n(i,h){this.element=x.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+h,this.inner=x.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,f.addListener(this.element,"scroll",this.onScroll.bind(this)),f.addListener(this.element,"mousedown",f.preventDefault)}return n.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},n})();v.implement(o.prototype,p);var a=(function(n){b(i,n);function i(h,m){var y=n.call(this,h,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,m.$scrollbarWidth=y.width=x.scrollbarWidth(h.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return i.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var h=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-h)/(this.coeff-h)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(h){this.element.style.height=h+"px"},i.prototype.setScrollHeight=function(h){this.scrollHeight=h,h>s?(this.coeff=s/h,h=s):this.coeff!=1&&(this.coeff=1),this.inner.style.height=h+"px"},i.prototype.setScrollTop=function(h){this.scrollTop!=h&&(this.skipEvent=!0,this.scrollTop=h,this.element.scrollTop=h*this.coeff)},i})(o);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var r=(function(n){b(i,n);function i(h,m){var y=n.call(this,h,"-h")||this;return y.scrollLeft=0,y.height=m.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return i.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.setWidth=function(h){this.element.style.width=h+"px"},i.prototype.setInnerWidth=function(h){this.inner.style.width=h+"px"},i.prototype.setScrollWidth=function(h){this.inner.style.width=h+"px"},i.prototype.setScrollLeft=function(h){this.scrollLeft!=h&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=h)},i})(o);u.ScrollBar=a,u.ScrollBarV=a,u.ScrollBarH=r,u.VScrollBar=a,u.HScrollBar=r}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,u,$){var b=this&&this.__extends||(function(){var r=function(n,i){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,m){h.__proto__=m}||function(h,m){for(var y in m)Object.prototype.hasOwnProperty.call(m,y)&&(h[y]=m[y])},r(n,i)};return function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");r(n,i);function h(){this.constructor=n}n.prototype=i===null?Object.create(i):(h.prototype=i.prototype,new h)}})(),v=e("./lib/oop"),x=e("./lib/dom"),f=e("./lib/event"),p=e("./lib/event_emitter").EventEmitter;x.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
211
- position: absolute;
212
- background: rgba(128, 128, 128, 0.6);
213
- -moz-box-sizing: border-box;
214
- box-sizing: border-box;
215
- border: 1px solid #bbb;
216
- border-radius: 2px;
217
- z-index: 8;
218
- }
219
- .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
220
- position: absolute;
221
- z-index: 6;
222
- background: none;
223
- overflow: hidden!important;
224
- }
225
- .ace_editor>.ace_sb-v {
226
- z-index: 6;
227
- right: 0;
228
- top: 0;
229
- width: 12px;
230
- }
231
- .ace_editor>.ace_sb-v div {
232
- z-index: 8;
233
- right: 0;
234
- width: 100%;
235
- }
236
- .ace_editor>.ace_sb-h {
237
- bottom: 0;
238
- left: 0;
239
- height: 12px;
240
- }
241
- .ace_editor>.ace_sb-h div {
242
- bottom: 0;
243
- height: 100%;
244
- }
245
- .ace_editor>.ace_sb_grabbed {
246
- z-index: 8;
247
- background: #000;
248
- }`,"ace_scrollbar.css",!1);var s=(function(){function r(n,i){this.element=x.createElement("div"),this.element.className="ace_sb"+i,this.inner=x.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,f.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return r.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},r})();v.implement(s.prototype,p);var o=(function(r){b(n,r);function n(i,h){var m=r.call(this,i,"-v")||this;return m.scrollTop=0,m.scrollHeight=0,m.parent=i,m.width=m.VScrollWidth,m.renderer=h,m.inner.style.width=m.element.style.width=(m.width||15)+"px",m.$minWidth=0,m}return n.prototype.onMouseDown=function(i,h){if(i==="mousedown"&&!(f.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var m=this,y=h.clientY,L=function(E){y=E.clientY},T=function(){clearInterval(D)},k=h.clientY,w=this.thumbTop,R=function(){if(y!==void 0){var E=m.scrollTopFromThumbTop(w+y-k);E!==m.scrollTop&&m._emit("scroll",{data:E})}};f.capture(this.inner,L,T);var D=setInterval(R,20);return f.preventDefault(h)}var I=h.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(I)}),f.preventDefault(h)}},n.prototype.getHeight=function(){return this.height},n.prototype.scrollTopFromThumbTop=function(i){var h=i*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return h=h>>0,h<0?h=0:h>this.pageHeight-this.viewHeight&&(h=this.pageHeight-this.viewHeight),h},n.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},n.prototype.setHeight=function(i){this.height=Math.max(0,i),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},n.prototype.setScrollHeight=function(i,h){this.pageHeight===i&&!h||(this.pageHeight=i,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},n.prototype.setScrollTop=function(i){this.scrollTop=i,i<0&&(i=0),this.thumbTop=i*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},n})(s);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var a=(function(r){b(n,r);function n(i,h){var m=r.call(this,i,"-h")||this;return m.scrollLeft=0,m.scrollWidth=0,m.height=m.HScrollHeight,m.inner.style.height=m.element.style.height=(m.height||12)+"px",m.renderer=h,m}return n.prototype.onMouseDown=function(i,h){if(i==="mousedown"&&!(f.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var m=this,y=h.clientX,L=function(E){y=E.clientX},T=function(){clearInterval(D)},k=h.clientX,w=this.thumbLeft,R=function(){if(y!==void 0){var E=m.scrollLeftFromThumbLeft(w+y-k);E!==m.scrollLeft&&m._emit("scroll",{data:E})}};f.capture(this.inner,L,T);var D=setInterval(R,20);return f.preventDefault(h)}var I=h.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(I)}),f.preventDefault(h)}},n.prototype.getHeight=function(){return this.isVisible?this.height:0},n.prototype.scrollLeftFromThumbLeft=function(i){var h=i*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return h=h>>0,h<0?h=0:h>this.pageWidth-this.viewWidth&&(h=this.pageWidth-this.viewWidth),h},n.prototype.setWidth=function(i){this.width=Math.max(0,i),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},n.prototype.setScrollWidth=function(i,h){this.pageWidth===i&&!h||(this.pageWidth=i,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},n.prototype.setScrollLeft=function(i){this.scrollLeft=i,i<0&&(i=0),this.thumbLeft=i*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},n})(s);a.prototype.setInnerWidth=a.prototype.setScrollWidth,u.ScrollBar=o,u.ScrollBarV=o,u.ScrollBarH=a,u.VScrollBar=o,u.HScrollBar=a}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,u,$){var b=e("./lib/event"),v=(function(){function x(f,p){this.onRender=f,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=p||window;var s=this;this._flush=function(o){s.pending=!1;var a=s.changes;if(a&&(b.blockIdle(100),s.changes=0,s.onRender(a)),s.changes){if(s.$recursionLimit--<0)return;s.schedule()}else s.$recursionLimit=2}}return x.prototype.schedule=function(f){this.changes=this.changes|f,this.changes&&!this.pending&&(b.nextFrame(this._flush),this.pending=!0)},x.prototype.clear=function(f){var p=this.changes;return this.changes=0,p},x})();u.RenderLoop=v}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,u,$){var b=e("../lib/oop"),v=e("../lib/dom"),x=e("../lib/lang"),f=e("../lib/event"),p=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,o=512,a=typeof ResizeObserver=="function",r=200,n=(function(){function i(h){this.el=v.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=v.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=v.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),h.appendChild(this.el),this.$measureNode.textContent=x.stringRepeat("X",o),this.$characterSize={width:0,height:0},a?this.$addObserver():this.checkForSizeChanges()}return i.prototype.$setMeasureNodeStyles=function(h,m){h.width=h.height="auto",h.left=h.top="0px",h.visibility="hidden",h.position="absolute",h.whiteSpace="pre",p.isIE<8?h["font-family"]="inherit":h.font="inherit",h.overflow=m?"hidden":"visible"},i.prototype.checkForSizeChanges=function(h){if(h===void 0&&(h=this.$measureSizes()),h&&(this.$characterSize.width!==h.width||this.$characterSize.height!==h.height)){this.$measureNode.style.fontWeight="bold";var m=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=h,this.charSizes=Object.create(null),this.allowBoldFonts=m&&m.width===h.width&&m.height===h.height,this._emit("changeCharacterSize",{data:h})}},i.prototype.$addObserver=function(){var h=this;this.$observer=new window.ResizeObserver(function(m){h.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},i.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var h=this;return this.$pollSizeChangesTimer=f.onIdle(function m(){h.checkForSizeChanges(),f.onIdle(m,500)},500)},i.prototype.setPolling=function(h){h?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},i.prototype.$measureSizes=function(h){var m={height:(h||this.$measureNode).clientHeight,width:(h||this.$measureNode).clientWidth/o};return m.width===0||m.height===0?null:m},i.prototype.$measureCharWidth=function(h){this.$main.textContent=x.stringRepeat(h,o);var m=this.$main.getBoundingClientRect();return m.width/o},i.prototype.getCharacterWidth=function(h){var m=this.charSizes[h];return m===void 0&&(m=this.charSizes[h]=this.$measureCharWidth(h)/this.$characterSize.width),m},i.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},i.prototype.$getZoom=function(h){return!h||!h.parentElement?1:(Number(window.getComputedStyle(h).zoom)||1)*this.$getZoom(h.parentElement)},i.prototype.$initTransformMeasureNodes=function(){var h=function(m,y){return["div",{style:"position: absolute;top:"+m+"px;left:"+y+"px;"}]};this.els=v.buildDom([h(0,0),h(r,0),h(0,r),h(r,r)],this.el)},i.prototype.transformCoordinates=function(h,m){if(h){var y=this.$getZoom(this.el);h=w(1/y,h)}function L(Q,te,ce){var ne=Q[1]*te[0]-Q[0]*te[1];return[(-te[1]*ce[0]+te[0]*ce[1])/ne,(+Q[1]*ce[0]-Q[0]*ce[1])/ne]}function T(Q,te){return[Q[0]-te[0],Q[1]-te[1]]}function k(Q,te){return[Q[0]+te[0],Q[1]+te[1]]}function w(Q,te){return[Q*te[0],Q*te[1]]}this.els||this.$initTransformMeasureNodes();function R(Q){var te=Q.getBoundingClientRect();return[te.left,te.top]}var D=R(this.els[0]),I=R(this.els[1]),E=R(this.els[2]),z=R(this.els[3]),F=L(T(z,I),T(z,E),T(k(I,E),k(z,D))),O=w(1+F[0],T(I,D)),_=w(1+F[1],T(E,D));if(m){var S=m,N=F[0]*S[0]/r+F[1]*S[1]/r+1,W=k(w(S[0],O),w(S[1],_));return k(w(1/N/r,W),D)}var V=T(h,D),G=L(T(O,w(F[0],V)),T(_,w(F[1],V)),V);return w(r,G)},i})();n.prototype.$characterSize={width:0,height:0},b.implement(n.prototype,s),u.FontMetrics=n}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,u,$){$.exports=`
249
- .ace_br1 {border-top-left-radius : 3px;}
250
- .ace_br2 {border-top-right-radius : 3px;}
251
- .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
252
- .ace_br4 {border-bottom-right-radius: 3px;}
253
- .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
254
- .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
255
- .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
256
- .ace_br8 {border-bottom-left-radius : 3px;}
257
- .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
258
- .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
259
- .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
260
- .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
261
- .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
262
- .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
263
- .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
264
-
265
-
266
- .ace_editor {
267
- position: relative;
268
- overflow: hidden;
269
- padding: 0;
270
- font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
271
- direction: ltr;
272
- text-align: left;
273
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
274
- forced-color-adjust: none;
275
- }
276
-
277
- .ace_scroller {
278
- position: absolute;
279
- overflow: hidden;
280
- top: 0;
281
- bottom: 0;
282
- background-color: inherit;
283
- -ms-user-select: none;
284
- -moz-user-select: none;
285
- -webkit-user-select: none;
286
- user-select: none;
287
- cursor: text;
288
- }
289
-
290
- .ace_content {
291
- position: absolute;
292
- box-sizing: border-box;
293
- min-width: 100%;
294
- contain: style size layout;
295
- font-variant-ligatures: no-common-ligatures;
296
- }
297
- .ace_invisible {
298
- font-variant-ligatures: none;
299
- }
300
-
301
- .ace_keyboard-focus:focus {
302
- box-shadow: inset 0 0 0 2px #5E9ED6;
303
- outline: none;
304
- }
305
-
306
- .ace_dragging .ace_scroller:before{
307
- position: absolute;
308
- top: 0;
309
- left: 0;
310
- right: 0;
311
- bottom: 0;
312
- content: '';
313
- background: rgba(250, 250, 250, 0.01);
314
- z-index: 1000;
315
- }
316
- .ace_dragging.ace_dark .ace_scroller:before{
317
- background: rgba(0, 0, 0, 0.01);
318
- }
319
-
320
- .ace_gutter {
321
- position: absolute;
322
- overflow : hidden;
323
- width: auto;
324
- top: 0;
325
- bottom: 0;
326
- left: 0;
327
- cursor: default;
328
- z-index: 4;
329
- -ms-user-select: none;
330
- -moz-user-select: none;
331
- -webkit-user-select: none;
332
- user-select: none;
333
- contain: style size layout;
334
- }
335
-
336
- .ace_gutter-active-line {
337
- position: absolute;
338
- left: 0;
339
- right: 0;
340
- }
341
-
342
- .ace_scroller.ace_scroll-left:after {
343
- content: "";
344
- position: absolute;
345
- top: 0;
346
- right: 0;
347
- bottom: 0;
348
- left: 0;
349
- box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
350
- pointer-events: none;
351
- }
352
-
353
- .ace_gutter-cell, .ace_gutter-cell_svg-icons {
354
- position: absolute;
355
- top: 0;
356
- left: 0;
357
- right: 0;
358
- padding-left: 19px;
359
- padding-right: 6px;
360
- background-repeat: no-repeat;
361
- }
362
-
363
- .ace_gutter-cell_svg-icons .ace_gutter_annotation {
364
- margin-left: -14px;
365
- float: left;
366
- }
367
-
368
- .ace_gutter-cell .ace_gutter_annotation {
369
- margin-left: -19px;
370
- float: left;
371
- }
372
-
373
- .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
374
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
375
- background-repeat: no-repeat;
376
- background-position: 2px center;
377
- }
378
-
379
- .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
380
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
381
- background-repeat: no-repeat;
382
- background-position: 2px center;
383
- }
384
-
385
- .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
386
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
387
- background-repeat: no-repeat;
388
- background-position: 2px center;
389
- }
390
-
391
- .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
392
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
393
- }
394
-
395
- .ace_icon_svg.ace_error {
396
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
397
- background-color: crimson;
398
- }
399
- .ace_icon_svg.ace_security {
400
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
401
- background-color: crimson;
402
- }
403
- .ace_icon_svg.ace_warning {
404
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
405
- background-color: darkorange;
406
- }
407
- .ace_icon_svg.ace_info {
408
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
409
- background-color: royalblue;
410
- }
411
- .ace_icon_svg.ace_hint {
412
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
413
- background-color: silver;
414
- }
415
-
416
- .ace_icon_svg.ace_error_fold {
417
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
418
- background-color: crimson;
419
- }
420
- .ace_icon_svg.ace_security_fold {
421
- -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
422
- background-color: crimson;
423
- }
424
- .ace_icon_svg.ace_warning_fold {
425
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
426
- background-color: darkorange;
427
- }
428
-
429
- .ace_scrollbar {
430
- contain: strict;
431
- position: absolute;
432
- right: 0;
433
- bottom: 0;
434
- z-index: 6;
435
- }
436
-
437
- .ace_scrollbar-inner {
438
- position: absolute;
439
- cursor: text;
440
- left: 0;
441
- top: 0;
442
- }
443
-
444
- .ace_scrollbar-v{
445
- overflow-x: hidden;
446
- overflow-y: scroll;
447
- top: 0;
448
- }
449
-
450
- .ace_scrollbar-h {
451
- overflow-x: scroll;
452
- overflow-y: hidden;
453
- left: 0;
454
- }
455
-
456
- .ace_print-margin {
457
- position: absolute;
458
- height: 100%;
459
- }
460
-
461
- .ace_text-input {
462
- position: absolute;
463
- z-index: 0;
464
- width: 0.5em;
465
- height: 1em;
466
- opacity: 0;
467
- background: transparent;
468
- -moz-appearance: none;
469
- appearance: none;
470
- border: none;
471
- resize: none;
472
- outline: none;
473
- overflow: hidden;
474
- font: inherit;
475
- padding: 0 1px;
476
- margin: 0 -1px;
477
- contain: strict;
478
- -ms-user-select: text;
479
- -moz-user-select: text;
480
- -webkit-user-select: text;
481
- user-select: text;
482
- /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
483
- white-space: pre!important;
484
- }
485
- .ace_text-input.ace_composition {
486
- background: transparent;
487
- color: inherit;
488
- z-index: 1000;
489
- opacity: 1;
490
- }
491
- .ace_composition_placeholder { color: transparent }
492
- .ace_composition_marker {
493
- border-bottom: 1px solid;
494
- position: absolute;
495
- border-radius: 0;
496
- margin-top: 1px;
497
- }
498
-
499
- [ace_nocontext=true] {
500
- transform: none!important;
501
- filter: none!important;
502
- clip-path: none!important;
503
- mask : none!important;
504
- contain: none!important;
505
- perspective: none!important;
506
- mix-blend-mode: initial!important;
507
- z-index: auto;
508
- }
509
-
510
- .ace_layer {
511
- z-index: 1;
512
- position: absolute;
513
- overflow: hidden;
514
- /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
515
- word-wrap: normal;
516
- white-space: pre;
517
- height: 100%;
518
- width: 100%;
519
- box-sizing: border-box;
520
- /* setting pointer-events: auto; on node under the mouse, which changes
521
- during scroll, will break mouse wheel scrolling in Safari */
522
- pointer-events: none;
523
- }
524
-
525
- .ace_gutter-layer {
526
- position: relative;
527
- width: auto;
528
- text-align: right;
529
- pointer-events: auto;
530
- height: 1000000px;
531
- contain: style size layout;
532
- }
533
-
534
- .ace_text-layer {
535
- font: inherit !important;
536
- position: absolute;
537
- height: 1000000px;
538
- width: 1000000px;
539
- contain: style size layout;
540
- }
541
-
542
- .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
543
- contain: style size layout;
544
- position: absolute;
545
- top: 0;
546
- left: 0;
547
- right: 0;
548
- }
549
-
550
- .ace_hidpi .ace_text-layer,
551
- .ace_hidpi .ace_gutter-layer,
552
- .ace_hidpi .ace_content,
553
- .ace_hidpi .ace_gutter {
554
- contain: strict;
555
- }
556
- .ace_hidpi .ace_text-layer > .ace_line,
557
- .ace_hidpi .ace_text-layer > .ace_line_group {
558
- contain: strict;
559
- }
560
-
561
- .ace_cjk {
562
- display: inline-block;
563
- text-align: center;
564
- }
565
-
566
- .ace_cursor-layer {
567
- z-index: 4;
568
- }
569
-
570
- .ace_cursor {
571
- z-index: 4;
572
- position: absolute;
573
- box-sizing: border-box;
574
- border-left: 2px solid;
575
- /* workaround for smooth cursor repaintng whole screen in chrome */
576
- transform: translatez(0);
577
- }
578
-
579
- .ace_multiselect .ace_cursor {
580
- border-left-width: 1px;
581
- }
582
-
583
- .ace_slim-cursors .ace_cursor {
584
- border-left-width: 1px;
585
- }
586
-
587
- .ace_overwrite-cursors .ace_cursor {
588
- border-left-width: 0;
589
- border-bottom: 1px solid;
590
- }
591
-
592
- .ace_hidden-cursors .ace_cursor {
593
- opacity: 0.2;
594
- }
595
-
596
- .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
597
- opacity: 0;
598
- }
599
-
600
- .ace_smooth-blinking .ace_cursor {
601
- transition: opacity 0.18s;
602
- }
603
-
604
- .ace_animate-blinking .ace_cursor {
605
- animation-duration: 1000ms;
606
- animation-timing-function: step-end;
607
- animation-name: blink-ace-animate;
608
- animation-iteration-count: infinite;
609
- }
610
-
611
- .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
612
- animation-duration: 1000ms;
613
- animation-timing-function: ease-in-out;
614
- animation-name: blink-ace-animate-smooth;
615
- }
616
-
617
- @keyframes blink-ace-animate {
618
- from, to { opacity: 1; }
619
- 60% { opacity: 0; }
620
- }
621
-
622
- @keyframes blink-ace-animate-smooth {
623
- from, to { opacity: 1; }
624
- 45% { opacity: 1; }
625
- 60% { opacity: 0; }
626
- 85% { opacity: 0; }
627
- }
628
-
629
- .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
630
- position: absolute;
631
- z-index: 3;
632
- }
633
-
634
- .ace_marker-layer .ace_selection {
635
- position: absolute;
636
- z-index: 5;
637
- }
638
-
639
- .ace_marker-layer .ace_bracket {
640
- position: absolute;
641
- z-index: 6;
642
- }
643
-
644
- .ace_marker-layer .ace_error_bracket {
645
- position: absolute;
646
- border-bottom: 1px solid #DE5555;
647
- border-radius: 0;
648
- }
649
-
650
- .ace_marker-layer .ace_active-line {
651
- position: absolute;
652
- z-index: 2;
653
- }
654
-
655
- .ace_marker-layer .ace_selected-word {
656
- position: absolute;
657
- z-index: 4;
658
- box-sizing: border-box;
659
- }
660
-
661
- .ace_line .ace_fold {
662
- box-sizing: border-box;
663
-
664
- display: inline-block;
665
- height: 11px;
666
- margin-top: -2px;
667
- vertical-align: middle;
668
-
669
- background-image:
670
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
671
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
672
- background-repeat: no-repeat, repeat-x;
673
- background-position: center center, top left;
674
- color: transparent;
675
-
676
- border: 1px solid black;
677
- border-radius: 2px;
678
-
679
- cursor: pointer;
680
- pointer-events: auto;
681
- }
682
-
683
- .ace_dark .ace_fold {
684
- }
685
-
686
- .ace_fold:hover{
687
- background-image:
688
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
689
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
690
- }
691
-
692
- .ace_tooltip {
693
- background-color: #f5f5f5;
694
- border: 1px solid gray;
695
- border-radius: 1px;
696
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
697
- color: black;
698
- padding: 3px 4px;
699
- position: fixed;
700
- z-index: 999999;
701
- box-sizing: border-box;
702
- cursor: default;
703
- white-space: pre-wrap;
704
- word-wrap: break-word;
705
- line-height: normal;
706
- font-style: normal;
707
- font-weight: normal;
708
- letter-spacing: normal;
709
- pointer-events: none;
710
- overflow: auto;
711
- max-width: min(33em, 66vw);
712
- overscroll-behavior: contain;
713
- }
714
- .ace_tooltip pre {
715
- white-space: pre-wrap;
716
- }
717
-
718
- .ace_tooltip.ace_dark {
719
- background-color: #636363;
720
- color: #fff;
721
- }
722
-
723
- .ace_tooltip:focus {
724
- outline: 1px solid #5E9ED6;
725
- }
726
-
727
- .ace_icon {
728
- display: inline-block;
729
- width: 18px;
730
- vertical-align: top;
731
- }
732
-
733
- .ace_icon_svg {
734
- display: inline-block;
735
- width: 12px;
736
- vertical-align: top;
737
- -webkit-mask-repeat: no-repeat;
738
- -webkit-mask-size: 12px;
739
- -webkit-mask-position: center;
740
- }
741
-
742
- .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
743
- padding-right: 13px;
744
- }
745
-
746
- .ace_fold-widget, .ace_custom-widget {
747
- box-sizing: border-box;
748
-
749
- margin: 0 -12px 0 1px;
750
- display: none;
751
- width: 11px;
752
- vertical-align: top;
753
-
754
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
755
- background-repeat: no-repeat;
756
- background-position: center;
757
-
758
- border-radius: 3px;
759
-
760
- border: 1px solid transparent;
761
- cursor: pointer;
762
- pointer-events: auto;
763
- }
764
-
765
- .ace_custom-widget {
766
- background: none;
767
- }
768
-
769
- .ace_folding-enabled .ace_fold-widget {
770
- display: inline-block;
771
- }
772
-
773
- .ace_fold-widget.ace_end {
774
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
775
- }
776
-
777
- .ace_fold-widget.ace_closed {
778
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
779
- }
780
-
781
- .ace_fold-widget:hover {
782
- border: 1px solid rgba(0, 0, 0, 0.3);
783
- background-color: rgba(255, 255, 255, 0.2);
784
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
785
- }
786
-
787
- .ace_fold-widget:active {
788
- border: 1px solid rgba(0, 0, 0, 0.4);
789
- background-color: rgba(0, 0, 0, 0.05);
790
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
791
- }
792
- /**
793
- * Dark version for fold widgets
794
- */
795
- .ace_dark .ace_fold-widget {
796
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
797
- }
798
- .ace_dark .ace_fold-widget.ace_end {
799
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
800
- }
801
- .ace_dark .ace_fold-widget.ace_closed {
802
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
803
- }
804
- .ace_dark .ace_fold-widget:hover {
805
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
806
- background-color: rgba(255, 255, 255, 0.1);
807
- }
808
- .ace_dark .ace_fold-widget:active {
809
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
810
- }
811
-
812
- .ace_inline_button {
813
- border: 1px solid lightgray;
814
- display: inline-block;
815
- margin: -1px 8px;
816
- padding: 0 5px;
817
- pointer-events: auto;
818
- cursor: pointer;
819
- }
820
- .ace_inline_button:hover {
821
- border-color: gray;
822
- background: rgba(200,200,200,0.2);
823
- display: inline-block;
824
- pointer-events: auto;
825
- }
826
-
827
- .ace_fold-widget.ace_invalid {
828
- background-color: #FFB4B4;
829
- border-color: #DE5555;
830
- }
831
-
832
- .ace_fade-fold-widgets .ace_fold-widget {
833
- transition: opacity 0.4s ease 0.05s;
834
- opacity: 0;
835
- }
836
-
837
- .ace_fade-fold-widgets:hover .ace_fold-widget {
838
- transition: opacity 0.05s ease 0.05s;
839
- opacity:1;
840
- }
841
-
842
- .ace_underline {
843
- text-decoration: underline;
844
- }
845
-
846
- .ace_bold {
847
- font-weight: bold;
848
- }
849
-
850
- .ace_nobold .ace_bold {
851
- font-weight: normal;
852
- }
853
-
854
- .ace_italic {
855
- font-style: italic;
856
- }
857
-
858
-
859
- .ace_error-marker {
860
- background-color: rgba(255, 0, 0,0.2);
861
- position: absolute;
862
- z-index: 9;
863
- }
864
-
865
- .ace_highlight-marker {
866
- background-color: rgba(255, 255, 0,0.2);
867
- position: absolute;
868
- z-index: 8;
869
- }
870
-
871
- .ace_mobile-menu {
872
- position: absolute;
873
- line-height: 1.5;
874
- border-radius: 4px;
875
- -ms-user-select: none;
876
- -moz-user-select: none;
877
- -webkit-user-select: none;
878
- user-select: none;
879
- background: white;
880
- box-shadow: 1px 3px 2px grey;
881
- border: 1px solid #dcdcdc;
882
- color: black;
883
- }
884
- .ace_dark > .ace_mobile-menu {
885
- background: #333;
886
- color: #ccc;
887
- box-shadow: 1px 3px 2px grey;
888
- border: 1px solid #444;
889
-
890
- }
891
- .ace_mobile-button {
892
- padding: 2px;
893
- cursor: pointer;
894
- overflow: hidden;
895
- }
896
- .ace_mobile-button:hover {
897
- background-color: #eee;
898
- opacity:1;
899
- }
900
- .ace_mobile-button:active {
901
- background-color: #ddd;
902
- }
903
-
904
- .ace_placeholder {
905
- position: relative;
906
- font-family: arial;
907
- transform: scale(0.9);
908
- transform-origin: left;
909
- white-space: pre;
910
- opacity: 0.7;
911
- margin: 0 10px;
912
- z-index: 1;
913
- }
914
-
915
- .ace_ghost_text {
916
- opacity: 0.5;
917
- font-style: italic;
918
- }
919
-
920
- .ace_ghost_text_container > div {
921
- white-space: pre;
922
- }
923
-
924
- .ghost_text_line_wrapped::after {
925
- content: "↩";
926
- position: absolute;
927
- }
928
-
929
- .ace_lineWidgetContainer.ace_ghost_text {
930
- margin: 0px 4px
931
- }
932
-
933
- .ace_screenreader-only {
934
- position:absolute;
935
- left:-10000px;
936
- top:auto;
937
- width:1px;
938
- height:1px;
939
- overflow:hidden;
940
- }
941
-
942
- .ace_hidden_token {
943
- display: none;
944
- }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,u,$){var b=e("../lib/dom"),v=e("../lib/oop"),x=e("../lib/event_emitter").EventEmitter,f=(function(){function p(s,o){this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(s)}return p.prototype.$createCanvas=function(){this.canvas=b.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},p.prototype.setScrollBarV=function(s){this.$createCanvas(),this.scrollbarV=s,s.element.appendChild(this.canvas),this.setDimensions()},p.prototype.$updateDecorators=function(s){if(typeof this.canvas.getContext!="function")return;var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(s);var a=this.canvas.getContext("2d");function r(O,_){return O.priority<_.priority?-1:O.priority>_.priority?1:0}var n=this.renderer.session.$annotations;if(a.clearRect(0,0,this.canvas.width,this.canvas.height),n){var i={info:1,warning:2,error:3};n.forEach(function(O){O.priority=i[O.type]||null}),n=n.sort(r);for(var h=0;h<n.length;h++){var m=n[h].row,y=this.getVerticalOffsetForRow(m),L=y+this.lineHeight,T=Math.round(this.heightRatio*y),k=Math.round(this.heightRatio*L),w=Math.round((T+k)/2),R=k-w;R<this.halfMinDecorationHeight&&(R=this.halfMinDecorationHeight),w-R<0&&(w=R),w+R>this.canvasHeight&&(w=this.canvasHeight-R);var D=w-R,I=w+R,E=I-D;a.fillStyle=o[n[h].type]||null,a.fillRect(0,D,Math.round(this.oneZoneWidth-1),E)}}var z=this.renderer.session.selection.getCursor();if(z){var F=Math.round(this.getVerticalOffsetForRow(z.row)*this.heightRatio);a.fillStyle="rgba(0, 0, 0, 0.5)",a.fillRect(0,F,this.canvasWidth,2)}},p.prototype.getVerticalOffsetForRow=function(s){s=s|0;var o=this.renderer.session.documentToScreenRow(s,0)*this.lineHeight;return o},p.prototype.setDimensions=function(s){s=s||this.renderer.layerConfig,this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},p.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},p.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},p})();v.implement(f.prototype,x),u.Decorator=f}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(e,u,$){var b=e("./lib/oop"),v=e("./lib/dom"),x=e("./lib/lang"),f=e("./config"),p=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,o=e("./layer/text").Text,a=e("./layer/cursor").Cursor,r=e("./scrollbar").HScrollBar,n=e("./scrollbar").VScrollBar,i=e("./scrollbar_custom").HScrollBar,h=e("./scrollbar_custom").VScrollBar,m=e("./renderloop").RenderLoop,y=e("./layer/font_metrics").FontMetrics,L=e("./lib/event_emitter").EventEmitter,T=e("./css/editor-css"),k=e("./layer/decorators").Decorator,w=e("./lib/useragent"),R=e("./layer/text_util").isTextToken;v.importCssString(T,"ace_editor.css",!1);var D=(function(){function I(E,z){var F=this;this.container=E||v.createElement("div"),v.addCssClass(this.container,"ace_editor"),v.HI_DPI&&v.addCssClass(this.container,"ace_hidpi"),this.setTheme(z),f.get("useStrictCSP")==null&&f.set("useStrictCSP",!1),this.$gutter=v.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=v.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=v.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new p(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var O=this.$textLayer=new o(this.content);this.canvas=O.element,this.$markerFront=new s(this.content),this.$cursorLayer=new a(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new n(this.container,this),this.scrollBarH=new r(this.container,this),this.scrollBarV.on("scroll",function(_){F.$scrollAnimation||F.session.setScrollTop(_.data-F.scrollMargin.top)}),this.scrollBarH.on("scroll",function(_){F.$scrollAnimation||F.session.setScrollLeft(_.data-F.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(_){F.updateCharacterSize(),F.onResize(!0,F.gutterWidth,F.$size.width,F.$size.height),F._signal("changeCharacterSize",_)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new m(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),f.resetOptions(this),f._signal("renderer",this)}return I.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),v.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},I.prototype.setSession=function(E){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=E,E&&this.scrollMargin.top&&E.getScrollTop()<=0&&E.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(E),this.$markerBack.setSession(E),this.$markerFront.setSession(E),this.$gutterLayer.setSession(E),this.$textLayer.setSession(E),E&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},I.prototype.updateLines=function(E,z,F){if(z===void 0&&(z=1/0),this.$changedLines?(this.$changedLines.firstRow>E&&(this.$changedLines.firstRow=E),this.$changedLines.lastRow<z&&(this.$changedLines.lastRow=z)):this.$changedLines={firstRow:E,lastRow:z},this.$changedLines.lastRow<this.layerConfig.firstRow)if(F)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},I.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},I.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},I.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},I.prototype.updateFull=function(E){E?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},I.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},I.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},I.prototype.onResize=function(E,z,F,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=E?1:0;var _=this.container;O||(O=_.clientHeight||_.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!_.style.height||_.style.height=="0px")&&(_.style.height="1px",O=_.clientHeight||_.scrollHeight),F||(F=_.clientWidth||_.scrollWidth);var S=this.$updateCachedSize(E,z,F,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!F&&!O)return this.resizing=0;E&&(this.$gutterLayer.$padding=null),E?this.$renderChanges(S|this.$changes,!0):this.$loop.schedule(S|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},I.prototype.$updateCachedSize=function(E,z,F,O){O-=this.$extraHeight||0;var _=0,S=this.$size,N={width:S.width,height:S.height,scrollerHeight:S.scrollerHeight,scrollerWidth:S.scrollerWidth};if(O&&(E||S.height!=O)&&(S.height=O,_|=this.CHANGE_SIZE,S.scrollerHeight=S.height,this.$horizScroll&&(S.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(S.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",_=_|this.CHANGE_SCROLL),F&&(E||S.width!=F)){_|=this.CHANGE_SIZE,S.width=F,z==null&&(z=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=z,v.setStyle(this.scrollBarH.element.style,"left",z+"px"),v.setStyle(this.scroller.style,"left",z+this.margin.left+"px"),S.scrollerWidth=Math.max(0,F-z-this.scrollBarV.getWidth()-this.margin.h),v.setStyle(this.$gutter.style,"left",this.margin.left+"px");var W=this.scrollBarV.getWidth()+"px";v.setStyle(this.scrollBarH.element.style,"right",W),v.setStyle(this.scroller.style,"right",W),v.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(S.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||E)&&(_|=this.CHANGE_FULL)}return S.$dirty=!F||!O,_&&this._signal("resize",N),_},I.prototype.onGutterResize=function(E){var z=this.$showGutter?E:0;z!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,z,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},I.prototype.adjustWrapLimit=function(){var E=this.$size.scrollerWidth-this.$padding*2,z=Math.floor(E/this.characterWidth);return this.session.adjustWrapLimit(z,this.$showPrintMargin&&this.$printMarginColumn)},I.prototype.setAnimatedScroll=function(E){this.setOption("animatedScroll",E)},I.prototype.getAnimatedScroll=function(){return this.$animatedScroll},I.prototype.setShowInvisibles=function(E){this.setOption("showInvisibles",E),this.session.$bidiHandler.setShowInvisibles(E)},I.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},I.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},I.prototype.setDisplayIndentGuides=function(E){this.setOption("displayIndentGuides",E)},I.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},I.prototype.setHighlightIndentGuides=function(E){this.setOption("highlightIndentGuides",E)},I.prototype.setShowPrintMargin=function(E){this.setOption("showPrintMargin",E)},I.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},I.prototype.setPrintMarginColumn=function(E){this.setOption("printMarginColumn",E)},I.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},I.prototype.getShowGutter=function(){return this.getOption("showGutter")},I.prototype.setShowGutter=function(E){return this.setOption("showGutter",E)},I.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},I.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},I.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},I.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},I.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var E=v.createElement("div");E.className="ace_layer ace_print-margin-layer",this.$printMarginEl=v.createElement("div"),this.$printMarginEl.className="ace_print-margin",E.appendChild(this.$printMarginEl),this.content.insertBefore(E,this.content.firstChild)}var z=this.$printMarginEl.style;z.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",z.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},I.prototype.getContainerElement=function(){return this.container},I.prototype.getMouseEventTarget=function(){return this.scroller},I.prototype.getTextAreaContainer=function(){return this.container},I.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var E=this.textarea.style,z=this.$composition;if(!this.$keepTextAreaAtCursor&&!z){v.translate(this.textarea,-100,0);return}var F=this.$cursorLayer.$pixelPos;if(F){z&&z.markerRange&&(F=this.$cursorLayer.getPixelPosition(z.markerRange.start,!0));var O=this.layerConfig,_=F.top,S=F.left;_-=O.offset;var N=z&&z.useTextareaForIME||w.isMobile?this.lineHeight:1;if(_<0||_>O.height-N){v.translate(this.textarea,0,0);return}var W=1,V=this.$size.height-N;if(!z)_+=this.lineHeight;else if(z.useTextareaForIME){var G=this.textarea.value;W=this.characterWidth*this.session.$getStringScreenWidth(G)[0]}else _+=this.lineHeight+2;S-=this.scrollLeft,S>this.$size.scrollerWidth-W&&(S=this.$size.scrollerWidth-W),S+=this.gutterWidth+this.margin.left,v.setStyle(E,"height",N+"px"),v.setStyle(E,"width",W+"px"),v.translate(this.textarea,Math.min(S,this.$size.scrollerWidth-W),Math.min(_,V))}}},I.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},I.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},I.prototype.getLastFullyVisibleRow=function(){var E=this.layerConfig,z=E.lastRow,F=this.session.documentToScreenRow(z,0)*E.lineHeight;return F-this.session.getScrollTop()>E.height-E.lineHeight?z-1:z},I.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},I.prototype.setPadding=function(E){this.$padding=E,this.$textLayer.setPadding(E),this.$cursorLayer.setPadding(E),this.$markerFront.setPadding(E),this.$markerBack.setPadding(E),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},I.prototype.setScrollMargin=function(E,z,F,O){var _=this.scrollMargin;_.top=E|0,_.bottom=z|0,_.right=O|0,_.left=F|0,_.v=_.top+_.bottom,_.h=_.left+_.right,_.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-_.top),this.updateFull()},I.prototype.setMargin=function(E,z,F,O){var _=this.margin;_.top=E|0,_.bottom=z|0,_.right=O|0,_.left=F|0,_.v=_.top+_.bottom,_.h=_.left+_.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},I.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},I.prototype.setHScrollBarAlwaysVisible=function(E){this.setOption("hScrollBarAlwaysVisible",E)},I.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},I.prototype.setVScrollBarAlwaysVisible=function(E){this.setOption("vScrollBarAlwaysVisible",E)},I.prototype.$updateScrollBarV=function(){var E=this.layerConfig.maxHeight,z=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(E-=(z-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>E-z&&(E=this.scrollTop+z,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(E+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},I.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},I.prototype.freeze=function(){this.$frozen=!0},I.prototype.unfreeze=function(){this.$frozen=!1},I.prototype.$renderChanges=function(E,z){if(this.$changes&&(E|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!E&&!z){this.$changes|=E;return}if(this.$size.$dirty)return this.$changes|=E,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",E),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var F=this.layerConfig;if(E&this.CHANGE_FULL||E&this.CHANGE_SIZE||E&this.CHANGE_TEXT||E&this.CHANGE_LINES||E&this.CHANGE_SCROLL||E&this.CHANGE_H_SCROLL){if(E|=this.$computeLayerConfig()|this.$loop.clear(),F.firstRow!=this.layerConfig.firstRow&&F.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(F.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,E=E|this.CHANGE_SCROLL,E|=this.$computeLayerConfig()|this.$loop.clear())}F=this.layerConfig,this.$updateScrollBarV(),E&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),v.translate(this.content,-this.scrollLeft,-F.offset);var _=F.width+2*this.$padding+"px",S=F.minHeight+"px";v.setStyle(this.content.style,"width",_),v.setStyle(this.content.style,"height",S)}if(E&this.CHANGE_H_SCROLL&&(v.translate(this.content,-this.scrollLeft,-F.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),E&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",E);return}if(E&this.CHANGE_SCROLL){this.$changedLines=null,E&this.CHANGE_TEXT||E&this.CHANGE_LINES?this.$textLayer.update(F):this.$textLayer.scrollLines(F),this.$showGutter&&(E&this.CHANGE_GUTTER||E&this.CHANGE_LINES?this.$gutterLayer.update(F):this.$gutterLayer.scrollLines(F)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",E);return}E&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):E&this.CHANGE_LINES?((this.$updateLines()||E&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):E&this.CHANGE_TEXT||E&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):E&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)),E&this.CHANGE_CURSOR&&(this.$cursorLayer.update(F),this.$moveTextAreaToCursor()),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(F),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(F),this._signal("afterRender",E)},I.prototype.$autosize=function(){var E=this.session.getScreenLength()*this.lineHeight,z=this.$maxLines*this.lineHeight,F=Math.min(z,Math.max((this.$minLines||1)*this.lineHeight,E))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(F+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&F>this.$maxPixelHeight&&(F=this.$maxPixelHeight);var O=F<=2*this.lineHeight,_=!O&&E>z;if(F!=this.desiredHeight||this.$size.height!=this.desiredHeight||_!=this.$vScroll){_!=this.$vScroll&&(this.$vScroll=_,this.scrollBarV.setVisible(_));var S=this.container.clientWidth;this.container.style.height=F+"px",this.$updateCachedSize(!0,this.$gutterWidth,S,F),this.desiredHeight=F,this._signal("autosize")}},I.prototype.$computeLayerConfig=function(){var E=this.session,z=this.$size,F=z.height<=2*this.lineHeight,O=this.session.getScreenLength(),_=O*this.lineHeight,S=this.$getLongestLine(),N=!F&&(this.$hScrollBarAlwaysVisible||z.scrollerWidth-S-2*this.$padding<0),W=this.$horizScroll!==N;W&&(this.$horizScroll=N,this.scrollBarH.setVisible(N));var V=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),F=z.height<=2*this.lineHeight);var G=z.scrollerHeight+this.lineHeight,Q=!this.$maxLines&&this.$scrollPastEnd?(z.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;_+=Q;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,_-z.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,S+2*this.$padding-z.scrollerWidth+te.right)));var ce=!F&&(this.$vScrollBarAlwaysVisible||z.scrollerHeight-_+Q<0||this.scrollTop>te.top),ne=V!==ce;ne&&(this.$vScroll=ce,this.scrollBarV.setVisible(ce));var he=this.scrollTop%this.lineHeight,ue=Math.ceil(G/this.lineHeight)-1,le=Math.max(0,Math.round((this.scrollTop-he)/this.lineHeight)),me=le+ue,_e,Ae,Me=this.lineHeight;le=E.screenToDocumentRow(le,0);var qe=E.getFoldLine(le);qe&&(le=qe.start.row),_e=E.documentToScreenRow(le,0),Ae=E.getRowLength(le)*Me,me=Math.min(E.screenToDocumentRow(me,0),E.getLength()-1),G=z.scrollerHeight+E.getRowLength(me)*Me+Ae,he=this.scrollTop-_e*Me,he<0&&_e>0&&(_e=Math.max(0,_e+Math.floor(he/Me)),he=this.scrollTop-_e*Me);var Ve=0;return(this.layerConfig.width!=S||W)&&(Ve=this.CHANGE_H_SCROLL),(W||ne)&&(Ve|=this.$updateCachedSize(!0,this.gutterWidth,z.width,z.height),this._signal("scrollbarVisibilityChanged"),ne&&(S=this.$getLongestLine())),this.layerConfig={width:S,padding:this.$padding,firstRow:le,firstRowScreen:_e,lastRow:me,lineHeight:Me,characterWidth:this.characterWidth,minHeight:G,maxHeight:_,offset:he,gutterOffset:Me?Math.max(0,Math.ceil((he+z.height-z.scrollerHeight)/Me)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(S-this.$padding),Ve},I.prototype.$updateLines=function(){if(this.$changedLines){var E=this.$changedLines.firstRow,z=this.$changedLines.lastRow;this.$changedLines=null;var F=this.layerConfig;if(!(E>F.lastRow+1)&&!(z<F.firstRow)){if(z===1/0){this.$showGutter&&this.$gutterLayer.update(F),this.$textLayer.update(F);return}return this.$textLayer.updateLines(F,E,z),!0}}},I.prototype.$getLongestLine=function(){var E=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(E+=1),this.$textLayer&&E>this.$textLayer.MAX_LINE_LENGTH&&(E=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(E*this.characterWidth))},I.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},I.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},I.prototype.addGutterDecoration=function(E,z){this.$gutterLayer.addGutterDecoration(E,z)},I.prototype.removeGutterDecoration=function(E,z){this.$gutterLayer.removeGutterDecoration(E,z)},I.prototype.updateBreakpoints=function(E){this._rows=E,this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.setAnnotations=function(E){this.$gutterLayer.setAnnotations(E),this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},I.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},I.prototype.showCursor=function(){this.$cursorLayer.showCursor()},I.prototype.scrollSelectionIntoView=function(E,z,F){this.scrollCursorIntoView(E,F),this.scrollCursorIntoView(z,F)},I.prototype.scrollCursorIntoView=function(E,z,F){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(E),_=O.left,S=O.top,N=F&&F.top||0,W=F&&F.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var V=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;V+N>S?(z&&V+N>S+this.lineHeight&&(S-=z*this.$size.scrollerHeight),S===0&&(S=-this.scrollMargin.top),this.session.setScrollTop(S)):V+this.$size.scrollerHeight-W<S+this.lineHeight&&(z&&V+this.$size.scrollerHeight-W<S-this.lineHeight&&(S+=z*this.$size.scrollerHeight),this.session.setScrollTop(S+this.lineHeight+W-this.$size.scrollerHeight));var G=this.scrollLeft,Q=2*this.layerConfig.characterWidth;_-Q<G?(_-=Q,_<this.$padding+Q&&(_=-this.scrollMargin.left),this.session.setScrollLeft(_)):(_+=Q,G+this.$size.scrollerWidth<_+this.characterWidth?this.session.setScrollLeft(Math.round(_+this.characterWidth-this.$size.scrollerWidth)):G<=this.$padding&&_-G<this.characterWidth&&this.session.setScrollLeft(0))}},I.prototype.getScrollTop=function(){return this.session.getScrollTop()},I.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},I.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},I.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},I.prototype.scrollToRow=function(E){this.session.setScrollTop(E*this.lineHeight)},I.prototype.alignCursor=function(E,z){typeof E=="number"&&(E={row:E,column:0});var F=this.$cursorLayer.getPixelPosition(E),O=this.$size.scrollerHeight-this.lineHeight,_=F.top-O*(z||0);return this.session.setScrollTop(_),_},I.prototype.$calcSteps=function(E,z){var F=0,O=this.STEPS,_=[],S=function(N,W,V){return V*(Math.pow(N-1,3)+1)+W};for(F=0;F<O;++F)_.push(S(F/this.STEPS,E,z-E));return _},I.prototype.scrollToLine=function(E,z,F,O){var _=this.$cursorLayer.getPixelPosition({row:E,column:0}),S=_.top;z&&(S-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(S),F!==!1&&this.animateScrolling(N,O)},I.prototype.animateScrolling=function(E,z){var F=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(E==F)return;if(this.$scrollAnimation){var _=this.$scrollAnimation.steps;if(_.length&&(E=_[0],E==F))return}var S=O.$calcSteps(E,F);this.$scrollAnimation={from:E,to:F,steps:S},clearInterval(this.$timer),O.session.setScrollTop(S.shift()),O.session.$scrollTop=F;function N(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,z&&z()}this.$timer=setInterval(function(){if(O.$stopAnimation){N();return}if(!O.session)return clearInterval(O.$timer);S.length?(O.session.setScrollTop(S.shift()),O.session.$scrollTop=F):F!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(F),F=null):N()},10)},I.prototype.scrollToY=function(E){this.scrollTop!==E&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=E)},I.prototype.scrollToX=function(E){this.scrollLeft!==E&&(this.scrollLeft=E),this.$loop.schedule(this.CHANGE_H_SCROLL)},I.prototype.scrollTo=function(E,z){this.session.setScrollTop(z),this.session.setScrollLeft(E)},I.prototype.scrollBy=function(E,z){z&&this.session.setScrollTop(this.session.getScrollTop()+z),E&&this.session.setScrollLeft(this.session.getScrollLeft()+E)},I.prototype.isScrollableBy=function(E,z){if(z<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||z>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||E<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||E>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},I.prototype.pixelToScreenCoordinates=function(E,z){var F;if(this.$hasCssTransforms){F={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([E,z]);E=O[1]-this.gutterWidth-this.margin.left,z=O[0]}else F=this.scroller.getBoundingClientRect();var _=E+this.scrollLeft-F.left-this.$padding,S=_/this.characterWidth,N=Math.floor((z+this.scrollTop-F.top)/this.lineHeight),W=this.$blockCursor?Math.floor(S):Math.round(S);return{row:N,column:W,side:S-W>0?1:-1,offsetX:_}},I.prototype.screenToTextCoordinates=function(E,z){var F;if(this.$hasCssTransforms){F={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([E,z]);E=O[1]-this.gutterWidth-this.margin.left,z=O[0]}else F=this.scroller.getBoundingClientRect();var _=E+this.scrollLeft-F.left-this.$padding,S=_/this.characterWidth,N=this.$blockCursor?Math.floor(S):Math.round(S),W=Math.floor((z+this.scrollTop-F.top)/this.lineHeight);return this.session.screenToDocumentPosition(W,Math.max(N,0),_)},I.prototype.textToScreenCoordinates=function(E,z){var F=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(E,z),_=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,E)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),S=O.row*this.lineHeight;return{pageX:F.left+_-this.scrollLeft,pageY:F.top+S-this.scrollTop}},I.prototype.visualizeFocus=function(){v.addCssClass(this.container,"ace_focus")},I.prototype.visualizeBlur=function(){v.removeCssClass(this.container,"ace_focus")},I.prototype.showComposition=function(E){this.$composition=E,E.cssText||(E.cssText=this.textarea.style.cssText),E.useTextareaForIME==null&&(E.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(v.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):E.markerId=this.session.addMarker(E.markerRange,"ace_composition_marker","text")},I.prototype.setCompositionText=function(E){var z=this.session.selection.cursor;this.addToken(E,"composition_placeholder",z.row,z.column),this.$moveTextAreaToCursor()},I.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),v.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var E=this.session.selection.cursor;this.removeExtraToken(E.row,E.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},I.prototype.setGhostText=function(E,z){var F=this.session.selection.cursor,O=z||{row:F.row,column:F.column};this.removeGhostText();var _=this.$calculateWrappedTextChunks(E,O);this.addToken(_[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:E,position:{row:O.row,column:O.column}};var S=v.createElement("div");if(_.length>1){var N=this.hideTokensAfterPosition(O.row,O.column),W;_.slice(1).forEach(function(ne){var he=v.createElement("div"),ue=v.createElement("span");ue.className="ace_ghost_text",ne.wrapped&&(he.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ue.appendChild(v.createTextNode(ne.text)),he.appendChild(ue),S.appendChild(he),W=he}),N.forEach(function(ne){var he=v.createElement("span");R(ne.type)||(he.className="ace_"+ne.type.replace(/\./g," ace_")),he.appendChild(v.createTextNode(ne.value)),W.appendChild(he)}),this.$ghostTextWidget={el:S,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var V=this.$cursorLayer.getPixelPosition(O,!0),G=this.container,Q=G.getBoundingClientRect().height,te=_.length*this.lineHeight,ce=te<Q-V.top;if(ce)return;te<Q?this.scrollBy(0,(_.length-1)*this.lineHeight):this.scrollToRow(O.row)}},I.prototype.$calculateWrappedTextChunks=function(E,z){var F=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(F/this.characterWidth)-2;O=O<=0?60:O;for(var _=E.split(/\r?\n/),S=[],N=0;N<_.length;N++){var W=this.session.$getDisplayTokens(_[N],z.column),V=this.session.$computeWrapSplits(W,O,this.session.$tabSize);if(V.length>0){var G=0;V.push(_[N].length);for(var Q=0;Q<V.length;Q++){var te=_[N].slice(G,V[Q]);S.push({text:te,wrapped:!0}),G=V[Q]}}else S.push({text:_[N],wrapped:!1})}return S},I.prototype.removeGhostText=function(){if(this.$ghostText){var E=this.$ghostText.position;this.removeExtraToken(E.row,E.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},I.prototype.addToken=function(E,z,F,O){var _=this.session;_.bgTokenizer.lines[F]=null;var S={type:z,value:E},N=_.getTokens(F);if(O==null||!N.length)N.push(S);else for(var W=0,V=0;V<N.length;V++){var G=N[V];if(W+=G.value.length,O<=W){var Q=G.value.length-(W-O),te=G.value.slice(0,Q),ce=G.value.slice(Q);N.splice(V,1,{type:G.type,value:te},S,{type:G.type,value:ce});break}}this.updateLines(F,F)},I.prototype.hideTokensAfterPosition=function(E,z){for(var F=this.session.getTokens(E),O=0,_=!1,S=[],N=0;N<F.length;N++){var W=F[N];if(O+=W.value.length,W.type!=="ghost_text"){if(_){S.push({type:W.type,value:W.value}),W.type="hidden_token";continue}O===z&&(_=!0)}}return this.updateLines(E,E),S},I.prototype.removeExtraToken=function(E,z){this.session.bgTokenizer.lines[E]=null,this.updateLines(E,E)},I.prototype.setTheme=function(E,z){var F=this;if(this.$themeId=E,F._dispatchEvent("themeChange",{theme:E}),!E||typeof E=="string"){var O=E||this.$options.theme.initialValue;f.loadModule(["theme",O],_)}else _(E);function _(S){if(F.$themeId!=E)return z&&z();if(!S||!S.cssClass)throw new Error("couldn't load module "+E+" or it didn't call define");S.$id&&(F.$themeId=S.$id),v.importCssString(S.cssText,S.cssClass,F.container),F.theme&&v.removeCssClass(F.container,F.theme.cssClass);var N="padding"in S?S.padding:"padding"in(F.theme||{})?4:F.$padding;if(F.$padding&&N!=F.$padding&&F.setPadding(N),F.$gutterLayer){var W=S.$showGutterCursorMarker;W&&!F.$gutterLayer.$showCursorMarker?F.$gutterLayer.$showCursorMarker="theme":!W&&F.$gutterLayer.$showCursorMarker=="theme"&&(F.$gutterLayer.$showCursorMarker=null)}F.$theme=S.cssClass,F.theme=S,v.addCssClass(F.container,S.cssClass),v.setCssClass(F.container,"ace_dark",S.isDark),F.$size&&(F.$size.width=0,F.$updateSizeAsync()),F._dispatchEvent("themeLoaded",{theme:S}),z&&z(),w.isSafari&&F.scroller&&(F.scroller.style.background="red",F.scroller.style.background="")}},I.prototype.getTheme=function(){return this.$themeId},I.prototype.setStyle=function(E,z){v.setCssClass(this.container,E,z!==!1)},I.prototype.unsetStyle=function(E){v.removeCssClass(this.container,E)},I.prototype.setCursorStyle=function(E){v.setStyle(this.scroller.style,"cursor",E)},I.prototype.setMouseCursor=function(E){v.setStyle(this.scroller.style,"cursor",E)},I.prototype.attachToShadowRoot=function(){v.importCssString(T,"ace_editor.css",this.container)},I.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},I.prototype.$updateCustomScrollbar=function(E){var z=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),E===!0?(this.scrollBarV=new h(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollTop(F.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollLeft(F.data-z.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new k(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new n(this.container,this),this.scrollBarH=new r(this.container,this),this.scrollBarV.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollTop(F.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollLeft(F.data-z.scrollMargin.left)}))},I.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var E=this;this.$resizeTimer=x.delayedCall(function(){E.destroyed||E.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(z){var F=z[0].contentRect.width,O=z[0].contentRect.height;Math.abs(E.$size.width-F)>1||Math.abs(E.$size.height-O)>1?E.$resizeTimer.delay():E.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},I})();D.prototype.CHANGE_CURSOR=1,D.prototype.CHANGE_MARKER=2,D.prototype.CHANGE_GUTTER=4,D.prototype.CHANGE_SCROLL=8,D.prototype.CHANGE_LINES=16,D.prototype.CHANGE_TEXT=32,D.prototype.CHANGE_SIZE=64,D.prototype.CHANGE_MARKER_BACK=128,D.prototype.CHANGE_MARKER_FRONT=256,D.prototype.CHANGE_FULL=512,D.prototype.CHANGE_H_SCROLL=1024,D.prototype.$changes=0,D.prototype.$padding=null,D.prototype.$frozen=!1,D.prototype.STEPS=8,b.implement(D.prototype,L),f.defineOptions(D.prototype,"renderer",{useResizeObserver:{set:function(I){!I&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):I&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(I){this.$textLayer.setShowInvisibles(I)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(I){typeof I=="number"&&(this.$printMarginColumn=I),this.$showPrintMargin=!!I,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(I){this.$gutter.style.display=I?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(I){this.$gutterLayer.$useSvgGutterIcons=I},initialValue:!1},showFoldedAnnotations:{set:function(I){this.$gutterLayer.$showFoldedAnnotations=I},initialValue:!1},fadeFoldWidgets:{set:function(I){v.setCssClass(this.$gutter,"ace_fade-fold-widgets",I)},initialValue:!1},showFoldWidgets:{set:function(I){this.$gutterLayer.setShowFoldWidgets(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(I){this.$textLayer.setDisplayIndentGuides(I)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(I){this.$textLayer.setHighlightIndentGuides(I)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(I){this.$gutterLayer.setHighlightGutterLine(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(I){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(I){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(I){typeof I=="number"&&(I=I+"px"),this.container.style.fontSize=I,this.updateFontSize()},initialValue:12},fontFamily:{set:function(I){this.container.style.fontFamily=I,this.updateFontSize()}},maxLines:{set:function(I){this.updateFull()}},minLines:{set:function(I){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(I){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(I){I=+I||0,this.$scrollPastEnd!=I&&(this.$scrollPastEnd=I,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(I){this.$gutterLayer.$fixedWidth=!!I,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(I){this.$updateCustomScrollbar(I)},initialValue:!1},theme:{set:function(I){this.setTheme(I)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),u.VirtualRenderer=D}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,u,$){var b=e("../lib/oop"),v=e("../lib/net"),x=e("../lib/event_emitter").EventEmitter,f=e("../config");function p(r){var n="importScripts('"+v.qualifyURL(r)+"');";try{return new Blob([n],{type:"application/javascript"})}catch{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,h=new i;return h.append(n),h.getBlob("application/javascript")}}function s(r){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(f.get("loadWorkerFromBlob")){var n=p(r),i=window.URL||window.webkitURL,h=i.createObjectURL(n);return new Worker(h)}return new Worker(r)}var o=function(r){r.postMessage||(r=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=r,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){b.implement(this,x),this.$createWorkerFromOldConfig=function(r,n,i,h,m){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),f.get("packaged")||!e.toUrl)h=h||f.moduleUrl(n,"worker");else{var y=this.$normalizePath;h=h||y(e.toUrl("ace/worker/worker.js",null,"_"));var L={};r.forEach(function(T){L[T]=y(e.toUrl(T,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(h),m&&this.send("importScripts",m),this.$worker.postMessage({init:!0,tlns:L,module:n,classname:i}),this.$worker},this.onMessage=function(r){var n=r.data;switch(n.type){case"event":this._signal(n.name,{data:n.data});break;case"call":var i=this.callbacks[n.id];i&&(i(n.data),delete this.callbacks[n.id]);break;case"error":this.reportError(n.data);break;case"log":window.console&&console.log&&console.log.apply(console,n.data);break}},this.reportError=function(r){window.console&&console.error&&console.error(r)},this.$normalizePath=function(r){return v.qualifyURL(r)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(r){r.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(r,n){this.$worker.postMessage({command:r,args:n})},this.call=function(r,n,i){if(i){var h=this.callbackId++;this.callbacks[h]=i,n.push(h)}this.send(r,n)},this.emit=function(r,n){try{n.data&&n.data.err&&(n.data.err={message:n.data.err.message,stack:n.data.err.stack,code:n.data.err.code}),this.$worker&&this.$worker.postMessage({event:r,data:{data:n.data}})}catch(i){console.error(i.stack)}},this.attachToDocument=function(r){this.$doc&&this.terminate(),this.$doc=r,this.call("setValue",[r.getValue()]),r.on("change",this.changeListener,!0)},this.changeListener=function(r){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),r.action=="insert"?this.deltaQueue.push(r.start,r.lines):this.deltaQueue.push(r.start,r.end)},this.$sendDeltaQueue=function(){var r=this.deltaQueue;r&&(this.deltaQueue=null,r.length>50&&r.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:r}))}}).call(o.prototype);var a=function(r,n,i){var h=null,m=!1,y=Object.create(x),L=[],T=new o({messageBuffer:L,terminate:function(){},postMessage:function(w){L.push(w),h&&(m?setTimeout(k):k())}});T.setEmitSync=function(w){m=w};var k=function(){var w=L.shift();w.command?h[w.command].apply(h,w.args):w.event&&y._signal(w.event,w.data)};return y.postMessage=function(w){T.onMessage({data:w})},y.callback=function(w,R){this.postMessage({type:"call",id:R,data:w})},y.emit=function(w,R){this.postMessage({type:"event",name:w,data:R})},f.loadModule(["worker",n],function(w){for(h=new w[i](y);L.length;)k()}),T};u.UIWorkerClient=a,u.WorkerClient=o,u.createWorker=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,u,$){var b=e("./range").Range,v=e("./lib/event_emitter").EventEmitter,x=e("./lib/oop"),f=(function(){function p(s,o,a,r,n,i){var h=this;this.length=o,this.session=s,this.doc=s.getDocument(),this.mainClass=n,this.othersClass=i,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){h.onCursorChange()})},this.$pos=a;var m=s.getUndoManager().$undoStack||s.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=m.length,this.setup(),s.selection.on("changeCursor",this.$onCursorChange)}return p.prototype.setup=function(){var s=this,o=this.doc,a=this.session;this.selectionBefore=a.selection.toJSON(),a.selection.inMultiSelectMode&&a.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=a.addMarker(new b(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var i=o.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),s.others.push(i)}),a.setUndoSelect(!1)},p.prototype.showOtherMarkers=function(){if(!this.othersActive){var s=this.session,o=this;this.othersActive=!0,this.others.forEach(function(a){a.markerId=s.addMarker(new b(a.row,a.column,a.row,a.column+o.length),o.othersClass,null,!1)})}},p.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var s=0;s<this.others.length;s++)this.session.removeMarker(this.others[s].markerId)}},p.prototype.onUpdate=function(s){if(this.$updating)return this.updateAnchors(s);var o=s;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var a=s.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,r=o.start.column>=this.pos.column&&o.start.column<=this.pos.column+this.length+1,n=o.start.column-this.pos.column;if(this.updateAnchors(s),r&&(this.length+=a),r&&!this.session.$fromUndo){if(s.action==="insert")for(var i=this.others.length-1;i>=0;i--){var h=this.others[i],m={row:h.row,column:h.column+n};this.doc.insertMergedLines(m,s.lines)}else if(s.action==="remove")for(var i=this.others.length-1;i>=0;i--){var h=this.others[i],m={row:h.row,column:h.column+n};this.doc.remove(new b(m.row,m.column,m.row,m.column-a))}}this.$updating=!1,this.updateMarkers()}},p.prototype.updateAnchors=function(s){this.pos.onChange(s);for(var o=this.others.length;o--;)this.others[o].onChange(s);this.updateMarkers()},p.prototype.updateMarkers=function(){if(!this.$updating){var s=this,o=this.session,a=function(n,i){o.removeMarker(n.markerId),n.markerId=o.addMarker(new b(n.row,n.column,n.row,n.column+s.length),i,null,!1)};a(this.pos,this.mainClass);for(var r=this.others.length;r--;)a(this.others[r],this.othersClass)}},p.prototype.onCursorChange=function(s){if(!(this.$updating||!this.session)){var o=this.session.selection.getCursor();o.row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",s)):(this.hideOtherMarkers(),this._emit("cursorLeave",s))}},p.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},p.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var s=this.session.getUndoManager(),o=(s.$undoStack||s.$undostack).length-this.$undoStackDepth,a=0;a<o;a++)s.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},p})();x.implement(f.prototype,v),u.PlaceHolder=f}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,u,$){var b=e("../lib/event"),v=e("../lib/useragent");function x(p,s){return p.row==s.row&&p.column==s.column}function f(p){var s=p.domEvent,o=s.altKey,a=s.shiftKey,r=s.ctrlKey,n=p.getAccelKey(),i=p.getButton();if(r&&v.isMac&&(i=s.button),p.editor.inMultiSelectMode&&i==2){p.editor.textInput.onContextMenu(p.domEvent);return}if(!r&&!o&&!n){i===0&&p.editor.inMultiSelectMode&&p.editor.exitMultiSelectMode();return}if(i===0){var h=p.editor,m=h.selection,y=h.inMultiSelectMode,L=p.getDocumentPosition(),T=m.getCursor(),k=p.inSelection()||m.isEmpty()&&x(L,T),w=p.x,R=p.y,D=function(te){w=te.clientX,R=te.clientY},I=h.session,E=h.renderer.pixelToScreenCoordinates(w,R),z=E,F;if(h.$mouseHandler.$enableJumpToDef)r&&o||n&&o?F=a?"block":"add":o&&h.$blockSelectEnabled&&(F="block");else if(n&&!o){if(F="add",!y&&a)return}else o&&h.$blockSelectEnabled&&(F="block");if(F&&v.isMac&&s.ctrlKey&&h.$mouseHandler.cancelContextMenu(),F=="add"){if(!y&&k)return;if(!y){var O=m.toOrientedRange();h.addSelectionMarker(O)}var _=m.rangeList.rangeAtPoint(L);h.inVirtualSelectionMode=!0,a&&(_=null,O=m.ranges[0]||O,h.removeSelectionMarker(O)),h.once("mouseup",function(){var te=m.toOrientedRange();_&&te.isEmpty()&&x(_.cursor,te.cursor)?m.substractPoint(te.cursor):(a?m.substractPoint(O.cursor):O&&(h.removeSelectionMarker(O),m.addRange(O)),m.addRange(te)),h.inVirtualSelectionMode=!1})}else if(F=="block"){p.stop(),h.inVirtualSelectionMode=!0;var S,N=[],W=function(){var te=h.renderer.pixelToScreenCoordinates(w,R),ce=I.screenToDocumentPosition(te.row,te.column,te.offsetX);x(z,te)&&x(ce,m.lead)||(z=te,h.selection.moveToPosition(ce),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(N),N=m.rectangularRangeBlock(z,E),h.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=h.$mouseHandler.$clickSelection.clone()),N.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers())};y&&!n?m.toSingleRange():!y&&n&&(S=m.toOrientedRange(),h.addSelectionMarker(S)),a?E=I.documentToScreenPosition(m.lead):m.moveToPosition(L),z={row:-1,column:-1};var V=function(te){W(),clearInterval(Q),h.removeSelectionMarkers(N),N.length||(N=[m.toOrientedRange()]),S&&(h.removeSelectionMarker(S),m.toSingleRange(S));for(var ce=0;ce<N.length;ce++)m.addRange(N[ce]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null},G=W;b.capture(h.container,D,V);var Q=setInterval(function(){G()},20);return p.preventDefault()}}}u.onMouseDown=f}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,u,$){u.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(v){v.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(v){v.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(v){v.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(v){v.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(v){v.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(v){v.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(v){v.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(v){v.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(v){v.multiSelect.rangeCount>1?v.multiSelect.joinSelections():v.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(v){v.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(v){v.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(v){v.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],u.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(v){v.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(v){return v&&v.inMultiSelectMode}}];var b=e("../keyboard/hash_handler").HashHandler;u.keyboardHandler=new b(u.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,u,$){var b=e("./range_list").RangeList,v=e("./range").Range,x=e("./selection").Selection,f=e("./mouse/multi_select_handler").onMouseDown,p=e("./lib/event"),s=e("./lib/lang"),o=e("./commands/multi_select_commands");u.commands=o.defaultCommands.concat(o.multiSelectCommands);var a=e("./search").Search,r=new a;function n(T,k,w){return r.$options.wrap=!0,r.$options.needle=k,r.$options.backwards=w==-1,r.find(T)}var i=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(i.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(T,k){if(T){if(!this.inMultiSelectMode&&this.rangeCount===0){var w=this.toOrientedRange();if(this.rangeList.add(w),this.rangeList.add(T),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange(T);this.rangeList.removeAll(),this.rangeList.add(w),this.$onAddRange(w)}T.cursor||(T.cursor=T.end);var R=this.rangeList.add(T);return this.$onAddRange(T),R.length&&this.$onRemoveRange(R),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange(T)}},this.toSingleRange=function(T){T=T||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),T&&this.fromOrientedRange(T)},this.substractPoint=function(T){var k=this.rangeList.substractPoint(T);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var T=this.rangeList.merge();T.length&&this.$onRemoveRange(T)},this.$onAddRange=function(T){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(T),this._signal("addRange",{range:T})},this.$onRemoveRange=function(T){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();T.push(k),this.rangeCount=0}for(var w=T.length;w--;){var R=this.ranges.indexOf(T[w]);this.ranges.splice(R,1)}this._signal("removeRange",{ranges:T}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new b,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var T=this.ranges.length?this.ranges:[this.getRange()],k=[],w=0;w<T.length;w++){var R=T[w],D=R.start.row,I=R.end.row;if(D===I)k.push(R.clone());else{for(k.push(new v(D,R.start.column,D,this.session.getLine(D).length));++D<I;)k.push(this.getLineRange(D,!0));k.push(new v(I,0,I,R.end.column))}w==0&&!this.isBackwards()&&(k=k.reverse())}this.toSingleRange();for(var w=k.length;w--;)this.addRange(k[w])},this.joinSelections=function(){var T=this.rangeList.ranges,k=T[T.length-1],w=v.fromPoints(T[0].start,k.end);this.toSingleRange(),this.setSelectionRange(w,k.cursor==k.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var T=this.rangeList.ranges,k=T[T.length-1],w=v.fromPoints(T[0].start,k.end);this.toSingleRange(),this.setSelectionRange(w,k.cursor==k.start)}else{var R=this.session.documentToScreenPosition(this.cursor),D=this.session.documentToScreenPosition(this.anchor),I=this.rectangularRangeBlock(R,D);I.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(T,k,w){var R=[],D=T.column<k.column;if(D)var I=T.column,E=k.column,z=T.offsetX,F=k.offsetX;else var I=k.column,E=T.column,z=k.offsetX,F=T.offsetX;var O=T.row<k.row;if(O)var _=T.row,S=k.row;else var _=k.row,S=T.row;I<0&&(I=0),_<0&&(_=0),_==S&&(w=!0);for(var N,W=_;W<=S;W++){var V=v.fromPoints(this.session.screenToDocumentPosition(W,I,z),this.session.screenToDocumentPosition(W,E,F));if(V.isEmpty()){if(N&&m(V.end,N))break;N=V.end}V.cursor=D?V.start:V.end,R.push(V)}if(O&&R.reverse(),!w){for(var G=R.length-1;R[G].isEmpty()&&G>0;)G--;if(G>0)for(var Q=0;R[Q].isEmpty();)Q++;for(var te=G;te>=Q;te--)R[te].isEmpty()&&R.splice(te,1)}return R}}).call(x.prototype);var h=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(T){T.cursor||(T.cursor=T.end);var k=this.getSelectionStyle();return T.marker=this.session.addMarker(T,"ace_selection",k),this.session.$selectionMarkers.push(T),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,T},this.removeSelectionMarker=function(T){if(T.marker){this.session.removeMarker(T.marker);var k=this.session.$selectionMarkers.indexOf(T);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(T){for(var k=this.session.$selectionMarkers,w=T.length;w--;){var R=T[w];if(R.marker){this.session.removeMarker(R.marker);var D=k.indexOf(R);D!=-1&&k.splice(D,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function(T){this.addSelectionMarker(T.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(T){this.removeSelectionMarkers(T.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(T){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(o.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(T){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(o.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(T){var k=T.command,w=T.editor;if(w.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?R=w.forEachSelection(k,T.args):k.multiSelectAction=="forEachLine"?R=w.forEachSelection(k,T.args,!0):k.multiSelectAction=="single"?(w.exitMultiSelectMode(),R=k.exec(w,T.args||{})):R=k.multiSelectAction(w,T.args||{});else{var R=k.exec(w,T.args||{});w.multiSelect.addRange(w.multiSelect.toOrientedRange()),w.multiSelect.mergeOverlappingRanges()}return R}},this.forEachSelection=function(T,k,w){if(!this.inVirtualSelectionMode){var R=w&&w.keepOrder,D=w==!0||w&&w.$byLines,I=this.session,E=this.selection,z=E.rangeList,F=(R?E:z).ranges,O;if(!F.length)return T.exec?T.exec(this,k||{}):T(this,k||{});var _=E._eventRegistry;E._eventRegistry={};var S=new x(I);this.inVirtualSelectionMode=!0;for(var N=F.length;N--;){if(D)for(;N>0&&F[N].start.row==F[N-1].end.row;)N--;S.fromOrientedRange(F[N]),S.index=N,this.selection=I.selection=S;var W=T.exec?T.exec(this,k||{}):T(this,k||{});!O&&W!==void 0&&(O=W),S.toOrientedRange(F[N])}S.detach(),this.selection=I.selection=E,this.inVirtualSelectionMode=!1,E._eventRegistry=_,E.mergeOverlappingRanges(),E.ranges[0]&&E.fromOrientedRange(E.ranges[0]);var V=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),V&&V.from==V.to&&this.renderer.animateScrolling(V.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var T="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,w=[],R=0;R<k.length;R++)w.push(this.session.getTextRange(k[R]));var D=this.session.getDocument().getNewLineCharacter();T=w.join(D),T.length==(w.length-1)*D.length&&(T="")}else this.selection.isEmpty()||(T=this.session.getTextRange(this.getSelectionRange()));return T},this.$checkMultiselectChange=function(T,k){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var w=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&k==this.multiSelect.anchor)return;var R=k==this.multiSelect.anchor?w.cursor==w.start?w.end:w.start:w.cursor;R.row!=k.row||this.session.$clipPositionToDocument(R.row,R.column).column!=k.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(T,k,w){if(k=k||{},k.needle=T||k.needle,k.needle==null){var R=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();k.needle=this.session.getTextRange(R)}this.$search.set(k);var D=this.$search.findAll(this.session);if(!D.length)return 0;var I=this.multiSelect;w||I.toSingleRange(D[0]);for(var E=D.length;E--;)I.addRange(D[E],!0);return R&&I.rangeList.rangeAtPoint(R.start)&&I.addRange(R,!0),D.length},this.selectMoreLines=function(T,k){var w=this.selection.toOrientedRange(),R=w.cursor==w.end,D=this.session.documentToScreenPosition(w.cursor);this.selection.$desiredColumn&&(D.column=this.selection.$desiredColumn);var I=this.session.screenToDocumentPosition(D.row+T,D.column);if(w.isEmpty())var z=I;else var E=this.session.documentToScreenPosition(R?w.end:w.start),z=this.session.screenToDocumentPosition(E.row+T,E.column);if(R){var F=v.fromPoints(I,z);F.cursor=F.start}else{var F=v.fromPoints(z,I);F.cursor=F.end}if(F.desiredColumn=D.column,!this.selection.inMultiSelectMode)this.selection.addRange(w);else if(k)var O=w.cursor;this.selection.addRange(F),O&&this.selection.substractPoint(O)},this.transposeSelections=function(T){for(var k=this.session,w=k.multiSelect,R=w.ranges,D=R.length;D--;){var I=R[D];if(I.isEmpty()){var E=k.getWordRange(I.start.row,I.start.column);I.start.row=E.start.row,I.start.column=E.start.column,I.end.row=E.end.row,I.end.column=E.end.column}}w.mergeOverlappingRanges();for(var z=[],D=R.length;D--;){var I=R[D];z.unshift(k.getTextRange(I))}T<0?z.unshift(z.pop()):z.push(z.shift());for(var D=R.length;D--;){var I=R[D],F=I.clone();k.replace(I,z[D]),I.start.row=F.start.row,I.start.column=F.start.column}w.fromOrientedRange(w.ranges[0])},this.selectMore=function(T,k,w){var R=this.session,D=R.multiSelect,I=D.toOrientedRange();if(!(I.isEmpty()&&(I=R.getWordRange(I.start.row,I.start.column),I.cursor=T==-1?I.start:I.end,this.multiSelect.addRange(I),w))){var E=R.getTextRange(I),z=n(R,E,T);z&&(z.cursor=T==-1?z.start:z.end,this.session.unfold(z),this.multiSelect.addRange(z),this.renderer.scrollCursorIntoView(null,.5)),k&&this.multiSelect.substractPoint(I.cursor)}},this.alignCursors=function(){var T=this.session,k=T.multiSelect,w=k.ranges,R=-1,D=w.filter(function(G){if(G.cursor.row==R)return!0;R=G.cursor.row});if(!w.length||D.length==w.length-1){var I=this.selection.getRange(),E=I.start.row,z=I.end.row,F=E==z;if(F){var O=this.session.getLength(),_;do _=this.session.getLine(z);while(/[=:]/.test(_)&&++z<O);do _=this.session.getLine(E);while(/[=:]/.test(_)&&--E>0);E<0&&(E=0),z>=O&&(z=O-1)}var S=this.session.removeFullLines(E,z);S=this.$reAlignText(S,F),this.session.insert({row:E,column:0},S.join(`
945
- `)+`
946
- `),F||(I.start.column=0,I.end.column=S[S.length-1].length),this.selection.setRange(I)}else{D.forEach(function(G){k.substractPoint(G.cursor)});var N=0,W=1/0,V=w.map(function(G){var Q=G.cursor,te=T.getLine(Q.row),ce=te.substr(Q.column).search(/\S/g);return ce==-1&&(ce=0),Q.column>N&&(N=Q.column),ce<W&&(W=ce),ce});w.forEach(function(G,Q){var te=G.cursor,ce=N-te.column,ne=V[Q]-W;ce>ne?T.insert(te,s.stringRepeat(" ",ce-ne)):T.remove(new v(te.row,te.column,te.row,te.column-ce+ne)),G.start.column=G.end.column=N,G.start.row=G.end.row=te.row,G.cursor=G.end}),k.fromOrientedRange(w[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(T,k){var w=!0,R=!0,D,I,E;return T.map(function(S){var N=S.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?D==null?(D=N[1].length,I=N[2].length,E=N[3].length,N):(D+I+E!=N[1].length+N[2].length+N[3].length&&(R=!1),D!=N[1].length&&(w=!1),D>N[1].length&&(D=N[1].length),I<N[2].length&&(I=N[2].length),E>N[3].length&&(E=N[3].length),N):[S]}).map(k?F:w?R?O:F:_);function z(S){return s.stringRepeat(" ",S)}function F(S){return S[2]?z(D)+S[2]+z(I-S[2].length+E)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function O(S){return S[2]?z(D+I-S[2].length)+S[2]+z(E)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function _(S){return S[2]?z(D)+S[2]+z(E)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}}}).call(h.prototype);function m(T,k){return T.row==k.row&&T.column==k.column}u.onSessionChange=function(T){var k=T.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var w=T.oldSession;w&&(w.multiSelect.off("addRange",this.$onAddRange),w.multiSelect.off("removeRange",this.$onRemoveRange),w.multiSelect.off("multiSelect",this.$onMultiSelect),w.multiSelect.off("singleSelect",this.$onSingleSelect),w.multiSelect.lead.off("change",this.$checkMultiselectChange),w.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y(T){T.$multiselectOnSessionChange||(T.$onAddRange=T.$onAddRange.bind(T),T.$onRemoveRange=T.$onRemoveRange.bind(T),T.$onMultiSelect=T.$onMultiSelect.bind(T),T.$onSingleSelect=T.$onSingleSelect.bind(T),T.$multiselectOnSessionChange=u.onSessionChange.bind(T),T.$checkMultiselectChange=T.$checkMultiselectChange.bind(T),T.$multiselectOnSessionChange(T),T.on("changeSession",T.$multiselectOnSessionChange),T.on("mousedown",f),T.commands.addCommands(o.defaultCommands),L(T))}function L(T){if(!T.textInput)return;var k=T.textInput.getElement(),w=!1;p.addListener(k,"keydown",function(D){var I=D.keyCode==18&&!(D.ctrlKey||D.shiftKey||D.metaKey);T.$blockSelectEnabled&&I?w||(T.renderer.setMouseCursor("crosshair"),w=!0):w&&R()},T),p.addListener(k,"keyup",R,T),p.addListener(k,"blur",R,T);function R(D){w&&(T.renderer.setMouseCursor(""),w=!1)}}u.MultiSelect=y,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(T){y(this),T?this.on("mousedown",f):this.off("mousedown",f)},value:!0},enableBlockSelect:{set:function(T){this.$blockSelectEnabled=T},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,u,$){var b=e("../../range").Range,v=u.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(x,f,p){var s=x.getLine(p);return this.foldingStartMarker.test(s)?"start":f=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function(x,f,p){return null},this.indentationBlock=function(x,f,p){var s=/\S/,o=x.getLine(f),a=o.search(s);if(a!=-1){for(var r=p||o.length,n=x.getLength(),i=f,h=f;++f<n;){var m=x.getLine(f).search(s);if(m!=-1){if(m<=a){var y=x.getTokenAt(f,0);if(!y||y.type!=="string")break}h=f}}if(h>i){var L=x.getLine(h).length;return new b(i,r,h,L)}}},this.openingBracketBlock=function(x,f,p,s,o){var a={row:p,column:s+1},r=x.$findClosingBracket(f,a,o);if(r){var n=x.foldWidgets[r.row];return n==null&&(n=x.getFoldWidget(r.row)),n=="start"&&r.row>a.row&&(r.row--,r.column=x.getLine(r.row).length),b.fromPoints(a,r)}},this.closingBracketBlock=function(x,f,p,s,o){var a={row:p,column:s},r=x.$findOpeningBracket(f,a);if(r)return r.column++,a.column--,b.fromPoints(r,a)}}).call(v.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,u,$){var b=e("../lib/dom"),v=e("../range").Range,x=e("../config").nls;function f(s,o,a){for(var r=0,n=s.length-1;r<=n;){var i=r+n>>1,h=a(o,s[i]);if(h>0)r=i+1;else if(h<0)n=i-1;else return i}return-(r+1)}function p(s,o,a){var r=s.getAnnotations().sort(v.comparePoints);if(r.length){var n=f(r,{row:o,column:-1},v.comparePoints);n<0&&(n=-n-1),n>=r.length?n=a>0?0:r.length-1:n===0&&a<0&&(n=r.length-1);var i=r[n];if(!(!i||!a)){if(i.row===o){do i=r[n+=a];while(i&&i.row===o);if(!i)return r.slice()}var h=[];o=i.row;do h[a<0?"unshift":"push"](i),i=r[n+=a];while(i&&i.row==o);return h.length&&h}}}u.showErrorMarker=function(s,o){var a=s.session,r=s.getCursorPosition(),n=r.row,i=a.widgetManager.getWidgetsAtRow(n).filter(function(D){return D.type=="errorMarker"})[0];i?i.destroy():n-=o;var h=p(a,n,o),m;if(h){var y=h[0];r.column=(y.pos&&typeof y.column!="number"?y.pos.sc:y.column)||0,r.row=y.row,m=s.renderer.$gutterLayer.$annotations[r.row]}else{if(i)return;m={displayText:[x("error-marker.good-state","Looks good!")],className:"ace_ok"}}s.session.unfold(r.row),s.selection.moveToPosition(r);var L={row:r.row,fixedWidth:!0,coverGutter:!0,el:b.createElement("div"),type:"errorMarker"},T=L.el.appendChild(b.createElement("div")),k=L.el.appendChild(b.createElement("div"));k.className="error_widget_arrow "+m.className;var w=s.renderer.$cursorLayer.getPixelPosition(r).left;k.style.left=w+s.renderer.gutterWidth-5+"px",L.el.className="error_widget_wrapper",T.className="error_widget "+m.className,m.displayText.forEach(function(D,I){T.appendChild(b.createTextNode(D)),I<m.displayText.length-1&&T.appendChild(b.createElement("br"))}),T.appendChild(b.createElement("div"));var R=function(D,I,E){if(I===0&&(E==="esc"||E==="return"))return L.destroy(),{command:"null"}};L.destroy=function(){s.$mouseHandler.isMousePressed||(s.keyBinding.removeKeyboardHandler(R),a.widgetManager.removeLineWidget(L),s.off("changeSelection",L.destroy),s.off("changeSession",L.destroy),s.off("mouseup",L.destroy),s.off("change",L.destroy))},s.keyBinding.addKeyboardHandler(R),s.on("changeSelection",L.destroy),s.on("changeSession",L.destroy),s.on("mouseup",L.destroy),s.on("change",L.destroy),s.session.widgetManager.addLineWidget(L),L.el.onmousedown=s.focus.bind(s),s.renderer.scrollCursorIntoView(null,.5,{bottom:L.el.offsetHeight})},b.importCssString(`
947
- .error_widget_wrapper {
948
- background: inherit;
949
- color: inherit;
950
- border:none
951
- }
952
- .error_widget {
953
- border-top: solid 2px;
954
- border-bottom: solid 2px;
955
- margin: 5px 0;
956
- padding: 10px 40px;
957
- white-space: pre-wrap;
958
- }
959
- .error_widget.ace_error, .error_widget_arrow.ace_error{
960
- border-color: #ff5a5a
961
- }
962
- .error_widget.ace_warning, .error_widget_arrow.ace_warning{
963
- border-color: #F1D817
964
- }
965
- .error_widget.ace_info, .error_widget_arrow.ace_info{
966
- border-color: #5a5a5a
967
- }
968
- .error_widget.ace_ok, .error_widget_arrow.ace_ok{
969
- border-color: #5aaa5a
970
- }
971
- .error_widget_arrow {
972
- position: absolute;
973
- border: solid 5px;
974
- border-top-color: transparent!important;
975
- border-right-color: transparent!important;
976
- border-left-color: transparent!important;
977
- top: -5px;
978
- }
979
- `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,u,$){e("./loader_build")(u);var b=e("./lib/dom"),v=e("./range").Range,x=e("./editor").Editor,f=e("./edit_session").EditSession,p=e("./undomanager").UndoManager,s=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),u.config=e("./config"),u.edit=function(a,r){if(typeof a=="string"){var n=a;if(a=document.getElementById(n),!a)throw new Error("ace.edit can't find div #"+n)}if(a&&a.env&&a.env.editor instanceof x)return a.env.editor;var i="";if(a&&/input|textarea/i.test(a.tagName)){var h=a;i=h.value,a=b.createElement("pre"),h.parentNode.replaceChild(a,h)}else a&&(i=a.textContent,a.innerHTML="");var m=u.createEditSession(i),y=new x(new s(a),m,r),L={document:m,editor:y,onResize:y.resize.bind(y,null)};return h&&(L.textarea=h),y.on("destroy",function(){L.editor.container.env=null}),y.container.env=y.env=L,y},u.createEditSession=function(a,r){var n=new f(a,r);return n.setUndoManager(new p),n},u.Range=v,u.Editor=x,u.EditSession=f,u.UndoManager=p,u.VirtualRenderer=s;var o=u.config.version;u.version=o}),(function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var u=(function(){return this})();!u&&typeof window<"u"&&(u=window),!u&&typeof self<"u"&&(u=self),u.ace||(u.ace=e);for(var $ in e)e.hasOwnProperty($)&&(u.ace[$]=e[$]);u.ace.default=u.ace,l&&(l.exports=u.ace)})})()})(uc)),uc.exports}var _x=kx(),hc={exports:{}},Ud;function Ax(){return Ud||(Ud=1,(function(l,c){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,u,$){var b=e("../lib/oop"),v=e("./text_highlight_rules").TextHighlightRules,x=u.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};u.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},u.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},u.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var f=u.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},p=u.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},s=u.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},o=u.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},a=u.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},r=u.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},n=u.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},i=u.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},h=function(){var m="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",y="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",L="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",T="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",k=this.$keywords=this.createKeywordMapper({keyword:y,"constant.language":L,"variable.language":T,"support.function":m,"invalid.deprecated":"debugger"},"identifier"),w=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,R={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:w},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:w},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(D,I,E){E.length&&(E=[]);var z=D[D.length-1];return E.unshift(z,I),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(D,I,E){E.length&&(E=[]);var z=D[D.length-1];return E.unshift(z,I),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(D,I,E){E.length&&(E=[]);var z=D[D.length-1];return E.unshift(z,I),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(D,I,E){E.length&&(E=[]);var z=D[D.length-1];return E.unshift(z,I),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(D,I,E){E.length&&(E=[]);var z=D[D.length-1];return E.unshift(z,I),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},i,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+w+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},a,r,x,f,n,p,s,o,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:k,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(D,I,E){var z=D[2]=="-"||D[2]=="~"?"indentedHeredoc":"heredoc",F=D.split(this.splitRegex);return E.push(z,F[3]),[{type:"constant",value:F[1]},{type:"string",value:F[2]},{type:"support.class",value:F[3]},{type:"string",value:F[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(D,I,E){return D===E[1]?(E.shift(),E.shift(),this.next=E[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(D,I,E){return D===E[1]?(E.shift(),E.shift(),this.next=E[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(D,I){return I[0]==="heredoc"||I[0]==="indentedHeredoc"?I[0]:D}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(D,I,E){return this.next="",D=="}"&&E.length>1&&E[1]!="start"&&(E.shift(),this.next=E.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(D,I,E){return E.length&&D===E[0]?(E.unshift(D,I),this.token):"string"}},{token:"constant.language.escape",regex:w},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(D,I,E){return E.length&&D===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(D,I,E){return E.length&&D===E[0]?(E.unshift(D,I),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(D,I,E){return E.length&&D===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(D,I,E){return E.length&&D===E[0]?(E.unshift(D,I),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(D,I,E){return E.length&&D===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(D,I,E){return E.length&&D===E[0]?(E.unshift(D,I),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:w},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(D,I,E){return E.length&&D===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(D,I,E){return E.length&&D===E[0]?(E.unshift(D,I),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(D,I,E){return E.length&&D[0]===R[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};b.inherits(h,v),u.RubyHighlightRules=h}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,u,$){var b=e("../range").Range,v=function(){};(function(){this.checkOutdent=function(x,f){return/^\s+$/.test(x)?/^\s*\}/.test(f):!1},this.autoOutdent=function(x,f){var p=x.getLine(f),s=p.match(/^(\s*\})/);if(!s)return 0;var o=s[1].length,a=x.findMatchingBracket({row:f,column:o});if(!a||a.row==f)return 0;var r=this.$getIndent(x.getLine(a.row));x.replace(new b(f,0,f,o-1),r)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(v.prototype),u.MatchingBraceOutdent=v}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,u,$){var b=e("../../lib/oop"),v=e("./fold_mode").FoldMode,x=e("../../range").Range,f=e("../../token_iterator").TokenIterator,p=u.FoldMode=function(){};b.inherits(p,v),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(s,o,a){var r=s.getLine(a),n=this.foldingStartMarker.test(r),i=this.foldingStopMarker.test(r);if(n&&!i){var h=r.match(this.foldingStartMarker);if(h[1]){if((h[1]=="if"||h[1]=="else"||h[1]=="while"||h[1]=="until"||h[1]=="unless")&&(h[1]=="else"&&/^\s*else\s*$/.test(r)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(r)===!1)||h[1]=="when"&&/\sthen\s/.test(r)===!0)return;if(s.getTokenAt(a,h.index+2).type==="keyword")return"start"}else if(!h[3]||s.getTokenAt(a,h.index+1).type==="comment.multiline")return"start"}if(o!="markbeginend"||!i||n&&i)return"";var h=r.match(this.foldingStopMarker);if(h[3]==="end"){if(s.getTokenAt(a,h.index+1).type==="keyword")return"end"}else if(!h[1]||s.getTokenAt(a,h.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(s,o,a){var r=s.doc.getLine(a),n=this.foldingStartMarker.exec(r);if(n)return n[1]||n[3]?this.rubyBlock(s,a,n.index+2):this.openingBracketBlock(s,"{",a,n.index);var n=this.foldingStopMarker.exec(r);if(n)return n[3]==="end"&&s.getTokenAt(a,n.index+1).type==="keyword"?this.rubyBlock(s,a,n.index+1):n[1]==="=end"&&s.getTokenAt(a,n.index+1).type==="comment.multiline"?this.rubyBlock(s,a,n.index+1):this.closingBracketBlock(s,"}",a,n.index+n[0].length)},this.rubyBlock=function(s,F,a,r){var n=new f(s,F,a),i=n.getCurrentToken();if(!(!i||i.type!="keyword"&&i.type!="comment.multiline")){var h=i.value,m=s.getLine(F);switch(i.value){case"if":case"unless":case"while":case"until":var y=new RegExp("^\\s*"+i.value);if(!y.test(m))return;var L=this.indentKeywords[h];break;case"when":if(/\sthen\s/.test(m))return;case"elsif":case"rescue":case"ensure":var L=1;break;case"else":var y=new RegExp("^\\s*"+i.value+"\\s*$");if(!y.test(m))return;var L=1;break;default:var L=this.indentKeywords[h]}var T=[h];if(L){var k=L===-1?s.getLine(F-1).length:s.getLine(F).length,w=F,R=[];if(R.push(n.getCurrentTokenRange()),n.step=L===-1?n.stepBackward:n.stepForward,i.type=="comment.multiline"){for(;i=n.step();)if(i.type==="comment.multiline"){if(L==1){if(k=6,i.value=="=end")break}else if(i.value=="=begin")break}}else for(;i=n.step();){var D=!1;if(i.type==="keyword"){var I=L*this.indentKeywords[i.value];switch(m=s.getLine(n.getCurrentTokenRow()),i.value){case"do":for(var E=n.$tokenIndex-1;E>=0;E--){var z=n.$rowTokens[E];if(z&&(z.value=="while"||z.value=="until"||z.value=="for")){I=0;break}}break;case"else":var y=new RegExp("^\\s*"+i.value+"\\s*$");(!y.test(m)||h=="case")&&(I=0,D=!0);break;case"if":case"unless":case"while":case"until":var y=new RegExp("^\\s*"+i.value);y.test(m)||(I=0,D=!0);break;case"when":(/\sthen\s/.test(m)||h=="case")&&(I=0,D=!0)}if(I>0)T.unshift(i.value);else if(I<=0&&D===!1){if(T.shift(),!T.length&&((h=="while"||h=="until"||h=="for")&&i.value!="do"||i.value=="do"&&L==-1&&I!=0||i.value!="do"))break;I===0&&T.unshift(i.value)}}}if(!i)return null;if(r)return R.push(n.getCurrentTokenRange()),R;var F=n.getCurrentTokenRow();if(L===-1){if(i.type==="comment.multiline")var O=6;else var O=s.getLine(F).length;return new x(F,O,w-1,k)}return new x(w,k,F-1,s.getLine(F-1).length)}}}}).call(p.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(e,u,$){var b=e("../lib/oop"),v=e("./text").Mode,x=e("./ruby_highlight_rules").RubyHighlightRules,f=e("./matching_brace_outdent").MatchingBraceOutdent,p=e("../range").Range,s=e("./folding/ruby").FoldMode,o=function(){this.HighlightRules=x,this.$outdent=new f,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s,this.indentKeywords=this.foldingRules.indentKeywords};b.inherits(o,v),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(a,r,n){var i=this.$getIndent(r),h=this.getTokenizer().getLineTokens(r,a),m=h.tokens;if(m.length&&m[m.length-1].type=="comment")return i;if(a=="start"){var y=r.match(/^.*[\{\(\[]\s*$/),L=r.match(/^\s*(class|def|module)\s.*$/),T=r.match(/.*do(\s*|\s+\|.*\|\s*)$/),k=r.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(y||L||T||k)&&(i+=n)}return i},this.checkOutdent=function(a,r,n){return/^\s+(end|else|rescue|ensure)$/.test(r+n)||this.$outdent.checkOutdent(r,n)},this.autoOutdent=function(a,r,n){var i=r.getLine(n);if(/}/.test(i))return this.$outdent.autoOutdent(r,n);var h=this.$getIndent(i),m=r.getLine(n-1),y=this.$getIndent(m),L=r.getTabString();y.length<=h.length&&h.slice(-L.length)==L&&r.remove(new p(n,h.length-L.length,n,h.length))},this.getMatching=function(a,r,n){if(r==null){var i=a.selection.lead;n=i.column,r=i.row}var h=a.getTokenAt(r,n);if(h&&h.value in this.indentKeywords)return this.foldingRules.rubyBlock(a,r,n,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(o.prototype),u.Mode=o}),(function(){ace.require(["ace/mode/ruby"],function(e){l&&(l.exports=e)})})()})(hc)),hc.exports}Ax();var dc={exports:{}},Vd;function $x(){return Vd||(Vd=1,(function(l,c){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,u,$){var b=e("../lib/oop"),v=e("./text_highlight_rules").TextHighlightRules,x=function(){var f="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",p="True|False|None|NotImplemented|Ellipsis|__debug__",s="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",o=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":s,"variable.language":"self|cls","constant.language":p,keyword:f},"identifier"),a="[uU]?",r="[rR]",n="[fF]",i="(?:[rR][fF]|[fF][rR])",h="(?:(?:[1-9]\\d*)|(?:0))",m="(?:0[oO]?[0-7]+)",y="(?:0[xX][\\dA-Fa-f]+)",L="(?:0[bB][01]+)",T="(?:"+h+"|"+m+"|"+y+"|"+L+")",k="(?:[eE][+-]?\\d+)",w="(?:\\.\\d+)",R="(?:\\d+)",D="(?:(?:"+R+"?"+w+")|(?:"+R+"\\.))",I="(?:(?:"+D+"|"+R+")"+k+")",E="(?:"+I+"|"+D+")",z=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:a+'"{3}',next:"qqstring3"},{token:"string",regex:a+'"(?=.)',next:"qqstring"},{token:"string",regex:a+"'{3}",next:"qstring3"},{token:"string",regex:a+"'(?=.)",next:"qstring"},{token:"string",regex:r+'"{3}',next:"rawqqstring3"},{token:"string",regex:r+'"(?=.)',next:"rawqqstring"},{token:"string",regex:r+"'{3}",next:"rawqstring3"},{token:"string",regex:r+"'(?=.)",next:"rawqstring"},{token:"string",regex:n+'"{3}',next:"fqqstring3"},{token:"string",regex:n+'"(?=.)',next:"fqqstring"},{token:"string",regex:n+"'{3}",next:"fqstring3"},{token:"string",regex:n+"'(?=.)",next:"fqstring"},{token:"string",regex:i+'"{3}',next:"rfqqstring3"},{token:"string",regex:i+'"(?=.)',next:"rfqqstring"},{token:"string",regex:i+"'{3}",next:"rfqstring3"},{token:"string",regex:i+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+E+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:E},{token:"constant.numeric",regex:T+"[lL]\\b"},{token:"constant.numeric",regex:T+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};b.inherits(x,v),u.PythonHighlightRules=x}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,u,$){var b=e("../../lib/oop"),v=e("./fold_mode").FoldMode,x=u.FoldMode=function(f){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+f+")(?:\\s*)(?:#.*)?$")};b.inherits(x,v),(function(){this.getFoldWidgetRange=function(f,p,s){var o=f.getLine(s),a=o.match(this.foldingStartMarker);if(a)return a[1]?this.openingBracketBlock(f,a[1],s,a.index):a[2]?this.indentationBlock(f,s,a.index+a[2].length):this.indentationBlock(f,s)}}).call(x.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,u,$){var b=e("../lib/oop"),v=e("./text").Mode,x=e("./python_highlight_rules").PythonHighlightRules,f=e("./folding/pythonic").FoldMode,p=e("../range").Range,s=function(){this.HighlightRules=x,this.foldingRules=new f("\\:"),this.$behaviour=this.$defaultBehaviour};b.inherits(s,v),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(a,r,n){var i=this.$getIndent(r),h=this.getTokenizer().getLineTokens(r,a),m=h.tokens;if(m.length&&m[m.length-1].type=="comment")return i;if(a=="start"){var y=r.match(/^.*[\{\(\[:]\s*$/);y&&(i+=n)}return i};var o={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(a,r,n){if(n!==`\r
980
- `&&n!=="\r"&&n!==`
981
- `)return!1;var i=this.getTokenizer().getLineTokens(r.trim(),a).tokens;if(!i)return!1;do var h=i.pop();while(h&&(h.type=="comment"||h.type=="text"&&h.value.match(/^\s+$/)));return h?h.type=="keyword"&&o[h.value]:!1},this.autoOutdent=function(a,r,n){n+=1;var i=this.$getIndent(r.getLine(n)),h=r.getTabString();i.slice(-h.length)==h&&r.remove(new p(n,i.length-h.length,n,i.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(s.prototype),u.Mode=s}),(function(){ace.require(["ace/mode/python"],function(e){l&&(l.exports=e)})})()})(dc)),dc.exports}$x();var fc={exports:{}},jd;function Mx(){return jd||(jd=1,(function(l,c){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,u,$){var b=e("../lib/oop"),v=e("./text_highlight_rules").TextHighlightRules,x=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};b.inherits(x,v),u.JsonHighlightRules=x}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,u,$){var b=e("../range").Range,v=function(){};(function(){this.checkOutdent=function(x,f){return/^\s+$/.test(x)?/^\s*\}/.test(f):!1},this.autoOutdent=function(x,f){var p=x.getLine(f),s=p.match(/^(\s*\})/);if(!s)return 0;var o=s[1].length,a=x.findMatchingBracket({row:f,column:o});if(!a||a.row==f)return 0;var r=this.$getIndent(x.getLine(a.row));x.replace(new b(f,0,f,o-1),r)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(v.prototype),u.MatchingBraceOutdent=v}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,u,$){var b=e("../../lib/oop"),v=e("../../range").Range,x=e("./fold_mode").FoldMode,f=u.FoldMode=function(p){p&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+p.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+p.end)))};b.inherits(f,x),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(p,s,o){var a=p.getLine(o);if(this.singleLineBlockCommentRe.test(a)&&!this.startRegionRe.test(a)&&!this.tripleStarBlockCommentRe.test(a))return"";var r=this._getFoldWidgetBase(p,s,o);return!r&&this.startRegionRe.test(a)?"start":r},this.getFoldWidgetRange=function(p,s,o,a){var r=p.getLine(o);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(p,r,o);var h=r.match(this.foldingStartMarker);if(h){var n=h.index;if(h[1])return this.openingBracketBlock(p,h[1],o,n);var i=p.getCommentFoldRange(o,n+h[0].length,1);return i&&!i.isMultiLine()&&(a?i=this.getSectionRange(p,o):s!="all"&&(i=null)),i}if(s!=="markbegin"){var h=r.match(this.foldingStopMarker);if(h){var n=h.index+h[0].length;return h[1]?this.closingBracketBlock(p,h[1],o,n):p.getCommentFoldRange(o,n,-1)}}},this.getSectionRange=function(p,s){var o=p.getLine(s),a=o.search(/\S/),r=s,n=o.length;s+=1;for(var i=s,h=p.getLength();++s<h;){o=p.getLine(s);var m=o.search(/\S/);if(m!==-1){if(a>m)break;var y=this.getFoldWidgetRange(p,"all",s);if(y){if(y.start.row<=r)break;if(y.isMultiLine())s=y.end.row;else if(a==m)break}i=s}}return new v(r,n,i,p.getLine(i).length)},this.getCommentRegionBlock=function(p,s,o){for(var a=s.search(/\s*$/),r=p.getLength(),n=o,i=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,h=1;++o<r;){s=p.getLine(o);var m=i.exec(s);if(m&&(m[1]?h--:h++,!h))break}var y=o;if(y>n)return new v(n,a,y,s.length)}}).call(f.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,u,$){var b=e("../lib/oop"),v=e("./text").Mode,x=e("./json_highlight_rules").JsonHighlightRules,f=e("./matching_brace_outdent").MatchingBraceOutdent,p=e("./folding/cstyle").FoldMode,s=e("../worker/worker_client").WorkerClient,o=function(){this.HighlightRules=x,this.$outdent=new f,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new p};b.inherits(o,v),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(a,r,n){var i=this.$getIndent(r);if(a=="start"){var h=r.match(/^.*[\{\(\[]\s*$/);h&&(i+=n)}return i},this.checkOutdent=function(a,r,n){return this.$outdent.checkOutdent(r,n)},this.autoOutdent=function(a,r,n){this.$outdent.autoOutdent(r,n)},this.createWorker=function(a){var r=new s(["ace"],"ace/mode/json_worker","JsonWorker");return r.attachToDocument(a.getDocument()),r.on("annotate",function(n){a.setAnnotations(n.data)}),r.on("terminate",function(){a.clearAnnotations()}),r},this.$id="ace/mode/json"}).call(o.prototype),u.Mode=o}),(function(){ace.require(["ace/mode/json"],function(e){l&&(l.exports=e)})})()})(fc)),fc.exports}Mx();var pc={exports:{}},Kd;function Tx(){return Kd||(Kd=1,(function(l,c){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,u,$){var b=e("../lib/oop");e("../lib/lang");var v=e("./text_highlight_rules").TextHighlightRules,x=u.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",f=u.supportFunction="rgb|rgba|url|attr|counter|counters",p=u.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",s=u.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",o=u.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",a=u.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",r=u.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",n=u.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",i=function(){var h=this.createKeywordMapper({"support.function":f,"support.constant":p,"support.type":x,"support.constant.color":s,"support.constant.fonts":o},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:a},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+a+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:a},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:r},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:n},{include:"url"},{token:h,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};b.inherits(i,v),u.CssHighlightRules=i}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,u,$){var b=e("../lib/oop"),v=e("./text_highlight_rules").TextHighlightRules,x=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},x.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};b.inherits(x,v),x.getTagRule=function(f){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},x.getStartRule=function(f){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:f}},x.getEndRule=function(f){return{token:"comment.doc",regex:"\\*\\/",next:f}},u.JsDocCommentHighlightRules=x}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,u,$){function b(){var a=s.replace("\\d","\\d\\-"),r={onMatch:function(i,h,m){var y=i.charAt(1)=="/"?2:1;return y==1?(h!=this.nextState?m.unshift(this.next,this.nextState,0):m.unshift(this.next),m[2]++):y==2&&h==this.nextState&&(m[1]--,(!m[1]||m[1]<0)&&(m.shift(),m.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:i.slice(0,y)},{type:"meta.tag.tag-name.xml",value:i.substr(y)}]},regex:"</?(?:"+a+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(r);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,r,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(i,h,m){return h==m[0]&&m.shift(),i.length==2&&(m[0]==this.nextState&&m[1]--,(!m[1]||m[1]<0)&&m.splice(0,2)),this.next=m[0]||"start",[{type:this.token,value:i}]},nextState:"jsx"},n,v("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:a},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},r],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function v(a){return[{token:"comment",regex:/\/\*/,next:[f.getTagRule(),{token:"comment",regex:"\\*\\/",next:a||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[f.getTagRule(),{token:"comment",regex:"$|^",next:a||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var x=e("../lib/oop"),f=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,p=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",o=function(a){var r={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(r,"identifier"),i="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",h="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",m="(function)(\\s*)(\\*?)",y={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(r).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[f.getStartRule("doc-start"),v("no_regex"),y,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)"+m+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)"+m+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+m+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+i+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:m+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[f.getStartRule("doc-start"),v("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[v("function_arguments"),{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:h},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:h},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!a||!a.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(L,T,k){if(this.next=L=="{"?this.nextState:"",L=="{"&&k.length)k.unshift("start",T);else if(L=="}"&&k.length&&(k.shift(),this.next=k.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return L=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:h},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+s+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!a||a.jsx!=0)&&b.call(this)),this.embedRules(f,"doc-",[f.getEndRule("no_regex")]),this.normalizeRules()};x.inherits(o,p),u.JavaScriptHighlightRules=o}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,u,$){var b=e("../lib/oop"),v=e("./text_highlight_rules").TextHighlightRules,x=function(f){var p="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+p+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:p},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+p+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+p+":)?"+p+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:p},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===x&&this.normalizeRules()};(function(){this.embedTagRules=function(f,p,s){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(<)("+s+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:p+"start"}]}),this.$rules[s+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(o,a,r){return r.splice(0),this.token}}],this.embedRules(f,p,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(</)("+s+"(?=\\s|>|$))",next:s+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(v.prototype),b.inherits(x,v),u.XmlHighlightRules=x}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,u,$){var b=e("../lib/oop"),v=e("../lib/lang"),x=e("./css_highlight_rules").CssHighlightRules,f=e("./javascript_highlight_rules").JavaScriptHighlightRules,p=e("./xml_highlight_rules").XmlHighlightRules,s=v.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),o=function(){p.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(a,r){var n=s[r];return["meta.tag.punctuation."+(a=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(x,"css-","style"),this.embedTagRules(new f({jsx:!1}).getRules(),"js-","script"),this.constructor===o&&this.normalizeRules()};b.inherits(o,p),u.HtmlHighlightRules=o}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,u,$){var b=e("../config").$modes,v=e("../lib/oop"),x=e("../lib/lang"),f=e("./text_highlight_rules").TextHighlightRules,p=e("./html_highlight_rules").HtmlHighlightRules,s=function(a){return"(?:[^"+x.escapeRegExp(a)+"\\\\]|\\\\.)*"},o=function(){p.call(this);var a={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(n,i,h,m){var y=n.match(/^(\s*)([`~]+)(.*)/),L=/[\w-]+|$/.exec(y[3])[0];return b[L]||(L=""),h.unshift("githubblock",[],[y[1],y[2],L],i),this.token},next:"githubblock"},r=[{token:"support.function",regex:".*",onMatch:function(n,i,h,m){var y=h[1],L=h[2][0],T=h[2][1],k=h[2][2],w=/^(\s*)(`+|~+)\s*$/.exec(n);if(w&&w[1].length<L.length+3&&w[2].length>=T.length&&w[2][0]==T[0])return h.splice(0,3),this.next=h.shift(),this.token;if(this.next="",k&&b[k]){var R=b[k].getTokenizer().getLineTokens(n,y.slice(0));return h[1]=R.state,R.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(n){return"markup.heading."+n.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},a,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+s("]")+")(\\]\\s*\\[)("+s("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+s("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+s('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},a,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:r}),this.normalizeRules()};v.inherits(o,f),u.MarkdownHighlightRules=o}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,u,$){var b=e("../../lib/oop"),v=e("./fold_mode").FoldMode,x=e("../../range").Range,f=u.FoldMode=function(){};b.inherits(f,v),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(p,s,o){var a=p.getLine(o);return this.foldingStartMarker.test(a)?a[0]=="`"&&p.bgTokenizer.getState(o)=="start"?"end":"start":""},this.getFoldWidgetRange=function(p,s,o){function a(D){return L=p.getTokens(D)[0],L&&L.type.lastIndexOf(T,0)===0}function r(){var D=L.value[0];return D=="="?6:D=="-"?5:7-L.value.search(/[^#]|$/)}var n=p.getLine(o),i=n.length,h=p.getLength(),m=o,y=o;if(n.match(this.foldingStartMarker)){if(n[0]=="`"){if(p.bgTokenizer.getState(o)!=="start"){for(;++o<h&&(n=p.getLine(o),!(n[0]=="`"&n.substring(0,3)=="```")););return new x(m,i,o,0)}for(;o-- >0&&(n=p.getLine(o),!(n[0]=="`"&n.substring(0,3)=="```")););return new x(o,n.length,m,0)}var L,T="markup.heading";if(a(o)){for(var k=r();++o<h;)if(a(o)){var w=r();if(w>=k)break}if(y=o-(!L||["=","-"].indexOf(L.value[0])==-1?1:2),y>m)for(;y>m&&/^\s*$/.test(p.getLine(y));)y--;if(y>m){var R=p.getLine(y).length;return new x(m,i,y,R)}}}}}).call(f.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,u,$){var b=e("../range").Range,v=function(){};(function(){this.checkOutdent=function(x,f){return/^\s+$/.test(x)?/^\s*\}/.test(f):!1},this.autoOutdent=function(x,f){var p=x.getLine(f),s=p.match(/^(\s*\})/);if(!s)return 0;var o=s[1].length,a=x.findMatchingBracket({row:f,column:o});if(!a||a.row==f)return 0;var r=this.$getIndent(x.getLine(a.row));x.replace(new b(f,0,f,o-1),r)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(v.prototype),u.MatchingBraceOutdent=v}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,u,$){function b(s,o){return s&&s.type.lastIndexOf(o+".xml")>-1}var v=e("../../lib/oop"),x=e("../behaviour").Behaviour,f=e("../../token_iterator").TokenIterator,p=function(){this.add("string_dquotes","insertion",function(s,o,a,r,n){if(n=='"'||n=="'"){var i=n,h=r.doc.getTextRange(a.getSelectionRange());if(h!==""&&h!=="'"&&h!='"'&&a.getWrapBehavioursEnabled())return{text:i+h+i,selection:!1};var m=a.getCursorPosition(),y=r.doc.getLine(m.row),L=y.substring(m.column,m.column+1),T=new f(r,m.row,m.column),k=T.getCurrentToken();if(L==i&&(b(k,"attribute-value")||b(k,"string")))return{text:"",selection:[1,1]};if(k||(k=T.stepBackward()),!k)return;for(;b(k,"tag-whitespace")||b(k,"whitespace");)k=T.stepBackward();var w=!L||L.match(/\s/);if(b(k,"attribute-equals")&&(w||L==">")||b(k,"decl-attribute-equals")&&(w||L=="?"))return{text:i+i,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(s,o,a,r,n){var i=r.doc.getTextRange(n);if(!n.isMultiLine()&&(i=='"'||i=="'")){var h=r.doc.getLine(n.start.row),m=h.substring(n.start.column+1,n.start.column+2);if(m==i)return n.end.column++,n}}),this.add("autoclosing","insertion",function(s,o,a,r,n){if(n==">"){var i=a.getSelectionRange().start,h=new f(r,i.row,i.column),m=h.getCurrentToken()||h.stepBackward();if(!m||!(b(m,"tag-name")||b(m,"tag-whitespace")||b(m,"attribute-name")||b(m,"attribute-equals")||b(m,"attribute-value"))||b(m,"reference.attribute-value"))return;if(b(m,"attribute-value")){var y=h.getCurrentTokenColumn()+m.value.length;if(i.column<y)return;if(i.column==y){var L=h.stepForward();if(L&&b(L,"attribute-value"))return;h.stepBackward()}}if(/^\s*>/.test(r.getLine(i.row).slice(i.column)))return;for(;!b(m,"tag-name");)if(m=h.stepBackward(),m.value=="<"){m=h.stepForward();break}var T=h.getCurrentTokenRow(),k=h.getCurrentTokenColumn();if(b(h.stepBackward(),"end-tag-open"))return;var w=m.value;return T==i.row&&(w=w.substring(0,i.column-k)),this.voidElements&&this.voidElements.hasOwnProperty(w.toLowerCase())?void 0:{text:"></"+w+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(s,o,a,r,n){if(n==`
982
- `){var i=a.getCursorPosition(),h=r.getLine(i.row),m=new f(r,i.row,i.column),y=m.getCurrentToken();if(b(y,"")&&y.type.indexOf("tag-close")!==-1){if(y.value=="/>")return;for(;y&&y.type.indexOf("tag-name")===-1;)y=m.stepBackward();if(!y)return;var L=y.value,T=m.getCurrentTokenRow();if(y=m.stepBackward(),!y||y.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[L]||!this.voidElements){var k=r.getTokenAt(i.row,i.column+1),h=r.getLine(T),w=this.$getIndent(h),R=w+r.getTabString();return k&&k.value==="</"?{text:`
983
- `+R+`
984
- `+w,selection:[1,R.length,1,R.length]}:{text:`
985
- `+R}}}}})};v.inherits(p,x),u.XmlBehaviour=p}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,u,$){var b=e("../../lib/oop"),v=e("../../token_iterator").TokenIterator,x=e("../behaviour/cstyle").CstyleBehaviour,f=e("../behaviour/xml").XmlBehaviour,p=function(){var s=new f({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(s),this.inherit(x),this.add("autoclosing-fragment","insertion",function(o,a,r,n,i){if(i==">"){var h=r.getSelectionRange().start,m=new v(n,h.row,h.column),y=m.getCurrentToken()||m.stepBackward();if(!y)return;if(y.value=="<")return{text:"></>",selection:[1,1]}}})};b.inherits(p,x),u.JavaScriptBehaviour=p}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,u,$){function b(o,a){return o&&o.type&&o.type.lastIndexOf(a+".xml")>-1}var v=e("../../lib/oop"),x=e("../../range").Range,f=e("./fold_mode").FoldMode,p=u.FoldMode=function(o,a){f.call(this),this.voidElements=o||{},this.optionalEndTags=v.mixin({},this.voidElements),a&&v.mixin(this.optionalEndTags,a)};v.inherits(p,f);var s=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(o,a,r){var n=this._getFirstTagInLine(o,r);return n?n.closing||!n.tagName&&n.selfClosing?a==="markbeginend"?"end":"":!n.tagName||n.selfClosing||this.voidElements.hasOwnProperty(n.tagName.toLowerCase())||this._findEndTagInLine(o,r,n.tagName,n.end.column)?"":"start":this.getCommentFoldWidget(o,r)},this.getCommentFoldWidget=function(o,a){return/comment/.test(o.getState(a))&&/<!-/.test(o.getLine(a))?"start":""},this._getFirstTagInLine=function(o,a){for(var r=o.getTokens(a),n=new s,i=0;i<r.length;i++){var h=r[i];if(b(h,"tag-open")){if(n.end.column=n.start.column+h.value.length,n.closing=b(h,"end-tag-open"),h=r[++i],!h)return null;if(n.tagName=h.value,h.value===""){if(h=r[++i],!h)return null;n.tagName=h.value}for(n.end.column+=h.value.length,i++;i<r.length;i++)if(h=r[i],n.end.column+=h.value.length,b(h,"tag-close")){n.selfClosing=h.value=="/>";break}return n}if(b(h,"tag-close"))return n.selfClosing=h.value=="/>",n;n.start.column+=h.value.length}return null},this._findEndTagInLine=function(o,a,r,n){for(var i=o.getTokens(a),h=0,m=0;m<i.length;m++){var y=i[m];if(h+=y.value.length,!(h<n-1)&&b(y,"end-tag-open")&&(y=i[m+1],b(y,"tag-name")&&y.value===""&&(y=i[m+2]),y&&y.value==r))return!0}return!1},this.getFoldWidgetRange=function(o,a,r){var n=this._getFirstTagInLine(o,r);if(!n)return this.getCommentFoldWidget(o,r)&&o.getCommentFoldRange(r,o.getLine(r).length);var i=o.getMatchingTags({row:r,column:0});if(i)return new x(i.openTag.end.row,i.openTag.end.column,i.closeTag.start.row,i.closeTag.start.column)}}).call(p.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,u,$){var b=e("../../lib/oop"),v=e("../../range").Range,x=e("./fold_mode").FoldMode,f=u.FoldMode=function(p){p&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+p.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+p.end)))};b.inherits(f,x),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(p,s,o){var a=p.getLine(o);if(this.singleLineBlockCommentRe.test(a)&&!this.startRegionRe.test(a)&&!this.tripleStarBlockCommentRe.test(a))return"";var r=this._getFoldWidgetBase(p,s,o);return!r&&this.startRegionRe.test(a)?"start":r},this.getFoldWidgetRange=function(p,s,o,a){var r=p.getLine(o);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(p,r,o);var h=r.match(this.foldingStartMarker);if(h){var n=h.index;if(h[1])return this.openingBracketBlock(p,h[1],o,n);var i=p.getCommentFoldRange(o,n+h[0].length,1);return i&&!i.isMultiLine()&&(a?i=this.getSectionRange(p,o):s!="all"&&(i=null)),i}if(s!=="markbegin"){var h=r.match(this.foldingStopMarker);if(h){var n=h.index+h[0].length;return h[1]?this.closingBracketBlock(p,h[1],o,n):p.getCommentFoldRange(o,n,-1)}}},this.getSectionRange=function(p,s){var o=p.getLine(s),a=o.search(/\S/),r=s,n=o.length;s+=1;for(var i=s,h=p.getLength();++s<h;){o=p.getLine(s);var m=o.search(/\S/);if(m!==-1){if(a>m)break;var y=this.getFoldWidgetRange(p,"all",s);if(y){if(y.start.row<=r)break;if(y.isMultiLine())s=y.end.row;else if(a==m)break}i=s}}return new v(r,n,i,p.getLine(i).length)},this.getCommentRegionBlock=function(p,s,o){for(var a=s.search(/\s*$/),r=p.getLength(),n=o,i=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,h=1;++o<r;){s=p.getLine(o);var m=i.exec(s);if(m&&(m[1]?h--:h++,!h))break}var y=o;if(y>n)return new v(n,a,y,s.length)}}).call(f.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,u,$){var b=e("../../lib/oop"),v=e("./xml").FoldMode,x=e("./cstyle").FoldMode,f=u.FoldMode=function(p){p&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+p.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+p.end))),this.xmlFoldMode=new v};b.inherits(f,x),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(p,s,o){var a=this.getFoldWidgetBase(p,s,o);return a||this.xmlFoldMode.getFoldWidget(p,s,o)},this.getFoldWidgetRange=function(p,s,o,a){var r=this.getFoldWidgetRangeBase(p,s,o,a);return r||this.xmlFoldMode.getFoldWidgetRange(p,s,o)}}).call(f.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,u,$){var b=e("../lib/oop"),v=e("./text").Mode,x=e("./javascript_highlight_rules").JavaScriptHighlightRules,f=e("./matching_brace_outdent").MatchingBraceOutdent,p=e("../worker/worker_client").WorkerClient,s=e("./behaviour/javascript").JavaScriptBehaviour,o=e("./folding/javascript").FoldMode,a=function(){this.HighlightRules=x,this.$outdent=new f,this.$behaviour=new s,this.foldingRules=new o};b.inherits(a,v),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(r,n,i){var h=this.$getIndent(n),m=this.getTokenizer().getLineTokens(n,r),y=m.tokens,L=m.state;if(y.length&&y[y.length-1].type=="comment")return h;if(r=="start"||r=="no_regex"){var T=n.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);T&&(h+=i)}else if(r=="doc-start"&&(L=="start"||L=="no_regex"))return"";return h},this.checkOutdent=function(r,n,i){return this.$outdent.checkOutdent(n,i)},this.autoOutdent=function(r,n,i){this.$outdent.autoOutdent(n,i)},this.createWorker=function(r){var n=new p(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return n.attachToDocument(r.getDocument()),n.on("annotate",function(i){r.setAnnotations(i.data)}),n.on("terminate",function(){r.clearAnnotations()}),n},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(a.prototype),u.Mode=a}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,u,$){var b={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},v=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var x=document.createElement("c").style;for(var f in x)if(typeof x[f]=="string"){var p=f.replace(/[A-Z]/g,function(s){return"-"+s.toLowerCase()});b.hasOwnProperty(p)||(b[p]=1)}}this.completionsDefined=!0},this.getCompletions=function(x,f,p,s){if(this.completionsDefined||this.defineCompletions(),x==="ruleset"||f.$mode.$id=="ace/mode/scss"){var o=f.getLine(p.row).substr(0,p.column),a=/\([^)]*$/.test(o);return a&&(o=o.substr(o.lastIndexOf("(")+1)),/:[^;]+$/.test(o)?this.getPropertyValueCompletions(x,f,p,s):this.getPropertyCompletions(x,f,p,s,a)}return[]},this.getPropertyCompletions=function(x,f,p,s,o){o=o||!1;var a=Object.keys(b);return a.map(function(r){return{caption:r,snippet:r+": $0"+(o?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(x,f,p,s){var o=f.getLine(p.row).substr(0,p.column),a=(/([\w\-]+):[^:]*$/.exec(o)||{})[1];if(!a)return[];var r=[];return a in b&&typeof b[a]=="object"&&(r=Object.keys(b[a])),r.map(function(n){return{caption:n,snippet:n,meta:"property value",score:1e6}})}}).call(v.prototype),u.CssCompletions=v}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,u,$){var b=e("../../lib/oop");e("../behaviour").Behaviour;var v=e("./cstyle").CstyleBehaviour,x=e("../../token_iterator").TokenIterator,f=function(){this.inherit(v),this.add("colon","insertion",function(p,s,o,a,r){if(r===":"&&o.selection.isEmpty()){var n=o.getCursorPosition(),i=new x(a,n.row,n.column),h=i.getCurrentToken();if(h&&h.value.match(/\s+/)&&(h=i.stepBackward()),h&&h.type==="support.type"){var m=a.doc.getLine(n.row),y=m.substring(n.column,n.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(m.substring(n.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(p,s,o,a,r){var n=a.doc.getTextRange(r);if(!r.isMultiLine()&&n===":"){var i=o.getCursorPosition(),h=new x(a,i.row,i.column),m=h.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=h.stepBackward()),m&&m.type==="support.type"){var y=a.doc.getLine(r.start.row),L=y.substring(r.end.column,r.end.column+1);if(L===";")return r.end.column++,r}}}),this.add("semicolon","insertion",function(p,s,o,a,r){if(r===";"&&o.selection.isEmpty()){var n=o.getCursorPosition(),i=a.doc.getLine(n.row),h=i.substring(n.column,n.column+1);if(h===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(p,s,o,a,r){if(r==="!"&&o.selection.isEmpty()){var n=o.getCursorPosition(),i=a.doc.getLine(n.row);if(/^\s*(;|}|$)/.test(i.substring(n.column)))return{text:"!important",selection:[10,10]}}})};b.inherits(f,v),u.CssBehaviour=f}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,u,$){var b=e("../lib/oop"),v=e("./text").Mode,x=e("./css_highlight_rules").CssHighlightRules,f=e("./matching_brace_outdent").MatchingBraceOutdent,p=e("../worker/worker_client").WorkerClient,s=e("./css_completions").CssCompletions,o=e("./behaviour/css").CssBehaviour,a=e("./folding/cstyle").FoldMode,r=function(){this.HighlightRules=x,this.$outdent=new f,this.$behaviour=new o,this.$completer=new s,this.foldingRules=new a};b.inherits(r,v),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(n,i,h){var m=this.$getIndent(i),y=this.getTokenizer().getLineTokens(i,n).tokens;if(y.length&&y[y.length-1].type=="comment")return m;var L=i.match(/^.*\{\s*$/);return L&&(m+=h),m},this.checkOutdent=function(n,i,h){return this.$outdent.checkOutdent(i,h)},this.autoOutdent=function(n,i,h){this.$outdent.autoOutdent(i,h)},this.getCompletions=function(n,i,h,m){return this.$completer.getCompletions(n,i,h,m)},this.createWorker=function(n){var i=new p(["ace"],"ace/mode/css_worker","Worker");return i.attachToDocument(n.getDocument()),i.on("annotate",function(h){n.setAnnotations(h.data)}),i.on("terminate",function(){n.clearAnnotations()}),i},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(r.prototype),u.Mode=r}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,u,$){var b=e("../../lib/oop"),v=e("./fold_mode").FoldMode,x=u.FoldMode=function(f,p){this.defaultMode=f,this.subModes=p};b.inherits(x,v),(function(){this.$getMode=function(f){typeof f!="string"&&(f=f[0]);for(var p in this.subModes)if(f.indexOf(p)===0)return this.subModes[p];return null},this.$tryMode=function(f,p,s,o){var a=this.$getMode(f);return a?a.getFoldWidget(p,s,o):""},this.getFoldWidget=function(f,p,s){return this.$tryMode(f.getState(s-1),f,p,s)||this.$tryMode(f.getState(s),f,p,s)||this.defaultMode.getFoldWidget(f,p,s)},this.getFoldWidgetRange=function(f,p,s){var o=this.$getMode(f.getState(s-1));return(!o||!o.getFoldWidget(f,p,s))&&(o=this.$getMode(f.getState(s))),(!o||!o.getFoldWidget(f,p,s))&&(o=this.defaultMode),o.getFoldWidgetRange(f,p,s)}}).call(x.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,u,$){var b=e("../../lib/oop"),v=e("./mixed").FoldMode,x=e("./xml").FoldMode,f=e("./cstyle").FoldMode,p=u.FoldMode=function(s,o){v.call(this,new x(s,o),{"js-":new f,"css-":new f})};b.inherits(p,v)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,u,$){function b(i,h){return i.type.lastIndexOf(h+".xml")>-1}function v(i,h){for(var m=new f(i,h.row,h.column),y=m.getCurrentToken();y&&!b(y,"tag-name");)y=m.stepBackward();if(y)return y.value}function x(i,h){for(var m=new f(i,h.row,h.column),y=m.getCurrentToken();y&&!b(y,"attribute-name");)y=m.stepBackward();if(y)return y.value}var f=e("../token_iterator").TokenIterator,p=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=p.concat(s),a={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},r=Object.keys(a),n=function(){};(function(){this.getCompletions=function(i,h,m,y){var L=h.getTokenAt(m.row,m.column);if(!L)return[];if(b(L,"tag-name")||b(L,"tag-open")||b(L,"end-tag-open"))return this.getTagCompletions(i,h,m,y);if(b(L,"tag-whitespace")||b(L,"attribute-name"))return this.getAttributeCompletions(i,h,m,y);if(b(L,"attribute-value"))return this.getAttributeValueCompletions(i,h,m,y);var T=h.getLine(m.row).substr(0,m.column);return/&[a-z]*$/i.test(T)?this.getHTMLEntityCompletions(i,h,m,y):[]},this.getTagCompletions=function(i,h,m,y){return r.map(function(L){return{value:L,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(i,h,m,y){var L=v(h,m);if(!L)return[];var T=o;return L in a&&(T=T.concat(Object.keys(a[L]))),T.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(i,h,m,y){var L=v(h,m),T=x(h,m);if(!L)return[];var k=[];return L in a&&T in a[L]&&typeof a[L][T]=="object"&&(k=Object.keys(a[L][T])),k.map(function(w){return{caption:w,snippet:w,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(i,h,m,y){var L=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return L.map(function(T){return{caption:T,snippet:T,meta:"html entity",score:1e6}})}}).call(n.prototype),u.HtmlCompletions=n}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,u,$){var b=e("../lib/oop"),v=e("../lib/lang"),x=e("./text").Mode,f=e("./javascript").Mode,p=e("./css").Mode,s=e("./html_highlight_rules").HtmlHighlightRules,o=e("./behaviour/xml").XmlBehaviour,a=e("./folding/html").FoldMode,r=e("./html_completions").HtmlCompletions,n=e("../worker/worker_client").WorkerClient,i=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],h=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],m=function(y){this.fragmentContext=y&&y.fragmentContext,this.HighlightRules=s,this.$behaviour=new o,this.$completer=new r,this.createModeDelegates({"js-":f,"css-":p}),this.foldingRules=new a(this.voidElements,v.arrayToMap(h))};b.inherits(m,x),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=v.arrayToMap(i),this.getNextLineIndent=function(y,L,T){return this.$getIndent(L)},this.checkOutdent=function(y,L,T){return!1},this.getCompletions=function(y,L,T,k){return this.$completer.getCompletions(y,L,T,k)},this.createWorker=function(y){if(this.constructor==m){var L=new n(["ace"],"ace/mode/html_worker","Worker");return L.attachToDocument(y.getDocument()),this.fragmentContext&&L.call("setOptions",[{context:this.fragmentContext}]),L.on("error",function(T){y.setAnnotations(T.data)}),L.on("terminate",function(){y.clearAnnotations()}),L}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(m.prototype),u.Mode=m}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,u,$){var b=e("../lib/oop"),v=e("./text_highlight_rules").TextHighlightRules,x=u.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",f=u.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",p=function(){var s=this.createKeywordMapper({keyword:x,"support.function.builtin":f,"invalid.deprecated":"debugger"},"identifier"),o="(?:(?:[1-9]\\d*)|(?:0))",a="(?:\\.\\d+)",r="(?:\\d+)",n="(?:(?:"+r+"?"+a+")|(?:"+r+"\\.))",i="(?:(?:"+n+"|"+r+"))",h="(?:"+i+"|"+n+")",m="(?:&"+r+")",y="[a-zA-Z_][a-zA-Z0-9_]*",L="(?:"+y+"(?==))",T="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+y+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(w,R,D){var I=w[2]=="-"?"indentedHeredoc":"heredoc",E=w.split(this.splitRegex);return D.push(I,E[4]),[{type:"constant",value:E[1]},{type:"text",value:E[2]},{type:"string",value:E[3]},{type:"support.class",value:E[4]},{type:"string",value:E[5]}]},rules:{heredoc:[{onMatch:function(w,R,D){return w===D[1]?(D.shift(),D.shift(),this.next=D[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(w,R,D){return w===D[1]?(D.shift(),D.shift(),this.next=D[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(w,R){return R[0]==="heredoc"||R[0]==="indentedHeredoc"?R[0]:w}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:T},{token:"variable",regex:L},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:m},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:o+"\\b"},{token:s,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};b.inherits(p,v),u.ShHighlightRules=p}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(e,u,$){var b=e("../lib/oop"),v=e("./text").Mode,x=e("./sh_highlight_rules").ShHighlightRules,f=e("../range").Range,p=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=x,this.foldingRules=new p,this.$behaviour=this.$defaultBehaviour};b.inherits(s,v),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(a,r,n){var i=this.$getIndent(r),h=this.getTokenizer().getLineTokens(r,a),m=h.tokens;if(m.length&&m[m.length-1].type=="comment")return i;if(a=="start"){var y=r.match(/^.*[\{\(\[:]\s*$/);y&&(i+=n)}return i};var o={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(a,r,n){if(n!==`\r
986
- `&&n!=="\r"&&n!==`
987
- `)return!1;var i=this.getTokenizer().getLineTokens(r.trim(),a).tokens;if(!i)return!1;do var h=i.pop();while(h&&(h.type=="comment"||h.type=="text"&&h.value.match(/^\s+$/)));return h?h.type=="keyword"&&o[h.value]:!1},this.autoOutdent=function(a,r,n){n+=1;var i=this.$getIndent(r.getLine(n)),h=r.getTabString();i.slice(-h.length)==h&&r.remove(new f(n,i.length-h.length,n,i.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(s.prototype),u.Mode=s}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(e,u,$){var b=e("../lib/oop"),v=e("../lib/lang"),x=e("./text").Mode,f=e("./xml_highlight_rules").XmlHighlightRules,p=e("./behaviour/xml").XmlBehaviour,s=e("./folding/xml").FoldMode,o=e("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=f,this.$behaviour=new p,this.foldingRules=new s};b.inherits(a,x),(function(){this.voidElements=v.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(r){var n=new o(["ace"],"ace/mode/xml_worker","Worker");return n.attachToDocument(r.getDocument()),n.on("error",function(i){r.setAnnotations(i.data)}),n.on("terminate",function(){r.clearAnnotations()}),n},this.$id="ace/mode/xml"}).call(a.prototype),u.Mode=a}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,u,$){var b=e("../lib/oop"),v=e("./behaviour/cstyle").CstyleBehaviour,x=e("./text").Mode,f=e("./markdown_highlight_rules").MarkdownHighlightRules,p=e("./folding/markdown").FoldMode,s=function(){this.HighlightRules=f,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new p,this.$behaviour=new v({braces:!0})};b.inherits(s,x),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(o,a,r){if(o=="listblock"){var n=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(a);if(!n)return"";var i=n[2];return i||(i=parseInt(n[3],10)+1+"."),n[1]+i+n[4]}return this.$getIndent(a)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(s.prototype),u.Mode=s}),(function(){ace.require(["ace/mode/markdown"],function(e){l&&(l.exports=e)})})()})(pc)),pc.exports}Tx();var gc={exports:{}},Gd;function Lx(){return Gd||(Gd=1,(function(l,c){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,u,$){$.exports=`.ace-twilight .ace_gutter {
988
- background: #232323;
989
- color: #E2E2E2
990
- }
991
-
992
- .ace-twilight .ace_print-margin {
993
- width: 1px;
994
- background: #232323
995
- }
996
-
997
- .ace-twilight {
998
- background-color: #141414;
999
- color: #F8F8F8
1000
- }
1001
-
1002
- .ace-twilight .ace_cursor {
1003
- color: #A7A7A7
1004
- }
1005
-
1006
- .ace-twilight .ace_marker-layer .ace_selection {
1007
- background: rgba(221, 240, 255, 0.20)
1008
- }
1009
-
1010
- .ace-twilight.ace_multiselect .ace_selection.ace_start {
1011
- box-shadow: 0 0 3px 0px #141414;
1012
- }
1013
-
1014
- .ace-twilight .ace_marker-layer .ace_step {
1015
- background: rgb(102, 82, 0)
1016
- }
1017
-
1018
- .ace-twilight .ace_marker-layer .ace_bracket {
1019
- margin: -1px 0 0 -1px;
1020
- border: 1px solid rgba(255, 255, 255, 0.25)
1021
- }
1022
-
1023
- .ace-twilight .ace_marker-layer .ace_active-line {
1024
- background: rgba(255, 255, 255, 0.031)
1025
- }
1026
-
1027
- .ace-twilight .ace_gutter-active-line {
1028
- background-color: rgba(255, 255, 255, 0.031)
1029
- }
1030
-
1031
- .ace-twilight .ace_marker-layer .ace_selected-word {
1032
- border: 1px solid rgba(221, 240, 255, 0.20)
1033
- }
1034
-
1035
- .ace-twilight .ace_invisible {
1036
- color: rgba(255, 255, 255, 0.25)
1037
- }
1038
-
1039
- .ace-twilight .ace_keyword,
1040
- .ace-twilight .ace_meta {
1041
- color: #CDA869
1042
- }
1043
-
1044
- .ace-twilight .ace_constant,
1045
- .ace-twilight .ace_constant.ace_character,
1046
- .ace-twilight .ace_constant.ace_character.ace_escape,
1047
- .ace-twilight .ace_constant.ace_other,
1048
- .ace-twilight .ace_heading,
1049
- .ace-twilight .ace_markup.ace_heading,
1050
- .ace-twilight .ace_support.ace_constant {
1051
- color: #CF6A4C
1052
- }
1053
-
1054
- .ace-twilight .ace_invalid.ace_illegal {
1055
- color: #F8F8F8;
1056
- background-color: rgba(86, 45, 86, 0.75)
1057
- }
1058
-
1059
- .ace-twilight .ace_invalid.ace_deprecated {
1060
- text-decoration: underline;
1061
- font-style: italic;
1062
- color: #D2A8A1
1063
- }
1064
-
1065
- .ace-twilight .ace_support {
1066
- color: #9B859D
1067
- }
1068
-
1069
- .ace-twilight .ace_fold {
1070
- background-color: #AC885B;
1071
- border-color: #F8F8F8
1072
- }
1073
-
1074
- .ace-twilight .ace_support.ace_function {
1075
- color: #DAD085
1076
- }
1077
-
1078
- .ace-twilight .ace_list,
1079
- .ace-twilight .ace_markup.ace_list,
1080
- .ace-twilight .ace_storage {
1081
- color: #F9EE98
1082
- }
1083
-
1084
- .ace-twilight .ace_entity.ace_name.ace_function,
1085
- .ace-twilight .ace_meta.ace_tag {
1086
- color: #AC885B
1087
- }
1088
-
1089
- .ace-twilight .ace_string {
1090
- color: #8F9D6A
1091
- }
1092
-
1093
- .ace-twilight .ace_string.ace_regexp {
1094
- color: #E9C062
1095
- }
1096
-
1097
- .ace-twilight .ace_comment {
1098
- font-style: italic;
1099
- color: #5F5A60
1100
- }
1101
-
1102
- .ace-twilight .ace_variable {
1103
- color: #7587A6
1104
- }
1105
-
1106
- .ace-twilight .ace_xml-pe {
1107
- color: #494949
1108
- }
1109
-
1110
- .ace-twilight .ace_indent-guide {
1111
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1112
- }
1113
-
1114
- .ace-twilight .ace_indent-guide-active {
1115
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1116
- }
1117
- `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(e,u,$){u.isDark=!0,u.cssClass="ace-twilight",u.cssText=e("./twilight-css");var b=e("../lib/dom");b.importCssString(u.cssText,u.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(e){l&&(l.exports=e)})})()})(gc)),gc.exports}Lx();var mc={exports:{}},qd;function Ex(){return qd||(qd=1,(function(l,c){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,u,$){function b(w){var R=new Date().toLocaleString("en-us",w);return R.length==1?"0"+R:R}var v=e("./lib/dom"),x=e("./lib/oop"),f=e("./lib/event_emitter").EventEmitter,p=e("./lib/lang"),s=e("./range").Range,o=e("./range_list").RangeList,a=e("./keyboard/hash_handler").HashHandler,r=e("./tokenizer").Tokenizer,n=e("./clipboard"),i={CURRENT_WORD:function(w){return w.session.getTextRange(w.session.getWordRange())},SELECTION:function(w,R,D){var I=w.session.getTextRange();return D?I.replace(/\n\r?([ \t]*\S)/g,`
1118
- `+D+"$1"):I},CURRENT_LINE:function(w){return w.session.getLine(w.getCursorPosition().row)},PREV_LINE:function(w){return w.session.getLine(w.getCursorPosition().row-1)},LINE_INDEX:function(w){return w.getCursorPosition().row},LINE_NUMBER:function(w){return w.getCursorPosition().row+1},SOFT_TABS:function(w){return w.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(w){return w.session.getTabSize()},CLIPBOARD:function(w){return n.getText&&n.getText()},FILENAME:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0]},FILENAME_BASE:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(w){return this.FILEPATH(w).replace(/[^/\\]*$/,"")},FILEPATH:function(w){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(w){var R=w.session.$mode||{};return R.blockComment&&R.blockComment.start||""},BLOCK_COMMENT_END:function(w){var R=w.session.$mode||{};return R.blockComment&&R.blockComment.end||""},LINE_COMMENT:function(w){var R=w.session.$mode||{};return R.lineCommentStart||""},CURRENT_YEAR:b.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:b.bind(null,{year:"2-digit"}),CURRENT_MONTH:b.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:b.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:b.bind(null,{month:"short"}),CURRENT_DATE:b.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:b.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:b.bind(null,{weekday:"short"}),CURRENT_HOUR:b.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:b.bind(null,{minute:"2-digit"}),CURRENT_SECOND:b.bind(null,{second:"2-digit"})};i.SELECTED_TEXT=i.SELECTION;var h=(function(){function w(){this.snippetMap={},this.snippetNameMap={},this.variables=i}return w.prototype.getTokenizer=function(){return w.$tokenizer||this.createTokenizer()},w.prototype.createTokenizer=function(){function R(E){return E=E.substr(1),/^\d+$/.test(E)?[{tabstopId:parseInt(E,10)}]:[{text:E}]}function D(E){return"(?:[^\\\\"+E+"]|\\\\.)"}var I={regex:"/("+D("/")+"+)/",onMatch:function(E,z,F){var O=F[0];return O.fmtString=!0,O.guard=E.slice(1,-1),O.flag="",""},next:"formatString"};return w.$tokenizer=new r({start:[{regex:/\\./,onMatch:function(E,z,F){var O=E[1];return(O=="}"&&F.length||"`$\\".indexOf(O)!=-1)&&(E=O),[E]}},{regex:/}/,onMatch:function(E,z,F){return[F.length?F.shift():E]}},{regex:/\$(?:\d+|\w+)/,onMatch:R},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(E,z,F){var O=R(E.substr(1));return F.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+D("\\|")+"*\\|",onMatch:function(E,z,F){var O=E.slice(1,-1).replace(/\\[,|\\]|,/g,function(_){return _.length==2?_[1]:"\0"}).split("\0").map(function(_){return{value:_}});return F[0].choices=O,[O[0]]},next:"start"},I,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(E,z,F){return F.length&&F[0].expectElse?(F[0].expectElse=!1,F[0].ifEnd={elseEnd:F[0]},[F[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(E,z,F){var O=E[1];return O=="}"&&F.length||"`$\\".indexOf(O)!=-1?E=O:O=="n"?E=`
1119
- `:O=="t"?E=" ":"ulULE".indexOf(O)!=-1&&(E={changeCase:O,local:O>"a"}),[E]}},{regex:"/\\w*}",onMatch:function(E,z,F){var O=F.shift();return O&&(O.flag=E.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||E]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(E,z,F){return[{text:E.slice(1)}]}},{regex:/\${\w+/,onMatch:function(E,z,F){var O={text:E.slice(2)};return F.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(E,z,F){var O=F.shift();return this.next=O&&O.tabstopId?"start":"",[O||E]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(E,z,F){var O=F[0];return O.formatFunction=E.slice(2,-1),[F.shift()]},next:"formatString"},I,{regex:/:[\?\-+]?/,onMatch:function(E,z,F){E[1]=="+"&&(F[0].ifEnd=F[0]),E[1]=="?"&&(F[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),w.$tokenizer},w.prototype.tokenizeTmSnippet=function(R,D){return this.getTokenizer().getLineTokens(R,D).tokens.map(function(I){return I.value||I})},w.prototype.getVariableValue=function(R,D,I){if(/^\d+$/.test(D))return(this.variables.__||{})[D]||"";if(/^[A-Z]\d+$/.test(D))return(this.variables[D[0]+"__"]||{})[D.substr(1)]||"";if(D=D.replace(/^TM_/,""),!this.variables.hasOwnProperty(D))return"";var E=this.variables[D];return typeof E=="function"&&(E=this.variables[D](R,D,I)),E??""},w.prototype.tmStrFormat=function(R,D,I){if(!D.fmt)return R;var E=D.flag||"",z=D.guard;z=new RegExp(z,E.replace(/[^gim]/g,""));var F=typeof D.fmt=="string"?this.tokenizeTmSnippet(D.fmt,"formatString"):D.fmt,O=this,_=R.replace(z,function(){var S=O.variables.__;O.variables.__=[].slice.call(arguments);for(var N=O.resolveVariables(F,I),W="E",V=0;V<N.length;V++){var G=N[V];if(typeof G=="object")if(N[V]="",G.changeCase&&G.local){var Q=N[V+1];Q&&typeof Q=="string"&&(G.changeCase=="u"?N[V]=Q[0].toUpperCase():N[V]=Q[0].toLowerCase(),N[V+1]=Q.substr(1))}else G.changeCase&&(W=G.changeCase);else W=="U"?N[V]=G.toUpperCase():W=="L"&&(N[V]=G.toLowerCase())}return O.variables.__=S,N.join("")});return _},w.prototype.tmFormatFunction=function(R,D,I){return D.formatFunction=="upcase"?R.toUpperCase():D.formatFunction=="downcase"?R.toLowerCase():R},w.prototype.resolveVariables=function(R,D){function I(W){var V=R.indexOf(W,O+1);V!=-1&&(O=V)}for(var E=[],z="",F=!0,O=0;O<R.length;O++){var _=R[O];if(typeof _=="string"){E.push(_),_==`
1120
- `?(F=!0,z=""):F&&(z=/^\t*/.exec(_)[0],F=/\S/.test(_));continue}if(_){if(F=!1,_.fmtString){var S=R.indexOf(_,O+1);S==-1&&(S=R.length),_.fmt=R.slice(O+1,S),O=S}if(_.text){var N=this.getVariableValue(D,_.text,z)+"";_.fmtString&&(N=this.tmStrFormat(N,_,D)),_.formatFunction&&(N=this.tmFormatFunction(N,_,D)),N&&!_.ifEnd?(E.push(N),I(_)):!N&&_.ifEnd&&I(_.ifEnd)}else _.elseEnd?I(_.elseEnd):(_.tabstopId!=null||_.changeCase!=null)&&E.push(_)}}return E},w.prototype.getDisplayTextForSnippet=function(R,D){var I=m.call(this,R,D);return I.text},w.prototype.insertSnippetForSelection=function(R,D,I){I===void 0&&(I={});var E=m.call(this,R,D,I),z=R.getSelectionRange(),F=R.session.replace(z,E.text),O=new y(R),_=R.inVirtualSelectionMode&&R.selection.index;O.addTabstops(E.tabstops,z.start,F,_)},w.prototype.insertSnippet=function(R,D,I){I===void 0&&(I={});var E=this;if(R.inVirtualSelectionMode)return E.insertSnippetForSelection(R,D,I);R.forEachSelection(function(){E.insertSnippetForSelection(R,D,I)},null,{keepOrder:!0}),R.tabstopManager&&R.tabstopManager.tabNext()},w.prototype.$getScope=function(R){var D=R.session.$mode.$id||"";if(D=D.split("/").pop(),D==="html"||D==="php"){D==="php"&&!R.session.$mode.inlinePhp&&(D="html");var I=R.getCursorPosition(),E=R.session.getState(I.row);typeof E=="object"&&(E=E[0]),E.substring&&(E.substring(0,3)=="js-"?D="javascript":E.substring(0,4)=="css-"?D="css":E.substring(0,4)=="php-"&&(D="php"))}return D},w.prototype.getActiveScopes=function(R){var D=this.$getScope(R),I=[D],E=this.snippetMap;return E[D]&&E[D].includeScopes&&I.push.apply(I,E[D].includeScopes),I.push("_"),I},w.prototype.expandWithTab=function(R,D){var I=this,E=R.forEachSelection(function(){return I.expandSnippetForSelection(R,D)},null,{keepOrder:!0});return E&&R.tabstopManager&&R.tabstopManager.tabNext(),E},w.prototype.expandSnippetForSelection=function(R,D){var I=R.getCursorPosition(),E=R.session.getLine(I.row),z=E.substring(0,I.column),F=E.substr(I.column),O=this.snippetMap,_;return this.getActiveScopes(R).some(function(S){var N=O[S];return N&&(_=this.findMatchingSnippet(N,z,F)),!!_},this),_?(D&&D.dryRun||(R.session.doc.removeInLine(I.row,I.column-_.replaceBefore.length,I.column+_.replaceAfter.length),this.variables.M__=_.matchBefore,this.variables.T__=_.matchAfter,this.insertSnippetForSelection(R,_.content),this.variables.M__=this.variables.T__=null),!0):!1},w.prototype.findMatchingSnippet=function(R,D,I){for(var E=R.length;E--;){var z=R[E];if(!(z.startRe&&!z.startRe.test(D))&&!(z.endRe&&!z.endRe.test(I))&&!(!z.startRe&&!z.endRe))return z.matchBefore=z.startRe?z.startRe.exec(D):[""],z.matchAfter=z.endRe?z.endRe.exec(I):[""],z.replaceBefore=z.triggerRe?z.triggerRe.exec(D)[0]:"",z.replaceAfter=z.endTriggerRe?z.endTriggerRe.exec(I)[0]:"",z}},w.prototype.register=function(R,D){function I(S){return S&&!/^\^?\(.*\)\$?$|^\\b$/.test(S)&&(S="(?:"+S+")"),S||""}function E(S,N,W){return S=I(S),N=I(N),S=N+S,S&&S[S.length-1]!="$"&&(S+="$"),new RegExp(S)}function z(S){S.scope||(S.scope=D||"_"),D=S.scope,F[D]||(F[D]=[],O[D]={});var N=O[D];if(S.name){var W=N[S.name];W&&_.unregister(W),N[S.name]=S}F[D].push(S),S.prefix&&(S.tabTrigger=S.prefix),!S.content&&S.body&&(S.content=Array.isArray(S.body)?S.body.join(`
1121
- `):S.body),S.tabTrigger&&!S.trigger&&(!S.guard&&/^\w/.test(S.tabTrigger)&&(S.guard="\\b"),S.trigger=p.escapeRegExp(S.tabTrigger)),!(!S.trigger&&!S.guard&&!S.endTrigger&&!S.endGuard)&&(S.startRe=E(S.trigger,S.guard),S.triggerRe=new RegExp(S.trigger),S.endRe=E(S.endTrigger,S.endGuard),S.endTriggerRe=new RegExp(S.endTrigger))}var F=this.snippetMap,O=this.snippetNameMap,_=this;R||(R=[]),Array.isArray(R)?R.forEach(z):Object.keys(R).forEach(function(S){z(R[S])}),this._signal("registerSnippets",{scope:D})},w.prototype.unregister=function(R,D){function I(F){var O=z[F.scope||D];if(O&&O[F.name]){delete O[F.name];var _=E[F.scope||D],S=_&&_.indexOf(F);S>=0&&_.splice(S,1)}}var E=this.snippetMap,z=this.snippetNameMap;R.content?I(R):Array.isArray(R)&&R.forEach(I)},w.prototype.parseSnippetFile=function(R){R=R.replace(/\r/g,"");for(var D=[],I={},E=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,z;z=E.exec(R);){if(z[1])try{I=JSON.parse(z[1]),D.push(I)}catch{}if(z[4])I.content=z[4].replace(/^\t/gm,""),D.push(I),I={};else{var F=z[2],O=z[3];if(F=="regex"){var _=/\/((?:[^\/\\]|\\.)*)|$/g;I.guard=_.exec(O)[1],I.trigger=_.exec(O)[1],I.endTrigger=_.exec(O)[1],I.endGuard=_.exec(O)[1]}else F=="snippet"?(I.tabTrigger=O.match(/^\S*/)[0],I.name||(I.name=O)):F&&(I[F]=O)}}return D},w.prototype.getSnippetByName=function(R,D){var I=this.snippetNameMap,E;return this.getActiveScopes(D).some(function(z){var F=I[z];return F&&(E=F[R]),!!E},this),E},w})();x.implement(h.prototype,f);var m=function(w,R,D){function I(le){for(var me=[],_e=0;_e<le.length;_e++){var Ae=le[_e];if(typeof Ae=="object"){if(N[Ae.tabstopId])continue;var Me=le.lastIndexOf(Ae,_e-1);Ae=me[Me]||{tabstopId:Ae.tabstopId}}me[_e]=Ae}return me}D===void 0&&(D={});var E=w.getCursorPosition(),z=w.session.getLine(E.row),F=w.session.getTabString(),O=z.match(/^\s*/)[0];E.column<O.length&&(O=O.slice(0,E.column)),R=R.replace(/\r/g,"");var _=this.tokenizeTmSnippet(R);_=this.resolveVariables(_,w),_=_.map(function(le){return le==`
1122
- `&&!D.excludeExtraIndent?le+O:typeof le=="string"?le.replace(/\t/g,F):le});var S=[];_.forEach(function(le,me){if(typeof le=="object"){var _e=le.tabstopId,Ae=S[_e];if(Ae||(Ae=S[_e]=[],Ae.index=_e,Ae.value="",Ae.parents={}),Ae.indexOf(le)===-1){le.choices&&!Ae.choices&&(Ae.choices=le.choices),Ae.push(le);var Me=_.indexOf(le,me+1);if(Me!==-1){var qe=_.slice(me+1,Me),Ve=qe.some(function(ot){return typeof ot=="object"});Ve&&!Ae.value?Ae.value=qe:qe.length&&(!Ae.value||typeof Ae.value!="string")&&(Ae.value=qe.join(""))}}}}),S.forEach(function(le){le.length=0});for(var N={},W=0;W<_.length;W++){var V=_[W];if(typeof V=="object"){var G=V.tabstopId,Q=S[G],te=_.indexOf(V,W+1);if(N[G]){N[G]===V&&(delete N[G],Object.keys(N).forEach(function(le){Q.parents[le]=!0}));continue}N[G]=V;var ce=Q.value;typeof ce!="string"?ce=I(ce):V.fmt&&(ce=this.tmStrFormat(ce,V,w)),_.splice.apply(_,[W+1,Math.max(0,te-W)].concat(ce,V)),Q.indexOf(V)===-1&&Q.push(V)}}var ne=0,he=0,ue="";return _.forEach(function(le){if(typeof le=="string"){var me=le.split(`
1123
- `);me.length>1?(he=me[me.length-1].length,ne+=me.length-1):he+=le.length,ue+=le}else le&&(le.start?le.end={row:ne,column:he}:le.start={row:ne,column:he})}),{text:ue,tabstops:S,tokens:_}},y=(function(){function w(R){if(this.index=0,this.ranges=[],this.tabstops=[],R.tabstopManager)return R.tabstopManager;R.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=p.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(R)}return w.prototype.attach=function(R){this.$openTabstops=null,this.selectedTabstop=null,this.editor=R,this.session=R.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},w.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},w.prototype.onChange=function(R){for(var D=R.action[0]=="r",I=this.selectedTabstop||{},E=I.parents||{},z=this.tabstops.slice(),F=0;F<z.length;F++){var O=z[F],_=O==I||E[O.index];if(O.rangeList.$bias=_?0:1,R.action=="remove"&&O!==I){var S=O.parents&&O.parents[I.index],N=O.rangeList.pointIndex(R.start,S);N=N<0?-N-1:N+1;var W=O.rangeList.pointIndex(R.end,S);W=W<0?-W-1:W-1;for(var V=O.rangeList.ranges.slice(N,W),G=0;G<V.length;G++)this.removeRange(V[G])}O.rangeList.$onChange(R)}var Q=this.session;!this.$inChange&&D&&Q.getLength()==1&&!Q.getValue()&&this.detach()},w.prototype.updateLinkedFields=function(){var R=this.selectedTabstop;if(!(!R||!R.hasLinkedRanges||!R.firstNonLinked)){this.$inChange=!0;for(var D=this.session,I=D.getTextRange(R.firstNonLinked),E=0;E<R.length;E++){var z=R[E];if(z.linked){var F=z.original,O=u.snippetManager.tmStrFormat(I,F,this.editor);D.replace(z,O)}}this.$inChange=!1}},w.prototype.onAfterExec=function(R){R.command&&!R.command.readOnly&&this.updateLinkedFields()},w.prototype.onChangeSelection=function(){if(this.editor){for(var R=this.editor.selection.lead,D=this.editor.selection.anchor,I=this.editor.selection.isEmpty(),E=0;E<this.ranges.length;E++)if(!this.ranges[E].linked){var z=this.ranges[E].contains(R.row,R.column),F=I||this.ranges[E].contains(D.row,D.column);if(z&&F)return}this.detach()}},w.prototype.onChangeSession=function(){this.detach()},w.prototype.tabNext=function(R){var D=this.tabstops.length,I=this.index+(R||1);I=Math.min(Math.max(I,1),D),I==D&&(I=0),this.selectTabstop(I),this.updateTabstopMarkers(),I===0&&this.detach()},w.prototype.selectTabstop=function(R){this.$openTabstops=null;var D=this.tabstops[this.index];if(D&&this.addTabstopMarkers(D),this.index=R,D=this.tabstops[this.index],!(!D||!D.length)){this.selectedTabstop=D;var I=D.firstNonLinked||D;if(D.choices&&(I.cursor=I.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(I);else{var E=this.editor.multiSelect;E.toSingleRange(I);for(var z=0;z<D.length;z++)D.hasLinkedRanges&&D[z].linked||E.addRange(D[z].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},w.prototype.addTabstops=function(R,D,I){var E=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!R[0]){var z=s.fromPoints(I,I);T(z.start,D),T(z.end,D),R[0]=[z],R[0].index=0}var F=this.index,O=[F+1,0],_=this.ranges,S=this.snippetId=(this.snippetId||0)+1;R.forEach(function(N,W){var V=this.$openTabstops[W]||N;V.snippetId=S;for(var G=0;G<N.length;G++){var Q=N[G],te=s.fromPoints(Q.start,Q.end||Q.start);L(te.start,D),L(te.end,D),te.original=Q,te.tabstop=V,_.push(te),V!=N?V.unshift(te):V[G]=te,Q.fmtString||V.firstNonLinked&&E?(te.linked=!0,V.hasLinkedRanges=!0):V.firstNonLinked||(V.firstNonLinked=te)}V.firstNonLinked||(V.hasLinkedRanges=!1),V===N&&(O.push(V),this.$openTabstops[W]=V),this.addTabstopMarkers(V),V.rangeList=V.rangeList||new o,V.rangeList.$bias=0,V.rangeList.addList(V)},this),O.length>2&&(this.tabstops.length&&O.push(O.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,O))},w.prototype.addTabstopMarkers=function(R){var D=this.session;R.forEach(function(I){I.markerId||(I.markerId=D.addMarker(I,"ace_snippet-marker","text"))})},w.prototype.removeTabstopMarkers=function(R){var D=this.session;R.forEach(function(I){D.removeMarker(I.markerId),I.markerId=null})},w.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var R=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&R--,this.tabstops.forEach(function(D){D.snippetId===R?this.addTabstopMarkers(D):this.removeTabstopMarkers(D)},this)}},w.prototype.removeRange=function(R){var D=R.tabstop.indexOf(R);D!=-1&&R.tabstop.splice(D,1),D=this.ranges.indexOf(R),D!=-1&&this.ranges.splice(D,1),D=R.tabstop.rangeList.ranges.indexOf(R),D!=-1&&R.tabstop.splice(D,1),this.session.removeMarker(R.markerId),R.tabstop.length||(D=this.tabstops.indexOf(R.tabstop),D!=-1&&this.tabstops.splice(D,1),this.tabstops.length||this.detach())},w})();y.prototype.keyboardHandler=new a,y.prototype.keyboardHandler.bindKeys({Tab:function(w){u.snippetManager&&u.snippetManager.expandWithTab(w)||(w.tabstopManager.tabNext(1),w.renderer.scrollCursorIntoView())},"Shift-Tab":function(w){w.tabstopManager.tabNext(-1),w.renderer.scrollCursorIntoView()},Esc:function(w){w.tabstopManager.detach()}});var L=function(w,R){w.row==0&&(w.column+=R.column),w.row+=R.row},T=function(w,R){w.row==R.row&&(w.column-=R.column),w.row-=R.row};v.importCssString(`
1124
- .ace_snippet-marker {
1125
- -moz-box-sizing: border-box;
1126
- box-sizing: border-box;
1127
- background: rgba(194, 193, 208, 0.09);
1128
- border: 1px dotted rgba(211, 208, 235, 0.62);
1129
- position: absolute;
1130
- }`,"snippets.css",!1),u.snippetManager=new h;var k=e("./editor").Editor;(function(){this.insertSnippet=function(w,R){return u.snippetManager.insertSnippet(this,w,R)},this.expandSnippet=function(w){return u.snippetManager.expandWithTab(this,w)}}).call(k.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,u,$){var b=e("../virtual_renderer").VirtualRenderer,v=e("../editor").Editor,x=e("../range").Range,f=e("../lib/event"),p=e("../lib/lang"),s=e("../lib/dom"),o=e("../config").nls,a=e("./../lib/useragent"),r=function(L){return"suggest-aria-id:".concat(L)},n=a.isSafari?"menu":"listbox",i=a.isSafari?"menuitem":"option",h=a.isSafari?"aria-current":"aria-selected",m=function(L){var T=new b(L);T.$maxLines=4;var k=new v(T);return k.setHighlightActiveLine(!1),k.setShowPrintMargin(!1),k.renderer.setShowGutter(!1),k.renderer.setHighlightGutterLine(!1),k.$mouseHandler.$focusTimeout=0,k.$highlightTagPending=!0,k},y=(function(){function L(T){var k=s.createElement("div"),w=m(k);T&&T.appendChild(k),k.style.display="none",w.renderer.content.style.cursor="default",w.renderer.setStyle("ace_autocomplete"),w.renderer.$textLayer.element.setAttribute("role",n),w.renderer.$textLayer.element.setAttribute("aria-roledescription",o("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),w.renderer.$textLayer.element.setAttribute("aria-label",o("autocomplete.popup.aria-label","Autocomplete suggestions")),w.renderer.textarea.setAttribute("aria-hidden","true"),w.setOption("displayIndentGuides",!1),w.setOption("dragDelay",150);var R=function(){};w.focus=R,w.$isFocused=!0,w.renderer.$cursorLayer.restartTimer=R,w.renderer.$cursorLayer.element.style.opacity="0",w.renderer.$maxLines=8,w.renderer.$keepTextAreaAtCursor=!1,w.setHighlightActiveLine(!1),w.session.highlight(""),w.session.$searchHighlight.clazz="ace_highlight-marker",w.on("mousedown",function(_){var S=_.getDocumentPosition();w.selection.moveToPosition(S),E.start.row=E.end.row=S.row,_.stop()});var D,I=new x(-1,0,-1,1/0),E=new x(-1,0,-1,1/0);E.id=w.session.addMarker(E,"ace_active-line","fullLine"),w.setSelectOnHover=function(_){_?I.id&&(w.session.removeMarker(I.id),I.id=null):I.id=w.session.addMarker(I,"ace_line-hover","fullLine")},w.setSelectOnHover(!1),w.on("mousemove",function(_){if(!D){D=_;return}if(!(D.x==_.x&&D.y==_.y)){D=_,D.scrollTop=w.renderer.scrollTop,w.isMouseOver=!0;var S=D.getDocumentPosition().row;I.start.row!=S&&(I.id||w.setRow(S),F(S))}}),w.renderer.on("beforeRender",function(){if(D&&I.start.row!=-1){D.$pos=null;var _=D.getDocumentPosition().row;I.id||w.setRow(_),F(_,!0)}}),w.renderer.on("afterRender",function(){for(var _=w.renderer.$textLayer,S=_.config.firstRow,N=_.config.lastRow;S<=N;S++){var W=_.element.childNodes[S-_.config.firstRow];W.setAttribute("role",i),W.setAttribute("aria-roledescription",o("autocomplete.popup.item.aria-roledescription","item")),W.setAttribute("aria-setsize",w.data.length),W.setAttribute("aria-describedby","doc-tooltip"),W.setAttribute("aria-posinset",S+1);var V=w.getData(S);if(V){var G="".concat(V.caption||V.value).concat(V.meta?", ".concat(V.meta):"");W.setAttribute("aria-label",G)}var Q=W.querySelectorAll(".ace_completion-highlight");Q.forEach(function(te){te.setAttribute("role","mark")})}}),w.renderer.on("afterRender",function(){var _=w.getRow(),S=w.renderer.$textLayer,N=S.element.childNodes[_-S.config.firstRow],W=document.activeElement;if(N!==w.selectedNode&&w.selectedNode&&(s.removeCssClass(w.selectedNode,"ace_selected"),w.selectedNode.removeAttribute(h),w.selectedNode.removeAttribute("id")),W.removeAttribute("aria-activedescendant"),w.selectedNode=N,N){var V=r(_);s.addCssClass(N,"ace_selected"),N.id=V,S.element.setAttribute("aria-activedescendant",V),W.setAttribute("aria-activedescendant",V),N.setAttribute(h,"true")}});var z=function(){F(-1)},F=function(_,S){_!==I.start.row&&(I.start.row=I.end.row=_,S||w.session._emit("changeBackMarker"),w._emit("changeHoverMarker"))};w.getHoveredRow=function(){return I.start.row},f.addListener(w.container,"mouseout",function(){w.isMouseOver=!1,z()}),w.on("hide",z),w.on("changeSelection",z),w.session.doc.getLength=function(){return w.data.length},w.session.doc.getLine=function(_){var S=w.data[_];return typeof S=="string"?S:S&&S.value||""};var O=w.session.bgTokenizer;return O.$tokenizeRow=function(_){function S(le,me){le&&W.push({type:(N.className||"")+(me||""),value:le})}var N=w.data[_],W=[];if(!N)return W;typeof N=="string"&&(N={value:N});for(var V=N.caption||N.value||N.name,G=V.toLowerCase(),Q=(w.filterText||"").toLowerCase(),te=0,ce=0,ne=0;ne<=Q.length;ne++)if(ne!=ce&&(N.matchMask&1<<ne||ne==Q.length)){var he=Q.slice(ce,ne);ce=ne;var ue=G.indexOf(he,te);if(ue==-1)continue;S(V.slice(te,ue),""),te=ue+he.length,S(V.slice(ue,te),"completion-highlight")}return S(V.slice(te,V.length),""),W.push({type:"completion-spacer",value:" "}),N.meta&&W.push({type:"completion-meta",value:N.meta}),N.message&&W.push({type:"completion-message",value:N.message}),W},O.$updateOnChange=R,O.start=R,w.session.$computeWidth=function(){return this.screenWidth=0},w.isOpen=!1,w.isTopdown=!1,w.autoSelect=!0,w.filterText="",w.isMouseOver=!1,w.data=[],w.setData=function(_,S){w.filterText=S||"",w.setValue(p.stringRepeat(`
1131
- `,_.length),-1),w.data=_||[],w.setRow(0)},w.getData=function(_){return w.data[_]},w.getRow=function(){return E.start.row},w.setRow=function(_){_=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,_)),E.start.row!=_&&(w.selection.clearSelection(),E.start.row=E.end.row=_||0,w.session._emit("changeBackMarker"),w.moveCursorTo(_||0,0),w.isOpen&&w._signal("select"))},w.on("changeSelection",function(){w.isOpen&&w.setRow(w.selection.lead.row),w.renderer.scrollCursorIntoView()}),w.hide=function(){this.container.style.display="none",w.anchorPos=null,w.anchor=null,w.isOpen&&(w.isOpen=!1,this._signal("hide"))},w.tryShow=function(_,S,N,W){if(!W&&w.isOpen&&w.anchorPos&&w.anchor&&w.anchorPos.top===_.top&&w.anchorPos.left===_.left&&w.anchor===N)return!0;var V=this.container,G=this.renderer.scrollBar.width||10,Q=window.innerHeight-G,te=window.innerWidth-G,ce=this.renderer,ne=ce.$maxLines*S*1.4,he={top:0,bottom:0},ue=Q-_.top-3*this.$borderSize-S,le=_.top-3*this.$borderSize;N||(le<=ue||ue>=ne?N="bottom":N="top"),N==="top"?(he.bottom=_.top-this.$borderSize,he.top=he.bottom-ne):N==="bottom"&&(he.top=_.top+S+this.$borderSize,he.bottom=he.top+ne);var me=he.top>=0&&he.bottom<=Q;if(!W&&!me)return!1;me?ce.$maxPixelHeight=null:N==="top"?ce.$maxPixelHeight=le:ce.$maxPixelHeight=ue,N==="top"?(V.style.top="",V.style.bottom=Q+G-he.bottom+"px",w.isTopdown=!1):(V.style.top=he.top+"px",V.style.bottom="",w.isTopdown=!0),V.style.display="";var _e=_.left;return _e+V.offsetWidth>te&&(_e=te-V.offsetWidth),V.style.left=_e+"px",V.style.right="",s.$fixPositionBug(V),w.isOpen||(w.isOpen=!0,this._signal("show"),D=null),w.anchorPos=_,w.anchor=N,!0},w.show=function(_,S,N){this.tryShow(_,S,N?"bottom":void 0,!0)},w.goTo=function(_){var S=this.getRow(),N=this.session.getLength()-1;switch(_){case"up":S=S<=0?N:S-1;break;case"down":S=S>=N?-1:S+1;break;case"start":S=0;break;case"end":S=N}this.setRow(S)},w.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},w.$imageSize=0,w.$borderSize=1,w}return L})();s.importCssString(`
1132
- .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1133
- background-color: #CAD6FA;
1134
- z-index: 1;
1135
- }
1136
- .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1137
- background-color: #3a674e;
1138
- }
1139
- .ace_editor.ace_autocomplete .ace_line-hover {
1140
- border: 1px solid #abbffe;
1141
- margin-top: -1px;
1142
- background: rgba(233,233,253,0.4);
1143
- position: absolute;
1144
- z-index: 2;
1145
- }
1146
- .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1147
- border: 1px solid rgba(109, 150, 13, 0.8);
1148
- background: rgba(58, 103, 78, 0.62);
1149
- }
1150
- .ace_completion-meta {
1151
- opacity: 0.5;
1152
- margin-left: 0.9em;
1153
- }
1154
- .ace_completion-message {
1155
- margin-left: 0.9em;
1156
- color: blue;
1157
- }
1158
- .ace_editor.ace_autocomplete .ace_completion-highlight{
1159
- color: #2d69c7;
1160
- }
1161
- .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1162
- color: #93ca12;
1163
- }
1164
- .ace_editor.ace_autocomplete {
1165
- width: 300px;
1166
- z-index: 200000;
1167
- border: 1px lightgray solid;
1168
- position: fixed;
1169
- box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1170
- line-height: 1.4;
1171
- background: #fefefe;
1172
- color: #111;
1173
- }
1174
- .ace_dark.ace_editor.ace_autocomplete {
1175
- border: 1px #484747 solid;
1176
- box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1177
- line-height: 1.4;
1178
- background: #25282c;
1179
- color: #c1c1c1;
1180
- }
1181
- .ace_autocomplete .ace_text-layer {
1182
- width: calc(100% - 8px);
1183
- }
1184
- .ace_autocomplete .ace_line {
1185
- display: flex;
1186
- align-items: center;
1187
- }
1188
- .ace_autocomplete .ace_line > * {
1189
- min-width: 0;
1190
- flex: 0 0 auto;
1191
- }
1192
- .ace_autocomplete .ace_line .ace_ {
1193
- flex: 0 1 auto;
1194
- overflow: hidden;
1195
- text-overflow: ellipsis;
1196
- }
1197
- .ace_autocomplete .ace_completion-spacer {
1198
- flex: 1;
1199
- }
1200
- .ace_autocomplete.ace_loading:after {
1201
- content: "";
1202
- position: absolute;
1203
- top: 0px;
1204
- height: 2px;
1205
- width: 8%;
1206
- background: blue;
1207
- z-index: 100;
1208
- animation: ace_progress 3s infinite linear;
1209
- animation-delay: 300ms;
1210
- transform: translateX(-100%) scaleX(1);
1211
- }
1212
- @keyframes ace_progress {
1213
- 0% { transform: translateX(-100%) scaleX(1) }
1214
- 50% { transform: translateX(625%) scaleX(2) }
1215
- 100% { transform: translateX(1500%) scaleX(3) }
1216
- }
1217
- @media (prefers-reduced-motion) {
1218
- .ace_autocomplete.ace_loading:after {
1219
- transform: translateX(625%) scaleX(2);
1220
- animation: none;
1221
- }
1222
- }
1223
- `,"autocompletion.css",!1),u.AcePopup=y,u.$singleLineEditor=m,u.getAriaId=r}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,u,$){var b=(function(){function v(x){this.editor=x,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return v.prototype.setScreenReaderContent=function(x){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var p=this.popup.getRow(),s=this.popup.renderer.$textLayer,o=s.element.childNodes[p-s.config.firstRow];if(o){for(var a="doc-tooltip ",r=0;r<this._lines.length;r++)a+="ace-inline-screenreader-line-".concat(r," ");o.setAttribute("aria-describedby",a)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=x.split(/\r\n|\r|\n/);var f=this.createCodeBlock();this.screenReaderDiv.appendChild(f)},v.prototype.destroy=function(){this.screenReaderDiv.remove()},v.prototype.createCodeBlock=function(){var x=document.createElement("pre");x.setAttribute("id","ace-inline-screenreader");for(var f=0;f<this._lines.length;f++){var p=document.createElement("code");p.setAttribute("id","ace-inline-screenreader-line-".concat(f));var s=document.createTextNode(this._lines[f]);p.appendChild(s),x.appendChild(p)}return x},v})();u.AceInlineScreenReader=b}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,u,$){var b=e("../snippets").snippetManager,v=e("./inline_screenreader").AceInlineScreenReader,x=(function(){function f(){this.editor=null}return f.prototype.show=function(p,s,o){if(o=o||"",p&&this.editor&&this.editor!==p&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!p||!s)return!1;this.inlineScreenReader||(this.inlineScreenReader=new v(p));var a=s.snippet?b.getDisplayTextForSnippet(p,s.snippet):s.value;return s.hideInlinePreview||!a||!a.startsWith(o)?!1:(this.editor=p,this.inlineScreenReader.setScreenReaderContent(a),a=a.slice(o.length),a===""?p.removeGhostText():p.setGhostText(a),!0)},f.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},f.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},f.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},f})();u.AceInline=x}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,u,$){u.parForEach=function(v,x,f){var p=0,s=v.length;s===0&&f();for(var o=0;o<s;o++)x(v[o],function(a,r){p++,p===s&&f(a,r)})};var b=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;u.retrievePrecedingIdentifier=function(v,x,f){f=f||b;for(var p=[],s=x-1;s>=0&&f.test(v[s]);s--)p.push(v[s]);return p.reverse().join("")},u.retrieveFollowingIdentifier=function(v,x,f){f=f||b;for(var p=[],s=x;s<v.length&&f.test(v[s]);s++)p.push(v[s]);return p},u.getCompletionPrefix=function(v){var x=v.getCursorPosition(),f=v.session.getLine(x.row),p;return v.completers.forEach((function(s){s.identifierRegexps&&s.identifierRegexps.forEach((function(o){!p&&o&&(p=this.retrievePrecedingIdentifier(f,x.column,o))}).bind(this))}).bind(this)),p||this.retrievePrecedingIdentifier(f,x.column)},u.triggerAutocomplete=function(v,f){var f=f??v.session.getPrecedingCharacter();return v.completers.some(function(p){if(p.triggerCharacters&&Array.isArray(p.triggerCharacters))return p.triggerCharacters.includes(f)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(e,u,$){var b=e("./keyboard/hash_handler").HashHandler,v=e("./autocomplete/popup").AcePopup,x=e("./autocomplete/inline").AceInline,f=e("./autocomplete/popup").getAriaId,p=e("./autocomplete/util"),s=e("./lib/lang"),o=e("./lib/dom"),a=e("./snippets").snippetManager,r=e("./config"),n=e("./lib/event"),i=e("./lib/scroll").preventParentScroll,h=function(T,k){k.completer&&k.completer.destroy()},m=(function(){function T(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new b,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=s.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=s.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=s.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=s.delayedCall((function(){var k=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!k||this.editor.completers.length===0||(this.completions=new L(T.completionsForLoading),this.openPopup(this.editor,k.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(T,"completionsForLoading",{get:function(){return[{caption:r.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),T.prototype.$init=function(){return this.popup=new v(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(k){this.insertMatch(),k.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),n.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},T.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new x,this.inlineRenderer},T.prototype.getPopup=function(){return this.popup||this.$init()},T.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},T.prototype.$seen=function(k){!this.hasSeen.has(k)&&k&&k.completer&&k.completer.onSeen&&typeof k.completer.onSeen=="function"&&(k.completer.onSeen(this.editor,k),this.hasSeen.add(k))},T.prototype.$onPopupChange=function(k){if(this.inlineRenderer&&this.inlineEnabled){var w=k?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(w),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},T.prototype.$updateGhostText=function(k){var w=this.base.row,R=this.base.column,D=this.editor.getCursorPosition().column,I=this.editor.session.getLine(w).slice(R,D);this.inlineRenderer.show(this.editor,k,I)?this.$seen(k):this.inlineRenderer.hide()},T.prototype.$onPopupRender=function(){var k=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var w=this.popup.getFirstVisibleRow();w<=this.popup.getLastVisibleRow();w++){var R=this.popup.getData(w);R&&(!k||R.hideInlinePreview)&&this.$seen(R)}},T.prototype.$onPopupShow=function(k){this.$onPopupChange(k),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},T.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var k=this.editor.container.parentNode,w=[];k;)w.push(k),k.addEventListener("scroll",this.onLayoutChange,{passive:!0}),k=k.parentNode;this.$elements=w}},T.prototype.unObserveLayoutChanges=function(){var k=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(w){w.removeEventListener("scroll",k.onLayoutChange,{passive:!0})}),this.$elements=null},T.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},T.prototype.$updatePopupPosition=function(){var k=this.editor,w=k.renderer,R=w.layerConfig.lineHeight,D=w.$cursorLayer.getPixelPosition(this.base,!0);D.left-=this.popup.getTextLeftOffset();var I=k.container.getBoundingClientRect();D.top+=I.top-w.layerConfig.offset,D.left+=I.left-k.renderer.scrollLeft,D.left+=w.gutterWidth;var E={top:D.top,left:D.left};w.$ghostText&&w.$ghostTextWidget&&this.base.row===w.$ghostText.position.row&&(E.top+=w.$ghostTextWidget.el.offsetHeight);var z=k.container.getBoundingClientRect().bottom-R,F=z<E.top?{top:z,left:E.left}:E;this.popup.tryShow(F,R,"bottom")||this.popup.tryShow(D,R,"top")||this.popup.show(D,R)},T.prototype.openPopup=function(k,w,R){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var D=this.popup.getRow(),I=this.popup.data[D];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:f(this.popup.getRow()),inline:this.inlineEnabled}),k.keyBinding.addKeyboardHandler(this.keyboardHandler);var E;this.stickySelection&&(E=this.popup.data.indexOf(I)),(!E||E===-1)&&(E=0),this.popup.setRow(this.autoSelect?E:-1),E===D&&I!==this.completions.filtered[E]&&this.$onPopupChange();var z=this.inlineRenderer&&this.inlineEnabled;if(E===D&&z){var F=this.popup.getData(this.popup.getRow());this.$updateGhostText(F)}R||(this.popup.setTheme(k.getTheme()),this.popup.setFontSize(k.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},T.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},T.prototype.changeListener=function(k){var w=this.editor.selection.lead;(w.row!=this.base.row||w.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},T.prototype.blurListener=function(k){var w=document.activeElement,R=this.editor.textInput.getElement(),D=k.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(k.relatedTarget),I=this.popup&&this.popup.container;w!=R&&w.parentNode!=I&&!D&&w!=this.tooltipNode&&k.relatedTarget!=R&&this.detach()},T.prototype.mousedownListener=function(k){this.detach()},T.prototype.mousewheelListener=function(k){this.popup&&!this.popup.isMouseOver&&this.detach()},T.prototype.mouseOutListener=function(k){this.popup.isOpen&&this.$updatePopupPosition()},T.prototype.goTo=function(k){this.popup.goTo(k)},T.prototype.insertMatch=function(k,w){if(k||(k=this.popup.getData(this.popup.getRow())),!k)return!1;if(k.value==="")return this.detach();var R=this.completions,D=this.getCompletionProvider().insertMatch(this.editor,k,R.filterText,w);return this.completions==R&&this.detach(),D},T.prototype.showPopup=function(k,w){this.editor&&this.detach(),this.activated=!0,this.editor=k,k.completer!=this&&(k.completer&&k.completer.detach(),k.completer=this),k.on("changeSelection",this.changeListener),k.on("blur",this.blurListener),k.on("mousedown",this.mousedownListener),k.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,w)},T.prototype.getCompletionProvider=function(k){return this.completionProvider||(this.completionProvider=new y(k)),this.completionProvider},T.prototype.gatherCompletions=function(k,w){return this.getCompletionProvider().gatherCompletions(k,w)},T.prototype.updateCompletions=function(k,w){if(k&&this.base&&this.completions){var D=this.editor.getCursorPosition(),I=this.editor.session.getTextRange({start:this.base,end:D});if(I==this.completions.filterText)return;if(this.completions.setFilter(I),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==I&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,I,k);return}if(w&&w.matches){var D=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(D.row,D.column),this.base.$insertRight=!0,this.completions=new L(w.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",k)}var R=this.editor.getSession(),D=this.editor.getCursorPosition(),I=p.getCompletionPrefix(this.editor);this.base=R.doc.createAnchor(D.row,D.column-I.length),this.base.$insertRight=!0;var E={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:I,pos:D}).provideCompletions(this.editor,E,(function(z,F,O){var _=F.filtered,S=p.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!_.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(S)),N){var W=[{caption:N,value:""}];this.completions=new L(W),this.openPopup(this.editor,S,k),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(_.length==1&&_[0].value==S&&!_[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&_.length==1)return this.insertMatch(_[0])}this.completions=!O&&this.showLoadingState?new L(T.completionsForLoading.concat(_),F.filterText):F,this.openPopup(this.editor,S,k),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!O)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},T.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},T.prototype.updateDocTooltip=function(){var k=this.popup,w=this.completions&&this.completions.filtered,R=w&&(w[k.getHoveredRow()]||w[k.getRow()]),D=null;if(!R||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var I=this.editor.completers.length,E=0;E<I;E++){var z=this.editor.completers[E];if(z.getDocTooltip&&R.completerId===z.id){D=z.getDocTooltip(R);break}}if(!D&&typeof R!="string"&&(D=R),typeof D=="string"&&(D={docText:D}),!D||!D.docHTML&&!D.docText)return this.hideDocTooltip();this.showDocTooltip(D)},T.prototype.showDocTooltip=function(k){this.tooltipNode||(this.tooltipNode=o.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",i));var w=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(w.isDark?"ace_dark ":"")+(w.cssClass||"");var R=this.tooltipNode;k.docHTML?R.innerHTML=k.docHTML:k.docText&&(R.textContent=k.docText),R.parentNode||this.popup.container.appendChild(this.tooltipNode);var D=this.popup,I=D.container.getBoundingClientRect(),E=400,z=300,F=D.renderer.scrollBar.width||10,O=I.left,_=window.innerWidth-I.right-F,S=D.isTopdown?window.innerHeight-F-I.bottom:I.top,N=[Math.min(_/E,1),Math.min(O/E,1),Math.min(S/z,1)*.9],W=Math.max.apply(Math,N),V=R.style;V.display="block",W==N[0]||N[0]>=1?(V.left=I.right+1+"px",V.right="",V.maxWidth=E*W+"px",V.top=I.top+"px",V.bottom="",V.maxHeight=Math.min(window.innerHeight-F-I.top,z)+"px"):W==N[1]||N[1]>=1?(V.right=window.innerWidth-I.left+"px",V.left="",V.maxWidth=E*W+"px",V.top=I.top+"px",V.bottom="",V.maxHeight=Math.min(window.innerHeight-F-I.top,z)+"px"):W==N[2]&&(V.left=I.left+"px",V.right="",V.maxWidth=Math.min(E,window.innerWidth-I.left)+"px",D.isTopdown?(V.top=I.bottom+"px",V.bottom="",V.maxHeight=Math.min(window.innerHeight-F-I.bottom,z)+"px"):(V.top="",V.bottom=window.innerHeight-I.top+"px",V.maxHeight=Math.min(I.top,z)+"px")),o.$fixPositionBug(R)},T.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var k=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==k&&this.editor.focus(),this.tooltipNode=null,k.parentNode&&k.parentNode.removeChild(k)}},T.prototype.onTooltipClick=function(k){for(var w=k.target;w&&w!=this.tooltipNode;){if(w.nodeName=="A"&&w.href){w.rel="noreferrer",w.target="_blank";break}w=w.parentNode}},T.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var k=this.popup.container;k&&k.parentNode&&k.parentNode.removeChild(k)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",h),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},T.for=function(k){return k.completer instanceof T||(k.completer&&(k.completer.destroy(),k.completer=null),r.get("sharedPopups")?(T.$sharedInstance||(T.$sharedInstance=new T),k.completer=T.$sharedInstance):(k.completer=new T,k.once("destroy",h))),k.completer},T})();m.prototype.commands={Up:function(T){T.completer.goTo("up")},Down:function(T){T.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(T){T.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(T){T.completer.goTo("end")},Esc:function(T){T.completer.detach()},Return:function(T){return T.completer.insertMatch()},"Shift-Return":function(T){T.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(T){var k=T.completer.insertMatch();if(k||T.tabstopManager)return k;T.completer.goTo("down")},Backspace:function(T){T.execCommand("backspace");var k=p.getCompletionPrefix(T);!k&&T.completer&&T.completer.detach()},PageUp:function(T){T.completer.popup.gotoPageUp()},PageDown:function(T){T.completer.popup.gotoPageDown()}},m.startCommand={name:"startAutocomplete",exec:function(T,k){var w=m.for(T);w.autoInsert=!1,w.autoSelect=!0,w.autoShown=!1,w.showPopup(T,k),w.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var y=(function(){function T(k){this.initialPosition=k,this.active=!0}return T.prototype.insertByIndex=function(k,w,R){return!this.completions||!this.completions.filtered?!1:this.insertMatch(k,this.completions.filtered[w],R)},T.prototype.insertMatch=function(k,w,R){if(!w)return!1;if(k.startOperation({command:{name:"insertMatch"}}),w.completer&&w.completer.insertMatch)w.completer.insertMatch(k,w);else{if(!this.completions)return!1;var D=this.completions.filterText.length,I=0;if(w.range&&w.range.start.row===w.range.end.row&&(D-=this.initialPosition.prefix.length,D+=this.initialPosition.pos.column-w.range.start.column,I+=w.range.end.column-this.initialPosition.pos.column),D||I){var E;k.selection.getAllRanges?E=k.selection.getAllRanges():E=[k.getSelectionRange()];for(var z=0,F;F=E[z];z++)F.start.column-=D,F.end.column+=I,k.session.remove(F)}w.snippet?a.insertSnippet(k,w.snippet):this.$insertString(k,w),w.completer&&w.completer.onInsert&&typeof w.completer.onInsert=="function"&&w.completer.onInsert(k,w),w.command&&w.command==="startAutocomplete"&&k.execCommand(w.command)}return k.endOperation(),!0},T.prototype.$insertString=function(k,w){var R=w.value||w;k.execCommand("insertstring",R)},T.prototype.gatherCompletions=function(k,w){var R=k.getSession(),D=k.getCursorPosition(),I=p.getCompletionPrefix(k),E=[];this.completers=k.completers;var z=k.completers.length;return k.completers.forEach(function(F,O){F.getCompletions(k,R,D,I,function(_,S){F.hideInlinePreview&&(S=S.map(function(N){return Object.assign(N,{hideInlinePreview:F.hideInlinePreview})})),!_&&S&&(E=E.concat(S)),w(null,{prefix:p.getCompletionPrefix(k),matches:E,finished:--z===0})})}),!0},T.prototype.provideCompletions=function(k,w,R){var D=(function(F){var O=F.prefix,_=F.matches;this.completions=new L(_),w.exactMatch&&(this.completions.exactMatch=!0),w.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(F.finished||this.completions.filtered.length)&&R(null,this.completions,F.finished)}).bind(this),I=!0,E=null;if(this.gatherCompletions(k,(function(F,O){if(this.active){F&&(R(F,[],!0),this.detach());var _=O.prefix;if(_.indexOf(O.prefix)===0){if(I){E=O;return}D(O)}}}).bind(this)),I=!1,E){var z=E;E=null,D(z)}},T.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(k){typeof k.cancel=="function"&&k.cancel()})},T})(),L=(function(){function T(k,w){this.all=k,this.filtered=k,this.filterText=w||"",this.exactMatch=!1,this.ignoreCaption=!1}return T.prototype.setFilter=function(k){if(k.length>this.filterText&&k.lastIndexOf(this.filterText,0)===0)var w=this.filtered;else var w=this.all;this.filterText=k,w=this.filterCompletions(w,this.filterText),w=w.sort(function(D,I){return I.exactMatch-D.exactMatch||I.$score-D.$score||(D.caption||D.value).localeCompare(I.caption||I.value)});var R=null;w=w.filter(function(D){var I=D.snippet||D.caption||D.value;return I===R?!1:(R=I,!0)}),this.filtered=w},T.prototype.filterCompletions=function(k,w){var R=[],D=w.toUpperCase(),I=w.toLowerCase();e:for(var E=0,z;z=k[E];E++){if(z.skipFilter){z.$score=z.score,R.push(z);continue}var F=!this.ignoreCaption&&z.caption||z.value||z.snippet;if(F){var O=-1,_=0,S=0,N,W;if(this.exactMatch){if(w!==F.substr(0,w.length))continue e}else{var V=F.toLowerCase().indexOf(I);if(V>-1)S=V;else for(var G=0;G<w.length;G++){var Q=F.indexOf(I[G],O+1),te=F.indexOf(D[G],O+1);if(N=Q>=0&&(te<0||Q<te)?Q:te,N<0)continue e;W=N-O-1,W>0&&(O===-1&&(S+=10),S+=W,_|=1<<G),O=N}}z.matchMask=_,z.exactMatch=S?0:1,z.$score=(z.score||0)-S,R.push(z)}}return R},T})();u.Autocomplete=m,u.CompletionProvider=y,u.FilteredList=L}),ace.define("ace/marker_group",["require","exports","module"],function(e,u,$){var b=(function(){function v(x,f){f&&(this.markerType=f.markerType),this.markers=[],this.session=x,x.addDynamicMarker(this)}return v.prototype.getMarkerAtPosition=function(x){return this.markers.find(function(f){return f.range.contains(x.row,x.column)})},v.prototype.markersComparator=function(x,f){return x.range.start.row-f.range.start.row},v.prototype.setMarkers=function(x){this.markers=x.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},v.prototype.update=function(x,f,p,s){if(!(!this.markers||!this.markers.length))for(var o=s.firstRow,a=s.lastRow,r,n=0,i=0,h=0;h<this.markers.length;h++){var m=this.markers[h];if(!(m.range.end.row<o)&&!(m.range.start.row>a)&&(m.range.start.row===i?n++:(i=m.range.start.row,n=0),!(n>200))){var y=m.range.clipRows(o,a);if(!(y.start.row===y.end.row&&y.start.column===y.end.column)){var L=y.toScreenRange(p);if(L.isEmpty()){r=p.getNextFoldLine(y.end.row,r),r&&r.end.row>y.end.row&&(o=r.end.row);continue}this.markerType==="fullLine"?f.drawFullLineMarker(x,L,m.className,s):L.isMultiLine()?this.markerType==="line"?f.drawMultiLineMarker(x,L,m.className,s):f.drawTextMarker(x,L,m.className,s):f.drawSingleLineMarker(x,L,m.className+" ace_br15",s)}}}},v})();b.prototype.MAX_MARKERS=1e4,u.MarkerGroup=b}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,u,$){function b(p,s){var o=p.getTextRange(x.fromPoints({row:0,column:0},s));return o.split(f).length-1}function v(p,s){var o=b(p,s),a=p.getValue().split(f),r=Object.create(null),n=a[o];return a.forEach(function(i,h){if(!(!i||i===n)){var m=Math.abs(o-h),y=a.length-m;r[i]?r[i]=Math.max(y,r[i]):r[i]=y}}),r}var x=e("../range").Range,f=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;u.id="textCompleter",u.getCompletions=function(p,s,o,a,r){var n=v(s,o),i=Object.keys(n);r(null,i.map(function(h){return{caption:h,value:h,score:n[h],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,u,$){var b=e("../snippets").snippetManager,v=e("../autocomplete").Autocomplete,x=e("../config"),f=e("../lib/lang"),p=e("../autocomplete/util"),s=e("../marker_group").MarkerGroup,o=e("../autocomplete/text_completer"),a={getCompletions:function(I,E,z,F,O){if(E.$mode.completer)return E.$mode.completer.getCompletions(I,E,z,F,O);var _=I.session.getState(z.row),S=E.$mode.getCompletions(_,E,z,F);S=S.map(function(N){return N.completerId=a.id,N}),O(null,S)},id:"keywordCompleter"},r=function(I){var E={};return I.replace(/\${(\d+)(:(.*?))?}/g,function(z,F,O,_){return E[F]=_||""}).replace(/\$(\d+?)/g,function(z,F){return E[F]})},n={getCompletions:function(I,E,z,F,O){var _=[],S=E.getTokenAt(z.row,z.column);S&&S.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?_.push("html-tag"):_=b.getActiveScopes(I);var N=b.snippetMap,W=[];_.forEach(function(V){for(var G=N[V]||[],Q=G.length;Q--;){var te=G[Q],ce=te.name||te.tabTrigger;ce&&W.push({caption:ce,snippet:te.content,meta:te.tabTrigger&&!te.name?te.tabTrigger+"⇥ ":"snippet",completerId:n.id})}},this),O(null,W)},getDocTooltip:function(I){I.snippet&&!I.docHTML&&(I.docHTML=["<b>",f.escapeHTML(I.caption),"</b>","<hr></hr>",f.escapeHTML(r(I.snippet))].join(""))},id:"snippetCompleter"},i=[n,o,a];u.setCompleters=function(I){i.length=0,I&&i.push.apply(i,I)},u.addCompleter=function(I){i.push(I)},u.textCompleter=o,u.keyWordCompleter=a,u.snippetCompleter=n;var h={name:"expandSnippet",exec:function(I){return b.expandWithTab(I)},bindKey:"Tab"},m=function(I,E){y(E.session.$mode)},y=function(I){typeof I=="string"&&(I=x.$modes[I]),I&&(b.files||(b.files={}),L(I.$id,I.snippetFileId),I.modes&&I.modes.forEach(y))},L=function(I,E){!E||!I||b.files[I]||(b.files[I]={},x.loadModule(E,function(z){z&&(b.files[I]=z,!z.snippets&&z.snippetText&&(z.snippets=b.parseSnippetFile(z.snippetText)),b.register(z.snippets||[],z.scope),z.includeScopes&&(b.snippetMap[z.scope].includeScopes=z.includeScopes,z.includeScopes.forEach(function(F){y("ace/mode/"+F)})))}))},T=function(I){var E=I.editor,z=E.completer&&E.completer.activated;if(I.command.name==="backspace")z&&!p.getCompletionPrefix(E)&&E.completer.detach();else if(I.command.name==="insertstring"&&!z){k=I;var F=I.editor.$liveAutocompletionDelay;F?w.delay(F):R(I)}},k,w=f.delayedCall(function(){R(k)},0),R=function(I){var E=I.editor,z=p.getCompletionPrefix(E),F=I.args,O=p.triggerAutocomplete(E,F);if(z&&z.length>=E.$liveAutocompletionThreshold||O){var _=v.for(E);_.autoShown=!0,_.showPopup(E)}},D=e("../editor").Editor;e("../config").defineOptions(D.prototype,"editor",{enableBasicAutocompletion:{set:function(I){I?(v.for(this),this.completers||(this.completers=Array.isArray(I)?I:i),this.commands.addCommand(v.startCommand)):this.commands.removeCommand(v.startCommand)},value:!1},enableLiveAutocompletion:{set:function(I){I?(this.completers||(this.completers=Array.isArray(I)?I:i),this.commands.on("afterExec",T)):this.commands.off("afterExec",T)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(I){I?(this.commands.addCommand(h),this.on("changeMode",m),m(null,this)):(this.commands.removeCommand(h),this.off("changeMode",m))},value:!1}}),u.MarkerGroup=s}),(function(){ace.require(["ace/ext/language_tools"],function(e){l&&(l.exports=e)})})()})(mc)),mc.exports}Ex();var vc={exports:{}},Yd;function Rx(){return Yd||(Yd=1,(function(l,c){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,u,$){$.exports=`
1224
-
1225
- /* ------------------------------------------------------------------------------------------
1226
- * Editor Search Form
1227
- * --------------------------------------------------------------------------------------- */
1228
- .ace_search {
1229
- background-color: #ddd;
1230
- color: #666;
1231
- border: 1px solid #cbcbcb;
1232
- border-top: 0 none;
1233
- overflow: hidden;
1234
- margin: 0;
1235
- padding: 4px 6px 0 4px;
1236
- position: absolute;
1237
- top: 0;
1238
- z-index: 99;
1239
- white-space: normal;
1240
- }
1241
- .ace_search.left {
1242
- border-left: 0 none;
1243
- border-radius: 0px 0px 5px 0px;
1244
- left: 0;
1245
- }
1246
- .ace_search.right {
1247
- border-radius: 0px 0px 0px 5px;
1248
- border-right: 0 none;
1249
- right: 0;
1250
- }
1251
-
1252
- .ace_search_form, .ace_replace_form {
1253
- margin: 0 20px 4px 0;
1254
- overflow: hidden;
1255
- line-height: 1.9;
1256
- }
1257
- .ace_replace_form {
1258
- margin-right: 0;
1259
- }
1260
- .ace_search_form.ace_nomatch {
1261
- outline: 1px solid red;
1262
- }
1263
-
1264
- .ace_search_field {
1265
- border-radius: 3px 0 0 3px;
1266
- background-color: white;
1267
- color: black;
1268
- border: 1px solid #cbcbcb;
1269
- border-right: 0 none;
1270
- outline: 0;
1271
- padding: 0;
1272
- font-size: inherit;
1273
- margin: 0;
1274
- line-height: inherit;
1275
- padding: 0 6px;
1276
- min-width: 17em;
1277
- vertical-align: top;
1278
- min-height: 1.8em;
1279
- box-sizing: content-box;
1280
- }
1281
- .ace_searchbtn {
1282
- border: 1px solid #cbcbcb;
1283
- line-height: inherit;
1284
- display: inline-block;
1285
- padding: 0 6px;
1286
- background: #fff;
1287
- border-right: 0 none;
1288
- border-left: 1px solid #dcdcdc;
1289
- cursor: pointer;
1290
- margin: 0;
1291
- position: relative;
1292
- color: #666;
1293
- }
1294
- .ace_searchbtn:last-child {
1295
- border-radius: 0 3px 3px 0;
1296
- border-right: 1px solid #cbcbcb;
1297
- }
1298
- .ace_searchbtn:disabled {
1299
- background: none;
1300
- cursor: default;
1301
- }
1302
- .ace_searchbtn:hover {
1303
- background-color: #eef1f6;
1304
- }
1305
- .ace_searchbtn.prev, .ace_searchbtn.next {
1306
- padding: 0px 0.7em
1307
- }
1308
- .ace_searchbtn.prev:after, .ace_searchbtn.next:after {
1309
- content: "";
1310
- border: solid 2px #888;
1311
- width: 0.5em;
1312
- height: 0.5em;
1313
- border-width: 2px 0 0 2px;
1314
- display:inline-block;
1315
- transform: rotate(-45deg);
1316
- }
1317
- .ace_searchbtn.next:after {
1318
- border-width: 0 2px 2px 0 ;
1319
- }
1320
- .ace_searchbtn_close {
1321
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
1322
- border-radius: 50%;
1323
- border: 0 none;
1324
- color: #656565;
1325
- cursor: pointer;
1326
- font: 16px/16px Arial;
1327
- padding: 0;
1328
- height: 14px;
1329
- width: 14px;
1330
- top: 9px;
1331
- right: 7px;
1332
- position: absolute;
1333
- }
1334
- .ace_searchbtn_close:hover {
1335
- background-color: #656565;
1336
- background-position: 50% 100%;
1337
- color: white;
1338
- }
1339
-
1340
- .ace_button {
1341
- margin-left: 2px;
1342
- cursor: pointer;
1343
- -webkit-user-select: none;
1344
- -moz-user-select: none;
1345
- -o-user-select: none;
1346
- -ms-user-select: none;
1347
- user-select: none;
1348
- overflow: hidden;
1349
- opacity: 0.7;
1350
- border: 1px solid rgba(100,100,100,0.23);
1351
- padding: 1px;
1352
- box-sizing: border-box!important;
1353
- color: black;
1354
- }
1355
-
1356
- .ace_button:hover {
1357
- background-color: #eee;
1358
- opacity:1;
1359
- }
1360
- .ace_button:active {
1361
- background-color: #ddd;
1362
- }
1363
-
1364
- .ace_button.checked {
1365
- border-color: #3399ff;
1366
- opacity:1;
1367
- }
1368
-
1369
- .ace_search_options{
1370
- margin-bottom: 3px;
1371
- text-align: right;
1372
- -webkit-user-select: none;
1373
- -moz-user-select: none;
1374
- -o-user-select: none;
1375
- -ms-user-select: none;
1376
- user-select: none;
1377
- clear: both;
1378
- }
1379
-
1380
- .ace_search_counter {
1381
- float: left;
1382
- font-family: arial;
1383
- padding: 0 8px;
1384
- }`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,u,$){var b=e("../lib/dom"),v=e("../lib/lang"),x=e("../lib/event"),f=e("./searchbox-css"),p=e("../keyboard/hash_handler").HashHandler,s=e("../lib/keys"),o=e("../config").nls,a=999;b.importCssString(f,"ace_searchbox",!1);var r=(function(){function h(m,y,L){this.activeInput,this.element=b.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:o("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"​"],["span",{action:"findNext",class:"ace_searchbtn next"},"​"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},o("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:o("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},o("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},o("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:o("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:o("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:o("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:o("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:o("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(m),b.importCssString(f,"ace_searchbox",m.container),x.addListener(this.element,"touchstart",function(T){T.stopPropagation()},m)}return h.prototype.setEditor=function(m){m.searchBox=this,m.renderer.scroller.appendChild(this.element),this.editor=m},h.prototype.setSession=function(m){this.searchRange=null,this.$syncOptions(!0)},h.prototype.onEditorInput=function(){this.find(!1,!1,!0)},h.prototype.$initElements=function(m){this.searchBox=m.querySelector(".ace_search_form"),this.replaceBox=m.querySelector(".ace_replace_form"),this.searchOption=m.querySelector("[action=searchInSelection]"),this.replaceOption=m.querySelector("[action=toggleReplace]"),this.regExpOption=m.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=m.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=m.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=m.querySelector(".ace_search_counter")},h.prototype.$init=function(){var m=this.element;this.$initElements(m);var y=this;x.addListener(m,"mousedown",function(L){setTimeout(function(){y.activeInput.focus()},0),x.stopPropagation(L)}),x.addListener(m,"click",function(L){var T=L.target||L.srcElement,k=T.getAttribute("action");k&&y[k]?y[k]():y.$searchBarKb.commands[k]&&y.$searchBarKb.commands[k].exec(y),x.stopPropagation(L)}),x.addCommandKeyListener(m,function(L,T,k){var w=s.keyCodeToString(k),R=y.$searchBarKb.findKeyCommand(T,w);R&&R.exec&&(R.exec(y),x.stopEvent(L))}),this.$onChange=v.delayedCall(function(){y.find(!1,!1)}),x.addListener(this.searchInput,"input",function(){y.$onChange.schedule(20)}),x.addListener(this.searchInput,"focus",function(){y.activeInput=y.searchInput,y.searchInput.value&&y.highlight()}),x.addListener(this.replaceInput,"focus",function(){y.activeInput=y.replaceInput,y.searchInput.value&&y.highlight()})},h.prototype.setSearchRange=function(m){this.searchRange=m,m?this.searchRangeMarker=this.editor.session.addMarker(m,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},h.prototype.$syncOptions=function(m){b.setCssClass(this.replaceOption,"checked",this.searchRange),b.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",b.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),b.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),b.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var y=this.editor.getReadOnly();this.replaceOption.style.display=y?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!y?"":"none",this.find(!1,!1,m)},h.prototype.highlight=function(m){this.editor.session.highlight(m||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},h.prototype.find=function(m,y,L){if(this.editor.session){var T=this.editor.find(this.searchInput.value,{skipCurrent:m,backwards:y,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:L,range:this.searchRange}),k=!T&&this.searchInput.value;b.setCssClass(this.searchBox,"ace_nomatch",k),this.editor._emit("findSearchBox",{match:!k}),this.highlight(),this.updateCounter()}},h.prototype.updateCounter=function(){var m=this.editor,y=m.$search.$options.re,L=y.unicode,T=0,k=0;if(y){var w=this.searchRange?m.session.getTextRange(this.searchRange):m.getValue();m.$search.$isMultilineSearch(m.getLastSearchOptions())&&(w=w.replace(/\r\n|\r|\n/g,`
1385
- `),m.session.doc.$autoNewLine=`
1386
- `);var R=m.session.doc.positionToIndex(m.selection.anchor);this.searchRange&&(R-=m.session.doc.positionToIndex(this.searchRange.start));for(var D=y.lastIndex=0,I;(I=y.exec(w))&&(T++,D=I.index,D<=R&&k++,!(T>a||!I[0]&&(y.lastIndex=D+=v.skipEmptyMatch(w,D,L),D>=w.length))););}this.searchCounter.textContent=o("search-box.search-counter","$0 of $1",[k,T>a?a+"+":T])},h.prototype.findNext=function(){this.find(!0,!1)},h.prototype.findPrev=function(){this.find(!0,!0)},h.prototype.findAll=function(){var m=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),y=!m&&this.searchInput.value;b.setCssClass(this.searchBox,"ace_nomatch",y),this.editor._emit("findSearchBox",{match:!y}),this.highlight(),this.hide()},h.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},h.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},h.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},h.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},h.prototype.show=function(m,y){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=y,this.editor.$search.$options.regExp&&(m=v.escapeRegExp(m)),m!=null&&(this.searchInput.value=m),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},h.prototype.isFocused=function(){var m=document.activeElement;return m==this.searchInput||m==this.replaceInput},h})(),n=new p;n.bindKeys({"Ctrl-f|Command-f":function(h){var m=h.isReplace=!h.isReplace;h.replaceBox.style.display=m?"":"none",h.replaceOption.checked=!1,h.$syncOptions(),h.searchInput.focus()},"Ctrl-H|Command-Option-F":function(h){h.editor.getReadOnly()||(h.replaceOption.checked=!0,h.$syncOptions(),h.replaceInput.focus())},"Ctrl-G|Command-G":function(h){h.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(h){h.findPrev()},esc:function(h){setTimeout(function(){h.hide()})},Return:function(h){h.activeInput==h.replaceInput&&h.replace(),h.findNext()},"Shift-Return":function(h){h.activeInput==h.replaceInput&&h.replace(),h.findPrev()},"Alt-Return":function(h){h.activeInput==h.replaceInput&&h.replaceAll(),h.findAll()},Tab:function(h){(h.activeInput==h.replaceInput?h.searchInput:h.replaceInput).focus()}}),n.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(h){h.regExpOption.checked=!h.regExpOption.checked,h.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(h){h.caseSensitiveOption.checked=!h.caseSensitiveOption.checked,h.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(h){h.wholeWordOption.checked=!h.wholeWordOption.checked,h.$syncOptions()}},{name:"toggleReplace",exec:function(h){h.replaceOption.checked=!h.replaceOption.checked,h.$syncOptions()}},{name:"searchInSelection",exec:function(h){h.searchOption.checked=!h.searchRange,h.setSearchRange(h.searchOption.checked&&h.editor.getSelectionRange()),h.$syncOptions()}}]);var i=new p([{bindKey:"Esc",name:"closeSearchBar",exec:function(h){h.searchBox.hide()}}]);r.prototype.$searchBarKb=n,r.prototype.$closeSearchBarKb=i,u.SearchBox=r,u.Search=function(h,m){var y=h.searchBox||new r(h),L=h.session.selection.getRange(),T=L.isMultiLine()?"":h.session.getTextRange(L);y.show(T,m)}}),(function(){ace.require(["ace/ext/searchbox"],function(e){l&&(l.exports=e)})})()})(vc)),vc.exports}Rx();function Kp(l,c){return function(){return l.apply(c,arguments)}}const{toString:Ix}=Object.prototype,{getPrototypeOf:Mu}=Object,{iterator:tl,toStringTag:Gp}=Symbol,nl=(l=>c=>{const e=Ix.call(c);return l[e]||(l[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),gr=l=>(l=l.toLowerCase(),c=>nl(c)===l),il=l=>c=>typeof c===l,{isArray:vs}=Array,ds=il("undefined");function Js(l){return l!==null&&!ds(l)&&l.constructor!==null&&!ds(l.constructor)&&bi(l.constructor.isBuffer)&&l.constructor.isBuffer(l)}const qp=gr("ArrayBuffer");function Ox(l){let c;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?c=ArrayBuffer.isView(l):c=l&&l.buffer&&qp(l.buffer),c}const Nx=il("string"),bi=il("function"),Yp=il("number"),Xs=l=>l!==null&&typeof l=="object",Dx=l=>l===!0||l===!1,Ka=l=>{if(nl(l)!=="object")return!1;const c=Mu(l);return(c===null||c===Object.prototype||Object.getPrototypeOf(c)===null)&&!(Gp in l)&&!(tl in l)},Fx=l=>{if(!Xs(l)||Js(l))return!1;try{return Object.keys(l).length===0&&Object.getPrototypeOf(l)===Object.prototype}catch{return!1}},Px=gr("Date"),Bx=gr("File"),Wx=l=>!!(l&&typeof l.uri<"u"),Hx=l=>l&&typeof l.getParts<"u",zx=gr("Blob"),Ux=gr("FileList"),Vx=l=>Xs(l)&&bi(l.pipe);function jx(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Qd=jx(),Zd=typeof Qd.FormData<"u"?Qd.FormData:void 0,Kx=l=>{let c;return l&&(Zd&&l instanceof Zd||bi(l.append)&&((c=nl(l))==="formdata"||c==="object"&&bi(l.toString)&&l.toString()==="[object FormData]"))},Gx=gr("URLSearchParams"),[qx,Yx,Qx,Zx]=["ReadableStream","Request","Response","Headers"].map(gr),Jx=l=>l.trim?l.trim():l.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ea(l,c,{allOwnKeys:e=!1}={}){if(l===null||typeof l>"u")return;let u,$;if(typeof l!="object"&&(l=[l]),vs(l))for(u=0,$=l.length;u<$;u++)c.call(null,l[u],u,l);else{if(Js(l))return;const b=e?Object.getOwnPropertyNames(l):Object.keys(l),v=b.length;let x;for(u=0;u<v;u++)x=b[u],c.call(null,l[x],x,l)}}function Qp(l,c){if(Js(l))return null;c=c.toLowerCase();const e=Object.keys(l);let u=e.length,$;for(;u-- >0;)if($=e[u],c===$.toLowerCase())return $;return null}const Wo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zp=l=>!ds(l)&&l!==Wo;function hu(){const{caseless:l,skipUndefined:c}=Zp(this)&&this||{},e={},u=($,b)=>{if(b==="__proto__"||b==="constructor"||b==="prototype")return;const v=l&&Qp(e,b)||b;Ka(e[v])&&Ka($)?e[v]=hu(e[v],$):Ka($)?e[v]=hu({},$):vs($)?e[v]=$.slice():(!c||!ds($))&&(e[v]=$)};for(let $=0,b=arguments.length;$<b;$++)arguments[$]&&ea(arguments[$],u);return e}const Xx=(l,c,e,{allOwnKeys:u}={})=>(ea(c,($,b)=>{e&&bi($)?Object.defineProperty(l,b,{value:Kp($,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(l,b,{value:$,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:u}),l),e1=l=>(l.charCodeAt(0)===65279&&(l=l.slice(1)),l),t1=(l,c,e,u)=>{l.prototype=Object.create(c.prototype,u),Object.defineProperty(l.prototype,"constructor",{value:l,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(l,"super",{value:c.prototype}),e&&Object.assign(l.prototype,e)},n1=(l,c,e,u)=>{let $,b,v;const x={};if(c=c||{},l==null)return c;do{for($=Object.getOwnPropertyNames(l),b=$.length;b-- >0;)v=$[b],(!u||u(v,l,c))&&!x[v]&&(c[v]=l[v],x[v]=!0);l=e!==!1&&Mu(l)}while(l&&(!e||e(l,c))&&l!==Object.prototype);return c},i1=(l,c,e)=>{l=String(l),(e===void 0||e>l.length)&&(e=l.length),e-=c.length;const u=l.indexOf(c,e);return u!==-1&&u===e},r1=l=>{if(!l)return null;if(vs(l))return l;let c=l.length;if(!Yp(c))return null;const e=new Array(c);for(;c-- >0;)e[c]=l[c];return e},o1=(l=>c=>l&&c instanceof l)(typeof Uint8Array<"u"&&Mu(Uint8Array)),s1=(l,c)=>{const e=(l&&l[tl]).call(l);let u;for(;(u=e.next())&&!u.done;){const $=u.value;c.call(l,$[0],$[1])}},a1=(l,c)=>{let e;const u=[];for(;(e=l.exec(c))!==null;)u.push(e);return u},l1=gr("HTMLFormElement"),c1=l=>l.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(c,e,u){return e.toUpperCase()+u}),Jd=(({hasOwnProperty:l})=>(c,e)=>l.call(c,e))(Object.prototype),u1=gr("RegExp"),Jp=(l,c)=>{const e=Object.getOwnPropertyDescriptors(l),u={};ea(e,($,b)=>{let v;(v=c($,b,l))!==!1&&(u[b]=v||$)}),Object.defineProperties(l,u)},h1=l=>{Jp(l,(c,e)=>{if(bi(l)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const u=l[e];if(bi(u)){if(c.enumerable=!1,"writable"in c){c.writable=!1;return}c.set||(c.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},d1=(l,c)=>{const e={},u=$=>{$.forEach(b=>{e[b]=!0})};return vs(l)?u(l):u(String(l).split(c)),e},f1=()=>{},p1=(l,c)=>l!=null&&Number.isFinite(l=+l)?l:c;function g1(l){return!!(l&&bi(l.append)&&l[Gp]==="FormData"&&l[tl])}const m1=l=>{const c=new Array(10),e=(u,$)=>{if(Xs(u)){if(c.indexOf(u)>=0)return;if(Js(u))return u;if(!("toJSON"in u)){c[$]=u;const b=vs(u)?[]:{};return ea(u,(v,x)=>{const f=e(v,$+1);!ds(f)&&(b[x]=f)}),c[$]=void 0,b}}return u};return e(l,0)},v1=gr("AsyncFunction"),y1=l=>l&&(Xs(l)||bi(l))&&bi(l.then)&&bi(l.catch),Xp=((l,c)=>l?setImmediate:c?((e,u)=>(Wo.addEventListener("message",({source:$,data:b})=>{$===Wo&&b===e&&u.length&&u.shift()()},!1),$=>{u.push($),Wo.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",bi(Wo.postMessage)),w1=typeof queueMicrotask<"u"?queueMicrotask.bind(Wo):typeof process<"u"&&process.nextTick||Xp,b1=l=>l!=null&&bi(l[tl]),Ce={isArray:vs,isArrayBuffer:qp,isBuffer:Js,isFormData:Kx,isArrayBufferView:Ox,isString:Nx,isNumber:Yp,isBoolean:Dx,isObject:Xs,isPlainObject:Ka,isEmptyObject:Fx,isReadableStream:qx,isRequest:Yx,isResponse:Qx,isHeaders:Zx,isUndefined:ds,isDate:Px,isFile:Bx,isReactNativeBlob:Wx,isReactNative:Hx,isBlob:zx,isRegExp:u1,isFunction:bi,isStream:Vx,isURLSearchParams:Gx,isTypedArray:o1,isFileList:Ux,forEach:ea,merge:hu,extend:Xx,trim:Jx,stripBOM:e1,inherits:t1,toFlatObject:n1,kindOf:nl,kindOfTest:gr,endsWith:i1,toArray:r1,forEachEntry:s1,matchAll:a1,isHTMLForm:l1,hasOwnProperty:Jd,hasOwnProp:Jd,reduceDescriptors:Jp,freezeMethods:h1,toObjectSet:d1,toCamelCase:c1,noop:f1,toFiniteNumber:p1,findKey:Qp,global:Wo,isContextDefined:Zp,isSpecCompliantForm:g1,toJSONObject:m1,isAsyncFn:v1,isThenable:y1,setImmediate:Xp,asap:w1,isIterable:b1};let ht=class eg extends Error{static from(c,e,u,$,b,v){const x=new eg(c.message,e||c.code,u,$,b);return x.cause=c,x.name=c.name,c.status!=null&&x.status==null&&(x.status=c.status),v&&Object.assign(x,v),x}constructor(c,e,u,$,b){super(c),Object.defineProperty(this,"message",{value:c,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),u&&(this.config=u),$&&(this.request=$),b&&(this.response=b,this.status=b.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ce.toJSONObject(this.config),code:this.code,status:this.status}}};ht.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ht.ERR_BAD_OPTION="ERR_BAD_OPTION";ht.ECONNABORTED="ECONNABORTED";ht.ETIMEDOUT="ETIMEDOUT";ht.ERR_NETWORK="ERR_NETWORK";ht.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ht.ERR_DEPRECATED="ERR_DEPRECATED";ht.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ht.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ht.ERR_CANCELED="ERR_CANCELED";ht.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ht.ERR_INVALID_URL="ERR_INVALID_URL";const x1=null;function du(l){return Ce.isPlainObject(l)||Ce.isArray(l)}function tg(l){return Ce.endsWith(l,"[]")?l.slice(0,-2):l}function yc(l,c,e){return l?l.concat(c).map(function(u,$){return u=tg(u),!e&&$?"["+u+"]":u}).join(e?".":""):c}function S1(l){return Ce.isArray(l)&&!l.some(du)}const C1=Ce.toFlatObject(Ce,{},null,function(l){return/^is[A-Z]/.test(l)});function rl(l,c,e){if(!Ce.isObject(l))throw new TypeError("target must be an object");c=c||new FormData,e=Ce.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(r,n){return!Ce.isUndefined(n[r])});const u=e.metaTokens,$=e.visitor||p,b=e.dots,v=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&Ce.isSpecCompliantForm(c);if(!Ce.isFunction($))throw new TypeError("visitor must be a function");function f(r){if(r===null)return"";if(Ce.isDate(r))return r.toISOString();if(Ce.isBoolean(r))return r.toString();if(!x&&Ce.isBlob(r))throw new ht("Blob is not supported. Use a Buffer instead.");return Ce.isArrayBuffer(r)||Ce.isTypedArray(r)?x&&typeof Blob=="function"?new Blob([r]):Buffer.from(r):r}function p(r,n,i){let h=r;if(Ce.isReactNative(c)&&Ce.isReactNativeBlob(r))return c.append(yc(i,n,b),f(r)),!1;if(r&&!i&&typeof r=="object"){if(Ce.endsWith(n,"{}"))n=u?n:n.slice(0,-2),r=JSON.stringify(r);else if(Ce.isArray(r)&&S1(r)||(Ce.isFileList(r)||Ce.endsWith(n,"[]"))&&(h=Ce.toArray(r)))return n=tg(n),h.forEach(function(m,y){!(Ce.isUndefined(m)||m===null)&&c.append(v===!0?yc([n],y,b):v===null?n:n+"[]",f(m))}),!1}return du(r)?!0:(c.append(yc(i,n,b),f(r)),!1)}const s=[],o=Object.assign(C1,{defaultVisitor:p,convertValue:f,isVisitable:du});function a(r,n){if(!Ce.isUndefined(r)){if(s.indexOf(r)!==-1)throw Error("Circular reference detected in "+n.join("."));s.push(r),Ce.forEach(r,function(i,h){(!(Ce.isUndefined(i)||i===null)&&$.call(c,i,Ce.isString(h)?h.trim():h,n,o))===!0&&a(i,n?n.concat(h):[h])}),s.pop()}}if(!Ce.isObject(l))throw new TypeError("data must be an object");return a(l),c}function Xd(l){const c={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(l).replace(/[!'()~]|%20|%00/g,function(e){return c[e]})}function Tu(l,c){this._pairs=[],l&&rl(l,this,c)}const ng=Tu.prototype;ng.append=function(l,c){this._pairs.push([l,c])};ng.toString=function(l){const c=l?function(e){return l.call(this,e,Xd)}:Xd;return this._pairs.map(function(e){return c(e[0])+"="+c(e[1])},"").join("&")};function k1(l){return encodeURIComponent(l).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ig(l,c,e){if(!c)return l;const u=e&&e.encode||k1,$=Ce.isFunction(e)?{serialize:e}:e,b=$&&$.serialize;let v;if(b?v=b(c,$):v=Ce.isURLSearchParams(c)?c.toString():new Tu(c,$).toString(u),v){const x=l.indexOf("#");x!==-1&&(l=l.slice(0,x)),l+=(l.indexOf("?")===-1?"?":"&")+v}return l}class ef{constructor(){this.handlers=[]}use(c,e,u){return this.handlers.push({fulfilled:c,rejected:e,synchronous:u?u.synchronous:!1,runWhen:u?u.runWhen:null}),this.handlers.length-1}eject(c){this.handlers[c]&&(this.handlers[c]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(c){Ce.forEach(this.handlers,function(e){e!==null&&c(e)})}}const Lu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},_1=typeof URLSearchParams<"u"?URLSearchParams:Tu,A1=typeof FormData<"u"?FormData:null,$1=typeof Blob<"u"?Blob:null,M1={isBrowser:!0,classes:{URLSearchParams:_1,FormData:A1,Blob:$1},protocols:["http","https","file","blob","url","data"]},Eu=typeof window<"u"&&typeof document<"u",fu=typeof navigator=="object"&&navigator||void 0,T1=Eu&&(!fu||["ReactNative","NativeScript","NS"].indexOf(fu.product)<0),L1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",E1=Eu&&window.location.href||"http://localhost",R1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Eu,hasStandardBrowserEnv:T1,hasStandardBrowserWebWorkerEnv:L1,navigator:fu,origin:E1},Symbol.toStringTag,{value:"Module"})),ni={...R1,...M1};function I1(l,c){return rl(l,new ni.classes.URLSearchParams,{visitor:function(e,u,$,b){return ni.isNode&&Ce.isBuffer(e)?(this.append(u,e.toString("base64")),!1):b.defaultVisitor.apply(this,arguments)},...c})}function O1(l){return Ce.matchAll(/\w+|\[(\w*)]/g,l).map(c=>c[0]==="[]"?"":c[1]||c[0])}function N1(l){const c={},e=Object.keys(l);let u;const $=e.length;let b;for(u=0;u<$;u++)b=e[u],c[b]=l[b];return c}function rg(l){function c(e,u,$,b){let v=e[b++];if(v==="__proto__")return!0;const x=Number.isFinite(+v),f=b>=e.length;return v=!v&&Ce.isArray($)?$.length:v,f?(Ce.hasOwnProp($,v)?$[v]=[$[v],u]:$[v]=u,!x):((!$[v]||!Ce.isObject($[v]))&&($[v]=[]),c(e,u,$[v],b)&&Ce.isArray($[v])&&($[v]=N1($[v])),!x)}if(Ce.isFormData(l)&&Ce.isFunction(l.entries)){const e={};return Ce.forEachEntry(l,(u,$)=>{c(O1(u),$,e,0)}),e}return null}function D1(l,c,e){if(Ce.isString(l))try{return(c||JSON.parse)(l),Ce.trim(l)}catch(u){if(u.name!=="SyntaxError")throw u}return(e||JSON.stringify)(l)}const ta={transitional:Lu,adapter:["xhr","http","fetch"],transformRequest:[function(l,c){const e=c.getContentType()||"",u=e.indexOf("application/json")>-1,$=Ce.isObject(l);if($&&Ce.isHTMLForm(l)&&(l=new FormData(l)),Ce.isFormData(l))return u?JSON.stringify(rg(l)):l;if(Ce.isArrayBuffer(l)||Ce.isBuffer(l)||Ce.isStream(l)||Ce.isFile(l)||Ce.isBlob(l)||Ce.isReadableStream(l))return l;if(Ce.isArrayBufferView(l))return l.buffer;if(Ce.isURLSearchParams(l))return c.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),l.toString();let b;if($){if(e.indexOf("application/x-www-form-urlencoded")>-1)return I1(l,this.formSerializer).toString();if((b=Ce.isFileList(l))||e.indexOf("multipart/form-data")>-1){const v=this.env&&this.env.FormData;return rl(b?{"files[]":l}:l,v&&new v,this.formSerializer)}}return $||u?(c.setContentType("application/json",!1),D1(l)):l}],transformResponse:[function(l){const c=this.transitional||ta.transitional,e=c&&c.forcedJSONParsing,u=this.responseType==="json";if(Ce.isResponse(l)||Ce.isReadableStream(l))return l;if(l&&Ce.isString(l)&&(e&&!this.responseType||u)){const $=!(c&&c.silentJSONParsing)&&u;try{return JSON.parse(l,this.parseReviver)}catch(b){if($)throw b.name==="SyntaxError"?ht.from(b,ht.ERR_BAD_RESPONSE,this,null,this.response):b}}return l}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ni.classes.FormData,Blob:ni.classes.Blob},validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ce.forEach(["delete","get","head","post","put","patch"],l=>{ta.headers[l]={}});const F1=Ce.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),P1=l=>{const c={};let e,u,$;return l&&l.split(`
1387
- `).forEach(function(b){$=b.indexOf(":"),e=b.substring(0,$).trim().toLowerCase(),u=b.substring($+1).trim(),!(!e||c[e]&&F1[e])&&(e==="set-cookie"?c[e]?c[e].push(u):c[e]=[u]:c[e]=c[e]?c[e]+", "+u:u)}),c},tf=Symbol("internals");function Ws(l){return l&&String(l).trim().toLowerCase()}function Ga(l){return l===!1||l==null?l:Ce.isArray(l)?l.map(Ga):String(l)}function B1(l){const c=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let u;for(;u=e.exec(l);)c[u[1]]=u[2];return c}const W1=l=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(l.trim());function wc(l,c,e,u,$){if(Ce.isFunction(u))return u.call(this,c,e);if($&&(c=e),!!Ce.isString(c)){if(Ce.isString(u))return c.indexOf(u)!==-1;if(Ce.isRegExp(u))return u.test(c)}}function H1(l){return l.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(c,e,u)=>e.toUpperCase()+u)}function z1(l,c){const e=Ce.toCamelCase(" "+c);["get","set","has"].forEach(u=>{Object.defineProperty(l,u+e,{value:function($,b,v){return this[u].call(this,c,$,b,v)},configurable:!0})})}let xi=class{constructor(l){l&&this.set(l)}set(l,c,e){const u=this;function $(v,x,f){const p=Ws(x);if(!p)throw new Error("header name must be a non-empty string");const s=Ce.findKey(u,p);(!s||u[s]===void 0||f===!0||f===void 0&&u[s]!==!1)&&(u[s||x]=Ga(v))}const b=(v,x)=>Ce.forEach(v,(f,p)=>$(f,p,x));if(Ce.isPlainObject(l)||l instanceof this.constructor)b(l,c);else if(Ce.isString(l)&&(l=l.trim())&&!W1(l))b(P1(l),c);else if(Ce.isObject(l)&&Ce.isIterable(l)){let v={},x,f;for(const p of l){if(!Ce.isArray(p))throw TypeError("Object iterator must return a key-value pair");v[f=p[0]]=(x=v[f])?Ce.isArray(x)?[...x,p[1]]:[x,p[1]]:p[1]}b(v,c)}else l!=null&&$(c,l,e);return this}get(l,c){if(l=Ws(l),l){const e=Ce.findKey(this,l);if(e){const u=this[e];if(!c)return u;if(c===!0)return B1(u);if(Ce.isFunction(c))return c.call(this,u,e);if(Ce.isRegExp(c))return c.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(l,c){if(l=Ws(l),l){const e=Ce.findKey(this,l);return!!(e&&this[e]!==void 0&&(!c||wc(this,this[e],e,c)))}return!1}delete(l,c){const e=this;let u=!1;function $(b){if(b=Ws(b),b){const v=Ce.findKey(e,b);v&&(!c||wc(e,e[v],v,c))&&(delete e[v],u=!0)}}return Ce.isArray(l)?l.forEach($):$(l),u}clear(l){const c=Object.keys(this);let e=c.length,u=!1;for(;e--;){const $=c[e];(!l||wc(this,this[$],$,l,!0))&&(delete this[$],u=!0)}return u}normalize(l){const c=this,e={};return Ce.forEach(this,(u,$)=>{const b=Ce.findKey(e,$);if(b){c[b]=Ga(u),delete c[$];return}const v=l?H1($):String($).trim();v!==$&&delete c[$],c[v]=Ga(u),e[v]=!0}),this}concat(...l){return this.constructor.concat(this,...l)}toJSON(l){const c=Object.create(null);return Ce.forEach(this,(e,u)=>{e!=null&&e!==!1&&(c[u]=l&&Ce.isArray(e)?e.join(", "):e)}),c}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([l,c])=>l+": "+c).join(`
1388
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(l){return l instanceof this?l:new this(l)}static concat(l,...c){const e=new this(l);return c.forEach(u=>e.set(u)),e}static accessor(l){const c=(this[tf]=this[tf]={accessors:{}}).accessors,e=this.prototype;function u($){const b=Ws($);c[b]||(z1(e,$),c[b]=!0)}return Ce.isArray(l)?l.forEach(u):u(l),this}};xi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ce.reduceDescriptors(xi.prototype,({value:l},c)=>{let e=c[0].toUpperCase()+c.slice(1);return{get:()=>l,set(u){this[e]=u}}});Ce.freezeMethods(xi);function bc(l,c){const e=this||ta,u=c||e,$=xi.from(u.headers);let b=u.data;return Ce.forEach(l,function(v){b=v.call(e,b,$.normalize(),c?c.status:void 0)}),$.normalize(),b}function og(l){return!!(l&&l.__CANCEL__)}let na=class extends ht{constructor(l,c,e){super(l??"canceled",ht.ERR_CANCELED,c,e),this.name="CanceledError",this.__CANCEL__=!0}};function sg(l,c,e){const u=e.config.validateStatus;!e.status||!u||u(e.status)?l(e):c(new ht("Request failed with status code "+e.status,[ht.ERR_BAD_REQUEST,ht.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function U1(l){const c=/^([-+\w]{1,25})(:?\/\/|:)/.exec(l);return c&&c[1]||""}function V1(l,c){l=l||10;const e=new Array(l),u=new Array(l);let $=0,b=0,v;return c=c!==void 0?c:1e3,function(x){const f=Date.now(),p=u[b];v||(v=f),e[$]=x,u[$]=f;let s=b,o=0;for(;s!==$;)o+=e[s++],s=s%l;if($=($+1)%l,$===b&&(b=(b+1)%l),f-v<c)return;const a=p&&f-p;return a?Math.round(o*1e3/a):void 0}}function j1(l,c){let e=0,u=1e3/c,$,b;const v=(x,f=Date.now())=>{e=f,$=null,b&&(clearTimeout(b),b=null),l(...x)};return[(...x)=>{const f=Date.now(),p=f-e;p>=u?v(x,f):($=x,b||(b=setTimeout(()=>{b=null,v($)},u-p)))},()=>$&&v($)]}const Qa=(l,c,e=3)=>{let u=0;const $=V1(50,250);return j1(b=>{const v=b.loaded,x=b.lengthComputable?b.total:void 0,f=v-u,p=$(f),s=v<=x;u=v;const o={loaded:v,total:x,progress:x?v/x:void 0,bytes:f,rate:p||void 0,estimated:p&&x&&s?(x-v)/p:void 0,event:b,lengthComputable:x!=null,[c?"download":"upload"]:!0};l(o)},e)},nf=(l,c)=>{const e=l!=null;return[u=>c[0]({lengthComputable:e,total:l,loaded:u}),c[1]]},rf=l=>(...c)=>Ce.asap(()=>l(...c)),K1=ni.hasStandardBrowserEnv?((l,c)=>e=>(e=new URL(e,ni.origin),l.protocol===e.protocol&&l.host===e.host&&(c||l.port===e.port)))(new URL(ni.origin),ni.navigator&&/(msie|trident)/i.test(ni.navigator.userAgent)):()=>!0,G1=ni.hasStandardBrowserEnv?{write(l,c,e,u,$,b,v){if(typeof document>"u")return;const x=[`${l}=${encodeURIComponent(c)}`];Ce.isNumber(e)&&x.push(`expires=${new Date(e).toUTCString()}`),Ce.isString(u)&&x.push(`path=${u}`),Ce.isString($)&&x.push(`domain=${$}`),b===!0&&x.push("secure"),Ce.isString(v)&&x.push(`SameSite=${v}`),document.cookie=x.join("; ")},read(l){if(typeof document>"u")return null;const c=document.cookie.match(new RegExp("(?:^|; )"+l+"=([^;]*)"));return c?decodeURIComponent(c[1]):null},remove(l){this.write(l,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function q1(l){return typeof l!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(l)}function Y1(l,c){return c?l.replace(/\/?\/$/,"")+"/"+c.replace(/^\/+/,""):l}function ag(l,c,e){let u=!q1(c);return l&&(u||e==!1)?Y1(l,c):c}const of=l=>l instanceof xi?{...l}:l;function Uo(l,c){c=c||{};const e={};function u(p,s,o,a){return Ce.isPlainObject(p)&&Ce.isPlainObject(s)?Ce.merge.call({caseless:a},p,s):Ce.isPlainObject(s)?Ce.merge({},s):Ce.isArray(s)?s.slice():s}function $(p,s,o,a){if(Ce.isUndefined(s)){if(!Ce.isUndefined(p))return u(void 0,p,o,a)}else return u(p,s,o,a)}function b(p,s){if(!Ce.isUndefined(s))return u(void 0,s)}function v(p,s){if(Ce.isUndefined(s)){if(!Ce.isUndefined(p))return u(void 0,p)}else return u(void 0,s)}function x(p,s,o){if(o in c)return u(p,s);if(o in l)return u(void 0,p)}const f={url:b,method:b,data:b,baseURL:v,transformRequest:v,transformResponse:v,paramsSerializer:v,timeout:v,timeoutMessage:v,withCredentials:v,withXSRFToken:v,adapter:v,responseType:v,xsrfCookieName:v,xsrfHeaderName:v,onUploadProgress:v,onDownloadProgress:v,decompress:v,maxContentLength:v,maxBodyLength:v,beforeRedirect:v,transport:v,httpAgent:v,httpsAgent:v,cancelToken:v,socketPath:v,responseEncoding:v,validateStatus:x,headers:(p,s,o)=>$(of(p),of(s),o,!0)};return Ce.forEach(Object.keys({...l,...c}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const s=Ce.hasOwnProp(f,p)?f[p]:$,o=s(l[p],c[p],p);Ce.isUndefined(o)&&s!==x||(e[p]=o)}),e}const lg=l=>{const c=Uo({},l);let{data:e,withXSRFToken:u,xsrfHeaderName:$,xsrfCookieName:b,headers:v,auth:x}=c;if(c.headers=v=xi.from(v),c.url=ig(ag(c.baseURL,c.url,c.allowAbsoluteUrls),l.params,l.paramsSerializer),x&&v.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):""))),Ce.isFormData(e)){if(ni.hasStandardBrowserEnv||ni.hasStandardBrowserWebWorkerEnv)v.setContentType(void 0);else if(Ce.isFunction(e.getHeaders)){const f=e.getHeaders(),p=["content-type","content-length"];Object.entries(f).forEach(([s,o])=>{p.includes(s.toLowerCase())&&v.set(s,o)})}}if(ni.hasStandardBrowserEnv&&(u&&Ce.isFunction(u)&&(u=u(c)),u||u!==!1&&K1(c.url))){const f=$&&b&&G1.read(b);f&&v.set($,f)}return c},Q1=typeof XMLHttpRequest<"u",Z1=Q1&&function(l){return new Promise(function(c,e){const u=lg(l);let $=u.data;const b=xi.from(u.headers).normalize();let{responseType:v,onUploadProgress:x,onDownloadProgress:f}=u,p,s,o,a,r;function n(){a&&a(),r&&r(),u.cancelToken&&u.cancelToken.unsubscribe(p),u.signal&&u.signal.removeEventListener("abort",p)}let i=new XMLHttpRequest;i.open(u.method.toUpperCase(),u.url,!0),i.timeout=u.timeout;function h(){if(!i)return;const y=xi.from("getAllResponseHeaders"in i&&i.getAllResponseHeaders()),L={data:!v||v==="text"||v==="json"?i.responseText:i.response,status:i.status,statusText:i.statusText,headers:y,config:l,request:i};sg(function(T){c(T),n()},function(T){e(T),n()},L),i=null}"onloadend"in i?i.onloadend=h:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(h)},i.onabort=function(){i&&(e(new ht("Request aborted",ht.ECONNABORTED,l,i)),i=null)},i.onerror=function(y){const L=y&&y.message?y.message:"Network Error",T=new ht(L,ht.ERR_NETWORK,l,i);T.event=y||null,e(T),i=null},i.ontimeout=function(){let y=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded";const L=u.transitional||Lu;u.timeoutErrorMessage&&(y=u.timeoutErrorMessage),e(new ht(y,L.clarifyTimeoutError?ht.ETIMEDOUT:ht.ECONNABORTED,l,i)),i=null},$===void 0&&b.setContentType(null),"setRequestHeader"in i&&Ce.forEach(b.toJSON(),function(y,L){i.setRequestHeader(L,y)}),Ce.isUndefined(u.withCredentials)||(i.withCredentials=!!u.withCredentials),v&&v!=="json"&&(i.responseType=u.responseType),f&&([o,r]=Qa(f,!0),i.addEventListener("progress",o)),x&&i.upload&&([s,a]=Qa(x),i.upload.addEventListener("progress",s),i.upload.addEventListener("loadend",a)),(u.cancelToken||u.signal)&&(p=y=>{i&&(e(!y||y.type?new na(null,l,i):y),i.abort(),i=null)},u.cancelToken&&u.cancelToken.subscribe(p),u.signal&&(u.signal.aborted?p():u.signal.addEventListener("abort",p)));const m=U1(u.url);if(m&&ni.protocols.indexOf(m)===-1){e(new ht("Unsupported protocol "+m+":",ht.ERR_BAD_REQUEST,l));return}i.send($||null)})},J1=(l,c)=>{const{length:e}=l=l?l.filter(Boolean):[];if(c||e){let u=new AbortController,$;const b=function(p){if(!$){$=!0,x();const s=p instanceof Error?p:this.reason;u.abort(s instanceof ht?s:new na(s instanceof Error?s.message:s))}};let v=c&&setTimeout(()=>{v=null,b(new ht(`timeout of ${c}ms exceeded`,ht.ETIMEDOUT))},c);const x=()=>{l&&(v&&clearTimeout(v),v=null,l.forEach(p=>{p.unsubscribe?p.unsubscribe(b):p.removeEventListener("abort",b)}),l=null)};l.forEach(p=>p.addEventListener("abort",b));const{signal:f}=u;return f.unsubscribe=()=>Ce.asap(x),f}},X1=function*(l,c){let e=l.byteLength;if(e<c){yield l;return}let u=0,$;for(;u<e;)$=u+c,yield l.slice(u,$),u=$},eS=async function*(l,c){for await(const e of tS(l))yield*X1(e,c)},tS=async function*(l){if(l[Symbol.asyncIterator]){yield*l;return}const c=l.getReader();try{for(;;){const{done:e,value:u}=await c.read();if(e)break;yield u}}finally{await c.cancel()}},sf=(l,c,e,u)=>{const $=eS(l,c);let b=0,v,x=f=>{v||(v=!0,u&&u(f))};return new ReadableStream({async pull(f){try{const{done:p,value:s}=await $.next();if(p){x(),f.close();return}let o=s.byteLength;if(e){let a=b+=o;e(a)}f.enqueue(new Uint8Array(s))}catch(p){throw x(p),p}},cancel(f){return x(f),$.return()}},{highWaterMark:2})},af=64*1024,{isFunction:Ba}=Ce,nS=(({Request:l,Response:c})=>({Request:l,Response:c}))(Ce.global),{ReadableStream:lf,TextEncoder:cf}=Ce.global,uf=(l,...c)=>{try{return!!l(...c)}catch{return!1}},iS=l=>{l=Ce.merge.call({skipUndefined:!0},nS,l);const{fetch:c,Request:e,Response:u}=l,$=c?Ba(c):typeof fetch=="function",b=Ba(e),v=Ba(u);if(!$)return!1;const x=$&&Ba(lf),f=$&&(typeof cf=="function"?(n=>i=>n.encode(i))(new cf):async n=>new Uint8Array(await new e(n).arrayBuffer())),p=b&&x&&uf(()=>{let n=!1;const i=new e(ni.origin,{body:new lf,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!i}),s=v&&x&&uf(()=>Ce.isReadableStream(new u("").body)),o={stream:s&&(n=>n.body)};$&&["text","arrayBuffer","blob","formData","stream"].forEach(n=>{!o[n]&&(o[n]=(i,h)=>{let m=i&&i[n];if(m)return m.call(i);throw new ht(`Response type '${n}' is not supported`,ht.ERR_NOT_SUPPORT,h)})});const a=async n=>{if(n==null)return 0;if(Ce.isBlob(n))return n.size;if(Ce.isSpecCompliantForm(n))return(await new e(ni.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(Ce.isArrayBufferView(n)||Ce.isArrayBuffer(n))return n.byteLength;if(Ce.isURLSearchParams(n)&&(n=n+""),Ce.isString(n))return(await f(n)).byteLength},r=async(n,i)=>Ce.toFiniteNumber(n.getContentLength())??a(i);return async n=>{let{url:i,method:h,data:m,signal:y,cancelToken:L,timeout:T,onDownloadProgress:k,onUploadProgress:w,responseType:R,headers:D,withCredentials:I="same-origin",fetchOptions:E}=lg(n),z=c||fetch;R=R?(R+"").toLowerCase():"text";let F=J1([y,L&&L.toAbortSignal()],T),O=null;const _=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let S;try{if(w&&p&&h!=="get"&&h!=="head"&&(S=await r(D,m))!==0){let te=new e(i,{method:"POST",body:m,duplex:"half"}),ce;if(Ce.isFormData(m)&&(ce=te.headers.get("content-type"))&&D.setContentType(ce),te.body){const[ne,he]=nf(S,Qa(rf(w)));m=sf(te.body,af,ne,he)}}Ce.isString(I)||(I=I?"include":"omit");const N=b&&"credentials"in e.prototype,W={...E,signal:F,method:h.toUpperCase(),headers:D.normalize().toJSON(),body:m,duplex:"half",credentials:N?I:void 0};O=b&&new e(i,W);let V=await(b?z(O,E):z(i,W));const G=s&&(R==="stream"||R==="response");if(s&&(k||G&&_)){const te={};["status","statusText","headers"].forEach(ue=>{te[ue]=V[ue]});const ce=Ce.toFiniteNumber(V.headers.get("content-length")),[ne,he]=k&&nf(ce,Qa(rf(k),!0))||[];V=new u(sf(V.body,af,ne,()=>{he&&he(),_&&_()}),te)}R=R||"text";let Q=await o[Ce.findKey(o,R)||"text"](V,n);return!G&&_&&_(),await new Promise((te,ce)=>{sg(te,ce,{data:Q,headers:xi.from(V.headers),status:V.status,statusText:V.statusText,config:n,request:O})})}catch(N){throw _&&_(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new ht("Network Error",ht.ERR_NETWORK,n,O,N&&N.response),{cause:N.cause||N}):ht.from(N,N&&N.code,n,O,N&&N.response)}}},rS=new Map,cg=l=>{let c=l&&l.env||{};const{fetch:e,Request:u,Response:$}=c,b=[u,$,e];let v=b.length,x=v,f,p,s=rS;for(;x--;)f=b[x],p=s.get(f),p===void 0&&s.set(f,p=x?new Map:iS(c)),s=p;return p};cg();const Ru={http:x1,xhr:Z1,fetch:{get:cg}};Ce.forEach(Ru,(l,c)=>{if(l){try{Object.defineProperty(l,"name",{value:c})}catch{}Object.defineProperty(l,"adapterName",{value:c})}});const hf=l=>`- ${l}`,oS=l=>Ce.isFunction(l)||l===null||l===!1;function sS(l,c){l=Ce.isArray(l)?l:[l];const{length:e}=l;let u,$;const b={};for(let v=0;v<e;v++){u=l[v];let x;if($=u,!oS(u)&&($=Ru[(x=String(u)).toLowerCase()],$===void 0))throw new ht(`Unknown adapter '${x}'`);if($&&(Ce.isFunction($)||($=$.get(c))))break;b[x||"#"+v]=$}if(!$){const v=Object.entries(b).map(([f,p])=>`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let x=e?v.length>1?`since :
1389
- `+v.map(hf).join(`
1390
- `):" "+hf(v[0]):"as no adapter specified";throw new ht("There is no suitable adapter to dispatch the request "+x,"ERR_NOT_SUPPORT")}return $}const ug={getAdapter:sS,adapters:Ru};function xc(l){if(l.cancelToken&&l.cancelToken.throwIfRequested(),l.signal&&l.signal.aborted)throw new na(null,l)}function df(l){return xc(l),l.headers=xi.from(l.headers),l.data=bc.call(l,l.transformRequest),["post","put","patch"].indexOf(l.method)!==-1&&l.headers.setContentType("application/x-www-form-urlencoded",!1),ug.getAdapter(l.adapter||ta.adapter,l)(l).then(function(c){return xc(l),c.data=bc.call(l,l.transformResponse,c),c.headers=xi.from(c.headers),c},function(c){return og(c)||(xc(l),c&&c.response&&(c.response.data=bc.call(l,l.transformResponse,c.response),c.response.headers=xi.from(c.response.headers))),Promise.reject(c)})}const hg="1.13.6",ol={};["object","boolean","number","function","string","symbol"].forEach((l,c)=>{ol[l]=function(e){return typeof e===l||"a"+(c<1?"n ":" ")+l}});const ff={};ol.transitional=function(l,c,e){function u($,b){return"[Axios v"+hg+"] Transitional option '"+$+"'"+b+(e?". "+e:"")}return($,b,v)=>{if(l===!1)throw new ht(u(b," has been removed"+(c?" in "+c:"")),ht.ERR_DEPRECATED);return c&&!ff[b]&&(ff[b]=!0,console.warn(u(b," has been deprecated since v"+c+" and will be removed in the near future"))),l?l($,b,v):!0}};ol.spelling=function(l){return(c,e)=>(console.warn(`${e} is likely a misspelling of ${l}`),!0)};function aS(l,c,e){if(typeof l!="object")throw new ht("options must be an object",ht.ERR_BAD_OPTION_VALUE);const u=Object.keys(l);let $=u.length;for(;$-- >0;){const b=u[$],v=c[b];if(v){const x=l[b],f=x===void 0||v(x,b,l);if(f!==!0)throw new ht("option "+b+" must be "+f,ht.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new ht("Unknown option "+b,ht.ERR_BAD_OPTION)}}const qa={assertOptions:aS,validators:ol},Qi=qa.validators;let Ho=class{constructor(l){this.defaults=l||{},this.interceptors={request:new ef,response:new ef}}async request(l,c){try{return await this._request(l,c)}catch(e){if(e instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const $=u.stack?u.stack.replace(/^.+\n/,""):"";try{e.stack?$&&!String(e.stack).endsWith($.replace(/^.+\n.+\n/,""))&&(e.stack+=`
1391
- `+$):e.stack=$}catch{}}throw e}}_request(l,c){typeof l=="string"?(c=c||{},c.url=l):c=l||{},c=Uo(this.defaults,c);const{transitional:e,paramsSerializer:u,headers:$}=c;e!==void 0&&qa.assertOptions(e,{silentJSONParsing:Qi.transitional(Qi.boolean),forcedJSONParsing:Qi.transitional(Qi.boolean),clarifyTimeoutError:Qi.transitional(Qi.boolean),legacyInterceptorReqResOrdering:Qi.transitional(Qi.boolean)},!1),u!=null&&(Ce.isFunction(u)?c.paramsSerializer={serialize:u}:qa.assertOptions(u,{encode:Qi.function,serialize:Qi.function},!0)),c.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?c.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:c.allowAbsoluteUrls=!0),qa.assertOptions(c,{baseUrl:Qi.spelling("baseURL"),withXsrfToken:Qi.spelling("withXSRFToken")},!0),c.method=(c.method||this.defaults.method||"get").toLowerCase();let b=$&&Ce.merge($.common,$[c.method]);$&&Ce.forEach(["delete","get","head","post","put","patch","common"],r=>{delete $[r]}),c.headers=xi.concat(b,$);const v=[];let x=!0;this.interceptors.request.forEach(function(r){if(typeof r.runWhen=="function"&&r.runWhen(c)===!1)return;x=x&&r.synchronous;const n=c.transitional||Lu;n&&n.legacyInterceptorReqResOrdering?v.unshift(r.fulfilled,r.rejected):v.push(r.fulfilled,r.rejected)});const f=[];this.interceptors.response.forEach(function(r){f.push(r.fulfilled,r.rejected)});let p,s=0,o;if(!x){const r=[df.bind(this),void 0];for(r.unshift(...v),r.push(...f),o=r.length,p=Promise.resolve(c);s<o;)p=p.then(r[s++],r[s++]);return p}o=v.length;let a=c;for(;s<o;){const r=v[s++],n=v[s++];try{a=r(a)}catch(i){n.call(this,i);break}}try{p=df.call(this,a)}catch(r){return Promise.reject(r)}for(s=0,o=f.length;s<o;)p=p.then(f[s++],f[s++]);return p}getUri(l){l=Uo(this.defaults,l);const c=ag(l.baseURL,l.url,l.allowAbsoluteUrls);return ig(c,l.params,l.paramsSerializer)}};Ce.forEach(["delete","get","head","options"],function(l){Ho.prototype[l]=function(c,e){return this.request(Uo(e||{},{method:l,url:c,data:(e||{}).data}))}});Ce.forEach(["post","put","patch"],function(l){function c(e){return function(u,$,b){return this.request(Uo(b||{},{method:l,headers:e?{"Content-Type":"multipart/form-data"}:{},url:u,data:$}))}}Ho.prototype[l]=c(),Ho.prototype[l+"Form"]=c(!0)});let lS=class dg{constructor(c){if(typeof c!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function($){e=$});const u=this;this.promise.then($=>{if(!u._listeners)return;let b=u._listeners.length;for(;b-- >0;)u._listeners[b]($);u._listeners=null}),this.promise.then=$=>{let b;const v=new Promise(x=>{u.subscribe(x),b=x}).then($);return v.cancel=function(){u.unsubscribe(b)},v},c(function($,b,v){u.reason||(u.reason=new na($,b,v),e(u.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(c){if(this.reason){c(this.reason);return}this._listeners?this._listeners.push(c):this._listeners=[c]}unsubscribe(c){if(!this._listeners)return;const e=this._listeners.indexOf(c);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const c=new AbortController,e=u=>{c.abort(u)};return this.subscribe(e),c.signal.unsubscribe=()=>this.unsubscribe(e),c.signal}static source(){let c;return{token:new dg(function(e){c=e}),cancel:c}}};function cS(l){return function(c){return l.apply(null,c)}}function uS(l){return Ce.isObject(l)&&l.isAxiosError===!0}const pu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pu).forEach(([l,c])=>{pu[c]=l});function fg(l){const c=new Ho(l),e=Kp(Ho.prototype.request,c);return Ce.extend(e,Ho.prototype,c,{allOwnKeys:!0}),Ce.extend(e,c,null,{allOwnKeys:!0}),e.create=function(u){return fg(Uo(l,u))},e}const Cn=fg(ta);Cn.Axios=Ho;Cn.CanceledError=na;Cn.CancelToken=lS;Cn.isCancel=og;Cn.VERSION=hg;Cn.toFormData=rl;Cn.AxiosError=ht;Cn.Cancel=Cn.CanceledError;Cn.all=function(l){return Promise.all(l)};Cn.spread=cS;Cn.isAxiosError=uS;Cn.mergeConfig=Uo;Cn.AxiosHeaders=xi;Cn.formToJSON=l=>rg(Ce.isHTMLForm(l)?new FormData(l):l);Cn.getAdapter=ug.getAdapter;Cn.HttpStatusCode=pu;Cn.default=Cn;const{Axios:gA,AxiosError:mA,CanceledError:vA,isCancel:yA,CancelToken:wA,VERSION:bA,all:xA,Cancel:SA,isAxiosError:CA,spread:kA,toFormData:_A,AxiosHeaders:AA,HttpStatusCode:$A,formToJSON:MA,getAdapter:TA,mergeConfig:LA}=Cn,Iu=Cn.create({baseURL:location.origin,timeout:6e4,params:{}});Iu.interceptors.response.use(l=>l,l=>{if(l.response){if(l.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(u){u&&OpenC3Auth.setTokens()}),l.response.config.headers["Ignore-Errors"]&&l.response.config.headers["Ignore-Errors"].includes(l.response.status.toString()))return Promise.reject(l);let c=`HTTP ${l.response.status} - `;l.response?.statusText&&(c+=`${l.response.statusText} `),l.response?.config?.data&&(c+=`${l.response.config.data} `),l.response?.data?.message?c+=`${l.response.data.message}`:l.response?.data?.exception?c+=`${l.response.data.exception}`:l.response?.data?.error?.message?(l.response.data.error.class&&(c+=`${l.response.data.error.class} `),c+=`${l.response.data.error.message}`):c+=`${l.response?.data}`;const{$cosmosNotify:e}=window;throw e&&e.serious({title:"Network error",body:c}),l}else throw l});const Wa=async function(l,c,{data:e,params:u={},headers:$,noAuth:b=!1,noScope:v=!1,onUploadProgress:x=!1}={}){if(!b){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}$.Authorization=localStorage.openc3Token}return $.manual=!0,!v&&!u.scope&&(u.scope=window.openc3Scope),Iu({method:l,url:c,data:e,params:u,headers:$,onUploadProgress:x})},gu={Accept:"application/json"},pf={...gu,"Content-Type":"application/json"},pg={get:function(l,{params:c,headers:e=gu,noScope:u,noAuth:$,onUploadProgress:b}={}){return Wa("get",l,{params:c,headers:e,noScope:u,noAuth:$,onUploadProgress:b})},put:function(l,{data:c,params:e,headers:u=pf,noScope:$,noAuth:b,onUploadProgress:v}={}){return Wa("put",l,{data:c,params:e,headers:u,noScope:$,noAuth:b,onUploadProgress:v})},post:function(l,{data:c,params:e,headers:u=pf,noScope:$,noAuth:b,onUploadProgress:v}={}){return Wa("post",l,{data:c,params:e,headers:u,noScope:$,noAuth:b,onUploadProgress:v})},delete:function(l,{params:c,headers:e=gu,noScope:u,noAuth:$,onUploadProgress:b}={}){return Wa("delete",l,{params:c,headers:e,noScope:u,noAuth:$,onUploadProgress:b})}};let sl=()=>({emit(l,...c){for(let e=this.events[l]||[],u=0,$=e.length;u<$;u++)e[u](...c)},events:{},on(l,c){return(this.events[l]||=[]).push(c),()=>{this.events[l]=this.events[l]?.filter(e=>c!==e)}}});class ia extends Error{constructor(c,e){c instanceof Error?(super(c.message),this.cause=c):super(c),this.reason=e,this.name="ReasonError"}}class Ou extends ia{constructor(c){super("Rejected",c),this.name="SubscriptionRejectedError"}}class hS extends ia{constructor(c){super(c||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class dr extends ia{constructor(c,e){e?super(c,e):super("Disconnected",c),this.name="DisconnectedError"}}class dS extends dr{constructor(c){super(c,"stale_connection"),this.name="StaleConnectionError"}}function gg(l){return l?`{${Object.keys(l).sort().filter(c=>l[c]!==void 0).map(c=>{let e=JSON.stringify(l[c]);return`${JSON.stringify(c)}:${e}`}).join(",")}}`:""}class fS{constructor(c){this.channel=c,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",c=>{if(c.type==="info"){this._state||(this._state=this.stateFromInfo(c));return}this._state&&(c.type==="join"?this._state[c.id]=c.info:c.type==="leave"&&delete this._state[c.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(c=>c()),this.listeners.length=0}async join(c,e){if(!this._info)return this._info={id:String(c),info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let c=await this.channel.perform("$presence:leave");return delete this._info,c}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let c=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(c),this._state}finally{delete this._promise}}stateFromInfo(c){return c.records.reduce((e,{id:u,info:$})=>(e[u]=$,e),{})}}const No=Symbol("state");class mg{constructor(c={}){this.emitter=sl(),this.params=Object.freeze(c),this.presence=new fS(this),this.initialConnect=!0,this[No]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=gg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[No]}attached(c){if(this.receiver){if(this.receiver!==c)throw Error("Already connected to a different receiver");return!1}return this.receiver=c,!0}connecting(){this[No]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[No]="connected";let c=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:c})):this.emit("connect",{reconnect:!0,restored:c})}restored(){if(this.state==="connected")throw Error("Already connected");this[No]="connected";let c=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:c})}disconnected(c){this.state==="disconnected"||this.state==="closed"||(this[No]="disconnected",this.presence.reset(),this.emit("disconnect",c))}closed(c){this.state!=="closed"&&(this[No]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",c))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(c,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,c,e)}async send(c){return this.perform(void 0,c)}async whisper(c){try{await this.perform("$whisper",c)}catch(e){let u=this.receiver?this.receiver.logger:null;u&&u.warn("whisper failed: ",e)}}receive(c,e){this.emit("message",c,e)}on(c,e){return this.emitter.on(c,e)}once(c,e){let u=this.emitter.on(c,(...$)=>{u(),e(...$)});return u}emit(c,...e){return this.emitter.emit(c,...e)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((c,e)=>{let u=[()=>delete this._pendingSubscribe];u.push(this.on("connect",()=>{u.forEach($=>$()),c()})),u.push(this.on("close",$=>{u.forEach(b=>b()),e($||new ia("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class pS{constructor(c){this.id=c,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(c){this.channels.includes(c)||this.channels.push(c)}remove(c){let e=this.channels.indexOf(c);e>-1&&this.channels.splice(e,1)}notify(c,...e){this.state=c==="restored"?"connected":c,e.length===1?this.channels.forEach(u=>u[c](e[0])):this.channels.forEach(u=>u[c]())}pending(c){this._checkIntent(c);let e=this._pendings[0];return!e||e.intent!==c?Promise.resolve():e.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(c){this._checkIntent(c);let e,u={promise:new Promise(b=>{e=b}),intent:c,release:()=>{this._pendings.splice(this._pendings.indexOf(u),1),e(u)},canceled:!1,acquired:!1},$=this._pendingTop;return this._pendings.push(u),$&&await $.promise,this.gvl&&await this.gvl.acquire(u,c),u.acquired=!0,u}close(c){this.disposed=!0,this.intent=void 0,this.notify("closed",c)}_checkIntent(c){if(!(c==="unsubscribed"||c==="subscribed"))throw Error(`Unknown subscription intent: ${c}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(c){let e=this._pendingTop;return!e||e.acquired||e.intent!==c?!1:(this._pendings.pop(),e.canceled=!0,!0)}}class gS{constructor(){this.queue=[]}async acquire(c,e){e==="subscribed"&&(this.queue.push(c.promise.then(()=>{this.queue.splice(this.queue.indexOf(c),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class mS{constructor(c){c.concurrentSubscribes===!1&&(this.glv=new gS),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(c){return this._subscriptions[c]}create(c,{subscribe:e,unsubscribe:u}){let $=this._subscriptions[c]=new pS(c);return $.remoteId=this._localToRemote[c],$.subscriber=e,$.unsubscriber=u,$.gvl=this.glv,$}remove(c){delete this._subscriptions[c],delete this._localToRemote[c]}storeRemoteId(c,e){this._localToRemote[c]=e;let u=this.get(c);u&&(u.remoteId=e)}}class vS{constructor(c={}){this.subscriptions=new mS(c),this._pendingMessages=[],this._remoteToLocal={}}subscribe(c,e){this._remoteToLocal[e]=c,this.subscriptions.storeRemoteId(c,e),this.flush(e)}unsubscribe(c){let e=this.subscriptions.get(c);if(!e)return;let u=e.remoteId;u&&delete this._remoteToLocal[u],this.subscriptions.remove(c)}transmit(c,e,u){let $=this._remoteToLocal[c];if(!$){this._pendingMessages.push([c,e,u]);return}let b=this.subscriptions.get($);b&&b.channels.forEach(v=>{v.receive(e,u)})}notify(c,e,u){let $=this._remoteToLocal[c];if(!$)return;let b=this.subscriptions.get($);b&&b.channels.forEach(v=>v.emit(e,u))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(c=>c.channels)}flush(c){let e=[];for(let u of this._pendingMessages)u[0]===c?this.transmit(u[0],u[1],u[2]):e.push(u);this._pendingMessages=e}}const gf={debug:0,info:1,warn:2,error:3};class vg{constructor(c){this.level=c||"warn"}log(c,e,u){gf[c]<gf[this.level]||this.writeLogEntry(c,e,u)}writeLogEntry(){throw Error("Not implemented")}debug(c,e){this.log("debug",c,e)}info(c,e){this.log("info",c,e)}warn(c,e){this.log("warn",c,e)}error(c,e){this.log("error",c,e)}}class ra extends vg{writeLogEntry(){}}class yS{encode(c){return JSON.stringify(c)}decode(c){try{return JSON.parse(c)}catch{}}}let wS=0;class yg{constructor(c={}){let{logger:e}=c;this.logger=e||new ra,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=c.subscribeCooldownInterval||250,this.subscribeRetryInterval=c.subscribeRetryInterval||5e3}attached(c){this.cable=c}subscribe(c,e){let u={channel:c};e&&Object.assign(u,e);let $=gg(u);if(this.pendingUnsubscriptions[$]){let v=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${v}`,$),new Promise(x=>{setTimeout(()=>{x(this.subscribe(c,e))},v)})}if(this.pendingSubscriptions[$])return this.logger.warn("subscription is already pending, skipping",$),Promise.reject(Error("Already subscribing"));let b=this.subscribeRetryInterval;return new Promise((v,x)=>{let f=++wS;this.pendingSubscriptions[$]={resolve:v,reject:x,id:f},this.cable.send(this.buildSubscribeRequest($)),this.maybeRetrySubscribe(f,$,b)})}buildSubscribeRequest(c){return{command:"subscribe",identifier:c}}maybeRetrySubscribe(c,e,u){setTimeout(()=>{let $=this.pendingSubscriptions[e];$&&$.id===c&&(this.logger.warn(`no subscription ack received in ${u}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(c,e,u))},u)}maybeExpireSubscribe(c,e,u){setTimeout(()=>{let $=this.pendingSubscriptions[e];$&&$.id===c&&(delete this.pendingSubscriptions[e],$.reject(new hS(`Haven't received subscription ack in ${u*2}ms for ${e}`)))},u)}unsubscribe(c){return this.cable.send({command:"unsubscribe",identifier:c}),this.pendingUnsubscriptions[c]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[c]},this.subscribeCooldownInterval),Promise.resolve()}perform(c,e,u){return e==="$whisper"?this.whisper(c,u):(u||(u={}),u.action||=e,this.cable.send({command:"message",identifier:c,data:JSON.stringify(u)}),Promise.resolve())}whisper(c,e){return this.cable.send({command:"whisper",identifier:c,data:e}),Promise.resolve()}receive(c){if(typeof c!="object"){this.logger.error("unsupported message format",{message:c});return}let{type:e,identifier:u,message:$,reason:b,reconnect:v}=c;if(e==="ping")return this.cable.keepalive(c.message);if(this.cable.keepalive(),e==="welcome"){let x=c.sid;return x&&this.cable.setSessionId(x),this.cable.connected()}if(e==="disconnect"){let x=new dr(b);this.reset(x),v===!1?this.cable.closed(x):this.cable.disconnected(x);return}if(e==="confirm_subscription"){let x=this.pendingSubscriptions[u];if(!x){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:u}),this.unsubscribe(u);return}return delete this.pendingSubscriptions[u],x.resolve(u)}if(e==="reject_subscription"){let x=this.pendingSubscriptions[u];return x?(delete this.pendingSubscriptions[u],x.reject(new Ou)):this.logger.error("subscription not found",{type:e,identifier:u})}if($)return{identifier:u,message:$};this.logger.warn(`unknown message type: ${e}`,{message:c})}reset(c){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(c);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const mf=()=>Date.now()/1e3|0;class bS extends yg{constructor(c={}){super(c),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=c.historyTimestamp,this.disableSessionRecovery=c.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=mf()),this.sessionId=void 0,this.sendPongs=c.pongs}reset(c){for(let e in this.pendingPresence)this.pendingPresence[e].reject(c);return this.pendingPresence={},super.reset()}receive(c){if(typeof c!="object"){this.logger.error("unsupported message format",{message:c});return}let{type:e,identifier:u,message:$}=c;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(c);if(e==="reject_subscription")return super.receive(c);if(e==="confirm_subscription")return this.subscriptionStreams[u]||(this.subscriptionStreams[u]=new Set),super.receive(c);if(e==="ping")return this.restoreSince&&(this.restoreSince=mf()),this.sendPongs&&this.sendPong(),this.cable.keepalive(c.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",c),this.cable.notify("history_received",u);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",c),this.cable.notify("history_not_found",u);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=c.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),c.restored){let b=c.restored_ids||Object.keys(this.subscriptionStreams);for(let v of b)this.cable.send({identifier:v,command:"history",history:this.historyRequestFor(v)}),this.presenceInfo[v]&&this.cable.send({identifier:v,command:"join",presence:this.presenceInfo[v]});return this.cable.restored(b)}return this.cable.connected(this.sessionId)}if(e==="presence"){let b=$.type;if(b==="info"){let v=this.pendingPresence[u];v&&(delete this.pendingPresence[u],v.resolve($))}else if(b==="error"){let v=this.pendingPresence[u];v&&(delete this.pendingPresence[u],v.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:u,message:$}}if($){let b=this.trackStreamPosition(u,c.stream_id,c.epoch,c.offset);return{identifier:u,message:$,meta:b}}this.logger.warn(`unknown message type: ${e}`,{message:c})}perform(c,e,u){switch(e){case"$presence:join":return this.join(c,u);case"$presence:leave":return this.leave(c,u);case"$presence:info":return this.presence(c,u)}return super.perform(c,e,u)}unsubscribe(c){return delete this.presenceInfo[c],super.unsubscribe(c)}buildSubscribeRequest(c){let e=super.buildSubscribeRequest(c),u=this.historyRequestFor(c);u&&(e.history=u,this.pendingHistory[c]=!0);let $=this.presenceInfo[c];return $&&(e.presence=$),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(c){let e={},u=!1;if(this.subscriptionStreams[c])for(let $ of this.subscriptionStreams[c]){let b=this.streamsPositions[$];b&&(u=!0,e[$]=b)}if(!(!u&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(c,e,u,$){if(!(!e||!u))return this.subscriptionStreams[c]||(this.subscriptionStreams[c]=new Set),this.subscriptionStreams[c].add(e),this.streamsPositions[e]={epoch:u,offset:$},{stream:e,epoch:u,offset:$}}async sendPong(){await new Promise(c=>setTimeout(c,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(c,e){return this.presenceInfo[c]=e,this.cable.send({command:"join",identifier:c,presence:e}),Promise.resolve()}async leave(c,e){return delete this.presenceInfo[c],this.cable.send({command:"leave",identifier:c,presence:e}),Promise.resolve()}presence(c,e){return this.pendingPresence[c]?(this.logger.warn("presence is already pending, skipping",c),Promise.reject(Error("presence request is already pending"))):new Promise((u,$)=>{this.pendingPresence[c]={resolve:u,reject:$},this.cable.send({command:"presence",identifier:c,data:e})})}}class xS extends ia{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class wg extends mg{static identifier="__ghost__";constructor(c,e){super(e),this.channelId=c}set channelId(c){this._channelId=c}get channelId(){return this._channelId}}const SS="$pubsub";class vf extends mg{static identifier=SS;async perform(c,e){if(c.startsWith("$"))return super.perform(c,e);throw Error("not implemented")}}const Do=Symbol("state");let CS=class{constructor({transport:l,protocol:c,encoder:e,logger:u,lazy:$,hubOptions:b,performFailures:v,transportConfigurator:x}){this.emitter=sl(),this.transport=l,this.encoder=e,this.logger=u||new ra,this.protocol=c,this.performFailures=v||"throw",this.protocol.attached(this),this.hub=new vS(b||{}),this[Do]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=x,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,$===!1&&this.connect().catch(()=>{})}get state(){return this[Do]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let l=this.state==="idle";this[Do]="connecting";let c=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:l}),await this.transport.open()}catch(e){this.handleClose(e)}return c}setSessionId(l){this.sessionId=l,this.transport.setParam("sid",l)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[Do]="connected",this.recovering&&this.hub.subscriptions.all().forEach(c=>c.notify("disconnected",new dr("recovery_failed"))),this.hub.subscriptions.all().forEach(c=>this._resubscribe(c));let l=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:l})):this.emit("connect",{reconnect:!0,restored:l})}restored(l){this.logger.info("connection recovered",{remoteIds:l}),this[Do]="connected",this.hub.subscriptions.all().forEach(u=>{l&&u.remoteId&&l.includes(u.remoteId)?u.notify("restored"):(u.notify("disconnected",new dr("recovery_failed")),this._resubscribe(u))});let c=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:c,restored:e})}notify(l,c,e){c&&typeof c!="string"&&(e=c,c=void 0),c?this.hub.notify(c,"info",{type:l,data:e}):this.emit("info",{type:l,data:e})}handleClose(l){this.logger.debug("transport closed",{error:l}),this.disconnected(new dr(l,"transport_closed"))}disconnected(l){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:l}),this[Do]="disconnected",this.recovering=this.protocol.recoverableClosure(l),this.recovering?this.hub.subscriptions.all().forEach(c=>c.notify("connecting")):this.hub.subscriptions.all().forEach(c=>{c.notify("disconnected",l)}),this.protocol.reset(l),this.hub.close(),this.transport.close(),this.emit("disconnect",l))}closed(l){if(this.state==="closed"||this.state==="idle")return;let c;l&&(c=l instanceof dr?l:new dr(l,void 0)),this.logger.info("closed",{reason:l||"user"}),this[Do]="closed";let e=c||new dr("cable_closed");this.hub.subscriptions.all().forEach(u=>u.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",c)}disconnect(){this.closed()}handleIncoming(l){if(this.state==="closed"||this.state==="idle")return;let c=this.encoder.decode(l);if(c===void 0){this.logger.error("failed to decode message",{message:l});return}this.logger.debug("incoming data",c);let e=this.protocol.receive(c);if(e){this.logger.debug("processed incoming message",e);let{type:u,identifier:$,message:b,meta:v}=e;u?this.hub.notify($,u,b):this.hub.transmit($,b,v)}}send(l){if(this.state==="closed")throw Error("Cable is closed");let c=this.encoder.encode(l);if(c===void 0){this.logger.error("failed to encode message",{message:l});return}this.logger.debug("outgoing message",l),this.transport.send(c)}keepalive(l){this.emit("keepalive",l)}streamFrom(l){let c=new vf({stream_name:l});return this.subscribe(c)}streamFromSigned(l){let c=new vf({signed_stream_name:l});return this.subscribe(c)}subscribeTo(l,c){let e,u;return typeof l=="string"&&(u=l,l=wg),e=u?new l(u,c):new l(c),this.subscribe(e)}subscribe(l){if(!l.attached(this))return l;let c=l.identifier;l.connecting();let e=this.hub.subscriptions.get(c)||this.hub.subscriptions.create(c,{subscribe:u=>this._subscribe(u,l.channelId,l.params),unsubscribe:u=>this._unsubscribe(u)});return e.add(l),e.intent==="subscribed"&&e.state==="connected"&&l.connected(),e.ensureSubscribed(),l}async _resubscribe(l){l.intent!=="subscribed"||!l.channels[0]||(l.notify("connecting"),l.ensureResubscribed())}async _subscribe(l,c,e){let u=l.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:u});return}this.logger.debug("acquiring subscribe lock",{identifier:u});let $=await l.acquire("subscribed");if($.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:u}),$.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:u}),l.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),$.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:u}),$.release();return}if(l.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:u}),l.notify("connected"),$.release();return}let b={identifier:c,params:e};this.logger.debug("subscribing",b);try{let v=await this.protocol.subscribe(c,e);this.hub.subscribe(u,v),this.logger.debug("subscribed",{...b,remoteId:v}),l.notify("connected")}catch(v){if(v){if(v instanceof Ou&&this.logger.warn("rejected",b),v instanceof dr){this.logger.debug("disconnected during subscription; will retry on connect",b),$.release();return}this.logger.error("failed to subscribe",{error:v,...b})}l.close(v),this.hub.unsubscribe(u)}$.release()}unsubscribe(l){let c=l.identifier,e=this.hub.subscriptions.get(c);if(!e)throw Error(`Subscription not found: ${c}`);e.remove(l),l.closed(),e.maybeUnsubscribe()}async _unsubscribe(l){let c=l.id;this.logger.debug("acquiring unsubscribe lock",{identifier:c});let e=await l.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:c}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:c}),l.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:c,intent:l.intent}),e.release();return}if(l.state==="disconnected"||l.state==="closed"){this.logger.debug(`already ${l.state} connected, skip unsubscribe command`,{identifier:c}),e.release();return}let u=l.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:u}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:c}),l.close(),this.hub.unsubscribe(c),e.release();return}try{await this.protocol.unsubscribe(u),this.logger.debug("unsubscribed remotely",{id:c})}catch($){$&&($ instanceof dr?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:c,error:$}):this.logger.error("unsubscribe failed",{id:c,error:$}))}l.intent==="unsubscribed"?(l.close(),this.hub.unsubscribe(c)):l.state="closed",e.release()}async perform(l,c,e){if(this.performFailures==="throw")return this._perform(l,c,e);try{return await this._perform(l,c,e)}catch(u){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:u});return}}async _perform(l,c,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new xS;let u=this.hub.subscriptions.get(l);if(!u)throw Error(`Subscription not found: ${l}`);if(await u.pending("subscribed"),u.intent!=="subscribed")throw Error(`Subscription is closed: ${l}`);let $=u.remoteId,b={id:$,action:c,payload:e};this.logger.debug("perform",b);try{let v=await this.protocol.perform($,c,e);return v&&this.logger.debug("perform result",{message:v,request:b}),v}catch(v){throw this.logger.error("perform failed",{error:v,request:b}),v}}on(l,c){return this.emitter.on(l,c)}once(l,c){let e=this.emitter.on(l,(...u)=>{e(),c(...u)});return e}emit(l,...c){return this.emitter.emit(l,...c)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((l,c)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(u=>u()),l()})),e.push(this.on("close",u=>{e.forEach($=>$()),c(u)})),e.push(this.on("disconnect",u=>{e.forEach($=>$()),c(u)}))}),this._pendingConnect)}};const kS={maxMissingPings:2,maxReconnectAttempts:1/0},ls=()=>Date.now(),bg=(l,c)=>{c=c||{};let{backoffRate:e,jitterRatio:u,maxInterval:$}=c;return e=e||2,u===void 0&&(u=.5),b=>{let v=l*e**b,x=v*e,f=v+(x-v)*Math.random(),p=2*(Math.random()-.5)*u;return f=f*(1+p),$&&$<f&&(f=$),f}};let xg=class{constructor({pingInterval:l,...c}){if(this.pingInterval=l,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${l}`);if(c=Object.assign({},kS,c),this.strategy=c.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=c.maxMissingPings,this.maxReconnectAttempts=c.maxReconnectAttempts,this.logger=c.logger||new ra,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ls()}watch(l){this.target=l,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(l=>{this.logger.info("Failed at reconnecting: "+l)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=ls(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ls(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ls(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ls()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(l=>l()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let l=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},l)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let l=ls()-this.pingedAt;l>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${l}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new dS))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let l=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${l}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),l)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class _S{constructor(c,e={}){this.transports=c,this.transport=null,this.emitter=sl(),this.unbind=[],this.logger=e.logger||new ra}displayName(){return"fallbacked transport"}async open(){for(let c=0;c<this.transports.length;c++){let e=this.transports[c];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(u){this.logger.debug(`Failed to connect via ${e.displayName()}: ${u.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(c){if(!this.transport)throw new Error("No transport is open");this.transport.send(c)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(c,e){this.transports.forEach(u=>{u.setParam(c,e)})}setToken(c,e){this.transports.forEach(u=>{u.setToken(c,e)})}on(c,e){return this.emitter.on(c,e)}once(c,e){let u=this.emitter.on(c,(...$)=>{u(),e(...$)});return u}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(c=>c()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",c=>{this.emitter.emit("data",c)}),this.transport.on("close",c=>{this.emitter.emit("close",c)}),this.transport.on("error",c=>{this.emitter.emit("error",c)}))}}class AS{constructor(c,e={}){this.url=c;let u=e.websocketImplementation;if(u)this.Impl=u;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=sl();let{format:$,subprotocol:b,authStrategy:v}=e;this.format=$||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=v||"param",this.authProtocol="",this.subprotocol=b}displayName(){return"WebSocket("+this.url+")"}open(){let c=this.subprotocol;return this.authStrategy==="sub-protocol"&&(c=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,c,this.connectionOptions):this.ws=new this.Impl(this.url,c),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,u)=>{let $=[];$.push(this.once("open",()=>{$.forEach(b=>b()),e()})),$.push(this.once("close",()=>{$.forEach(b=>b()),u(Error("WS connection closed"))}))})}setURL(c){this.url=c}setParam(c,e){let u=new URL(this.url);u.searchParams.set(c,e);let $=`${u.protocol}//${u.host}${u.pathname}?${u.searchParams}`;this.setURL($)}setToken(c,e="jid"){if(this.authStrategy==="param")this.setParam(e,c);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let u=`x-${e}`.toLowerCase();u=Object.keys(this.connectionOptions.headers).find($=>$.toLowerCase()===u)||u,this.connectionOptions.headers[u]=c}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${c}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(c){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(c)}close(){this.ws?this.onclose():this.connected=!1}on(c,e){return this.emitter.on(c,e)}once(c,e){let u=this.emitter.on(c,(...$)=>{u(),e(...$)});return u}initListeners(){this.ws.onerror=c=>{this.connected&&this.emitter.emit("error",c.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=c=>{let e=c.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}class $S{constructor(c){this.channel=c}notify(c,...e){typeof this[c]=="function"&&this[c](...e)}perform(c,e={}){this.channel.perform(c,e)}send(c){this.channel.send(c)}whisper(c){return this.channel.whisper(c)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class MS extends wg{constructor(c,e,u){super(c,e),this.subscription=new $S(this),Object.assign(this.subscription,u),this.on("connect",({reconnect:$})=>this.subscription.notify("connected",{reconnected:$})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",$=>this.subscription.notify("received",$)),this.on("close",$=>{$&&$ instanceof Ou?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class TS{constructor(c){this.cable=c}create(c,e){let u,$;typeof c=="object"?(u=c.channel,delete c.channel,$=c):(u=c,$={});let b=new MS(u,$,e);return b.subscription.notify("initialized"),this.cable.subscribe(b),b.subscription}findAll(c){return this.cable.hub.channels.filter(e=>e.identifier===c).map(e=>e.subscription)}}class LS{constructor(c){this.cable=c,this.subscriptions=new TS(c)}send(c){return this.cable.send(c)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const Sg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function ES(l,c){if(typeof l=="object"&&typeof c>"u"&&(c=l,l=void 0),c=c||{},!l&&!c.transport)throw Error("URL or transport must be specified");c=Object.assign({},Sg,c);let{protocol:e,websocketImplementation:u,websocketFormat:$,websocketOptions:b,websocketAuthStrategy:v,fallbacks:x,logLevel:f,logger:p,transport:s,encoder:o,lazy:a,monitor:r,pingInterval:n,reconnectStrategy:i,maxMissingPings:h,maxReconnectAttempts:m,subprotocol:y,tokenRefresher:L,historyTimestamp:T,protocolOptions:k,concurrentSubscribes:w,performFailures:R,transportConfigurator:D,auth:I}=c;if(p=p||new ra(f),typeof e=="string"){y=y||e;let F=e.substring(0,e.lastIndexOf("-")),O=e.substring(e.lastIndexOf("-")+1);if(k=k||{},F==="actioncable-v1")e=new yg({logger:p,...k});else if(F==="actioncable-v1-ext")e=new bS({logger:p,historyTimestamp:T,...k});else throw Error(`Protocol is not supported yet: ${e}`);if(O==="json")o=o||new yS,$=$||"text";else if(O==="msgpack"){if($="binary",!o)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if($=$||"binary",!o)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");s=s||new AS(l,{websocketImplementation:u,websocketOptions:b,subprotocol:y,authStrategy:v,format:$}),x&&(s=new _S([s,...x],{logger:p})),I&&I.token&&s.setToken(I.token,I.param||"jid"),i=i||bg(n),r!==!1&&(r=r||new xg({pingInterval:n,reconnectStrategy:i,maxMissingPings:h,maxReconnectAttempts:m,logger:p}));let E={concurrentSubscribes:w},z=new CS({protocol:e,transport:s,encoder:o,logger:p,lazy:a,hubOptions:E,performFailures:R,transportConfigurator:D});return r&&(r.watch(z),z.monitor=r),L&&RS(z,async()=>{try{await L(s)}catch(F){return p.error("Failed to refresh authentication token: "+F),!1}return z.connect().catch(()=>{}),!0}),z}function RS(l,c){let e=!1;l.on("connect",()=>e=!1),l.on("close",async u=>{if(u){if(e){l.logger.warn("Token auto-refresh is disabled",u);return}u.reason==="token_expired"&&(e=!0,await c())}})}class IS extends vg{writeLogEntry(c,e,u){u?console[c](e,u):console[c](e)}}class OS extends xg{watch(c){super.watch(c),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let c=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=$=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:$})},u=()=>this.disconnect(new dr("page_frozen"));document.addEventListener("visibilitychange",c,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",u,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",c,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",u,!1)})}}disconnect(c){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:c.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(c))}}const NS=["cable","action-cable"],DS="/cable",al=(l,c)=>{for(let e of NS){let u=l.head.querySelector(`meta[name='${e}-${c}']`);if(u)return u.getAttribute("content")}},yf=l=>l.match(/wss?:\/\//)?l:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${l}`:l,FS=()=>{if(typeof document<"u"&&document.head){let l=al(document,"url");if(l)return yf(l)}return yf(DS)},PS=()=>{if(typeof document<"u"&&document.head){let l=al(document,"history-timestamp");if(l)return l|0}},BS=()=>{if(typeof document<"u"&&document.head)return al(document,"token")},WS=()=>{if(typeof document<"u"&&document.head)return al(document,"token-param")};function HS(l,c){typeof l=="object"&&typeof c>"u"&&(c=l,l=void 0),l=l||FS(),c=c||{},c.historyTimestamp||=PS();let e=BS();if(e){let p=WS();c.auth=Object.assign({token:e,param:p},c.auth||{})}c=Object.assign({},Sg,c);let{logLevel:u,logger:$,pingInterval:b,reconnectStrategy:v,maxMissingPings:x,maxReconnectAttempts:f}=c;return $=c.logger=c.logger||new IS(u),v=c.reconnectStrategy=c.reconnectStrategy||bg(b),c.monitor!==!1&&(c.monitor=c.monitor||new OS({pingInterval:b,reconnectStrategy:v,maxMissingPings:x,maxReconnectAttempts:f,logger:$})),ES(l,c)}function zS(l,c){let e=HS(l,c);return new LS(e)}class US{constructor(c="/openc3-api/cable",e="/openc3-api/auth/otp"){this._cable=null,this._url=c,this._otpUrl=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(c,e,u={},$={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(b=>(b&&OpenC3Auth.setTokens(),pg.get(this._otpUrl,{params:{scope:e}}))).then(({data:b})=>{if(this._cable==null){const v=new URL(this._url,document.baseURI);v.searchParams.set("scope",e),v.searchParams.set("authorization",b),this._cable=zS(v.href)}return this._cable.subscriptions.create({channel:c,...$},u)})}recordPing(){}}class mu{constructor(c,e,u="",$=""){this.keyword=c.keyword,this.parameters=c.parameters,this.filename=c.filename,this.line=c.line,this.lineNumber=c.lineNumber,this.message=e,this.usage=u,this.url=$}}class VS{keyword=null;parameters=[];filename="";line="";lineNumber=0;url="https://docs.openc3.com/docs/configuration";constructor(){}verify_num_parameters(c,e,u=""){for(let $=1;$<=c;$++)if(this.parameters[$-1]===void 0)throw new mu(this,`Not enough parameters for ${this.keyword}.`,u,this.url);if(e&&this.parameters[e]!==void 0)throw new mu(this,`Too many parameters for ${this.keyword}.`,u,this.url)}remove_quotes(c){if(c.length<2)return c;let e=c.charAt(0);if(e!=='"'&&e!=="'")return c;let u=c.charAt(c.length-1);return e!==u?c:c.substring(1,c.length-1)}scan_string(c,e){if(!e.global)throw"rx must have 'global' flag set";let u=[];return c.replace(e,function($){return u.push($),$}),u}parse_string(c,e,u,$,b){let v=!1,x=!1;this.line="",this.keyword=null,this.parameters=[],this.filename=e;let f=c.split(`
1392
- `),p=f.length;for(let s=0;s<p;s++){this.lineNumber=s+1;let o=f[s];if(v)this.line=o;else{if(o=o.trim(),o.length===0){if(u){let L=b(null,[],this.line,this.lineNumber);L===!0&&(v=!0),L===!1&&(v=!1)}continue}if(x===!0){if(o[0]==="#")continue;o=o.substring(1,o.length)}let m=o.charAt(o.length-1),y=!1;switch(m){case"+":y=!0;case"\\":let L=o.substring(0,o.length-1).trim();this.line+=L.substring(0,L.length-1),y&&(this.line+=`
1393
- `),x=!0;continue;case"&":this.line+=o.substring(0,o.length-1);continue;default:this.line+=o}}x=!1;let a=/("([^\\"]|\\.)*")|('([^\\']|\\.)*')|\S+/g,r=this.scan_string(this.line,a),n="";if(r.length>0&&(n=n+r[0]),n.length===0||n.charAt(0)==="#"?this.keyword=null:this.keyword=n.toUpperCase(),this.parameters=[],this.keyword===null){if(u){let m=b(this.keyword,this.parameters,this.line,this.lineNumber);m===!0&&(v=!0),m===!1&&(v=!1)}this.line="";continue}let i=r.length;if(i>1)for(let m=1;m<i;m++){let y=r[m];if(y.length>0&&y.charAt(0)==="#")break;$?this.parameters.push(this.remove_quotes(y)):this.parameters.push(y)}let h=b(this.keyword,this.parameters,this.line,this.lineNumber);h===!0&&(v=!0),h===!1&&(v=!1),this.line=""}}}function Qs(l){return jS.test(l)}const jS=/^-?[0-9]+$/;function Cg(l){return KS.test(l)}const KS=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function kg(l,c){if(Qs(l))return Number.isSafeInteger(Number.parseInt(l,10));const e=Number.parseFloat(l),u=String(e);if(l===u)return!0;const $=wf(l),b=wf(u);return!!($===b||c?.approx===!0&&!Qs(l)&&b.length>=14&&$.startsWith(b.substring(0,14)))}let Us=(function(l){return l.underflow="underflow",l.overflow="overflow",l.truncate_integer="truncate_integer",l.truncate_float="truncate_float",l})({});function GS(l){if(kg(l,{approx:!1}))return;if(Qs(l))return Us.truncate_integer;const c=Number.parseFloat(l);return Number.isFinite(c)?c===0?Us.underflow:Us.truncate_float:Us.overflow}function wf(l){const{start:c,end:e}=qS(l),u=l.substring(c,e),$=u.indexOf(".");return $===-1?u:u.substring(0,$)+u.substring($+1)}function qS(l){let c=0;for(l[0]==="-"&&c++;l[c]==="0"||l[c]===".";)c++;let e=l.lastIndexOf("e");for(e===-1&&(e=l.lastIndexOf("E")),e===-1&&(e=l.length);(l[e-1]==="0"||l[e-1]===".")&&e>c;)e--;return{start:c,end:e}}class YS{isLosslessNumber=!0;constructor(c){if(!Cg(c))throw new Error(`Invalid number (value: "${c}")`);this.value=c}valueOf(){const c=GS(this.value);if(c===void 0||c===Us.truncate_float)return Number.parseFloat(this.value);if(Qs(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${c} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function QS(l){return l&&typeof l=="object"&&l.isLosslessNumber||!1}function ZS(l){return new YS(l)}function JS(l,c){return Nu({"":l},"",l,c)}function Nu(l,c,e,u){return Array.isArray(e)?u.call(l,c,eC(e,u)):e&&typeof e=="object"&&!QS(e)?u.call(l,c,XS(e,u)):u.call(l,c,e)}function XS(l,c){for(const e of Object.keys(l)){const u=Nu(l,e,l[e],c);u!==void 0?l[e]=u:delete l[e]}return l}function eC(l,c){for(let e=0;e<l.length;e++)l[e]=Nu(l,String(e),l[e],c);return l}function tC(l,c,e){const u=typeof e=="function"?{parseNumber:e}:e,$=u?.parseNumber??ZS,b=u?.onDuplicateKey??R;let v=0;const x=s();return m(x),L(),c?JS(x,c):x;function f(){if(l.charCodeAt(v)===aC){v++,a();const W={};let V=!0;for(;v<l.length&&l.charCodeAt(v)!==xf;){V?V=!1:(i(),a());const G=v,Q=r();if(Q===void 0){w();return}a(),h();const te=s();if(te===void 0){F();return}if(Object.prototype.hasOwnProperty.call(W,Q)&&!vu(te,W[Q])){const ce=b({key:Q,position:G+1,oldValue:W[Q],newValue:te});ce!==void 0&&(W[Q]=ce)}else W[Q]=te}return l.charCodeAt(v)!==xf&&D(),v++,W}}function p(){if(l.charCodeAt(v)===lC){v++,a();const W=[];let V=!0;for(;v<l.length&&l.charCodeAt(v)!==Sf;){V?V=!1:i();const G=s();y(G),W.push(G)}return l.charCodeAt(v)!==Sf&&I(),v++,W}}function s(){a();const W=r()??n()??f()??p()??o("true",!0)??o("false",!1)??o("null",null);return a(),W}function o(W,V){if(l.slice(v,v+W.length)===W)return v+=W.length,V}function a(){for(;nC(l.charCodeAt(v));)v++}function r(){if(l.charCodeAt(v)===Sc){v++;let W="";for(;v<l.length&&l.charCodeAt(v)!==Sc;){if(l.charCodeAt(v)===sC){const V=l[v+1],G=oC[V];G!==void 0?(W+=G,v++):V==="u"?Ha(l.charCodeAt(v+2))&&Ha(l.charCodeAt(v+3))&&Ha(l.charCodeAt(v+4))&&Ha(l.charCodeAt(v+5))?(W+=String.fromCharCode(Number.parseInt(l.slice(v+2,v+6),16)),v+=5):O(v):z(v)}else rC(l.charCodeAt(v))?W+=l[v]:E(l[v]);v++}return k(),v++,W}}function n(){const W=v;if(l.charCodeAt(v)===Cf&&(v++,T(W)),l.charCodeAt(v)===Du)v++;else if(iC(l.charCodeAt(v)))for(v++;za(l.charCodeAt(v));)v++;if(l.charCodeAt(v)===mC)for(v++,T(W);za(l.charCodeAt(v));)v++;if(l.charCodeAt(v)===xC||l.charCodeAt(v)===bC)for(v++,(l.charCodeAt(v)===Cf||l.charCodeAt(v)===fC)&&v++,T(W);za(l.charCodeAt(v));)v++;if(v>W)return $(l.slice(W,v))}function i(){if(l.charCodeAt(v)!==gC)throw new SyntaxError(`Comma ',' expected after value ${N()}`);v++}function h(){if(l.charCodeAt(v)!==vC)throw new SyntaxError(`Colon ':' expected after property name ${N()}`);v++}function m(W){if(W===void 0)throw new SyntaxError(`JSON value expected ${N()}`)}function y(W){if(W===void 0)throw new SyntaxError(`Array item expected ${N()}`)}function L(){if(v<l.length)throw new SyntaxError(`Expected end of input ${N()}`)}function T(W){if(!za(l.charCodeAt(v))){const V=l.slice(W,v);throw new SyntaxError(`Invalid number '${V}', expecting a digit ${N()}`)}}function k(){if(l.charCodeAt(v)!==Sc)throw new SyntaxError(`End of string '"' expected ${N()}`)}function w(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function R(W){let{key:V,position:G}=W;throw new SyntaxError(`Duplicate key '${V}' encountered at position ${G}`)}function D(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${N()}`)}function I(){throw new SyntaxError(`Array item or end of array ']' expected ${N()}`)}function E(W){throw new SyntaxError(`Invalid character '${W}' ${_()}`)}function z(W){const V=l.slice(W,W+2);throw new SyntaxError(`Invalid escape character '${V}' ${_()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${_()}`)}function O(W){const V=l.slice(W,W+6);throw new SyntaxError(`Invalid unicode character '${V}' ${_()}`)}function _(){return`at position ${v}`}function S(){return v<l.length?`but got '${l[v]}'`:"but reached end of input"}function N(){return`${S()} ${_()}`}}function nC(l){return l===cC||l===uC||l===hC||l===dC}function Ha(l){return l>=Du&&l<=Fu||l>=yC&&l<=SC||l>=wC&&l<=CC}function za(l){return l>=Du&&l<=Fu}function iC(l){return l>=pC&&l<=Fu}function rC(l){return l>=32&&l<=1114111}function vu(l,c){return l===c?!0:Array.isArray(l)&&Array.isArray(c)?l.length===c.length&&l.every((e,u)=>vu(e,c[u])):bf(l)&&bf(c)?[...new Set([...Object.keys(l),...Object.keys(c)])].every(e=>vu(l[e],c[e])):!1}function bf(l){return typeof l=="object"&&l!==null}const oC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1394
- `,r:"\r",t:" "},sC=92,aC=123,xf=125,lC=91,Sf=93,cC=32,uC=10,hC=9,dC=13,Sc=34,fC=43,Cf=45,Du=48,pC=49,Fu=57,gC=44,mC=46,vC=58,yC=65,wC=97,bC=69,xC=101,SC=70,CC=102;function _g(l,c,e,u){return b(l);function b(p,s){if(Array.isArray(u)){const o=u.find(a=>a.test(p));if(o){const a=o.stringify(p);if(typeof a!="string"||!Cg(a))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${a})`);return a}}if(typeof p=="boolean"||typeof p=="number"||typeof p=="string"||p===null||p instanceof Date||p instanceof Boolean||p instanceof Number||p instanceof String)return JSON.stringify(p);if(p?.isLosslessNumber||typeof p=="bigint")return p.toString();if(Array.isArray(p))return v(p);if(p&&typeof p=="object")return x(p)}function v(p,s){if(p.length===0)return"[]";let o="[";for(let a=0;a<p.length;a++){const r=p[a];typeof r<"u"&&typeof r!="function"?o+=b(r):o+="null",a<p.length-1&&(o+=",")}return o+="]",o}function x(p,s){if(typeof p.toJSON=="function")return _g(p.toJSON(),c,e,void 0);const o=Array.isArray(c)?c.map(String):Object.keys(p);if(o.length===0)return"{}";let a=!0,r="{";for(const n of o){const i=p[n];if(f(n,i)){a?a=!1:r+=",";const h=JSON.stringify(n);r+=`${h}:`,r+=b(i)}}return r+="}",r}function f(p,s){return typeof s<"u"&&typeof s!="function"&&typeof s!="symbol"}}function kC(l){return Qs(l)&&!kg(l)?BigInt(l):parseFloat(l)}class _C{id=1;constructor(){}async exec(c,e,u={},$={},b=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return u.scope=window.openc3Scope,$.manual=!0,(await Iu.post("/openc3-api/api",{jsonrpc:"2.0",method:c,params:e,id:this.id,keyword_params:u},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...$},timeout:b,transformRequest:[(v,x)=>_g(v)],transformResponse:[v=>{try{return tC(v,void 0,kC)}catch{const x=typeof v=="string"?v.substring(0,200):String(v),f=new Error(`Server returned non-JSON response: ${x}`);throw f.name="ServerError",f}}]})).data.result}catch(v){let x=new Error;throw v.response?(x.name=v.response.data.error.data.class,x.message=v.response.data.error.data.message,x.object=v.response.data.error):v.request?(x.name="Request error",x.message="Request error, no response received"):x=v,x}}decode_openc3_type(c){if(c!==null&&typeof c=="object"&&c.json_class=="Float"&&c.raw){if(c.raw=="NaN")return NaN;if(c.raw=="Infinity")return 1/0;if(c.raw=="-Infinity")return-1/0}return null}encode_openc3_type(c){return Number.isNaN(c)?{json_class:"Float",raw:"NaN"}:c==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:c==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(c=>{c&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(c){return this.exec("set_offline_access",[c])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(c,e,u,$,b){return this.exec("map_target_to_interface",[c,e],{cmd_only:u,tlm_only:$,unmap_old:b})}unmap_target_from_interface(c,e,u,$){return this.exec("unmap_target_from_interface",[c,e],{cmd_only:u,tlm_only:$})}connect_interface(c,...e){return e.length>0?this.exec("connect_interface",[c,...e]):this.exec("connect_interface",[c])}disconnect_interface(c){return this.exec("disconnect_interface",[c])}interface_cmd(c,e,...u){return this.exec("interface_cmd",[c,e,...u])}interface_target_enable(c,e,u=!1,$=!1){return this.exec("interface_target_enable",[c,e],{cmd_only:u,tlm_only:$})}interface_target_disable(c,e,u=!1,$=!1){return this.exec("interface_target_disable",[c,e],{cmd_only:u,tlm_only:$})}interface_details(c){return this.exec("interface_details",[c])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(c,e,u,$,b){return this.exec("map_target_to_router",[c,e],{cmd_only:u,tlm_only:$,unmap_old:b})}unmap_target_from_router(c,e,u,$){return this.exec("unmap_target_from_router",[c,e],{cmd_only:u,tlm_only:$})}connect_router(c){return this.exec("connect_router",[c])}disconnect_router(c){return this.exec("disconnect_router",[c])}router_target_enable(c,e,u=!1,$=!1){return this.exec("router_target_enable",[c,e],{cmd_only:u,tlm_only:$})}router_target_disable(c,e,u=!1,$=!1){return this.exec("router_target_disable",[c,e],{cmd_only:u,tlm_only:$})}router_details(c){return this.exec("router_details",[c])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(c){return this.exec("get_tlm_cnts",[c])}get_item(c,e,u){return this.exec("get_item",[c,e,u])}get_param(c,e,u){return this.exec("get_param",[c,e,u])}get_parameter(c,e,u){return this.exec("get_param",[c,e,u])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(c){return this.exec("set_limits_set",[c])}get_target(c){return this.exec("get_target",[c])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(c,e){return this.exec("get_tlm",[c,e])}get_telemetry(c,e){return this.exec("get_tlm",[c,e])}get_all_tlm(c){return this.exec("get_all_tlm",[c])}get_all_telemetry(c){return this.exec("get_all_tlm",[c])}get_all_tlm_names(c,e=!1){return this.exec("get_all_tlm_names",[c],{hidden:e})}get_all_telemetry_names(c){return this.exec("get_all_tlm_names",[c])}get_all_tlm_item_names(c){return this.exec("get_all_tlm_item_names",[c])}async get_tlm_packet(c,e,u,$=30){const b=await this.exec("get_tlm_packet",[c,e],{type:u,stale_time:$});if(b!=null){let v=b.length,x=null;for(let f=0;f<v;f++)x=this.decode_openc3_type(b[f][1]),x!==null&&(b[f][1]=x)}return b}get_packet_derived_items(c,e){return this.exec("get_packet_derived_items",[c,e])}get_tlm_buffer(c,e){return this.exec("get_tlm_buffer",[c,e])}get_tlm_available(c){return this.exec("get_tlm_available",[c])}async get_tlm_values(c,e=30,u=null,$=null,b=null){let v={stale_time:e};u!==null&&(v.cache_timeout=u),$!==null&&(v.start_time=$.toISOString()),b!==null&&(v.end_time=b.toISOString());const x=await this.exec("get_tlm_values",[c],v,{},1e4);if(x&&x.length>0){let f=x.length,p=null;for(let s=0;s<f;s++)p=this.decode_openc3_type(x[s][0]),p!==null&&(x[s][0]=p)}return x}get_limits(c,e,u){return this.exec("get_limits",[c,e,u])}async tlm(c,e,u,$="CONVERTED"){let b=null;if(e===void 0)b=await this.exec("tlm",[c]);else if(u===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(e))b=await this.exec("tlm",[c],{type:e});else{let x=new Error;throw x.name="TypeError",x.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED or FORMATTED.`,x}else b=await this.exec("tlm",[c,e,u],{type:$});let v=this.decode_openc3_type(b);return v!==null&&(b=v),b}async inject_tlm(c,e,u=null,$="CONVERTED"){await this.exec("inject_tlm",[c,e,u],{type:$})}set_tlm(c,e,u,$){return this.exec("set_tlm",[c,e,u],{type:$})}override_tlm(c,e,u,$){return this.exec("override_tlm",[c,e,u],{type:$})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(c,e,u,$){return this.exec("normalize_tlm",[c,e,u],{type:$})}get_all_cmds(c){return this.exec("get_all_cmds",[c])}get_all_commands(c){return this.exec("get_all_cmds",[c])}get_all_cmd_names(c,e=!1){return this.exec("get_all_cmd_names",[c],{hidden:e})}get_all_command_names(c){return this.exec("get_all_cmd_names",[c])}get_cmd(c,e){return this.exec("get_cmd",[c,e])}get_command(c,e){return this.exec("get_cmd",[c,e])}get_cmd_cnts(c){return this.exec("get_cmd_cnts",[c])}get_cmd_value(c,e,u,$="CONVERTED"){return this.exec("get_cmd_value",[c,e,u,$])}get_cmd_buffer(c,e){return this.exec("get_cmd_buffer",[c,e])}_cmd(c,e,u,$,b,v={}){let x=null;for(let f in $)Object.prototype.hasOwnProperty.call($,f)&&(x=this.encode_openc3_type($[f]),x!==null&&($[f]=x));return this.exec(c,[e,u,$],v,b)}get_cmd_hazardous(c,e,u,$={}){return e===void 0?this.exec("get_cmd_hazardous",c,{},$):this._cmd("get_cmd_hazardous",c,e,u,$)}cmd(c,e,u,$={},b={}){return e===void 0?this.exec("cmd",c,b,$):this._cmd("cmd",c,e,u,$,b)}cmd_no_range_check(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_no_range_check",c,b,$):this._cmd("cmd_no_range_check",c,e,u,$,b)}cmd_raw(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_raw",c,b,$):this._cmd("cmd_raw",c,e,u,$,b)}cmd_raw_no_range_check(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_raw_no_range_check",c,b,$):this._cmd("cmd_raw_no_range_check",c,e,u,$,b)}cmd_no_hazardous_check(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_no_hazardous_check",c,b,$):this._cmd("cmd_no_hazardous_check",c,e,u,$,b)}cmd_no_checks(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_no_checks",c,b,$):this._cmd("cmd_no_checks",c,e,u,$,b)}cmd_raw_no_hazardous_check(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",c,b,$):this._cmd("cmd_raw_no_hazardous_check",c,e,u,$,b)}cmd_raw_no_checks(c,e,u,$={},b={}){return e===void 0?this.exec("cmd_raw_no_checks",c,b,$):this._cmd("cmd_raw_no_checks",c,e,u,$,b)}build_cmd(c,e,u,$={},b={}){return e===void 0?this.exec("build_cmd",c,b,$):this._cmd("build_cmd",c,e,u,$,b)}build_command(c,e,u,$={},b={}){return e===void 0?this.exec("build_cmd",c,b,$):this._cmd("build_cmd",c,e,u,$,b)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(c,e){return this.exec("send_raw",[c,e])}list_configs(c){return this.exec("list_configs",[c])}load_config(c,e){return this.exec("load_config",[c,e])}save_config(c,e,u){return this.exec("save_config",[c,e,u])}delete_config(c,e){return this.exec("delete_config",[c,e])}enable_limits(c,e,u){return this.exec("enable_limits",[c,e,u])}disable_limits(c,e,u){return this.exec("disable_limits",[c,e,u])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(c){return this.exec("get_overall_limits_state",[c])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(c,e){return this.exec("get_setting",[c],e)}get_settings(c,e){return this.exec("get_settings",c,e)}set_setting(c,e){return this.exec("set_setting",[c,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(c,e){return this.exec("set_setting",[c,e])}get_metrics(){return this.exec("get_metrics",[])}open_tab(c){window.open(c,"_blank")}async hashString(c){if(window.isSecureContext){const e=new TextEncoder().encode(c),u=await crypto.subtle.digest("SHA-256",e),$=new Uint8Array(u);return Array.from($).map(b=>b.toString(16).padStart(2,"0")).join("")}}}var Cc={exports:{}},kf;function AC(){return kf||(kf=1,(function(l,c){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,u,$){function b(p,s){function o(I,E,z){if(!(I.length<E)){var F=I.slice(0,E),O=I.slice(E),_=/^(?:(\s+)|(\S+)(\s+))/.exec(O),S=/(?:(\s+)|(\s+)(\S+))$/.exec(F),N=0,W=0;if(S&&!S[2]&&(N=E-S[1].length,W=E),_&&!_[2]&&(N||(N=E),W=E+_[1].length),N)return{start:N,end:W};if(S&&S[2]&&S.index>z)return{start:S.index,end:S.index+S[2].length};if(_&&_[2])return N=E+_[2].length,{start:N,end:N+_[3].length}}}for(var a=s.column||p.getOption("printMarginColumn"),r=s.allowMerge!=0,n=Math.min(s.startRow,s.endRow),i=Math.max(s.startRow,s.endRow),h=p.session;n<=i;){var m=h.getLine(n);if(m.length>a){var y=o(m,a,5);if(y){var L=/^\s*/.exec(m)[0];h.replace(new x(n,y.start,n,y.end),`
1395
- `+L)}i++}else if(r&&/\S/.test(m)&&n!=i){var T=h.getLine(n+1);if(T&&/\S/.test(T)){var k=m.replace(/\s+$/,""),w=T.replace(/^\s+/,""),R=k+" "+w,y=o(R,a,5);if(y&&y.start>k.length||R.length<a){var D=new x(n,k.length,n+1,T.length-w.length);h.replace(D," "),n--,i--}else k.length<m.length&&h.remove(new x(n,k.length,n,m.length))}}n++}}function v(p){if(p.command.name=="insertstring"&&/\S/.test(p.args)){var s=p.editor,o=s.selection.cursor;if(o.column<=s.renderer.$printMarginColumn)return;var a=s.session.$undoManager.$lastDelta;b(s,{startRow:o.row,endRow:o.row,allowMerge:!1}),a!=s.session.$undoManager.$lastDelta&&s.session.markUndoGroup()}}var x=e("../range").Range,f=e("../editor").Editor;e("../config").defineOptions(f.prototype,"editor",{hardWrap:{set:function(p){p?this.commands.on("afterExec",v):this.commands.off("afterExec",v)},value:!1}}),u.hardWrap=b}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,u,$){function b(g){return{row:g.line,column:g.ch}}function v(g){return new Ie(g.row,g.column)}function x(g,A,C){if(A.line===C.line&&A.ch>=C.ch-1){var P=g.getLine(A.line),B=P.charCodeAt(A.ch);55296<=B&&B<=55551&&(C.ch+=1)}return{start:A,end:C}}function f(g){g.setOption("disableInput",!0),g.setOption("showCursorWhenSelecting",!1),De.signal(g,"vim-mode-change",{mode:"normal"}),g.on("cursorActivity",eo),R(g),De.on(g.getInputField(),"paste",s(g))}function p(g){g.setOption("disableInput",!1),g.off("cursorActivity",eo),De.off(g.getInputField(),"paste",s(g)),g.state.vim=null,Wn&&clearTimeout(Wn)}function s(g){var A=g.state.vim;return A.onPasteFn||(A.onPasteFn=function(){A.insertMode||(g.setCursor(me(g.getCursor(),0,1)),fn.enterInsertMode(g,{},A))}),A.onPasteFn}function o(g,A){return A>=g.firstLine()&&A<=g.lastLine()}function a(g){return/^[a-z]$/.test(g)}function r(g){return"()[]{}".indexOf(g)!=-1}function n(g){return Xo.test(g)}function i(g){return Dt.test(g)}function h(g){return/^\s*$/.test(g)}function m(g){return".?!".indexOf(g)!=-1}function y(g,A){for(var C=0;C<A.length;C++)if(A[C]==g)return!0;return!1}function L(g,A,C,P,B){if(A===void 0&&!B)throw Error("defaultValue is required unless callback is provided");if(C||(C="string"),At[g]={type:C,defaultValue:A,callback:B},P)for(var H=0;H<P.length;H++)At[P[H]]=At[g];A&&T(g,A)}function T(g,A,C,P){var B=At[g];P=P||{};var H=P.scope;if(!B)return new Error("Unknown option: "+g);if(B.type=="boolean"){if(A&&A!==!0)return new Error("Invalid argument: "+g+"="+A);A!==!1&&(A=!0)}B.callback?(H!=="local"&&B.callback(A,void 0),H!=="global"&&C&&B.callback(A,C)):(H!=="local"&&(B.value=B.type=="boolean"?!!A:A),H!=="global"&&C&&(C.state.vim.options[g]={value:A}))}function k(g,A,C){var P=At[g];C=C||{};var B=C.scope;if(!P)return new Error("Unknown option: "+g);if(P.callback){var H=A&&P.callback(void 0,A);return B!=="global"&&H!==void 0?H:B!=="local"?P.callback():void 0}var H=B!=="global"&&A&&A.state.vim.options[g];return(H||B!=="local"&&P||{}).value}function w(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=hn()}function R(g){return g.state.vim||(g.state.vim={inputState:new _,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),g.state.vim}function D(){Pe={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Hi(),macroModeState:new w,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new G({}),searchHistoryController:new Q,exCommandHistoryController:new Q};for(var g in At){var A=At[g];A.value=A.defaultValue}}function I(g){function A(Y){typeof Y=="string"?Xt.value=Y:Xt=null}if(g[0]=="<"){var C=g.toLowerCase().slice(1,-1),P=C.split("-");if(C=P.pop()||"",C=="lt")g="<";else if(C=="space")g=" ";else if(C=="cr")g=`
1396
- `;else if(zi[C]){var B=Xt.value,H={key:zi[C],target:{value:B,selectionEnd:B.length,selectionStart:B.length}};Xt.onKeyDown&&Xt.onKeyDown(H,Xt.value,A),Xt&&Xt.onKeyUp&&Xt.onKeyUp(H,Xt.value,A);return}}if(g==`
1397
- `){var K=Xt;Xt=null,K.onClose&&K.onClose(K.value)}else Xt.value=(Xt.value||"")+g}function E(g,A,C){var P=Vt;if(C){if(si.indexOf(C)!=-1)return;si.push(C),Vt=C.noremap!=0}try{for(var B=R(g),H=/<(?:[CSMA]-)*\w+>|./gi,K;K=H.exec(A);){var Y=K[0],J=B.insertMode;if(Xt){I(Y);continue}var ie=ct.handleKey(g,Y,"mapping");if(!ie&&J&&B.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ye=se.split("-");if(se=ye.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
1398
- `;else{if(zi.hasOwnProperty(se)){Y=zi[se],no(g,Y);continue}Y=Y[0],H.lastIndex=K.index+1}}g.replaceSelection(Y)}}}finally{if(si.pop(),Vt=si.length?P:!1,!si.length&&Xt){var Se=Xt;Xt=null,Zn(g,Se)}}}function z(g,A){var C=g.key;if(!ai[C]){C.length>1&&C[0]=="n"&&(C=C.replace("Numpad","")),C=An[C]||C;var P="";if(g.ctrlKey&&(P+="C-"),g.altKey&&(P+="A-"),g.metaKey&&(P+="M-"),De.isMac&&g.altKey&&!g.metaKey&&!g.ctrlKey&&(P=P.slice(2)),(P||C.length>1)&&g.shiftKey&&(P+="S-"),A&&!A.expectLiteralNext&&C.length==1){if(bn.keymap&&C in bn.keymap)(bn.remapCtrl!=0||!P)&&(C=bn.keymap[C]);else if(C.charCodeAt(0)>255){var B=g.code&&g.code.slice(-1)||"";g.shiftKey||(B=B.toLowerCase()),B&&(C=B)}}return P+=C,P.length>1&&(P="<"+P+">"),P}}function F(g,A){bn.string!==g&&(bn=O(g)),bn.remapCtrl=A}function O(g){function A(P){return P.split(/\\?(.)/).filter(Boolean)}var C={};return g?(g.split(/((?:[^\\,]|\\.)+),/).map(function(P){if(P){var B=P.split(/((?:[^\\;]|\\.)+);/);if(B.length==3){var H=A(B[1]),K=A(B[2]);if(H.length!==K.length)return;for(var Y=0;Y<H.length;++Y)C[H[Y]]=K[Y]}else if(B.length==1){var J=A(P);if(J.length%2!==0)return;for(var Y=0;Y<J.length;Y+=2)C[J[Y]]=J[Y+1]}}}),{keymap:C,string:g}):{keymap:C,string:""}}function _(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function S(g,A){g.state.vim.inputState=new _,g.state.vim.expectLiteralNext=!1,De.signal(g,"vim-command-done",A)}function N(){this.removed=[],this.inserted=""}function W(g,A,C){this.clear(),this.keyBuffer=[g||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!A,this.blockwise=!!C}function V(g,A){var C=Pe.registerController.registers;if(!g||g.length!=1)throw Error("Register name must be 1 character");C[g]=A,Nt.push(g)}function G(g){this.registers=g,this.unnamedRegister=g['"']=new W,g["."]=new W,g[":"]=new W,g["/"]=new W,g["+"]=new W}function Q(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(g,A){gi[g]=A}function ce(g,A){for(var C=[],P=0;P<A;P++)C.push(g);return C}function ne(g,A){so[g]=A}function he(g,A){fn[g]=A}function ue(g,A,C){var P=g.state.vim,B=P.insertMode||P.visualMode,H=Math.min(Math.max(g.firstLine(),A.line),g.lastLine()),K=g.getLine(H),Y=K.length-1+ +!!B,J=Math.min(Math.max(0,A.ch),Y),ie=K.charCodeAt(J);if(56320<=ie&&ie<=57343){var se=1;C&&C.line==H&&C.ch>J&&(se=-1),J+=se,J>Y&&(J-=2)}return new Ie(H,J)}function le(g){var A={};for(var C in g)g.hasOwnProperty(C)&&(A[C]=g[C]);return A}function me(g,A,C){return typeof A=="object"&&(C=A.ch,A=A.line),new Ie(g.line+A,g.ch+C)}function _e(g,A,C,P){P.operator&&(C="operatorPending");for(var B,H=[],K=[],Y=Vt?A.length-Nr:0,J=Y;J<A.length;J++){var ie=A[J];C=="insert"&&ie.context!="insert"||ie.context&&ie.context!=C||P.operator&&ie.type=="action"||!(B=Ae(g,ie.keys))||(B=="partial"&&H.push(ie),B=="full"&&K.push(ie))}return{partial:H.length&&H,full:K.length&&K}}function Ae(g,A){var C=A.slice(-11)=="<character>",P=A.slice(-10)=="<register>";if(C||P){var B=A.length-(C?11:10),H=g.slice(0,B),K=A.slice(0,B);return H==K&&g.length>B?"full":K.indexOf(H)==0?"partial":!1}return g==A?"full":A.indexOf(g)==0?"partial":!1}function Me(g){var A=/^.*(<[^>]+>)$/.exec(g),C=A?A[1]:g.slice(-1);if(C.length>1)switch(C){case"<CR>":C=`
1399
- `;break;case"<Space>":C=" ";break;default:C=""}return C}function qe(g,A,C){return function(){for(var P=0;P<C;P++)A(g)}}function Ve(g){return new Ie(g.line,g.ch)}function ot(g,A){return g.ch==A.ch&&g.line==A.line}function Je(g,A){return g.line<A.line?!0:g.line==A.line&&g.ch<A.ch}function lt(g,A){return arguments.length>2&&(A=lt.apply(void 0,Array.prototype.slice.call(arguments,1))),Je(g,A)?g:A}function zt(g,A){return arguments.length>2&&(A=zt.apply(void 0,Array.prototype.slice.call(arguments,1))),Je(g,A)?A:g}function vn(g,A,C){var P=Je(g,A),B=Je(A,C);return P&&B}function Pt(g,A){return g.getLine(A).length}function Si(g){return g.trim?g.trim():g.replace(/^\s+|\s+$/g,"")}function on(g){return g.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function kn(g,A,C){var P=Pt(g,A),B=new Array(C-P+1).join(" ");g.setCursor(new Ie(A,P)),g.replaceRange(B,g.getCursor())}function Fn(g,A){var C=[],P=g.listSelections(),B=Ve(g.clipPos(A)),H=!ot(A,B),K=g.getCursor("head"),Y=ft(P,K),J=ot(P[Y].head,P[Y].anchor),ie=P.length-1,se=ie-Y>Y?ie:0,ye=P[se].anchor,Se=Math.min(ye.line,B.line),de=Math.max(ye.line,B.line),we=ye.ch,Re=B.ch,Le=P[se].head.ch-we,Be=Re-we;Le>0&&Be<=0?(we++,H||Re--):Le<0&&Be>=0?(we--,J||Re++):Le<0&&Be==-1&&(we--,Re++);for(var Xe=Se;Xe<=de;Xe++){var Qe={anchor:new Ie(Xe,we),head:new Ie(Xe,Re)};C.push(Qe)}return g.setSelections(C),A.ch=Re,ye.ch=we,ye}function ri(g,A,C){for(var P=[],B=0;B<C;B++){var H=me(A,B,0);P.push({anchor:H,head:H})}g.setSelections(P,0)}function ft(g,A,C){for(var P=0;P<g.length;P++){var B=ot(g[P].anchor,A),H=ot(g[P].head,A);if(B||H)return P}return-1}function ze(g,A){var C=A.lastSelection,P=function(){var H=g.listSelections(),K=H[0],Y=H[H.length-1],J=Je(K.anchor,K.head)?K.anchor:K.head,ie=Je(Y.anchor,Y.head)?Y.head:Y.anchor;return[J,ie]},B=function(){var H=g.getCursor(),K=g.getCursor(),Y=C.visualBlock;if(Y){var J=Y.width,ie=Y.height;K=new Ie(H.line+ie,H.ch+J);for(var se=[],ye=H.line;ye<K.line;ye++){var Se=new Ie(ye,H.ch),de=new Ie(ye,K.ch),we={anchor:Se,head:de};se.push(we)}g.setSelections(se)}else{var Re=C.anchorMark.find(),Le=C.headMark.find(),Be=Le.line-Re.line,Xe=Le.ch-Re.ch;K={line:K.line+Be,ch:Be?K.ch:Xe+K.ch},C.visualLine&&(H=new Ie(H.line,0),K=new Ie(K.line,Pt(g,K.line))),g.setSelection(H,K)}return[H,K]};return A.visualMode?P():B()}function Ot(g,A){var C=A.sel.anchor,P=A.sel.head;A.lastPastedText&&(P=g.posFromIndex(g.indexFromPos(C)+A.lastPastedText.length),A.lastPastedText=null),A.lastSelection={anchorMark:g.setBookmark(C),headMark:g.setBookmark(P),anchor:Ve(C),head:Ve(P),visualMode:A.visualMode,visualLine:A.visualLine,visualBlock:A.visualBlock}}function Gt(g,A,C,P){var B=g.state.vim.sel,H=P?A:B.head,K=P?A:B.anchor,Y;return Je(C,A)&&(Y=C,C=A,A=Y),Je(H,K)?(H=lt(A,H),K=zt(K,C)):(K=lt(A,K),H=zt(H,C),H=me(H,0,-1),H.ch==-1&&H.line!=g.firstLine()&&(H=new Ie(H.line-1,Pt(g,H.line-1)))),[K,H]}function _n(g,A,B){var P=g.state.vim;A=A||P.sel;var B=B||P.visualLine?"line":P.visualBlock?"block":"char",H=oi(g,A,B);g.setSelections(H.ranges,H.primary)}function oi(g,A,C,P){var B=Ve(A.head),H=Ve(A.anchor);if(C=="char"){var K=!P&&!Je(A.head,A.anchor)?1:0,Y=Je(A.head,A.anchor)?1:0;return B=me(A.head,0,K),H=me(A.anchor,0,Y),{ranges:[{anchor:H,head:B}],primary:0}}if(C=="line"){if(Je(A.head,A.anchor))B.ch=0,H.ch=Pt(g,H.line);else{H.ch=0;var J=g.lastLine();B.line>J&&(B.line=J),B.ch=Pt(g,B.line)}return{ranges:[{anchor:H,head:B}],primary:0}}if(C=="block"){var ie=Math.min(H.line,B.line),se=H.ch,ye=Math.max(H.line,B.line),Se=B.ch;se<Se?Se+=1:se+=1;for(var de=ye-ie+1,we=B.line==ie?0:de-1,Re=[],Le=0;Le<de;Le++)Re.push({anchor:new Ie(ie+Le,se),head:new Ie(ie+Le,Se)});return{ranges:Re,primary:we}}}function qn(g){var A=g.getCursor("head");return g.getSelection().length==1&&(A=lt(A,g.getCursor("anchor"))),A}function sn(g,A){var C=g.state.vim;A!==!1&&g.setCursor(ue(g,C.sel.head)),Ot(g,C),C.visualMode=!1,C.visualLine=!1,C.visualBlock=!1,C.insertMode||De.signal(g,"vim-mode-change",{mode:"normal"})}function Tn(g,A,C){var P=g.getRange(A,C);if(/\n\s*$/.test(P)){var B=P.split(`
1400
- `);B.pop();for(var H,H=B.pop();B.length>0&&H&&h(H);H=B.pop())C.line--,C.ch=0;H?(C.line--,C.ch=Pt(g,C.line)):C.ch=0}}function Pn(g,A,C){A.ch=0,C.ch=0,C.line++}function Ut(g){if(!g)return 0;var A=g.search(/\S/);return A==-1?g.length:A}function Ln(g,A,C){var P=A.inclusive,B=A.innerWord,H=A.bigWord,K=A.noSymbol,Y=A.multiline,J=C||qn(g),ie=g.getLine(J.line),se=ie,ye=J.line,Se=ye,de=J.ch,we,Re=K?Dr[0]:Wi[0];if(B&&/\s/.test(ie.charAt(de)))Re=function(jt){return/\s/.test(jt)};else{for(;!Re(ie.charAt(de));)if(de++,de>=ie.length){if(!Y)return null;de--,we=$r(g,J,!0,H,!0);break}H?Re=Wi[0]:(Re=Dr[0],Re(ie.charAt(de))||(Re=Dr[1]))}for(var Le=de,Be=de;Re(ie.charAt(Be))&&Be>=0;)Be--;if(Be++,we)Le=we.to,Se=we.line,se=g.getLine(Se),!se&&Le==0&&Le++;else for(;Re(ie.charAt(Le))&&Le<ie.length;)Le++;if(P){var Xe=Le,Qe=J.ch<=Be&&/\s/.test(ie.charAt(J.ch));if(!Qe)for(;/\s/.test(se.charAt(Le))&&Le<se.length;)Le++;if(Xe==Le||Qe){for(var Ke=Be;/\s/.test(ie.charAt(Be-1))&&Be>0;)Be--;!Be&&!Qe&&(Be=Ke)}}return{start:new Ie(ye,Be),end:new Ie(Se,Le)}}function Ar(g,A,C){var P=A;if(!De.findMatchingTag||!De.findEnclosingTag)return{start:P,end:P};var B=De.findMatchingTag(g,A)||De.findEnclosingTag(g,A);return!B||!B.open||!B.close?{start:P,end:P}:C?{start:B.open.from,end:B.close.to}:{start:B.open.to,end:B.close.from}}function Xi(g,A,C){ot(A,C)||Pe.jumpList.add(g,A,C)}function er(g,A){Pe.lastCharacterSearch.increment=g,Pe.lastCharacterSearch.forward=A.forward,Pe.lastCharacterSearch.selectedCharacter=A.selectedCharacter}function tr(g,A,C,P){var B=Ve(g.getCursor()),H=C?1:-1,K=C?g.lineCount():-1,Y=B.ch,J=B.line,ie=g.getLine(J),se={lineText:ie,nextCh:ie.charAt(Y),lastCh:null,index:Y,symb:P,reverseSymb:(C?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:C,depth:0,curMoveThrough:!1},ye=Ai[P];if(!ye)return B;var Se=$i[ye].init,de=$i[ye].isComplete;for(Se&&Se(se);J!==K&&A;){if(se.index+=H,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(J+=H,se.lineText=g.getLine(J)||"",H>0)se.index=0;else{var we=se.lineText.length;se.index=we>0?we-1:0}se.nextCh=se.lineText.charAt(se.index)}de(se)&&(B.line=J,B.ch=se.index,A--)}return se.nextCh||se.curMoveThrough?new Ie(J,se.index):B}function $r(g,A,C,P,B){var H=A.line,K=A.ch,Y=g.getLine(H),J=C?1:-1,ie=P?Wi:Dr;if(B&&Y==""){if(H+=J,Y=g.getLine(H),!o(g,H))return null;K=C?0:Y.length}for(;;){if(B&&Y=="")return{from:0,to:0,line:H};for(var se=J>0?Y.length:-1,ye=se,Se=se;K!=se;){for(var de=!1,we=0;we<ie.length&&!de;++we)if(ie[we](Y.charAt(K))){for(ye=K;K!=se&&ie[we](Y.charAt(K));)K+=J;if(Se=K,de=ye!=Se,ye==A.ch&&H==A.line&&Se==ye+J)continue;return{from:Math.min(ye,Se+1),to:Math.max(ye,Se),line:H}}de||(K+=J)}if(H+=J,!o(g,H))return null;Y=g.getLine(H),K=J>0?0:Y.length}}function Vn(g,A,C,P,B,H){var K=Ve(A),Y=[];(P&&!B||!P&&B)&&C++;for(var J=!P||!B,ie=0;ie<C;ie++){var se=$r(g,A,P,H,J);if(!se){var ye=Pt(g,g.lastLine());Y.push(P?{line:g.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(se),A=new Ie(se.line,P?se.to-1:se.from)}var Se=Y.length!=C,de=Y[0],we=Y.pop();return P&&!B?(!Se&&(de.from!=K.ch||de.line!=K.line)&&(we=Y.pop()),new Ie(we.line,we.from)):P&&B?new Ie(we.line,we.to-1):!P&&B?(!Se&&(de.to!=K.ch||de.line!=K.line)&&(we=Y.pop()),new Ie(we.line,we.to)):new Ie(we.line,we.from)}function Mr(g,A,C,P,B){var H=A,K=new Ie(H.line+C.repeat-1,1/0),Y=g.clipPos(K);return Y.ch--,B||(P.lastHPos=1/0,P.lastHSPos=g.charCoords(Y,"div").left),K}function Yr(g,A,C,P,B){for(var H=B||g.getCursor(),K=H.ch,Y,J=0;J<A;J++){var ie=g.getLine(H.line);if(Y=Ss(K,ie,P,C),Y==-1)return null;K=Y}return new Ie(g.getCursor().line,Y)}function xs(g,A){var C=g.getCursor().line;return ue(g,new Ie(C,A-1))}function Ci(g,A,C,P){!y(C,xr)&&!Rt.test(C)||(A.marks[C]&&A.marks[C].clear(),A.marks[C]=g.setBookmark(P))}function Ss(g,A,C,P,B){var H;return P?(H=A.indexOf(C,g+1),H!=-1):(H=A.lastIndexOf(C,g-1),H!=-1),H}function vo(g,A,C,P,B){function H(Be){return!/\S/.test(g.getLine(Be))}function K(Be,Xe,Qe){return Qe?H(Be)!=H(Be+Xe):!H(Be)&&H(Be+Xe)}function Y(Be){P=P>0?1:-1;var Xe=g.ace.session.getFoldLine(Be);Xe&&Be+P>Xe.start.row&&Be+P<Xe.end.row&&(P=(P>0?Xe.end.row:Xe.start.row)-Be)}var J=A.line,ie=g.firstLine(),se=g.lastLine(),ye,Se,de=J;if(P){for(;ie<=de&&de<=se&&C>0;)Y(de),K(de,P)&&C--,de+=P;return new Ie(de,0)}var we=g.state.vim;if(we.visualLine&&K(J,1,!0)){var Re=we.sel.anchor;K(Re.line,-1,!0)&&(!B||Re.line!=J)&&(J+=1)}var Le=H(J);for(de=J;de<=se&&C;de++)K(de,1,!0)&&(!B||H(de)!=Le)&&C--;for(Se=new Ie(de,0),de>se&&!Le?Le=!0:B=!1,de=J;de>ie&&!((!B||H(de)==Le||de==J)&&K(de,-1,!0));de--);return ye=new Ie(de,0),{start:ye,end:Se}}function Ko(g,A,C,P,B){function H(ie){ie.pos+ie.dir<0||ie.pos+ie.dir>=ie.line.length?ie.line=null:ie.pos+=ie.dir}function K(ie,se,ye,Se){var de=ie.getLine(se),we={line:de,ln:se,pos:ye,dir:Se};if(we.line==="")return{ln:we.ln,pos:we.pos};var Re=we.pos;for(H(we);we.line!==null;){if(Re=we.pos,m(we.line[we.pos])){if(!B)return{ln:we.ln,pos:we.pos+1};for(H(we);we.line!==null&&h(we.line[we.pos]);)Re=we.pos,H(we);return{ln:we.ln,pos:Re+1}}H(we)}return{ln:we.ln,pos:Re+1}}function Y(ie,se,ye,Se){var de=ie.getLine(se),we={line:de,ln:se,pos:ye,dir:Se};if(we.line==="")return{ln:we.ln,pos:we.pos};var Re=we.pos;for(H(we);we.line!==null;){if(!h(we.line[we.pos])&&!m(we.line[we.pos]))Re=we.pos;else if(m(we.line[we.pos]))return B?h(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Re}:{ln:we.ln,pos:Re};H(we)}return we.line=de,B&&h(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Re}}for(var J={ln:A.line,pos:A.ch};C>0;)P<0?J=Y(g,J.ln,J.pos,P):J=K(g,J.ln,J.pos,P),C--;return new Ie(J.ln,J.pos)}function nr(g,A,C,P){function B(J,ie){if(ie.pos+ie.dir<0||ie.pos+ie.dir>=ie.line.length){if(ie.ln+=ie.dir,!o(J,ie.ln)){ie.line=null,ie.ln=null,ie.pos=null;return}ie.line=J.getLine(ie.ln),ie.pos=ie.dir>0?0:ie.line.length-1}else ie.pos+=ie.dir}function H(J,ie,se,ye){var Le=J.getLine(ie),Se=Le==="",de={line:Le,ln:ie,pos:se,dir:ye},we={ln:de.ln,pos:de.pos},Re=de.line==="";for(B(J,de);de.line!==null;){if(we.ln=de.ln,we.pos=de.pos,de.line===""&&!Re)return{ln:de.ln,pos:de.pos};if(Se&&de.line!==""&&!h(de.line[de.pos]))return{ln:de.ln,pos:de.pos};m(de.line[de.pos])&&!Se&&(de.pos===de.line.length-1||h(de.line[de.pos+1]))&&(Se=!0),B(J,de)}var Le=J.getLine(we.ln);we.pos=0;for(var Be=Le.length-1;Be>=0;--Be)if(!h(Le[Be])){we.pos=Be;break}return we}function K(J,ie,se,ye){var Re=J.getLine(ie),Se={line:Re,ln:ie,pos:se,dir:ye},de={ln:Se.ln,pos:null},we=Se.line==="";for(B(J,Se);Se.line!==null;){if(Se.line===""&&!we)return de.pos!==null?de:{ln:Se.ln,pos:Se.pos};if(!(!m(Se.line[Se.pos])||de.pos===null||Se.ln===de.ln&&Se.pos+1===de.pos))return de;Se.line!==""&&!h(Se.line[Se.pos])&&(we=!1,de={ln:Se.ln,pos:Se.pos}),B(J,Se)}var Re=J.getLine(de.ln);de.pos=0;for(var Le=0;Le<Re.length;++Le)if(!h(Re[Le])){de.pos=Le;break}return de}for(var Y={ln:A.line,pos:A.ch};C>0;)P<0?Y=K(g,Y.ln,Y.pos,P):Y=H(g,Y.ln,Y.pos,P),C--;return new Ie(Y.ln,Y.pos)}function yn(g,A,C,P){var B=A,H,K,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[C],J={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[C],ie=g.getLine(B.line).charAt(B.ch),se=ie===J?1:0;if(H=g.scanForBracket(new Ie(B.line,B.ch+se),-1,void 0,{bracketRegex:Y}),K=g.scanForBracket(new Ie(B.line,B.ch+se),1,void 0,{bracketRegex:Y}),!H||!K)return null;if(H=H.pos,K=K.pos,H.line==K.line&&H.ch>K.ch||H.line>K.line){var ye=H;H=K,K=ye}return P?K.ch+=1:H.ch+=1,{start:H,end:K}}function Yn(g,A,C,P){var B=Ve(A),H=g.getLine(B.line),K=H.split(""),Y,J,ie,se,ye=K.indexOf(C);if(B.ch<ye)B.ch=ye;else if(ye<B.ch&&K[B.ch]==C){var Se=/string/.test(g.getTokenTypeAt(me(A,0,1))),de=/string/.test(g.getTokenTypeAt(A)),we=Se&&!de;we||(J=B.ch,--B.ch)}if(K[B.ch]==C&&!J)Y=B.ch+1;else for(ie=B.ch;ie>-1&&!Y;ie--)K[ie]==C&&(Y=ie+1);if(Y&&!J)for(ie=Y,se=K.length;ie<se&&!J;ie++)K[ie]==C&&(J=ie);return!Y||!J?{start:B,end:B}:(P&&(--Y,++J),{start:new Ie(B.line,Y),end:new Ie(B.line,J)})}function ir(){}function an(g){var A=g.state.vim;return A.searchState_||(A.searchState_=new ir)}function Qn(g){return rr(g,"/")}function mr(g){return yo(g,"/")}function rr(g,A){var C=yo(g,A)||[];if(!C.length)return[];var P=[];if(C[0]===0){for(var B=0;B<C.length;B++)typeof C[B]=="number"&&P.push(g.substring(C[B]+1,C[B+1]));return P}}function yo(g,A){A||(A="/");for(var C=!1,P=[],B=0;B<g.length;B++){var H=g.charAt(B);!C&&H==A&&P.push(B),C=!C&&H=="\\"}return P}function Go(g){for(var A="|(){",C="}",P=!1,B=[],H=-1;H<g.length;H++){var K=g.charAt(H)||"",Y=g.charAt(H+1)||"",J=Y&&A.indexOf(Y)!=-1;P?((K!=="\\"||!J)&&B.push(K),P=!1):K==="\\"?(P=!0,Y&&C.indexOf(Y)!=-1&&(J=!0),(!J||Y==="\\")&&B.push(K)):(B.push(K),J&&Y!=="\\"&&B.push("\\"))}return B.join("")}function Cs(g){for(var A=!1,C=[],P=-1;P<g.length;P++){var B=g.charAt(P)||"",H=g.charAt(P+1)||"";Ui[B+H]?(C.push(Ui[B+H]),P++):A?(C.push(B),A=!1):B==="\\"?(A=!0,n(H)||H==="$"?C.push("$"):H!=="/"&&H!=="\\"&&C.push("\\")):(B==="$"&&C.push("$"),C.push(B),H==="/"&&C.push("\\"))}return C.join("")}function ks(g){for(var A=new De.StringStream(g),C=[];!A.eol();){for(;A.peek()&&A.peek()!="\\";)C.push(A.next());var P=!1;for(var B in Bn)if(A.match(B,!0)){P=!0,C.push(Bn[B]);break}P||C.push(A.next())}return C.join("")}function or(g,A,C){var P=Pe.registerController.getRegister("/");if(P.setText(g),g instanceof RegExp)return g;var B=mr(g),H,K;if(!B.length)H=g;else{H=g.substring(0,B[0]);var Y=g.substring(B[0]);K=Y.indexOf("i")!=-1}if(!H)return null;k("pcre")||(H=Go(H)),C&&(A=/^[^A-Z]*$/.test(H));var J=new RegExp(H,A||K?"im":"m");return J}function ki(g){typeof g=="string"&&(g=document.createElement(g));for(var A,C=1;C<arguments.length;C++)if(A=arguments[C])if(typeof A!="object"&&(A=document.createTextNode(A)),A.nodeType)g.appendChild(A);else for(var P in A)Object.prototype.hasOwnProperty.call(A,P)&&(P[0]==="$"?g.style[P.slice(1)]=A[P]:g.setAttribute(P,A[P]));return g}function _t(g,A){var C=ki("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},A);g.openNotification?g.openNotification(C,{bottom:!0,duration:5e3}):alert(C.innerText)}function qo(g,A){return ki("div",{$display:"flex"},ki("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},g,ki("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),A&&ki("span",{$color:"#888"},A))}function Zn(g,A){if(si.length){A.value||(A.value=""),Xt=A;return}var C=qo(A.prefix,A.desc);if(g.openDialog)g.openDialog(C,A.onClose,{onKeyDown:A.onKeyDown,onKeyUp:A.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:A.value});else{var P="";typeof A.prefix!="string"&&A.prefix&&(P+=A.prefix.textContent),A.desc&&(P+=" "+A.desc),A.onClose(prompt(P,""))}}function wn(g,A){if(g instanceof RegExp&&A instanceof RegExp){for(var C=["global","multiline","ignoreCase","source"],P=0;P<C.length;P++){var B=C[P];if(g[B]!==A[B])return!1}return!0}return!1}function Zt(g,A,C,P){if(A){var B=an(g),H=or(A,!!C,!!P);if(H)return Fi(g,H),wn(H,B.getQuery())||B.setQuery(H),H}}function un(g){if(g.source.charAt(0)=="^")var A=!0;return{token:function(C){if(A&&!C.sol()){C.skipToEnd();return}var P=C.match(g,!1);if(P)return P[0].length==0?(C.next(),"searching"):!C.sol()&&(C.backUp(1),!g.exec(C.next()+P[0]))?(C.next(),null):(C.match(g),"searching");for(;!C.eol()&&(C.next(),!C.match(g,!1)););},query:g}}function Fi(g,A){clearTimeout(Wn);var C=an(g);C.highlightTimeout=Wn,Wn=setTimeout(function(){if(g.state.vim){var P=an(g);P.highlightTimeout=null;var B=P.getOverlay();(!B||A!=B.query)&&(B&&g.removeOverlay(B),B=un(A),g.addOverlay(B),g.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(g.showMatchesOnScrollbar(A))),P.setOverlay(B))}},50)}function Jn(g,A,C,P){return P===void 0&&(P=1),g.operation(function(){for(var B=g.getCursor(),H=g.getSearchCursor(C,B),K=0;K<P;K++){var Y=H.find(A);if(K==0&&Y&&ot(H.from(),B)){var J=A?H.from():H.to();Y=H.find(A),Y&&!Y[0]&&ot(H.from(),J)&&g.getLine(J.line).length==J.ch&&(Y=H.find(A))}if(!Y&&(H=g.getSearchCursor(C,A?new Ie(g.lastLine()):new Ie(g.firstLine(),0)),!H.find(A)))return}return H.from()})}function Pi(g,A,C,P,B){return P===void 0&&(P=1),g.operation(function(){var H=g.getCursor(),K=g.getSearchCursor(C,H),Y=K.find(!A);!B.visualMode&&Y&&ot(K.from(),H)&&K.find(!A);for(var J=0;J<P;J++)if(Y=K.find(A),!Y&&(K=g.getSearchCursor(C,A?new Ie(g.lastLine()):new Ie(g.firstLine(),0)),!K.find(A)))return;return[K.from(),K.to()]})}function Qr(g){var A=an(g);A.highlightTimeout&&(clearTimeout(A.highlightTimeout),A.highlightTimeout=null),g.removeOverlay(an(g).getOverlay()),A.setOverlay(null),A.getScrollbarAnnotate()&&(A.getScrollbarAnnotate().clear(),A.setScrollbarAnnotate(null))}function wo(g,A,C){return typeof g!="number"&&(g=g.line),A instanceof Array?y(g,A):typeof C=="number"?g>=A&&g<=C:g==A}function vr(g){var A=g.ace.renderer;return{top:A.getFirstFullyVisibleRow(),bottom:A.getLastFullyVisibleRow()}}function fi(g,A,C){if(C=="'"||C=="`")return Pe.jumpList.find(g,-1)||new Ie(0,0);if(C==".")return Tr(g);var P=A.marks[C];return P&&P.find()}function Tr(g){if(g.getLastEditEnd)return g.getLastEditEnd();for(var A=g.doc.history.done,C=A.length;C--;)if(A[C].changes)return Ve(A[C].changes[0].to)}function Zr(g,A,C,P,B,H,K,Y,J){function ie(){g.operation(function(){for(;!Re;)se(),Se();de()})}function se(){var Qe=g.getRange(H.from(),H.to()),Ke=Qe.replace(K,Y),jt=H.to().line;H.replace(Ke),Be=H.to().line,B+=Be-jt,Xe=Be<jt}function ye(){var Qe=Le&&Ve(H.to()),Ke=H.findNext();return Ke&&!Ke[0]&&Qe&&ot(H.from(),Qe)&&(Ke=H.findNext()),Ke}function Se(){for(;ye()&&wo(H.from(),P,B);)if(!(!C&&H.from().line==Be&&!Xe)){g.scrollIntoView(H.from(),30),g.setSelection(H.from(),H.to()),Le=H.from(),Re=!1;return}Re=!0}function de(Qe){if(Qe&&Qe(),g.focus(),Le){g.setCursor(Le);var Ke=g.state.vim;Ke.exMode=!1,Ke.lastHPos=Ke.lastHSPos=Le.ch}J&&J()}function we(Qe,Ke,jt){De.e_stop(Qe);var tt=z(Qe);switch(tt){case"y":se(),Se();break;case"n":Se();break;case"a":var tn=J;J=void 0,g.operation(ie),J=tn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":de(jt)}return Re&&de(jt),!0}g.state.vim.exMode=!0;var Re=!1,Le,Be,Xe;if(Se(),Re){_t(g,"No matches for "+K.source);return}if(!A){ie(),J&&J();return}Zn(g,{prefix:ki("span","replace with ",ki("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function pi(g,A){var C=g.state.vim,P=Pe.macroModeState,B=Pe.registerController.getRegister("."),H=P.isPlaying,K=P.lastInsertModeChanges;H||(g.off("change",Lr),C.insertEnd&&C.insertEnd.clear(),C.insertEnd=null,De.off(g.getInputField(),"keydown",Co)),!H&&C.insertModeRepeat>1&&(Yo(g,C,C.insertModeRepeat-1,!0),C.lastEditInputState.repeatOverride=C.insertModeRepeat),delete C.insertModeRepeat,C.insertMode=!1,A||g.setCursor(g.getCursor().line,g.getCursor().ch-1),g.setOption("keyMap","vim"),g.setOption("disableInput",!0),g.toggleOverwrite(!1),B.setText(K.changes.join("")),De.signal(g,"vim-mode-change",{mode:"normal"}),P.isRecording&&En(P)}function Jr(g){ln.unshift(g)}function bo(g,A,C,P,B){var H={keys:g,type:A};H[A]=C,H[A+"Args"]=P;for(var K in B)H[K]=B[K];Jr(H)}function xo(g,A,C,P){var B=Pe.registerController.getRegister(P);if(P==":"){B.keyBuffer[0]&&Kn.processCommand(g,B.keyBuffer[0]),C.isPlaying=!1;return}var H=B.keyBuffer,K=0;C.isPlaying=!0,C.replaySearchQueries=B.searchQueries.slice(0);for(var Y=0;Y<H.length;Y++)for(var J=H[Y],ie,se;J;)if(ie=/<\w+-.+?>|<\w+>|./.exec(J),se=ie[0],J=J.substring(ie.index+se.length),ct.handleKey(g,se,"macro"),A.insertMode){var ye=B.insertModeChanges[K++].changes;Pe.macroModeState.lastInsertModeChanges.changes=ye,io(g,ye,1),pi(g)}C.isPlaying=!1}function Xr(g,A){if(!g.isPlaying){var C=g.latestRegister,P=Pe.registerController.getRegister(C);P&&P.pushText(A)}}function En(g){if(!g.isPlaying){var A=g.latestRegister,C=Pe.registerController.getRegister(A);C&&C.pushInsertModeChanges&&C.pushInsertModeChanges(g.lastInsertModeChanges)}}function So(g,A){if(!g.isPlaying){var C=g.latestRegister,P=Pe.registerController.getRegister(C);P&&P.pushSearchQuery&&P.pushSearchQuery(A)}}function Lr(g,A){var C=Pe.macroModeState,P=C.lastInsertModeChanges;if(!C.isPlaying)for(var B=g.state.vim;A;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if(A.origin=="+input"||A.origin=="paste"||A.origin===void 0){var H=g.listSelections().length;H>1&&(P.ignoreCount=H);var K=A.text.join(`
1401
- `);if(P.maybeReset&&(P.changes=[],P.maybeReset=!1),K)if(g.state.overwrite&&!/\n/.test(K))P.changes.push([K]);else{if(K.length>1){var Y=B&&B.insertEnd&&B.insertEnd.find(),J=g.getCursor();if(Y&&Y.line==J.line){var ie=Y.ch-J.ch;ie>0&&ie<K.length&&(P.changes.push([K,ie]),K="")}}K&&P.changes.push(K)}}A=A.next}}function eo(g){var A=g.state.vim;if(A.insertMode){var C=Pe.macroModeState;if(C.isPlaying)return;var P=C.lastInsertModeChanges;P.expectCursorActivityForChange?P.expectCursorActivityForChange=!1:(P.maybeReset=!0,A.insertEnd&&A.insertEnd.clear(),A.insertEnd=g.setBookmark(g.getCursor(),{insertLeft:!0}))}else g.curOp.isVimOp||to(g,A)}function to(g,A,C){var P=g.getCursor("anchor"),B=g.getCursor("head");if(A.visualMode&&!g.somethingSelected()?sn(g,!1):!A.visualMode&&!A.insertMode&&g.somethingSelected()&&(A.visualMode=!0,A.visualLine=!1,De.signal(g,"vim-mode-change",{mode:"visual"})),A.visualMode){var H=Je(B,P)?0:-1,K=Je(B,P)?-1:0;B=me(B,0,H),P=me(P,0,K),A.sel={anchor:P,head:B},Ci(g,A,"<",lt(B,P)),Ci(g,A,">",zt(B,P))}else!A.insertMode&&!C&&(A.lastHPos=g.getCursor().ch)}function yr(g,A){this.keyName=g,this.key=A.key,this.ctrlKey=A.ctrlKey,this.altKey=A.altKey,this.metaKey=A.metaKey,this.shiftKey=A.shiftKey}function Co(g){var A=Pe.macroModeState,C=A.lastInsertModeChanges,P=De.keyName?De.keyName(g):g.key;P&&(P.indexOf("Delete")!=-1||P.indexOf("Backspace")!=-1)&&(C.maybeReset&&(C.changes=[],C.maybeReset=!1),C.changes.push(new yr(P,g)))}function Yo(g,A,C,P){function B(){Y?dn.processAction(g,A,A.lastEditActionCommand):dn.evalInput(g,A)}function H(se){if(K.lastInsertModeChanges.changes.length>0){se=A.lastEditActionCommand?se:1;var ye=K.lastInsertModeChanges;io(g,ye.changes,se)}}var K=Pe.macroModeState;K.isPlaying=!0;var Y=!!A.lastEditActionCommand,J=A.inputState;if(A.inputState=A.lastEditInputState,Y&&A.lastEditActionCommand.interlaceInsertRepeat)for(var ie=0;ie<C;ie++)B(),H(1);else P||B(),H(C);A.inputState=J,A.insertMode&&!P&&pi(g),K.isPlaying=!1}function no(g,A){De.lookupKey(A,"vim-insert",function(C){return typeof C=="string"?De.commands[C](g):C(g),!0})}function io(g,A,C){var P=g.getCursor("head"),B=Pe.macroModeState.lastInsertModeChanges.visualBlock;B&&(ri(g,P,B+1),C=g.listSelections().length,g.setCursor(P));for(var H=0;H<C;H++){B&&g.setCursor(me(P,H,0));for(var K=0;K<A.length;K++){var Y=A[K];if(Y instanceof yr)no(g,Y.keyName);else if(typeof Y=="string")g.replaceSelection(Y);else{var J=g.getCursor(),ie=me(J,0,Y[0].length-(Y[1]||0));g.replaceRange(Y[0],J,Y[1]?J:ie),g.setCursor(ie)}}}B&&g.setCursor(me(P,0,1))}function ko(g,A,C,P){A.length>1&&A[0]=="n"&&(A=A.replace("numpad","")),A=Xn[A]||A;var B="";if(C.ctrlKey&&(B+="C-"),C.altKey&&(B+="A-"),(B||A.length>1)&&C.shiftKey&&(B+="S-"),P&&!P.expectLiteralNext&&A.length==1){if(bn.keymap&&A in bn.keymap)(bn.remapCtrl!==!1||!B)&&(A=bn.keymap[A]);else if(A.charCodeAt(0)>255){var H=C.code&&C.code.slice(-1)||"";C.shiftKey||(H=H.toLowerCase()),H&&(A=H)}}return B+=A,B.length>1&&(B="<"+B+">"),B}function ro(g){var A=new g.constructor;return Object.keys(g).forEach(function(C){if(C!="insertEnd"){var P=g[C];Array.isArray(P)?P=P.slice():P&&typeof P=="object"&&P.constructor!=Object&&(P=ro(P)),A[C]=P}}),g.sel&&(A.sel={head:g.sel.head&&Ve(g.sel.head),anchor:g.sel.anchor&&Ve(g.sel.anchor)}),A}function Er(g,A,C){var P=!1,B=ct.maybeInitVimState_(g),H=B.visualBlock||B.wasInVisualBlock,K=g.ace.inMultiSelectMode;if(B.wasInVisualBlock&&!K?B.wasInVisualBlock=!1:K&&B.visualBlock&&(B.wasInVisualBlock=!0),A=="<Esc>"&&!B.insertMode&&!B.visualMode&&K)g.ace.exitMultiSelectMode();else if(H||!K||g.ace.inVirtualSelectionMode)P=ct.handleKey(g,A,C);else{var Y=ro(B),J=B.inputState.changeQueueList||[];g.operation(function(){g.curOp.isVimOp=!0;var ie=0;g.ace.forEachSelection(function(){var se=g.ace.selection;g.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,g.state.vim.inputState.changeQueue=J[ie];var ye=g.getCursor("head"),Se=g.getCursor("anchor"),de=Je(ye,Se)?0:-1,we=Je(ye,Se)?-1:0;ye=me(ye,0,de),Se=me(Se,0,we),g.state.vim.sel.head=ye,g.state.vim.sel.anchor=Se,P=Mi(g,A,C),se.$desiredColumn=g.state.vim.lastHPos==-1?null:g.state.vim.lastHPos,g.ace.inVirtualSelectionMode&&(J[ie]=g.state.vim.inputState.changeQueue),g.virtualSelectionMode()&&(g.state.vim=ro(Y)),ie++}),g.curOp.cursorActivity&&!P&&(g.curOp.cursorActivity=!1),B.status=g.state.vim.status,g.state.vim=B,B.inputState.changeQueueList=J,B.inputState.changeQueue=null},!0)}return P&&!B.visualMode&&!B.insert&&B.visualMode!=g.somethingSelected()&&to(g,B,!0),P}function Bi(g,A){A.off("beforeEndOperation",Bi);var C=A.state.cm.vimCmd;C&&A.execCommand(C.exec?C:C.name,C.args),A.curOp=A.prevOp}var Rn=e("../range").Range,wr=e("../lib/event_emitter").EventEmitter,sr=e("../lib/dom"),Qo=e("../lib/oop"),_s=e("../lib/keys"),Rr=e("../lib/event"),ar=e("../search").Search,Ir=e("../lib/useragent"),oo=e("../search_highlight").SearchHighlight,Or=e("../commands/multi_select_commands"),Zo=e("../mode/text").Mode.prototype.tokenRe,br=e("../ext/hardwrap").hardWrap;e("../multi_select");var De=function(g){this.ace=g,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};De.Pos=function(g,A){if(!(this instanceof Ie))return new Ie(g,A);this.line=g,this.ch=A},De.defineOption=function(g,A,C){},De.commands={redo:function(g){g.ace.redo()},undo:function(g){g.ace.undo()},newlineAndIndent:function(g){g.ace.insert(`
1402
- `)},goLineLeft:function(g){g.ace.selection.moveCursorLineStart()},goLineRight:function(g){g.ace.selection.moveCursorLineEnd()}},De.keyMap={},De.addClass=De.rmClass=function(){},De.e_stop=De.e_preventDefault=Rr.stopEvent,De.keyName=function(g){var A=_s[g.keyCode]||g.key||"";return A.length==1&&(A=A.toUpperCase()),A=Rr.getModifierString(g).replace(/(^|-)\w/g,function(C){return C.toUpperCase()})+A,A},De.keyMap.default=function(g){return function(A){var C=A.ace.commands.commandKeyBinding[g.toLowerCase()];return C&&A.ace.execCommand(C)!==!1}},De.lookupKey=function g(A,C,P){C||(C="default"),typeof C=="string"&&(C=De.keyMap[C]||De.keyMap.default);var B=typeof C=="function"?C(A):C[A];if(B===!1)return"nothing";if(B==="...")return"multi";if(B!=null&&P(B))return"handled";if(C.fallthrough){if(!Array.isArray(C.fallthrough))return g(A,C.fallthrough,P);for(var H=0;H<C.fallthrough.length;H++){var K=g(A,C.fallthrough[H],P);if(K)return K}}},De.findMatchingTag=function(g,A){return g.findMatchingTag(A)},De.findEnclosingTag=function(g,A){},De.signal=function(g,A,C){return g._signal(A,C)},De.on=Rr.addListener,De.off=Rr.removeListener,De.isWordChar=function(g){return g<""?/^\w$/.test(g):(Zo.lastIndex=0,Zo.test(g))},(function(){Qo.implement(De.prototype,wr),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(C){this.$lineHandleChanges&&this.$lineHandleChanges.push(C);var P={text:C.action[0]=="i"?C.lines:[]},B=this.curOp=this.curOp||{};B.changeHandlers||(B.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),B.lastChange?B.lastChange.next=B.lastChange=P:B.lastChange=B.change=P,this.$updateMarkers(C)},this.onSelectionChange=function(){var C=this.curOp=this.curOp||{};C.cursorActivityHandlers||(C.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(Or.keyboardHandler)},this.operation=function(C,P){if(!P&&this.curOp||P&&this.curOp&&this.curOp.force)return C();if((P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var B=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var H=this.curOp=this.curOp||{};this.curOp.force=P;var K=C();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!H.cursorActivity&&!H.lastChange&&B&&(this.ace.prevOp=B)),(P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),K},this.onBeforeEndOperation=function(){var C=this.curOp;C&&(C.change&&this.signal("change",C.change,C),C&&C.cursorActivity&&this.signal("cursorActivity",null,C),this.curOp=null)},this.signal=function(C,P,B){var H=B?B[C+"Handlers"]:(this._eventRegistry||{})[C];if(H){H=H.slice();for(var K=0;K<H.length;K++)H[K](this,P)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(C,P){typeof C=="object"&&(P=C.ch,C=C.line);var B=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:C,column:P}),this.ace.selection.moveTo(C,P),B&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(C){var P=this.ace.selection,B=C=="anchor"?P.isEmpty()?P.lead:P.anchor:C=="head"||!C?P.lead:P.getRange()[C];return v(B)},this.listSelections=function(C){var P=this.ace.multiSelect.rangeList.ranges;return!P.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:P.map(function(B){return{anchor:this.clipPos(v(B.cursor==B.end?B.start:B.end)),head:this.clipPos(v(B.cursor))}},this)},this.setSelections=function(C,P){var B=this.ace.multiSelect,H=C.map(function(ie){var se=b(ie.anchor),ye=b(ie.head),Se=Rn.comparePoints(se,ye)<0?new Rn.fromPoints(se,ye):new Rn.fromPoints(ye,se);return Se.cursor=Rn.comparePoints(Se.start,ye)?Se.end:Se.start,Se});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(H[0]);return}P?H[P]&&H.push(H.splice(P,1)[0]):H=H.reverse(),B.toSingleRange(H[0].clone());for(var K=this.ace.session,Y=0;Y<H.length;Y++){var J=K.$clipRangeToDocument(H[Y]);B.addRange(J)}},this.setSelection=function(C,P,B){var H=this.ace.selection;H.moveTo(C.line,C.ch),H.selectTo(P.line,P.ch),B&&B.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(C){return!this.ace.selection.isEmpty()},this.clipPos=function(C){var P=this.ace.session.$clipPositionToDocument(C.line,C.ch);return v(P)},this.foldCode=function(C){this.ace.session.$toggleFoldWidget(C.line,{})},this.markText=function(C){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(C){var P=C.action=="insert",B=C.start,H=C.end,K=(H.row-B.row)*(P?1:-1),Y=(H.column-B.column)*(P?1:-1);P&&(H=B);for(var J in this.marks){var ie=this.marks[J],se=Rn.comparePoints(ie,B);if(!(se<0)){if(se===0&&P)if(!ie.$insertRight)se=1;else{if(ie.bias!=1){ie.bias=-1;continue}se=1}var ye=P?se:Rn.comparePoints(ie,H);if(ye>0){ie.row+=K,ie.column+=ie.row==H.row?Y:0;continue}!P&&ye<=0&&(ie.row=B.row,ie.column=B.column,ye===0&&(ie.bias=1))}}};var g=function(C,P,B,H){this.cm=C,this.id=P,this.row=B,this.column=H,C.marks[this.id]=this};g.prototype.clear=function(){delete this.cm.marks[this.id]},g.prototype.find=function(){return v(this)},this.setBookmark=function(C,P){var B=new g(this,this.$uid++,C.line,C.ch);return(!P||!P.insertLeft)&&(B.$insertRight=!0),this.marks[B.id]=B,B},this.moveH=function(C,P){if(P=="char"){var B=this.ace.selection;B.clearSelection(),B.moveCursorBy(0,C)}},this.findPosV=function(C,P,B,H){if(B=="page"){var K=this.ace.renderer,Y=K.layerConfig;P*=Math.floor(Y.height/Y.lineHeight),B="line"}if(B=="line"){var J=this.ace.session.documentToScreenPosition(C.line,C.ch);H!=null&&(J.column=H),J.row+=P,J.row=Math.min(Math.max(0,J.row),this.ace.session.getScreenLength()-1);var ie=this.ace.session.screenToDocumentPosition(J.row,J.column);return v(ie)}debugger},this.charCoords=function(C,P){if(P=="div"||!P){var B=this.ace.session.documentToScreenPosition(C.line,C.ch);return{left:B.column,top:B.row}}if(P=="local"){var H=this.ace.renderer,B=this.ace.session.documentToScreenPosition(C.line,C.ch),K=H.layerConfig.lineHeight,Y=H.layerConfig.characterWidth,J=K*B.row;return{left:B.column*Y,top:J,bottom:J+K}}},this.coordsChar=function(C,P){var B=this.ace.renderer;if(P=="local"){var H=Math.max(0,Math.floor(C.top/B.lineHeight)),K=Math.max(0,Math.floor(C.left/B.characterWidth)),Y=B.session.screenToDocumentPosition(H,K);return v(Y)}if(P=="div")throw"not implemented"},this.getSearchCursor=function(C,P,B){var H=!1,K=!1;C instanceof RegExp&&!C.global&&(H=!C.ignoreCase,C=C.source,K=!0),C=="\\n"&&(C=`
1403
- `,K=!1);var Y=new ar;P.ch==null&&(P.ch=Number.MAX_VALUE);var J={row:P.line,column:P.ch},ie=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:C,caseSensitive:H,wrap:!1,backwards:ye,regExp:K,start:se||J});var Se=Y.find(ie.ace.session);return se=Se,se&&[!se.isEmpty()]},from:function(){return se&&v(se.start)},to:function(){return se&&v(se.end)},replace:function(ye){se&&(se.end=ie.ace.session.doc.replace(se,ye))}}},this.scrollTo=function(C,P){var B=this.ace.renderer,H=B.layerConfig,K=H.maxHeight;K-=(B.$size.scrollerHeight-B.lineHeight)*B.$scrollPastEnd,P!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(P,K))),C!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(C,H.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(C,P){if(C){var B=this.ace.renderer,H={top:0,bottom:P};B.scrollCursorIntoView(b(C),B.lineHeight*2/B.$size.scrollerHeight,H)}},this.getLine=function(C){return this.ace.session.getLine(C)},this.getRange=function(C,P){return this.ace.session.getTextRange(new Rn(C.line,C.ch,P.line,P.ch))},this.replaceRange=function(C,P,B){B||(B=P);var H=new Rn(P.line,P.ch,B.line,B.ch);return this.ace.session.$clipRangeToDocument(H),this.ace.session.replace(H,C)},this.replaceSelection=this.replaceSelections=function(C){var P=Array.isArray(C)&&C,B=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(B.getRange(),P?C[0]||"":C);return}B.inVirtualSelectionMode=!0;var H=B.rangeList.ranges;H.length||(H=[this.ace.multiSelect.getRange()]);for(var K=H.length;K--;)this.ace.session.replace(H[K],P?C[K]||"":C);B.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(C){return this.getRange(C.anchor,C.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var A={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(C,P){switch(this.state[C]=P,C){case"indentWithTabs":C=A[C],P=!P;break;case"keyMap":this.state.$keyMap=P;return;default:C=A[C]}C&&this.ace.setOption(C,P)},this.getOption=function(C){var P,B=A[C];switch(B&&(P=this.ace.getOption(B)),C){case"indentWithTabs":return C=A[C],!P;case"keyMap":return this.state.$keyMap||"vim"}return B?P:this.state[C]},this.toggleOverwrite=function(C){return this.state.overwrite=C,this.ace.setOverwrite(C)},this.addOverlay=function(C){if(!this.$searchHighlight||!this.$searchHighlight.session){var P=new oo(null,"ace_highlight-marker","text"),B=this.ace.session.addDynamicMarker(P);P.id=B.id,P.session=this.ace.session,P.destroy=function(K){P.session.off("change",P.updateOnChange),P.session.off("changeEditor",P.destroy),P.session.removeMarker(P.id),P.session=null},P.updateOnChange=function(K){var Y=K.start.row;Y==K.end.row?P.cache[Y]=void 0:P.cache.splice(Y,P.cache.length)},P.session.on("changeEditor",P.destroy),P.session.on("change",P.updateOnChange)}var H=new RegExp(C.query.source,"gmi");this.$searchHighlight=C.highlight=P,this.$searchHighlight.setRegexp(H),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(C){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var C=this.ace.renderer,P=C.layerConfig;return{left:C.scrollLeft,top:C.scrollTop,height:P.maxHeight,width:P.width,clientHeight:P.height,clientWidth:P.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(C){return this.ace.setValue(C,-1)},this.getTokenTypeAt=function(C){var P=this.ace.session.getTokenAt(C.line,C.ch);return P&&/comment|string/.test(P.type)?"string":""},this.findMatchingBracket=function(C){var P=this.ace.session.findMatchingBracket(b(C));return{to:P&&v(P)}},this.findMatchingTag=function(C){var P=this.ace.session.getMatchingTags(b(C));if(P)return{open:{from:v(P.openTag.start),to:v(P.openTag.end)},close:{from:v(P.closeTag.start),to:v(P.closeTag.end)}}},this.indentLine=function(C,P){P===!0?this.ace.session.indentRows(C,C," "):P===!1&&this.ace.session.outdentRows(new Rn(C,0,C,0))},this.indexFromPos=function(C){return this.ace.session.doc.positionToIndex(b(C))},this.posFromIndex=function(C){return v(this.ace.session.doc.indexToPosition(C))},this.focus=function(C){return this.ace.textInput.focus()},this.blur=function(C){return this.ace.blur()},this.defaultTextHeight=function(C){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(C,P,B,H){var K=H.bracketRegex.source,Y=/paren|text|operator|tag/;if(P==1)var J=this.ace.session.$findClosingBracket(K.slice(1,2),b(C),Y);else{var J=this.ace.session.$findOpeningBracket(K.slice(-2,-1),{row:C.line,column:C.ch+1},Y);!J&&H.bracketRegex&&H.bracketRegex.test(this.getLine(C.line)[C.ch-1])&&(J={row:C.line,column:C.ch-1})}return J&&{pos:v(J)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(C){if(De.commands.hasOwnProperty(C))return De.commands[C](this);if(C=="indentAuto")return this.ace.execCommand("autoindent");console.log(C+" is not implemented")},this.getLineNumber=function(C){var P=this.$lineHandleChanges;if(!P)return null;for(var B=C.row,H=0;H<P.length;H++){var K=P[H];if(K.start.row!=K.end.row){if(K.action[0]=="i")K.start.row<B&&(B+=K.end.row-K.start.row);else if(K.start.row<B){if(B<K.end.row||B==K.end.row&&K.start.column>0)return null;B-=K.end.row-K.start.row}}}return B},this.getLineHandle=function(C){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(C),row:C}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var C=this.ace.session.$undoManager;if(C&&C.$lastDelta)return v(C.$lastDelta.end)}}).call(De.prototype);var Jo=De.StringStream=function(g,A){this.pos=this.start=0,this.string=g,this.tabSize=A||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Jo.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(g){var A=this.string.charAt(this.pos);if(typeof g=="string")var C=A==g;else var C=A&&(g.test?g.test(A):g(A));if(C)return++this.pos,A},eatWhile:function(g){for(var A=this.pos;this.eat(g););return this.pos>A},eatSpace:function(){for(var g=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>g},skipToEnd:function(){this.pos=this.string.length},skipTo:function(g){var A=this.string.indexOf(g,this.pos);if(A>-1)return this.pos=A,!0},backUp:function(g){this.pos-=g},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(g,A,C){if(typeof g!="string"){var P=this.string.slice(this.pos).match(g);return P&&P.index>0?null:(P&&A!==!1&&(this.pos+=P[0].length),P)}var B=function(K){return C?K.toLowerCase():K},H=this.string.substr(this.pos,g.length);if(B(H)==B(g))return A!==!1&&(this.pos+=g.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(g,A){this.lineStart+=g;try{return A()}finally{this.lineStart-=g}}},De.defineExtension=function(g,A){De.prototype[g]=A},sr.importCssString(`.normal-mode .ace_cursor{
1404
- border: none;
1405
- background-color: rgba(255,0,0,0.5);
1406
- }
1407
- .normal-mode .ace_hidden-cursors .ace_cursor{
1408
- background-color: transparent;
1409
- border: 1px solid red;
1410
- opacity: 0.7
1411
- }
1412
- .ace_dialog {
1413
- position: absolute;
1414
- left: 0; right: 0;
1415
- background: inherit;
1416
- z-index: 15;
1417
- padding: .1em .8em;
1418
- overflow: hidden;
1419
- color: inherit;
1420
- }
1421
- .ace_dialog-top {
1422
- border-bottom: 1px solid #444;
1423
- top: 0;
1424
- }
1425
- .ace_dialog-bottom {
1426
- border-top: 1px solid #444;
1427
- bottom: 0;
1428
- }
1429
- .ace_dialog input {
1430
- border: none;
1431
- outline: none;
1432
- background: transparent;
1433
- width: 20em;
1434
- color: inherit;
1435
- font-family: monospace;
1436
- }`,"vimMode",!1),(function(){function g(C,P,B){var H=C.ace.container,K;return K=H.appendChild(document.createElement("div")),B?K.className="ace_dialog ace_dialog-bottom":K.className="ace_dialog ace_dialog-top",typeof P=="string"?K.innerHTML=P:K.appendChild(P),K}function A(C,P){C.state.currentNotificationClose&&C.state.currentNotificationClose(),C.state.currentNotificationClose=P}De.defineExtension("openDialog",function(C,P,B){function H(ye){if(typeof ye=="string")ie.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===ie)return;J.state.dialog==K&&(J.state.dialog=null,J.focus()),Y=!0,K.remove(),B.onClose&&B.onClose(K);var Se=J;Se.state.vim&&(Se.state.vim.status=null,Se.ace._signal("changeStatus"),Se.ace.renderer.$loop.schedule(Se.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){B||(B={}),A(this,null);var K=g(this,C,B.bottom),Y=!1,J=this;this.state.dialog=K;var ie=K.getElementsByTagName("input")[0],se;return ie?(B.value&&(ie.value=B.value,B.selectValueOnOpen!==!1&&ie.select()),B.onInput&&De.on(ie,"input",function(ye){B.onInput(ye,ie.value,H)}),B.onKeyUp&&De.on(ie,"keyup",function(ye){B.onKeyUp(ye,ie.value,H)}),De.on(ie,"keydown",function(ye){B&&B.onKeyDown&&B.onKeyDown(ye,ie.value,H)||(ye.keyCode==13&&P(ie.value),(ye.keyCode==27||B.closeOnEnter!==!1&&ye.keyCode==13)&&(De.e_stop(ye),H()))}),B.closeOnBlur!==!1&&De.on(ie,"blur",H),ie.focus()):(se=K.getElementsByTagName("button")[0])&&(De.on(se,"click",function(){H(),J.focus()}),B.closeOnBlur!==!1&&De.on(se,"blur",H),se.focus()),H}}),De.defineExtension("openNotification",function(C,P){function B(){K||(K=!0,clearTimeout(Y),H.remove())}if(!this.virtualSelectionMode()){A(this,B);var H=g(this,C,P&&P.bottom),K=!1,Y,J=P&&typeof P.duration<"u"?P.duration:5e3;return De.on(H,"click",function(ie){De.e_preventDefault(ie),B()}),J&&(Y=setTimeout(B,J)),B}})})();var Ie=De.Pos,ln=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Nr=ln.length,_i=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],bn=O(""),Xo=/[\d]/,Dr=[De.isWordChar,function(g){return g&&!De.isWordChar(g)&&!/\s/.test(g)}],Wi=[function(g){return/\S/.test(g)}],xr=["<",">"],Nt=["-",'"',".",":","_","/","+"],Rt=/^\w$/,Dt;try{Dt=new RegExp("^[\\p{Lu}]$","u")}catch{Dt=/^[A-Z]$/}var At={};L("filetype",void 0,"string",["ft"],function(g,A){if(A!==void 0){if(g===void 0){var C=A.getOption("mode");return C=="null"?"":C}var C=g==""?"null":g;A.setOption("mode",C)}}),L("textwidth",80,"number",["tw"],function(g,A){if(A!==void 0){if(g===void 0){var C=A.getOption("textwidth");return C}var P=Math.round(g);P>1&&A.setOption("textwidth",P)}});var Hi=function(){function g(J,ie,se){function ye(Re){var Le=++B%P,Be=Y[Le];Be&&Be.clear(),Y[Le]=J.setBookmark(Re)}var Se=B%P,de=Y[Se];if(de){var we=de.find();we&&!ot(we,ie)&&ye(ie)}else ye(ie);ye(se),H=B,K=B-P+1,K<0&&(K=0)}function A(J,ie){B+=ie,B>H?B=H:B<K&&(B=K);var se=Y[(P+B)%P];if(se&&!se.find()){var ye=ie>0?1:-1,Se,de=J.getCursor();do if(B+=ye,se=Y[(P+B)%P],se&&(Se=se.find())&&!ot(de,Se))break;while(B<H&&B>K)}return se}function C(J,ie){var se=B,ye=A(J,ie);return B=se,ye&&ye.find()}var P=100,B=-1,H=0,K=0,Y=new Array(P);return{cachedCursor:void 0,add:g,find:C,move:A}},hn=function(g){return g?{changes:g.changes,expectCursorActivityForChange:g.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};w.prototype={exitMacroRecordMode:function(){var g=Pe.macroModeState;g.onRecordingDone&&g.onRecordingDone(),g.onRecordingDone=void 0,g.isRecording=!1},enterMacroRecordMode:function(g,A){var C=Pe.registerController.getRegister(A);if(C){if(C.clear(),this.latestRegister=A,g.openDialog){var P=ki("span",{class:"cm-vim-message"},"recording @"+A);this.onRecordingDone=g.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var Pe,Jt,ct={enterVimMode:f,leaveVimMode:p,buildKeyMap:function(){},getRegisterController:function(){return Pe.registerController},resetVimGlobalState_:D,getVimGlobalState_:function(){return Pe},maybeInitVimState_:R,suppressErrorLogging:!1,InsertModeKey:yr,map:function(g,A,C){Kn.map(g,A,C)},unmap:function(g,A){return Kn.unmap(g,A)},noremap:function(g,A,C){Kn.map(g,A,C,!0)},mapclear:function(g){var A=ln.length,C=Nr,P=ln.slice(0,A-C);if(ln=ln.slice(A-C),g)for(var B=P.length-1;B>=0;B--){var H=P[B];if(g!==H.context)if(H.context)this._mapCommand(H);else{var K=["normal","insert","visual"];for(var Y in K)if(K[Y]!==g){var J={};for(var ie in H)J[ie]=H[ie];J.context=K[Y],this._mapCommand(J)}}}},langmap:F,vimKeyFromEvent:z,setOption:T,getOption:k,defineOption:L,defineEx:function(g,A,C){if(!A)A=g;else if(g.indexOf(A)!==0)throw new Error('(Vim.defineEx) "'+A+'" is not a prefix of "'+g+'", command not registered');_o[g]=C,Kn.commandMap_[A]={name:g,shortName:A,type:"api"}},handleKey:function(g,A,C){var P=this.findKey(g,A,C);if(typeof P=="function")return P()},multiSelectHandleKey:Er,findKey:function(g,A,C){function P(){var ie=Pe.macroModeState;if(ie.isRecording){if(A=="q")return ie.exitMacroRecordMode(),S(g),!0;C!="mapping"&&Xr(ie,A)}}function B(){if(A=="<Esc>"){if(Y.visualMode)sn(g);else{if(!Y.insertMode)return;pi(g)}return S(g),!0}}function H(){if(B())return!0;Y.inputState.keyBuffer.push(A);var ie=Y.inputState.keyBuffer.join(""),se=A.length==1,ye=dn.matchCommand(ie,ln,Y.inputState,"insert"),Se=Y.inputState.changeQueue;if(ye.type=="none")return S(g),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),Jt&&window.clearTimeout(Jt),Jt=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&S(g)},k("insertModeEscKeysTimeout")),se){var de=g.listSelections();(!Se||Se.removed.length!=de.length)&&(Se=Y.inputState.changeQueue=new N),Se.inserted+=A;for(var we=0;we<de.length;we++){var Re=lt(de[we].anchor,de[we].head),Le=zt(de[we].anchor,de[we].head),Be=g.getRange(Re,g.state.overwrite?me(Le,0,1):Le);Se.removed[we]=(Se.removed[we]||"")+Be}}return!se}if(Y.expectLiteralNext=!1,Jt&&window.clearTimeout(Jt),ye.command&&Se){for(var de=g.listSelections(),we=0;we<de.length;we++){var Xe=de[we].head;g.replaceRange(Se.removed[we]||"",me(Xe,0,-Se.inserted.length),Xe,"+input")}Pe.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||S(g),ye.command}function K(){if(P()||B())return!0;Y.inputState.keyBuffer.push(A);var ie=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(ie))return!0;var se=/^(\d*)(.*)$/.exec(ie);if(!se)return S(g),!1;var ye=Y.visualMode?"visual":"normal",Se=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Se&&(Se=Y.inputState.operatorShortcut);var de=dn.matchCommand(Se,ln,Y.inputState,ye);return de.type=="none"?(S(g),!1):de.type=="partial"?(de.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):de.type=="clear"?(S(g),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(ie),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),de.command)}var Y=R(g),J;return Y.insertMode?J=H():J=K(),J===!1?!Y.insertMode&&A.length===1?function(){return!0}:void 0:J===!0?function(){return!0}:function(){if(!((J.operator||J.isEdit)&&g.getOption("readOnly")))return g.operation(function(){g.curOp.isVimOp=!0;try{J.type=="keyToKey"?E(g,J.toKeys,J):dn.processCommand(g,Y,J)}catch(ie){throw g.state.vim=void 0,R(g),ct.suppressErrorLogging||console.log(ie),ie}return!0})}},handleEx:function(g,A){Kn.processCommand(g,A)},defineMotion:te,defineAction:he,defineOperator:ne,mapCommand:bo,_mapCommand:Jr,defineRegister:V,exitVisualMode:sn,exitInsertMode:pi},si=[],Vt=!1,Xt,An={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},ai={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},zi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(An)).forEach(function(g){zi[(An[g]||"").toLowerCase()]=zi[g.toLowerCase()]=g}),L("langmap",void 0,"string",["lmap"],function(g,A){if(g===void 0)return bn.string;F(g)}),_.prototype.pushRepeatDigit=function(g){this.operator?this.motionRepeat=this.motionRepeat.concat(g):this.prefixRepeat=this.prefixRepeat.concat(g)},_.prototype.getRepeat=function(){var g=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(g=1,this.prefixRepeat.length>0&&(g*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(g*=parseInt(this.motionRepeat.join(""),10))),g},W.prototype={setText:function(g,A,C){this.keyBuffer=[g||""],this.linewise=!!A,this.blockwise=!!C},pushText:function(g,A){A&&(this.linewise||this.keyBuffer.push(`
1437
- `),this.linewise=!0),this.keyBuffer.push(g)},pushInsertModeChanges:function(g){this.insertModeChanges.push(hn(g))},pushSearchQuery:function(g){this.searchQueries.push(g)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},G.prototype={pushText:function(g,A,C,P,B){if(g!=="_"){P&&C.charAt(C.length-1)!==`
1438
- `&&(C+=`
1439
- `);var H=this.isValidRegister(g)?this.getRegister(g):null;if(!H){switch(A){case"yank":this.registers[0]=new W(C,P,B);break;case"delete":case"change":C.indexOf(`
1440
- `)==-1?this.registers["-"]=new W(C,P):(this.shiftNumericRegisters_(),this.registers[1]=new W(C,P))}this.unnamedRegister.setText(C,P,B);return}var K=i(g);K?H.pushText(C,P):H.setText(C,P,B),g==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(C),this.unnamedRegister.setText(H.toString(),P)}},getRegister:function(g){return this.isValidRegister(g)?(g=g.toLowerCase(),this.registers[g]||(this.registers[g]=new W),this.registers[g]):this.unnamedRegister},isValidRegister:function(g){return g&&(y(g,Nt)||Rt.test(g))},shiftNumericRegisters_:function(){for(var g=9;g>=2;g--)this.registers[g]=this.getRegister(""+(g-1))}},Q.prototype={nextMatch:function(g,A){var C=this.historyBuffer,P=A?-1:1;this.initialPrefix===null&&(this.initialPrefix=g);for(var B=this.iterator+P;A?B>=0:B<C.length;B+=P)for(var H=C[B],K=0;K<=H.length;K++)if(this.initialPrefix==H.substring(0,K))return this.iterator=B,H;if(B>=C.length)return this.iterator=C.length,this.initialPrefix;if(B<0)return g},pushInput:function(g){var A=this.historyBuffer.indexOf(g);A>-1&&this.historyBuffer.splice(A,1),g.length&&this.historyBuffer.push(g)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var dn={matchCommand:function(g,A,C,P){var B=_e(g,A,P,C);if(!B.full&&!B.partial)return{type:"none"};if(!B.full&&B.partial)return{type:"partial",expectLiteralNext:B.partial.length==1&&B.partial[0].keys.slice(-11)=="<character>"};for(var H,K=0;K<B.full.length;K++){var Y=B.full[K];H||(H=Y)}if(H.keys.slice(-11)=="<character>"||H.keys.slice(-10)=="<register>"){var J=Me(g);if(!J||J.length>1)return{type:"clear"};C.selectedCharacter=J}return{type:"full",command:H}},processCommand:function(g,A,C){switch(A.inputState.repeatOverride=C.repeatOverride,C.type){case"motion":this.processMotion(g,A,C);break;case"operator":this.processOperator(g,A,C);break;case"operatorMotion":this.processOperatorMotion(g,A,C);break;case"action":this.processAction(g,A,C);break;case"search":this.processSearch(g,A,C);break;case"ex":case"keyToEx":this.processEx(g,A,C);break}},processMotion:function(g,A,C){A.inputState.motion=C.motion,A.inputState.motionArgs=le(C.motionArgs),this.evalInput(g,A)},processOperator:function(g,A,C){var P=A.inputState;if(P.operator){if(P.operator==C.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(g,A);return}S(g)}P.operator=C.operator,P.operatorArgs=le(C.operatorArgs),C.keys.length>1&&(P.operatorShortcut=C.keys),C.exitVisualBlock&&(A.visualBlock=!1,_n(g)),A.visualMode&&this.evalInput(g,A)},processOperatorMotion:function(g,A,C){var P=A.visualMode,B=le(C.operatorMotionArgs);B&&P&&B.visualLine&&(A.visualLine=!0),this.processOperator(g,A,C),P||this.processMotion(g,A,C)},processAction:function(g,A,C){var P=A.inputState,B=P.getRepeat(),H=!!B,K=le(C.actionArgs)||{};P.selectedCharacter&&(K.selectedCharacter=P.selectedCharacter),C.operator&&this.processOperator(g,A,C),C.motion&&this.processMotion(g,A,C),(C.motion||C.operator)&&this.evalInput(g,A),K.repeat=B||1,K.repeatIsExplicit=H,K.registerName=P.registerName,S(g),A.lastMotion=null,C.isEdit&&this.recordLastEdit(A,P,C),fn[C.action](g,K,A)},processSearch:function(g,A,C){function P(Le,Be,Xe){Pe.searchHistoryController.pushInput(Le),Pe.searchHistoryController.reset();try{Zt(g,Le,Be,Xe)}catch{_t(g,"Invalid regex: "+Le),S(g);return}dn.processMotion(g,A,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:C.searchArgs.toJumplist}})}function B(Le){P(Le,!0,!0);var Be=Pe.macroModeState;Be.isRecording&&So(Be,Le)}function H(Le,Be,Xe){var Qe=z(Le),Ke,jt;Qe=="<Up>"||Qe=="<Down>"?(Ke=Qe=="<Up>",jt=Le.target?Le.target.selectionEnd:0,Be=Pe.searchHistoryController.nextMatch(Be,Ke)||"",Xe(Be),jt&&Le.target&&(Le.target.selectionEnd=Le.target.selectionStart=Math.min(jt,Le.target.value.length))):Qe&&Qe!="<Left>"&&Qe!="<Right>"&&Pe.searchHistoryController.reset();var tt;try{tt=Zt(g,Be,!0,!0)}catch{}tt?g.scrollIntoView(Jn(g,!Y,tt),30):(Qr(g),g.scrollTo(ye.left,ye.top))}function K(Le,Be,Xe){var Qe=z(Le);Qe=="<Esc>"||Qe=="<C-c>"||Qe=="<C-[>"||Qe=="<BS>"&&Be==""?(Pe.searchHistoryController.pushInput(Be),Pe.searchHistoryController.reset(),Zt(g,se),Qr(g),g.scrollTo(ye.left,ye.top),De.e_stop(Le),S(g),Xe(),g.focus()):Qe=="<Up>"||Qe=="<Down>"?De.e_stop(Le):Qe=="<C-u>"&&(De.e_stop(Le),Xe(""))}if(g.getSearchCursor){var Y=C.searchArgs.forward,J=C.searchArgs.wholeWordOnly;an(g).setReversed(!Y);var ie=Y?"/":"?",se=an(g).getQuery(),ye=g.getScrollInfo();switch(C.searchArgs.querySrc){case"prompt":var Se=Pe.macroModeState;if(Se.isPlaying){var Re=Se.replaySearchQueries.shift();P(Re,!0,!1)}else Zn(g,{onClose:B,prefix:ie,desc:"(JavaScript regexp)",onKeyUp:H,onKeyDown:K});break;case"wordUnderCursor":var de=Ln(g,{noSymbol:!0}),we=!0;if(de||(de=Ln(g,{noSymbol:!1}),we=!1),!de){_t(g,"No word under cursor"),S(g);return}var Re=g.getLine(de.start.line).substring(de.start.ch,de.end.ch);we&&J?Re="\\b"+Re+"\\b":Re=on(Re),Pe.jumpList.cachedCursor=g.getCursor(),g.setCursor(de.start),P(Re,!0,!1)}}},processEx:function(g,A,C){function P(H){Pe.exCommandHistoryController.pushInput(H),Pe.exCommandHistoryController.reset(),Kn.processCommand(g,H),g.state.vim&&S(g)}function B(H,K,Y){var J=z(H),ie,se;(J=="<Esc>"||J=="<C-c>"||J=="<C-[>"||J=="<BS>"&&K=="")&&(Pe.exCommandHistoryController.pushInput(K),Pe.exCommandHistoryController.reset(),De.e_stop(H),S(g),Y(),g.focus()),J=="<Up>"||J=="<Down>"?(De.e_stop(H),ie=J=="<Up>",se=H.target?H.target.selectionEnd:0,K=Pe.exCommandHistoryController.nextMatch(K,ie)||"",Y(K),se&&H.target&&(H.target.selectionEnd=H.target.selectionStart=Math.min(se,H.target.value.length))):J=="<C-u>"?(De.e_stop(H),Y("")):J&&J!="<Left>"&&J!="<Right>"&&Pe.exCommandHistoryController.reset()}C.type=="keyToEx"?Kn.processCommand(g,C.exArgs.input):A.visualMode?Zn(g,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:B,selectValueOnOpen:!1}):Zn(g,{onClose:P,prefix:":",onKeyDown:B})},evalInput:function(g,A){var C=A.inputState,P=C.motion,B=C.motionArgs||{},H=C.operator,K=C.operatorArgs||{},Y=C.registerName,J=A.sel,ie=Ve(A.visualMode?ue(g,J.head):g.getCursor("head")),se=Ve(A.visualMode?ue(g,J.anchor):g.getCursor("anchor")),ye=Ve(ie),Se=Ve(se),de,we,Re;if(H&&this.recordLastEdit(A,C),C.repeatOverride!==void 0?Re=C.repeatOverride:Re=C.getRepeat(),Re>0&&B.explicitRepeat?B.repeatIsExplicit=!0:(B.noRepeat||!B.explicitRepeat&&Re===0)&&(Re=1,B.repeatIsExplicit=!1),C.selectedCharacter&&(B.selectedCharacter=K.selectedCharacter=C.selectedCharacter),B.repeat=Re,S(g),P){var Le=gi[P](g,ie,B,A,C);if(A.lastMotion=gi[P],!Le)return;if(B.toJumplist){!H&&g.ace.curOp!=null&&(g.ace.curOp.command.scrollIntoView="center-animate");var Be=Pe.jumpList,Xe=Be.cachedCursor;Xe?(Xi(g,Xe,Le),delete Be.cachedCursor):Xi(g,ie,Le)}Le instanceof Array?(we=Le[0],de=Le[1]):de=Le,de||(de=Ve(ie)),A.visualMode?((!A.visualBlock||de.ch!==1/0)&&(de=ue(g,de,ye)),we&&(we=ue(g,we)),we=we||Se,J.anchor=we,J.head=de,_n(g),Ci(g,A,"<",Je(we,de)?we:de),Ci(g,A,">",Je(we,de)?de:we)):H||(g.ace.curOp&&(g.ace.curOp.vimDialogScroll="center-animate"),de=ue(g,de,ye),g.setCursor(de.line,de.ch))}if(H){if(K.lastSel){we=Se;var Qe=K.lastSel,Ke=Math.abs(Qe.head.line-Qe.anchor.line),jt=Math.abs(Qe.head.ch-Qe.anchor.ch);Qe.visualLine?de=new Ie(Se.line+Ke,Se.ch):Qe.visualBlock?de=new Ie(Se.line+Ke,Se.ch+jt):Qe.head.line==Qe.anchor.line?de=new Ie(Se.line,Se.ch+jt):de=new Ie(Se.line+Ke,Se.ch),A.visualMode=!0,A.visualLine=Qe.visualLine,A.visualBlock=Qe.visualBlock,J=A.sel={anchor:we,head:de},_n(g)}else A.visualMode&&(K.lastSel={anchor:Ve(J.anchor),head:Ve(J.head),visualBlock:A.visualBlock,visualLine:A.visualLine});var tt,tn,xt,ut,pn;if(A.visualMode){tt=lt(J.head,J.anchor),tn=zt(J.head,J.anchor),xt=A.visualLine||K.linewise,ut=A.visualBlock?"block":xt?"line":"char";var Hn=x(g,tt,tn);if(pn=oi(g,{anchor:Hn.start,head:Hn.end},ut),xt){var nn=pn.ranges;if(ut=="block")for(var j=0;j<nn.length;j++)nn[j].head.ch=Pt(g,nn[j].head.line);else ut=="line"&&(nn[0].head=new Ie(nn[0].head.line+1,0))}}else{if(tt=Ve(we||Se),tn=Ve(de||ye),Je(tn,tt)){var Z=tt;tt=tn,tn=Z}xt=B.linewise||K.linewise,xt?Pn(g,tt,tn):B.forward&&Tn(g,tt,tn),ut="char";var re=!B.inclusive||xt,Hn=x(g,tt,tn);pn=oi(g,{anchor:Hn.start,head:Hn.end},ut,re)}g.setSelections(pn.ranges,pn.primary),A.lastMotion=null,K.repeat=Re,K.registerName=Y,K.linewise=xt;var oe=so[H](g,K,pn.ranges,Se,de);A.visualMode&&sn(g,oe!=null),oe&&g.setCursor(oe)}},recordLastEdit:function(g,A,C){var P=Pe.macroModeState;P.isPlaying||(g.lastEditInputState=A,g.lastEditActionCommand=C,P.lastInsertModeChanges.changes=[],P.lastInsertModeChanges.expectCursorActivityForChange=!1,P.lastInsertModeChanges.visualBlock=g.visualBlock?g.sel.head.line-g.sel.anchor.line:0)}},gi={moveToTopLine:function(g,A,C){var P=vr(g).top+C.repeat-1;return new Ie(P,Ut(g.getLine(P)))},moveToMiddleLine:function(g){var A=vr(g),C=Math.floor((A.top+A.bottom)*.5);return new Ie(C,Ut(g.getLine(C)))},moveToBottomLine:function(g,A,C){var P=vr(g).bottom-C.repeat+1;return new Ie(P,Ut(g.getLine(P)))},expandToLine:function(g,A,C){var P=A;return new Ie(P.line+C.repeat-1,1/0)},findNext:function(g,A,C){var P=an(g),B=P.getQuery();if(B){var H=!C.forward;return H=P.isReversed()?!H:H,Fi(g,B),Jn(g,H,B,C.repeat)}},findAndSelectNextInclusive:function(g,A,C,P,B){var H=an(g),K=H.getQuery();if(K){var Y=!C.forward;Y=H.isReversed()?!Y:Y;var J=Pi(g,Y,K,C.repeat,P);if(J){if(B.operator)return J;var ie=J[0],se=new Ie(J[1].line,J[1].ch-1);if(P.visualMode){(P.visualLine||P.visualBlock)&&(P.visualLine=!1,P.visualBlock=!1,De.signal(g,"vim-mode-change",{mode:"visual",subMode:""}));var ye=P.sel.anchor;if(ye)return H.isReversed()?C.forward?[ye,ie]:[ye,se]:C.forward?[ye,se]:[ye,ie]}else P.visualMode=!0,P.visualLine=!1,P.visualBlock=!1,De.signal(g,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,ie]:[ie,se]}}},goToMark:function(g,A,C,P){var B=fi(g,P,C.selectedCharacter);return B?C.linewise?{line:B.line,ch:Ut(g.getLine(B.line))}:B:null},moveToOtherHighlightedEnd:function(g,A,C,P){if(P.visualBlock&&C.sameLine){var B=P.sel;return[ue(g,new Ie(B.anchor.line,B.head.ch)),ue(g,new Ie(B.head.line,B.anchor.ch))]}return[P.sel.head,P.sel.anchor]},jumpToMark:function(g,A,C,P){for(var B=A,H=0;H<C.repeat;H++){var K=B;for(var Y in P.marks)if(a(Y)){var J=P.marks[Y].find(),ie=C.forward?Je(J,K):Je(K,J);if(!ie&&!(C.linewise&&J.line==K.line)){var se=ot(K,B),ye=C.forward?vn(K,J,B):vn(B,J,K);(se||ye)&&(B=J)}}}return C.linewise&&(B=new Ie(B.line,Ut(g.getLine(B.line)))),B},moveByCharacters:function(g,A,C){var P=A,B=C.repeat,H=C.forward?P.ch+B:P.ch-B;return new Ie(P.line,H)},moveByLines:function(g,A,C,P){var B=A,H=B.ch;switch(P.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:H=P.lastHPos;break;default:P.lastHPos=H}var K=C.repeat+(C.repeatOffset||0),Y=C.forward?B.line+K:B.line-K,J=g.firstLine(),ie=g.lastLine();if(Y<J&&B.line==J)return this.moveToStartOfLine(g,A,C,P);if(Y>ie&&B.line==ie)return Mr(g,A,C,P,!0);var se=g.ace.session.getFoldLine(Y);return se&&(C.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),C.toFirstChar&&(H=Ut(g.getLine(Y)),P.lastHPos=H),P.lastHSPos=g.charCoords(new Ie(Y,H),"div").left,new Ie(Y,H)},moveByDisplayLines:function(g,A,C,P){var B=A;switch(P.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:P.lastHSPos=g.charCoords(B,"div").left}var H=C.repeat,J=g.findPosV(B,C.forward?H:-H,"line",P.lastHSPos);if(J.hitSide)if(C.forward)var K=g.charCoords(J,"div"),Y={top:K.top+8,left:P.lastHSPos},J=g.coordsChar(Y,"div");else{var ie=g.charCoords(new Ie(g.firstLine(),0),"div");ie.left=P.lastHSPos,J=g.coordsChar(ie,"div")}return P.lastHPos=J.ch,J},moveByPage:function(g,A,C){var P=A,B=C.repeat;return g.findPosV(P,C.forward?B:-B,"page")},moveByParagraph:function(g,A,C){var P=C.forward?1:-1;return vo(g,A,C.repeat,P)},moveBySentence:function(g,A,C){var P=C.forward?1:-1;return nr(g,A,C.repeat,P)},moveByScroll:function(g,A,C,P){var B=g.getScrollInfo(),H=null,K=C.repeat;K||(K=B.clientHeight/(2*g.defaultTextHeight()));var Y=g.charCoords(A,"local");if(C.repeat=K,H=gi.moveByDisplayLines(g,A,C,P),!H)return null;var J=g.charCoords(H,"local");return g.scrollTo(null,B.top+J.top-Y.top),H},moveByWords:function(g,A,C){return Vn(g,A,C.repeat,!!C.forward,!!C.wordEnd,!!C.bigWord)},moveTillCharacter:function(g,A,C){var P=C.repeat,B=Yr(g,P,C.forward,C.selectedCharacter,A),H=C.forward?-1:1;return er(H,C),B?(B.ch+=H,B):null},moveToCharacter:function(g,A,C){var P=C.repeat;return er(0,C),Yr(g,P,C.forward,C.selectedCharacter,A)||A},moveToSymbol:function(g,A,C){var P=C.repeat;return tr(g,P,C.forward,C.selectedCharacter)||A},moveToColumn:function(g,A,C,P){var B=C.repeat;return P.lastHPos=B-1,P.lastHSPos=g.charCoords(A,"div").left,xs(g,B)},moveToEol:function(g,A,C,P){return Mr(g,A,C,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(g,A){var C=A;return new Ie(C.line,Ut(g.getLine(C.line)))},moveToMatchedSymbol:function(g,A){for(var C=A,P=C.line,B=C.ch,H=g.getLine(P),K;B<H.length;B++)if(K=H.charAt(B),K&&r(K)){var Y=g.getTokenTypeAt(new Ie(P,B+1));if(Y!=="string"&&Y!=="comment")break}if(B<H.length){var J=/[<>]/.test(H[B])?/[(){}[\]<>]/:/[(){}[\]]/,ie=g.findMatchingBracket(new Ie(P,B+1),{bracketRegex:J});return ie.to}return C},moveToStartOfLine:function(g,A){return new Ie(A.line,0)},moveToLineOrEdgeOfDocument:function(g,A,C){var P=C.forward?g.lastLine():g.firstLine();return C.repeatIsExplicit&&(P=C.repeat-g.getOption("firstLineNumber")),new Ie(P,Ut(g.getLine(P)))},moveToStartOfDisplayLine:function(g){return g.execCommand("goLineLeft"),g.getCursor()},moveToEndOfDisplayLine:function(g){g.execCommand("goLineRight");var A=g.getCursor();return A.sticky=="before"&&A.ch--,A},textObjectManipulation:function(g,A,C,P){var B={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},H={"'":!0,'"':!0,"`":!0},K=C.selectedCharacter;K=="b"?K="(":K=="B"&&(K="{");var Y=!C.textObjectInner,J,ie;if(B[K]){if(ie=!0,J=yn(g,A,K,Y),!J){var se=g.getSearchCursor(new RegExp("\\"+K,"g"),A);se.find()&&(J=yn(g,se.from(),K,Y))}}else if(H[K])ie=!0,J=Yn(g,A,K,Y);else if(K==="W"||K==="w")for(var ye=C.repeat||1;ye-- >0;){var Se=Ln(g,{inclusive:Y,innerWord:!Y,bigWord:K==="W",noSymbol:K==="W",multiline:!0},J&&J.end);Se&&(J||(J=Se),J.end=Se.end)}else if(K==="p")if(J=vo(g,A,C.repeat,0,Y),C.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var de=P.inputState.operatorArgs;de&&(de.linewise=!0),J.end.line--}else if(K==="t")J=Ar(g,A,Y);else if(K==="s"){var we=g.getLine(A.line);A.ch>0&&m(we[A.ch])&&(A.ch-=1);var Re=Ko(g,A,C.repeat,1,Y),Le=Ko(g,A,C.repeat,-1,Y);h(g.getLine(Le.line)[Le.ch])&&h(g.getLine(Re.line)[Re.ch-1])&&(Le={line:Le.line,ch:Le.ch+1}),J={start:Le,end:Re}}return J?g.state.vim.visualMode?Gt(g,J.start,J.end,ie):[J.start,J.end]:null},repeatLastCharacterSearch:function(g,A,C){var P=Pe.lastCharacterSearch,B=C.repeat,H=C.forward===P.forward,K=(P.increment?1:0)*(H?-1:1);g.moveH(-K,"char"),C.inclusive=!!H;var Y=Yr(g,B,H,P.selectedCharacter);return Y?(Y.ch+=K,Y):(g.moveH(K,"char"),A)}},so={change:function(g,A,C){var P,B,H=g.state.vim,K=C[0].anchor,Y=C[0].head;if(H.visualMode)if(A.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,g.setSelection(K,Y),B=g.getSelection(),g.replaceSelection(""),P=K;else{B=g.getSelection();var se=ce("",C.length);g.replaceSelections(se),P=lt(C[0].head,C[0].anchor)}else{B=g.getRange(K,Y);var J=H.lastEditInputState||{};if(J.motion=="moveByWords"&&!h(B)){var ie=/\s+$/.exec(B);ie&&J.motionArgs&&J.motionArgs.forward&&(Y=me(Y,0,-ie[0].length),B=B.slice(0,-ie[0].length))}A.linewise&&(K=new Ie(K.line,Ut(g.getLine(K.line))),Y.line>K.line&&(Y=new Ie(Y.line-1,Number.MAX_VALUE))),g.replaceRange("",K,Y),P=K}Pe.registerController.pushText(A.registerName,"change",B,A.linewise,C.length>1),fn.enterInsertMode(g,{head:P},g.state.vim)},delete:function(g,A,C){var P,B,H=g.state.vim;if(H.visualBlock){B=g.getSelection();var J=ce("",C.length);g.replaceSelections(J),P=lt(C[0].head,C[0].anchor)}else{var K=C[0].anchor,Y=C[0].head;A.linewise&&Y.line!=g.firstLine()&&K.line==g.lastLine()&&K.line==Y.line-1&&(K.line==g.firstLine()?K.ch=0:K=new Ie(K.line-1,Pt(g,K.line-1))),B=g.getRange(K,Y),g.replaceRange("",K,Y),P=K,A.linewise&&(P=gi.moveToFirstNonWhiteSpaceCharacter(g,K))}return Pe.registerController.pushText(A.registerName,"delete",B,A.linewise,H.visualBlock),ue(g,P)},indent:function(g,A,C){var P=g.state.vim,B=P.visualMode?A.repeat:1;if(P.visualBlock){for(var H=g.getOption("tabSize"),K=g.getOption("indentWithTabs")?" ":" ".repeat(H),Y,J=C.length-1;J>=0;J--)if(Y=lt(C[J].anchor,C[J].head),A.indentRight)g.replaceRange(K.repeat(B),Y,Y);else{for(var ie=g.getLine(Y.line),se=0,ye=0;ye<B;ye++){var Se=ie[Y.ch+se];if(Se==" ")se++;else{if(Se!=" ")break;se++;for(var de=1;de<K.length&&(Se=ie[Y.ch+se],Se===" ");de++)se++}}g.replaceRange("",Y,me(Y,0,se))}return Y}if(g.indentMore)for(var ye=0;ye<B;ye++)A.indentRight?g.indentMore():g.indentLess();else{var we=C[0].anchor.line,Re=P.visualBlock?C[C.length-1].anchor.line:C[0].head.line;A.linewise&&Re--;for(var J=we;J<=Re;J++)for(var ye=0;ye<B;ye++)g.indentLine(J,A.indentRight)}return gi.moveToFirstNonWhiteSpaceCharacter(g,C[0].anchor)},indentAuto:function(g,A,C){return g.execCommand("indentAuto"),gi.moveToFirstNonWhiteSpaceCharacter(g,C[0].anchor)},hardWrap:function(g,A,C,P,B){if(g.hardWrap){var H=C[0].anchor.line,K=C[0].head.line;A.linewise&&K--;var Y=g.hardWrap({from:H,to:K});return Y>H&&A.linewise&&Y--,A.keepCursor?P:new Ie(Y,0)}},changeCase:function(g,A,C,P,B){for(var H=g.getSelections(),K=[],Y=A.toLower,J=0;J<H.length;J++){var ie=H[J],se="";if(Y===!0)se=ie.toLowerCase();else if(Y===!1)se=ie.toUpperCase();else for(var ye=0;ye<ie.length;ye++){var Se=ie.charAt(ye);se+=i(Se)?Se.toLowerCase():Se.toUpperCase()}K.push(se)}return g.replaceSelections(K),A.shouldMoveCursor?B:!g.state.vim.visualMode&&A.linewise&&C[0].anchor.line+1==C[0].head.line?gi.moveToFirstNonWhiteSpaceCharacter(g,P):A.linewise?P:lt(C[0].anchor,C[0].head)},yank:function(g,A,C,P){var B=g.state.vim,H=g.getSelection(),K=B.visualMode?lt(B.sel.anchor,B.sel.head,C[0].head,C[0].anchor):P;return Pe.registerController.pushText(A.registerName,"yank",H,A.linewise,B.visualBlock),K}},fn={jumpListWalk:function(g,A,C){if(!C.visualMode){var P=A.repeat,B=A.forward,H=Pe.jumpList,K=H.move(g,B?P:-P),Y=K?K.find():void 0;Y=Y||g.getCursor(),g.setCursor(Y),g.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(g,A,C){if(!C.visualMode){var P=A.repeat||1,B=g.defaultTextHeight(),H=g.getScrollInfo().top,K=B*P,Y=A.forward?H+K:H-K,J=Ve(g.getCursor()),ie=g.charCoords(J,"local");if(A.forward)Y>ie.top?(J.line+=(Y-ie.top)/B,J.line=Math.ceil(J.line),g.setCursor(J),ie=g.charCoords(J,"local"),g.scrollTo(null,ie.top)):g.scrollTo(null,Y);else{var se=Y+g.getScrollInfo().clientHeight;se<ie.bottom?(J.line-=(ie.bottom-se)/B,J.line=Math.floor(J.line),g.setCursor(J),ie=g.charCoords(J,"local"),g.scrollTo(null,ie.bottom-g.getScrollInfo().clientHeight)):g.scrollTo(null,Y)}}},scrollToCursor:function(g,A){var C=g.getCursor().line,P=g.charCoords(new Ie(C,0),"local"),B=g.getScrollInfo().clientHeight,H=P.top;switch(A.position){case"center":H=P.bottom-B/2;break;case"bottom":var K=new Ie(C,g.getLine(C).length-1),Y=g.charCoords(K,"local"),J=Y.bottom-H;H=H-B+J}g.scrollTo(null,H)},replayMacro:function(g,A,C){var P=A.selectedCharacter,B=A.repeat,H=Pe.macroModeState;for(P=="@"?P=H.latestRegister:H.latestRegister=P;B--;)xo(g,C,H,P)},enterMacroRecordMode:function(g,A){var C=Pe.macroModeState,P=A.selectedCharacter;Pe.registerController.isValidRegister(P)&&C.enterMacroRecordMode(g,P)},toggleOverwrite:function(g){g.state.overwrite?(g.toggleOverwrite(!1),g.setOption("keyMap","vim-insert"),De.signal(g,"vim-mode-change",{mode:"insert"})):(g.toggleOverwrite(!0),g.setOption("keyMap","vim-replace"),De.signal(g,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(g,A,C){if(!g.getOption("readOnly")){C.insertMode=!0,C.insertModeRepeat=A&&A.repeat||1;var P=A?A.insertAt:null,B=C.sel,H=A.head||g.getCursor("head"),K=g.listSelections().length;if(P=="eol")H=new Ie(H.line,Pt(g,H.line));else if(P=="bol")H=new Ie(H.line,0);else if(P=="charAfter"){var Y=x(g,H,me(H,0,1));H=Y.end}else if(P=="firstNonBlank"){var Y=x(g,H,gi.moveToFirstNonWhiteSpaceCharacter(g,H));H=Y.end}else if(P=="startOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(H=new Ie(Math.min(B.head.line,B.anchor.line),Math.min(B.head.ch,B.anchor.ch)),K=Math.abs(B.head.line-B.anchor.line)+1):B.head.line<B.anchor.line?H=B.head:H=new Ie(B.anchor.line,0)}else if(P=="endOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(H=new Ie(Math.min(B.head.line,B.anchor.line),Math.max(B.head.ch,B.anchor.ch)+1),K=Math.abs(B.head.line-B.anchor.line)+1):B.head.line>=B.anchor.line?H=me(B.head,0,1):H=new Ie(B.anchor.line,0)}else if(P=="inplace"){if(C.visualMode)return}else P=="lastEdit"&&(H=Tr(g)||H);g.setOption("disableInput",!1),A&&A.replace?(g.toggleOverwrite(!0),g.setOption("keyMap","vim-replace"),De.signal(g,"vim-mode-change",{mode:"replace"})):(g.toggleOverwrite(!1),g.setOption("keyMap","vim-insert"),De.signal(g,"vim-mode-change",{mode:"insert"})),Pe.macroModeState.isPlaying||(g.on("change",Lr),C.insertEnd&&C.insertEnd.clear(),C.insertEnd=g.setBookmark(H,{insertLeft:!0}),De.on(g.getInputField(),"keydown",Co)),C.visualMode&&sn(g),ri(g,H,K)}},toggleVisualMode:function(g,A,C){var P=A.repeat,B=g.getCursor(),H;if(C.visualMode)C.visualLine^A.linewise||C.visualBlock^A.blockwise?(C.visualLine=!!A.linewise,C.visualBlock=!!A.blockwise,De.signal(g,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),_n(g)):sn(g);else{C.visualMode=!0,C.visualLine=!!A.linewise,C.visualBlock=!!A.blockwise,H=ue(g,new Ie(B.line,B.ch+P-1));var K=x(g,B,H);C.sel={anchor:K.start,head:K.end},De.signal(g,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),_n(g),Ci(g,C,"<",lt(B,H)),Ci(g,C,">",zt(B,H))}},reselectLastSelection:function(g,A,C){var P=C.lastSelection;if(C.visualMode&&Ot(g,C),P){var B=P.anchorMark.find(),H=P.headMark.find();if(!B||!H)return;C.sel={anchor:B,head:H},C.visualMode=!0,C.visualLine=P.visualLine,C.visualBlock=P.visualBlock,_n(g),Ci(g,C,"<",lt(B,H)),Ci(g,C,">",zt(B,H)),De.signal(g,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""})}},joinLines:function(g,A,C){var P,B;if(C.visualMode){if(P=g.getCursor("anchor"),B=g.getCursor("head"),Je(B,P)){var H=B;B=P,P=H}B.ch=Pt(g,B.line)-1}else{var K=Math.max(A.repeat,2);P=g.getCursor(),B=ue(g,new Ie(P.line+K-1,1/0))}for(var Y=0,J=P.line;J<B.line;J++){Y=Pt(g,P.line);var ie="",se=0;if(!A.keepSpaces){var ye=g.getLine(P.line+1);se=ye.search(/\S/),se==-1?se=ye.length:ie=" "}g.replaceRange(ie,new Ie(P.line,Y),new Ie(P.line+1,se))}var Se=ue(g,new Ie(P.line,Y));C.visualMode&&sn(g,!1),g.setCursor(Se)},newLineAndEnterInsertMode:function(g,A,C){C.insertMode=!0;var P=Ve(g.getCursor());if(P.line===g.firstLine()&&!A.after)g.replaceRange(`
1441
- `,new Ie(g.firstLine(),0)),g.setCursor(g.firstLine(),0);else{P.line=A.after?P.line:P.line-1,P.ch=Pt(g,P.line),g.setCursor(P);var B=De.commands.newlineAndIndentContinueComment||De.commands.newlineAndIndent;B(g)}this.enterInsertMode(g,{repeat:A.repeat},C)},paste:function(g,A,C){var P=this,B=Pe.registerController.getRegister(A.registerName),H=function(){var K=B.toString();P.continuePaste(g,A,C,K,B)};A.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(K){P.continuePaste(g,A,C,K,B)},function(){H()}):H()},continuePaste:function(g,A,C,de,B){var H=Ve(g.getCursor());if(de){if(A.matchIndent){var K=g.getOption("tabSize"),Y=function(nn){var j=nn.split(" ").length-1,Z=nn.split(" ").length-1;return j*K+Z*1},J=g.getLine(g.getCursor().line),ie=Y(J.match(/^\s*/)[0]),se=de.replace(/\n$/,""),ye=de!==se,Se=Y(de.match(/^\s*/)[0]),de=se.replace(/^\s*/gm,function(nn){var j=ie+(Y(nn)-Se);if(j<0)return"";if(g.getOption("indentWithTabs")){var Z=Math.floor(j/K);return Array(Z+1).join(" ")}return Array(j+1).join(" ")});de+=ye?`
1442
- `:""}if(A.repeat>1)var de=Array(A.repeat+1).join(de);var we=B.linewise,Re=B.blockwise;if(Re){de=de.split(`
1443
- `),we&&de.pop();for(var Le=0;Le<de.length;Le++)de[Le]=de[Le]==""?" ":de[Le];H.ch+=A.after?1:0,H.ch=Math.min(Pt(g,H.line),H.ch)}else we?C.visualMode?de=C.visualLine?de.slice(0,-1):`
1444
- `+de.slice(0,de.length-1)+`
1445
- `:A.after?(de=`
1446
- `+de.slice(0,de.length-1),H.ch=Pt(g,H.line)):H.ch=0:H.ch+=A.after?1:0;var Be;if(C.visualMode){C.lastPastedText=de;var Xe,Qe=ze(g,C),Ke=Qe[0],jt=Qe[1],tt=g.getSelection(),tn=g.listSelections(),xt=new Array(tn.length).join("1").split("1");C.lastSelection&&(Xe=C.lastSelection.headMark.find()),Pe.registerController.unnamedRegister.setText(tt),Re?(g.replaceSelections(xt),jt=new Ie(Ke.line+de.length-1,Ke.ch),g.setCursor(Ke),Fn(g,jt),g.replaceSelections(de),Be=Ke):C.visualBlock?(g.replaceSelections(xt),g.setCursor(Ke),g.replaceRange(de,Ke,Ke),Be=Ke):(g.replaceRange(de,Ke,jt),Be=g.posFromIndex(g.indexFromPos(Ke)+de.length-1)),Xe&&(C.lastSelection.headMark=g.setBookmark(Xe)),we&&(Be.ch=0)}else if(Re){g.setCursor(H);for(var Le=0;Le<de.length;Le++){var ut=H.line+Le;ut>g.lastLine()&&g.replaceRange(`
1447
- `,new Ie(ut,0));var pn=Pt(g,ut);pn<H.ch&&kn(g,ut,H.ch)}g.setCursor(H),Fn(g,new Ie(H.line+de.length-1,H.ch)),g.replaceSelections(de),Be=H}else if(g.replaceRange(de,H),we){var ut=A.after?H.line+1:H.line;Be=new Ie(ut,Ut(g.getLine(ut)))}else Be=Ve(H),/\n/.test(de)||(Be.ch+=de.length-(A.after?1:0));C.visualMode&&sn(g,!1),g.setCursor(Be)}},undo:function(g,A){g.operation(function(){qe(g,De.commands.undo,A.repeat)(),g.setCursor(ue(g,g.getCursor("start")))})},redo:function(g,A){qe(g,De.commands.redo,A.repeat)()},setRegister:function(g,A,C){C.inputState.registerName=A.selectedCharacter},insertRegister:function(g,A,C){var P=A.selectedCharacter,B=Pe.registerController.getRegister(P),H=B&&B.toString();H&&g.replaceSelection(H)},oneNormalCommand:function(g,A,C){pi(g,!0),C.insertModeReturn=!0,De.on(g,"vim-command-done",function P(){C.visualMode||(C.insertModeReturn&&(C.insertModeReturn=!1,C.insertMode||fn.enterInsertMode(g,{},C)),De.off(g,"vim-command-done",P))})},setMark:function(g,A,C){var P=A.selectedCharacter;Ci(g,C,P,g.getCursor())},replace:function(g,A,C){var P=A.selectedCharacter,B=g.getCursor(),H,K,Y=g.listSelections();if(C.visualMode)B=g.getCursor("start"),K=g.getCursor("end");else{var J=g.getLine(B.line);H=B.ch+A.repeat,H>J.length&&(H=J.length),K=new Ie(B.line,H)}var ie=x(g,B,K);if(B=ie.start,K=ie.end,P==`
1448
- `)C.visualMode||g.replaceRange("",B,K),(De.commands.newlineAndIndentContinueComment||De.commands.newlineAndIndent)(g);else{var se=g.getRange(B,K);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),se=se.replace(/[^\n]/g,P),C.visualBlock){var ye=new Array(g.getOption("tabSize")+1).join(" ");se=g.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),se=se.replace(/\t/g,ye).replace(/[^\n]/g,P).split(`
1449
- `),g.replaceSelections(se)}else g.replaceRange(se,B,K);C.visualMode?(B=Je(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,g.setCursor(B),sn(g,!1)):g.setCursor(me(K,0,-1))}},incrementNumberToken:function(g,A){for(var C=g.getCursor(),P=g.getLine(C.line),B=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,H,K,Y,J;(H=B.exec(P))!==null&&(K=H.index,Y=K+H[0].length,!(C.ch<Y)););if(!(!A.backtrack&&Y<=C.ch)&&H){var ie=H[2]||H[4],se=H[3]||H[5],ye=A.increase?1:-1,Se={"0b":2,0:8,"":10,"0x":16}[ie.toLowerCase()],de=parseInt(H[1]+se,Se)+ye*A.repeat;J=de.toString(Se);var we=ie?new Array(se.length-J.length+1+H[1].length).join("0"):"";J.charAt(0)==="-"?J="-"+ie+we+J.substr(1):J=ie+we+J;var Re=new Ie(C.line,K),Le=new Ie(C.line,Y);g.replaceRange(J,Re,Le),g.setCursor(new Ie(C.line,K+J.length-1))}},repeatLastEdit:function(g,A,C){var P=C.lastEditInputState;if(P){var B=A.repeat;B&&A.repeatIsExplicit?C.lastEditInputState.repeatOverride=B:B=C.lastEditInputState.repeatOverride||B,Yo(g,C,B,!1)}},indent:function(g,A){g.indentLine(g.getCursor().line,A.indentRight)},exitInsertMode:pi},Ai={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},$i={bracket:{isComplete:function(g){if(g.nextCh===g.symb){if(g.depth++,g.depth>=1)return!0}else g.nextCh===g.reverseSymb&&g.depth--;return!1}},section:{init:function(g){g.curMoveThrough=!0,g.symb=(g.forward?"]":"[")===g.symb?"{":"}"},isComplete:function(g){return g.index===0&&g.nextCh===g.symb}},comment:{isComplete:function(g){var A=g.lastCh==="*"&&g.nextCh==="/";return g.lastCh=g.nextCh,A}},method:{init:function(g){g.symb=g.symb==="m"?"{":"}",g.reverseSymb=g.symb==="{"?"}":"{"},isComplete:function(g){return g.nextCh===g.symb}},preprocess:{init:function(g){g.index=0},isComplete:function(g){if(g.nextCh==="#"){var A=g.lineText.match(/^#(\w+)/)[1];if(A==="endif"){if(g.forward&&g.depth===0)return!0;g.depth++}else if(A==="if"){if(!g.forward&&g.depth===0)return!0;g.depth--}if(A==="else"&&g.depth===0)return!0}return!1}}};L("pcre",!0,"boolean"),ir.prototype={getQuery:function(){return Pe.query},setQuery:function(g){Pe.query=g},getOverlay:function(){return this.searchOverlay},setOverlay:function(g){this.searchOverlay=g},isReversed:function(){return Pe.isReversed},setReversed:function(g){Pe.isReversed=g},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(g){this.annotate=g}};var Ui={"\\n":`
1450
- `,"\\r":"\r","\\t":" "},Bn={"\\/":"/","\\\\":"\\","\\n":`
1451
- `,"\\r":"\r","\\t":" ","\\&":"&"},Wn=0,jn=function(){this.buildCommandMap_()};jn.prototype={processCommand:function(g,A,C){var P=this;g.operation(function(){g.curOp.isVimOp=!0,P._processCommand(g,A,C)})},_processCommand:function(g,A,C){var P=g.state.vim,B=Pe.registerController.getRegister(":"),H=B.toString(),K=new De.StringStream(A);B.setText(A);var Y=C||{};Y.input=A;try{this.parseInput_(g,K,Y)}catch(se){throw _t(g,se.toString()),se}P.visualMode&&sn(g);var J,ie;if(!Y.commandName)Y.line!==void 0&&(ie="move");else if(J=this.matchCommand_(Y.commandName),J){if(ie=J.name,J.excludeFromCommandHistory&&B.setText(H),this.parseCommandArgs_(K,Y,J),J.type=="exToKey"){E(g,J.toKeys,J);return}if(J.type=="exToEx"){this.processCommand(g,J.toInput);return}}if(!ie){_t(g,'Not an editor command ":'+A+'"');return}try{_o[ie](g,Y),(!J||!J.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw _t(g,se.toString()),se}},parseInput_:function(g,A,C){if(A.eatWhile(":"),A.eat("%")?(C.line=g.firstLine(),C.lineEnd=g.lastLine()):(C.line=this.parseLineSpec_(g,A),C.line!==void 0&&A.eat(",")&&(C.lineEnd=this.parseLineSpec_(g,A))),C.line==null)if(g.state.vim.visualMode){var P=fi(g,g.state.vim,"<");C.selectionLine=P&&P.line,P=fi(g,g.state.vim,">"),C.selectionLineEnd=P&&P.line}else C.selectionLine=g.getCursor().line;else C.selectionLine=C.line,C.selectionLineEnd=C.lineEnd;var B=A.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return B?C.commandName=B[1]:C.commandName=A.match(/.*/)[0],C},parseLineSpec_:function(g,A){var C=A.match(/^(\d+)/);if(C)return parseInt(C[1],10)-1;switch(A.next()){case".":return this.parseLineSpecOffset_(A,g.getCursor().line);case"$":return this.parseLineSpecOffset_(A,g.lastLine());case"'":var P=A.next(),B=fi(g,g.state.vim,P);if(!B)throw new Error("Mark not set");return this.parseLineSpecOffset_(A,B.line);case"-":case"+":return A.backUp(1),this.parseLineSpecOffset_(A,g.getCursor().line);default:return A.backUp(1),void 0}},parseLineSpecOffset_:function(g,A){var C=g.match(/^([+-])?(\d+)/);if(C){var P=parseInt(C[2],10);C[1]=="-"?A-=P:A+=P}return A},parseCommandArgs_:function(g,A,C){if(!g.eol()){A.argString=g.match(/.*/)[0];var P=C.argDelimiter||/\s+/,B=Si(A.argString).split(P);B.length&&B[0]&&(A.args=B)}},matchCommand_:function(g){for(var A=g.length;A>0;A--){var C=g.substring(0,A);if(this.commandMap_[C]){var P=this.commandMap_[C];if(P.name.indexOf(g)===0)return P}}return null},buildCommandMap_:function(){this.commandMap_={};for(var g=0;g<_i.length;g++){var A=_i[g],C=A.shortName||A.name;this.commandMap_[C]=A}},map:function(g,A,C,P){if(g!=":"&&g.charAt(0)==":"){if(C)throw Error("Mode not supported for ex mappings");var B=g.substring(1);A!=":"&&A.charAt(0)==":"?this.commandMap_[B]={name:B,type:"exToEx",toInput:A.substring(1),user:!0}:this.commandMap_[B]={name:B,type:"exToKey",toKeys:A,user:!0}}else{var H={keys:g,type:"keyToKey",toKeys:A,noremap:!!P};C&&(H.context=C),ln.unshift(H)}},unmap:function(g,A){if(g!=":"&&g.charAt(0)==":"){if(A)throw Error("Mode not supported for ex mappings");var C=g.substring(1);if(this.commandMap_[C]&&this.commandMap_[C].user)return delete this.commandMap_[C],!0}else for(var P=g,B=0;B<ln.length;B++)if(P==ln[B].keys&&ln[B].context===A)return ln.splice(B,1),!0}};var _o={colorscheme:function(g,A){if(!A.args||A.args.length<1){_t(g,g.getOption("theme"));return}g.setOption("theme",A.args[0])},map:function(g,A,C,P){var B=A.args;if(!B||B.length<2){g&&_t(g,"Invalid mapping: "+A.input);return}Kn.map(B[0],B[1],C,P)},imap:function(g,A){this.map(g,A,"insert")},nmap:function(g,A){this.map(g,A,"normal")},vmap:function(g,A){this.map(g,A,"visual")},omap:function(g,A){this.map(g,A,"operatorPending")},noremap:function(g,A){this.map(g,A,void 0,!0)},inoremap:function(g,A){this.map(g,A,"insert",!0)},nnoremap:function(g,A){this.map(g,A,"normal",!0)},vnoremap:function(g,A){this.map(g,A,"visual",!0)},onoremap:function(g,A){this.map(g,A,"operatorPending",!0)},unmap:function(g,A,C){var P=A.args;(!P||P.length<1||!Kn.unmap(P[0],C))&&g&&_t(g,"No such mapping: "+A.input)},mapclear:function(g,A){ct.mapclear()},imapclear:function(g,A){ct.mapclear("insert")},nmapclear:function(g,A){ct.mapclear("normal")},vmapclear:function(g,A){ct.mapclear("visual")},omapclear:function(g,A){ct.mapclear("operatorPending")},move:function(g,A){dn.processCommand(g,g.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:A.line+1})},set:function(g,A){var C=A.args,P=A.setCfg||{};if(!C||C.length<1){g&&_t(g,"Invalid mapping: "+A.input);return}var B=C[0].split("="),H=B[0],K=B[1],Y=!1,J=!1;if(H.charAt(H.length-1)=="?"){if(K)throw Error("Trailing characters: "+A.argString);H=H.substring(0,H.length-1),Y=!0}else H.charAt(H.length-1)=="!"&&(H=H.substring(0,H.length-1),J=!0);K===void 0&&H.substring(0,2)=="no"&&(H=H.substring(2),K=!1);var ie=At[H]&&At[H].type=="boolean";if(ie&&(J?K=!k(H,g,P):K==null&&(K=!0)),!ie&&K===void 0||Y){var se=k(H,g,P);se instanceof Error?_t(g,se.message):se===!0||se===!1?_t(g," "+(se?"":"no")+H):_t(g," "+H+"="+se)}else{var ye=T(H,K,g,P);ye instanceof Error&&_t(g,ye.message)}},setlocal:function(g,A){A.setCfg={scope:"local"},this.set(g,A)},setglobal:function(g,A){A.setCfg={scope:"global"},this.set(g,A)},registers:function(g,A){var C=A.args,P=Pe.registerController.registers,B=`----------Registers----------
1452
-
1453
- `;if(C){var H;C=C.join("");for(var Y=0;Y<C.length;Y++)if(H=C.charAt(Y),!!Pe.registerController.isValidRegister(H)){var J=P[H]||new W;B+='"'+H+" "+J.toString()+`
1454
- `}}else for(var H in P){var K=P[H].toString();K.length&&(B+='"'+H+" "+K+`
1455
- `)}_t(g,B)},sort:function(g,A){function C(){if(A.argString){var xt=new De.StringStream(A.argString);if(xt.eat("!")&&(H=!0),xt.eol())return;if(!xt.eatSpace())return"Invalid arguments";var ut=xt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!ut&&!xt.eol())return"Invalid arguments";if(ut[1]){K=ut[1].indexOf("i")!=-1,Y=ut[1].indexOf("u")!=-1;var pn=ut[1].indexOf("d")!=-1||ut[1].indexOf("n")!=-1&&1,Hn=ut[1].indexOf("x")!=-1&&1,nn=ut[1].indexOf("o")!=-1&&1;if(pn+Hn+nn>1)return"Invalid arguments";J=pn&&"decimal"||Hn&&"hex"||nn&&"octal"}ut[2]&&(ie=new RegExp(ut[2].substr(1,ut[2].length-2),K?"i":""))}}function P(xt,ut){if(H){var pn;pn=xt,xt=ut,ut=pn}K&&(xt=xt.toLowerCase(),ut=ut.toLowerCase());var Hn=J&&Le.exec(xt),nn=J&&Le.exec(ut);return Hn?(Hn=parseInt((Hn[1]+Hn[2]).toLowerCase(),Be),nn=parseInt((nn[1]+nn[2]).toLowerCase(),Be),Hn-nn):xt<ut?-1:1}function B(xt,ut){if(H){var pn;pn=xt,xt=ut,ut=pn}return K&&(xt[0]=xt[0].toLowerCase(),ut[0]=ut[0].toLowerCase()),xt[0]<ut[0]?-1:1}var H,K,Y,J,ie,se=C();if(se){_t(g,se+": "+A.argString);return}var ye=A.line||g.firstLine(),Se=A.lineEnd||A.line||g.lastLine();if(ye!=Se){var de=new Ie(ye,0),we=new Ie(Se,Pt(g,Se)),Re=g.getRange(de,we).split(`
1456
- `),Le=ie||(J=="decimal"?/(-?)([\d]+)/:J=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:J=="octal"?/([0-7]+)/:null),Be=J=="decimal"?10:J=="hex"?16:J=="octal"?8:null,Xe=[],Qe=[];if(J||ie)for(var Ke=0;Ke<Re.length;Ke++){var jt=ie?Re[Ke].match(ie):null;jt&&jt[0]!=""?Xe.push(jt):!ie&&Le.exec(Re[Ke])?Xe.push(Re[Ke]):Qe.push(Re[Ke])}else Qe=Re;if(Xe.sort(ie?B:P),ie)for(var Ke=0;Ke<Xe.length;Ke++)Xe[Ke]=Xe[Ke].input;else J||Qe.sort(P);if(Re=H?Xe.concat(Qe):Qe.concat(Xe),Y){var tt=Re,tn;Re=[];for(var Ke=0;Ke<tt.length;Ke++)tt[Ke]!=tn&&Re.push(tt[Ke]),tn=tt[Ke]}g.replaceRange(Re.join(`
1457
- `),de,we)}},vglobal:function(g,A){this.global(g,A)},normal:function(g,A){var C=A.argString;if(C&&C[0]=="!"&&(C=C.slice(1),Vt=!0),C=C.trimStart(),!C){_t(g,"Argument is required.");return}var P=A.line;if(typeof P=="number")for(var B=isNaN(A.lineEnd)?P:A.lineEnd,H=P;H<=B;H++)g.setCursor(H,0),E(g,A.argString.trimStart()),g.state.vim.insertMode&&pi(g,!0);else E(g,A.argString.trimStart()),g.state.vim.insertMode&&pi(g,!0)},global:function(g,A){var C=A.argString;if(!C){_t(g,"Regular Expression missing from global");return}var P=A.commandName[0]==="v";C[0]==="!"&&A.commandName[0]==="g"&&(P=!0,C=C.slice(1));var B=A.line!==void 0?A.line:g.firstLine(),H=A.lineEnd||A.line||g.lastLine(),K=Qn(C),Y=C,J;if(K.length&&(Y=K[0],J=K.slice(1,K.length).join("/")),Y)try{Zt(g,Y,!0,!0)}catch{_t(g,"Invalid regex: "+Y);return}for(var ie=an(g).getQuery(),se=[],ye=B;ye<=H;ye++){var Se=g.getLine(ye),de=ie.test(Se);de!==P&&se.push(J?g.getLineHandle(ye):Se)}if(!J){_t(g,se.join(`
1458
- `));return}var we=0,Re=function(){if(we<se.length){var Le=se[we++],Be=g.getLineNumber(Le);if(Be==null){Re();return}var Xe=Be+1+J;Kn.processCommand(g,Xe,{callback:Re})}else g.releaseLineHandles&&g.releaseLineHandles()};Re()},substitute:function(g,A){if(!g.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var C=A.argString,P=C?rr(C,C[0]):[],B,H="",K,Y,J,ie=!1,se=!1;if(P.length)B=P[0],k("pcre")&&B!==""&&(B=new RegExp(B).source),H=P[1],H!==void 0&&(k("pcre")?H=ks(H.replace(/([^\\])&/g,"$1$$&")):H=Cs(H),Pe.lastSubstituteReplacePart=H),K=P[2]?P[2].split(" "):[];else if(C&&C.length){_t(g,"Substitutions should be of the form :s/pattern/replace/");return}if(K&&(Y=K[0],J=parseInt(K[1]),Y&&(Y.indexOf("c")!=-1&&(ie=!0),Y.indexOf("g")!=-1&&(se=!0),k("pcre")?B=B+"/"+Y:B=B.replace(/\//g,"\\/")+"/"+Y)),B)try{Zt(g,B,!0,!0)}catch{_t(g,"Invalid regex: "+B);return}if(H=H||Pe.lastSubstituteReplacePart,H===void 0){_t(g,"No previous substitute regular expression");return}var ye=an(g),Se=ye.getQuery(),de=A.line!==void 0?A.line:g.getCursor().line,we=A.lineEnd||de;de==g.firstLine()&&we==g.lastLine()&&(we=1/0),J&&(de=we,we=de+J-1);var Re=ue(g,new Ie(de,0)),Le=g.getSearchCursor(Se,Re);Zr(g,ie,se,de,we,Le,Se,H,A.callback)},startinsert:function(g,A){E(g,A.argString=="!"?"A":"i",{})},redo:De.commands.redo,undo:De.commands.undo,write:function(g){De.commands.save?De.commands.save(g):g.save&&g.save()},nohlsearch:function(g){Qr(g)},yank:function(g){var A=Ve(g.getCursor()),C=A.line,P=g.getLine(C);Pe.registerController.pushText("0","yank",P,!0,!0)},delete:function(g,A){var C=A.selectionLine,P=isNaN(A.selectionLineEnd)?C:A.selectionLineEnd;so.delete(g,{linewise:!0},[{anchor:new Ie(C,0),head:new Ie(P+1,0)}])},join:function(g,A){var C=A.selectionLine,P=isNaN(A.selectionLineEnd)?C:A.selectionLineEnd;g.setCursor(new Ie(C,0)),fn.joinLines(g,{repeat:P-C},g.state.vim)},delmarks:function(g,A){if(!A.argString||!Si(A.argString)){_t(g,"Argument required");return}for(var C=g.state.vim,P=new De.StringStream(Si(A.argString));!P.eol();){P.eatSpace();var B=P.pos;if(!P.match(/[a-zA-Z]/,!1)){_t(g,"Invalid argument: "+A.argString.substring(B));return}var H=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){_t(g,"Invalid argument: "+A.argString.substring(B));return}var K=H,Y=P.next();if(!(a(K)&&a(Y)||i(K)&&i(Y))){_t(g,"Invalid argument: "+K+"-");return}var J=K.charCodeAt(0),ie=Y.charCodeAt(0);if(J>=ie){_t(g,"Invalid argument: "+A.argString.substring(B));return}for(var se=0;se<=ie-J;se++){var ye=String.fromCharCode(J+se);delete C.marks[ye]}}else delete C.marks[H]}}},Kn=new jn;L("insertModeEscKeysTimeout",200,"number"),De.Vim=ct;var Xn={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",insert:"Ins",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"},Mi=ct.handleKey.bind(ct);ct.handleKey=function(g,A,C){return g.operation(function(){return Mi(g,A,C)},!0)},D(),u.CodeMirror=De;var Ti=ct.maybeInitVimState_;u.handler={$id:"ace/keyboard/vim",drawCursor:function(g,A,C,P,B){var H=this.state.vim||{},K=C.characterWidth,Y=C.lineHeight,J=A.top,ie=A.left;if(!H.insertMode){var se=P.cursor?Rn.comparePoints(P.cursor,P.start)<=0:B.selection.isBackwards()||B.selection.isEmpty();!se&&ie>K&&(ie-=K)}!H.insertMode&&H.status&&(Y/=2,J+=Y),sr.translate(g,ie,J),sr.setStyle(g.style,"width",K+"px"),sr.setStyle(g.style,"height",Y+"px")},$getDirectionForHighlight:function(g){var A=g.state.cm,C=Ti(A);if(!C.insertMode)return g.session.selection.isBackwards()||g.session.selection.isEmpty()},handleKeyboard:function(g,A,C,P,B){var H=g.editor,K=H.state.cm,Y=Ti(K);if(P!=-1){if(Y.insertMode||(A==-1?(C.charCodeAt(0)>255&&g.inputKey&&(C=g.inputKey,C&&g.inputHash==4&&(C=C.toUpperCase())),g.inputChar=C):A==4||A==0?g.inputKey==C&&g.inputHash==A&&g.inputChar?(C=g.inputChar,A=-1):(g.inputChar=null,g.inputKey=C,g.inputHash=A):g.inputChar=g.inputKey=null),K.state.overwrite&&Y.insertMode&&C=="backspace"&&A==0)return{command:"gotoleft"};if(C=="c"&&A==1&&!Ir.isMac&&H.getCopyText())return H.once("copy",function(){Y.insertMode?H.selection.clearSelection():K.operation(function(){sn(K)})}),{command:"null",passEvent:!0};if(C=="esc"&&!Y.insertMode&&!Y.visualMode&&!K.ace.inMultiSelectMode){var J=an(K),ie=J.getOverlay();ie&&K.removeOverlay(ie)}if(A==-1||A&1||A===0&&C.length>1){var se=Y.insertMode,ye=ko(A,C,B||{},Y);Y.status==null&&(Y.status="");var Se=Er(K,ye,"user");return Y=Ti(K),Se&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),K._signal("changeStatus"),!Se&&(A!=-1||se)?void 0:{command:"null",passEvent:!Se}}}},attach:function(g){function A(){var P=Ti(C).insertMode;C.ace.renderer.setStyle("normal-mode",!P),g.textInput.setCommandMode(!P),g.renderer.$keepTextAreaAtCursor=P,g.renderer.$blockCursor=!P}g.state||(g.state={});var C=new De(g);g.state.cm=C,g.$vimModeHandler=this,f(C),Ti(C).status=null,C.on("vim-command-done",function(){C.virtualSelectionMode()||(Ti(C).status=null,C.ace._signal("changeStatus"),C.ace.session.markUndoGroup())}),C.on("changeStatus",function(){C.ace.renderer.updateCursor(),C.ace._signal("changeStatus")}),C.on("vim-mode-change",function(){C.virtualSelectionMode()||(A(),C._signal("changeStatus"))}),A(),g.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(C)},detach:function(g){var A=g.state.cm;p(A),A.destroy(),g.state.cm=null,g.$vimModeHandler=null,g.renderer.$cursorLayer.drawCursor=null,g.renderer.setStyle("normal-mode",!1),g.textInput.setCommandMode(!1),g.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(g){var A=g.state.cm,C=Ti(A);if(C.insertMode)return"INSERT";var P="";return C.visualMode&&(P+="VISUAL",C.visualLine&&(P+=" LINE"),C.visualBlock&&(P+=" BLOCK")),C.status&&(P+=(P?" ":"")+C.status),P}},ct.defineOption({name:"wrap",set:function(g,A){A&&A.ace.setOption("wrap",g)},type:"boolean"},!1),ct.defineEx("write","w",function(){console.log(":write is not implemented")}),ln.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),ln.push({keys:"gq",type:"operator",operator:"hardWrap"}),ct.defineOperator("hardWrap",function(g,A,C,P,B){var H=C[0].anchor.line,K=C[0].head.line;return A.linewise&&K--,br(g.ace,{startRow:H,endRow:K}),Ie(K,0)}),L("textwidth",void 0,"number",["tw"],function(g,A){if(A!==void 0){if(g===void 0){var C=A.ace.getOption("printMarginColumn");return C}var P=Math.round(g);P>1&&A.ace.setOption("printMarginColumn",P)}}),fn.aceCommand=function(g,A,C){g.vimCmd=A,g.ace.inVirtualSelectionMode?g.ace.on("beforeEndOperation",Bi):Bi(null,g.ace)},fn.fold=function(g,A,C){g.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(A.all?2:0)+(A.open?1:0)])},Nr=ln.length,u.handler.defaultKeymap=ln,u.handler.actions=fn,u.Vim=ct}),(function(){ace.require(["ace/keyboard/vim"],function(e){l&&(l.exports=e)})})()})(Cc)),Cc.exports}AC();var kc={},_f;function $C(){return _f||(_f=1,(function(l){(function(){var c={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(x){return $(v(x),arguments)}function u(x,f){return e.apply(null,[x].concat(f||[]))}function $(x,f){var p=1,s=x.length,o,a="",r,n,i,h,m,y,L,T;for(r=0;r<s;r++)if(typeof x[r]=="string")a+=x[r];else if(typeof x[r]=="object"){if(i=x[r],i.keys)for(o=f[p],n=0;n<i.keys.length;n++){if(o==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',i.keys[n],i.keys[n-1]));o=o[i.keys[n]]}else i.param_no?o=f[i.param_no]:o=f[p++];if(c.not_type.test(i.type)&&c.not_primitive.test(i.type)&&o instanceof Function&&(o=o()),c.numeric_arg.test(i.type)&&typeof o!="number"&&isNaN(o))throw new TypeError(e("[sprintf] expecting number but found %T",o));switch(c.number.test(i.type)&&(L=o>=0),i.type){case"b":o=parseInt(o,10).toString(2);break;case"c":o=String.fromCharCode(parseInt(o,10));break;case"d":case"i":o=parseInt(o,10);break;case"j":o=JSON.stringify(o,null,i.width?parseInt(i.width):0);break;case"e":o=i.precision?parseFloat(o).toExponential(i.precision):parseFloat(o).toExponential();break;case"f":o=i.precision?parseFloat(o).toFixed(i.precision):parseFloat(o);break;case"g":o=i.precision?String(Number(o.toPrecision(i.precision))):parseFloat(o);break;case"o":o=(parseInt(o,10)>>>0).toString(8);break;case"s":o=String(o),o=i.precision?o.substring(0,i.precision):o;break;case"t":o=String(!!o),o=i.precision?o.substring(0,i.precision):o;break;case"T":o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=i.precision?o.substring(0,i.precision):o;break;case"u":o=parseInt(o,10)>>>0;break;case"v":o=o.valueOf(),o=i.precision?o.substring(0,i.precision):o;break;case"x":o=(parseInt(o,10)>>>0).toString(16);break;case"X":o=(parseInt(o,10)>>>0).toString(16).toUpperCase();break}c.json.test(i.type)?a+=o:(c.number.test(i.type)&&(!L||i.sign)?(T=L?"+":"-",o=o.toString().replace(c.sign,"")):T="",m=i.pad_char?i.pad_char==="0"?"0":i.pad_char.charAt(1):" ",y=i.width-(T+o).length,h=i.width&&y>0?m.repeat(y):"",a+=i.align?T+o+h:m==="0"?T+h+o:h+T+o)}return a}var b=Object.create(null);function v(x){if(b[x])return b[x];for(var f=x,p,s=[],o=0;f;){if((p=c.text.exec(f))!==null)s.push(p[0]);else if((p=c.modulo.exec(f))!==null)s.push("%");else if((p=c.placeholder.exec(f))!==null){if(p[2]){o|=1;var a=[],r=p[2],n=[];if((n=c.key.exec(r))!==null)for(a.push(n[1]);(r=r.substring(n[0].length))!=="";)if((n=c.key_access.exec(r))!==null)a.push(n[1]);else if((n=c.index_access.exec(r))!==null)a.push(n[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");p[2]=a}else o|=2;if(o===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");s.push({placeholder:p[0],param_no:p[1],keys:p[2],sign:p[3],pad_char:p[4],align:p[5],width:p[6],precision:p[7],type:p[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");f=f.substring(p[0].length)}return b[x]=s}l.sprintf=e,l.vsprintf=u,typeof window<"u"&&(window.sprintf=e,window.vsprintf=u)})()})(kc)),kc}$C();const Ag={props:{config:{type:Object},packets:{type:Array}},data:function(){return{currentConfig:{},currentPackets:[],latestData:null}},computed:{hasRaw:function(){for(let l=0;l<this.currentPackets.length;l++)if(this.currentPackets[l].mode==="RAW")return!0;return!1},hasDecom:function(){for(let l=0;l<this.currentPackets.length;l++)if(this.currentPackets[l].mode==="DECOM")return!0;return!1}},watch:{currentConfig:{deep:!0,handler:function(l){this.$emit("config",l)}}},created:function(){this.config&&(this.currentConfig={...this.config}),this.packets&&(this.currentPackets=[...this.packets])},methods:{receive:function(l){this.latestData=l}}};var Vs={exports:{}};var MC=Vs.exports,Af;function TC(){return Af||(Af=1,(function(l,c){(function(){var e,u="4.17.23",$=200,b="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",x="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",p=500,s="__lodash_placeholder__",o=1,a=2,r=4,n=1,i=2,h=1,m=2,y=4,L=8,T=16,k=32,w=64,R=128,D=256,I=512,E=30,z="...",F=800,O=16,_=1,S=2,N=3,W=1/0,V=9007199254740991,G=17976931348623157e292,Q=NaN,te=4294967295,ce=te-1,ne=te>>>1,he=[["ary",R],["bind",h],["bindKey",m],["curry",L],["curryRight",T],["flip",I],["partial",k],["partialRight",w],["rearg",D]],ue="[object Arguments]",le="[object Array]",me="[object AsyncFunction]",_e="[object Boolean]",Ae="[object Date]",Me="[object DOMException]",qe="[object Error]",Ve="[object Function]",ot="[object GeneratorFunction]",Je="[object Map]",lt="[object Number]",zt="[object Null]",vn="[object Object]",Pt="[object Promise]",Si="[object Proxy]",on="[object RegExp]",kn="[object Set]",Fn="[object String]",ri="[object Symbol]",ft="[object Undefined]",ze="[object WeakMap]",Ot="[object WeakSet]",Gt="[object ArrayBuffer]",_n="[object DataView]",oi="[object Float32Array]",qn="[object Float64Array]",sn="[object Int8Array]",Tn="[object Int16Array]",Pn="[object Int32Array]",Ut="[object Uint8Array]",Ln="[object Uint8ClampedArray]",Ar="[object Uint16Array]",Xi="[object Uint32Array]",er=/\b__p \+= '';/g,tr=/\b(__p \+=) '' \+/g,$r=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vn=/&(?:amp|lt|gt|quot|#39);/g,Mr=/[&<>"']/g,Yr=RegExp(Vn.source),xs=RegExp(Mr.source),Ci=/<%-([\s\S]+?)%>/g,Ss=/<%([\s\S]+?)%>/g,vo=/<%=([\s\S]+?)%>/g,Ko=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nr=/^\w*$/,yn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yn=/[\\^$.*+?()[\]{}|]/g,ir=RegExp(Yn.source),an=/^\s+/,Qn=/\s/,mr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,rr=/\{\n\/\* \[wrapped with (.+)\] \*/,yo=/,? & /,Go=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Cs=/[()=,{}\[\]\/\s]/,ks=/\\(\\)?/g,or=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ki=/\w*$/,_t=/^[-+]0x[0-9a-f]+$/i,qo=/^0b[01]+$/i,Zn=/^\[object .+?Constructor\]$/,wn=/^0o[0-7]+$/i,Zt=/^(?:0|[1-9]\d*)$/,un=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Fi=/($^)/,Jn=/['\n\r\u2028\u2029\\]/g,Pi="\\ud800-\\udfff",Qr="\\u0300-\\u036f",wo="\\ufe20-\\ufe2f",vr="\\u20d0-\\u20ff",fi=Qr+wo+vr,Tr="\\u2700-\\u27bf",Zr="a-z\\xdf-\\xf6\\xf8-\\xff",pi="\\xac\\xb1\\xd7\\xf7",Jr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",bo="\\u2000-\\u206f",xo=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Xr="A-Z\\xc0-\\xd6\\xd8-\\xde",En="\\ufe0e\\ufe0f",So=pi+Jr+bo+xo,Lr="['’]",eo="["+Pi+"]",to="["+So+"]",yr="["+fi+"]",Co="\\d+",Yo="["+Tr+"]",no="["+Zr+"]",io="[^"+Pi+So+Co+Tr+Zr+Xr+"]",ko="\\ud83c[\\udffb-\\udfff]",ro="(?:"+yr+"|"+ko+")",Er="[^"+Pi+"]",Bi="(?:\\ud83c[\\udde6-\\uddff]){2}",Rn="[\\ud800-\\udbff][\\udc00-\\udfff]",wr="["+Xr+"]",sr="\\u200d",Qo="(?:"+no+"|"+io+")",_s="(?:"+wr+"|"+io+")",Rr="(?:"+Lr+"(?:d|ll|m|re|s|t|ve))?",ar="(?:"+Lr+"(?:D|LL|M|RE|S|T|VE))?",Ir=ro+"?",oo="["+En+"]?",Or="(?:"+sr+"(?:"+[Er,Bi,Rn].join("|")+")"+oo+Ir+")*",Zo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",br="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",De=oo+Ir+Or,Jo="(?:"+[Yo,Bi,Rn].join("|")+")"+De,Ie="(?:"+[Er+yr+"?",yr,Bi,Rn,eo].join("|")+")",ln=RegExp(Lr,"g"),Nr=RegExp(yr,"g"),_i=RegExp(ko+"(?="+ko+")|"+Ie+De,"g"),bn=RegExp([wr+"?"+no+"+"+Rr+"(?="+[to,wr,"$"].join("|")+")",_s+"+"+ar+"(?="+[to,wr+Qo,"$"].join("|")+")",wr+"?"+Qo+"+"+Rr,wr+"+"+ar,br,Zo,Co,Jo].join("|"),"g"),Xo=RegExp("["+sr+Pi+fi+En+"]"),Dr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wi=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xr=-1,Nt={};Nt[oi]=Nt[qn]=Nt[sn]=Nt[Tn]=Nt[Pn]=Nt[Ut]=Nt[Ln]=Nt[Ar]=Nt[Xi]=!0,Nt[ue]=Nt[le]=Nt[Gt]=Nt[_e]=Nt[_n]=Nt[Ae]=Nt[qe]=Nt[Ve]=Nt[Je]=Nt[lt]=Nt[vn]=Nt[on]=Nt[kn]=Nt[Fn]=Nt[ze]=!1;var Rt={};Rt[ue]=Rt[le]=Rt[Gt]=Rt[_n]=Rt[_e]=Rt[Ae]=Rt[oi]=Rt[qn]=Rt[sn]=Rt[Tn]=Rt[Pn]=Rt[Je]=Rt[lt]=Rt[vn]=Rt[on]=Rt[kn]=Rt[Fn]=Rt[ri]=Rt[Ut]=Rt[Ln]=Rt[Ar]=Rt[Xi]=!0,Rt[qe]=Rt[Ve]=Rt[ze]=!1;var Dt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},At={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Hi={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},hn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pe=parseFloat,Jt=parseInt,ct=typeof go=="object"&&go&&go.Object===Object&&go,si=typeof self=="object"&&self&&self.Object===Object&&self,Vt=ct||si||Function("return this")(),Xt=c&&!c.nodeType&&c,An=Xt&&!0&&l&&!l.nodeType&&l,ai=An&&An.exports===Xt,zi=ai&&ct.process,dn=(function(){try{var pe=An&&An.require&&An.require("util").types;return pe||zi&&zi.binding&&zi.binding("util")}catch{}})(),gi=dn&&dn.isArrayBuffer,so=dn&&dn.isDate,fn=dn&&dn.isMap,Ai=dn&&dn.isRegExp,$i=dn&&dn.isSet,Ui=dn&&dn.isTypedArray;function Bn(pe,ke,xe){switch(xe.length){case 0:return pe.call(ke);case 1:return pe.call(ke,xe[0]);case 2:return pe.call(ke,xe[0],xe[1]);case 3:return pe.call(ke,xe[0],xe[1],xe[2])}return pe.apply(ke,xe)}function Wn(pe,ke,xe,We){for(var nt=-1,mt=pe==null?0:pe.length;++nt<mt;){var Et=pe[nt];ke(We,Et,xe(Et),pe)}return We}function jn(pe,ke){for(var xe=-1,We=pe==null?0:pe.length;++xe<We&&ke(pe[xe],xe,pe)!==!1;);return pe}function _o(pe,ke){for(var xe=pe==null?0:pe.length;xe--&&ke(pe[xe],xe,pe)!==!1;);return pe}function Kn(pe,ke){for(var xe=-1,We=pe==null?0:pe.length;++xe<We;)if(!ke(pe[xe],xe,pe))return!1;return!0}function Xn(pe,ke){for(var xe=-1,We=pe==null?0:pe.length,nt=0,mt=[];++xe<We;){var Et=pe[xe];ke(Et,xe,pe)&&(mt[nt++]=Et)}return mt}function Mi(pe,ke){var xe=pe==null?0:pe.length;return!!xe&&se(pe,ke,0)>-1}function Ti(pe,ke,xe){for(var We=-1,nt=pe==null?0:pe.length;++We<nt;)if(xe(ke,pe[We]))return!0;return!1}function g(pe,ke){for(var xe=-1,We=pe==null?0:pe.length,nt=Array(We);++xe<We;)nt[xe]=ke(pe[xe],xe,pe);return nt}function A(pe,ke){for(var xe=-1,We=ke.length,nt=pe.length;++xe<We;)pe[nt+xe]=ke[xe];return pe}function C(pe,ke,xe,We){var nt=-1,mt=pe==null?0:pe.length;for(We&&mt&&(xe=pe[++nt]);++nt<mt;)xe=ke(xe,pe[nt],nt,pe);return xe}function P(pe,ke,xe,We){var nt=pe==null?0:pe.length;for(We&&nt&&(xe=pe[--nt]);nt--;)xe=ke(xe,pe[nt],nt,pe);return xe}function B(pe,ke){for(var xe=-1,We=pe==null?0:pe.length;++xe<We;)if(ke(pe[xe],xe,pe))return!0;return!1}var H=we("length");function K(pe){return pe.split("")}function Y(pe){return pe.match(Go)||[]}function J(pe,ke,xe){var We;return xe(pe,function(nt,mt,Et){if(ke(nt,mt,Et))return We=mt,!1}),We}function ie(pe,ke,xe,We){for(var nt=pe.length,mt=xe+(We?1:-1);We?mt--:++mt<nt;)if(ke(pe[mt],mt,pe))return mt;return-1}function se(pe,ke,xe){return ke===ke?Ye(pe,ke,xe):ie(pe,Se,xe)}function ye(pe,ke,xe,We){for(var nt=xe-1,mt=pe.length;++nt<mt;)if(We(pe[nt],ke))return nt;return-1}function Se(pe){return pe!==pe}function de(pe,ke){var xe=pe==null?0:pe.length;return xe?Xe(pe,ke)/xe:Q}function we(pe){return function(ke){return ke==null?e:ke[pe]}}function Re(pe){return function(ke){return pe==null?e:pe[ke]}}function Le(pe,ke,xe,We,nt){return nt(pe,function(mt,Et,wt){xe=We?(We=!1,mt):ke(xe,mt,Et,wt)}),xe}function Be(pe,ke){var xe=pe.length;for(pe.sort(ke);xe--;)pe[xe]=pe[xe].value;return pe}function Xe(pe,ke){for(var xe,We=-1,nt=pe.length;++We<nt;){var mt=ke(pe[We]);mt!==e&&(xe=xe===e?mt:xe+mt)}return xe}function Qe(pe,ke){for(var xe=-1,We=Array(pe);++xe<pe;)We[xe]=ke(xe);return We}function Ke(pe,ke){return g(ke,function(xe){return[xe,pe[xe]]})}function jt(pe){return pe&&pe.slice(0,yt(pe)+1).replace(an,"")}function tt(pe){return function(ke){return pe(ke)}}function tn(pe,ke){return g(ke,function(xe){return pe[xe]})}function xt(pe,ke){return pe.has(ke)}function ut(pe,ke){for(var xe=-1,We=pe.length;++xe<We&&se(ke,pe[xe],0)>-1;);return xe}function pn(pe,ke){for(var xe=pe.length;xe--&&se(ke,pe[xe],0)>-1;);return xe}function Hn(pe,ke){for(var xe=pe.length,We=0;xe--;)pe[xe]===ke&&++We;return We}var nn=Re(Dt),j=Re(At);function Z(pe){return"\\"+hn[pe]}function re(pe,ke){return pe==null?e:pe[ke]}function oe(pe){return Xo.test(pe)}function ge(pe){return Dr.test(pe)}function be(pe){for(var ke,xe=[];!(ke=pe.next()).done;)xe.push(ke.value);return xe}function $e(pe){var ke=-1,xe=Array(pe.size);return pe.forEach(function(We,nt){xe[++ke]=[nt,We]}),xe}function Ne(pe,ke){return function(xe){return pe(ke(xe))}}function Fe(pe,ke){for(var xe=-1,We=pe.length,nt=0,mt=[];++xe<We;){var Et=pe[xe];(Et===ke||Et===s)&&(pe[xe]=s,mt[nt++]=xe)}return mt}function He(pe){var ke=-1,xe=Array(pe.size);return pe.forEach(function(We){xe[++ke]=We}),xe}function je(pe){var ke=-1,xe=Array(pe.size);return pe.forEach(function(We){xe[++ke]=[We,We]}),xe}function Ye(pe,ke,xe){for(var We=xe-1,nt=pe.length;++We<nt;)if(pe[We]===ke)return We;return-1}function dt(pe,ke,xe){for(var We=xe+1;We--;)if(pe[We]===ke)return We;return We}function Ct(pe){return oe(pe)?et(pe):H(pe)}function pt(pe){return oe(pe)?qt(pe):K(pe)}function yt(pe){for(var ke=pe.length;ke--&&Qn.test(pe.charAt(ke)););return ke}var it=Re(Hi);function et(pe){for(var ke=_i.lastIndex=0;_i.test(pe);)++ke;return ke}function qt(pe){return pe.match(_i)||[]}function rn(pe){return pe.match(bn)||[]}var $n=(function pe(ke){ke=ke==null?Vt:Tt.defaults(Vt.Object(),ke,Tt.pick(Vt,Wi));var xe=ke.Array,We=ke.Date,nt=ke.Error,mt=ke.Function,Et=ke.Math,wt=ke.Object,li=ke.RegExp,Vi=ke.String,Kt=ke.TypeError,zn=xe.prototype,Fr=mt.prototype,gn=wt.prototype,Ao=ke["__core-js_shared__"],oa=Fr.toString,Bt=gn.hasOwnProperty,vm=0,Xu=(function(){var t=/[^.]+$/.exec(Ao&&Ao.keys&&Ao.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),sa=gn.toString,ym=oa.call(wt),wm=Vt._,bm=li("^"+oa.call(Bt).replace(Yn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),aa=ai?ke.Buffer:e,ao=ke.Symbol,la=ke.Uint8Array,eh=aa?aa.allocUnsafe:e,ca=Ne(wt.getPrototypeOf,wt),th=wt.create,nh=gn.propertyIsEnumerable,ua=zn.splice,ih=ao?ao.isConcatSpreadable:e,As=ao?ao.iterator:e,$o=ao?ao.toStringTag:e,ha=(function(){try{var t=Ro(wt,"defineProperty");return t({},"",{}),t}catch{}})(),xm=ke.clearTimeout!==Vt.clearTimeout&&ke.clearTimeout,Sm=We&&We.now!==Vt.Date.now&&We.now,Cm=ke.setTimeout!==Vt.setTimeout&&ke.setTimeout,da=Et.ceil,fa=Et.floor,vl=wt.getOwnPropertySymbols,km=aa?aa.isBuffer:e,rh=ke.isFinite,_m=zn.join,Am=Ne(wt.keys,wt),In=Et.max,ei=Et.min,$m=We.now,Mm=ke.parseInt,oh=Et.random,Tm=zn.reverse,yl=Ro(ke,"DataView"),$s=Ro(ke,"Map"),wl=Ro(ke,"Promise"),es=Ro(ke,"Set"),Ms=Ro(ke,"WeakMap"),Ts=Ro(wt,"create"),pa=Ms&&new Ms,ts={},Lm=Io(yl),Em=Io($s),Rm=Io(wl),Im=Io(es),Om=Io(Ms),ga=ao?ao.prototype:e,Ls=ga?ga.valueOf:e,sh=ga?ga.toString:e;function X(t){if(mn(t)&&!gt(t)&&!(t instanceof $t)){if(t instanceof ji)return t;if(Bt.call(t,"__wrapped__"))return ad(t)}return new ji(t)}var ns=(function(){function t(){}return function(d){if(!cn(d))return{};if(th)return th(d);t.prototype=d;var M=new t;return t.prototype=e,M}})();function ma(){}function ji(t,d){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!d,this.__index__=0,this.__values__=e}X.templateSettings={escape:Ci,evaluate:Ss,interpolate:vo,variable:"",imports:{_:X}},X.prototype=ma.prototype,X.prototype.constructor=X,ji.prototype=ns(ma.prototype),ji.prototype.constructor=ji;function $t(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function Nm(){var t=new $t(this.__wrapped__);return t.__actions__=mi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=mi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=mi(this.__views__),t}function Dm(){if(this.__filtered__){var t=new $t(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Fm(){var t=this.__wrapped__.value(),d=this.__dir__,M=gt(t),U=d<0,q=M?t.length:0,ee=Yv(0,q,this.__views__),ae=ee.start,fe=ee.end,ve=fe-ae,Te=U?fe:ae-1,Ee=this.__iteratees__,Oe=Ee.length,Ue=0,Ze=ei(ve,this.__takeCount__);if(!M||!U&&q==ve&&Ze==ve)return Lh(t,this.__actions__);var st=[];e:for(;ve--&&Ue<Ze;){Te+=d;for(var bt=-1,at=t[Te];++bt<Oe;){var kt=Ee[bt],Lt=kt.iteratee,Ri=kt.type,hi=Lt(at);if(Ri==S)at=hi;else if(!hi){if(Ri==_)continue e;break e}}st[Ue++]=at}return st}$t.prototype=ns(ma.prototype),$t.prototype.constructor=$t;function Mo(t){var d=-1,M=t==null?0:t.length;for(this.clear();++d<M;){var U=t[d];this.set(U[0],U[1])}}function Pm(){this.__data__=Ts?Ts(null):{},this.size=0}function Bm(t){var d=this.has(t)&&delete this.__data__[t];return this.size-=d?1:0,d}function Wm(t){var d=this.__data__;if(Ts){var M=d[t];return M===f?e:M}return Bt.call(d,t)?d[t]:e}function Hm(t){var d=this.__data__;return Ts?d[t]!==e:Bt.call(d,t)}function zm(t,d){var M=this.__data__;return this.size+=this.has(t)?0:1,M[t]=Ts&&d===e?f:d,this}Mo.prototype.clear=Pm,Mo.prototype.delete=Bm,Mo.prototype.get=Wm,Mo.prototype.has=Hm,Mo.prototype.set=zm;function Pr(t){var d=-1,M=t==null?0:t.length;for(this.clear();++d<M;){var U=t[d];this.set(U[0],U[1])}}function Um(){this.__data__=[],this.size=0}function Vm(t){var d=this.__data__,M=va(d,t);if(M<0)return!1;var U=d.length-1;return M==U?d.pop():ua.call(d,M,1),--this.size,!0}function jm(t){var d=this.__data__,M=va(d,t);return M<0?e:d[M][1]}function Km(t){return va(this.__data__,t)>-1}function Gm(t,d){var M=this.__data__,U=va(M,t);return U<0?(++this.size,M.push([t,d])):M[U][1]=d,this}Pr.prototype.clear=Um,Pr.prototype.delete=Vm,Pr.prototype.get=jm,Pr.prototype.has=Km,Pr.prototype.set=Gm;function Br(t){var d=-1,M=t==null?0:t.length;for(this.clear();++d<M;){var U=t[d];this.set(U[0],U[1])}}function qm(){this.size=0,this.__data__={hash:new Mo,map:new($s||Pr),string:new Mo}}function Ym(t){var d=Ta(this,t).delete(t);return this.size-=d?1:0,d}function Qm(t){return Ta(this,t).get(t)}function Zm(t){return Ta(this,t).has(t)}function Jm(t,d){var M=Ta(this,t),U=M.size;return M.set(t,d),this.size+=M.size==U?0:1,this}Br.prototype.clear=qm,Br.prototype.delete=Ym,Br.prototype.get=Qm,Br.prototype.has=Zm,Br.prototype.set=Jm;function To(t){var d=-1,M=t==null?0:t.length;for(this.__data__=new Br;++d<M;)this.add(t[d])}function Xm(t){return this.__data__.set(t,f),this}function ev(t){return this.__data__.has(t)}To.prototype.add=To.prototype.push=Xm,To.prototype.has=ev;function lr(t){var d=this.__data__=new Pr(t);this.size=d.size}function tv(){this.__data__=new Pr,this.size=0}function nv(t){var d=this.__data__,M=d.delete(t);return this.size=d.size,M}function iv(t){return this.__data__.get(t)}function rv(t){return this.__data__.has(t)}function ov(t,d){var M=this.__data__;if(M instanceof Pr){var U=M.__data__;if(!$s||U.length<$-1)return U.push([t,d]),this.size=++M.size,this;M=this.__data__=new Br(U)}return M.set(t,d),this.size=M.size,this}lr.prototype.clear=tv,lr.prototype.delete=nv,lr.prototype.get=iv,lr.prototype.has=rv,lr.prototype.set=ov;function ah(t,d){var M=gt(t),U=!M&&Oo(t),q=!M&&!U&&fo(t),ee=!M&&!U&&!q&&ss(t),ae=M||U||q||ee,fe=ae?Qe(t.length,Vi):[],ve=fe.length;for(var Te in t)(d||Bt.call(t,Te))&&!(ae&&(Te=="length"||q&&(Te=="offset"||Te=="parent")||ee&&(Te=="buffer"||Te=="byteLength"||Te=="byteOffset")||Ur(Te,ve)))&&fe.push(Te);return fe}function lh(t){var d=t.length;return d?t[Ll(0,d-1)]:e}function sv(t,d){return La(mi(t),Lo(d,0,t.length))}function av(t){return La(mi(t))}function bl(t,d,M){(M!==e&&!cr(t[d],M)||M===e&&!(d in t))&&Wr(t,d,M)}function Es(t,d,M){var U=t[d];(!(Bt.call(t,d)&&cr(U,M))||M===e&&!(d in t))&&Wr(t,d,M)}function va(t,d){for(var M=t.length;M--;)if(cr(t[M][0],d))return M;return-1}function lv(t,d,M,U){return lo(t,function(q,ee,ae){d(U,q,M(q),ae)}),U}function ch(t,d){return t&&Cr(d,Un(d),t)}function cv(t,d){return t&&Cr(d,yi(d),t)}function Wr(t,d,M){d=="__proto__"&&ha?ha(t,d,{configurable:!0,enumerable:!0,value:M,writable:!0}):t[d]=M}function xl(t,d){for(var M=-1,U=d.length,q=xe(U),ee=t==null;++M<U;)q[M]=ee?e:tc(t,d[M]);return q}function Lo(t,d,M){return t===t&&(M!==e&&(t=t<=M?t:M),d!==e&&(t=t>=d?t:d)),t}function Ki(t,d,M,U,q,ee){var ae,fe=d&o,ve=d&a,Te=d&r;if(M&&(ae=q?M(t,U,q,ee):M(t)),ae!==e)return ae;if(!cn(t))return t;var Ee=gt(t);if(Ee){if(ae=Zv(t),!fe)return mi(t,ae)}else{var Oe=ti(t),Ue=Oe==Ve||Oe==ot;if(fo(t))return Ih(t,fe);if(Oe==vn||Oe==ue||Ue&&!q){if(ae=ve||Ue?{}:Jh(t),!fe)return ve?Wv(t,cv(ae,t)):Bv(t,ch(ae,t))}else{if(!Rt[Oe])return q?t:{};ae=Jv(t,Oe,fe)}}ee||(ee=new lr);var Ze=ee.get(t);if(Ze)return Ze;ee.set(t,ae),$d(t)?t.forEach(function(at){ae.add(Ki(at,d,M,at,t,ee))}):_d(t)&&t.forEach(function(at,kt){ae.set(kt,Ki(at,d,M,kt,t,ee))});var st=Te?ve?Hl:Wl:ve?yi:Un,bt=Ee?e:st(t);return jn(bt||t,function(at,kt){bt&&(kt=at,at=t[kt]),Es(ae,kt,Ki(at,d,M,kt,t,ee))}),ae}function uv(t){var d=Un(t);return function(M){return uh(M,t,d)}}function uh(t,d,M){var U=M.length;if(t==null)return!U;for(t=wt(t);U--;){var q=M[U],ee=d[q],ae=t[q];if(ae===e&&!(q in t)||!ee(ae))return!1}return!0}function hh(t,d,M){if(typeof t!="function")throw new Kt(v);return Ps(function(){t.apply(e,M)},d)}function Rs(t,d,M,U){var q=-1,ee=Mi,ae=!0,fe=t.length,ve=[],Te=d.length;if(!fe)return ve;M&&(d=g(d,tt(M))),U?(ee=Ti,ae=!1):d.length>=$&&(ee=xt,ae=!1,d=new To(d));e:for(;++q<fe;){var Ee=t[q],Oe=M==null?Ee:M(Ee);if(Ee=U||Ee!==0?Ee:0,ae&&Oe===Oe){for(var Ue=Te;Ue--;)if(d[Ue]===Oe)continue e;ve.push(Ee)}else ee(d,Oe,U)||ve.push(Ee)}return ve}var lo=Ph(Sr),dh=Ph(Cl,!0);function hv(t,d){var M=!0;return lo(t,function(U,q,ee){return M=!!d(U,q,ee),M}),M}function ya(t,d,M){for(var U=-1,q=t.length;++U<q;){var ee=t[U],ae=d(ee);if(ae!=null&&(fe===e?ae===ae&&!Ei(ae):M(ae,fe)))var fe=ae,ve=ee}return ve}function dv(t,d,M,U){var q=t.length;for(M=vt(M),M<0&&(M=-M>q?0:q+M),U=U===e||U>q?q:vt(U),U<0&&(U+=q),U=M>U?0:Td(U);M<U;)t[M++]=d;return t}function fh(t,d){var M=[];return lo(t,function(U,q,ee){d(U,q,ee)&&M.push(U)}),M}function Gn(t,d,M,U,q){var ee=-1,ae=t.length;for(M||(M=ey),q||(q=[]);++ee<ae;){var fe=t[ee];d>0&&M(fe)?d>1?Gn(fe,d-1,M,U,q):A(q,fe):U||(q[q.length]=fe)}return q}var Sl=Bh(),ph=Bh(!0);function Sr(t,d){return t&&Sl(t,d,Un)}function Cl(t,d){return t&&ph(t,d,Un)}function wa(t,d){return Xn(d,function(M){return Vr(t[M])})}function Eo(t,d){d=uo(d,t);for(var M=0,U=d.length;t!=null&&M<U;)t=t[kr(d[M++])];return M&&M==U?t:e}function gh(t,d,M){var U=d(t);return gt(t)?U:A(U,M(t))}function ci(t){return t==null?t===e?ft:zt:$o&&$o in wt(t)?qv(t):ay(t)}function kl(t,d){return t>d}function fv(t,d){return t!=null&&Bt.call(t,d)}function pv(t,d){return t!=null&&d in wt(t)}function gv(t,d,M){return t>=ei(d,M)&&t<In(d,M)}function _l(t,d,M){for(var U=M?Ti:Mi,q=t[0].length,ee=t.length,ae=ee,fe=xe(ee),ve=1/0,Te=[];ae--;){var Ee=t[ae];ae&&d&&(Ee=g(Ee,tt(d))),ve=ei(Ee.length,ve),fe[ae]=!M&&(d||q>=120&&Ee.length>=120)?new To(ae&&Ee):e}Ee=t[0];var Oe=-1,Ue=fe[0];e:for(;++Oe<q&&Te.length<ve;){var Ze=Ee[Oe],st=d?d(Ze):Ze;if(Ze=M||Ze!==0?Ze:0,!(Ue?xt(Ue,st):U(Te,st,M))){for(ae=ee;--ae;){var bt=fe[ae];if(!(bt?xt(bt,st):U(t[ae],st,M)))continue e}Ue&&Ue.push(st),Te.push(Ze)}}return Te}function mv(t,d,M,U){return Sr(t,function(q,ee,ae){d(U,M(q),ee,ae)}),U}function Is(t,d,M){d=uo(d,t),t=nd(t,d);var U=t==null?t:t[kr(qi(d))];return U==null?e:Bn(U,t,M)}function mh(t){return mn(t)&&ci(t)==ue}function vv(t){return mn(t)&&ci(t)==Gt}function yv(t){return mn(t)&&ci(t)==Ae}function Os(t,d,M,U,q){return t===d?!0:t==null||d==null||!mn(t)&&!mn(d)?t!==t&&d!==d:wv(t,d,M,U,Os,q)}function wv(t,d,M,U,q,ee){var ae=gt(t),fe=gt(d),ve=ae?le:ti(t),Te=fe?le:ti(d);ve=ve==ue?vn:ve,Te=Te==ue?vn:Te;var Ee=ve==vn,Oe=Te==vn,Ue=ve==Te;if(Ue&&fo(t)){if(!fo(d))return!1;ae=!0,Ee=!1}if(Ue&&!Ee)return ee||(ee=new lr),ae||ss(t)?Yh(t,d,M,U,q,ee):Kv(t,d,ve,M,U,q,ee);if(!(M&n)){var Ze=Ee&&Bt.call(t,"__wrapped__"),st=Oe&&Bt.call(d,"__wrapped__");if(Ze||st){var bt=Ze?t.value():t,at=st?d.value():d;return ee||(ee=new lr),q(bt,at,M,U,ee)}}return Ue?(ee||(ee=new lr),Gv(t,d,M,U,q,ee)):!1}function bv(t){return mn(t)&&ti(t)==Je}function Al(t,d,M,U){var q=M.length,ee=q,ae=!U;if(t==null)return!ee;for(t=wt(t);q--;){var fe=M[q];if(ae&&fe[2]?fe[1]!==t[fe[0]]:!(fe[0]in t))return!1}for(;++q<ee;){fe=M[q];var ve=fe[0],Te=t[ve],Ee=fe[1];if(ae&&fe[2]){if(Te===e&&!(ve in t))return!1}else{var Oe=new lr;if(U)var Ue=U(Te,Ee,ve,t,d,Oe);if(!(Ue===e?Os(Ee,Te,n|i,U,Oe):Ue))return!1}}return!0}function vh(t){if(!cn(t)||ny(t))return!1;var d=Vr(t)?bm:Zn;return d.test(Io(t))}function xv(t){return mn(t)&&ci(t)==on}function Sv(t){return mn(t)&&ti(t)==kn}function Cv(t){return mn(t)&&Da(t.length)&&!!Nt[ci(t)]}function yh(t){return typeof t=="function"?t:t==null?wi:typeof t=="object"?gt(t)?xh(t[0],t[1]):bh(t):Wd(t)}function $l(t){if(!Fs(t))return Am(t);var d=[];for(var M in wt(t))Bt.call(t,M)&&M!="constructor"&&d.push(M);return d}function kv(t){if(!cn(t))return sy(t);var d=Fs(t),M=[];for(var U in t)U=="constructor"&&(d||!Bt.call(t,U))||M.push(U);return M}function Ml(t,d){return t<d}function wh(t,d){var M=-1,U=vi(t)?xe(t.length):[];return lo(t,function(q,ee,ae){U[++M]=d(q,ee,ae)}),U}function bh(t){var d=Ul(t);return d.length==1&&d[0][2]?ed(d[0][0],d[0][1]):function(M){return M===t||Al(M,t,d)}}function xh(t,d){return jl(t)&&Xh(d)?ed(kr(t),d):function(M){var U=tc(M,t);return U===e&&U===d?nc(M,t):Os(d,U,n|i)}}function ba(t,d,M,U,q){t!==d&&Sl(d,function(ee,ae){if(q||(q=new lr),cn(ee))_v(t,d,ae,M,ba,U,q);else{var fe=U?U(Gl(t,ae),ee,ae+"",t,d,q):e;fe===e&&(fe=ee),bl(t,ae,fe)}},yi)}function _v(t,d,M,U,q,ee,ae){var fe=Gl(t,M),ve=Gl(d,M),Te=ae.get(ve);if(Te){bl(t,M,Te);return}var Ee=ee?ee(fe,ve,M+"",t,d,ae):e,Oe=Ee===e;if(Oe){var Ue=gt(ve),Ze=!Ue&&fo(ve),st=!Ue&&!Ze&&ss(ve);Ee=ve,Ue||Ze||st?gt(fe)?Ee=fe:xn(fe)?Ee=mi(fe):Ze?(Oe=!1,Ee=Ih(ve,!0)):st?(Oe=!1,Ee=Oh(ve,!0)):Ee=[]:Bs(ve)||Oo(ve)?(Ee=fe,Oo(fe)?Ee=Ld(fe):(!cn(fe)||Vr(fe))&&(Ee=Jh(ve))):Oe=!1}Oe&&(ae.set(ve,Ee),q(Ee,ve,U,ee,ae),ae.delete(ve)),bl(t,M,Ee)}function Sh(t,d){var M=t.length;if(M)return d+=d<0?M:0,Ur(d,M)?t[d]:e}function Ch(t,d,M){d.length?d=g(d,function(ee){return gt(ee)?function(ae){return Eo(ae,ee.length===1?ee[0]:ee)}:ee}):d=[wi];var U=-1;d=g(d,tt(rt()));var q=wh(t,function(ee,ae,fe){var ve=g(d,function(Te){return Te(ee)});return{criteria:ve,index:++U,value:ee}});return Be(q,function(ee,ae){return Pv(ee,ae,M)})}function Av(t,d){return kh(t,d,function(M,U){return nc(t,U)})}function kh(t,d,M){for(var U=-1,q=d.length,ee={};++U<q;){var ae=d[U],fe=Eo(t,ae);M(fe,ae)&&Ns(ee,uo(ae,t),fe)}return ee}function $v(t){return function(d){return Eo(d,t)}}function Tl(t,d,M,U){var q=U?ye:se,ee=-1,ae=d.length,fe=t;for(t===d&&(d=mi(d)),M&&(fe=g(t,tt(M)));++ee<ae;)for(var ve=0,Te=d[ee],Ee=M?M(Te):Te;(ve=q(fe,Ee,ve,U))>-1;)fe!==t&&ua.call(fe,ve,1),ua.call(t,ve,1);return t}function _h(t,d){for(var M=t?d.length:0,U=M-1;M--;){var q=d[M];if(M==U||q!==ee){var ee=q;Ur(q)?ua.call(t,q,1):Il(t,q)}}return t}function Ll(t,d){return t+fa(oh()*(d-t+1))}function Mv(t,d,M,U){for(var q=-1,ee=In(da((d-t)/(M||1)),0),ae=xe(ee);ee--;)ae[U?ee:++q]=t,t+=M;return ae}function El(t,d){var M="";if(!t||d<1||d>V)return M;do d%2&&(M+=t),d=fa(d/2),d&&(t+=t);while(d);return M}function St(t,d){return ql(td(t,d,wi),t+"")}function Tv(t){return lh(as(t))}function Lv(t,d){var M=as(t);return La(M,Lo(d,0,M.length))}function Ns(t,d,M,U){if(!cn(t))return t;d=uo(d,t);for(var q=-1,ee=d.length,ae=ee-1,fe=t;fe!=null&&++q<ee;){var ve=kr(d[q]),Te=M;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return t;if(q!=ae){var Ee=fe[ve];Te=U?U(Ee,ve,fe):e,Te===e&&(Te=cn(Ee)?Ee:Ur(d[q+1])?[]:{})}Es(fe,ve,Te),fe=fe[ve]}return t}var Ah=pa?function(t,d){return pa.set(t,d),t}:wi,Ev=ha?function(t,d){return ha(t,"toString",{configurable:!0,enumerable:!1,value:rc(d),writable:!0})}:wi;function Rv(t){return La(as(t))}function Gi(t,d,M){var U=-1,q=t.length;d<0&&(d=-d>q?0:q+d),M=M>q?q:M,M<0&&(M+=q),q=d>M?0:M-d>>>0,d>>>=0;for(var ee=xe(q);++U<q;)ee[U]=t[U+d];return ee}function Iv(t,d){var M;return lo(t,function(U,q,ee){return M=d(U,q,ee),!M}),!!M}function xa(t,d,M){var U=0,q=t==null?U:t.length;if(typeof d=="number"&&d===d&&q<=ne){for(;U<q;){var ee=U+q>>>1,ae=t[ee];ae!==null&&!Ei(ae)&&(M?ae<=d:ae<d)?U=ee+1:q=ee}return q}return Rl(t,d,wi,M)}function Rl(t,d,M,U){var q=0,ee=t==null?0:t.length;if(ee===0)return 0;d=M(d);for(var ae=d!==d,fe=d===null,ve=Ei(d),Te=d===e;q<ee;){var Ee=fa((q+ee)/2),Oe=M(t[Ee]),Ue=Oe!==e,Ze=Oe===null,st=Oe===Oe,bt=Ei(Oe);if(ae)var at=U||st;else Te?at=st&&(U||Ue):fe?at=st&&Ue&&(U||!Ze):ve?at=st&&Ue&&!Ze&&(U||!bt):Ze||bt?at=!1:at=U?Oe<=d:Oe<d;at?q=Ee+1:ee=Ee}return ei(ee,ce)}function $h(t,d){for(var M=-1,U=t.length,q=0,ee=[];++M<U;){var ae=t[M],fe=d?d(ae):ae;if(!M||!cr(fe,ve)){var ve=fe;ee[q++]=ae===0?0:ae}}return ee}function Mh(t){return typeof t=="number"?t:Ei(t)?Q:+t}function Li(t){if(typeof t=="string")return t;if(gt(t))return g(t,Li)+"";if(Ei(t))return sh?sh.call(t):"";var d=t+"";return d=="0"&&1/t==-W?"-0":d}function co(t,d,M){var U=-1,q=Mi,ee=t.length,ae=!0,fe=[],ve=fe;if(M)ae=!1,q=Ti;else if(ee>=$){var Te=d?null:Vv(t);if(Te)return He(Te);ae=!1,q=xt,ve=new To}else ve=d?[]:fe;e:for(;++U<ee;){var Ee=t[U],Oe=d?d(Ee):Ee;if(Ee=M||Ee!==0?Ee:0,ae&&Oe===Oe){for(var Ue=ve.length;Ue--;)if(ve[Ue]===Oe)continue e;d&&ve.push(Oe),fe.push(Ee)}else q(ve,Oe,M)||(ve!==fe&&ve.push(Oe),fe.push(Ee))}return fe}function Il(t,d){d=uo(d,t);var M=-1,U=d.length;if(!U)return!0;for(var q=t==null||typeof t!="object"&&typeof t!="function";++M<U;){var ee=d[M];if(typeof ee=="string"){if(ee==="__proto__"&&!Bt.call(t,"__proto__"))return!1;if(ee==="constructor"&&M+1<U&&typeof d[M+1]=="string"&&d[M+1]==="prototype"){if(q&&M===0)continue;return!1}}}var ae=nd(t,d);return ae==null||delete ae[kr(qi(d))]}function Th(t,d,M,U){return Ns(t,d,M(Eo(t,d)),U)}function Sa(t,d,M,U){for(var q=t.length,ee=U?q:-1;(U?ee--:++ee<q)&&d(t[ee],ee,t););return M?Gi(t,U?0:ee,U?ee+1:q):Gi(t,U?ee+1:0,U?q:ee)}function Lh(t,d){var M=t;return M instanceof $t&&(M=M.value()),C(d,function(U,q){return q.func.apply(q.thisArg,A([U],q.args))},M)}function Ol(t,d,M){var U=t.length;if(U<2)return U?co(t[0]):[];for(var q=-1,ee=xe(U);++q<U;)for(var ae=t[q],fe=-1;++fe<U;)fe!=q&&(ee[q]=Rs(ee[q]||ae,t[fe],d,M));return co(Gn(ee,1),d,M)}function Eh(t,d,M){for(var U=-1,q=t.length,ee=d.length,ae={};++U<q;){var fe=U<ee?d[U]:e;M(ae,t[U],fe)}return ae}function Nl(t){return xn(t)?t:[]}function Dl(t){return typeof t=="function"?t:wi}function uo(t,d){return gt(t)?t:jl(t,d)?[t]:sd(Wt(t))}var Ov=St;function ho(t,d,M){var U=t.length;return M=M===e?U:M,!d&&M>=U?t:Gi(t,d,M)}var Rh=xm||function(t){return Vt.clearTimeout(t)};function Ih(t,d){if(d)return t.slice();var M=t.length,U=eh?eh(M):new t.constructor(M);return t.copy(U),U}function Fl(t){var d=new t.constructor(t.byteLength);return new la(d).set(new la(t)),d}function Nv(t,d){var M=d?Fl(t.buffer):t.buffer;return new t.constructor(M,t.byteOffset,t.byteLength)}function Dv(t){var d=new t.constructor(t.source,ki.exec(t));return d.lastIndex=t.lastIndex,d}function Fv(t){return Ls?wt(Ls.call(t)):{}}function Oh(t,d){var M=d?Fl(t.buffer):t.buffer;return new t.constructor(M,t.byteOffset,t.length)}function Nh(t,d){if(t!==d){var M=t!==e,U=t===null,q=t===t,ee=Ei(t),ae=d!==e,fe=d===null,ve=d===d,Te=Ei(d);if(!fe&&!Te&&!ee&&t>d||ee&&ae&&ve&&!fe&&!Te||U&&ae&&ve||!M&&ve||!q)return 1;if(!U&&!ee&&!Te&&t<d||Te&&M&&q&&!U&&!ee||fe&&M&&q||!ae&&q||!ve)return-1}return 0}function Pv(t,d,M){for(var U=-1,q=t.criteria,ee=d.criteria,ae=q.length,fe=M.length;++U<ae;){var ve=Nh(q[U],ee[U]);if(ve){if(U>=fe)return ve;var Te=M[U];return ve*(Te=="desc"?-1:1)}}return t.index-d.index}function Dh(t,d,M,U){for(var q=-1,ee=t.length,ae=M.length,fe=-1,ve=d.length,Te=In(ee-ae,0),Ee=xe(ve+Te),Oe=!U;++fe<ve;)Ee[fe]=d[fe];for(;++q<ae;)(Oe||q<ee)&&(Ee[M[q]]=t[q]);for(;Te--;)Ee[fe++]=t[q++];return Ee}function Fh(t,d,M,U){for(var q=-1,ee=t.length,ae=-1,fe=M.length,ve=-1,Te=d.length,Ee=In(ee-fe,0),Oe=xe(Ee+Te),Ue=!U;++q<Ee;)Oe[q]=t[q];for(var Ze=q;++ve<Te;)Oe[Ze+ve]=d[ve];for(;++ae<fe;)(Ue||q<ee)&&(Oe[Ze+M[ae]]=t[q++]);return Oe}function mi(t,d){var M=-1,U=t.length;for(d||(d=xe(U));++M<U;)d[M]=t[M];return d}function Cr(t,d,M,U){var q=!M;M||(M={});for(var ee=-1,ae=d.length;++ee<ae;){var fe=d[ee],ve=U?U(M[fe],t[fe],fe,M,t):e;ve===e&&(ve=t[fe]),q?Wr(M,fe,ve):Es(M,fe,ve)}return M}function Bv(t,d){return Cr(t,Vl(t),d)}function Wv(t,d){return Cr(t,Qh(t),d)}function Ca(t,d){return function(M,U){var q=gt(M)?Wn:lv,ee=d?d():{};return q(M,t,rt(U,2),ee)}}function is(t){return St(function(d,M){var U=-1,q=M.length,ee=q>1?M[q-1]:e,ae=q>2?M[2]:e;for(ee=t.length>3&&typeof ee=="function"?(q--,ee):e,ae&&ui(M[0],M[1],ae)&&(ee=q<3?e:ee,q=1),d=wt(d);++U<q;){var fe=M[U];fe&&t(d,fe,U,ee)}return d})}function Ph(t,d){return function(M,U){if(M==null)return M;if(!vi(M))return t(M,U);for(var q=M.length,ee=d?q:-1,ae=wt(M);(d?ee--:++ee<q)&&U(ae[ee],ee,ae)!==!1;);return M}}function Bh(t){return function(d,M,U){for(var q=-1,ee=wt(d),ae=U(d),fe=ae.length;fe--;){var ve=ae[t?fe:++q];if(M(ee[ve],ve,ee)===!1)break}return d}}function Hv(t,d,M){var U=d&h,q=Ds(t);function ee(){var ae=this&&this!==Vt&&this instanceof ee?q:t;return ae.apply(U?M:this,arguments)}return ee}function Wh(t){return function(d){d=Wt(d);var M=oe(d)?pt(d):e,U=M?M[0]:d.charAt(0),q=M?ho(M,1).join(""):d.slice(1);return U[t]()+q}}function rs(t){return function(d){return C(Pd(Fd(d).replace(ln,"")),t,"")}}function Ds(t){return function(){var d=arguments;switch(d.length){case 0:return new t;case 1:return new t(d[0]);case 2:return new t(d[0],d[1]);case 3:return new t(d[0],d[1],d[2]);case 4:return new t(d[0],d[1],d[2],d[3]);case 5:return new t(d[0],d[1],d[2],d[3],d[4]);case 6:return new t(d[0],d[1],d[2],d[3],d[4],d[5]);case 7:return new t(d[0],d[1],d[2],d[3],d[4],d[5],d[6])}var M=ns(t.prototype),U=t.apply(M,d);return cn(U)?U:M}}function zv(t,d,M){var U=Ds(t);function q(){for(var ee=arguments.length,ae=xe(ee),fe=ee,ve=os(q);fe--;)ae[fe]=arguments[fe];var Te=ee<3&&ae[0]!==ve&&ae[ee-1]!==ve?[]:Fe(ae,ve);if(ee-=Te.length,ee<M)return jh(t,d,ka,q.placeholder,e,ae,Te,e,e,M-ee);var Ee=this&&this!==Vt&&this instanceof q?U:t;return Bn(Ee,this,ae)}return q}function Hh(t){return function(d,M,U){var q=wt(d);if(!vi(d)){var ee=rt(M,3);d=Un(d),M=function(fe){return ee(q[fe],fe,q)}}var ae=t(d,M,U);return ae>-1?q[ee?d[ae]:ae]:e}}function zh(t){return zr(function(d){var M=d.length,U=M,q=ji.prototype.thru;for(t&&d.reverse();U--;){var ee=d[U];if(typeof ee!="function")throw new Kt(v);if(q&&!ae&&Ma(ee)=="wrapper")var ae=new ji([],!0)}for(U=ae?U:M;++U<M;){ee=d[U];var fe=Ma(ee),ve=fe=="wrapper"?zl(ee):e;ve&&Kl(ve[0])&&ve[1]==(R|L|k|D)&&!ve[4].length&&ve[9]==1?ae=ae[Ma(ve[0])].apply(ae,ve[3]):ae=ee.length==1&&Kl(ee)?ae[fe]():ae.thru(ee)}return function(){var Te=arguments,Ee=Te[0];if(ae&&Te.length==1&&gt(Ee))return ae.plant(Ee).value();for(var Oe=0,Ue=M?d[Oe].apply(this,Te):Ee;++Oe<M;)Ue=d[Oe].call(this,Ue);return Ue}})}function ka(t,d,M,U,q,ee,ae,fe,ve,Te){var Ee=d&R,Oe=d&h,Ue=d&m,Ze=d&(L|T),st=d&I,bt=Ue?e:Ds(t);function at(){for(var kt=arguments.length,Lt=xe(kt),Ri=kt;Ri--;)Lt[Ri]=arguments[Ri];if(Ze)var hi=os(at),Ii=Hn(Lt,hi);if(U&&(Lt=Dh(Lt,U,q,Ze)),ee&&(Lt=Fh(Lt,ee,ae,Ze)),kt-=Ii,Ze&&kt<Te){var Sn=Fe(Lt,hi);return jh(t,d,ka,at.placeholder,M,Lt,Sn,fe,ve,Te-kt)}var ur=Oe?M:this,Kr=Ue?ur[t]:t;return kt=Lt.length,fe?Lt=ly(Lt,fe):st&&kt>1&&Lt.reverse(),Ee&&ve<kt&&(Lt.length=ve),this&&this!==Vt&&this instanceof at&&(Kr=bt||Ds(Kr)),Kr.apply(ur,Lt)}return at}function Uh(t,d){return function(M,U){return mv(M,t,d(U),{})}}function _a(t,d){return function(M,U){var q;if(M===e&&U===e)return d;if(M!==e&&(q=M),U!==e){if(q===e)return U;typeof M=="string"||typeof U=="string"?(M=Li(M),U=Li(U)):(M=Mh(M),U=Mh(U)),q=t(M,U)}return q}}function Pl(t){return zr(function(d){return d=g(d,tt(rt())),St(function(M){var U=this;return t(d,function(q){return Bn(q,U,M)})})})}function Aa(t,d){d=d===e?" ":Li(d);var M=d.length;if(M<2)return M?El(d,t):d;var U=El(d,da(t/Ct(d)));return oe(d)?ho(pt(U),0,t).join(""):U.slice(0,t)}function Uv(t,d,M,U){var q=d&h,ee=Ds(t);function ae(){for(var fe=-1,ve=arguments.length,Te=-1,Ee=U.length,Oe=xe(Ee+ve),Ue=this&&this!==Vt&&this instanceof ae?ee:t;++Te<Ee;)Oe[Te]=U[Te];for(;ve--;)Oe[Te++]=arguments[++fe];return Bn(Ue,q?M:this,Oe)}return ae}function Vh(t){return function(d,M,U){return U&&typeof U!="number"&&ui(d,M,U)&&(M=U=e),d=jr(d),M===e?(M=d,d=0):M=jr(M),U=U===e?d<M?1:-1:jr(U),Mv(d,M,U,t)}}function $a(t){return function(d,M){return typeof d=="string"&&typeof M=="string"||(d=Yi(d),M=Yi(M)),t(d,M)}}function jh(t,d,M,U,q,ee,ae,fe,ve,Te){var Ee=d&L,Oe=Ee?ae:e,Ue=Ee?e:ae,Ze=Ee?ee:e,st=Ee?e:ee;d|=Ee?k:w,d&=~(Ee?w:k),d&y||(d&=-4);var bt=[t,d,q,Ze,Oe,st,Ue,fe,ve,Te],at=M.apply(e,bt);return Kl(t)&&id(at,bt),at.placeholder=U,rd(at,t,d)}function Bl(t){var d=Et[t];return function(M,U){if(M=Yi(M),U=U==null?0:ei(vt(U),292),U&&rh(M)){var q=(Wt(M)+"e").split("e"),ee=d(q[0]+"e"+(+q[1]+U));return q=(Wt(ee)+"e").split("e"),+(q[0]+"e"+(+q[1]-U))}return d(M)}}var Vv=es&&1/He(new es([,-0]))[1]==W?function(t){return new es(t)}:ac;function Kh(t){return function(d){var M=ti(d);return M==Je?$e(d):M==kn?je(d):Ke(d,t(d))}}function Hr(t,d,M,U,q,ee,ae,fe){var ve=d&m;if(!ve&&typeof t!="function")throw new Kt(v);var Te=U?U.length:0;if(Te||(d&=-97,U=q=e),ae=ae===e?ae:In(vt(ae),0),fe=fe===e?fe:vt(fe),Te-=q?q.length:0,d&w){var Ee=U,Oe=q;U=q=e}var Ue=ve?e:zl(t),Ze=[t,d,M,U,q,Ee,Oe,ee,ae,fe];if(Ue&&oy(Ze,Ue),t=Ze[0],d=Ze[1],M=Ze[2],U=Ze[3],q=Ze[4],fe=Ze[9]=Ze[9]===e?ve?0:t.length:In(Ze[9]-Te,0),!fe&&d&(L|T)&&(d&=-25),!d||d==h)var st=Hv(t,d,M);else d==L||d==T?st=zv(t,d,fe):(d==k||d==(h|k))&&!q.length?st=Uv(t,d,M,U):st=ka.apply(e,Ze);var bt=Ue?Ah:id;return rd(bt(st,Ze),t,d)}function Gh(t,d,M,U){return t===e||cr(t,gn[M])&&!Bt.call(U,M)?d:t}function qh(t,d,M,U,q,ee){return cn(t)&&cn(d)&&(ee.set(d,t),ba(t,d,e,qh,ee),ee.delete(d)),t}function jv(t){return Bs(t)?e:t}function Yh(t,d,M,U,q,ee){var ae=M&n,fe=t.length,ve=d.length;if(fe!=ve&&!(ae&&ve>fe))return!1;var Te=ee.get(t),Ee=ee.get(d);if(Te&&Ee)return Te==d&&Ee==t;var Oe=-1,Ue=!0,Ze=M&i?new To:e;for(ee.set(t,d),ee.set(d,t);++Oe<fe;){var st=t[Oe],bt=d[Oe];if(U)var at=ae?U(bt,st,Oe,d,t,ee):U(st,bt,Oe,t,d,ee);if(at!==e){if(at)continue;Ue=!1;break}if(Ze){if(!B(d,function(kt,Lt){if(!xt(Ze,Lt)&&(st===kt||q(st,kt,M,U,ee)))return Ze.push(Lt)})){Ue=!1;break}}else if(!(st===bt||q(st,bt,M,U,ee))){Ue=!1;break}}return ee.delete(t),ee.delete(d),Ue}function Kv(t,d,M,U,q,ee,ae){switch(M){case _n:if(t.byteLength!=d.byteLength||t.byteOffset!=d.byteOffset)return!1;t=t.buffer,d=d.buffer;case Gt:return!(t.byteLength!=d.byteLength||!ee(new la(t),new la(d)));case _e:case Ae:case lt:return cr(+t,+d);case qe:return t.name==d.name&&t.message==d.message;case on:case Fn:return t==d+"";case Je:var fe=$e;case kn:var ve=U&n;if(fe||(fe=He),t.size!=d.size&&!ve)return!1;var Te=ae.get(t);if(Te)return Te==d;U|=i,ae.set(t,d);var Ee=Yh(fe(t),fe(d),U,q,ee,ae);return ae.delete(t),Ee;case ri:if(Ls)return Ls.call(t)==Ls.call(d)}return!1}function Gv(t,d,M,U,q,ee){var ae=M&n,fe=Wl(t),ve=fe.length,Te=Wl(d),Ee=Te.length;if(ve!=Ee&&!ae)return!1;for(var Oe=ve;Oe--;){var Ue=fe[Oe];if(!(ae?Ue in d:Bt.call(d,Ue)))return!1}var Ze=ee.get(t),st=ee.get(d);if(Ze&&st)return Ze==d&&st==t;var bt=!0;ee.set(t,d),ee.set(d,t);for(var at=ae;++Oe<ve;){Ue=fe[Oe];var kt=t[Ue],Lt=d[Ue];if(U)var Ri=ae?U(Lt,kt,Ue,d,t,ee):U(kt,Lt,Ue,t,d,ee);if(!(Ri===e?kt===Lt||q(kt,Lt,M,U,ee):Ri)){bt=!1;break}at||(at=Ue=="constructor")}if(bt&&!at){var hi=t.constructor,Ii=d.constructor;hi!=Ii&&"constructor"in t&&"constructor"in d&&!(typeof hi=="function"&&hi instanceof hi&&typeof Ii=="function"&&Ii instanceof Ii)&&(bt=!1)}return ee.delete(t),ee.delete(d),bt}function zr(t){return ql(td(t,e,ud),t+"")}function Wl(t){return gh(t,Un,Vl)}function Hl(t){return gh(t,yi,Qh)}var zl=pa?function(t){return pa.get(t)}:ac;function Ma(t){for(var d=t.name+"",M=ts[d],U=Bt.call(ts,d)?M.length:0;U--;){var q=M[U],ee=q.func;if(ee==null||ee==t)return q.name}return d}function os(t){var d=Bt.call(X,"placeholder")?X:t;return d.placeholder}function rt(){var t=X.iteratee||oc;return t=t===oc?yh:t,arguments.length?t(arguments[0],arguments[1]):t}function Ta(t,d){var M=t.__data__;return ty(d)?M[typeof d=="string"?"string":"hash"]:M.map}function Ul(t){for(var d=Un(t),M=d.length;M--;){var U=d[M],q=t[U];d[M]=[U,q,Xh(q)]}return d}function Ro(t,d){var M=re(t,d);return vh(M)?M:e}function qv(t){var d=Bt.call(t,$o),M=t[$o];try{t[$o]=e;var U=!0}catch{}var q=sa.call(t);return U&&(d?t[$o]=M:delete t[$o]),q}var Vl=vl?function(t){return t==null?[]:(t=wt(t),Xn(vl(t),function(d){return nh.call(t,d)}))}:lc,Qh=vl?function(t){for(var d=[];t;)A(d,Vl(t)),t=ca(t);return d}:lc,ti=ci;(yl&&ti(new yl(new ArrayBuffer(1)))!=_n||$s&&ti(new $s)!=Je||wl&&ti(wl.resolve())!=Pt||es&&ti(new es)!=kn||Ms&&ti(new Ms)!=ze)&&(ti=function(t){var d=ci(t),M=d==vn?t.constructor:e,U=M?Io(M):"";if(U)switch(U){case Lm:return _n;case Em:return Je;case Rm:return Pt;case Im:return kn;case Om:return ze}return d});function Yv(t,d,M){for(var U=-1,q=M.length;++U<q;){var ee=M[U],ae=ee.size;switch(ee.type){case"drop":t+=ae;break;case"dropRight":d-=ae;break;case"take":d=ei(d,t+ae);break;case"takeRight":t=In(t,d-ae);break}}return{start:t,end:d}}function Qv(t){var d=t.match(rr);return d?d[1].split(yo):[]}function Zh(t,d,M){d=uo(d,t);for(var U=-1,q=d.length,ee=!1;++U<q;){var ae=kr(d[U]);if(!(ee=t!=null&&M(t,ae)))break;t=t[ae]}return ee||++U!=q?ee:(q=t==null?0:t.length,!!q&&Da(q)&&Ur(ae,q)&&(gt(t)||Oo(t)))}function Zv(t){var d=t.length,M=new t.constructor(d);return d&&typeof t[0]=="string"&&Bt.call(t,"index")&&(M.index=t.index,M.input=t.input),M}function Jh(t){return typeof t.constructor=="function"&&!Fs(t)?ns(ca(t)):{}}function Jv(t,d,M){var U=t.constructor;switch(d){case Gt:return Fl(t);case _e:case Ae:return new U(+t);case _n:return Nv(t,M);case oi:case qn:case sn:case Tn:case Pn:case Ut:case Ln:case Ar:case Xi:return Oh(t,M);case Je:return new U;case lt:case Fn:return new U(t);case on:return Dv(t);case kn:return new U;case ri:return Fv(t)}}function Xv(t,d){var M=d.length;if(!M)return t;var U=M-1;return d[U]=(M>1?"& ":"")+d[U],d=d.join(M>2?", ":" "),t.replace(mr,`{
1459
- /* [wrapped with `+d+`] */
1460
- `)}function ey(t){return gt(t)||Oo(t)||!!(ih&&t&&t[ih])}function Ur(t,d){var M=typeof t;return d=d??V,!!d&&(M=="number"||M!="symbol"&&Zt.test(t))&&t>-1&&t%1==0&&t<d}function ui(t,d,M){if(!cn(M))return!1;var U=typeof d;return(U=="number"?vi(M)&&Ur(d,M.length):U=="string"&&d in M)?cr(M[d],t):!1}function jl(t,d){if(gt(t))return!1;var M=typeof t;return M=="number"||M=="symbol"||M=="boolean"||t==null||Ei(t)?!0:nr.test(t)||!Ko.test(t)||d!=null&&t in wt(d)}function ty(t){var d=typeof t;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?t!=="__proto__":t===null}function Kl(t){var d=Ma(t),M=X[d];if(typeof M!="function"||!(d in $t.prototype))return!1;if(t===M)return!0;var U=zl(M);return!!U&&t===U[0]}function ny(t){return!!Xu&&Xu in t}var iy=Ao?Vr:cc;function Fs(t){var d=t&&t.constructor,M=typeof d=="function"&&d.prototype||gn;return t===M}function Xh(t){return t===t&&!cn(t)}function ed(t,d){return function(M){return M==null?!1:M[t]===d&&(d!==e||t in wt(M))}}function ry(t){var d=Oa(t,function(U){return M.size===p&&M.clear(),U}),M=d.cache;return d}function oy(t,d){var M=t[1],U=d[1],q=M|U,ee=q<(h|m|R),ae=U==R&&M==L||U==R&&M==D&&t[7].length<=d[8]||U==(R|D)&&d[7].length<=d[8]&&M==L;if(!(ee||ae))return t;U&h&&(t[2]=d[2],q|=M&h?0:y);var fe=d[3];if(fe){var ve=t[3];t[3]=ve?Dh(ve,fe,d[4]):fe,t[4]=ve?Fe(t[3],s):d[4]}return fe=d[5],fe&&(ve=t[5],t[5]=ve?Fh(ve,fe,d[6]):fe,t[6]=ve?Fe(t[5],s):d[6]),fe=d[7],fe&&(t[7]=fe),U&R&&(t[8]=t[8]==null?d[8]:ei(t[8],d[8])),t[9]==null&&(t[9]=d[9]),t[0]=d[0],t[1]=q,t}function sy(t){var d=[];if(t!=null)for(var M in wt(t))d.push(M);return d}function ay(t){return sa.call(t)}function td(t,d,M){return d=In(d===e?t.length-1:d,0),function(){for(var U=arguments,q=-1,ee=In(U.length-d,0),ae=xe(ee);++q<ee;)ae[q]=U[d+q];q=-1;for(var fe=xe(d+1);++q<d;)fe[q]=U[q];return fe[d]=M(ae),Bn(t,this,fe)}}function nd(t,d){return d.length<2?t:Eo(t,Gi(d,0,-1))}function ly(t,d){for(var M=t.length,U=ei(d.length,M),q=mi(t);U--;){var ee=d[U];t[U]=Ur(ee,M)?q[ee]:e}return t}function Gl(t,d){if(!(d==="constructor"&&typeof t[d]=="function")&&d!="__proto__")return t[d]}var id=od(Ah),Ps=Cm||function(t,d){return Vt.setTimeout(t,d)},ql=od(Ev);function rd(t,d,M){var U=d+"";return ql(t,Xv(U,cy(Qv(U),M)))}function od(t){var d=0,M=0;return function(){var U=$m(),q=O-(U-M);if(M=U,q>0){if(++d>=F)return arguments[0]}else d=0;return t.apply(e,arguments)}}function La(t,d){var M=-1,U=t.length,q=U-1;for(d=d===e?U:d;++M<d;){var ee=Ll(M,q),ae=t[ee];t[ee]=t[M],t[M]=ae}return t.length=d,t}var sd=ry(function(t){var d=[];return t.charCodeAt(0)===46&&d.push(""),t.replace(yn,function(M,U,q,ee){d.push(q?ee.replace(ks,"$1"):U||M)}),d});function kr(t){if(typeof t=="string"||Ei(t))return t;var d=t+"";return d=="0"&&1/t==-W?"-0":d}function Io(t){if(t!=null){try{return oa.call(t)}catch{}try{return t+""}catch{}}return""}function cy(t,d){return jn(he,function(M){var U="_."+M[0];d&M[1]&&!Mi(t,U)&&t.push(U)}),t.sort()}function ad(t){if(t instanceof $t)return t.clone();var d=new ji(t.__wrapped__,t.__chain__);return d.__actions__=mi(t.__actions__),d.__index__=t.__index__,d.__values__=t.__values__,d}function uy(t,d,M){(M?ui(t,d,M):d===e)?d=1:d=In(vt(d),0);var U=t==null?0:t.length;if(!U||d<1)return[];for(var q=0,ee=0,ae=xe(da(U/d));q<U;)ae[ee++]=Gi(t,q,q+=d);return ae}function hy(t){for(var d=-1,M=t==null?0:t.length,U=0,q=[];++d<M;){var ee=t[d];ee&&(q[U++]=ee)}return q}function dy(){var t=arguments.length;if(!t)return[];for(var d=xe(t-1),M=arguments[0],U=t;U--;)d[U-1]=arguments[U];return A(gt(M)?mi(M):[M],Gn(d,1))}var fy=St(function(t,d){return xn(t)?Rs(t,Gn(d,1,xn,!0)):[]}),py=St(function(t,d){var M=qi(d);return xn(M)&&(M=e),xn(t)?Rs(t,Gn(d,1,xn,!0),rt(M,2)):[]}),gy=St(function(t,d){var M=qi(d);return xn(M)&&(M=e),xn(t)?Rs(t,Gn(d,1,xn,!0),e,M):[]});function my(t,d,M){var U=t==null?0:t.length;return U?(d=M||d===e?1:vt(d),Gi(t,d<0?0:d,U)):[]}function vy(t,d,M){var U=t==null?0:t.length;return U?(d=M||d===e?1:vt(d),d=U-d,Gi(t,0,d<0?0:d)):[]}function yy(t,d){return t&&t.length?Sa(t,rt(d,3),!0,!0):[]}function wy(t,d){return t&&t.length?Sa(t,rt(d,3),!0):[]}function by(t,d,M,U){var q=t==null?0:t.length;return q?(M&&typeof M!="number"&&ui(t,d,M)&&(M=0,U=q),dv(t,d,M,U)):[]}function ld(t,d,M){var U=t==null?0:t.length;if(!U)return-1;var q=M==null?0:vt(M);return q<0&&(q=In(U+q,0)),ie(t,rt(d,3),q)}function cd(t,d,M){var U=t==null?0:t.length;if(!U)return-1;var q=U-1;return M!==e&&(q=vt(M),q=M<0?In(U+q,0):ei(q,U-1)),ie(t,rt(d,3),q,!0)}function ud(t){var d=t==null?0:t.length;return d?Gn(t,1):[]}function xy(t){var d=t==null?0:t.length;return d?Gn(t,W):[]}function Sy(t,d){var M=t==null?0:t.length;return M?(d=d===e?1:vt(d),Gn(t,d)):[]}function Cy(t){for(var d=-1,M=t==null?0:t.length,U={};++d<M;){var q=t[d];U[q[0]]=q[1]}return U}function hd(t){return t&&t.length?t[0]:e}function ky(t,d,M){var U=t==null?0:t.length;if(!U)return-1;var q=M==null?0:vt(M);return q<0&&(q=In(U+q,0)),se(t,d,q)}function _y(t){var d=t==null?0:t.length;return d?Gi(t,0,-1):[]}var Ay=St(function(t){var d=g(t,Nl);return d.length&&d[0]===t[0]?_l(d):[]}),$y=St(function(t){var d=qi(t),M=g(t,Nl);return d===qi(M)?d=e:M.pop(),M.length&&M[0]===t[0]?_l(M,rt(d,2)):[]}),My=St(function(t){var d=qi(t),M=g(t,Nl);return d=typeof d=="function"?d:e,d&&M.pop(),M.length&&M[0]===t[0]?_l(M,e,d):[]});function Ty(t,d){return t==null?"":_m.call(t,d)}function qi(t){var d=t==null?0:t.length;return d?t[d-1]:e}function Ly(t,d,M){var U=t==null?0:t.length;if(!U)return-1;var q=U;return M!==e&&(q=vt(M),q=q<0?In(U+q,0):ei(q,U-1)),d===d?dt(t,d,q):ie(t,Se,q,!0)}function Ey(t,d){return t&&t.length?Sh(t,vt(d)):e}var Ry=St(dd);function dd(t,d){return t&&t.length&&d&&d.length?Tl(t,d):t}function Iy(t,d,M){return t&&t.length&&d&&d.length?Tl(t,d,rt(M,2)):t}function Oy(t,d,M){return t&&t.length&&d&&d.length?Tl(t,d,e,M):t}var Ny=zr(function(t,d){var M=t==null?0:t.length,U=xl(t,d);return _h(t,g(d,function(q){return Ur(q,M)?+q:q}).sort(Nh)),U});function Dy(t,d){var M=[];if(!(t&&t.length))return M;var U=-1,q=[],ee=t.length;for(d=rt(d,3);++U<ee;){var ae=t[U];d(ae,U,t)&&(M.push(ae),q.push(U))}return _h(t,q),M}function Yl(t){return t==null?t:Tm.call(t)}function Fy(t,d,M){var U=t==null?0:t.length;return U?(M&&typeof M!="number"&&ui(t,d,M)?(d=0,M=U):(d=d==null?0:vt(d),M=M===e?U:vt(M)),Gi(t,d,M)):[]}function Py(t,d){return xa(t,d)}function By(t,d,M){return Rl(t,d,rt(M,2))}function Wy(t,d){var M=t==null?0:t.length;if(M){var U=xa(t,d);if(U<M&&cr(t[U],d))return U}return-1}function Hy(t,d){return xa(t,d,!0)}function zy(t,d,M){return Rl(t,d,rt(M,2),!0)}function Uy(t,d){var M=t==null?0:t.length;if(M){var U=xa(t,d,!0)-1;if(cr(t[U],d))return U}return-1}function Vy(t){return t&&t.length?$h(t):[]}function jy(t,d){return t&&t.length?$h(t,rt(d,2)):[]}function Ky(t){var d=t==null?0:t.length;return d?Gi(t,1,d):[]}function Gy(t,d,M){return t&&t.length?(d=M||d===e?1:vt(d),Gi(t,0,d<0?0:d)):[]}function qy(t,d,M){var U=t==null?0:t.length;return U?(d=M||d===e?1:vt(d),d=U-d,Gi(t,d<0?0:d,U)):[]}function Yy(t,d){return t&&t.length?Sa(t,rt(d,3),!1,!0):[]}function Qy(t,d){return t&&t.length?Sa(t,rt(d,3)):[]}var Zy=St(function(t){return co(Gn(t,1,xn,!0))}),Jy=St(function(t){var d=qi(t);return xn(d)&&(d=e),co(Gn(t,1,xn,!0),rt(d,2))}),Xy=St(function(t){var d=qi(t);return d=typeof d=="function"?d:e,co(Gn(t,1,xn,!0),e,d)});function ew(t){return t&&t.length?co(t):[]}function tw(t,d){return t&&t.length?co(t,rt(d,2)):[]}function nw(t,d){return d=typeof d=="function"?d:e,t&&t.length?co(t,e,d):[]}function Ql(t){if(!(t&&t.length))return[];var d=0;return t=Xn(t,function(M){if(xn(M))return d=In(M.length,d),!0}),Qe(d,function(M){return g(t,we(M))})}function fd(t,d){if(!(t&&t.length))return[];var M=Ql(t);return d==null?M:g(M,function(U){return Bn(d,e,U)})}var iw=St(function(t,d){return xn(t)?Rs(t,d):[]}),rw=St(function(t){return Ol(Xn(t,xn))}),ow=St(function(t){var d=qi(t);return xn(d)&&(d=e),Ol(Xn(t,xn),rt(d,2))}),sw=St(function(t){var d=qi(t);return d=typeof d=="function"?d:e,Ol(Xn(t,xn),e,d)}),aw=St(Ql);function lw(t,d){return Eh(t||[],d||[],Es)}function cw(t,d){return Eh(t||[],d||[],Ns)}var uw=St(function(t){var d=t.length,M=d>1?t[d-1]:e;return M=typeof M=="function"?(t.pop(),M):e,fd(t,M)});function pd(t){var d=X(t);return d.__chain__=!0,d}function hw(t,d){return d(t),t}function Ea(t,d){return d(t)}var dw=zr(function(t){var d=t.length,M=d?t[0]:0,U=this.__wrapped__,q=function(ee){return xl(ee,t)};return d>1||this.__actions__.length||!(U instanceof $t)||!Ur(M)?this.thru(q):(U=U.slice(M,+M+(d?1:0)),U.__actions__.push({func:Ea,args:[q],thisArg:e}),new ji(U,this.__chain__).thru(function(ee){return d&&!ee.length&&ee.push(e),ee}))});function fw(){return pd(this)}function pw(){return new ji(this.value(),this.__chain__)}function gw(){this.__values__===e&&(this.__values__=Md(this.value()));var t=this.__index__>=this.__values__.length,d=t?e:this.__values__[this.__index__++];return{done:t,value:d}}function mw(){return this}function vw(t){for(var d,M=this;M instanceof ma;){var U=ad(M);U.__index__=0,U.__values__=e,d?q.__wrapped__=U:d=U;var q=U;M=M.__wrapped__}return q.__wrapped__=t,d}function yw(){var t=this.__wrapped__;if(t instanceof $t){var d=t;return this.__actions__.length&&(d=new $t(this)),d=d.reverse(),d.__actions__.push({func:Ea,args:[Yl],thisArg:e}),new ji(d,this.__chain__)}return this.thru(Yl)}function ww(){return Lh(this.__wrapped__,this.__actions__)}var bw=Ca(function(t,d,M){Bt.call(t,M)?++t[M]:Wr(t,M,1)});function xw(t,d,M){var U=gt(t)?Kn:hv;return M&&ui(t,d,M)&&(d=e),U(t,rt(d,3))}function Sw(t,d){var M=gt(t)?Xn:fh;return M(t,rt(d,3))}var Cw=Hh(ld),kw=Hh(cd);function _w(t,d){return Gn(Ra(t,d),1)}function Aw(t,d){return Gn(Ra(t,d),W)}function $w(t,d,M){return M=M===e?1:vt(M),Gn(Ra(t,d),M)}function gd(t,d){var M=gt(t)?jn:lo;return M(t,rt(d,3))}function md(t,d){var M=gt(t)?_o:dh;return M(t,rt(d,3))}var Mw=Ca(function(t,d,M){Bt.call(t,M)?t[M].push(d):Wr(t,M,[d])});function Tw(t,d,M,U){t=vi(t)?t:as(t),M=M&&!U?vt(M):0;var q=t.length;return M<0&&(M=In(q+M,0)),Fa(t)?M<=q&&t.indexOf(d,M)>-1:!!q&&se(t,d,M)>-1}var Lw=St(function(t,d,M){var U=-1,q=typeof d=="function",ee=vi(t)?xe(t.length):[];return lo(t,function(ae){ee[++U]=q?Bn(d,ae,M):Is(ae,d,M)}),ee}),Ew=Ca(function(t,d,M){Wr(t,M,d)});function Ra(t,d){var M=gt(t)?g:wh;return M(t,rt(d,3))}function Rw(t,d,M,U){return t==null?[]:(gt(d)||(d=d==null?[]:[d]),M=U?e:M,gt(M)||(M=M==null?[]:[M]),Ch(t,d,M))}var Iw=Ca(function(t,d,M){t[M?0:1].push(d)},function(){return[[],[]]});function Ow(t,d,M){var U=gt(t)?C:Le,q=arguments.length<3;return U(t,rt(d,4),M,q,lo)}function Nw(t,d,M){var U=gt(t)?P:Le,q=arguments.length<3;return U(t,rt(d,4),M,q,dh)}function Dw(t,d){var M=gt(t)?Xn:fh;return M(t,Na(rt(d,3)))}function Fw(t){var d=gt(t)?lh:Tv;return d(t)}function Pw(t,d,M){(M?ui(t,d,M):d===e)?d=1:d=vt(d);var U=gt(t)?sv:Lv;return U(t,d)}function Bw(t){var d=gt(t)?av:Rv;return d(t)}function Ww(t){if(t==null)return 0;if(vi(t))return Fa(t)?Ct(t):t.length;var d=ti(t);return d==Je||d==kn?t.size:$l(t).length}function Hw(t,d,M){var U=gt(t)?B:Iv;return M&&ui(t,d,M)&&(d=e),U(t,rt(d,3))}var zw=St(function(t,d){if(t==null)return[];var M=d.length;return M>1&&ui(t,d[0],d[1])?d=[]:M>2&&ui(d[0],d[1],d[2])&&(d=[d[0]]),Ch(t,Gn(d,1),[])}),Ia=Sm||function(){return Vt.Date.now()};function Uw(t,d){if(typeof d!="function")throw new Kt(v);return t=vt(t),function(){if(--t<1)return d.apply(this,arguments)}}function vd(t,d,M){return d=M?e:d,d=t&&d==null?t.length:d,Hr(t,R,e,e,e,e,d)}function yd(t,d){var M;if(typeof d!="function")throw new Kt(v);return t=vt(t),function(){return--t>0&&(M=d.apply(this,arguments)),t<=1&&(d=e),M}}var Zl=St(function(t,d,M){var U=h;if(M.length){var q=Fe(M,os(Zl));U|=k}return Hr(t,U,d,M,q)}),wd=St(function(t,d,M){var U=h|m;if(M.length){var q=Fe(M,os(wd));U|=k}return Hr(d,U,t,M,q)});function bd(t,d,M){d=M?e:d;var U=Hr(t,L,e,e,e,e,e,d);return U.placeholder=bd.placeholder,U}function xd(t,d,M){d=M?e:d;var U=Hr(t,T,e,e,e,e,e,d);return U.placeholder=xd.placeholder,U}function Sd(t,d,M){var U,q,ee,ae,fe,ve,Te=0,Ee=!1,Oe=!1,Ue=!0;if(typeof t!="function")throw new Kt(v);d=Yi(d)||0,cn(M)&&(Ee=!!M.leading,Oe="maxWait"in M,ee=Oe?In(Yi(M.maxWait)||0,d):ee,Ue="trailing"in M?!!M.trailing:Ue);function Ze(Sn){var ur=U,Kr=q;return U=q=e,Te=Sn,ae=t.apply(Kr,ur),ae}function st(Sn){return Te=Sn,fe=Ps(kt,d),Ee?Ze(Sn):ae}function bt(Sn){var ur=Sn-ve,Kr=Sn-Te,Hd=d-ur;return Oe?ei(Hd,ee-Kr):Hd}function at(Sn){var ur=Sn-ve,Kr=Sn-Te;return ve===e||ur>=d||ur<0||Oe&&Kr>=ee}function kt(){var Sn=Ia();if(at(Sn))return Lt(Sn);fe=Ps(kt,bt(Sn))}function Lt(Sn){return fe=e,Ue&&U?Ze(Sn):(U=q=e,ae)}function Ri(){fe!==e&&Rh(fe),Te=0,U=ve=q=fe=e}function hi(){return fe===e?ae:Lt(Ia())}function Ii(){var Sn=Ia(),ur=at(Sn);if(U=arguments,q=this,ve=Sn,ur){if(fe===e)return st(ve);if(Oe)return Rh(fe),fe=Ps(kt,d),Ze(ve)}return fe===e&&(fe=Ps(kt,d)),ae}return Ii.cancel=Ri,Ii.flush=hi,Ii}var Vw=St(function(t,d){return hh(t,1,d)}),jw=St(function(t,d,M){return hh(t,Yi(d)||0,M)});function Kw(t){return Hr(t,I)}function Oa(t,d){if(typeof t!="function"||d!=null&&typeof d!="function")throw new Kt(v);var M=function(){var U=arguments,q=d?d.apply(this,U):U[0],ee=M.cache;if(ee.has(q))return ee.get(q);var ae=t.apply(this,U);return M.cache=ee.set(q,ae)||ee,ae};return M.cache=new(Oa.Cache||Br),M}Oa.Cache=Br;function Na(t){if(typeof t!="function")throw new Kt(v);return function(){var d=arguments;switch(d.length){case 0:return!t.call(this);case 1:return!t.call(this,d[0]);case 2:return!t.call(this,d[0],d[1]);case 3:return!t.call(this,d[0],d[1],d[2])}return!t.apply(this,d)}}function Gw(t){return yd(2,t)}var qw=Ov(function(t,d){d=d.length==1&&gt(d[0])?g(d[0],tt(rt())):g(Gn(d,1),tt(rt()));var M=d.length;return St(function(U){for(var q=-1,ee=ei(U.length,M);++q<ee;)U[q]=d[q].call(this,U[q]);return Bn(t,this,U)})}),Jl=St(function(t,d){var M=Fe(d,os(Jl));return Hr(t,k,e,d,M)}),Cd=St(function(t,d){var M=Fe(d,os(Cd));return Hr(t,w,e,d,M)}),Yw=zr(function(t,d){return Hr(t,D,e,e,e,d)});function Qw(t,d){if(typeof t!="function")throw new Kt(v);return d=d===e?d:vt(d),St(t,d)}function Zw(t,d){if(typeof t!="function")throw new Kt(v);return d=d==null?0:In(vt(d),0),St(function(M){var U=M[d],q=ho(M,0,d);return U&&A(q,U),Bn(t,this,q)})}function Jw(t,d,M){var U=!0,q=!0;if(typeof t!="function")throw new Kt(v);return cn(M)&&(U="leading"in M?!!M.leading:U,q="trailing"in M?!!M.trailing:q),Sd(t,d,{leading:U,maxWait:d,trailing:q})}function Xw(t){return vd(t,1)}function eb(t,d){return Jl(Dl(d),t)}function tb(){if(!arguments.length)return[];var t=arguments[0];return gt(t)?t:[t]}function nb(t){return Ki(t,r)}function ib(t,d){return d=typeof d=="function"?d:e,Ki(t,r,d)}function rb(t){return Ki(t,o|r)}function ob(t,d){return d=typeof d=="function"?d:e,Ki(t,o|r,d)}function sb(t,d){return d==null||uh(t,d,Un(d))}function cr(t,d){return t===d||t!==t&&d!==d}var ab=$a(kl),lb=$a(function(t,d){return t>=d}),Oo=mh((function(){return arguments})())?mh:function(t){return mn(t)&&Bt.call(t,"callee")&&!nh.call(t,"callee")},gt=xe.isArray,cb=gi?tt(gi):vv;function vi(t){return t!=null&&Da(t.length)&&!Vr(t)}function xn(t){return mn(t)&&vi(t)}function ub(t){return t===!0||t===!1||mn(t)&&ci(t)==_e}var fo=km||cc,hb=so?tt(so):yv;function db(t){return mn(t)&&t.nodeType===1&&!Bs(t)}function fb(t){if(t==null)return!0;if(vi(t)&&(gt(t)||typeof t=="string"||typeof t.splice=="function"||fo(t)||ss(t)||Oo(t)))return!t.length;var d=ti(t);if(d==Je||d==kn)return!t.size;if(Fs(t))return!$l(t).length;for(var M in t)if(Bt.call(t,M))return!1;return!0}function pb(t,d){return Os(t,d)}function gb(t,d,M){M=typeof M=="function"?M:e;var U=M?M(t,d):e;return U===e?Os(t,d,e,M):!!U}function Xl(t){if(!mn(t))return!1;var d=ci(t);return d==qe||d==Me||typeof t.message=="string"&&typeof t.name=="string"&&!Bs(t)}function mb(t){return typeof t=="number"&&rh(t)}function Vr(t){if(!cn(t))return!1;var d=ci(t);return d==Ve||d==ot||d==me||d==Si}function kd(t){return typeof t=="number"&&t==vt(t)}function Da(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=V}function cn(t){var d=typeof t;return t!=null&&(d=="object"||d=="function")}function mn(t){return t!=null&&typeof t=="object"}var _d=fn?tt(fn):bv;function vb(t,d){return t===d||Al(t,d,Ul(d))}function yb(t,d,M){return M=typeof M=="function"?M:e,Al(t,d,Ul(d),M)}function wb(t){return Ad(t)&&t!=+t}function bb(t){if(iy(t))throw new nt(b);return vh(t)}function xb(t){return t===null}function Sb(t){return t==null}function Ad(t){return typeof t=="number"||mn(t)&&ci(t)==lt}function Bs(t){if(!mn(t)||ci(t)!=vn)return!1;var d=ca(t);if(d===null)return!0;var M=Bt.call(d,"constructor")&&d.constructor;return typeof M=="function"&&M instanceof M&&oa.call(M)==ym}var ec=Ai?tt(Ai):xv;function Cb(t){return kd(t)&&t>=-V&&t<=V}var $d=$i?tt($i):Sv;function Fa(t){return typeof t=="string"||!gt(t)&&mn(t)&&ci(t)==Fn}function Ei(t){return typeof t=="symbol"||mn(t)&&ci(t)==ri}var ss=Ui?tt(Ui):Cv;function kb(t){return t===e}function _b(t){return mn(t)&&ti(t)==ze}function Ab(t){return mn(t)&&ci(t)==Ot}var $b=$a(Ml),Mb=$a(function(t,d){return t<=d});function Md(t){if(!t)return[];if(vi(t))return Fa(t)?pt(t):mi(t);if(As&&t[As])return be(t[As]());var d=ti(t),M=d==Je?$e:d==kn?He:as;return M(t)}function jr(t){if(!t)return t===0?t:0;if(t=Yi(t),t===W||t===-W){var d=t<0?-1:1;return d*G}return t===t?t:0}function vt(t){var d=jr(t),M=d%1;return d===d?M?d-M:d:0}function Td(t){return t?Lo(vt(t),0,te):0}function Yi(t){if(typeof t=="number")return t;if(Ei(t))return Q;if(cn(t)){var d=typeof t.valueOf=="function"?t.valueOf():t;t=cn(d)?d+"":d}if(typeof t!="string")return t===0?t:+t;t=jt(t);var M=qo.test(t);return M||wn.test(t)?Jt(t.slice(2),M?2:8):_t.test(t)?Q:+t}function Ld(t){return Cr(t,yi(t))}function Tb(t){return t?Lo(vt(t),-V,V):t===0?t:0}function Wt(t){return t==null?"":Li(t)}var Lb=is(function(t,d){if(Fs(d)||vi(d)){Cr(d,Un(d),t);return}for(var M in d)Bt.call(d,M)&&Es(t,M,d[M])}),Ed=is(function(t,d){Cr(d,yi(d),t)}),Pa=is(function(t,d,M,U){Cr(d,yi(d),t,U)}),Eb=is(function(t,d,M,U){Cr(d,Un(d),t,U)}),Rb=zr(xl);function Ib(t,d){var M=ns(t);return d==null?M:ch(M,d)}var Ob=St(function(t,d){t=wt(t);var M=-1,U=d.length,q=U>2?d[2]:e;for(q&&ui(d[0],d[1],q)&&(U=1);++M<U;)for(var ee=d[M],ae=yi(ee),fe=-1,ve=ae.length;++fe<ve;){var Te=ae[fe],Ee=t[Te];(Ee===e||cr(Ee,gn[Te])&&!Bt.call(t,Te))&&(t[Te]=ee[Te])}return t}),Nb=St(function(t){return t.push(e,qh),Bn(Rd,e,t)});function Db(t,d){return J(t,rt(d,3),Sr)}function Fb(t,d){return J(t,rt(d,3),Cl)}function Pb(t,d){return t==null?t:Sl(t,rt(d,3),yi)}function Bb(t,d){return t==null?t:ph(t,rt(d,3),yi)}function Wb(t,d){return t&&Sr(t,rt(d,3))}function Hb(t,d){return t&&Cl(t,rt(d,3))}function zb(t){return t==null?[]:wa(t,Un(t))}function Ub(t){return t==null?[]:wa(t,yi(t))}function tc(t,d,M){var U=t==null?e:Eo(t,d);return U===e?M:U}function Vb(t,d){return t!=null&&Zh(t,d,fv)}function nc(t,d){return t!=null&&Zh(t,d,pv)}var jb=Uh(function(t,d,M){d!=null&&typeof d.toString!="function"&&(d=sa.call(d)),t[d]=M},rc(wi)),Kb=Uh(function(t,d,M){d!=null&&typeof d.toString!="function"&&(d=sa.call(d)),Bt.call(t,d)?t[d].push(M):t[d]=[M]},rt),Gb=St(Is);function Un(t){return vi(t)?ah(t):$l(t)}function yi(t){return vi(t)?ah(t,!0):kv(t)}function qb(t,d){var M={};return d=rt(d,3),Sr(t,function(U,q,ee){Wr(M,d(U,q,ee),U)}),M}function Yb(t,d){var M={};return d=rt(d,3),Sr(t,function(U,q,ee){Wr(M,q,d(U,q,ee))}),M}var Qb=is(function(t,d,M){ba(t,d,M)}),Rd=is(function(t,d,M,U){ba(t,d,M,U)}),Zb=zr(function(t,d){var M={};if(t==null)return M;var U=!1;d=g(d,function(ee){return ee=uo(ee,t),U||(U=ee.length>1),ee}),Cr(t,Hl(t),M),U&&(M=Ki(M,o|a|r,jv));for(var q=d.length;q--;)Il(M,d[q]);return M});function Jb(t,d){return Id(t,Na(rt(d)))}var Xb=zr(function(t,d){return t==null?{}:Av(t,d)});function Id(t,d){if(t==null)return{};var M=g(Hl(t),function(U){return[U]});return d=rt(d),kh(t,M,function(U,q){return d(U,q[0])})}function e0(t,d,M){d=uo(d,t);var U=-1,q=d.length;for(q||(q=1,t=e);++U<q;){var ee=t==null?e:t[kr(d[U])];ee===e&&(U=q,ee=M),t=Vr(ee)?ee.call(t):ee}return t}function t0(t,d,M){return t==null?t:Ns(t,d,M)}function n0(t,d,M,U){return U=typeof U=="function"?U:e,t==null?t:Ns(t,d,M,U)}var Od=Kh(Un),Nd=Kh(yi);function i0(t,d,M){var U=gt(t),q=U||fo(t)||ss(t);if(d=rt(d,4),M==null){var ee=t&&t.constructor;q?M=U?new ee:[]:cn(t)?M=Vr(ee)?ns(ca(t)):{}:M={}}return(q?jn:Sr)(t,function(ae,fe,ve){return d(M,ae,fe,ve)}),M}function r0(t,d){return t==null?!0:Il(t,d)}function o0(t,d,M){return t==null?t:Th(t,d,Dl(M))}function s0(t,d,M,U){return U=typeof U=="function"?U:e,t==null?t:Th(t,d,Dl(M),U)}function as(t){return t==null?[]:tn(t,Un(t))}function a0(t){return t==null?[]:tn(t,yi(t))}function l0(t,d,M){return M===e&&(M=d,d=e),M!==e&&(M=Yi(M),M=M===M?M:0),d!==e&&(d=Yi(d),d=d===d?d:0),Lo(Yi(t),d,M)}function c0(t,d,M){return d=jr(d),M===e?(M=d,d=0):M=jr(M),t=Yi(t),gv(t,d,M)}function u0(t,d,M){if(M&&typeof M!="boolean"&&ui(t,d,M)&&(d=M=e),M===e&&(typeof d=="boolean"?(M=d,d=e):typeof t=="boolean"&&(M=t,t=e)),t===e&&d===e?(t=0,d=1):(t=jr(t),d===e?(d=t,t=0):d=jr(d)),t>d){var U=t;t=d,d=U}if(M||t%1||d%1){var q=oh();return ei(t+q*(d-t+Pe("1e-"+((q+"").length-1))),d)}return Ll(t,d)}var h0=rs(function(t,d,M){return d=d.toLowerCase(),t+(M?Dd(d):d)});function Dd(t){return ic(Wt(t).toLowerCase())}function Fd(t){return t=Wt(t),t&&t.replace(un,nn).replace(Nr,"")}function d0(t,d,M){t=Wt(t),d=Li(d);var U=t.length;M=M===e?U:Lo(vt(M),0,U);var q=M;return M-=d.length,M>=0&&t.slice(M,q)==d}function f0(t){return t=Wt(t),t&&xs.test(t)?t.replace(Mr,j):t}function p0(t){return t=Wt(t),t&&ir.test(t)?t.replace(Yn,"\\$&"):t}var g0=rs(function(t,d,M){return t+(M?"-":"")+d.toLowerCase()}),m0=rs(function(t,d,M){return t+(M?" ":"")+d.toLowerCase()}),v0=Wh("toLowerCase");function y0(t,d,M){t=Wt(t),d=vt(d);var U=d?Ct(t):0;if(!d||U>=d)return t;var q=(d-U)/2;return Aa(fa(q),M)+t+Aa(da(q),M)}function w0(t,d,M){t=Wt(t),d=vt(d);var U=d?Ct(t):0;return d&&U<d?t+Aa(d-U,M):t}function b0(t,d,M){t=Wt(t),d=vt(d);var U=d?Ct(t):0;return d&&U<d?Aa(d-U,M)+t:t}function x0(t,d,M){return M||d==null?d=0:d&&(d=+d),Mm(Wt(t).replace(an,""),d||0)}function S0(t,d,M){return(M?ui(t,d,M):d===e)?d=1:d=vt(d),El(Wt(t),d)}function C0(){var t=arguments,d=Wt(t[0]);return t.length<3?d:d.replace(t[1],t[2])}var k0=rs(function(t,d,M){return t+(M?"_":"")+d.toLowerCase()});function _0(t,d,M){return M&&typeof M!="number"&&ui(t,d,M)&&(d=M=e),M=M===e?te:M>>>0,M?(t=Wt(t),t&&(typeof d=="string"||d!=null&&!ec(d))&&(d=Li(d),!d&&oe(t))?ho(pt(t),0,M):t.split(d,M)):[]}var A0=rs(function(t,d,M){return t+(M?" ":"")+ic(d)});function $0(t,d,M){return t=Wt(t),M=M==null?0:Lo(vt(M),0,t.length),d=Li(d),t.slice(M,M+d.length)==d}function M0(t,d,M){var U=X.templateSettings;M&&ui(t,d,M)&&(d=e),t=Wt(t),d=Pa({},d,U,Gh);var q=Pa({},d.imports,U.imports,Gh),ee=Un(q),ae=tn(q,ee),fe,ve,Te=0,Ee=d.interpolate||Fi,Oe="__p += '",Ue=li((d.escape||Fi).source+"|"+Ee.source+"|"+(Ee===vo?or:Fi).source+"|"+(d.evaluate||Fi).source+"|$","g"),Ze="//# sourceURL="+(Bt.call(d,"sourceURL")?(d.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++xr+"]")+`
1461
- `;t.replace(Ue,function(at,kt,Lt,Ri,hi,Ii){return Lt||(Lt=Ri),Oe+=t.slice(Te,Ii).replace(Jn,Z),kt&&(fe=!0,Oe+=`' +
1462
- __e(`+kt+`) +
1463
- '`),hi&&(ve=!0,Oe+=`';
1464
- `+hi+`;
1465
- __p += '`),Lt&&(Oe+=`' +
1466
- ((__t = (`+Lt+`)) == null ? '' : __t) +
1467
- '`),Te=Ii+at.length,at}),Oe+=`';
1468
- `;var st=Bt.call(d,"variable")&&d.variable;if(!st)Oe=`with (obj) {
1469
- `+Oe+`
1470
- }
1471
- `;else if(Cs.test(st))throw new nt(x);Oe=(ve?Oe.replace(er,""):Oe).replace(tr,"$1").replace($r,"$1;"),Oe="function("+(st||"obj")+`) {
1472
- `+(st?"":`obj || (obj = {});
1473
- `)+"var __t, __p = ''"+(fe?", __e = _.escape":"")+(ve?`, __j = Array.prototype.join;
1474
- function print() { __p += __j.call(arguments, '') }
1475
- `:`;
1476
- `)+Oe+`return __p
1477
- }`;var bt=Bd(function(){return mt(ee,Ze+"return "+Oe).apply(e,ae)});if(bt.source=Oe,Xl(bt))throw bt;return bt}function T0(t){return Wt(t).toLowerCase()}function L0(t){return Wt(t).toUpperCase()}function E0(t,d,M){if(t=Wt(t),t&&(M||d===e))return jt(t);if(!t||!(d=Li(d)))return t;var U=pt(t),q=pt(d),ee=ut(U,q),ae=pn(U,q)+1;return ho(U,ee,ae).join("")}function R0(t,d,M){if(t=Wt(t),t&&(M||d===e))return t.slice(0,yt(t)+1);if(!t||!(d=Li(d)))return t;var U=pt(t),q=pn(U,pt(d))+1;return ho(U,0,q).join("")}function I0(t,d,M){if(t=Wt(t),t&&(M||d===e))return t.replace(an,"");if(!t||!(d=Li(d)))return t;var U=pt(t),q=ut(U,pt(d));return ho(U,q).join("")}function O0(t,d){var M=E,U=z;if(cn(d)){var q="separator"in d?d.separator:q;M="length"in d?vt(d.length):M,U="omission"in d?Li(d.omission):U}t=Wt(t);var ee=t.length;if(oe(t)){var ae=pt(t);ee=ae.length}if(M>=ee)return t;var fe=M-Ct(U);if(fe<1)return U;var ve=ae?ho(ae,0,fe).join(""):t.slice(0,fe);if(q===e)return ve+U;if(ae&&(fe+=ve.length-fe),ec(q)){if(t.slice(fe).search(q)){var Te,Ee=ve;for(q.global||(q=li(q.source,Wt(ki.exec(q))+"g")),q.lastIndex=0;Te=q.exec(Ee);)var Oe=Te.index;ve=ve.slice(0,Oe===e?fe:Oe)}}else if(t.indexOf(Li(q),fe)!=fe){var Ue=ve.lastIndexOf(q);Ue>-1&&(ve=ve.slice(0,Ue))}return ve+U}function N0(t){return t=Wt(t),t&&Yr.test(t)?t.replace(Vn,it):t}var D0=rs(function(t,d,M){return t+(M?" ":"")+d.toUpperCase()}),ic=Wh("toUpperCase");function Pd(t,d,M){return t=Wt(t),d=M?e:d,d===e?ge(t)?rn(t):Y(t):t.match(d)||[]}var Bd=St(function(t,d){try{return Bn(t,e,d)}catch(M){return Xl(M)?M:new nt(M)}}),F0=zr(function(t,d){return jn(d,function(M){M=kr(M),Wr(t,M,Zl(t[M],t))}),t});function P0(t){var d=t==null?0:t.length,M=rt();return t=d?g(t,function(U){if(typeof U[1]!="function")throw new Kt(v);return[M(U[0]),U[1]]}):[],St(function(U){for(var q=-1;++q<d;){var ee=t[q];if(Bn(ee[0],this,U))return Bn(ee[1],this,U)}})}function B0(t){return uv(Ki(t,o))}function rc(t){return function(){return t}}function W0(t,d){return t==null||t!==t?d:t}var H0=zh(),z0=zh(!0);function wi(t){return t}function oc(t){return yh(typeof t=="function"?t:Ki(t,o))}function U0(t){return bh(Ki(t,o))}function V0(t,d){return xh(t,Ki(d,o))}var j0=St(function(t,d){return function(M){return Is(M,t,d)}}),K0=St(function(t,d){return function(M){return Is(t,M,d)}});function sc(t,d,M){var U=Un(d),q=wa(d,U);M==null&&!(cn(d)&&(q.length||!U.length))&&(M=d,d=t,t=this,q=wa(d,Un(d)));var ee=!(cn(M)&&"chain"in M)||!!M.chain,ae=Vr(t);return jn(q,function(fe){var ve=d[fe];t[fe]=ve,ae&&(t.prototype[fe]=function(){var Te=this.__chain__;if(ee||Te){var Ee=t(this.__wrapped__),Oe=Ee.__actions__=mi(this.__actions__);return Oe.push({func:ve,args:arguments,thisArg:t}),Ee.__chain__=Te,Ee}return ve.apply(t,A([this.value()],arguments))})}),t}function G0(){return Vt._===this&&(Vt._=wm),this}function ac(){}function q0(t){return t=vt(t),St(function(d){return Sh(d,t)})}var Y0=Pl(g),Q0=Pl(Kn),Z0=Pl(B);function Wd(t){return jl(t)?we(kr(t)):$v(t)}function J0(t){return function(d){return t==null?e:Eo(t,d)}}var X0=Vh(),ex=Vh(!0);function lc(){return[]}function cc(){return!1}function tx(){return{}}function nx(){return""}function ix(){return!0}function rx(t,d){if(t=vt(t),t<1||t>V)return[];var M=te,U=ei(t,te);d=rt(d),t-=te;for(var q=Qe(U,d);++M<t;)d(M);return q}function ox(t){return gt(t)?g(t,kr):Ei(t)?[t]:mi(sd(Wt(t)))}function sx(t){var d=++vm;return Wt(t)+d}var ax=_a(function(t,d){return t+d},0),lx=Bl("ceil"),cx=_a(function(t,d){return t/d},1),ux=Bl("floor");function hx(t){return t&&t.length?ya(t,wi,kl):e}function dx(t,d){return t&&t.length?ya(t,rt(d,2),kl):e}function fx(t){return de(t,wi)}function px(t,d){return de(t,rt(d,2))}function gx(t){return t&&t.length?ya(t,wi,Ml):e}function mx(t,d){return t&&t.length?ya(t,rt(d,2),Ml):e}var vx=_a(function(t,d){return t*d},1),yx=Bl("round"),wx=_a(function(t,d){return t-d},0);function bx(t){return t&&t.length?Xe(t,wi):0}function xx(t,d){return t&&t.length?Xe(t,rt(d,2)):0}return X.after=Uw,X.ary=vd,X.assign=Lb,X.assignIn=Ed,X.assignInWith=Pa,X.assignWith=Eb,X.at=Rb,X.before=yd,X.bind=Zl,X.bindAll=F0,X.bindKey=wd,X.castArray=tb,X.chain=pd,X.chunk=uy,X.compact=hy,X.concat=dy,X.cond=P0,X.conforms=B0,X.constant=rc,X.countBy=bw,X.create=Ib,X.curry=bd,X.curryRight=xd,X.debounce=Sd,X.defaults=Ob,X.defaultsDeep=Nb,X.defer=Vw,X.delay=jw,X.difference=fy,X.differenceBy=py,X.differenceWith=gy,X.drop=my,X.dropRight=vy,X.dropRightWhile=yy,X.dropWhile=wy,X.fill=by,X.filter=Sw,X.flatMap=_w,X.flatMapDeep=Aw,X.flatMapDepth=$w,X.flatten=ud,X.flattenDeep=xy,X.flattenDepth=Sy,X.flip=Kw,X.flow=H0,X.flowRight=z0,X.fromPairs=Cy,X.functions=zb,X.functionsIn=Ub,X.groupBy=Mw,X.initial=_y,X.intersection=Ay,X.intersectionBy=$y,X.intersectionWith=My,X.invert=jb,X.invertBy=Kb,X.invokeMap=Lw,X.iteratee=oc,X.keyBy=Ew,X.keys=Un,X.keysIn=yi,X.map=Ra,X.mapKeys=qb,X.mapValues=Yb,X.matches=U0,X.matchesProperty=V0,X.memoize=Oa,X.merge=Qb,X.mergeWith=Rd,X.method=j0,X.methodOf=K0,X.mixin=sc,X.negate=Na,X.nthArg=q0,X.omit=Zb,X.omitBy=Jb,X.once=Gw,X.orderBy=Rw,X.over=Y0,X.overArgs=qw,X.overEvery=Q0,X.overSome=Z0,X.partial=Jl,X.partialRight=Cd,X.partition=Iw,X.pick=Xb,X.pickBy=Id,X.property=Wd,X.propertyOf=J0,X.pull=Ry,X.pullAll=dd,X.pullAllBy=Iy,X.pullAllWith=Oy,X.pullAt=Ny,X.range=X0,X.rangeRight=ex,X.rearg=Yw,X.reject=Dw,X.remove=Dy,X.rest=Qw,X.reverse=Yl,X.sampleSize=Pw,X.set=t0,X.setWith=n0,X.shuffle=Bw,X.slice=Fy,X.sortBy=zw,X.sortedUniq=Vy,X.sortedUniqBy=jy,X.split=_0,X.spread=Zw,X.tail=Ky,X.take=Gy,X.takeRight=qy,X.takeRightWhile=Yy,X.takeWhile=Qy,X.tap=hw,X.throttle=Jw,X.thru=Ea,X.toArray=Md,X.toPairs=Od,X.toPairsIn=Nd,X.toPath=ox,X.toPlainObject=Ld,X.transform=i0,X.unary=Xw,X.union=Zy,X.unionBy=Jy,X.unionWith=Xy,X.uniq=ew,X.uniqBy=tw,X.uniqWith=nw,X.unset=r0,X.unzip=Ql,X.unzipWith=fd,X.update=o0,X.updateWith=s0,X.values=as,X.valuesIn=a0,X.without=iw,X.words=Pd,X.wrap=eb,X.xor=rw,X.xorBy=ow,X.xorWith=sw,X.zip=aw,X.zipObject=lw,X.zipObjectDeep=cw,X.zipWith=uw,X.entries=Od,X.entriesIn=Nd,X.extend=Ed,X.extendWith=Pa,sc(X,X),X.add=ax,X.attempt=Bd,X.camelCase=h0,X.capitalize=Dd,X.ceil=lx,X.clamp=l0,X.clone=nb,X.cloneDeep=rb,X.cloneDeepWith=ob,X.cloneWith=ib,X.conformsTo=sb,X.deburr=Fd,X.defaultTo=W0,X.divide=cx,X.endsWith=d0,X.eq=cr,X.escape=f0,X.escapeRegExp=p0,X.every=xw,X.find=Cw,X.findIndex=ld,X.findKey=Db,X.findLast=kw,X.findLastIndex=cd,X.findLastKey=Fb,X.floor=ux,X.forEach=gd,X.forEachRight=md,X.forIn=Pb,X.forInRight=Bb,X.forOwn=Wb,X.forOwnRight=Hb,X.get=tc,X.gt=ab,X.gte=lb,X.has=Vb,X.hasIn=nc,X.head=hd,X.identity=wi,X.includes=Tw,X.indexOf=ky,X.inRange=c0,X.invoke=Gb,X.isArguments=Oo,X.isArray=gt,X.isArrayBuffer=cb,X.isArrayLike=vi,X.isArrayLikeObject=xn,X.isBoolean=ub,X.isBuffer=fo,X.isDate=hb,X.isElement=db,X.isEmpty=fb,X.isEqual=pb,X.isEqualWith=gb,X.isError=Xl,X.isFinite=mb,X.isFunction=Vr,X.isInteger=kd,X.isLength=Da,X.isMap=_d,X.isMatch=vb,X.isMatchWith=yb,X.isNaN=wb,X.isNative=bb,X.isNil=Sb,X.isNull=xb,X.isNumber=Ad,X.isObject=cn,X.isObjectLike=mn,X.isPlainObject=Bs,X.isRegExp=ec,X.isSafeInteger=Cb,X.isSet=$d,X.isString=Fa,X.isSymbol=Ei,X.isTypedArray=ss,X.isUndefined=kb,X.isWeakMap=_b,X.isWeakSet=Ab,X.join=Ty,X.kebabCase=g0,X.last=qi,X.lastIndexOf=Ly,X.lowerCase=m0,X.lowerFirst=v0,X.lt=$b,X.lte=Mb,X.max=hx,X.maxBy=dx,X.mean=fx,X.meanBy=px,X.min=gx,X.minBy=mx,X.stubArray=lc,X.stubFalse=cc,X.stubObject=tx,X.stubString=nx,X.stubTrue=ix,X.multiply=vx,X.nth=Ey,X.noConflict=G0,X.noop=ac,X.now=Ia,X.pad=y0,X.padEnd=w0,X.padStart=b0,X.parseInt=x0,X.random=u0,X.reduce=Ow,X.reduceRight=Nw,X.repeat=S0,X.replace=C0,X.result=e0,X.round=yx,X.runInContext=pe,X.sample=Fw,X.size=Ww,X.snakeCase=k0,X.some=Hw,X.sortedIndex=Py,X.sortedIndexBy=By,X.sortedIndexOf=Wy,X.sortedLastIndex=Hy,X.sortedLastIndexBy=zy,X.sortedLastIndexOf=Uy,X.startCase=A0,X.startsWith=$0,X.subtract=wx,X.sum=bx,X.sumBy=xx,X.template=M0,X.times=rx,X.toFinite=jr,X.toInteger=vt,X.toLength=Td,X.toLower=T0,X.toNumber=Yi,X.toSafeInteger=Tb,X.toString=Wt,X.toUpper=L0,X.trim=E0,X.trimEnd=R0,X.trimStart=I0,X.truncate=O0,X.unescape=N0,X.uniqueId=sx,X.upperCase=D0,X.upperFirst=ic,X.each=gd,X.eachRight=md,X.first=hd,sc(X,(function(){var t={};return Sr(X,function(d,M){Bt.call(X.prototype,M)||(t[M]=d)}),t})(),{chain:!1}),X.VERSION=u,jn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){X[t].placeholder=X}),jn(["drop","take"],function(t,d){$t.prototype[t]=function(M){M=M===e?1:In(vt(M),0);var U=this.__filtered__&&!d?new $t(this):this.clone();return U.__filtered__?U.__takeCount__=ei(M,U.__takeCount__):U.__views__.push({size:ei(M,te),type:t+(U.__dir__<0?"Right":"")}),U},$t.prototype[t+"Right"]=function(M){return this.reverse()[t](M).reverse()}}),jn(["filter","map","takeWhile"],function(t,d){var M=d+1,U=M==_||M==N;$t.prototype[t]=function(q){var ee=this.clone();return ee.__iteratees__.push({iteratee:rt(q,3),type:M}),ee.__filtered__=ee.__filtered__||U,ee}}),jn(["head","last"],function(t,d){var M="take"+(d?"Right":"");$t.prototype[t]=function(){return this[M](1).value()[0]}}),jn(["initial","tail"],function(t,d){var M="drop"+(d?"":"Right");$t.prototype[t]=function(){return this.__filtered__?new $t(this):this[M](1)}}),$t.prototype.compact=function(){return this.filter(wi)},$t.prototype.find=function(t){return this.filter(t).head()},$t.prototype.findLast=function(t){return this.reverse().find(t)},$t.prototype.invokeMap=St(function(t,d){return typeof t=="function"?new $t(this):this.map(function(M){return Is(M,t,d)})}),$t.prototype.reject=function(t){return this.filter(Na(rt(t)))},$t.prototype.slice=function(t,d){t=vt(t);var M=this;return M.__filtered__&&(t>0||d<0)?new $t(M):(t<0?M=M.takeRight(-t):t&&(M=M.drop(t)),d!==e&&(d=vt(d),M=d<0?M.dropRight(-d):M.take(d-t)),M)},$t.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},$t.prototype.toArray=function(){return this.take(te)},Sr($t.prototype,function(t,d){var M=/^(?:filter|find|map|reject)|While$/.test(d),U=/^(?:head|last)$/.test(d),q=X[U?"take"+(d=="last"?"Right":""):d],ee=U||/^find/.test(d);q&&(X.prototype[d]=function(){var ae=this.__wrapped__,fe=U?[1]:arguments,ve=ae instanceof $t,Te=fe[0],Ee=ve||gt(ae),Oe=function(kt){var Lt=q.apply(X,A([kt],fe));return U&&Ue?Lt[0]:Lt};Ee&&M&&typeof Te=="function"&&Te.length!=1&&(ve=Ee=!1);var Ue=this.__chain__,Ze=!!this.__actions__.length,st=ee&&!Ue,bt=ve&&!Ze;if(!ee&&Ee){ae=bt?ae:new $t(this);var at=t.apply(ae,fe);return at.__actions__.push({func:Ea,args:[Oe],thisArg:e}),new ji(at,Ue)}return st&&bt?t.apply(this,fe):(at=this.thru(Oe),st?U?at.value()[0]:at.value():at)})}),jn(["pop","push","shift","sort","splice","unshift"],function(t){var d=zn[t],M=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",U=/^(?:pop|shift)$/.test(t);X.prototype[t]=function(){var q=arguments;if(U&&!this.__chain__){var ee=this.value();return d.apply(gt(ee)?ee:[],q)}return this[M](function(ae){return d.apply(gt(ae)?ae:[],q)})}}),Sr($t.prototype,function(t,d){var M=X[d];if(M){var U=M.name+"";Bt.call(ts,U)||(ts[U]=[]),ts[U].push({name:d,func:M})}}),ts[ka(e,m).name]=[{name:"wrapper",func:e}],$t.prototype.clone=Nm,$t.prototype.reverse=Dm,$t.prototype.value=Fm,X.prototype.at=dw,X.prototype.chain=fw,X.prototype.commit=pw,X.prototype.next=gw,X.prototype.plant=vw,X.prototype.reverse=yw,X.prototype.toJSON=X.prototype.valueOf=X.prototype.value=ww,X.prototype.first=X.prototype.head,As&&(X.prototype[As]=mw),X}),Tt=$n();An?((An.exports=Tt)._=Tt,Xt._=Tt):Vt._=Tt}).call(MC)})(Vs,Vs.exports)),Vs.exports}var $g=TC();const Mg=el($g),LC={mixins:[Ag],props:{calculatePacketText:{type:Function,default:l=>`${l}`}},data:function(){return{history:[],historyPointer:-1,filterText:null,paused:!1,pausedAt:0,pauseOffset:0,pausedHistory:[],rows:1,textarea:null,displayText:"",rules:{required:l=>!!l||"Required.",min:l=>l>=1||"Minimum: 1",max:l=>Number.parseInt(l)<=this.currentConfig.history||`Maximum: ${this.currentConfig.history}`}}},computed:{allInstantSettings:function(){return`${this.currentConfig.showLineAddress}|${this.currentConfig.showTimestamp}|${this.currentConfig.showAscii}|${this.currentConfig.newestAtTop}|${this.pauseOffset}`},allDebouncedSettings:function(){return`${this.currentConfig.bytesPerLine}|${this.currentConfig.packetsToShow}|${this.filterText}`}},watch:{latestData:function(l){l.forEach(c=>{"buffer"in c&&(c.buffer=atob(c.buffer)),this.historyPointer=++this.historyPointer%this.currentConfig.history,Number.isNaN(this.historyPointer)&&(this.historyPointer=0),this.history[this.historyPointer]=c,this.paused||this.rebuildDisplayText()})},paused:function(l){l?(this.pausedAt=this.historyPointer,this.pausedHistory=this.history.slice()):(this.pauseOffset=0,this.rebuildDisplayText())},allInstantSettings:function(){this.rebuildDisplayText()},allDebouncedSettings:Mg.debounce(function(){this.rebuildDisplayText()},300)},created:function(){const l={history:300,showTimestamp:!0,showAscii:!0,showLineAddress:!0,packetsToShow:1,bytesPerLine:16,newestAtTop:!0};this.currentConfig={...l,...this.currentConfig}},methods:{rebuildDisplayText:function(){let l=this.paused?this.pausedHistory:this.history;const c=this.paused?this.pausedAt:this.historyPointer;if(l=l.filter($=>$).slice(c+1,this.currentConfig.history).concat(l.slice(0,c+1)).map(this.calculatePacketText).map(this.matchesSearch),this.paused){const $=Math.max(l.length+this.pauseOffset,1);l=l.slice(0,$)}const e=Math.max(this.currentConfig.packetsToShow,1);l=l.slice(-e),this.currentConfig.newestAtTop&&(l=l.reverse());let u=`
1478
- `;this.filterText!==null&&(u+=`
1479
- `),this.displayText=l.join(u),this.rows=this.displayText.split(`
1480
- `).length},matchesSearch:function(l){return this.filterText===null?l:l.split(`
1481
- `).filter(c=>c.toLowerCase().includes(this.filterText.toLowerCase())).join(`
1482
- `)},download:function(){const l=new Blob([this.displayText],{type:"text/plain"}),c=document.createElement("a");let e=URL.createObjectURL(l);c.href=e,c.setAttribute("download",`${Cx.format(new Date,"yyyy_MM_dd_HH_mm_ss")}.txt`),c.click(),window.URL.revokeObjectURL(e)},pause:function(){this.paused=!0},togglePlayPause:function(){this.paused=!this.paused},stepBackward:function(){this.pause(),this.pauseOffset--},stepForward:function(){this.pause(),this.pauseOffset++}}},EC={class:"pa-2"},RC={class:"text-area-container"},IC={class:"floating-buttons"};function OC(l,c,e,u,$,b){const v=Ge.resolveComponent("v-text-field"),x=Ge.resolveComponent("v-col"),f=Ge.resolveComponent("v-slider"),p=Ge.resolveComponent("v-row"),s=Ge.resolveComponent("v-textarea"),o=Ge.resolveComponent("v-btn"),a=Ge.resolveComponent("v-card-title"),r=Ge.resolveComponent("v-switch"),n=Ge.resolveComponent("v-radio"),i=Ge.resolveComponent("v-radio-group"),h=Ge.resolveComponent("v-card-text"),m=Ge.resolveComponent("v-card"),y=Ge.resolveComponent("v-menu");return Ge.openBlock(),Ge.createElementBlock("div",EC,[Ge.createVNode(p,{dense:"",class:"mb-2"},{default:Ge.withCtx(()=>[Ge.createVNode(x,{cols:"4"},{default:Ge.withCtx(()=>[Ge.createVNode(v,{modelValue:l.filterText,"onUpdate:modelValue":c[0]||(c[0]=L=>l.filterText=L),label:"Search",class:"search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"","data-test":"history-component-search"},null,8,["modelValue"])]),_:1}),Ge.createVNode(x,{cols:"8",class:"mt-1"},{default:Ge.withCtx(()=>[Ge.createVNode(f,{modelValue:l.pauseOffset,"onUpdate:modelValue":c[1]||(c[1]=L=>l.pauseOffset=L),"prepend-icon":"mdi-step-backward","append-icon":"mdi-step-forward",min:1-l.currentConfig.history,max:0,"hide-details":"",onMousedown:b.pause,"onClick:prepend":b.stepBackward,"onClick:append":b.stepForward},null,8,["modelValue","min","onMousedown","onClick:prepend","onClick:append"])]),_:1})]),_:1}),Ge.createVNode(p,{dense:"","no-gutters":""},{default:Ge.withCtx(()=>[Ge.createVNode(x,null,{default:Ge.withCtx(()=>[Ge.createElementVNode("div",RC,[Ge.createVNode(s,{"model-value":l.displayText,rows:l.rows,"no-resize":"",readonly:"",variant:"solo",flat:"","hide-details":"","data-test":"history-component-text-area"},null,8,["model-value","rows"]),Ge.createElementVNode("div",IC,[Ge.createVNode(y,{"close-on-content-click":!1,"min-width":700},{activator:Ge.withCtx(({props:L})=>[Ge.createVNode(o,Ge.mergeProps({class:"ml-2",color:"secondary"},L,{icon:"astro:settings",size:"small","aria-label":"Settings","data-test":"history-component-open-settings"}),null,16)]),default:Ge.withCtx(()=>[Ge.createVNode(m,null,{default:Ge.withCtx(()=>[Ge.createVNode(a,{"data-test":"display-settings-card"},{default:Ge.withCtx(()=>[...c[9]||(c[9]=[Ge.createTextVNode(" Display settings ",-1)])]),_:1}),Ge.createVNode(h,null,{default:Ge.withCtx(()=>[Ge.createVNode(p,null,{default:Ge.withCtx(()=>[Ge.createVNode(x,null,{default:Ge.withCtx(()=>[Ge.createVNode(r,{modelValue:l.currentConfig.showTimestamp,"onUpdate:modelValue":c[2]||(c[2]=L=>l.currentConfig.showTimestamp=L),label:"Show timestamp",density:"compact",color:"primary","hide-details":"","data-test":"history-component-settings-show-timestamp"},null,8,["modelValue"]),l.hasRaw?(Ge.openBlock(),Ge.createBlock(r,{key:0,modelValue:l.currentConfig.showAscii,"onUpdate:modelValue":c[3]||(c[3]=L=>l.currentConfig.showAscii=L),label:"Show ASCII",density:"compact",color:"primary","hide-details":"","data-test":"history-component-settings-show-ascii"},null,8,["modelValue"])):Ge.createCommentVNode("",!0),l.hasRaw?(Ge.openBlock(),Ge.createBlock(r,{key:1,modelValue:l.currentConfig.showLineAddress,"onUpdate:modelValue":c[4]||(c[4]=L=>l.currentConfig.showLineAddress=L),label:"Show line address",density:"compact",color:"primary","hide-details":"","data-test":"history-component-settings-show-address"},null,8,["modelValue"])):Ge.createCommentVNode("",!0)]),_:1}),Ge.createVNode(x,null,{default:Ge.withCtx(()=>[Ge.createVNode(i,{modelValue:l.currentConfig.newestAtTop,"onUpdate:modelValue":c[5]||(c[5]=L=>l.currentConfig.newestAtTop=L),label:"Print newest to the"},{default:Ge.withCtx(()=>[Ge.createVNode(n,{label:"Top",value:!0,"data-test":"history-component-settings-newest-top"}),Ge.createVNode(n,{label:"Bottom",value:!1,"data-test":"history-component-settings-newest-bottom"})]),_:1},8,["modelValue"])]),_:1}),Ge.createVNode(x,null,{default:Ge.withCtx(()=>[Ge.createVNode(v,{modelValue:l.currentConfig.history,"onUpdate:modelValue":c[6]||(c[6]=L=>l.currentConfig.history=L),label:"History Buffer",type:"number",min:"1","persistent-hint":"",rules:[l.rules.required,l.rules.min],"data-test":"history-component-settings-history"},null,8,["modelValue","rules"]),l.hasRaw?(Ge.openBlock(),Ge.createBlock(v,{key:0,modelValue:l.currentConfig.bytesPerLine,"onUpdate:modelValue":c[7]||(c[7]=L=>l.currentConfig.bytesPerLine=L),label:"Bytes per line",type:"number",min:"1",rules:[l.rules.required,l.rules.min],"data-test":"history-component-settings-num-bytes"},null,8,["modelValue","rules"])):Ge.createCommentVNode("",!0),Ge.createVNode(v,{modelValue:l.currentConfig.packetsToShow,"onUpdate:modelValue":c[8]||(c[8]=L=>l.currentConfig.packetsToShow=L),label:"Entries to show",type:"number",min:"1",hint:`Maximum: ${l.currentConfig.history}`,"persistent-hint":"",rules:[l.rules.required,l.rules.min,l.rules.max],"data-test":"history-component-settings-num-packets"},null,8,["modelValue","hint","rules"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),Ge.createVNode(o,{class:"ml-2",color:"secondary",icon:"mdi-file-download",size:"small","aria-label":"Download","data-test":"history-component-download",onClick:b.download},null,8,["onClick"]),Ge.createVNode(o,{class:Ge.normalizeClass(["ml-2",{blink:l.paused}]),color:"primary",icon:l.paused?"mdi-play":"mdi-pause",size:"large","aria-label":l.paused?"Play":"Pause","data-test":"history-component-play-pause",onClick:b.togglePlayPause},null,8,["class","icon","aria-label","onClick"])])])]),_:1})]),_:1})])}const NC=Sx._export_sfc(LC,[["render",OC],["__scopeId","data-v-f489e1c6"]]);var _c={exports:{}},$f;function DC(){return $f||($f=1,(function(l,c){(function(){ace.require(["ace/mode/text"],function(e){l&&(l.exports=e)})})()})(_c)),_c.exports}DC();const FC=!0,Dn="u-",PC="uplot",BC=Dn+"hz",WC=Dn+"vt",HC=Dn+"title",zC=Dn+"wrap",UC=Dn+"under",VC=Dn+"over",jC=Dn+"axis",Bo=Dn+"off",KC=Dn+"select",GC=Dn+"cursor-x",qC=Dn+"cursor-y",YC=Dn+"cursor-pt",QC=Dn+"legend",ZC=Dn+"live",JC=Dn+"inline",XC=Dn+"series",ek=Dn+"marker",Mf=Dn+"label",tk=Dn+"value",js="width",Ks="height",Hs="top",Tf="bottom",cs="left",Ac="right",Pu="#000",Lf=Pu+"0",$c="mousemove",Ef="mousedown",Mc="mouseup",Rf="mouseenter",If="mouseleave",Of="dblclick",nk="resize",ik="scroll",Nf="change",Za="dppxchange",Bu="--",ys=typeof window<"u",yu=ys?document:null,hs=ys?window:null,rk=ys?navigator:null;let Ft,Ua;function wu(){let l=devicePixelRatio;Ft!=l&&(Ft=l,Ua&&xu(Nf,Ua,wu),Ua=matchMedia(`(min-resolution: ${Ft-.001}dppx) and (max-resolution: ${Ft+.001}dppx)`),zo(Nf,Ua,wu),hs.dispatchEvent(new CustomEvent(Za)))}function Oi(l,c){if(c!=null){let e=l.classList;!e.contains(c)&&e.add(c)}}function bu(l,c){let e=l.classList;e.contains(c)&&e.remove(c)}function en(l,c,e){l.style[c]=e+"px"}function hr(l,c,e,u){let $=yu.createElement(l);return c!=null&&Oi($,c),e?.insertBefore($,u),$}function Zi(l,c){return hr("div",l,c)}const Df=new WeakMap;function _r(l,c,e,u,$){let b="translate("+c+"px,"+e+"px)",v=Df.get(l);b!=v&&(l.style.transform=b,Df.set(l,b),c<0||e<0||c>u||e>$?Oi(l,Bo):bu(l,Bo))}const Ff=new WeakMap;function Pf(l,c,e){let u=c+e,$=Ff.get(l);u!=$&&(Ff.set(l,u),l.style.background=c,l.style.borderColor=e)}const Bf=new WeakMap;function Wf(l,c,e,u){let $=c+""+e,b=Bf.get(l);$!=b&&(Bf.set(l,$),l.style.height=e+"px",l.style.width=c+"px",l.style.marginLeft=u?-c/2+"px":0,l.style.marginTop=u?-e/2+"px":0)}const Wu={passive:!0},ok={...Wu,capture:!0};function zo(l,c,e,u){c.addEventListener(l,e,u?ok:Wu)}function xu(l,c,e,u){c.removeEventListener(l,e,Wu)}ys&&wu();function fr(l,c,e,u){let $;e=e||0,u=u||c.length-1;let b=u<=2147483647;for(;u-e>1;)$=b?e+u>>1:Ni((e+u)/2),c[$]<l?e=$:u=$;return l-c[e]<=c[u]-l?e:u}function Tg(l){return(e,u,$)=>{let b=-1,v=-1;for(let x=u;x<=$;x++)if(l(e[x])){b=x;break}for(let x=$;x>=u;x--)if(l(e[x])){v=x;break}return[b,v]}}const Lg=l=>l!=null,Eg=l=>l!=null&&l>0,ll=Tg(Lg),sk=Tg(Eg);function ak(l,c,e,u=0,$=!1){let b=$?sk:ll,v=$?Eg:Lg;[c,e]=b(l,c,e);let x=l[c],f=l[c];if(c>-1)if(u==1)x=l[c],f=l[e];else if(u==-1)x=l[e],f=l[c];else for(let p=c;p<=e;p++){let s=l[p];v(s)&&(s<x?x=s:s>f&&(f=s))}return[x??Yt,f??-Yt]}function cl(l,c,e,u){let $=Uf(l),b=Uf(c);l==c&&($==-1?(l*=e,c/=e):(l/=e,c*=e));let v=e==10?Gr:Rg,x=$==1?Ni:Ji,f=b==1?Ji:Ni,p=x(v(Nn(l))),s=f(v(Nn(c))),o=fs(e,p),a=fs(e,s);return e==10&&(p<0&&(o=Qt(o,-p)),s<0&&(a=Qt(a,-s))),u||e==2?(l=o*$,c=a*b):(l=Dg(l,o),c=ul(c,a)),[l,c]}function Hu(l,c,e,u){let $=cl(l,c,e,u);return l==0&&($[0]=0),c==0&&($[1]=0),$}const zu=.1,Hf={mode:3,pad:zu},qs={pad:0,soft:null,mode:0},lk={min:qs,max:qs};function Ja(l,c,e,u){return hl(e)?zf(l,c,e):(qs.pad=e,qs.soft=u?0:null,qs.mode=u?3:0,zf(l,c,lk))}function It(l,c){return l??c}function ck(l,c,e){for(c=It(c,0),e=It(e,l.length-1);c<=e;){if(l[c]!=null)return!0;c++}return!1}function zf(l,c,e){let u=e.min,$=e.max,b=It(u.pad,0),v=It($.pad,0),x=It(u.hard,-Yt),f=It($.hard,Yt),p=It(u.soft,Yt),s=It($.soft,-Yt),o=It(u.mode,0),a=It($.mode,0),r=c-l,n=Gr(r),i=di(Nn(l),Nn(c)),h=Gr(i),m=Nn(h-n);(r<1e-24||m>10)&&(r=0,(l==0||c==0)&&(r=1e-24,o==2&&p!=Yt&&(b=0),a==2&&s!=-Yt&&(v=0)));let y=r||i||1e3,L=Gr(y),T=fs(10,Ni(L)),k=y*(r==0?l==0?.1:1:b),w=Qt(Dg(l-k,T/10),24),R=l>=p&&(o==1||o==3&&w<=p||o==2&&w>=p)?p:Yt,D=di(x,w<R&&l>=R?R:pr(R,w)),I=y*(r==0?c==0?.1:1:v),E=Qt(ul(c+I,T/10),24),z=c<=s&&(a==1||a==3&&E>=s||a==2&&E<=s)?s:-Yt,F=pr(f,E>z&&c<=z?z:di(z,E));return D==F&&D==0&&(F=100),[D,F]}const uk=new Intl.NumberFormat(ys?rk.language:"en-US"),Uu=l=>uk.format(l),Di=Math,Ya=Di.PI,Nn=Di.abs,Ni=Di.floor,On=Di.round,Ji=Di.ceil,pr=Di.min,di=Di.max,fs=Di.pow,Uf=Di.sign,Gr=Di.log10,Rg=Di.log2,hk=(l,c=1)=>Di.sinh(l)*c,Tc=(l,c=1)=>Di.asinh(l/c),Yt=1/0;function Vf(l){return(Gr((l^l>>31)-(l>>31))|0)+1}function Su(l,c,e){return pr(di(l,c),e)}function Ig(l){return typeof l=="function"}function Mt(l){return Ig(l)?l:()=>l}const dk=()=>{},Og=l=>l,Ng=(l,c)=>c,fk=l=>null,jf=l=>!0,Kf=(l,c)=>l==c,pk=/\.\d*?(?=9{6,}|0{6,})/gm,Vo=l=>{if(Pg(l)||mo.has(l))return l;const c=`${l}`,e=c.match(pk);if(e==null)return l;let u=e[0].length-1;if(c.indexOf("e-")!=-1){let[$,b]=c.split("e");return+`${Vo($)}e${b}`}return Qt(l,u)};function Fo(l,c){return Vo(Qt(Vo(l/c))*c)}function ul(l,c){return Vo(Ji(Vo(l/c))*c)}function Dg(l,c){return Vo(Ni(Vo(l/c))*c)}function Qt(l,c=0){if(Pg(l))return l;let e=10**c,u=l*e*(1+Number.EPSILON);return On(u)/e}const mo=new Map;function Fg(l){return((""+l).split(".")[1]||"").length}function Zs(l,c,e,u){let $=[],b=u.map(Fg);for(let v=c;v<e;v++){let x=Nn(v),f=Qt(fs(l,v),x);for(let p=0;p<u.length;p++){let s=l==10?+`${u[p]}e${v}`:u[p]*f,o=(v>=0?0:x)+(v>=b[p]?0:b[p]),a=l==10?s:Qt(s,o);$.push(a),mo.set(a,o)}}return $}const Ys={},Vu=[],ps=[null,null],po=Array.isArray,Pg=Number.isInteger,gk=l=>l===void 0;function Gf(l){return typeof l=="string"}function hl(l){let c=!1;if(l!=null){let e=l.constructor;c=e==null||e==Object}return c}function mk(l){return l!=null&&typeof l=="object"}const vk=Object.getPrototypeOf(Uint8Array),Bg="__proto__";function gs(l,c=hl){let e;if(po(l)){let u=l.find($=>$!=null);if(po(u)||c(u)){e=Array(l.length);for(let $=0;$<l.length;$++)e[$]=gs(l[$],c)}else e=l.slice()}else if(l instanceof vk)e=l.slice();else if(c(l)){e={};for(let u in l)u!=Bg&&(e[u]=gs(l[u],c))}else e=l;return e}function Mn(l){let c=arguments;for(let e=1;e<c.length;e++){let u=c[e];for(let $ in u)$!=Bg&&(hl(l[$])?Mn(l[$],gs(u[$])):l[$]=gs(u[$]))}return l}const yk=0,wk=1,bk=2;function xk(l,c,e){for(let u=0,$,b=-1;u<c.length;u++){let v=c[u];if(v>b){for($=v-1;$>=0&&l[$]==null;)l[$--]=null;for($=v+1;$<e&&l[$]==null;)l[b=$++]=null}}}function Sk(l,c){if(_k(l)){let v=l[0].slice();for(let x=1;x<l.length;x++)v.push(...l[x].slice(1));return Ak(v[0])||(v=kk(v)),v}let e=new Set;for(let v=0;v<l.length;v++){let f=l[v][0],p=f.length;for(let s=0;s<p;s++)e.add(f[s])}let u=[Array.from(e).sort((v,x)=>v-x)],$=u[0].length,b=new Map;for(let v=0;v<$;v++)b.set(u[0][v],v);for(let v=0;v<l.length;v++){let x=l[v],f=x[0];for(let p=1;p<x.length;p++){let s=x[p],o=Array($).fill(void 0),a=c?c[v][p]:wk,r=[];for(let n=0;n<s.length;n++){let i=s[n],h=b.get(f[n]);i===null?a!=yk&&(o[h]=i,a==bk&&r.push(h)):o[h]=i}xk(o,r,$),u.push(o)}}return u}const Ck=typeof queueMicrotask>"u"?l=>Promise.resolve().then(l):queueMicrotask;function kk(l){let c=l[0],e=c.length,u=Array(e);for(let b=0;b<u.length;b++)u[b]=b;u.sort((b,v)=>c[b]-c[v]);let $=[];for(let b=0;b<l.length;b++){let v=l[b],x=Array(e);for(let f=0;f<e;f++)x[f]=v[u[f]];$.push(x)}return $}function _k(l){let c=l[0][0],e=c.length;for(let u=1;u<l.length;u++){let $=l[u][0];if($.length!=e)return!1;if($!=c){for(let b=0;b<e;b++)if($[b]!=c[b])return!1}}return!0}function Ak(l,c=100){const e=l.length;if(e<=1)return!0;let u=0,$=e-1;for(;u<=$&&l[u]==null;)u++;for(;$>=u&&l[$]==null;)$--;if($<=u)return!0;const b=di(1,Ni(($-u+1)/c));for(let v=l[u],x=u+b;x<=$;x+=b){const f=l[x];if(f!=null){if(f<=v)return!1;v=f}}return!0}const Wg=["January","February","March","April","May","June","July","August","September","October","November","December"],Hg=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function zg(l){return l.slice(0,3)}const $k=Hg.map(zg),Mk=Wg.map(zg),Tk={MMMM:Wg,MMM:Mk,WWWW:Hg,WWW:$k};function zs(l){return(l<10?"0":"")+l}function Lk(l){return(l<10?"00":l<100?"0":"")+l}const Ek={YYYY:l=>l.getFullYear(),YY:l=>(l.getFullYear()+"").slice(2),MMMM:(l,c)=>c.MMMM[l.getMonth()],MMM:(l,c)=>c.MMM[l.getMonth()],MM:l=>zs(l.getMonth()+1),M:l=>l.getMonth()+1,DD:l=>zs(l.getDate()),D:l=>l.getDate(),WWWW:(l,c)=>c.WWWW[l.getDay()],WWW:(l,c)=>c.WWW[l.getDay()],HH:l=>zs(l.getHours()),H:l=>l.getHours(),h:l=>{let c=l.getHours();return c==0?12:c>12?c-12:c},AA:l=>l.getHours()>=12?"PM":"AM",aa:l=>l.getHours()>=12?"pm":"am",a:l=>l.getHours()>=12?"p":"a",mm:l=>zs(l.getMinutes()),m:l=>l.getMinutes(),ss:l=>zs(l.getSeconds()),s:l=>l.getSeconds(),fff:l=>Lk(l.getMilliseconds())};function ju(l,c){c=c||Tk;let e=[],u=/\{([a-z]+)\}|[^{]+/gi,$;for(;$=u.exec(l);)e.push($[0][0]=="{"?Ek[$[1]]:$[0]);return b=>{let v="";for(let x=0;x<e.length;x++)v+=typeof e[x]=="string"?e[x]:e[x](b,c);return v}}const Rk=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Ik(l,c){let e;return c=="UTC"||c=="Etc/UTC"?e=new Date(+l+l.getTimezoneOffset()*6e4):c==Rk?e=l:(e=new Date(l.toLocaleString("en-US",{timeZone:c})),e.setMilliseconds(l.getMilliseconds())),e}const Ug=l=>l%1==0,Xa=[1,2,2.5,5],Ok=Zs(10,-32,0,Xa),Vg=Zs(10,0,32,Xa),Nk=Vg.filter(Ug),Po=Ok.concat(Vg),Ku=`
1483
- `,jg="{YYYY}",qf=Ku+jg,Kg="{M}/{D}",Gs=Ku+Kg,Va=Gs+"/{YY}",Gg="{aa}",Dk="{h}:{mm}",us=Dk+Gg,Yf=Ku+us,Qf=":{ss}",Ht=null;function qg(l){let c=l*1e3,e=c*60,u=e*60,$=u*24,b=$*30,v=$*365,f=(l==1?Zs(10,0,3,Xa).filter(Ug):Zs(10,-3,0,Xa)).concat([c,c*5,c*10,c*15,c*30,e,e*5,e*10,e*15,e*30,u,u*2,u*3,u*4,u*6,u*8,u*12,$,$*2,$*3,$*4,$*5,$*6,$*7,$*8,$*9,$*10,$*15,b,b*2,b*3,b*4,b*6,v,v*2,v*5,v*10,v*25,v*50,v*100]);const p=[[v,jg,Ht,Ht,Ht,Ht,Ht,Ht,1],[$*28,"{MMM}",qf,Ht,Ht,Ht,Ht,Ht,1],[$,Kg,qf,Ht,Ht,Ht,Ht,Ht,1],[u,"{h}"+Gg,Va,Ht,Gs,Ht,Ht,Ht,1],[e,us,Va,Ht,Gs,Ht,Ht,Ht,1],[c,Qf,Va+" "+us,Ht,Gs+" "+us,Ht,Yf,Ht,1],[l,Qf+".{fff}",Va+" "+us,Ht,Gs+" "+us,Ht,Yf,Ht,1]];function s(o){return(a,r,n,i,h,m)=>{let y=[],L=h>=v,T=h>=b&&h<v,k=o(n),w=Qt(k*l,3),R=Lc(k.getFullYear(),L?0:k.getMonth(),T||L?1:k.getDate()),D=Qt(R*l,3);if(T||L){let I=T?h/b:0,E=L?h/v:0,z=w==D?w:Qt(Lc(R.getFullYear()+E,R.getMonth()+I,1)*l,3),F=new Date(On(z/l)),O=F.getFullYear(),_=F.getMonth();for(let S=0;z<=i;S++){let N=Lc(O+E*S,_+I*S,1),W=N-o(Qt(N*l,3));z=Qt((+N+W)*l,3),z<=i&&y.push(z)}}else{let I=h>=$?$:h,E=Ni(n)-Ni(w),z=D+E+ul(w-D,I);y.push(z);let F=o(z),O=F.getHours()+F.getMinutes()/e+F.getSeconds()/u,_=h/u,S=a.axes[r]._space,N=m/S;for(;z=Qt(z+h,l==1?0:3),!(z>i);)if(_>1){let W=Ni(Qt(O+_,6))%24,Q=o(z).getHours()-W;Q>1&&(Q=-1),z-=Q*u,O=(O+_)%24;let te=y[y.length-1];Qt((z-te)/h,3)*N>=.7&&y.push(z)}else y.push(z)}return y}}return[f,p,s]}const[Fk,Pk,Bk]=qg(1),[Wk,Hk,zk]=qg(.001);Zs(2,-53,53,[1]);function Zf(l,c){return l.map(e=>e.map((u,$)=>$==0||$==8||u==null?u:c($==1||e[8]==0?u:e[1]+u)))}function Jf(l,c){return(e,u,$,b,v)=>{let x=c.find(n=>v>=n[0])||c[c.length-1],f,p,s,o,a,r;return u.map(n=>{let i=l(n),h=i.getFullYear(),m=i.getMonth(),y=i.getDate(),L=i.getHours(),T=i.getMinutes(),k=i.getSeconds(),w=h!=f&&x[2]||m!=p&&x[3]||y!=s&&x[4]||L!=o&&x[5]||T!=a&&x[6]||k!=r&&x[7]||x[1];return f=h,p=m,s=y,o=L,a=T,r=k,w(i)})}}function Uk(l,c){let e=ju(c);return(u,$,b,v,x)=>$.map(f=>e(l(f)))}function Lc(l,c,e){return new Date(l,c,e)}function Xf(l,c){return c(l)}const Vk="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function ep(l,c){return(e,u,$,b)=>b==null?Bu:c(l(u))}function jk(l,c){let e=l.series[c];return e.width?e.stroke(l,c):e.points.width?e.points.stroke(l,c):null}function Kk(l,c){return l.series[c].fill(l,c)}const Gk={show:!0,live:!0,isolate:!1,mount:dk,markers:{show:!0,width:2,stroke:jk,fill:Kk,dash:"solid"},idx:null,idxs:null,values:[]};function qk(l,c){let e=l.cursor.points,u=Zi(),$=e.size(l,c);en(u,js,$),en(u,Ks,$);let b=$/-2;en(u,"marginLeft",b),en(u,"marginTop",b);let v=e.width(l,c,$);return v&&en(u,"borderWidth",v),u}function Yk(l,c){let e=l.series[c].points;return e._fill||e._stroke}function Qk(l,c){let e=l.series[c].points;return e._stroke||e._fill}function Zk(l,c){return l.series[c].points.size}const Ec=[0,0];function Jk(l,c,e){return Ec[0]=c,Ec[1]=e,Ec}function ja(l,c,e,u=!0){return $=>{$.button==0&&(!u||$.target==c)&&e($)}}function Rc(l,c,e,u=!0){return $=>{(!u||$.target==c)&&e($)}}const Xk={show:!0,x:!0,y:!0,lock:!1,move:Jk,points:{one:!1,show:qk,size:Zk,width:0,stroke:Qk,fill:Yk},bind:{mousedown:ja,mouseup:ja,click:ja,dblclick:ja,mousemove:Rc,mouseleave:Rc,mouseenter:Rc},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(l,c)=>{c.stopPropagation(),c.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(l,c,e,u,$)=>u-$,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Yg={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Gu=Mn({},Yg,{filter:Ng}),Qg=Mn({},Gu,{size:10}),Zg=Mn({},Yg,{show:!1}),qu='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Jg="bold "+qu,Xg=1.5,tp={show:!0,scale:"x",stroke:Pu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Jg,side:2,grid:Gu,ticks:Qg,border:Zg,font:qu,lineGap:Xg,rotate:0},e_="Value",t_="Time",np={show:!0,scale:"x",auto:!1,sorted:1,min:Yt,max:-Yt,idxs:[]};function n_(l,c,e,u,$){return c.map(b=>b==null?"":Uu(b))}function i_(l,c,e,u,$,b,v){let x=[],f=mo.get($)||0;e=v?e:Qt(ul(e,$),f);for(let p=e;p<=u;p=Qt(p+$,f))x.push(Object.is(p,-0)?0:p);return x}function Cu(l,c,e,u,$,b,v){const x=[],f=l.scales[l.axes[c].scale].log,p=f==10?Gr:Rg,s=Ni(p(e));$=fs(f,s),f==10&&($=Po[fr($,Po)]);let o=e,a=$*f;f==10&&(a=Po[fr(a,Po)]);do x.push(o),o=o+$,f==10&&!mo.has(o)&&(o=Qt(o,mo.get($))),o>=a&&($=o,a=$*f,f==10&&(a=Po[fr(a,Po)]));while(o<=u);return x}function r_(l,c,e,u,$,b,v){let f=l.scales[l.axes[c].scale].asinh,p=u>f?Cu(l,c,di(f,e),u,$):[f],s=u>=0&&e<=0?[0]:[];return(e<-f?Cu(l,c,di(f,-u),-e,$):[f]).reverse().map(a=>-a).concat(s,p)}const em=/./,o_=/[12357]/,s_=/[125]/,ip=/1/,ku=(l,c,e,u)=>l.map(($,b)=>c==4&&$==0||b%u==0&&e.test($.toExponential()[$<0?1:0])?$:null);function a_(l,c,e,u,$){let b=l.axes[e],v=b.scale,x=l.scales[v],f=l.valToPos,p=b._space,s=f(10,v),o=f(9,v)-s>=p?em:f(7,v)-s>=p?o_:f(5,v)-s>=p?s_:ip;if(o==ip){let a=Nn(f(1,v)-s);if(a<p)return ku(c.slice().reverse(),x.distr,o,Ji(p/a)).reverse()}return ku(c,x.distr,o,1)}function l_(l,c,e,u,$){let b=l.axes[e],v=b.scale,x=b._space,f=l.valToPos,p=Nn(f(1,v)-f(2,v));return p<x?ku(c.slice().reverse(),3,em,Ji(x/p)).reverse():c}function c_(l,c,e,u){return u==null?Bu:c==null?"":Uu(c)}const rp={show:!0,scale:"y",stroke:Pu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Jg,side:3,grid:Gu,ticks:Qg,border:Zg,font:qu,lineGap:Xg,rotate:0};function u_(l,c){let e=3+(l||1)*2;return Qt(e*c,3)}function h_(l,c){let{scale:e,idxs:u}=l.series[0],$=l._data[0],b=l.valToPos($[u[0]],e,!0),v=l.valToPos($[u[1]],e,!0),x=Nn(v-b),f=l.series[c],p=x/(f.points.space*Ft);return u[1]-u[0]<=p}const op={scale:null,auto:!0,sorted:0,min:Yt,max:-Yt},tm=(l,c,e,u,$)=>$,sp={show:!0,auto:!0,sorted:0,gaps:tm,alpha:1,facets:[Mn({},op,{scale:"x"}),Mn({},op,{scale:"y"})]},ap={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:tm,alpha:1,points:{show:h_,filter:null},values:null,min:Yt,max:-Yt,idxs:[],path:null,clip:null};function d_(l,c,e,u,$){return e/10}const nm={time:FC,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},f_=Mn({},nm,{time:!1,ori:1}),lp={};function im(l,c){let e=lp[l];return e||(e={key:l,plots:[],sub(u){e.plots.push(u)},unsub(u){e.plots=e.plots.filter($=>$!=u)},pub(u,$,b,v,x,f,p){for(let s=0;s<e.plots.length;s++)e.plots[s]!=$&&e.plots[s].pub(u,$,b,v,x,f,p)}},l!=null&&(lp[l]=e)),e}const ms=1,_u=2;function jo(l,c,e){const u=l.mode,$=l.series[c],b=u==2?l._data[c]:l._data,v=l.scales,x=l.bbox;let f=b[0],p=u==2?b[1]:b[c],s=u==2?v[$.facets[0].scale]:v[l.series[0].scale],o=u==2?v[$.facets[1].scale]:v[$.scale],a=x.left,r=x.top,n=x.width,i=x.height,h=l.valToPosH,m=l.valToPosV;return s.ori==0?e($,f,p,s,o,h,m,a,r,n,i,fl,ws,gl,om,am):e($,f,p,s,o,m,h,r,a,i,n,pl,bs,Zu,sm,lm)}function Yu(l,c){let e=0,u=0,$=It(l.bands,Vu);for(let b=0;b<$.length;b++){let v=$[b];v.series[0]==c?e=v.dir:v.series[1]==c&&(v.dir==1?u|=1:u|=2)}return[e,u==1?-1:u==2?1:u==3?2:0]}function p_(l,c,e,u,$){let b=l.mode,v=l.series[c],x=b==2?v.facets[1].scale:v.scale,f=l.scales[x];return $==-1?f.min:$==1?f.max:f.distr==3?f.dir==1?f.min:f.max:0}function qr(l,c,e,u,$,b){return jo(l,c,(v,x,f,p,s,o,a,r,n,i,h)=>{let m=v.pxRound;const y=p.dir*(p.ori==0?1:-1),L=p.ori==0?ws:bs;let T,k;y==1?(T=e,k=u):(T=u,k=e);let w=m(o(x[T],p,i,r)),R=m(a(f[T],s,h,n)),D=m(o(x[k],p,i,r)),I=m(a(b==1?s.max:s.min,s,h,n)),E=new Path2D($);return L(E,D,I),L(E,w,I),L(E,w,R),E})}function dl(l,c,e,u,$,b){let v=null;if(l.length>0){v=new Path2D;const x=c==0?gl:Zu;let f=e;for(let o=0;o<l.length;o++){let a=l[o];if(a[1]>a[0]){let r=a[0]-f;r>0&&x(v,f,u,r,u+b),f=a[1]}}let p=e+$-f,s=10;p>0&&x(v,f,u-s/2,p,u+b+s)}return v}function g_(l,c,e){let u=l[l.length-1];u&&u[0]==c?u[1]=e:l.push([c,e])}function Qu(l,c,e,u,$,b,v){let x=[],f=l.length;for(let p=$==1?e:u;p>=e&&p<=u;p+=$)if(c[p]===null){let o=p,a=p;if($==1)for(;++p<=u&&c[p]===null;)a=p;else for(;--p>=e&&c[p]===null;)a=p;let r=b(l[o]),n=a==o?r:b(l[a]),i=o-$;r=v<=0&&i>=0&&i<f?b(l[i]):r;let m=a+$;n=v>=0&&m>=0&&m<f?b(l[m]):n,n>=r&&x.push([r,n])}return x}function cp(l){return l==0?Og:l==1?On:c=>Fo(c,l)}function rm(l){let c=l==0?fl:pl,e=l==0?($,b,v,x,f,p)=>{$.arcTo(b,v,x,f,p)}:($,b,v,x,f,p)=>{$.arcTo(v,b,f,x,p)},u=l==0?($,b,v,x,f)=>{$.rect(b,v,x,f)}:($,b,v,x,f)=>{$.rect(v,b,f,x)};return($,b,v,x,f,p=0,s=0)=>{p==0&&s==0?u($,b,v,x,f):(p=pr(p,x/2,f/2),s=pr(s,x/2,f/2),c($,b+p,v),e($,b+x,v,b+x,v+f,p),e($,b+x,v+f,b,v+f,s),e($,b,v+f,b,v,s),e($,b,v,b+x,v,p),$.closePath())}}const fl=(l,c,e)=>{l.moveTo(c,e)},pl=(l,c,e)=>{l.moveTo(e,c)},ws=(l,c,e)=>{l.lineTo(c,e)},bs=(l,c,e)=>{l.lineTo(e,c)},gl=rm(0),Zu=rm(1),om=(l,c,e,u,$,b)=>{l.arc(c,e,u,$,b)},sm=(l,c,e,u,$,b)=>{l.arc(e,c,u,$,b)},am=(l,c,e,u,$,b,v)=>{l.bezierCurveTo(c,e,u,$,b,v)},lm=(l,c,e,u,$,b,v)=>{l.bezierCurveTo(e,c,$,u,v,b)};function cm(l){return(c,e,u,$,b)=>jo(c,e,(v,x,f,p,s,o,a,r,n,i,h)=>{let{pxRound:m,points:y}=v,L,T;p.ori==0?(L=fl,T=om):(L=pl,T=sm);const k=Qt(y.width*Ft,3);let w=(y.size-y.width)/2*Ft,R=Qt(w*2,3),D=new Path2D,I=new Path2D,{left:E,top:z,width:F,height:O}=c.bbox;gl(I,E-R,z-R,F+R*2,O+R*2);const _=S=>{if(f[S]!=null){let N=m(o(x[S],p,i,r)),W=m(a(f[S],s,h,n));L(D,N+w,W),T(D,N,W,w,0,Ya*2)}};if(b)b.forEach(_);else for(let S=u;S<=$;S++)_(S);return{stroke:k>0?D:null,fill:D,clip:I,flags:ms|_u}})}function um(l){return(c,e,u,$,b,v)=>{u!=$&&(b!=u&&v!=u&&l(c,e,u),b!=$&&v!=$&&l(c,e,$),l(c,e,v))}}const m_=um(ws),v_=um(bs);function hm(l){const c=It(l?.alignGaps,0);return(e,u,$,b)=>jo(e,u,(v,x,f,p,s,o,a,r,n,i,h)=>{[$,b]=ll(f,$,b);let m=v.pxRound,y=O=>m(o(O,p,i,r)),L=O=>m(a(O,s,h,n)),T,k;p.ori==0?(T=ws,k=m_):(T=bs,k=v_);const w=p.dir*(p.ori==0?1:-1),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ms},D=R.stroke;let I=!1;if(b-$>=i*4){let O=ne=>e.posToVal(ne,p.key,!0),_=null,S=null,N,W,V,G=y(x[w==1?$:b]),Q=y(x[$]),te=y(x[b]),ce=O(w==1?Q+1:te-1);for(let ne=w==1?$:b;ne>=$&&ne<=b;ne+=w){let he=x[ne],le=(w==1?he<ce:he>ce)?G:y(he),me=f[ne];le==G?me!=null?(W=me,_==null?(T(D,le,L(W)),N=_=S=W):W<_?_=W:W>S&&(S=W)):me===null&&(I=!0):(_!=null&&k(D,G,L(_),L(S),L(N),L(W)),me!=null?(W=me,T(D,le,L(W)),_=S=N=W):(_=S=null,me===null&&(I=!0)),G=le,ce=O(G+w))}_!=null&&_!=S&&V!=G&&k(D,G,L(_),L(S),L(N),L(W))}else for(let O=w==1?$:b;O>=$&&O<=b;O+=w){let _=f[O];_===null?I=!0:_!=null&&T(D,y(x[O]),L(_))}let[z,F]=Yu(e,u);if(v.fill!=null||z!=0){let O=R.fill=new Path2D(D),_=v.fillTo(e,u,v.min,v.max,z),S=L(_),N=y(x[$]),W=y(x[b]);w==-1&&([W,N]=[N,W]),T(O,W,S),T(O,N,S)}if(!v.spanGaps){let O=[];I&&O.push(...Qu(x,f,$,b,w,y,c)),R.gaps=O=v.gaps(e,u,$,b,O),R.clip=dl(O,p.ori,r,n,i,h)}return F!=0&&(R.band=F==2?[qr(e,u,$,b,D,-1),qr(e,u,$,b,D,1)]:qr(e,u,$,b,D,F)),R})}function y_(l){const c=It(l.align,1),e=It(l.ascDesc,!1),u=It(l.alignGaps,0),$=It(l.extend,!1);return(b,v,x,f)=>jo(b,v,(p,s,o,a,r,n,i,h,m,y,L)=>{[x,f]=ll(o,x,f);let T=p.pxRound,{left:k,width:w}=b.bbox,R=Q=>T(n(Q,a,y,h)),D=Q=>T(i(Q,r,L,m)),I=a.ori==0?ws:bs;const E={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ms},z=E.stroke,F=a.dir*(a.ori==0?1:-1);let O=D(o[F==1?x:f]),_=R(s[F==1?x:f]),S=_,N=_;$&&c==-1&&(N=k,I(z,N,O)),I(z,_,O);for(let Q=F==1?x:f;Q>=x&&Q<=f;Q+=F){let te=o[Q];if(te==null)continue;let ce=R(s[Q]),ne=D(te);c==1?I(z,ce,O):I(z,S,ne),I(z,ce,ne),O=ne,S=ce}let W=S;$&&c==1&&(W=k+w,I(z,W,O));let[V,G]=Yu(b,v);if(p.fill!=null||V!=0){let Q=E.fill=new Path2D(z),te=p.fillTo(b,v,p.min,p.max,V),ce=D(te);I(Q,W,ce),I(Q,N,ce)}if(!p.spanGaps){let Q=[];Q.push(...Qu(s,o,x,f,F,R,u));let te=p.width*Ft/2,ce=e||c==1?te:-te,ne=e||c==-1?-te:te;Q.forEach(he=>{he[0]+=ce,he[1]+=ne}),E.gaps=Q=p.gaps(b,v,x,f,Q),E.clip=dl(Q,a.ori,h,m,y,L)}return G!=0&&(E.band=G==2?[qr(b,v,x,f,z,-1),qr(b,v,x,f,z,1)]:qr(b,v,x,f,z,G)),E})}function up(l,c,e,u,$,b,v=Yt){if(l.length>1){let x=null;for(let f=0,p=1/0;f<l.length;f++)if(c[f]!==void 0){if(x!=null){let s=Nn(l[f]-l[x]);s<p&&(p=s,v=Nn(e(l[f],u,$,b)-e(l[x],u,$,b)))}x=f}}return v}function w_(l){l=l||Ys;const c=It(l.size,[.6,Yt,1]),e=l.align||0,u=l.gap||0;let $=l.radius;$=$==null?[0,0]:typeof $=="number"?[$,0]:$;const b=Mt($),v=1-c[0],x=It(c[1],Yt),f=It(c[2],1),p=It(l.disp,Ys),s=It(l.each,r=>{}),{fill:o,stroke:a}=p;return(r,n,i,h)=>jo(r,n,(m,y,L,T,k,w,R,D,I,E,z)=>{let F=m.pxRound,O=e,_=u*Ft,S=x*Ft,N=f*Ft,W,V;T.ori==0?[W,V]=b(r,n):[V,W]=b(r,n);const G=T.dir*(T.ori==0?1:-1);let Q=T.ori==0?gl:Zu,te=T.ori==0?s:(ze,Ot,Gt,_n,oi,qn,sn)=>{s(ze,Ot,Gt,oi,_n,sn,qn)},ce=It(r.bands,Vu).find(ze=>ze.series[0]==n),ne=ce!=null?ce.dir:0,he=m.fillTo(r,n,m.min,m.max,ne),ue=F(R(he,k,z,I)),le,me,_e,Ae=E,Me=F(m.width*Ft),qe=!1,Ve=null,ot=null,Je=null,lt=null;o!=null&&(Me==0||a!=null)&&(qe=!0,Ve=o.values(r,n,i,h),ot=new Map,new Set(Ve).forEach(ze=>{ze!=null&&ot.set(ze,new Path2D)}),Me>0&&(Je=a.values(r,n,i,h),lt=new Map,new Set(Je).forEach(ze=>{ze!=null&&lt.set(ze,new Path2D)})));let{x0:zt,size:vn}=p;if(zt!=null&&vn!=null){O=1,y=zt.values(r,n,i,h),zt.unit==2&&(y=y.map(Gt=>r.posToVal(D+Gt*E,T.key,!0)));let ze=vn.values(r,n,i,h);vn.unit==2?me=ze[0]*E:me=w(ze[0],T,E,D)-w(0,T,E,D),Ae=up(y,L,w,T,E,D,Ae),_e=Ae-me+_}else Ae=up(y,L,w,T,E,D,Ae),_e=Ae*v+_,me=Ae-_e;_e<1&&(_e=0),Me>=me/2&&(Me=0),_e<5&&(F=Og);let Pt=_e>0,Si=Ae-_e-(Pt?Me:0);me=F(Su(Si,N,S)),le=(O==0?me/2:O==G?0:me)-O*G*((O==0?_/2:0)+(Pt?Me/2:0));const on={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},kn=qe?null:new Path2D;let Fn=null;if(ce!=null)Fn=r.data[ce.series[1]];else{let{y0:ze,y1:Ot}=p;ze!=null&&Ot!=null&&(L=Ot.values(r,n,i,h),Fn=ze.values(r,n,i,h))}let ri=W*me,ft=V*me;for(let ze=G==1?i:h;ze>=i&&ze<=h;ze+=G){let Ot=L[ze];if(Ot==null)continue;if(Fn!=null){let Ut=Fn[ze]??0;if(Ot-Ut==0)continue;ue=R(Ut,k,z,I)}let Gt=T.distr!=2||p!=null?y[ze]:ze,_n=w(Gt,T,E,D),oi=R(It(Ot,he),k,z,I),qn=F(_n-le),sn=F(di(oi,ue)),Tn=F(pr(oi,ue)),Pn=sn-Tn;if(Ot!=null){let Ut=Ot<0?ft:ri,Ln=Ot<0?ri:ft;qe?(Me>0&&Je[ze]!=null&&Q(lt.get(Je[ze]),qn,Tn+Ni(Me/2),me,di(0,Pn-Me),Ut,Ln),Ve[ze]!=null&&Q(ot.get(Ve[ze]),qn,Tn+Ni(Me/2),me,di(0,Pn-Me),Ut,Ln)):Q(kn,qn,Tn+Ni(Me/2),me,di(0,Pn-Me),Ut,Ln),te(r,n,ze,qn-Me/2,Tn,me+Me,Pn)}}return Me>0?on.stroke=qe?lt:kn:qe||(on._fill=m.width==0?m._fill:m._stroke??m._fill,on.width=0),on.fill=qe?ot:kn,on})}function b_(l,c){const e=It(c?.alignGaps,0);return(u,$,b,v)=>jo(u,$,(x,f,p,s,o,a,r,n,i,h,m)=>{[b,v]=ll(p,b,v);let y=x.pxRound,L=W=>y(a(W,s,h,n)),T=W=>y(r(W,o,m,i)),k,w,R;s.ori==0?(k=fl,R=ws,w=am):(k=pl,R=bs,w=lm);const D=s.dir*(s.ori==0?1:-1);let I=L(f[D==1?b:v]),E=I,z=[],F=[];for(let W=D==1?b:v;W>=b&&W<=v;W+=D)if(p[W]!=null){let G=f[W],Q=L(G);z.push(E=Q),F.push(T(p[W]))}const O={stroke:l(z,F,k,R,w,y),fill:null,clip:null,band:null,gaps:null,flags:ms},_=O.stroke;let[S,N]=Yu(u,$);if(x.fill!=null||S!=0){let W=O.fill=new Path2D(_),V=x.fillTo(u,$,x.min,x.max,S),G=T(V);R(W,E,G),R(W,I,G)}if(!x.spanGaps){let W=[];W.push(...Qu(f,p,b,v,D,L,e)),O.gaps=W=x.gaps(u,$,b,v,W),O.clip=dl(W,s.ori,n,i,h,m)}return N!=0&&(O.band=N==2?[qr(u,$,b,v,_,-1),qr(u,$,b,v,_,1)]:qr(u,$,b,v,_,N)),O})}function x_(l){return b_(S_,l)}function S_(l,c,e,u,$,b){const v=l.length;if(v<2)return null;const x=new Path2D;if(e(x,l[0],c[0]),v==2)u(x,l[1],c[1]);else{let f=Array(v),p=Array(v-1),s=Array(v-1),o=Array(v-1);for(let a=0;a<v-1;a++)s[a]=c[a+1]-c[a],o[a]=l[a+1]-l[a],p[a]=s[a]/o[a];f[0]=p[0];for(let a=1;a<v-1;a++)p[a]===0||p[a-1]===0||p[a-1]>0!=p[a]>0?f[a]=0:(f[a]=3*(o[a-1]+o[a])/((2*o[a]+o[a-1])/p[a-1]+(o[a]+2*o[a-1])/p[a]),isFinite(f[a])||(f[a]=0));f[v-1]=p[v-2];for(let a=0;a<v-1;a++)$(x,l[a]+o[a]/3,c[a]+f[a]*o[a]/3,l[a+1]-o[a]/3,c[a+1]-f[a+1]*o[a]/3,l[a+1],c[a+1])}return x}const Au=new Set;function hp(){for(let l of Au)l.syncRect(!0)}ys&&(zo(nk,hs,hp),zo(ik,hs,hp,!0),zo(Za,hs,()=>{ii.pxRatio=Ft}));const C_=hm(),k_=cm();function dp(l,c,e,u){return(u?[l[0],l[1]].concat(l.slice(2)):[l[0]].concat(l.slice(1))).map((b,v)=>$u(b,v,c,e))}function __(l,c){return l.map((e,u)=>u==0?{}:Mn({},c,e))}function $u(l,c,e,u){return Mn({},c==0?e:u,l)}function dm(l,c,e){return c==null?ps:[c,e]}const A_=dm;function $_(l,c,e){return c==null?ps:Ja(c,e,zu,!0)}function fm(l,c,e,u){return c==null?ps:cl(c,e,l.scales[u].log,!1)}const M_=fm;function pm(l,c,e,u){return c==null?ps:Hu(c,e,l.scales[u].log,!1)}const T_=pm;function L_(l,c,e,u,$){let b=di(Vf(l),Vf(c)),v=c-l,x=fr($/u*v,e);do{let f=e[x],p=u*f/v;if(p>=$&&b+(f<5?mo.get(f):0)<=17)return[f,p]}while(++x<e.length);return[0,0]}function fp(l){let c,e;return l=l.replace(/(\d+)px/,(u,$)=>(c=On((e=+$)*Ft))+"px"),[l,c,e]}function E_(l){l.show&&[l.font,l.labelFont].forEach(c=>{let e=Qt(c[2]*Ft,1);c[0]=c[0].replace(/[0-9.]+px/,e+"px"),c[1]=e})}function ii(l,c,e){const u={mode:It(l.mode,1)},$=u.mode;function b(j,Z,re,oe){let ge=Z.valToPct(j);return oe+re*(Z.dir==-1?1-ge:ge)}function v(j,Z,re,oe){let ge=Z.valToPct(j);return oe+re*(Z.dir==-1?ge:1-ge)}function x(j,Z,re,oe){return Z.ori==0?b(j,Z,re,oe):v(j,Z,re,oe)}u.valToPosH=b,u.valToPosV=v;let f=!1;u.status=0;const p=u.root=Zi(PC);if(l.id!=null&&(p.id=l.id),Oi(p,l.class),l.title){let j=Zi(HC,p);j.textContent=l.title}const s=hr("canvas"),o=u.ctx=s.getContext("2d"),a=Zi(zC,p);zo("click",a,j=>{j.target===n&&(Dt!=Wi||At!=xr)&&hn.click(u,j)},!0);const r=u.under=Zi(UC,a);a.appendChild(s);const n=u.over=Zi(VC,a);l=gs(l);const i=+It(l.pxAlign,1),h=cp(i);(l.plugins||[]).forEach(j=>{j.opts&&(l=j.opts(u,l)||l)});const m=l.ms||.001,y=u.series=$==1?dp(l.series||[],np,ap,!1):__(l.series||[null],sp),L=u.axes=dp(l.axes||[],tp,rp,!0),T=u.scales={},k=u.bands=l.bands||[];k.forEach(j=>{j.fill=Mt(j.fill||null),j.dir=It(j.dir,-1)});const w=$==2?y[1].facets[0].scale:y[0].scale,R={axes:Rr,series:Yo},D=(l.drawOrder||["axes","series"]).map(j=>R[j]);function I(j){const Z=j.distr==3?re=>Gr(re>0?re:j.clamp(u,re,j.min,j.max,j.key)):j.distr==4?re=>Tc(re,j.asinh):j.distr==100?re=>j.fwd(re):re=>re;return re=>{let oe=Z(re),{_min:ge,_max:be}=j,$e=be-ge;return(oe-ge)/$e}}function E(j){let Z=T[j];if(Z==null){let re=(l.scales||Ys)[j]||Ys;if(re.from!=null){E(re.from);let oe=Mn({},T[re.from],re,{key:j});oe.valToPct=I(oe),T[j]=oe}else{Z=T[j]=Mn({},j==w?nm:f_,re),Z.key=j;let oe=Z.time,ge=Z.range,be=po(ge);if((j!=w||$==2&&!oe)&&(be&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?Hf:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?Hf:{mode:1,hard:ge[1],soft:ge[1]}},be=!1),!be&&hl(ge))){let $e=ge;ge=(Ne,Fe,He)=>Fe==null?ps:Ja(Fe,He,$e)}Z.range=Mt(ge||(oe?A_:j==w?Z.distr==3?M_:Z.distr==4?T_:dm:Z.distr==3?fm:Z.distr==4?pm:$_)),Z.auto=Mt(be?!1:Z.auto),Z.clamp=Mt(Z.clamp||d_),Z._min=Z._max=null,Z.valToPct=I(Z)}}}E("x"),E("y"),$==1&&y.forEach(j=>{E(j.scale)}),L.forEach(j=>{E(j.scale)});for(let j in l.scales)E(j);const z=T[w],F=z.distr;let O,_;z.ori==0?(Oi(p,BC),O=b,_=v):(Oi(p,WC),O=v,_=b);const S={};for(let j in T){let Z=T[j];(Z.min!=null||Z.max!=null)&&(S[j]={min:Z.min,max:Z.max},Z.min=Z.max=null)}const N=l.tzDate||(j=>new Date(On(j/m))),W=l.fmtDate||ju,V=m==1?Bk(N):zk(N),G=Jf(N,Zf(m==1?Pk:Hk,W)),Q=ep(N,Xf(Vk,W)),te=[],ce=u.legend=Mn({},Gk,l.legend),ne=u.cursor=Mn({},Xk,{drag:{y:$==2}},l.cursor),he=ce.show,ue=ne.show,le=ce.markers;ce.idxs=te,le.width=Mt(le.width),le.dash=Mt(le.dash),le.stroke=Mt(le.stroke),le.fill=Mt(le.fill);let me,_e,Ae,Me=[],qe=[],Ve,ot=!1,Je={};if(ce.live){const j=y[1]?y[1].values:null;ot=j!=null,Ve=ot?j(u,1,0):{_:0};for(let Z in Ve)Je[Z]=Bu}if(he)if(me=hr("table",QC,p),Ae=hr("tbody",null,me),ce.mount(u,me),ot){_e=hr("thead",null,me,Ae);let j=hr("tr",null,_e);hr("th",null,j);for(var lt in Ve)hr("th",Mf,j).textContent=lt}else Oi(me,JC),ce.live&&Oi(me,ZC);const zt={show:!0},vn={show:!1};function Pt(j,Z){if(Z==0&&(ot||!ce.live||$==2))return ps;let re=[],oe=hr("tr",XC,Ae,Ae.childNodes[Z]);Oi(oe,j.class),j.show||Oi(oe,Bo);let ge=hr("th",null,oe);if(le.show){let Ne=Zi(ek,ge);if(Z>0){let Fe=le.width(u,Z);Fe&&(Ne.style.border=Fe+"px "+le.dash(u,Z)+" "+le.stroke(u,Z)),Ne.style.background=le.fill(u,Z)}}let be=Zi(Mf,ge);j.label instanceof HTMLElement?be.appendChild(j.label):be.textContent=j.label,Z>0&&(le.show||(be.style.color=j.width>0?le.stroke(u,Z):le.fill(u,Z)),on("click",ge,Ne=>{if(ne._lock)return;nr(Ne);let Fe=y.indexOf(j);if((Ne.ctrlKey||Ne.metaKey)!=ce.isolate){let He=y.some((je,Ye)=>Ye>0&&Ye!=Fe&&je.show);y.forEach((je,Ye)=>{Ye>0&&ai(Ye,He?Ye==Fe?zt:vn:zt,!0,tt.setSeries)})}else ai(Fe,{show:!j.show},!0,tt.setSeries)},!1),ir&&on(Rf,ge,Ne=>{ne._lock||(nr(Ne),ai(y.indexOf(j),Ui,!0,tt.setSeries))},!1));for(var $e in Ve){let Ne=hr("td",tk,oe);Ne.textContent="--",re.push(Ne)}return[oe,re]}const Si=new Map;function on(j,Z,re,oe=!0){const ge=Si.get(Z)||{},be=ne.bind[j](u,Z,re,oe);be&&(zo(j,Z,ge[j]=be),Si.set(Z,ge))}function kn(j,Z,re){const oe=Si.get(Z)||{};for(let ge in oe)(j==null||ge==j)&&(xu(ge,Z,oe[ge]),delete oe[ge]);j==null&&Si.delete(Z)}let Fn=0,ri=0,ft=0,ze=0,Ot=0,Gt=0,_n=Ot,oi=Gt,qn=ft,sn=ze,Tn=0,Pn=0,Ut=0,Ln=0;u.bbox={};let Ar=!1,Xi=!1,er=!1,tr=!1,$r=!1,Vn=!1;function Mr(j,Z,re){(re||j!=u.width||Z!=u.height)&&Yr(j,Z),ar(!1),er=!0,Xi=!0,br()}function Yr(j,Z){u.width=Fn=ft=j,u.height=ri=ze=Z,Ot=Gt=0,vo(),Ko();let re=u.bbox;Tn=re.left=Fo(Ot*Ft,.5),Pn=re.top=Fo(Gt*Ft,.5),Ut=re.width=Fo(ft*Ft,.5),Ln=re.height=Fo(ze*Ft,.5)}const xs=3;function Ci(){let j=!1,Z=0;for(;!j;){Z++;let re=Qo(Z),oe=_s(Z);j=Z==xs||re&&oe,j||(Yr(u.width,u.height),Xi=!0)}}function Ss({width:j,height:Z}){Mr(j,Z)}u.setSize=Ss;function vo(){let j=!1,Z=!1,re=!1,oe=!1;L.forEach((ge,be)=>{if(ge.show&&ge._show){let{side:$e,_size:Ne}=ge,Fe=$e%2,He=ge.label!=null?ge.labelSize:0,je=Ne+He;je>0&&(Fe?(ft-=je,$e==3?(Ot+=je,oe=!0):re=!0):(ze-=je,$e==0?(Gt+=je,j=!0):Z=!0))}}),or[0]=j,or[1]=re,or[2]=Z,or[3]=oe,ft-=Zn[1]+Zn[3],Ot+=Zn[3],ze-=Zn[2]+Zn[0],Gt+=Zn[0]}function Ko(){let j=Ot+ft,Z=Gt+ze,re=Ot,oe=Gt;function ge(be,$e){switch(be){case 1:return j+=$e,j-$e;case 2:return Z+=$e,Z-$e;case 3:return re-=$e,re+$e;case 0:return oe-=$e,oe+$e}}L.forEach((be,$e)=>{if(be.show&&be._show){let Ne=be.side;be._pos=ge(Ne,be._size),be.label!=null&&(be._lpos=ge(Ne,be.labelSize))}})}if(ne.dataIdx==null){let j=ne.hover,Z=j.skip=new Set(j.skip??[]);Z.add(void 0);let re=j.prox=Mt(j.prox),oe=j.bias??=0;ne.dataIdx=(ge,be,$e,Ne)=>{if(be==0)return $e;let Fe=$e,He=re(ge,be,$e,Ne)??Yt,je=He>=0&&He<Yt,Ye=z.ori==0?ft:ze,dt=ne.left,Ct=c[0],pt=c[be];if(Z.has(pt[$e])){Fe=null;let yt=null,it=null,et;if(oe==0||oe==-1)for(et=$e;yt==null&&et-- >0;)Z.has(pt[et])||(yt=et);if(oe==0||oe==1)for(et=$e;it==null&&et++<pt.length;)Z.has(pt[et])||(it=et);if(yt!=null||it!=null)if(je){let qt=yt==null?-1/0:O(Ct[yt],z,Ye,0),rn=it==null?1/0:O(Ct[it],z,Ye,0),$n=dt-qt,Tt=rn-dt;$n<=Tt?$n<=He&&(Fe=yt):Tt<=He&&(Fe=it)}else Fe=it==null?yt:yt==null?it:$e-yt<=it-$e?yt:it}else je&&Nn(dt-O(Ct[$e],z,Ye,0))>He&&(Fe=null);return Fe}}const nr=j=>{ne.event=j};ne.idxs=te,ne._lock=!1;let yn=ne.points;yn.show=Mt(yn.show),yn.size=Mt(yn.size),yn.stroke=Mt(yn.stroke),yn.width=Mt(yn.width),yn.fill=Mt(yn.fill);const Yn=u.focus=Mn({},l.focus||{alpha:.3},ne.focus),ir=Yn.prox>=0,an=ir&&yn.one;let Qn=[],mr=[],rr=[];function yo(j,Z){let re=yn.show(u,Z);if(re instanceof HTMLElement)return Oi(re,YC),Oi(re,j.class),_r(re,-10,-10,ft,ze),n.insertBefore(re,Qn[Z]),re}function Go(j,Z){if($==1||Z>0){let re=$==1&&T[j.scale].time,oe=j.value;j.value=re?Gf(oe)?ep(N,Xf(oe,W)):oe||Q:oe||c_,j.label=j.label||(re?t_:e_)}if(an||Z>0){j.width=j.width==null?1:j.width,j.paths=j.paths||C_||fk,j.fillTo=Mt(j.fillTo||p_),j.pxAlign=+It(j.pxAlign,i),j.pxRound=cp(j.pxAlign),j.stroke=Mt(j.stroke||null),j.fill=Mt(j.fill||null),j._stroke=j._fill=j._paths=j._focus=null;let re=u_(di(1,j.width),1),oe=j.points=Mn({},{size:re,width:di(1,re*.2),stroke:j.stroke,space:re*2,paths:k_,_stroke:null,_fill:null},j.points);oe.show=Mt(oe.show),oe.filter=Mt(oe.filter),oe.fill=Mt(oe.fill),oe.stroke=Mt(oe.stroke),oe.paths=Mt(oe.paths),oe.pxAlign=j.pxAlign}if(he){let re=Pt(j,Z);Me.splice(Z,0,re[0]),qe.splice(Z,0,re[1]),ce.values.push(null)}if(ue){te.splice(Z,0,null);let re=null;an?Z==0&&(re=yo(j,Z)):Z>0&&(re=yo(j,Z)),Qn.splice(Z,0,re),mr.splice(Z,0,0),rr.splice(Z,0,0)}Ke("addSeries",Z)}function Cs(j,Z){Z=Z??y.length,j=$==1?$u(j,Z,np,ap):$u(j,Z,{},sp),y.splice(Z,0,j),Go(y[Z],Z)}u.addSeries=Cs;function ks(j){if(y.splice(j,1),he){ce.values.splice(j,1),qe.splice(j,1);let Z=Me.splice(j,1)[0];kn(null,Z.firstChild),Z.remove()}ue&&(te.splice(j,1),Qn.splice(j,1)[0].remove(),mr.splice(j,1),rr.splice(j,1)),Ke("delSeries",j)}u.delSeries=ks;const or=[!1,!1,!1,!1];function ki(j,Z){if(j._show=j.show,j.show){let re=j.side%2,oe=T[j.scale];oe==null&&(j.scale=re?y[1].scale:w,oe=T[j.scale]);let ge=oe.time;j.size=Mt(j.size),j.space=Mt(j.space),j.rotate=Mt(j.rotate),po(j.incrs)&&j.incrs.forEach($e=>{!mo.has($e)&&mo.set($e,Fg($e))}),j.incrs=Mt(j.incrs||(oe.distr==2?Nk:ge?m==1?Fk:Wk:Po)),j.splits=Mt(j.splits||(ge&&oe.distr==1?V:oe.distr==3?Cu:oe.distr==4?r_:i_)),j.stroke=Mt(j.stroke),j.grid.stroke=Mt(j.grid.stroke),j.ticks.stroke=Mt(j.ticks.stroke),j.border.stroke=Mt(j.border.stroke);let be=j.values;j.values=po(be)&&!po(be[0])?Mt(be):ge?po(be)?Jf(N,Zf(be,W)):Gf(be)?Uk(N,be):be||G:be||n_,j.filter=Mt(j.filter||(oe.distr>=3&&oe.log==10?a_:oe.distr==3&&oe.log==2?l_:Ng)),j.font=fp(j.font),j.labelFont=fp(j.labelFont),j._size=j.size(u,null,Z,0),j._space=j._rotate=j._incrs=j._found=j._splits=j._values=null,j._size>0&&(or[Z]=!0,j._el=Zi(jC,a))}}function _t(j,Z,re,oe){let[ge,be,$e,Ne]=re,Fe=Z%2,He=0;return Fe==0&&(Ne||be)&&(He=Z==0&&!ge||Z==2&&!$e?On(tp.size/3):0),Fe==1&&(ge||$e)&&(He=Z==1&&!be||Z==3&&!Ne?On(rp.size/2):0),He}const qo=u.padding=(l.padding||[_t,_t,_t,_t]).map(j=>Mt(It(j,_t))),Zn=u._padding=qo.map((j,Z)=>j(u,Z,or,0));let wn,Zt=null,un=null;const Fi=$==1?y[0].idxs:null;let Jn=null,Pi=!1;function Qr(j,Z){if(c=j??[],u.data=u._data=c,$==2){wn=0;for(let re=1;re<y.length;re++)wn+=c[re][0].length}else{c.length==0&&(u.data=u._data=c=[[]]),Jn=c[0],wn=Jn.length;let re=c;if(F==2){re=c.slice();let oe=re[0]=Array(wn);for(let ge=0;ge<wn;ge++)oe[ge]=ge}u._data=c=re}if(ar(!0),Ke("setData"),F==2&&(er=!0),Z!==!1){let re=z;re.auto(u,Pi)?wo():An(w,re.min,re.max),tr=tr||ne.left>=0,Vn=!0,br()}}u.setData=Qr;function wo(){Pi=!0;let j,Z;$==1&&(wn>0?(Zt=Fi[0]=0,un=Fi[1]=wn-1,j=c[0][Zt],Z=c[0][un],F==2?(j=Zt,Z=un):j==Z&&(F==3?[j,Z]=cl(j,j,z.log,!1):F==4?[j,Z]=Hu(j,j,z.log,!1):z.time?Z=j+On(86400/m):[j,Z]=Ja(j,Z,zu,!0))):(Zt=Fi[0]=j=null,un=Fi[1]=Z=null)),An(w,j,Z)}let vr,fi,Tr,Zr,pi,Jr,bo,xo,Xr,En;function So(j,Z,re,oe,ge,be){j??=Lf,re??=Vu,oe??="butt",ge??=Lf,be??="round",j!=vr&&(o.strokeStyle=vr=j),ge!=fi&&(o.fillStyle=fi=ge),Z!=Tr&&(o.lineWidth=Tr=Z),be!=pi&&(o.lineJoin=pi=be),oe!=Jr&&(o.lineCap=Jr=oe),re!=Zr&&o.setLineDash(Zr=re)}function Lr(j,Z,re,oe){Z!=fi&&(o.fillStyle=fi=Z),j!=bo&&(o.font=bo=j),re!=xo&&(o.textAlign=xo=re),oe!=Xr&&(o.textBaseline=Xr=oe)}function eo(j,Z,re,oe,ge=0){if(oe.length>0&&j.auto(u,Pi)&&(Z==null||Z.min==null)){let be=It(Zt,0),$e=It(un,oe.length-1),Ne=re.min==null?ak(oe,be,$e,ge,j.distr==3):[re.min,re.max];j.min=pr(j.min,re.min=Ne[0]),j.max=di(j.max,re.max=Ne[1])}}const to={min:null,max:null};function yr(){for(let oe in T){let ge=T[oe];S[oe]==null&&(ge.min==null||S[w]!=null&&ge.auto(u,Pi))&&(S[oe]=to)}for(let oe in T){let ge=T[oe];S[oe]==null&&ge.from!=null&&S[ge.from]!=null&&(S[oe]=to)}S[w]!=null&&ar(!0);let j={};for(let oe in S){let ge=S[oe];if(ge!=null){let be=j[oe]=gs(T[oe],mk);if(ge.min!=null)Mn(be,ge);else if(oe!=w||$==2)if(wn==0&&be.from==null){let $e=be.range(u,null,null,oe);be.min=$e[0],be.max=$e[1]}else be.min=Yt,be.max=-Yt}}if(wn>0){y.forEach((oe,ge)=>{if($==1){let be=oe.scale,$e=S[be];if($e==null)return;let Ne=j[be];if(ge==0){let Fe=Ne.range(u,Ne.min,Ne.max,be);Ne.min=Fe[0],Ne.max=Fe[1],Zt=fr(Ne.min,c[0]),un=fr(Ne.max,c[0]),un-Zt>1&&(c[0][Zt]<Ne.min&&Zt++,c[0][un]>Ne.max&&un--),oe.min=Jn[Zt],oe.max=Jn[un]}else oe.show&&oe.auto&&eo(Ne,$e,oe,c[ge],oe.sorted);oe.idxs[0]=Zt,oe.idxs[1]=un}else if(ge>0&&oe.show&&oe.auto){let[be,$e]=oe.facets,Ne=be.scale,Fe=$e.scale,[He,je]=c[ge],Ye=j[Ne],dt=j[Fe];Ye!=null&&eo(Ye,S[Ne],be,He,be.sorted),dt!=null&&eo(dt,S[Fe],$e,je,$e.sorted),oe.min=$e.min,oe.max=$e.max}});for(let oe in j){let ge=j[oe],be=S[oe];if(ge.from==null&&(be==null||be.min==null)){let $e=ge.range(u,ge.min==Yt?null:ge.min,ge.max==-Yt?null:ge.max,oe);ge.min=$e[0],ge.max=$e[1]}}}for(let oe in j){let ge=j[oe];if(ge.from!=null){let be=j[ge.from];if(be.min==null)ge.min=ge.max=null;else{let $e=ge.range(u,be.min,be.max,oe);ge.min=$e[0],ge.max=$e[1]}}}let Z={},re=!1;for(let oe in j){let ge=j[oe],be=T[oe];if(be.min!=ge.min||be.max!=ge.max){be.min=ge.min,be.max=ge.max;let $e=be.distr;be._min=$e==3?Gr(be.min):$e==4?Tc(be.min,be.asinh):$e==100?be.fwd(be.min):be.min,be._max=$e==3?Gr(be.max):$e==4?Tc(be.max,be.asinh):$e==100?be.fwd(be.max):be.max,Z[oe]=re=!0}}if(re){y.forEach((oe,ge)=>{$==2?ge>0&&Z.y&&(oe._paths=null):Z[oe.scale]&&(oe._paths=null)});for(let oe in Z)er=!0,Ke("setScale",oe);ue&&ne.left>=0&&(tr=Vn=!0)}for(let oe in S)S[oe]=null}function Co(j){let Z=Su(Zt-1,0,wn-1),re=Su(un+1,0,wn-1);for(;j[Z]==null&&Z>0;)Z--;for(;j[re]==null&&re<wn-1;)re++;return[Z,re]}function Yo(){if(wn>0){let j=y.some(Z=>Z._focus)&&En!=Yn.alpha;j&&(o.globalAlpha=En=Yn.alpha),y.forEach((Z,re)=>{if(re>0&&Z.show&&(no(re,!1),no(re,!0),Z._paths==null)){let oe=En;En!=Z.alpha&&(o.globalAlpha=En=Z.alpha);let ge=$==2?[0,c[re][0].length-1]:Co(c[re]);Z._paths=Z.paths(u,re,ge[0],ge[1]),En!=oe&&(o.globalAlpha=En=oe)}}),y.forEach((Z,re)=>{if(re>0&&Z.show){let oe=En;En!=Z.alpha&&(o.globalAlpha=En=Z.alpha),Z._paths!=null&&io(re,!1);{let ge=Z._paths!=null?Z._paths.gaps:null,be=Z.points.show(u,re,Zt,un,ge),$e=Z.points.filter(u,re,be,ge);(be||$e)&&(Z.points._paths=Z.points.paths(u,re,Zt,un,$e),io(re,!0))}En!=oe&&(o.globalAlpha=En=oe),Ke("drawSeries",re)}}),j&&(o.globalAlpha=En=1)}}function no(j,Z){let re=Z?y[j].points:y[j];re._stroke=re.stroke(u,j),re._fill=re.fill(u,j)}function io(j,Z){let re=Z?y[j].points:y[j],{stroke:oe,fill:ge,clip:be,flags:$e,_stroke:Ne=re._stroke,_fill:Fe=re._fill,_width:He=re.width}=re._paths;He=Qt(He*Ft,3);let je=null,Ye=He%2/2;Z&&Fe==null&&(Fe=He>0?"#fff":Ne);let dt=re.pxAlign==1&&Ye>0;if(dt&&o.translate(Ye,Ye),!Z){let Ct=Tn-He/2,pt=Pn-He/2,yt=Ut+He,it=Ln+He;je=new Path2D,je.rect(Ct,pt,yt,it)}Z?Er(Ne,He,re.dash,re.cap,Fe,oe,ge,$e,be):ko(j,Ne,He,re.dash,re.cap,Fe,oe,ge,$e,je,be),dt&&o.translate(-Ye,-Ye)}function ko(j,Z,re,oe,ge,be,$e,Ne,Fe,He,je){let Ye=!1;Fe!=0&&k.forEach((dt,Ct)=>{if(dt.series[0]==j){let pt=y[dt.series[1]],yt=c[dt.series[1]],it=(pt._paths||Ys).band;po(it)&&(it=dt.dir==1?it[0]:it[1]);let et,qt=null;pt.show&&it&&ck(yt,Zt,un)?(qt=dt.fill(u,Ct)||be,et=pt._paths.clip):it=null,Er(Z,re,oe,ge,qt,$e,Ne,Fe,He,je,et,it),Ye=!0}}),Ye||Er(Z,re,oe,ge,be,$e,Ne,Fe,He,je)}const ro=ms|_u;function Er(j,Z,re,oe,ge,be,$e,Ne,Fe,He,je,Ye){So(j,Z,re,oe,ge),(Fe||He||Ye)&&(o.save(),Fe&&o.clip(Fe),He&&o.clip(He)),Ye?(Ne&ro)==ro?(o.clip(Ye),je&&o.clip(je),Rn(ge,$e),Bi(j,be,Z)):Ne&_u?(Rn(ge,$e),o.clip(Ye),Bi(j,be,Z)):Ne&ms&&(o.save(),o.clip(Ye),je&&o.clip(je),Rn(ge,$e),o.restore(),Bi(j,be,Z)):(Rn(ge,$e),Bi(j,be,Z)),(Fe||He||Ye)&&o.restore()}function Bi(j,Z,re){re>0&&(Z instanceof Map?Z.forEach((oe,ge)=>{o.strokeStyle=vr=ge,o.stroke(oe)}):Z!=null&&j&&o.stroke(Z))}function Rn(j,Z){Z instanceof Map?Z.forEach((re,oe)=>{o.fillStyle=fi=oe,o.fill(re)}):Z!=null&&j&&o.fill(Z)}function wr(j,Z,re,oe){let ge=L[j],be;if(oe<=0)be=[0,0];else{let $e=ge._space=ge.space(u,j,Z,re,oe),Ne=ge._incrs=ge.incrs(u,j,Z,re,oe,$e);be=L_(Z,re,Ne,oe,$e)}return ge._found=be}function sr(j,Z,re,oe,ge,be,$e,Ne,Fe,He){let je=$e%2/2;i==1&&o.translate(je,je),So(Ne,$e,Fe,He,Ne),o.beginPath();let Ye,dt,Ct,pt,yt=ge+(oe==0||oe==3?-be:be);re==0?(dt=ge,pt=yt):(Ye=ge,Ct=yt);for(let it=0;it<j.length;it++)Z[it]!=null&&(re==0?Ye=Ct=j[it]:dt=pt=j[it],o.moveTo(Ye,dt),o.lineTo(Ct,pt));o.stroke(),i==1&&o.translate(-je,-je)}function Qo(j){let Z=!0;return L.forEach((re,oe)=>{if(!re.show)return;let ge=T[re.scale];if(ge.min==null){re._show&&(Z=!1,re._show=!1,ar(!1));return}else re._show||(Z=!1,re._show=!0,ar(!1));let be=re.side,$e=be%2,{min:Ne,max:Fe}=ge,[He,je]=wr(oe,Ne,Fe,$e==0?ft:ze);if(je==0)return;let Ye=ge.distr==2,dt=re._splits=re.splits(u,oe,Ne,Fe,He,je,Ye),Ct=ge.distr==2?dt.map(et=>Jn[et]):dt,pt=ge.distr==2?Jn[dt[1]]-Jn[dt[0]]:He,yt=re._values=re.values(u,re.filter(u,Ct,oe,je,pt),oe,je,pt);re._rotate=be==2?re.rotate(u,yt,oe,je):0;let it=re._size;re._size=Ji(re.size(u,yt,oe,j)),it!=null&&re._size!=it&&(Z=!1)}),Z}function _s(j){let Z=!0;return qo.forEach((re,oe)=>{let ge=re(u,oe,or,j);ge!=Zn[oe]&&(Z=!1),Zn[oe]=ge}),Z}function Rr(){for(let j=0;j<L.length;j++){let Z=L[j];if(!Z.show||!Z._show)continue;let re=Z.side,oe=re%2,ge,be,$e=Z.stroke(u,j),Ne=re==0||re==3?-1:1,[Fe,He]=Z._found;if(Z.label!=null){let Kt=Z.labelGap*Ne,zn=On((Z._lpos+Kt)*Ft);Lr(Z.labelFont[0],$e,"center",re==2?Hs:Tf),o.save(),oe==1?(ge=be=0,o.translate(zn,On(Pn+Ln/2)),o.rotate((re==3?-Ya:Ya)/2)):(ge=On(Tn+Ut/2),be=zn);let Fr=Ig(Z.label)?Z.label(u,j,Fe,He):Z.label;o.fillText(Fr,ge,be),o.restore()}if(He==0)continue;let je=T[Z.scale],Ye=oe==0?Ut:Ln,dt=oe==0?Tn:Pn,Ct=Z._splits,pt=je.distr==2?Ct.map(Kt=>Jn[Kt]):Ct,yt=je.distr==2?Jn[Ct[1]]-Jn[Ct[0]]:Fe,it=Z.ticks,et=Z.border,qt=it.show?it.size:0,rn=On(qt*Ft),$n=On((Z.alignTo==2?Z._size-qt-Z.gap:Z.gap)*Ft),Tt=Z._rotate*-Ya/180,pe=h(Z._pos*Ft),ke=(rn+$n)*Ne,xe=pe+ke;be=oe==0?xe:0,ge=oe==1?xe:0;let We=Z.font[0],nt=Z.align==1?cs:Z.align==2?Ac:Tt>0?cs:Tt<0?Ac:oe==0?"center":re==3?Ac:cs,mt=Tt||oe==1?"middle":re==2?Hs:Tf;Lr(We,$e,nt,mt);let Et=Z.font[1]*Z.lineGap,wt=Ct.map(Kt=>h(x(Kt,je,Ye,dt))),li=Z._values;for(let Kt=0;Kt<li.length;Kt++){let zn=li[Kt];if(zn!=null){oe==0?ge=wt[Kt]:be=wt[Kt],zn=""+zn;let Fr=zn.indexOf(`
1484
- `)==-1?[zn]:zn.split(/\n/gm);for(let gn=0;gn<Fr.length;gn++){let Ao=Fr[gn];Tt?(o.save(),o.translate(ge,be+gn*Et),o.rotate(Tt),o.fillText(Ao,0,0),o.restore()):o.fillText(Ao,ge,be+gn*Et)}}}it.show&&sr(wt,it.filter(u,pt,j,He,yt),oe,re,pe,rn,Qt(it.width*Ft,3),it.stroke(u,j),it.dash,it.cap);let Vi=Z.grid;Vi.show&&sr(wt,Vi.filter(u,pt,j,He,yt),oe,oe==0?2:1,oe==0?Pn:Tn,oe==0?Ln:Ut,Qt(Vi.width*Ft,3),Vi.stroke(u,j),Vi.dash,Vi.cap),et.show&&sr([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?Pn:Tn,oe==1?Ln:Ut,Qt(et.width*Ft,3),et.stroke(u,j),et.dash,et.cap)}Ke("drawAxes")}function ar(j){y.forEach((Z,re)=>{re>0&&(Z._paths=null,j&&($==1?(Z.min=null,Z.max=null):Z.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let Ir=!1,oo=!1,Or=[];function Zo(){oo=!1;for(let j=0;j<Or.length;j++)Ke(...Or[j]);Or.length=0}function br(){Ir||(Ck(Jo),Ir=!0)}function De(j,Z=!1){Ir=!0,oo=Z,j(u),Jo(),Z&&Or.length>0&&queueMicrotask(Zo)}u.batch=De;function Jo(){if(Ar&&(yr(),Ar=!1),er&&(Ci(),er=!1),Xi){if(en(r,cs,Ot),en(r,Hs,Gt),en(r,js,ft),en(r,Ks,ze),en(n,cs,Ot),en(n,Hs,Gt),en(n,js,ft),en(n,Ks,ze),en(a,js,Fn),en(a,Ks,ri),s.width=On(Fn*Ft),s.height=On(ri*Ft),L.forEach(({_el:j,_show:Z,_size:re,_pos:oe,side:ge})=>{if(j!=null)if(Z){let be=ge===3||ge===0?re:0,$e=ge%2==1;en(j,$e?"left":"top",oe-be),en(j,$e?"width":"height",re),en(j,$e?"top":"left",$e?Gt:Ot),en(j,$e?"height":"width",$e?ze:ft),bu(j,Bo)}else Oi(j,Bo)}),vr=fi=Tr=pi=Jr=bo=xo=Xr=Zr=null,En=1,B(!0),Ot!=_n||Gt!=oi||ft!=qn||ze!=sn){ar(!1);let j=ft/qn,Z=ze/sn;if(ue&&!tr&&ne.left>=0){ne.left*=j,ne.top*=Z,_i&&_r(_i,On(ne.left),0,ft,ze),bn&&_r(bn,0,On(ne.top),ft,ze);for(let re=0;re<Qn.length;re++){let oe=Qn[re];oe!=null&&(mr[re]*=j,rr[re]*=Z,_r(oe,Ji(mr[re]),Ji(rr[re]),ft,ze))}}if(ct.show&&!$r&&ct.left>=0&&ct.width>0){ct.left*=j,ct.width*=j,ct.top*=Z,ct.height*=Z;for(let re in Y)en(si,re,ct[re])}_n=Ot,oi=Gt,qn=ft,sn=ze}Ke("setSize"),Xi=!1}Fn>0&&ri>0&&(o.clearRect(0,0,s.width,s.height),Ke("drawClear"),D.forEach(j=>j()),Ke("draw")),ct.show&&$r&&(Vt(ct),$r=!1),ue&&tr&&(C(null,!0,!1),tr=!1),ce.show&&ce.live&&Vn&&(g(),Vn=!1),f||(f=!0,u.status=1,Ke("ready")),Pi=!1,Ir=!1}u.redraw=(j,Z)=>{er=Z||!1,j!==!1?An(w,z.min,z.max):br()};function Ie(j,Z){let re=T[j];if(re.from==null){if(wn==0){let oe=re.range(u,Z.min,Z.max,j);Z.min=oe[0],Z.max=oe[1]}if(Z.min>Z.max){let oe=Z.min;Z.min=Z.max,Z.max=oe}if(wn>1&&Z.min!=null&&Z.max!=null&&Z.max-Z.min<1e-16)return;j==w&&re.distr==2&&wn>0&&(Z.min=fr(Z.min,c[0]),Z.max=fr(Z.max,c[0]),Z.min==Z.max&&Z.max++),S[j]=Z,Ar=!0,br()}}u.setScale=Ie;let ln,Nr,_i,bn,Xo,Dr,Wi,xr,Nt,Rt,Dt,At,Hi=!1;const hn=ne.drag;let Pe=hn.x,Jt=hn.y;ue&&(ne.x&&(ln=Zi(GC,n)),ne.y&&(Nr=Zi(qC,n)),z.ori==0?(_i=ln,bn=Nr):(_i=Nr,bn=ln),Dt=ne.left,At=ne.top);const ct=u.select=Mn({show:!0,over:!0,left:0,width:0,top:0,height:0},l.select),si=ct.show?Zi(KC,ct.over?n:r):null;function Vt(j,Z){if(ct.show){for(let re in j)ct[re]=j[re],re in Y&&en(si,re,j[re]);Z!==!1&&Ke("setSelect")}}u.setSelect=Vt;function Xt(j){if(y[j].show)he&&bu(Me[j],Bo);else if(he&&Oi(Me[j],Bo),ue){let re=an?Qn[0]:Qn[j];re!=null&&_r(re,-10,-10,ft,ze)}}function An(j,Z,re){Ie(j,{min:Z,max:re})}function ai(j,Z,re,oe){Z.focus!=null&&Bn(j),Z.show!=null&&y.forEach((ge,be)=>{be>0&&(j==be||j==null)&&(ge.show=Z.show,Xt(be),$==2?(An(ge.facets[0].scale,null,null),An(ge.facets[1].scale,null,null)):An(ge.scale,null,null),br())}),re!==!1&&Ke("setSeries",j,Z),oe&&ut("setSeries",u,j,Z)}u.setSeries=ai;function zi(j,Z){Mn(k[j],Z)}function dn(j,Z){j.fill=Mt(j.fill||null),j.dir=It(j.dir,-1),Z=Z??k.length,k.splice(Z,0,j)}function gi(j){j==null?k.length=0:k.splice(j,1)}u.addBand=dn,u.setBand=zi,u.delBand=gi;function so(j,Z){y[j].alpha=Z,ue&&Qn[j]!=null&&(Qn[j].style.opacity=Z),he&&Me[j]&&(Me[j].style.opacity=Z)}let fn,Ai,$i;const Ui={focus:!0};function Bn(j){if(j!=$i){let Z=j==null,re=Yn.alpha!=1;y.forEach((oe,ge)=>{if($==1||ge>0){let be=Z||ge==0||ge==j;oe._focus=Z?null:be,re&&so(ge,be?1:Yn.alpha)}}),$i=j,re&&br()}}he&&ir&&on(If,me,j=>{ne._lock||(nr(j),$i!=null&&ai(null,Ui,!0,tt.setSeries))});function Wn(j,Z,re){let oe=T[Z];re&&(j=j/Ft-(oe.ori==1?Gt:Ot));let ge=ft;oe.ori==1&&(ge=ze,j=ge-j),oe.dir==-1&&(j=ge-j);let be=oe._min,$e=oe._max,Ne=j/ge,Fe=be+($e-be)*Ne,He=oe.distr;return He==3?fs(10,Fe):He==4?hk(Fe,oe.asinh):He==100?oe.bwd(Fe):Fe}function jn(j,Z){let re=Wn(j,w,Z);return fr(re,c[0],Zt,un)}u.valToIdx=j=>fr(j,c[0]),u.posToIdx=jn,u.posToVal=Wn,u.valToPos=(j,Z,re)=>T[Z].ori==0?b(j,T[Z],re?Ut:ft,re?Tn:0):v(j,T[Z],re?Ln:ze,re?Pn:0),u.setCursor=(j,Z,re)=>{Dt=j.left,At=j.top,C(null,Z,re)};function _o(j,Z){en(si,cs,ct.left=j),en(si,js,ct.width=Z)}function Kn(j,Z){en(si,Hs,ct.top=j),en(si,Ks,ct.height=Z)}let Xn=z.ori==0?_o:Kn,Mi=z.ori==1?_o:Kn;function Ti(){if(he&&ce.live)for(let j=$==2?1:0;j<y.length;j++){if(j==0&&ot)continue;let Z=ce.values[j],re=0;for(let oe in Z)qe[j][re++].firstChild.nodeValue=Z[oe]}}function g(j,Z){if(j!=null&&(j.idxs?j.idxs.forEach((re,oe)=>{te[oe]=re}):gk(j.idx)||te.fill(j.idx),ce.idx=te[0]),he&&ce.live){for(let re=0;re<y.length;re++)(re>0||$==1&&!ot)&&A(re,te[re]);Ti()}Vn=!1,Z!==!1&&Ke("setLegend")}u.setLegend=g;function A(j,Z){let re=y[j],oe=j==0&&F==2?Jn:c[j],ge;ot?ge=re.values(u,j,Z)??Je:(ge=re.value(u,Z==null?null:oe[Z],j,Z),ge=ge==null?Je:{_:ge}),ce.values[j]=ge}function C(j,Z,re){Nt=Dt,Rt=At,[Dt,At]=ne.move(u,Dt,At),ne.left=Dt,ne.top=At,ue&&(_i&&_r(_i,On(Dt),0,ft,ze),bn&&_r(bn,0,On(At),ft,ze));let oe,ge=Zt>un;fn=Yt,Ai=null;let be=z.ori==0?ft:ze,$e=z.ori==1?ft:ze;if(Dt<0||wn==0||ge){oe=ne.idx=null;for(let Ne=0;Ne<y.length;Ne++){let Fe=Qn[Ne];Fe!=null&&_r(Fe,-10,-10,ft,ze)}ir&&ai(null,Ui,!0,j==null&&tt.setSeries),ce.live&&(te.fill(oe),Vn=!0)}else{let Ne,Fe,He;$==1&&(Ne=z.ori==0?Dt:At,Fe=Wn(Ne,w),oe=ne.idx=fr(Fe,c[0],Zt,un),He=O(c[0][oe],z,be,0));let je=-10,Ye=-10,dt=0,Ct=0,pt=!0,yt="",it="";for(let et=$==2?1:0;et<y.length;et++){let qt=y[et],rn=te[et],$n=rn==null?null:$==1?c[et][rn]:c[et][1][rn],Tt=ne.dataIdx(u,et,oe,Fe),pe=Tt==null?null:$==1?c[et][Tt]:c[et][1][Tt];if(Vn=Vn||pe!=$n||Tt!=rn,te[et]=Tt,et>0&&qt.show){let ke=Tt==null?-10:Tt==oe?He:O($==1?c[0][Tt]:c[et][0][Tt],z,be,0),xe=pe==null?-10:_(pe,$==1?T[qt.scale]:T[qt.facets[1].scale],$e,0);if(ir&&pe!=null){let We=z.ori==1?Dt:At,nt=Nn(Yn.dist(u,et,Tt,xe,We));if(nt<fn){let mt=Yn.bias;if(mt!=0){let Et=Wn(We,qt.scale),wt=pe>=0?1:-1,li=Et>=0?1:-1;li==wt&&(li==1?mt==1?pe>=Et:pe<=Et:mt==1?pe<=Et:pe>=Et)&&(fn=nt,Ai=et)}else fn=nt,Ai=et}}if(Vn||an){let We,nt;z.ori==0?(We=ke,nt=xe):(We=xe,nt=ke);let mt,Et,wt,li,Vi,Kt,zn=!0,Fr=yn.bbox;if(Fr!=null){zn=!1;let gn=Fr(u,et);wt=gn.left,li=gn.top,mt=gn.width,Et=gn.height}else wt=We,li=nt,mt=Et=yn.size(u,et);if(Kt=yn.fill(u,et),Vi=yn.stroke(u,et),an)et==Ai&&fn<=Yn.prox&&(je=wt,Ye=li,dt=mt,Ct=Et,pt=zn,yt=Kt,it=Vi);else{let gn=Qn[et];gn!=null&&(mr[et]=wt,rr[et]=li,Wf(gn,mt,Et,zn),Pf(gn,Kt,Vi),_r(gn,Ji(wt),Ji(li),ft,ze))}}}}if(an){let et=Yn.prox,qt=$i==null?fn<=et:fn>et||Ai!=$i;if(Vn||qt){let rn=Qn[0];rn!=null&&(mr[0]=je,rr[0]=Ye,Wf(rn,dt,Ct,pt),Pf(rn,yt,it),_r(rn,Ji(je),Ji(Ye),ft,ze))}}}if(ct.show&&Hi)if(j!=null){let[Ne,Fe]=tt.scales,[He,je]=tt.match,[Ye,dt]=j.cursor.sync.scales,Ct=j.cursor.drag;if(Pe=Ct._x,Jt=Ct._y,Pe||Jt){let{left:pt,top:yt,width:it,height:et}=j.select,qt=j.scales[Ye].ori,rn=j.posToVal,$n,Tt,pe,ke,xe,We=Ne!=null&&He(Ne,Ye),nt=Fe!=null&&je(Fe,dt);We&&Pe?(qt==0?($n=pt,Tt=it):($n=yt,Tt=et),pe=T[Ne],ke=O(rn($n,Ye),pe,be,0),xe=O(rn($n+Tt,Ye),pe,be,0),Xn(pr(ke,xe),Nn(xe-ke))):Xn(0,be),nt&&Jt?(qt==1?($n=pt,Tt=it):($n=yt,Tt=et),pe=T[Fe],ke=_(rn($n,dt),pe,$e,0),xe=_(rn($n+Tt,dt),pe,$e,0),Mi(pr(ke,xe),Nn(xe-ke))):Mi(0,$e)}else J()}else{let Ne=Nn(Nt-Xo),Fe=Nn(Rt-Dr);if(z.ori==1){let dt=Ne;Ne=Fe,Fe=dt}Pe=hn.x&&Ne>=hn.dist,Jt=hn.y&&Fe>=hn.dist;let He=hn.uni;He!=null?Pe&&Jt&&(Pe=Ne>=He,Jt=Fe>=He,!Pe&&!Jt&&(Fe>Ne?Jt=!0:Pe=!0)):hn.x&&hn.y&&(Pe||Jt)&&(Pe=Jt=!0);let je,Ye;Pe&&(z.ori==0?(je=Wi,Ye=Dt):(je=xr,Ye=At),Xn(pr(je,Ye),Nn(Ye-je)),Jt||Mi(0,$e)),Jt&&(z.ori==1?(je=Wi,Ye=Dt):(je=xr,Ye=At),Mi(pr(je,Ye),Nn(Ye-je)),Pe||Xn(0,be)),!Pe&&!Jt&&(Xn(0,0),Mi(0,0))}if(hn._x=Pe,hn._y=Jt,j==null){if(re){if(tn!=null){let[Ne,Fe]=tt.scales;tt.values[0]=Ne!=null?Wn(z.ori==0?Dt:At,Ne):null,tt.values[1]=Fe!=null?Wn(z.ori==1?Dt:At,Fe):null}ut($c,u,Dt,At,ft,ze,oe)}if(ir){let Ne=re&&tt.setSeries,Fe=Yn.prox;$i==null?fn<=Fe&&ai(Ai,Ui,!0,Ne):fn>Fe?ai(null,Ui,!0,Ne):Ai!=$i&&ai(Ai,Ui,!0,Ne)}}Vn&&(ce.idx=oe,g()),Z!==!1&&Ke("setCursor")}let P=null;Object.defineProperty(u,"rect",{get(){return P==null&&B(!1),P}});function B(j=!1){j?P=null:(P=n.getBoundingClientRect(),Ke("syncRect",P))}function H(j,Z,re,oe,ge,be,$e){ne._lock||Hi&&j!=null&&j.movementX==0&&j.movementY==0||(K(j,Z,re,oe,ge,be,$e,!1,j!=null),j!=null?C(null,!0,!0):C(Z,!0,!1))}function K(j,Z,re,oe,ge,be,$e,Ne,Fe){if(P==null&&B(!1),nr(j),j!=null)re=j.clientX-P.left,oe=j.clientY-P.top;else{if(re<0||oe<0){Dt=-10,At=-10;return}let[He,je]=tt.scales,Ye=Z.cursor.sync,[dt,Ct]=Ye.values,[pt,yt]=Ye.scales,[it,et]=tt.match,qt=Z.axes[0].side%2==1,rn=z.ori==0?ft:ze,$n=z.ori==1?ft:ze,Tt=qt?be:ge,pe=qt?ge:be,ke=qt?oe:re,xe=qt?re:oe;if(pt!=null?re=it(He,pt)?x(dt,T[He],rn,0):-10:re=rn*(ke/Tt),yt!=null?oe=et(je,yt)?x(Ct,T[je],$n,0):-10:oe=$n*(xe/pe),z.ori==1){let We=re;re=oe,oe=We}}Fe&&(Z==null||Z.cursor.event.type==$c)&&((re<=1||re>=ft-1)&&(re=Fo(re,ft)),(oe<=1||oe>=ze-1)&&(oe=Fo(oe,ze))),Ne?(Xo=re,Dr=oe,[Wi,xr]=ne.move(u,re,oe)):(Dt=re,At=oe)}const Y={width:0,height:0,left:0,top:0};function J(){Vt(Y,!1)}let ie,se,ye,Se;function de(j,Z,re,oe,ge,be,$e){Hi=!0,Pe=Jt=hn._x=hn._y=!1,K(j,Z,re,oe,ge,be,$e,!0,!1),j!=null&&(on(Mc,yu,we,!1),ut(Ef,u,Wi,xr,ft,ze,null));let{left:Ne,top:Fe,width:He,height:je}=ct;ie=Ne,se=Fe,ye=He,Se=je}function we(j,Z,re,oe,ge,be,$e){Hi=hn._x=hn._y=!1,K(j,Z,re,oe,ge,be,$e,!1,!0);let{left:Ne,top:Fe,width:He,height:je}=ct,Ye=He>0||je>0,dt=ie!=Ne||se!=Fe||ye!=He||Se!=je;if(Ye&&dt&&Vt(ct),hn.setScale&&Ye&&dt){let Ct=Ne,pt=He,yt=Fe,it=je;if(z.ori==1&&(Ct=Fe,pt=je,yt=Ne,it=He),Pe&&An(w,Wn(Ct,w),Wn(Ct+pt,w)),Jt)for(let et in T){let qt=T[et];et!=w&&qt.from==null&&qt.min!=Yt&&An(et,Wn(yt+it,et),Wn(yt,et))}J()}else ne.lock&&(ne._lock=!ne._lock,C(Z,!0,j!=null));j!=null&&(kn(Mc,yu),ut(Mc,u,Dt,At,ft,ze,null))}function Re(j,Z,re,oe,ge,be,$e){if(ne._lock)return;nr(j);let Ne=Hi;if(Hi){let Fe=!0,He=!0,je=10,Ye,dt;z.ori==0?(Ye=Pe,dt=Jt):(Ye=Jt,dt=Pe),Ye&&dt&&(Fe=Dt<=je||Dt>=ft-je,He=At<=je||At>=ze-je),Ye&&Fe&&(Dt=Dt<Wi?0:ft),dt&&He&&(At=At<xr?0:ze),C(null,!0,!0),Hi=!1}Dt=-10,At=-10,te.fill(null),C(null,!0,!0),Ne&&(Hi=Ne)}function Le(j,Z,re,oe,ge,be,$e){ne._lock||(nr(j),wo(),J(),j!=null&&ut(Of,u,Dt,At,ft,ze,null))}function Be(){L.forEach(E_),Mr(u.width,u.height,!0)}zo(Za,hs,Be);const Xe={};Xe.mousedown=de,Xe.mousemove=H,Xe.mouseup=we,Xe.dblclick=Le,Xe.setSeries=(j,Z,re,oe)=>{let ge=tt.match[2];re=ge(u,Z,re),re!=-1&&ai(re,oe,!0,!1)},ue&&(on(Ef,n,de),on($c,n,H),on(Rf,n,j=>{nr(j),B(!1)}),on(If,n,Re),on(Of,n,Le),Au.add(u),u.syncRect=B);const Qe=u.hooks=l.hooks||{};function Ke(j,Z,re){oo?Or.push([j,Z,re]):j in Qe&&Qe[j].forEach(oe=>{oe.call(null,u,Z,re)})}(l.plugins||[]).forEach(j=>{for(let Z in j.hooks)Qe[Z]=(Qe[Z]||[]).concat(j.hooks[Z])});const jt=(j,Z,re)=>re,tt=Mn({key:null,setSeries:!1,filters:{pub:jf,sub:jf},scales:[w,y[1]?y[1].scale:null],match:[Kf,Kf,jt],values:[null,null]},ne.sync);tt.match.length==2&&tt.match.push(jt),ne.sync=tt;const tn=tt.key,xt=im(tn);function ut(j,Z,re,oe,ge,be,$e){tt.filters.pub(j,Z,re,oe,ge,be,$e)&&xt.pub(j,Z,re,oe,ge,be,$e)}xt.sub(u);function pn(j,Z,re,oe,ge,be,$e){tt.filters.sub(j,Z,re,oe,ge,be,$e)&&Xe[j](null,Z,re,oe,ge,be,$e)}u.pub=pn;function Hn(){xt.unsub(u),Au.delete(u),Si.clear(),xu(Za,hs,Be),p.remove(),me?.remove(),Ke("destroy")}u.destroy=Hn;function nn(){Ke("init",l,c),Qr(c||l.data,!1),S[w]?Ie(w,S[w]):wo(),$r=ct.show&&(ct.width>0||ct.height>0),tr=Vn=!0,Mr(l.width,l.height)}return y.forEach(Go),L.forEach(ki),e?e instanceof HTMLElement?(e.appendChild(p),nn()):e(u,nn):nn(),u}ii.assign=Mn;ii.fmtNum=Uu;ii.rangeNum=Ja;ii.rangeLog=cl;ii.rangeAsinh=Hu;ii.orient=jo;ii.pxRatio=Ft;ii.join=Sk;ii.fmtDate=ju,ii.tzDate=Ik;ii.sync=im;{ii.addGap=g_,ii.clipGaps=dl;let l=ii.paths={points:cm};l.linear=hm,l.stepped=y_,l.bars=w_,l.spline=x_}var Ic,pp;function R_(){return pp||(pp=1,Ic=function(l,c,e,u,$){var b,v;if(u===void 0)u=0;else if(u=u|0,u<0||u>=l.length)throw new RangeError("invalid lower bound");if($===void 0)$=l.length-1;else if($=$|0,$<u||$>=l.length)throw new RangeError("invalid upper bound");for(;u<=$;)if(b=u+($-u>>>1),v=+e(l[b],c,b,l),v<0)u=b+1;else if(v>0)$=b-1;else return b;return~u}),Ic}var I_=R_();const O_=el(I_);var Oc,gp;function N_(){if(gp)return Oc;gp=1;function l(c,e,u){var $=-1,b=c.length;e<0&&(e=-e>b?0:b+e),u=u>b?b:u,u<0&&(u+=b),b=e>u?0:u-e>>>0,e>>>=0;for(var v=Array(b);++$<b;)v[$]=c[$+e];return v}return Oc=l,Oc}var Nc,mp;function D_(){if(mp)return Nc;mp=1;var l=N_();function c(e,u,$){var b=e.length;return $=$===void 0?b:$,!u&&$>=b?e:l(e,u,$)}return Nc=c,Nc}var Dc,vp;function gm(){if(vp)return Dc;vp=1;var l="\\ud800-\\udfff",c="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",u="\\u20d0-\\u20ff",$=c+e+u,b="\\ufe0e\\ufe0f",v="\\u200d",x=RegExp("["+v+l+$+b+"]");function f(p){return x.test(p)}return Dc=f,Dc}var Fc,yp;function F_(){if(yp)return Fc;yp=1;function l(c){return c.split("")}return Fc=l,Fc}var Pc,wp;function P_(){if(wp)return Pc;wp=1;var l="\\ud800-\\udfff",c="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",u="\\u20d0-\\u20ff",$=c+e+u,b="\\ufe0e\\ufe0f",v="["+l+"]",x="["+$+"]",f="\\ud83c[\\udffb-\\udfff]",p="(?:"+x+"|"+f+")",s="[^"+l+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",r="\\u200d",n=p+"?",i="["+b+"]?",h="(?:"+r+"(?:"+[s,o,a].join("|")+")"+i+n+")*",m=i+n+h,y="(?:"+[s+x+"?",x,o,a,v].join("|")+")",L=RegExp(f+"(?="+f+")|"+y+m,"g");function T(k){return k.match(L)||[]}return Pc=T,Pc}var Bc,bp;function B_(){if(bp)return Bc;bp=1;var l=F_(),c=gm(),e=P_();function u($){return c($)?e($):l($)}return Bc=u,Bc}var Wc,xp;function W_(){if(xp)return Wc;xp=1;var l=typeof go=="object"&&go&&go.Object===Object&&go;return Wc=l,Wc}var Hc,Sp;function H_(){if(Sp)return Hc;Sp=1;var l=W_(),c=typeof self=="object"&&self&&self.Object===Object&&self,e=l||c||Function("return this")();return Hc=e,Hc}var zc,Cp;function Ju(){if(Cp)return zc;Cp=1;var l=H_(),c=l.Symbol;return zc=c,zc}var Uc,kp;function z_(){if(kp)return Uc;kp=1;function l(c,e){for(var u=-1,$=c==null?0:c.length,b=Array($);++u<$;)b[u]=e(c[u],u,c);return b}return Uc=l,Uc}var Vc,_p;function U_(){if(_p)return Vc;_p=1;var l=Array.isArray;return Vc=l,Vc}var jc,Ap;function V_(){if(Ap)return jc;Ap=1;var l=Ju(),c=Object.prototype,e=c.hasOwnProperty,u=c.toString,$=l?l.toStringTag:void 0;function b(v){var x=e.call(v,$),f=v[$];try{v[$]=void 0;var p=!0}catch{}var s=u.call(v);return p&&(x?v[$]=f:delete v[$]),s}return jc=b,jc}var Kc,$p;function j_(){if($p)return Kc;$p=1;var l=Object.prototype,c=l.toString;function e(u){return c.call(u)}return Kc=e,Kc}var Gc,Mp;function K_(){if(Mp)return Gc;Mp=1;var l=Ju(),c=V_(),e=j_(),u="[object Null]",$="[object Undefined]",b=l?l.toStringTag:void 0;function v(x){return x==null?x===void 0?$:u:b&&b in Object(x)?c(x):e(x)}return Gc=v,Gc}var qc,Tp;function G_(){if(Tp)return qc;Tp=1;function l(c){return c!=null&&typeof c=="object"}return qc=l,qc}var Yc,Lp;function q_(){if(Lp)return Yc;Lp=1;var l=K_(),c=G_(),e="[object Symbol]";function u($){return typeof $=="symbol"||c($)&&l($)==e}return Yc=u,Yc}var Qc,Ep;function Y_(){if(Ep)return Qc;Ep=1;var l=Ju(),c=z_(),e=U_(),u=q_(),$=l?l.prototype:void 0,b=$?$.toString:void 0;function v(x){if(typeof x=="string")return x;if(e(x))return c(x,v)+"";if(u(x))return b?b.call(x):"";var f=x+"";return f=="0"&&1/x==-1/0?"-0":f}return Qc=v,Qc}var Zc,Rp;function ml(){if(Rp)return Zc;Rp=1;var l=Y_();function c(e){return e==null?"":l(e)}return Zc=c,Zc}var Jc,Ip;function Q_(){if(Ip)return Jc;Ip=1;var l=D_(),c=gm(),e=B_(),u=ml();function $(b){return function(v){v=u(v);var x=c(v)?e(v):void 0,f=x?x[0]:v.charAt(0),p=x?l(x,1).join(""):v.slice(1);return f[b]()+p}}return Jc=$,Jc}var Xc,Op;function mm(){if(Op)return Xc;Op=1;var l=Q_(),c=l("toUpperCase");return Xc=c,Xc}var Z_=mm();const J_=el(Z_);var eu,Np;function X_(){if(Np)return eu;Np=1;var l=ml(),c=mm();function e(u){return c(l(u).toLowerCase())}return eu=e,eu}var tu,Dp;function eA(){if(Dp)return tu;Dp=1;function l(c,e,u,$){var b=-1,v=c==null?0:c.length;for($&&v&&(u=c[++b]);++b<v;)u=e(u,c[b],b,c);return u}return tu=l,tu}var nu,Fp;function tA(){if(Fp)return nu;Fp=1;function l(c){return function(e){return c?.[e]}}return nu=l,nu}var iu,Pp;function nA(){if(Pp)return iu;Pp=1;var l=tA(),c={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=l(c);return iu=e,iu}var ru,Bp;function iA(){if(Bp)return ru;Bp=1;var l=nA(),c=ml(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,u="\\u0300-\\u036f",$="\\ufe20-\\ufe2f",b="\\u20d0-\\u20ff",v=u+$+b,x="["+v+"]",f=RegExp(x,"g");function p(s){return s=c(s),s&&s.replace(e,l).replace(f,"")}return ru=p,ru}var ou,Wp;function rA(){if(Wp)return ou;Wp=1;var l=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function c(e){return e.match(l)||[]}return ou=c,ou}var su,Hp;function oA(){if(Hp)return su;Hp=1;var l=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function c(e){return l.test(e)}return su=c,su}var au,zp;function sA(){if(zp)return au;zp=1;var l="\\ud800-\\udfff",c="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",u="\\u20d0-\\u20ff",$=c+e+u,b="\\u2700-\\u27bf",v="a-z\\xdf-\\xf6\\xf8-\\xff",x="\\xac\\xb1\\xd7\\xf7",f="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",p="\\u2000-\\u206f",s=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="A-Z\\xc0-\\xd6\\xd8-\\xde",a="\\ufe0e\\ufe0f",r=x+f+p+s,n="['’]",i="["+r+"]",h="["+$+"]",m="\\d+",y="["+b+"]",L="["+v+"]",T="[^"+l+r+m+b+v+o+"]",k="\\ud83c[\\udffb-\\udfff]",w="(?:"+h+"|"+k+")",R="[^"+l+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",I="[\\ud800-\\udbff][\\udc00-\\udfff]",E="["+o+"]",z="\\u200d",F="(?:"+L+"|"+T+")",O="(?:"+E+"|"+T+")",_="(?:"+n+"(?:d|ll|m|re|s|t|ve))?",S="(?:"+n+"(?:D|LL|M|RE|S|T|VE))?",N=w+"?",W="["+a+"]?",V="(?:"+z+"(?:"+[R,D,I].join("|")+")"+W+N+")*",G="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Q="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=W+N+V,ce="(?:"+[y,D,I].join("|")+")"+te,ne=RegExp([E+"?"+L+"+"+_+"(?="+[i,E,"$"].join("|")+")",O+"+"+S+"(?="+[i,E+F,"$"].join("|")+")",E+"?"+F+"+"+_,E+"+"+S,Q,G,m,ce].join("|"),"g");function he(ue){return ue.match(ne)||[]}return au=he,au}var lu,Up;function aA(){if(Up)return lu;Up=1;var l=rA(),c=oA(),e=ml(),u=sA();function $(b,v,x){return b=e(b),v=x?void 0:v,v===void 0?c(b)?u(b):l(b):b.match(v)||[]}return lu=$,lu}var cu,Vp;function lA(){if(Vp)return cu;Vp=1;var l=eA(),c=iA(),e=aA(),u="['’]",$=RegExp(u,"g");function b(v){return function(x){return l(e(c(x).replace($,"")),v,"")}}return cu=b,cu}var uu,jp;function cA(){if(jp)return uu;jp=1;var l=X_(),c=lA(),e=c(function(u,$,b){return $=$.toLowerCase(),u+(b?l($):$)});return uu=e,uu}var uA=cA();const hA=el(uA),dA=Object.assign({"./ArrayWidget.vue":()=>Promise.resolve().then(()=>require("./ArrayWidget-B2-n1K3r.cjs")),"./ArrayplotWidget.vue":()=>Promise.resolve().then(()=>require("./ArrayplotWidget-BmBcPGUR.cjs")),"./BlockWidget.vue":()=>Promise.resolve().then(()=>require("./BlockWidget-BZXHLTJt.cjs")),"./ButtonWidget.vue":()=>Promise.resolve().then(()=>require("./ButtonWidget-CzRyY1N5.cjs")),"./CanvasWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasWidget-cQqNxspP.cjs")),"./CanvasdotWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasdotWidget-CMIw-ga4.cjs")),"./CanvasimageWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasimageWidget-DXxtYjGG.cjs")),"./CanvasimagevalueWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasimagevalueWidget-VPKlJrxM.cjs")),"./CanvaslabelWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslabelWidget-BgGRS0NS.cjs")),"./CanvaslabelvalueWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslabelvalueWidget-W2QzOkQw.cjs")),"./CanvaslineWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslineWidget-yT7FUWs8.cjs")),"./CanvaslinevalueWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslinevalueWidget-Dj4tsTBp.cjs")),"./CheckbuttonWidget.vue":()=>Promise.resolve().then(()=>require("./CheckbuttonWidget-CT28NPNo.cjs")),"./ComboboxWidget.vue":()=>Promise.resolve().then(()=>require("./ComboboxWidget-hFBSBFwy.cjs")),"./DateWidget.vue":()=>Promise.resolve().then(()=>require("./DateWidget-C_QpCTxN.cjs")),"./DynamicWidget.vue":()=>Promise.resolve().then(()=>require("./DynamicWidget-BtJYTmVo.cjs")),"./FilechecksumWidget.vue":()=>Promise.resolve().then(()=>require("./FilechecksumWidget-BZdmiTbb.cjs")),"./FiledisplayWidget.vue":()=>Promise.resolve().then(()=>require("./FiledisplayWidget-BI7GAQ4d.cjs")),"./FormatvalueWidget.vue":()=>Promise.resolve().then(()=>require("./FormatvalueWidget-I1y_kf9t.cjs")),"./HorizontalWidget.vue":()=>Promise.resolve().then(()=>require("./HorizontalWidget-CAf9I0CU.cjs")),"./HorizontalboxWidget.vue":()=>Promise.resolve().then(()=>require("./HorizontalboxWidget-B7E5GEPu.cjs")),"./HorizontallineWidget.vue":()=>Promise.resolve().then(()=>require("./HorizontallineWidget-DqLKGhdz.cjs")),"./IframeWidget.vue":()=>Promise.resolve().then(()=>require("./IframeWidget-BMtv8io0.cjs")),"./ImageviewerWidget.vue":()=>Promise.resolve().then(()=>require("./ImageviewerWidget-ox5FNYVP.cjs")),"./LabelWidget.vue":()=>Promise.resolve().then(()=>require("./LabelWidget-B9J1Whh0.cjs")),"./LabelledWidget.vue":()=>Promise.resolve().then(()=>require("./LabelledWidget-BMtqUP-E.cjs")),"./LabelprogressbarWidget.vue":()=>Promise.resolve().then(()=>require("./LabelprogressbarWidget-Ce3PRzaA.cjs")),"./LabelsparklineWidget.vue":()=>Promise.resolve().then(()=>require("./LabelsparklineWidget-DuCA67yl.cjs")),"./LabelvalueWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvalueWidget-DxEvAoHT.cjs")),"./LabelvaluedescWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluedescWidget-Dy3_fdkx.cjs")),"./LabelvaluelimitsbarWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluelimitsbarWidget-DWvSVvXl.cjs")),"./LabelvaluelimitscolumnWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluelimitscolumnWidget-CyPuEz7E.cjs")),"./LabelvaluerangebarWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluerangebarWidget-DdqgjjUc.cjs")),"./LedWidget.vue":()=>Promise.resolve().then(()=>require("./LedWidget-BEP-sFTh.cjs")),"./LimitsbarWidget.vue":()=>Promise.resolve().then(()=>require("./LimitsbarWidget-DiAnkXID.cjs")),"./LimitscolorWidget.vue":()=>Promise.resolve().then(()=>require("./LimitscolorWidget-ByfzIE_O.cjs")),"./LimitscolumnWidget.vue":()=>Promise.resolve().then(()=>require("./LimitscolumnWidget-CZwcXbLS.cjs")),"./LinegraphWidget.vue":()=>Promise.resolve().then(()=>require("./LinegraphWidget-so5ohfWF.cjs")),"./MatrixbycolumnsWidget.vue":()=>Promise.resolve().then(()=>require("./MatrixbycolumnsWidget-Dma8IsO-.cjs")),"./ProgressbarWidget.vue":()=>Promise.resolve().then(()=>require("./ProgressbarWidget-BINuoD9p.cjs")),"./RadiobuttonWidget.vue":()=>Promise.resolve().then(()=>require("./RadiobuttonWidget-DDmgt0su.cjs")),"./RadiogroupWidget.vue":()=>Promise.resolve().then(()=>require("./RadiogroupWidget-q7h1v-ko.cjs")),"./RangebarWidget.vue":()=>Promise.resolve().then(()=>require("./RangebarWidget-BbPMpwMs.cjs")),"./RollupWidget.vue":()=>Promise.resolve().then(()=>require("./RollupWidget-BmgRFIOo.cjs")),"./ScrollwindowWidget.vue":()=>Promise.resolve().then(()=>require("./ScrollwindowWidget-BbASNNcM.cjs")),"./SignalWidget.vue":()=>Promise.resolve().then(()=>require("./SignalWidget-CO3UaFok.cjs")),"./SpacerWidget.vue":()=>Promise.resolve().then(()=>require("./SpacerWidget-CQh-LB4u.cjs")),"./SparklineWidget.vue":()=>Promise.resolve().then(()=>require("./SparklineWidget-BsMIozYC.cjs")),"./TabbookWidget.vue":()=>Promise.resolve().then(()=>require("./TabbookWidget-So-oaWd4.cjs")),"./TextboxWidget.vue":()=>Promise.resolve().then(()=>require("./TextboxWidget-CF4iq315.cjs")),"./TextfieldWidget.vue":()=>Promise.resolve().then(()=>require("./TextfieldWidget-D9BINKRU.cjs")),"./TimeWidget.vue":()=>Promise.resolve().then(()=>require("./TimeWidget-CgtJbnnC.cjs")),"./TitleWidget.vue":()=>Promise.resolve().then(()=>require("./TitleWidget-BV2sDP_-.cjs")),"./ValueWidget.vue":()=>Promise.resolve().then(()=>require("./ValueWidget-mkXMZvdK.cjs")),"./ValuelimitsbarWidget.vue":()=>Promise.resolve().then(()=>require("./ValuelimitsbarWidget-B8IUYgYx.cjs")),"./ValuelimitscolumnWidget.vue":()=>Promise.resolve().then(()=>require("./ValuelimitscolumnWidget-B7DigaiC.cjs")),"./ValuerangebarWidget.vue":()=>Promise.resolve().then(()=>require("./ValuerangebarWidget-DA4X0MuO.cjs")),"./VerticalWidget.vue":()=>Promise.resolve().then(()=>require("./VerticalWidget-BiFa3xbs.cjs")),"./VerticalboxWidget.vue":()=>Promise.resolve().then(()=>require("./VerticalboxWidget-Cx30rcqe.cjs"))}),fA=Object.entries(dA).reduce((l,[c,e])=>{c=c.split("/").pop();const u=J_(hA(c.replace(/\.\w+$/,"")));return{...l,[u]:Ge.defineAsyncComponent(e)}},{}),pA={components:fA};exports.DataViewerComponent=Ag;exports.DataViewerHistoryComponent=NC;exports.Fr=pg;exports.WidgetComponents=pA;exports._=Mg;exports._i=VS;exports.aceExports=_x;exports.bi=US;exports.bs=O_;exports.lodashExports=$g;exports.uPlot=ii;exports.yi=_C;exports.yt=mu;
1485
- //# sourceMappingURL=UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-DtL207xP.cjs.map