openc3-cosmos-tool-cmdsender 7.2.0 → 7.2.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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/tools/cmdsender/{ArrayWidget-D1PArcGr-d297622785dc9daa3141.js → ArrayWidget-DMSm_P6c-a87143003e3cfcbaa903.js} +2 -2
  3. data/tools/cmdsender/{ArrayplotWidget-DPUPy0qM-610f5dbb9a6c4ad5a282.js → ArrayplotWidget-fdXLhGAl-e7d6b1fa6e80d827e2db.js} +1 -1
  4. data/tools/cmdsender/{BarColumn-BpdscDQf-69ca0b64d73cb8bb8ef0.js → BarColumn-Bb305iCi-9a6c14b1e4f84367edba.js} +1 -1
  5. data/tools/cmdsender/{BlockWidget-_VUsK5T9-bfcca740f9b4037b4545.js → BlockWidget-Do3W6tZh-88368d571f26f0b5c706.js} +2 -2
  6. data/tools/cmdsender/{ButtonWidget-DE41o-cg-02e55cb52de66babe250.js → ButtonWidget-DukCQt0F-efdfdf652ee367c33f48.js} +2 -2
  7. data/tools/cmdsender/CanvasWidget-BRdVWln5-051cec3183ccbea05dbf.js +1 -0
  8. data/tools/cmdsender/CanvasdotWidget-DV8PeDWz-f2d5c5fbdfc1c51a8252.js +1 -0
  9. data/tools/cmdsender/{CanvasimageWidget-COv_Qnc8-74cf669a0e4ad4447670.js → CanvasimageWidget-Czbq1GuF-e8808c58c07883606a35.js} +1 -1
  10. data/tools/cmdsender/{CanvasimagevalueWidget-BhuUqLOo-56c701ec5ab9aea0651c.js → CanvasimagevalueWidget-DKt5JgEt-5d083563b56d37abac1b.js} +1 -1
  11. data/tools/cmdsender/CanvaslabelWidget-DW2I1ra1-2baa6cc934e491820350.js +1 -0
  12. data/tools/cmdsender/CanvaslabelvalueWidget-BhzvZVfD-ba194e660851033ac52d.js +1 -0
  13. data/tools/cmdsender/{CanvaslineWidget-D1K_6mAY-08f48ff67de0c16bfb50.js → CanvaslineWidget-DsjY37tp-cb1543b3a0f31cfe101a.js} +1 -1
  14. data/tools/cmdsender/{CanvaslinevalueWidget-D4eaxWhR-1e9fe587b41711283e7e.js → CanvaslinevalueWidget-ihI97G8T-3ef608884d445bd7edfd.js} +1 -1
  15. data/tools/cmdsender/CheckbuttonWidget-B778Z-Zo-62b593576cb4d742f085.js +1 -0
  16. data/tools/cmdsender/ComboboxWidget-CuuvOL9K-33d46fe1f49351ef1d4a.js +1 -0
  17. data/tools/cmdsender/CommandSender-ca7fc4d4affb51bf4680.js +1124 -0
  18. data/tools/cmdsender/{CriticalCmdDialog-BOA6-qrE-8f3a6726380471e39388.js → CriticalCmdDialog-CALmRE9c-ec8f5013245c3d6b0e61.js} +1 -1
  19. data/tools/cmdsender/{DateWidget-DkNWx28s-6a8298986ff9c149c102.js → DateWidget-COvQTAeo-0afbd1907c2a661ae925.js} +1 -1
  20. data/tools/cmdsender/{DetailsDialog-F4KgYM6m-f9dc7b05a93419b3d349.js → DetailsDialog-DE7lK17G-ed6a4e3cdb7ab707201b.js} +1 -1
  21. data/tools/cmdsender/{DynamicWidget-BuSbQVhf-83273383281e164b68a3.js → DynamicWidget-BuSbQVhf-19bcf28d562b893b44dc.js} +1 -1
  22. data/tools/cmdsender/{FilechecksumWidget-DSfNEnDJ-64a6941650c82e84d6df.js → FilechecksumWidget-DRnOt_UE-843211945643f8fe295d.js} +1 -1
  23. data/tools/cmdsender/{FiledisplayWidget-D2cxMmrP-c378b463e9454657c44d.js → FiledisplayWidget-26R46EjS-e536bda1ec1421c35a01.js} +1 -1
  24. data/tools/cmdsender/{FormatvalueWidget-6-bj_PJO-81f40e42076b0969c8cf.js → FormatvalueWidget-BxyscMJc-c28a76b4c7988e052883.js} +1 -1
  25. data/tools/cmdsender/Graph-BKw7xw1a-0cfb795c9e0590a334e1.js +1 -0
  26. data/tools/cmdsender/{GraphWidget-COXK3Dab-b2e42f710ec4a73c541c.js → GraphWidget-Cs9mvqUu-089ac628d45301953973.js} +1 -1
  27. data/tools/cmdsender/{HorizontalWidget-C9UFBPsk-5dccf2b024648320aee1.js → HorizontalWidget-fWLFj7Kg-9490530213fa962a34f4.js} +1 -1
  28. data/tools/cmdsender/{HorizontalboxWidget-CWLfmRtr-691ac25472789da4b75a.js → HorizontalboxWidget-DEaXhKEz-2250cecd015bf00ac0fd.js} +1 -1
  29. data/tools/cmdsender/HorizontallineWidget-Bvu1QP3S-ff94fbe5cb7f9437b24c.js +1 -0
  30. data/tools/cmdsender/{IframeWidget-Bn9eGzrq-b7d5882bc89c124583be.js → IframeWidget-B143k4lo-e7532384032dfe263346.js} +1 -1
  31. data/tools/cmdsender/{ImageLoader-_gAudhVo-9e1c17b2fa8d13962816.js → ImageLoader-BCpmQHIl-81f7bcbf708a33fbe2a1.js} +1 -1
  32. data/tools/cmdsender/{ImageviewerWidget-BUWhF32Z-dfcd4f2c0630e032e699.js → ImageviewerWidget-CLrvr6dw-88b161d9073bcdff3d46.js} +1 -1
  33. data/tools/cmdsender/{LabelWidget-BhzkN06D-3d836a60d10ab2981f4f.js → LabelWidget-CA1bTX2B-647cc9c9ce990c278b14.js} +1 -1
  34. data/tools/cmdsender/{LabelledWidget-vx8NvW1b-4112ea9bf5639b717e2e.js → LabelledWidget-BDhvr03J-3e20415f9d0f350c4f28.js} +1 -1
  35. data/tools/cmdsender/{LabelprogressbarWidget-t5PvKuS4-bfc52b38de0dd4ec8563.js → LabelprogressbarWidget-g7A5CE8S-fe51d7d4af5c1c3afbd8.js} +1 -1
  36. data/tools/cmdsender/LabelsparklineWidget-B27xXxWg-fe8ca6fef01a81797372.js +1 -0
  37. data/tools/cmdsender/{LabelvalueWidget-Cbs1DBK2-3b496d3dadacbb080c1d.js → LabelvalueWidget-DFn8o6LC-db7a9a476fe53130b942.js} +1 -1
  38. data/tools/cmdsender/{LabelvaluedescWidget-B7OIOGc0-ce4deb94020036f49684.js → LabelvaluedescWidget-BQpaxFaB-e3e63768d570a2183acf.js} +1 -1
  39. data/tools/cmdsender/LabelvaluelimitsbarWidget-C-z96q8z-13d0cfd204587b7b8d51.js +1 -0
  40. data/tools/cmdsender/LabelvaluelimitscolumnWidget-D2TMEv9O-9270e9f4bc5fd7d6d1ad.js +1 -0
  41. data/tools/cmdsender/{LabelvaluerangebarWidget-Pt_evm3v-421571412e3e8e3d4dd0.js → LabelvaluerangebarWidget-D99dZCjz-8a3489856b079d626a4b.js} +1 -1
  42. data/tools/cmdsender/{Layout-CKmC50QZ-0b325846fd223ff940ba.js → Layout--_zNJWnw-a0bf32960282aef9f67c.js} +1 -1
  43. data/tools/cmdsender/{LedWidget-D1lmNXpi-7fc1c13e72108d9d1470.js → LedWidget-D2uxHxe3-a067e94509e7e04a29a8.js} +1 -1
  44. data/tools/cmdsender/{LimitsBar-D5IZu7eX-55b9ce6bf2bb577ac9a0.js → LimitsBar-DN1s8-MS-fca563d8ab6641631cde.js} +1 -1
  45. data/tools/cmdsender/{LimitsbarWidget-VpxQXE-e-8a10c734cb0848a40655.js → LimitsbarWidget-Cqhh7LKU-03798925802bb708fc32.js} +1 -1
  46. data/tools/cmdsender/{LimitscolorWidget-79P41CX7-01113456a880e751a791.js → LimitscolorWidget-haGB4RbY-a0f5e669aa8eb0b9c65e.js} +1 -1
  47. data/tools/cmdsender/{LimitscolumnWidget-BFDXhJeZ-465aa75bbd4ef273d314.js → LimitscolumnWidget-B1GdmlR_-914f630ae952b384ef65.js} +1 -1
  48. data/tools/cmdsender/LinegraphWidget-COSOQ0uM-24bb184eb442d5278ea6.js +1 -0
  49. data/tools/cmdsender/{MatrixbycolumnsWidget--ihvirDP-8ad1ac39088bd6cca062.js → MatrixbycolumnsWidget-coHlLETG-e58397b2a7989479f54b.js} +1 -1
  50. data/tools/cmdsender/{OpenC3TimePicker-B0lAIU91-3820afaf6d67ea2c8181.js → OpenC3TimePicker-B8Vu9GBz-7e43cc0a5a6146915a5d.js} +1 -1
  51. data/tools/cmdsender/{ProgressbarWidget-BIB3r9SL-253e18897ca053e490c9.js → ProgressbarWidget-D_yFssIZ-413179bec793aeb81ed8.js} +1 -1
  52. data/tools/cmdsender/{RadiobuttonWidget-C5rxLM7K-d82036f9bfed7611a84f.js → RadiobuttonWidget-DL0jVTcb-548a0a9fae2b40ab2e41.js} +1 -1
  53. data/tools/cmdsender/{RadiogroupWidget-CciTCv1U-6bd423d2c939318bf523.js → RadiogroupWidget-2-td69IA-a54dfb8a3de7a354c1bc.js} +1 -1
  54. data/tools/cmdsender/{RangebarWidget-MPQYi2Km-88a3fae94c5c2cae8392.js → RangebarWidget-i2mlnxys-c6f41410b89cb3f346cc.js} +1 -1
  55. data/tools/cmdsender/{RollupWidget-CfjGAhzg-8cc728dfd0c9717cfae9.js → RollupWidget-BEJ2Icg1-ccaa42322face271df62.js} +1 -1
  56. data/tools/cmdsender/{ScrollwindowWidget-CupaygNN-266a88606a576085a13c.js → ScrollwindowWidget-BU1cRpL8-d8afeee7894375299a0b.js} +1 -1
  57. data/tools/cmdsender/{SignalWidget-C-qecoTO-7c70f8a8014398c3aa84.js → SignalWidget-hiTkeem9-66a133d863469d3aa281.js} +1 -1
  58. data/tools/cmdsender/SpacerWidget-CBmzzS_X-a95cf5c025456bc596bc.js +1 -0
  59. data/tools/cmdsender/SparklineWidget-CizRh6QR-18f4ceca586793999c7d.js +1 -0
  60. data/tools/cmdsender/{TabbookWidget-CXklff-l-496593b263ef8bafad01.js → TabbookWidget-CvL3Ozmx-c2f668b63934b945b6da.js} +1 -1
  61. data/tools/cmdsender/TargetPacketItemChooser-wISd7chF-0638be6855b82f7cab8c.js +1 -0
  62. data/tools/cmdsender/TextboxWidget-BtEwXzDO-d773664c47d43d811e50.js +1 -0
  63. data/tools/cmdsender/TextfieldWidget-BDbb57HP-86b7689663043639cc91.js +1 -0
  64. data/tools/cmdsender/TimeWidget-DzD8U8l8-8da8a8609f4b5383f841.js +1 -0
  65. data/tools/cmdsender/TitleWidget-CL53vf14-3690febfd34a588877f7.js +1 -0
  66. data/tools/cmdsender/{VWidget-oMbywhLA-70acae0e1d2c47ea72d3.js → VWidget-5qOYva88-b00dc946e969765271f3.js} +1 -1
  67. data/tools/cmdsender/ValueWidget-CAkuc_w_-ae5bf9f4469f18f46ea3.js +1 -0
  68. data/tools/cmdsender/ValuelimitsbarWidget-Y8sO05E1-506597ed0b8071f2947c.js +1 -0
  69. data/tools/cmdsender/{ValuelimitscolumnWidget-BVt6nLXq-679a0d63802f3ddbecec.js → ValuelimitscolumnWidget-iOjB_fCj-2f9184ab5b3fbd3543b8.js} +1 -1
  70. data/tools/cmdsender/{ValuerangebarWidget-uVZEI32U-8103e000ead3ef046530.js → ValuerangebarWidget-DsCoeAm6-5a62776fb119f7c366b1.js} +1 -1
  71. data/tools/cmdsender/{VerticalWidget-DlftYBjH-ad2219d1da1c2511c7a5.js → VerticalWidget-C6O0dhRU-cfd4823724ee1f73ec0d.js} +1 -1
  72. data/tools/cmdsender/{VerticalboxWidget-C7RrkfY0-814347233b6f85d66bf5.js → VerticalboxWidget-B-CoqRJG-fa13a91b7f41a2804904.js} +1 -1
  73. data/tools/cmdsender/{Widget-D_HaosJK-c06ccef894dddc835ede.js → Widget-CtYQauzA-e74b991798e23ca83b25.js} +1 -1
  74. data/tools/cmdsender/main-54071e4f836c28e3cc23.js +1499 -0
  75. data/tools/cmdsender/main.js +1 -1
  76. metadata +74 -74
  77. data/tools/cmdsender/CanvasWidget-BEi8h3Mq-aa29372dcc8e383a6879.js +0 -1
  78. data/tools/cmdsender/CanvasdotWidget-eZuMgkhL-87741640182abb90903e.js +0 -1
  79. data/tools/cmdsender/CanvaslabelWidget-DtvbgeYH-2c8dbb8963d95a473e2f.js +0 -1
  80. data/tools/cmdsender/CanvaslabelvalueWidget-C_FRIeNb-0bd7640eb2cdcf88c33d.js +0 -1
  81. data/tools/cmdsender/CheckbuttonWidget-ByxMDkiS-33c9a1553bd9691de164.js +0 -1
  82. data/tools/cmdsender/ComboboxWidget-CAGxGv2r-7f57802bce853a02c217.js +0 -1
  83. data/tools/cmdsender/CommandSender-25d96517e9e499851b5e.js +0 -1124
  84. data/tools/cmdsender/Graph-Cz0Ns1FD-6dcb243c58355394f838.js +0 -1
  85. data/tools/cmdsender/HorizontallineWidget-DeFkOaYO-1d2b0441f159997b05e9.js +0 -1
  86. data/tools/cmdsender/LabelsparklineWidget-CebbEH-j-d1812bc3d6dd25c07c73.js +0 -1
  87. data/tools/cmdsender/LabelvaluelimitsbarWidget-C57kf-oQ-1188e992ad74a0e1a1d1.js +0 -1
  88. data/tools/cmdsender/LabelvaluelimitscolumnWidget-BRlNDEqp-77909b65996835e5cb3f.js +0 -1
  89. data/tools/cmdsender/LinegraphWidget-VqkpOlws-65f14b48bd73390c358c.js +0 -1
  90. data/tools/cmdsender/SpacerWidget-VVkOCb6N-b970459dbe29ec0deae1.js +0 -1
  91. data/tools/cmdsender/SparklineWidget-Dsmn38z_-5975e6735afa20eaa86b.js +0 -1
  92. data/tools/cmdsender/TargetPacketItemChooser-DDHuygCl-268c35a68c11a1d9e5fc.js +0 -1
  93. data/tools/cmdsender/TextboxWidget-CHs2VYIv-43911c45f349afb4d555.js +0 -1
  94. data/tools/cmdsender/TextfieldWidget-CdANAW-6-14673bafa4ca1493a97a.js +0 -1
  95. data/tools/cmdsender/TimeWidget-D0xT1wXR-3b97c09f4653d024c18e.js +0 -1
  96. data/tools/cmdsender/TitleWidget-68NWCcXB-34e8b72fc617292d6a09.js +0 -1
  97. data/tools/cmdsender/ValueWidget-B1aGUBP7-b23a64f8bf06405857ec.js +0 -1
  98. data/tools/cmdsender/ValuelimitsbarWidget-B7KcRjLS-9c43a3b10fb9a10a670f.js +0 -1
  99. data/tools/cmdsender/main-81d2b5b3e322ad5506a6.js +0 -1499
@@ -0,0 +1,1124 @@
1
+ System.register(["./main-54071e4f836c28e3cc23.js","vue","./TargetPacketItemChooser-wISd7chF-0638be6855b82f7cab8c.js","./DetailsDialog-DE7lK17G-ed6a4e3cdb7ab707201b.js","./CriticalCmdDialog-CALmRE9c-ec8f5013245c3d6b0e61.js","single-spa","vue-router","pinia","vuetify","./LimitsBar-DN1s8-MS-fca563d8ab6641631cde.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js"],(function(on,ks){"use strict";var Ce,Vt,Oe,Ee,Ke,jt,Gt,De,Kt,Z,q,ne,Yt,V,G,re,le,he,be,Se,Qt,se,Ne,gt,Fe,fe,pt,Ye,Qe,Ze,Xe,Je,qe,Zt,Xt,Jt,qt;return{setters:[te=>{Ce=te.i,Vt=te.w,Oe=te.D,Ee=te.K,Ke=te.F,jt=te.M,Gt=te.L,De=te.m,Kt=te._},te=>{Z=te.resolveComponent,q=te.openBlock,ne=te.createBlock,Yt=te.Teleport,V=te.createVNode,G=te.withCtx,re=te.createElementVNode,le=te.toDisplayString,he=te.createElementBlock,be=te.Fragment,Se=te.renderList,Qt=te.ref,se=te.createTextVNode,Ne=te.mergeProps,gt=te.createSlots,Fe=te.normalizeStyle,fe=te.createCommentVNode,pt=te.normalizeClass,Ye=te.withDirectives,Qe=te.vShow,Ze=te.normalizeProps,Xe=te.guardReactiveProps,Je=te.withKeys,qe=te.withModifiers,Zt=te.renderSlot},te=>{Xt=te.S},te=>{Jt=te.Z},te=>{qt=te.P},null,null,null,null,null,null],execute:(function(){var te=document.createElement("style");te.textContent=`.editor[data-v-35e893f1]{margin-left:30px;height:50px;width:95%;position:relative;font-size:16px}
2
+ /*$vite$:1*/`,document.head.appendChild(te);const ei="openc3-ace-vim-mode-enabled",mt="ace/keyboard/vim",ti="openc3-ace-default-scripting-language",et={isVimModeEnabled(){return localStorage.getItem(ei)==="true"},setVimMode(l){localStorage.setItem(ei,JSON.stringify(!!l))},toggleVimMode(l){this.isVimModeEnabled()?(l.setKeyboardHandler(null),this.setVimMode(!1)):(l.setKeyboardHandler(mt),this.setVimMode(!0)),l.focus()},applyVimModeIfEnabled(l,{saveFn:h}={}){this.isVimModeEnabled()?(l.setKeyboardHandler(mt),ace.config.loadModule(mt,u=>{u.CodeMirror.Vim.defineEx("write","w",g=>{typeof h=="function"?h():g.ace.execCommand("save")})})):l.setKeyboardHandler(null)},getDefaultScriptingLanguage(){return localStorage.getItem(ti)||"python"},setDefaultScriptingLanguage(l){(l==="ruby"||l==="python")&&localStorage.setItem(ti,l)}},sn={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(l,{emit:h}){const u=h,g=Qt(!1);function E(){g.value=!1}function y(p){return p.replaceAll(" ","-").toLowerCase()}return(p,v)=>{const s=Z("v-icon"),c=Z("v-btn"),n=Z("v-divider"),o=Z("v-list-item-title"),r=Z("v-list-item"),i=Z("v-list"),e=Z("v-menu"),t=Z("v-radio"),a=Z("v-list-item-action"),d=Z("v-radio-group"),f=Z("v-checkbox");return q(),ne(e,{modelValue:g.value,"onUpdate:modelValue":v[0]||(v[0]=S=>g.value=S),"close-on-content-click":!1},{activator:G(({props:S})=>[V(c,Ne(S,{variant:"outlined",class:"mx-1 menu-button",text:l.menu.label,"data-test":y(`${l.title} ${l.menu.label}`)}),{append:G(()=>[V(s,{class:"menu-button-icon"},{default:G(()=>[...v[1]||(v[1]=[se(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:G(()=>[V(i,null,{default:G(()=>[(q(!0),he(be,null,Se(l.menu.items,(S,$)=>(q(),he(be,null,[S.divider?(q(),ne(n,{key:$+"-divider"})):S.subMenu&&S.subMenu.length>0?(q(),he("div",{key:$+"-submenu"},[(q(),ne(e,{key:$,"open-on-hover":"",location:"right"},{activator:G(({props:C})=>[(q(),ne(r,Ne({ref_for:!0},C,{key:$,disabled:S.disabled}),gt({append:G(()=>[V(s,null,{default:G(()=>[...v[2]||(v[2]=[se(" mdi-chevron-right ",-1)])]),_:1})]),default:G(()=>[!S.radio&&!S.checkbox?(q(),ne(o,{key:0,style:Fe("cursor: pointer;"+(S.disabled?"opacity: 0.2":""))},{default:G(()=>[se(le(S.label),1)]),_:2},1032,["style"])):fe("",!0)]),_:2},[S.icon?{name:"prepend",fn:G(()=>[V(s,{disabled:S.disabled},{default:G(()=>[se(le(S.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:G(()=>[V(i,null,{default:G(()=>[(q(!0),he(be,null,Se(S.subMenu,(C,w)=>(q(),ne(r,{key:w,"prepend-icon":C.icon,onClick:M=>u("submenu-click",C)},{default:G(()=>[V(o,null,{default:G(()=>[se(le(C.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):S.radioGroup?(q(),ne(d,{key:$+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":S.value,"onUpdate:modelValue":S.command},{default:G(()=>[(q(!0),he(be,null,Se(S.choices,(C,w)=>(q(),ne(r,{key:w+"-choice"},{default:G(()=>[V(a,{class:"list-action"},{default:G(()=>[V(t,{color:"secondary",label:C.label,value:C.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(q(),ne(r,{key:$+"-list",disabled:S.disabled,"data-test":y(`${l.title} ${l.menu.label} ${S.label}`),onClick:()=>{S.command(S),S.checkbox||E()}},gt({default:G(()=>[S.checkbox?(q(),ne(a,{key:0,class:"list-action"},{default:G(()=>[V(f,{modelValue:S.checked,"onUpdate:modelValue":C=>S.checked=C,label:S.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):fe("",!0),!S.radio&&!S.checkbox?(q(),ne(o,{key:1,style:Fe("cursor: pointer;"+(S.disabled?"opacity: 0.2":""))},{default:G(()=>[se(le(S.label),1)]),_:2},1032,["style"])):fe("",!0)]),_:2},[S.icon?{name:"prepend",fn:G(()=>[V(s,{icon:S.icon,disabled:S.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},an={components:{TopBarMenu:sn},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(l){l.command(l),this.$refs.topmenu[0].isActive=!1}}},ln={class:"app-title mr-2"};function cn(l,h,u,g,E,y){const p=Z("v-col"),v=Z("v-row"),s=Z("TopBarMenu");return q(),ne(Yt,{to:"#openc3-menu"},[V(v,{"no-gutters":""},{default:G(()=>[V(p,{"align-self":"end"},{default:G(()=>[re("span",ln,le(u.title),1)]),_:1})]),_:1}),V(v,{dense:"",class:"flex-nowrap"},{default:G(()=>[(q(!0),he(be,null,Se(u.menus,(c,n)=>(q(),ne(s,{key:n+"-top-menu",ref_for:!0,ref:"topmenu",menu:c,title:u.title,onSubmenuClick:y.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const un=Ce(an,[["render",cn],["__scopeId","data-v-f4fb184e"]]);class hn{constructor(){Oe.get("/openc3-api/autocomplete/data/screen").then(h=>{this.autocompleteData=h.data}),this.api=new Ke}async getCompletions(h,u,g,E,y){if(!this.autocompleteData)return y(null,[]);let p=u.getLine(g.row).slice(0,g.column).trimStart().split(/ (?![^<]*>)/),v=this.autocompleteData;p.length>1&&(v=v.find(n=>n.caption===p[0]));let s={},c=!0;if(v&&v.params){v.params.length==p.length-1&&(c=!1);let n=v.params[p.length-2];if(n["Target name"])v=(await this.api.get_target_names()).reduce((o,r)=>(o[r]=1,o),{});else if(n["Packet name"]){let o=p[p.length-2];v=(await this.api.get_all_tlm(o)).reduce((r,i)=>(r[i.packet_name]=i.description,r),{}),v.LATEST="LATEST values from all packets"}else if(n["Item name"]){let o=p[p.length-3],r=p[p.length-2];if(r==="LATEST"){let i=await this.api.get_all_tlm_item_names(o);v={},i.forEach(e=>{v[e]=`LATEST ${e}`})}else v=(await this.api.get_tlm(o,r)).items.reduce((i,e)=>(i[e.name]=e.description,i),{})}else v=n;s=Object.keys(v||{}).map(o=>{let r={value:o+(c?" ":""),command:c&&"startAutocomplete"};return typeof v[o]=="string"&&(r.meta=v[o]),r})}else s=v;y(null,s)}}const dn={props:{modelValue:{type:String,default:""},keywords:{type:Array,default:()=>[]},height:{type:String,default:"45vh"},filename:{type:String,default:"screen.txt"}},emits:["update:modelValue"],data(){return{editor:null,file:null,loadedKeywords:[],docsKeyword:"",contextMenu:!1,menuX:0,menuY:0}},computed:{effectiveKeywords(){return this.keywords.length>0?this.keywords:this.loadedKeywords}},watch:{modelValue(l){this.editor&&this.editor.getValue()!==l&&(this.editor.setValue(l),this.editor.clearSelection())},effectiveKeywords(){if(this.editor){const l=this.buildScreenMode();this.editor.session.setMode(new l)}}},created(){this.keywords.length===0&&this.loadKeywords()},mounted(){this.initEditor()},beforeUnmount(){this.editor&&(this.editor.destroy(),this.editor.container.remove())},methods:{async loadKeywords(){try{const l=await Oe.get("/openc3-api/autocomplete/keywords/screen");this.loadedKeywords=l.data}catch(l){console.error("Error loading screen keywords:",l)}},initEditor(){this.editor=De.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const l=this.buildScreenMode();this.editor.session.setMode(new l),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new hn],this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.modelValue),this.editor.clearSelection(),et.applyVimModeIfEnabled(this.editor),this.editor.focus(),this.editor.session.on("change",()=>{this.$emit("update:modelValue",this.editor.getValue())})},getValue(){return this.editor?this.editor.getValue():this.modelValue},buildScreenMode(){let l=De.require("ace/lib/oop"),h=De.require("ace/mode/text_highlight_rules").TextHighlightRules,u=this.effectiveKeywords.join("|"),g=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"\\b\\d+(?:\\.\\d+)?\\b"},{token:"keyword",regex:u?new RegExp(`^\\s*(${u})\\b`):/(?!)/}]},this.normalizeRules()};l.inherits(g,h);let E=function(){this.HighlightRules=g},y=De.require("ace/mode/text").Mode;return l.inherits(E,y),(function(){this.$id="ace/mode/openc3"}).call(E.prototype),E},toggleVimMode(){et.toggleVimMode(this.editor)},showContextMenu(l){this.menuX=l.pageX,this.menuY=l.pageY;let h=this.editor.getCursorPosition(),u=this.editor.session.getTokenAt(h.row,h.column);if(u){let g=u.value.trim();g.includes(" ")?this.docsKeyword=g.split(" ")[0]:this.docsKeyword=g,this.contextMenu=!0}},openDocumentation(){window.open(`${window.location.origin}/tools/staticdocs/docs/configuration/telemetry-screens#${this.docsKeyword.toLowerCase()}`,"_blank")},downloadContent(){const l=new Blob([this.editor.getValue()],{type:"text/plain"}),h=document.createElement("a");h.href=URL.createObjectURL(l),h.setAttribute("download",this.filename),h.click()},loadFile(){const l=new FileReader;l.readAsText(this.file);const h=this;l.onload=function(){h.editor.setValue(l.result),h.editor.clearSelection(),h.file=null}}}},fn={class:"screen-editor-container"};function gn(l,h,u,g,E,y){const p=Z("v-btn"),v=Z("v-file-input"),s=Z("v-spacer"),c=Z("v-row"),n=Z("v-list-item-title"),o=Z("v-list-item"),r=Z("v-divider"),i=Z("v-list"),e=Z("v-menu");return q(),he("div",fn,[V(c,{"no-gutters":"",align:"center",class:"mb-2"},{default:G(()=>[V(p,{disabled:!E.file,color:"primary",size:"small",class:"mr-3","data-test":"screen-editor-load",onClick:y.loadFile},{default:G(()=>[...h[3]||(h[3]=[se(" Load ",-1)])]),_:1},8,["disabled","onClick"]),V(v,{modelValue:E.file,"onUpdate:modelValue":h[0]||(h[0]=t=>E.file=t),"truncate-length":"15",accept:".txt",label:"Click to select .txt screen file.",density:"compact","hide-details":"",style:{"max-width":"300px"}},null,8,["modelValue"]),V(s),V(p,{icon:"mdi-download",variant:"text",density:"compact",title:"Download","data-test":"download-screen-icon",onClick:y.downloadContent},null,8,["onClick"])]),_:1}),V(c,{"no-gutters":"",class:"mb-2"},{default:G(()=>[re("pre",{ref:"editor",class:"screen-editor",style:Fe({height:u.height,width:"100%"}),onContextmenu:h[1]||(h[1]=qe((...t)=>y.showContextMenu&&y.showContextMenu(...t),["prevent"]))},null,36),V(e,{modelValue:E.contextMenu,"onUpdate:modelValue":h[2]||(h[2]=t=>E.contextMenu=t),target:[E.menuX,E.menuY]},{default:G(()=>[V(i,null,{default:G(()=>[V(o,{link:"",onClick:y.openDocumentation},{default:G(()=>[V(n,null,{default:G(()=>[se(le(E.docsKeyword)+" documentation ",1)]),_:1})]),_:1},8,["onClick"]),V(r),V(o,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:y.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1}),V(c,{"no-gutters":""},{default:G(()=>[...h[4]||(h[4]=[re("span",{class:"text-caption text-grey"}," Ctrl-space brings up autocomplete. Right click keywords for documentation. ",-1)])]),_:1})])}const pn=Ce(dn,[["render",gn],["__scopeId","data-v-f2442c42"]]),mn={components:{ScreenEditor:pn},props:{modelValue:Boolean,target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},errors:{type:Array,default:()=>[]}},emits:["cancel","delete","save","update:modelValue"],data(){return{editorContent:this.definition,editorIsDirty:!1}},computed:{editErrors:function(){if(this.editorContent==="")return["Input can not be blank."];if(this.errors.length!==0){let l=new Set,h=[];const u=this.errors.toSorted((g,E)=>g.lineNumber-E.lineNumber);for(const g of u){let E=`At ${g.lineNumber}: (${g.line}) ${g.message}.`;g.usage&&(E+=` Usage: ${g.usage}`),h.push(E),l.add(g.message)}return h}return[]},show:{get(){return this.modelValue},set(l){this.$emit("update:modelValue",l)}}},watch:{editorContent(){this.editorIsDirty=!0},definition(l){this.editorContent=l}},methods:{deleteScreen:function(){this.$dialog.confirm("Are you sure you want to delete this screen?!",{okText:"Delete",cancelText:"Cancel"}).then(l=>{this.$emit("delete")}).catch(()=>{})},handleEsc:function(){this.editorIsDirty?this.$dialog.confirm("You have unsaved changes. Are you sure you want to close?",{okText:"Close without saving",cancelText:"Cancel"}).then(()=>{this.$emit("cancel")}).catch(()=>{this.$refs.screenEditor?.editor?.focus()}):this.$emit("cancel")}}},vn=["textContent"];function yn(l,h,u,g,E,y){const p=Z("v-btn"),v=Z("v-spacer"),s=Z("v-toolbar"),c=Z("screen-editor"),n=Z("v-row"),o=Z("v-card-text"),r=Z("v-card"),i=Z("v-dialog");return q(),ne(i,{modelValue:y.show,"onUpdate:modelValue":h[3]||(h[3]=e=>y.show=e),persistent:"",width:"75vw",onKeydown:Je(qe(y.handleEsc,["stop"]),["esc"])},{default:G(()=>[V(r,null,{default:G(()=>[V(s,{height:"24"},{default:G(()=>[V(p,{class:"mx-2",icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-screen-icon",onClick:y.deleteScreen},null,8,["onClick"]),V(v),re("span",null," Edit Screen: "+le(u.target)+" "+le(u.screen),1),V(v)]),_:1}),V(o,{style:{"max-height":"90vh"}},{default:G(()=>[V(c,{ref:"screenEditor",modelValue:E.editorContent,"onUpdate:modelValue":h[0]||(h[0]=e=>E.editorContent=e),keywords:u.keywords,filename:`${u.screen.toLowerCase()}.txt`,height:"45vh"},null,8,["modelValue","keywords","filename"]),V(n,{class:"ma-3",style:{"max-height":"120px","overflow-y":"auto"}},{default:G(()=>[(q(!0),he(be,null,Se(y.editErrors,(e,t)=>(q(),he("div",{key:t},[re("span",{class:"text-red",textContent:le(e)},null,8,vn)]))),128))]),_:1}),V(n,{class:"mt-3"},{default:G(()=>[V(v),V(p,{class:"mx-2",variant:"outlined","data-test":"edit-screen-cancel",onClick:h[1]||(h[1]=e=>l.$emit("cancel"))},{default:G(()=>[...h[4]||(h[4]=[se(" Cancel ",-1)])]),_:1}),V(p,{class:"mx-2",color:"primary","data-test":"edit-screen-save",onClick:h[2]||(h[2]=e=>l.$emit("save",E.editorContent))},{default:G(()=>[...h[5]||(h[5]=[se(" Save ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const wn=Ce(mn,[["render",yn]]),vt=20,bn={components:{EditScreenDialog:wn},mixins:[Vt],props:{target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},initialFloated:{type:Boolean,default:!1},initialTop:{type:Number,default:0},initialLeft:{type:Number,default:0},initialZ:{type:Number,default:0},minZ:{type:Number,default:0},fixFloated:{type:Boolean,default:!1},count:{type:Number,default:0},showClose:{type:Boolean,default:!0},timeZone:{type:String,default:"local"},inline:{type:Boolean,default:!1},playbackMode:{type:String,default:"realtime"},playbackDateTime:{type:Date,default:null},frozen:{type:Boolean,default:!1},frozenValues:{type:Object,default:null}},emits:["close-screen","delete-screen","drag-screen","edit-screen","float-screen","min-max-screen","unfloat-screen"],data(){return{api:null,backup:"",currentDefinition:this.definition,editDialog:!1,expand:!0,configParser:null,currentLayout:null,layoutStack:[],namedWidgets:{},dynamicWidgets:[],width:null,height:null,staleTime:30,cacheTimeout:.1,globalSettings:[],substitute:!1,original_target_name:null,force_substitute:!1,pollingPeriod:1,errors:[],errorDialog:!1,screenKey:null,dragX:0,dragY:0,floated:this.initialFloated,top:this.initialTop,left:this.initialLeft,zIndex:this.initialZ,changeCounter:0,screenItems:[],actualScreenItems:[],screenValues:{},updateCounter:0,updater:null,screenId:Gt.uniqueId("openc3-screen_"),tlmAvailableTimeout:null}},computed:{error:function(){if(this.errorDialog&&this.errors.length>0){let l=new Set,h="";for(const u of this.errors){if(l.has(u.message))continue;let g=`${u.time}: (${u.type}) ${u.message}
3
+ `;h+=g,l.add(u.message)}return h}return null},computedStyle(){let l={};const h=this.width||this.$refs.bar?.clientWidth;return this.floated&&(l.position="absolute",l.top=this.top+"px",l.left=this.left+"px",l.width=h+"px"),l}},watch:{count:{handler(l,h){this.currentDefinition=this.definition,this.rerender()}},playbackDateTime:{handler(l,h){this.playbackMode==="playback"&&l&&this.update()}},playbackMode:{handler(l,h){l==="realtime"?this.updateRefreshInterval():(clearInterval(this.updater),this.updater=null)}},frozen:{handler(l){l?this.updater&&(clearInterval(this.updater),this.updater=null):this.playbackMode==="realtime"&&this.updateRefreshInterval()}},frozenValues:{immediate:!0,handler(l){l&&this.frozen&&Object.assign(this.screenValues,l)}}},errorCaptured(l,h,u){return this.errors.length<vt&&(l.usage?this.errors.push({type:"usage",message:l.message,usage:l.usage,line:l.line,lineNumber:l.lineNumber,time:new Date().getTime()}):this.errors.push({type:"error",message:l,time:new Date().getTime()})),!1},created(){this.api=new Ke,this.configParser=new jt,this.parseDefinition(),this.screenKey=Math.floor(Math.random()*1e6)},mounted(){this.playbackMode==="realtime"&&!this.frozen&&this.updateRefreshInterval(),this.frozen&&this.frozenValues&&this.$nextTick(()=>{Object.assign(this.screenValues,this.frozenValues)}),this.floated&&(this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex)},unmounted(){this.updater!=null&&(clearInterval(this.updater),this.updater=null),this.tlmAvailableTimeout!=null&&(clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=null)},methods:{open(l,h){this.$parent.showScreen(l,h)},close(l,h){this.$parent.closeScreenByName(l,h)},closeAll(){this.$parent.closeAll()},clearErrors:function(){this.errors=[]},updateRefreshInterval:function(){if(this.updater&&(clearInterval(this.updater),this.updater=null),this.pollingPeriod===0)return;let l=this.pollingPeriod*1e3;this.updater=setInterval(()=>{this.update()},l)},parseDefinition:function(){if(this.clearErrors(),this.screenItems=[],this.namedWidgets={},this.layoutStack=[],this.dynamicWidgets=[],this.layoutStack.push({type:"VerticalWidget",parameters:[],widgets:[]}),this.currentLayout=this.layoutStack[this.layoutStack.length-1],this.configParser.parse_string(this.currentDefinition,"",!1,!0,(l,h,u,g)=>{if(l)switch(l){case"SCREEN":{if(this.configParser.verify_num_parameters(3,4,`${l} <Width or AUTO> <Height or AUTO> <Polling Period>`),h[0].toUpperCase()==="AUTO")this.width=null;else if(Number.isFinite(Number.parseInt(h[0])))this.width=Number.parseInt(h[0]);else throw new Ee(this.configParser,`SCREEN width must be a number or AUTO, got '${h[0]}'`,`${l} <Width or AUTO> <Height or AUTO> <Polling Period>`);if(h[1].toUpperCase()==="AUTO")this.height=null;else if(Number.isFinite(Number.parseInt(h[1])))this.height=Number.parseInt(h[1]);else throw new Ee(this.configParser,`SCREEN height must be a number or AUTO, got '${h[1]}'`,`${l} <Width or AUTO> <Height or AUTO> <Polling Period>`);const E=Number.parseFloat(h[2]);if(Number.isNaN(E)||E<0||E>0&&E<.1)throw new Ee(this.configParser,`SCREEN polling period must be a number 0 or >= 0.1, got '${h[2]}'`,`${l} <Width or AUTO> <Height or AUTO> <Polling Period>`);this.pollingPeriod=E;break}case"END":this.configParser.verify_num_parameters(0,0,`${l}`),this.layoutStack.pop(),this.currentLayout=this.layoutStack[this.layoutStack.length-1];break;case"STALE_TIME":if(this.configParser.verify_num_parameters(1,1,`${l} <Time (s)>`),this.staleTime=Number.parseInt(h[0]),Number.isNaN(this.staleTime))throw new Ee(this.configParser,`SCREEN stale time must be a number, got '${h[0]}'`,`${l} <Time (s)>`);break;case"SUBSETTING":this.configParser.verify_num_parameters(3,null,`${l} <Index> <Widget Type> <Widget Settings...>`),h[1]==="RAW"&&(h[1]="RAW__"+h[2].toLowerCase());case"SETTING":{this.configParser.verify_num_parameters(2,null,`${l} <Widget Type> <Widget Settings...>`),h[0]==="RAW"&&(h[0]="RAW__"+h[1].toLowerCase()),(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(h);break}case"TOOLTIP":{this.configParser.verify_num_parameters(1,2,`${l} <Tooltip Text> <Delay (ms)>`);let E=600;if(h[1]!==void 0&&(E=Number.parseInt(h[1]),Number.isNaN(E)))throw new Ee(this.configParser,`SCREEN tooltip delay must be a number, got '${h[1]}'`,`${l} <Tooltip Text> <Delay (ms)>`);(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(["TOOLTIP",h[0],E]);break}case"GLOBAL_SUBSETTING":this.configParser.verify_num_parameters(3,null,`${l} <Index> <Widget Type> <Widget Settings...>`),h[2]==="RAW"&&(h[2]="RAW__"+h[3].toLowerCase());case"GLOBAL_SETTING":this.configParser.verify_num_parameters(2,null,`${l} <Widget Type> <Widget Settings...>`),h[1]==="RAW"&&(h[1]="RAW__"+h[2].toLowerCase()),this.globalSettings.push(h);break;default:this.processWidget(l,h,u,g);break}}),typeof this.layoutStack[0]>"u"){let l=[],h=[];for(const u of this.dynamicWidgets)l.push(u.name),h.push(u.lineNumber);this.errors.length<vt&&this.errors.push({type:"usage",message:`Unknown widget! Are these widgets: ${l.join(",")}?`,lineNumber:h.join(","),time:new Date().getTime()}),this.layoutStack[0]={type:"VerticalWidget",parameters:[],widgets:[]}}else this.applyGlobalSettings(this.layoutStack[0].widgets)},openEdit:function(){this.backup=this.currentDefinition.repeat(1),this.editDialog=!0},upScreen:function(){this.zIndex+=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},downScreen:function(){this.zIndex>this.minZ&&(this.zIndex-=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex]))},floatScreen:function(){if(this.floated)this.$refs.bar.onmousedown=null,this.$refs.bar.parentElement.parentElement.style="z-index: 0",this.floated=!1,this.$emit("unfloat-screen",[this.floated,this.top,this.left,this.zIndex]);else{let l=this.$refs.bar.parentElement.parentElement.parentElement.getBoundingClientRect(),h=this.$refs.bar.getBoundingClientRect();this.top=h.top-l.top-5,this.left=h.left-l.left-5,this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.floated=!0,this.$emit("float-screen",[this.floated,this.top,this.left,this.zIndex])}},dragMouseDown:function(l){l=l||window.event;const h=l.target;if(!h.closest(".v-toolbar"))return;const u=["INPUT","TEXTAREA","BUTTON","SELECT"],g=["button",".v-btn","input","textarea",".v-text-field",".v-select",".v-combobox",".v-autocomplete"];u.includes(h.tagName)||g.some(E=>h.closest(E))||(l.preventDefault(),this.dragX=l.clientX,this.dragY=l.clientY,document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag)},elementDrag:function(l){l=l||window.event,l.preventDefault();let h=this.dragX-l.clientX,u=this.dragY-l.clientY;this.dragX=l.clientX,this.dragY=l.clientY,this.top=this.$refs.bar.offsetTop-u,this.left=this.$refs.bar.offsetLeft-h,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},closeDragElement:function(){document.onmouseup=null,document.onmousemove=null},rerender:function(){this.parseDefinition(),this.updateRefreshInterval(),this.screenKey=Math.floor(Math.random()*1e6),this.$nextTick(function(){this.clearErrors(),this.$emit("edit-screen")})},cancelEdit:function(){this.file=null,this.editDialog=!1,this.currentDefinition=this.backup,this.rerender()},saveEdit:function(l){this.editDialog=!1,this.currentDefinition=l,this.rerender(),this.$nextTick(function(){Oe.post("/openc3-api/screen/",{data:{scope:window.openc3Scope,target:this.target,screen:this.screen,text:this.currentDefinition}},0)})},deleteScreen:function(){this.editDialog=!1,Oe.delete(`/openc3-api/screen/${this.target}/${this.screen}`).then(l=>{this.$emit("delete-screen")})},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-screen")},processWidget:function(l,h,u,g){let E=null;l==="NAMED_WIDGET"&&(this.configParser.verify_num_parameters(2,null,`${l} <Widget Name> <Widget Type> <Widget Settings... (optional)>`),E=h[0].toUpperCase(),l=h[1].toUpperCase(),h=h.slice(2,h.length));const y=l.charAt(0).toUpperCase()+l.slice(1).toLowerCase()+"Widget";let p=[];if(p.push(["__SCREEN_ID__",this.screenId]),E!==null&&p.push(["NAMED_WIDGET",E]),l==="VERTICAL"||l==="VERTICALBOX"||l==="HORIZONTAL"||l==="HORIZONTALBOX"||l==="MATRIXBYCOLUMNS"||l==="TABBOOK"||l==="TABITEM"||l==="CANVAS"||l==="RADIOGROUP"||l==="SCROLLWINDOW"){const v={type:y,parameters:h,settings:p,screenValues:this.screenValues,screenTimeZone:this.timeZone,widgets:[]};this.layoutStack.push(v),this.currentLayout.widgets.push(v),this.currentLayout=v}else if(this.$options.components[y])this.currentLayout.widgets.push({type:y,target:this.target,parameters:h,settings:p,screenValues:this.screenValues,screenTimeZone:this.timeZone,line:u,lineNumber:g});else{let v={type:"DynamicWidget",target:this.target,parameters:h,settings:p,screenValues:this.screenValues,screenTimeZone:this.timeZone,name:y,line:u,lineNumber:g};this.currentLayout.widgets.push(v),this.dynamicWidgets.push(v)}},applyGlobalSettings:function(l){l.forEach(h=>{this.globalSettings.forEach(u=>{h.type.toLowerCase()===u[0].toLowerCase()+"widget"&&(h.settings.find(g=>g[0]===u[1])||h.settings.push(u.slice(1)))}),h.widgets&&this.applyGlobalSettings(h.widgets)})},update:function(){if(this.frozen)return;let l=this.playbackMode==="playback"?this.playbackDateTime:null;this.actualScreenItems.length!==0&&this.api.get_tlm_values(this.actualScreenItems,this.staleTime,this.cacheTimeout,l).then(h=>{h&&h.length>0&&(this.updateValues(h),this.errors=this.errors.filter(u=>!u.transient))}).catch(h=>{let u=JSON.stringify(h,null,2);this.errors.find(g=>g.message===u)||this.errors.length<vt&&this.errors.push({type:"error",message:u,time:new Date().getTime(),transient:!0})})},updateValues:function(l){if(this.updateCounter+=1,l.length!=this.screenItems.length||l.length!=this.actualScreenItems.length)console.log(`get_tlm_values mismatch: data.length: ${l.length}, screenItems.length: ${this.screenItems.length}, actualScreenItems.length: ${this.actualScreenItems.length}`,JSON.stringify(l),JSON.stringify(this.screenItems),JSON.stringify(this.actualScreenItems));else for(let h=0;h<l.length;h++)l[h].push(this.updateCounter),this.screenValues[this.screenItems[h]]=l[h]},debouncedUpdateTlmAvailable:function(){this.frozen||(this.tlmAvailableTimeout!=null&&clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=setTimeout(()=>{this.api.get_tlm_available(this.screenItems).then(l=>{if(this.actualScreenItems=l,this.screenItems.length!=l.length)console.log("Error getting tlm available",this.screenItems,this.actualScreenItems);else for(let h=0;h<this.actualScreenItems.length;h++)if(this.actualScreenItems[h]===null){const u=this.screenItems[h].split("__"),g=this.currentDefinition.split(`
4
+ `),E=g.findIndex(y=>y.includes(u[0])&&y.includes(u[1])&&y.includes(u[2]))+1;E>0?this.errors.push({type:"usage",message:`Null for ${u.join(" ")}! Does it exist?`,line:g[E-1],lineNumber:E,time:new Date().getTime()}):this.errors.push({type:"error",message:`Null for ${u.join(" ")}! Does it exist?`,time:new Date().getTime()})}}).catch(l=>{console.log("Error getting tlm available",l),this.actualScreenItems=this.screenItems}),this.tlmAvailableTimeout=null},100))},addItem:function(l){this.screenItems.push(l),this.frozen&&this.frozenValues&&this.frozenValues[l]?this.screenValues[l]=this.frozenValues[l]:this.screenValues[l]=[null,null,0],this.debouncedUpdateTlmAvailable()},deleteItem:function(l){let h=this.screenItems.indexOf(l);this.screenItems.splice(h,1),this.debouncedUpdateTlmAvailable()},getScreenValues:function(){return JSON.parse(JSON.stringify(this.screenValues))}}},Cn={ref:"screen",class:"pa-1",style:{position:"relative"}},Sn={key:1,class:"pa-1",style:{position:"relative"}};function $n(l,h,u,g,E,y){const p=Z("v-btn"),v=Z("v-tooltip"),s=Z("v-spacer"),c=Z("v-toolbar"),n=Z("v-overlay"),o=Z("vertical-widget"),r=Z("v-expand-transition"),i=Z("v-card"),e=Z("edit-screen-dialog"),t=Z("v-textarea"),a=Z("v-card-actions"),d=Z("v-dialog");return q(),he("div",{ref:"bar",style:Fe(y.computedStyle)},[u.inline?fe("",!0):(q(),ne(i,{key:0,"min-height":E.height,"min-width":E.width,style:{cursor:"default"}},{default:G(()=>[V(c,{height:"24",class:pt({"floated-toolbar":E.floated})},{default:G(()=>[Ye(V(p,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:h[0]||(h[0]=()=>{E.errorDialog=!0})},null,512),[[Qe,E.errors.length!==0]]),V(p,{icon:"mdi-pencil",variant:"text",density:"compact","data-test":"edit-screen-icon","aria-label":"Edit Screen",onClick:y.openEdit},null,8,["onClick"]),u.fixFloated?fe("",!0):(q(),ne(v,{key:0,"open-delay":600,location:"top"},{activator:G(({props:f})=>[re("div",Ze(Xe(f)),[V(p,{icon:E.floated?"mdi-balloon":"mdi-view-grid-outline",variant:"text",density:"compact","data-test":"float-screen-icon","aria-label":E.floated?"Unfloat Screen":"Float Screen",onClick:y.floatScreen},null,8,["icon","aria-label","onClick"])],16)]),default:G(()=>[re("span",null,le(E.floated?"Unfloat Screen":"Float Screen"),1)]),_:1})),E.floated?(q(),ne(v,{key:1,"open-delay":600,location:"top"},{activator:G(({props:f})=>[re("div",Ze(Xe(f)),[V(p,{icon:"mdi-arrow-up",variant:"text",density:"compact","data-test":"up-screen-icon","aria-label":"Move Screen Up",onClick:y.upScreen},null,8,["onClick"])],16)]),default:G(()=>[h[6]||(h[6]=re("span",null," Move Screen Up ",-1))]),_:1})):fe("",!0),E.floated&&E.zIndex>u.minZ?(q(),ne(v,{key:2,"open-delay":600,location:"top"},{activator:G(({props:f})=>[re("div",Ze(Xe(f)),[V(p,{icon:"mdi-arrow-down",variant:"text",density:"compact","data-test":"down-screen-icon","aria-label":"Move Screen Down",onClick:y.downScreen},null,8,["onClick"])],16)]),default:G(()=>[h[7]||(h[7]=re("span",null," Move Screen Down ",-1))]),_:1})):fe("",!0),V(s),re("span",null,le(u.target)+" "+le(u.screen),1),V(s),E.expand?(q(),ne(p,{key:3,icon:"mdi-window-minimize",variant:"text",density:"compact","data-test":"minimize-screen-icon","aria-label":"Minimize Screen",onClick:y.minMaxTransition},null,8,["onClick"])):(q(),ne(p,{key:4,icon:"mdi-window-maximize",variant:"text",density:"compact","data-test":"maximize-screen-icon","aria-label":"Maximize Screen",onClick:y.minMaxTransition},null,8,["onClick"])),u.showClose?(q(),ne(p,{key:5,icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-screen-icon","aria-label":"Close Screen",onClick:h[1]||(h[1]=f=>l.$emit("close-screen"))})):fe("",!0)]),_:1},8,["class"]),E.editDialog?fe("",!0):(q(),ne(r,{key:0},{default:G(()=>[Ye(re("div",Cn,[V(n,{style:{"pointer-events":"none"},"model-value":E.errors.length!==0,opacity:"0.8",contained:"","scroll-strategy":"none"},null,8,["model-value"]),(q(),ne(o,{key:E.screenKey,widgets:E.layoutStack[0].widgets,"screen-values":E.screenValues,"screen-time-zone":u.timeZone,onAddItem:y.addItem,onDeleteItem:y.deleteItem,onOpen:y.open,onClose:y.close,onCloseAll:y.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))],512),[[Qe,E.expand]])]),_:1}))]),_:1},8,["min-height","min-width"])),u.inline?(q(),he("div",Sn,[V(n,{style:{"pointer-events":"none"},"model-value":E.errors.length!==0,opacity:"0.8",contained:"","scroll-strategy":"none"},null,8,["model-value"]),Ye(V(p,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:h[2]||(h[2]=()=>{E.errorDialog=!0})},null,512),[[Qe,E.errors.length!==0]]),(q(),ne(o,{key:E.screenKey,widgets:E.layoutStack[0].widgets,"screen-values":E.screenValues,"screen-time-zone":u.timeZone,onAddItem:y.addItem,onDeleteItem:y.deleteItem,onOpen:y.open,onClose:y.close,onCloseAll:y.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))])):fe("",!0),E.editDialog?(q(),ne(e,{key:2,modelValue:E.editDialog,"onUpdate:modelValue":h[3]||(h[3]=f=>E.editDialog=f),target:u.target,screen:u.screen,definition:E.currentDefinition,keywords:u.keywords,errors:E.errors,onSave:y.saveEdit,onCancel:y.cancelEdit,onDelete:y.deleteScreen},null,8,["modelValue","target","screen","definition","keywords","errors","onSave","onCancel","onDelete"])):fe("",!0),V(d,{modelValue:E.errorDialog,"onUpdate:modelValue":h[5]||(h[5]=f=>E.errorDialog=f),width:"60vw"},{default:G(()=>[V(c,{height:"24"},{default:G(()=>[V(s),re("span",null," Screen: "+le(u.target)+" "+le(u.screen)+" Errors ",1),V(s)]),_:1}),V(i,null,{default:G(()=>[V(t,{class:"errors",readonly:"",rows:"13","model-value":y.error},null,8,["model-value"]),V(a,{class:"pb-5"},{default:G(()=>[V(s),V(p,{variant:"outlined",class:"mr-2",onClick:y.clearErrors},{default:G(()=>[...h[8]||(h[8]=[se(" Clear Errors ",-1)])]),_:1},8,["onClick"]),V(p,{variant:"flat",class:"mr-2",onClick:h[4]||(h[4]=f=>E.errorDialog=!1)},{default:G(()=>[...h[9]||(h[9]=[se(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],4)}const _n=Ce(bn,[["render",$n],["__scopeId","data-v-6001644a"]]),yt={methods:{isFloat(l){return!!(/^\s*[-+]?\d*\.\d+\s*$/.test(l)||/^\s*[-+]?(\d+((\.\d+)?)|(\.\d+))[eE][-+]?\d+\s*$/.test(l))},isInt(l){return!!(/^\s*[-+]?\d+\s*$/.test(l)||/^\s*0[xX][\dabcdefABCDEF]+\s*$/.test(l))},isArray(l){return/^\s*\[.*\]\s*$/.test(l)},removeQuotes(l){if(l.length<2)return l;let h=l.charAt(0);if(h!=='"'&&h!=="'")return l;let u=l.charAt(l.length-1);return h!==u?l:l.slice(1,-1)},convertToValue(l){if(l.val!==void 0&&l.states&&!this.cmdRaw){const g=Object.keys(l.states).find(E=>l.states[E].value===l.val);if(g!==void 0)return g}if(typeof l.val!="string")return l.val;let h=l.val,u=this.removeQuotes(h);if(h===u){let g=h.toUpperCase();if((l.type==="STRING"||l.type==="BLOCK")&&g.startsWith("0X")){let E=g.slice(2);E.length%2!==0&&(E="0"+E);let y={json_class:"String",raw:[]};for(let p=0;p<E.length;p+=2){let v=E.charAt(p)+E.charAt(p+1);y.raw.push(Number.parseInt(v,16))}return y}if(g==="INFINITY")return Number.POSITIVE_INFINITY;if(g==="-INFINITY")return Number.NEGATIVE_INFINITY;if(g==="NAN")return Number.NaN;if(this.isFloat(h))return Number.parseFloat(h);if(this.isInt(h))return Number.isSafeInteger(Number(h))?Number.parseInt(h):BigInt(h);if(this.isArray(h))try{return JSON.parse(h)}catch{throw new Error(`Invalid array parameter value: ${h}`)}return h}return u},convertToString(l){let h="";if(Object.prototype.toString.call(l).slice(8,-1)==="Array"){let u=l.length;h="[ ";for(let g=0;g<u;g++)Object.prototype.toString.call(l[g]).slice(8,-1)==="String"?h+='"'+l[g]+'"':h+=l[g],g!==u-1&&(h+=", ");h+=" ]"}else if(Object.prototype.toString.call(l).slice(8,-1)==="Object")if(l.json_class==="String"&&l.raw){h="0x";for(let u of l.raw)h+=u.toString(16).padStart(2,"0").toUpperCase()}else l.json_class==="Float"&&l.raw?h=l.raw:h=JSON.stringify(l).replace(/\\n/g,"");else h=String(l);return h}}},xn={name:"CommandParameterEditor",mixins:[yt],props:{modelValue:{type:[String,Number],default:void 0},states:{type:Object,default:()=>null},statesInHex:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},allowManualEntry:{type:Boolean,default:!1}},emits:["update:modelValue","hazardous-change"],data(){return{manuallyEntered:!1}},computed:{textFieldValue(){return this.convertToString(this.modelValue)},stateValue(){return this.statesInHex?"0x"+this.modelValue.toString(16):this.modelValue},selectValue(){return this.manuallyEntered?"__manual__":this.modelValue===""?null:this.modelValue},stateOptions(){if(!this.states)return null;const l=Object.keys(this.states).map(h=>({label:h,...this.states[h]}));return this.allowManualEntry&&l.push({label:"MANUALLY_ENTERED",value:"__manual__"}),l},hazardous(){return this.states?Object.entries(this.states).find(([l,h])=>h.value===this.modelValue)?.at(1)?.hazardous!==void 0:!1},stateClass(){return this.hazardous?"hazardous mr-4":"mr-4"}},watch:{hazardous:{immediate:!0,handler(l){this.$emit("hazardous-change",l)}},allowManualEntry(l){l||(this.manuallyEntered=!1)}},methods:{handleChange(l){this.$emit("update:modelValue",l)},handleStateSelect(l){l==="__manual__"?(this.manuallyEntered=!0,this.$emit("update:modelValue","")):(this.manuallyEntered=!1,this.$emit("update:modelValue",l))}}},An={key:1,class:"d-flex align-center"};function kn(l,h,u,g,E,y){const p=Z("v-text-field"),v=Z("v-select"),s=Z("v-icon"),c=Z("v-tooltip");return q(),he("div",null,[u.states?(q(),he("div",An,[V(v,{items:y.stateOptions,"model-value":y.selectValue,disabled:u.disabled,"item-title":"label",class:pt(y.stateClass),"hide-details":"",density:"compact",variant:"outlined",placeholder:"Select...","min-width":"120px","data-test":"cmd-param-select","onUpdate:modelValue":y.handleStateSelect},null,8,["items","model-value","disabled","class","onUpdate:modelValue"]),E.manuallyEntered?(q(),ne(p,{key:0,"model-value":y.textFieldValue,"hide-details":"",density:"compact",variant:"outlined","min-width":"60px","data-test":"cmd-param-value","onUpdate:modelValue":y.handleChange},null,8,["model-value","onUpdate:modelValue"])):fe("",!0),E.manuallyEntered?(q(),ne(c,{key:1,location:"top"},{activator:G(({props:n})=>[V(s,Ne(n,{class:"ml-1"}),{default:G(()=>[...h[0]||(h[0]=[se("mdi-information-outline",-1)])]),_:1},16)]),default:G(()=>[h[1]||(h[1]=re("span",null,[se("Enter a raw value (e.g. numeric) for this parameter."),re("br"),se("State names are not accepted here.")],-1))]),_:1})):(q(),ne(p,{key:2,"model-value":y.stateValue,disabled:"","hide-details":"",density:"compact",variant:"outlined","min-width":"60px","data-test":"cmd-param-value"},null,8,["model-value"]))])):(q(),ne(p,{key:0,"model-value":y.textFieldValue,disabled:u.disabled,"hide-details":"",density:"compact",variant:"filled","data-test":"cmd-param-value","onUpdate:modelValue":y.handleChange},null,8,["model-value","disabled","onUpdate:modelValue"]))])}const En=Ce(xn,[["render",kn],["__scopeId","data-v-3e73bafa"]]),Mn={name:"CommandEditor",components:{TargetPacketItemChooser:Xt,CommandParameterEditor:En,DetailsDialog:Jt},mixins:[yt],props:{initialTargetName:{type:String,default:null},initialPacketName:{type:String,default:null},cmdString:{type:String,default:null},sendDisabled:{type:Boolean,default:!1},statesInHex:{type:Boolean,default:!1},showIgnoredParams:{type:Boolean,default:!1},cmdRaw:{type:Boolean,default:!1},showCommandButton:{type:Boolean,default:!0},showQueueSelect:{type:Boolean,default:!0},ignoreRangeChecks:{type:Boolean,default:!1}},emits:["command-changed","build-cmd","command-loaded"],data(){return{search:"",headers:[{title:"Name",value:"parameter_name"},{title:"Value or State",value:"val"},{title:"Units",value:"units"},{title:"Range",value:"range"},{title:"Description",value:"description"}],api:null,targetName:"",commandName:"",commandDescription:"",ignoredParams:[],computedRows:[],reservedItemNames:["PACKET_TIMESECONDS","PACKET_TIMEFORMATTED","RECEIVED_TIMESECONDS","RECEIVED_TIMEFORMATTED","RECEIVED_COUNT"],contextMenuShown:!1,viewDetails:!1,parameterName:"",hazardousParameters:{},x:0,y:0,contextMenuOptions:[{title:"Details",action:()=>{this.contextMenuShown=!1,this.viewDetails=!0}}]}},computed:{hasHazardousParameter(){return Object.values(this.hazardousParameters).some(l=>l===!0)}},created(){this.api=new Ke,this.cmdString?this.processCmdString():(this.targetName=this.initialTargetName,this.commandName=this.initialPacketName,this.updateCmdParams())},methods:{onParameterHazardousChange(l,h){this.hazardousParameters[l.parameter_name]=h},commandChanged(l){(this.targetName!==l.targetName||this.commandName!==l.packetName)&&(this.targetName=l.targetName,this.commandName=l.packetName,this.updateCmdParams()),this.$emit("command-changed",l)},buildCmd(l){this.$emit("build-cmd",l)},showContextMenu(l,h){l.preventDefault(),this.parameterName=h.item.parameter_name,this.contextMenuShown=!1,this.x=l.clientX,this.y=l.clientY,this.$nextTick(()=>{this.contextMenuShown=!0})},updateCmdParams(){this.ignoredParams=[],this.computedRows=[],this.hazardousParameters={},this.targetName&&this.commandName?this.api.get_target(this.targetName).then(l=>(this.ignoredParams=l.ignored_parameters,this.api.get_cmd(this.targetName,this.commandName)),l=>{console.error("Error getting ignored parameters:",l)}).then(l=>{if(l){const h=new Set;l.items.forEach(u=>{u.variable_bit_size&&h.add(u.variable_bit_size.length_item_name.toUpperCase())}),l.items.forEach(u=>{if(!this.reservedItemNames.includes(u.name)&&!u.hidden&&(!this.ignoredParams.includes(u.name)||this.showIgnoredParams)){let g=u.default;!u.states&&u.data_type==="STRING"&&typeof u.default=="string"&&(g=`'${g}'`),u.required&&(g=null),u.format_string&&u.default&&(g=sprintf(u.format_string,u.default)),Object.prototype.toString.call(g).slice(8,-1)==="Object"&&(g=this.convertToString(g));let E="N/A";u.minimum!=null&&u.maximum!=null&&(u.data_type==="FLOAT"&&(u.minimum<-1e6&&(u.minimum=u.minimum.toExponential(3)),u.maximum>1e6&&(u.maximum=u.maximum.toExponential(3))),E=`${u.minimum}..${u.maximum}`);const y=h.has(u.name.toUpperCase());this.computedRows.push({parameter_name:u.name,val:g,states:u.states,description:u.description,range:E,units:u.units,type:u.data_type,disabled:y})}}),this.commandDescription=l.description,this.populateParametersFromParsed(),this.$emit("command-loaded",l)}else this.$emit("command-loaded",null)},l=>{console.error("Error getting command parameters:",l),this.$emit("command-loaded",null)}):this.$emit("command-loaded",null)},triggerUpdateCmdParams(){this.updateCmdParams()},getRows(){return this.computedRows},getCmdString(){let l=`${this.targetName} ${this.commandName}`;if(this.computedRows.length===0)return l;l+=" with";for(const h of this.computedRows){if(h.val===null)throw new Error(`Required parameter ${h.parameter_name} not set`);if(h.val!==null&&h.val!==void 0&&h.val!==""){if(h.states){const g=Object.entries(h.states).find(([,E])=>E.value===h.val);if(g){l+=` ${h.parameter_name} '${g[0]}',`;continue}}let u=this.convertToString(h.val);u.includes(" ")&&!this.isArray(u)?l+=` ${h.parameter_name} '${u}',`:l+=` ${h.parameter_name} ${u},`}}return l.slice(0,-1)},parseCmdString(l){const h=l.split(" ");if(h.length<2)return{target:"",command:"",params:{}};if(h.length===2)return{target:h[0],command:h[1],params:{}};if(h[2]!=="with")return{target:"",command:"",params:{}};const u=h[0],g=h[1];let E={};const y=l.split(" with ")[1];let p=[],v=0,s="";for(let c of y)c==="["?(v++,s+=c):c==="]"?(v--,s+=c):c===","&&v===0?(p.push(s.trim()),s=""):s+=c;s.trim()!==""&&p.push(s.trim());for(let c of p){let n=c.indexOf(" ");if(n>0){let o=c.substring(0,n).trim(),r=c.substring(n+1).trim();E[o]=r}}return{target:u,command:g,params:E}},processCmdString(){const l=this.parseCmdString(this.cmdString);l.target&&l.command&&(this.targetName=l.target,this.commandName=l.command,this.parsedParameters=l.params,this.updateCmdParams())},populateParametersFromParsed(){!this.parsedParameters||Object.keys(this.parsedParameters).length===0||this.$nextTick(()=>{setTimeout(()=>{this.computedRows.forEach(l=>{if(this.parsedParameters.hasOwnProperty(l.parameter_name)){const h=this.parsedParameters[l.parameter_name];if(l.states&&typeof h=="string"){const u=Object.keys(l.states).find(g=>g===h||g.toLowerCase()===h.toLowerCase());u?l.val=l.states[u].value:l.val=h}else l.type==="STRING"&&typeof h=="string"?l.val=h.startsWith("'")||h.startsWith('"')?h:`'${h}'`:l.val=h}})},100)})}}},Tn={style:{padding:"10px"}};function Ln(l,h,u,g,E,y){const p=Z("target-packet-item-chooser"),v=Z("v-spacer"),s=Z("v-text-field"),c=Z("v-card-title"),n=Z("command-parameter-editor"),o=Z("v-data-table"),r=Z("v-card"),i=Z("v-list-item-title"),e=Z("v-list-item"),t=Z("v-list"),a=Z("v-menu"),d=Z("details-dialog");return q(),ne(r,null,{default:G(()=>[re("div",Tn,[V(p,{ref:"targetPacketChooser","initial-target-name":E.targetName,"initial-packet-name":E.commandName,disabled:u.sendDisabled,"button-text":u.showCommandButton?"Send":null,"show-queue-select":u.showQueueSelect,"parameter-hazardous":y.hasHazardousParameter,mode:"cmd",onOnSet:h[0]||(h[0]=f=>y.commandChanged(f)),onAddItem:h[1]||(h[1]=f=>y.buildCmd(f))},null,8,["initial-target-name","initial-packet-name","disabled","button-text","show-queue-select","parameter-hazardous"])]),E.computedRows.length!==0?(q(),ne(r,{key:0},{default:G(()=>[V(c,{class:"d-flex align-center justify-content-space-between"},{default:G(()=>[h[5]||(h[5]=se(" Parameters ",-1)),V(v),V(s,{modelValue:E.search,"onUpdate:modelValue":h[2]||(h[2]=f=>E.search=f),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),V(o,{headers:E.headers,items:E.computedRows,search:E.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact",class:"parameters-table","onContextmenu:row":y.showContextMenu},{"item.val":G(({item:f})=>[Zt(l.$slots,"parameter-editor",{item:f,statesInHex:u.statesInHex},()=>[V(n,{modelValue:f.val,"onUpdate:modelValue":S=>f.val=S,states:f.states,"states-in-hex":u.statesInHex,disabled:f.disabled,"allow-manual-entry":u.ignoreRangeChecks,onHazardousChange:S=>y.onParameterHazardousChange(f,S)},null,8,["modelValue","onUpdate:modelValue","states","states-in-hex","disabled","allow-manual-entry","onHazardousChange"])],!0)]),_:3},8,["headers","items","search","onContextmenu:row"])]),_:3})):fe("",!0),V(a,{modelValue:E.contextMenuShown,"onUpdate:modelValue":h[3]||(h[3]=f=>E.contextMenuShown=f),target:[E.x,E.y]},{default:G(()=>[V(t,null,{default:G(()=>[(q(!0),he(be,null,Se(E.contextMenuOptions,(f,S)=>(q(),ne(e,{key:S,onClick:qe(f.action,["stop"])},{default:G(()=>[V(i,null,{default:G(()=>[se(le(f.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),V(d,{modelValue:E.viewDetails,"onUpdate:modelValue":h[4]||(h[4]=f=>E.viewDetails=f),"target-name":E.targetName,"packet-name":E.commandName,"item-name":E.parameterName,type:"cmd"},null,8,["modelValue","target-name","packet-name","item-name"])]),_:3})}const Rn=Ce(Mn,[["render",Ln],["__scopeId","data-v-f2e73c29"]]);var wt={exports:{}},ii;function In(){return ii||(ii=1,(function(l,h){(function(){var u="ace",g=(function(){return this})();!g&&typeof window<"u"&&(g=window);var E=function(n,o,r){if(typeof n!="string"){E.original?E.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=o),E.modules[n]||(E.payloads[n]=r,E.modules[n]=null)};E.modules={},E.payloads={};var y=function(n,o,r){if(typeof o=="string"){var i=s(n,o);if(i!=null)return r&&r(),i}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var e=[],t=0,a=o.length;t<a;++t){var d=s(n,o[t]);if(d==null&&p.original)return;e.push(d)}return r&&r.apply(null,e)||!0}},p=function(n,o){var r=y("",n,o);return r==null&&p.original?p.original.apply(this,arguments):r},v=function(n,o){if(o.indexOf("!")!==-1){var r=o.split("!");return v(n,r[0])+"!"+v(n,r[1])}if(o.charAt(0)=="."){var i=n.split("/").slice(0,-1).join("/");for(o=i+"/"+o;o.indexOf(".")!==-1&&e!=o;){var e=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},s=function(n,o){o=v(n,o);var r=E.modules[o];if(!r){if(r=E.payloads[o],typeof r=="function"){var i={},e={id:o,uri:"",exports:i,packaged:!0},t=function(d,f){return y(o,d,f)},a=r(t,i,e);i=a||e.exports,E.modules[o]=i,delete E.payloads[o]}r=E.modules[o]=i||r}return r};function c(n){var o=g;g[n]||(g[n]={}),o=g[n],(!o.define||!o.define.packaged)&&(E.original=o.define,o.define=E,o.define.packaged=!0),(!o.require||!o.require.packaged)&&(p.original=o.require,o.require=p,o.require.packaged=!0)}c(u)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(u,g,E){function y(p,v,s){Object.defineProperty(p,v,{value:s,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||y(String.prototype,"startsWith",function(p,v){return v=v||0,this.lastIndexOf(p,v)===v}),String.prototype.endsWith||y(String.prototype,"endsWith",function(p,v){var s=this;(v===void 0||v>s.length)&&(v=s.length),v-=p.length;var c=s.indexOf(p,v);return c!==-1&&c===v}),String.prototype.repeat||y(String.prototype,"repeat",function(p){for(var v="",s=this;p>0;)p&1&&(v+=s),(p>>=1)&&(s+=s);return v}),String.prototype.includes||y(String.prototype,"includes",function(p,v){return this.indexOf(p,v)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var v=Object(p),s=1;s<arguments.length;s++){var c=arguments[s];c!=null&&Object.keys(c).forEach(function(n){v[n]=c[n]})}return v}),Object.values||(Object.values=function(p){return Object.keys(p).map(function(v){return p[v]})}),Array.prototype.find||y(Array.prototype,"find",function(p){for(var v=this.length,s=arguments[1],c=0;c<v;c++){var n=this[c];if(p.call(s,n,c,this))return n}}),Array.prototype.findIndex||y(Array.prototype,"findIndex",function(p){for(var v=this.length,s=arguments[1],c=0;c<v;c++){var n=this[c];if(p.call(s,n,c,this))return c}}),Array.prototype.includes||y(Array.prototype,"includes",function(p,v){return this.indexOf(p,v)!=-1}),Array.prototype.fill||y(Array.prototype,"fill",function(p){for(var v=this,s=v.length>>>0,c=arguments[1],n=c>>0,o=n<0?Math.max(s+n,0):Math.min(n,s),r=arguments[2],i=r===void 0?s:r>>0,e=i<0?Math.max(s+i,0):Math.min(i,s);o<e;)v[o]=p,o++;return v}),Array.of||y(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(u,g,E){u("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(u,g,E){g.deepCopy=function y(p){if(typeof p!="object"||!p)return p;var v;if(Array.isArray(p)){v=[];for(var s=0;s<p.length;s++)v[s]=y(p[s]);return v}if(Object.prototype.toString.call(p)!=="[object Object]")return p;v={};for(var s in p)v[s]=y(p[s]);return v}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(u,g,E){g.last=function(v){return v[v.length-1]},g.stringReverse=function(v){return v.split("").reverse().join("")},g.stringRepeat=function(v,s){for(var c="";s>0;)s&1&&(c+=v),(s>>=1)&&(v+=v);return c};var y=/^\s\s*/,p=/\s\s*$/;g.stringTrimLeft=function(v){return v.replace(y,"")},g.stringTrimRight=function(v){return v.replace(p,"")},g.copyObject=function(v){var s={};for(var c in v)s[c]=v[c];return s},g.copyArray=function(v){for(var s=[],c=0,n=v.length;c<n;c++)v[c]&&typeof v[c]=="object"?s[c]=this.copyObject(v[c]):s[c]=v[c];return s},g.deepCopy=u("./deep_copy").deepCopy,g.arrayToMap=function(v){for(var s={},c=0;c<v.length;c++)s[v[c]]=1;return s},g.createMap=function(v){var s=Object.create(null);for(var c in v)s[c]=v[c];return s},g.arrayRemove=function(v,s){for(var c=0;c<=v.length;c++)s===v[c]&&v.splice(c,1)},g.escapeRegExp=function(v){return v.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},g.escapeHTML=function(v){return(""+v).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},g.getMatchOffsets=function(v,s){var c=[];return v.replace(s,function(n){c.push({offset:arguments[arguments.length-2],length:n.length})}),c},g.deferredCall=function(v){var s=null,c=function(){s=null,v()},n=function(o){return n.cancel(),s=setTimeout(c,o||0),n};return n.schedule=n,n.call=function(){return this.cancel(),v(),n},n.cancel=function(){return clearTimeout(s),s=null,n},n.isPending=function(){return s},n},g.delayedCall=function(v,s){var c=null,n=function(){c=null,v()},o=function(r){c==null&&(c=setTimeout(n,r||s))};return o.delay=function(r){c&&clearTimeout(c),c=setTimeout(n,r||s)},o.schedule=o,o.call=function(){this.cancel(),v()},o.cancel=function(){c&&clearTimeout(c),c=null},o.isPending=function(){return c},o},g.sleep=function(v){return new Promise(function(s){setTimeout(s,v)})},g.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},g.skipEmptyMatch=function(v,s,c){return c&&v.codePointAt(s)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(u,g,E){g.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},g.getOS=function(){return g.isMac?g.OS.MAC:g.isLinux?g.OS.LINUX:g.OS.WINDOWS};var y=typeof navigator=="object"?navigator:{},p=(/mac|win|linux/i.exec(y.platform)||["other"])[0].toLowerCase(),v=y.userAgent||"",s=y.appName||"";g.isWin=p=="win",g.isMac=p=="mac",g.isLinux=p=="linux",g.isIE=s=="Microsoft Internet Explorer"||s.indexOf("MSAppHost")>=0?parseFloat((v.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((v.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),g.isOldIE=g.isIE&&g.isIE<9,g.isGecko=g.isMozilla=v.match(/ Gecko\/\d+/),g.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",g.isWebKit=parseFloat(v.split("WebKit/")[1])||void 0,g.isChrome=parseFloat(v.split(" Chrome/")[1])||void 0,g.isSafari=parseFloat(v.split(" Safari/")[1])&&!g.isChrome||void 0,g.isEdge=parseFloat(v.split(" Edge/")[1])||void 0,g.isAIR=v.indexOf("AdobeAIR")>=0,g.isAndroid=v.indexOf("Android")>=0,g.isChromeOS=v.indexOf(" CrOS ")>=0,g.isIOS=/iPad|iPhone|iPod/.test(v)&&!window.MSStream,g.isIOS&&(g.isMac=!0),g.isMobile=g.isIOS||g.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(u,g,E){var y=u("./useragent"),p="http://www.w3.org/1999/xhtml";g.buildDom=function r(i,e,t){if(typeof i=="string"&&i){var a=document.createTextNode(i);return e&&e.appendChild(a),a}if(!Array.isArray(i))return i&&i.appendChild&&e&&e.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var d=[],f=0;f<i.length;f++){var S=r(i[f],e,t);S&&d.push(S)}return d}var $=document.createElement(i[0]),C=i[1],w=1;C&&typeof C=="object"&&!Array.isArray(C)&&(w=2);for(var f=w;f<i.length;f++)r(i[f],$,t);return w==2&&Object.keys(C).forEach(function(M){var R=C[M];M==="class"?$.className=Array.isArray(R)?R.join(" "):R:typeof R=="function"||M=="value"||M[0]=="$"?$[M]=R:M==="ref"?t&&(t[R]=$):M==="style"?typeof R=="string"&&($.style.cssText=R):R!=null&&$.setAttribute(M,R)}),e&&e.appendChild($),$},g.getDocumentHead=function(r){return r||(r=document),r.head||r.getElementsByTagName("head")[0]||r.documentElement},g.createElement=function(r,i){return document.createElementNS?document.createElementNS(i||p,r):document.createElement(r)},g.removeChildren=function(r){r.innerHTML=""},g.createTextNode=function(r,i){var e=i?i.ownerDocument:document;return e.createTextNode(r)},g.createFragment=function(r){var i=r?r.ownerDocument:document;return i.createDocumentFragment()},g.hasCssClass=function(r,i){var e=(r.className+"").split(/\s+/g);return e.indexOf(i)!==-1},g.addCssClass=function(r,i){g.hasCssClass(r,i)||(r.className+=" "+i)},g.removeCssClass=function(r,i){for(var e=r.className.split(/\s+/g);;){var t=e.indexOf(i);if(t==-1)break;e.splice(t,1)}r.className=e.join(" ")},g.toggleCssClass=function(r,i){for(var e=r.className.split(/\s+/g),t=!0;;){var a=e.indexOf(i);if(a==-1)break;t=!1,e.splice(a,1)}return t&&e.push(i),r.className=e.join(" "),t},g.setCssClass=function(r,i,e){e?g.addCssClass(r,i):g.removeCssClass(r,i)},g.hasCssString=function(r,i){var e=0,t;if(i=i||document,t=i.querySelectorAll("style")){for(;e<t.length;)if(t[e++].id===r)return!0}},g.removeElementById=function(r,i){i=i||document,i.getElementById(r)&&i.getElementById(r).remove()};var v,s=[];g.useStrictCSP=function(r){v=r,r==!1?c():s||(s=[])};function c(){var r=s;s=null,r&&r.forEach(function(i){n(i[0],i[1])})}function n(r,i,e){if(!(typeof document>"u")){if(s){if(e)c();else if(e===!1)return s.push([r,i])}if(!v){var t=e;!e||!e.getRootNode?t=document:(t=e.getRootNode(),(!t||t==e)&&(t=document));var a=t.ownerDocument||t;if(i&&g.hasCssString(i,t))return null;i&&(r+=`
5
+ /*# sourceURL=ace/css/`+i+" */");var d=g.createElement("style");d.appendChild(a.createTextNode(r)),i&&(d.id=i),t==a&&(t=g.getDocumentHead(a)),t.insertBefore(d,t.firstChild)}}}if(g.importCssString=n,g.importCssStylsheet=function(r,i){g.buildDom(["link",{rel:"stylesheet",href:r}],g.getDocumentHead(i))},g.$fixPositionBug=function(r){var i=r.getBoundingClientRect();if(r.style.left){var e=parseFloat(r.style.left),t=+i.left;Math.abs(e-t)>1&&(r.style.left=2*e-t+"px")}if(r.style.right){var e=parseFloat(r.style.right),t=window.innerWidth-i.right;Math.abs(e-t)>1&&(r.style.right=2*e-t+"px")}if(r.style.top){var e=parseFloat(r.style.top),t=+i.top;Math.abs(e-t)>1&&(r.style.top=2*e-t+"px")}if(r.style.bottom){var e=parseFloat(r.style.bottom),t=window.innerHeight-i.bottom;Math.abs(e-t)>1&&(r.style.bottom=2*e-t+"px")}},g.scrollbarWidth=function(r){var i=g.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var e=g.createElement("ace_outer"),t=e.style;t.position="absolute",t.left="-10000px",t.overflow="hidden",t.width="200px",t.minWidth="0px",t.height="150px",t.display="block",e.appendChild(i);var a=r&&r.documentElement||document&&document.documentElement;if(!a)return 0;a.appendChild(e);var d=i.offsetWidth;t.overflow="scroll";var f=i.offsetWidth;return d===f&&(f=e.clientWidth),a.removeChild(e),d-f},g.computedStyle=function(r,i){return window.getComputedStyle(r,"")||{}},g.setStyle=function(r,i,e){r[i]!==e&&(r[i]=e)},g.HAS_CSS_ANIMATION=!1,g.HAS_CSS_TRANSFORMS=!1,g.HI_DPI=y.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,y.isChromeOS&&(g.HI_DPI=!1),typeof document<"u"){var o=document.createElement("div");g.HI_DPI&&o.style.transform!==void 0&&(g.HAS_CSS_TRANSFORMS=!0),!y.isEdge&&typeof o.style.animationName<"u"&&(g.HAS_CSS_ANIMATION=!0),o=null}g.HAS_CSS_TRANSFORMS?g.translate=function(r,i,e){r.style.transform="translate("+Math.round(i)+"px, "+Math.round(e)+"px)"}:g.translate=function(r,i,e){r.style.top=Math.round(e)+"px",r.style.left=Math.round(i)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(u,g,E){var y=u("./dom");g.get=function(p,v){var s=new XMLHttpRequest;s.open("GET",p,!0),s.onreadystatechange=function(){s.readyState===4&&v(s.responseText)},s.send(null)},g.loadScript=function(p,v){var s=y.getDocumentHead(),c=document.createElement("script");c.src=p,s.appendChild(c),c.onload=c.onreadystatechange=function(n,o){(o||!c.readyState||c.readyState=="loaded"||c.readyState=="complete")&&(c=c.onload=c.onreadystatechange=null,o||v())}},g.qualifyURL=function(p){var v=document.createElement("a");return v.href=p,v.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(u,g,E){g.inherits=function(y,p){y.super_=p,y.prototype=Object.create(p.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}})},g.mixin=function(y,p){for(var v in p)y[v]=p[v];return y},g.implement=function(y,p){g.mixin(y,p)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(u,g,E){var y={},p=function(){this.propagationStopped=!0},v=function(){this.defaultPrevented=!0};y._emit=y._dispatchEvent=function(s,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[s]||[],o=this._defaultHandlers[s];if(!(!n.length&&!o)){(typeof c!="object"||!c)&&(c={}),c.type||(c.type=s),c.stopPropagation||(c.stopPropagation=p),c.preventDefault||(c.preventDefault=v),n=n.slice();for(var r=0;r<n.length&&(n[r](c,this),!c.propagationStopped);r++);if(o&&!c.defaultPrevented)return o(c,this)}},y._signal=function(s,c){var n=(this._eventRegistry||{})[s];if(n){n=n.slice();for(var o=0;o<n.length;o++)n[o](c,this)}},y.once=function(s,c){var n=this;if(this.on(s,function o(){n.off(s,o),c.apply(null,arguments)}),!c)return new Promise(function(o){c=o})},y.setDefaultHandler=function(s,c){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[s]){var o=n[s],r=n._disabled_[s];r||(n._disabled_[s]=r=[]),r.push(o);var i=r.indexOf(c);i!=-1&&r.splice(i,1)}n[s]=c},y.removeDefaultHandler=function(s,c){var n=this._defaultHandlers;if(n){var o=n._disabled_[s];if(n[s]==c)o&&this.setDefaultHandler(s,o.pop());else if(o){var r=o.indexOf(c);r!=-1&&o.splice(r,1)}}},y.on=y.addEventListener=function(s,c,n){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[s];return o||(o=this._eventRegistry[s]=[]),o.indexOf(c)==-1&&o[n?"unshift":"push"](c),c},y.off=y.removeListener=y.removeEventListener=function(s,c){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[s];if(n){var o=n.indexOf(c);o!==-1&&n.splice(o,1)}},y.removeAllListeners=function(s){s||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[s]=void 0),this._defaultHandlers&&(this._defaultHandlers[s]=void 0)},g.EventEmitter=y}),ace.define("ace/lib/report_error",["require","exports","module"],function(u,g,E){g.reportError=function(p,v){var s=new Error(p);s.data=v,typeof console=="object"&&console.error&&console.error(s),setTimeout(function(){throw s})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(u,g,E){var y={"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"};g.defaultEnglishMessages=y}),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(u,g,E){"no use strict";var y=u("./oop"),p=u("./event_emitter").EventEmitter,v=u("./report_error").reportError,s=u("./default_english_messages").defaultEnglishMessages,c={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var a=this.$options;e=Object.keys(a).filter(function(d){return!a[d].hidden})}return e.forEach(function(d){t[d]=this.getOption(d)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var a=this.$options[e];if(!a)return n('misspelled option "'+e+'"');if(a.forwardTo)return this[a.forwardTo]&&this[a.forwardTo].setOption(e,t);a.handlesSet||(this["$"+e]=t),a&&a.set&&a.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:n('misspelled option "'+e+'"')}};function n(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var o,r,i=(function(){function e(){this.$defaultOptions={},o=s,r="dollarSigns"}return e.prototype.defineOptions=function(t,a,d){return t.$options||(this.$defaultOptions[a]=t.$options={}),Object.keys(d).forEach(function(f){var S=d[f];typeof S=="string"&&(S={forwardTo:S}),S.name||(S.name=f),t.$options[S.name]=S,"initialValue"in S&&(t["$"+S.name]=S.initialValue)}),y.implement(t,c),this},e.prototype.resetOptions=function(t){Object.keys(t.$options).forEach(function(a){var d=t.$options[a];"value"in d&&t.setOption(a,d.value)})},e.prototype.setDefaultValue=function(t,a,d){if(!t){for(t in this.$defaultOptions)if(this.$defaultOptions[t][a])break;if(!this.$defaultOptions[t][a])return!1}var f=this.$defaultOptions[t]||(this.$defaultOptions[t]={});f[a]&&(f.forwardTo?this.setDefaultValue(f.forwardTo,a,d):f[a].value=d)},e.prototype.setDefaultValues=function(t,a){Object.keys(a).forEach(function(d){this.setDefaultValue(t,d,a[d])},this)},e.prototype.setMessages=function(t,a){o=t,a&&a.placeholders&&(r=a.placeholders)},e.prototype.nls=function(t,a,d){o[t]||(n("No message found for the key '"+t+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+a+"'."),o[a]||n("No message found for the default string '"+a+"' in the provided messages. Falling back to the default English message."));var f=o[t]||o[a]||a;return d&&(r==="dollarSigns"&&(f=f.replace(/\$(\$|[\d]+)/g,function(S,$){return $=="$"?"$":d[$]})),r==="curlyBrackets"&&(f=f.replace(/\{([^\}]+)\}/g,function(S,$){return d[$]}))),f},e})();i.prototype.warn=n,i.prototype.reportError=v,y.implement(i.prototype,p),g.AppConfig=i}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(u,g,E){E.exports=`.ace-tm .ace_gutter {
6
+ background: #f0f0f0;
7
+ color: #333;
8
+ }
9
+
10
+ .ace-tm .ace_print-margin {
11
+ width: 1px;
12
+ background: #e8e8e8;
13
+ }
14
+
15
+ .ace-tm .ace_fold {
16
+ background-color: #6B72E6;
17
+ }
18
+
19
+ .ace-tm {
20
+ background-color: #FFFFFF;
21
+ color: black;
22
+ }
23
+
24
+ .ace-tm .ace_cursor {
25
+ color: black;
26
+ }
27
+
28
+ .ace-tm .ace_invisible {
29
+ color: rgb(191, 191, 191);
30
+ }
31
+
32
+ .ace-tm .ace_storage,
33
+ .ace-tm .ace_keyword {
34
+ color: blue;
35
+ }
36
+
37
+ .ace-tm .ace_constant {
38
+ color: rgb(197, 6, 11);
39
+ }
40
+
41
+ .ace-tm .ace_constant.ace_buildin {
42
+ color: rgb(88, 72, 246);
43
+ }
44
+
45
+ .ace-tm .ace_constant.ace_language {
46
+ color: rgb(88, 92, 246);
47
+ }
48
+
49
+ .ace-tm .ace_constant.ace_library {
50
+ color: rgb(6, 150, 14);
51
+ }
52
+
53
+ .ace-tm .ace_invalid {
54
+ background-color: rgba(255, 0, 0, 0.1);
55
+ color: red;
56
+ }
57
+
58
+ .ace-tm .ace_support.ace_function {
59
+ color: rgb(60, 76, 114);
60
+ }
61
+
62
+ .ace-tm .ace_support.ace_constant {
63
+ color: rgb(6, 150, 14);
64
+ }
65
+
66
+ .ace-tm .ace_support.ace_type,
67
+ .ace-tm .ace_support.ace_class {
68
+ color: rgb(109, 121, 222);
69
+ }
70
+
71
+ .ace-tm .ace_keyword.ace_operator {
72
+ color: rgb(104, 118, 135);
73
+ }
74
+
75
+ .ace-tm .ace_string {
76
+ color: rgb(3, 106, 7);
77
+ }
78
+
79
+ .ace-tm .ace_comment {
80
+ color: rgb(76, 136, 107);
81
+ }
82
+
83
+ .ace-tm .ace_comment.ace_doc {
84
+ color: rgb(0, 102, 255);
85
+ }
86
+
87
+ .ace-tm .ace_comment.ace_doc.ace_tag {
88
+ color: rgb(128, 159, 191);
89
+ }
90
+
91
+ .ace-tm .ace_constant.ace_numeric {
92
+ color: rgb(0, 0, 205);
93
+ }
94
+
95
+ .ace-tm .ace_variable {
96
+ color: rgb(49, 132, 149);
97
+ }
98
+
99
+ .ace-tm .ace_xml-pe {
100
+ color: rgb(104, 104, 91);
101
+ }
102
+
103
+ .ace-tm .ace_entity.ace_name.ace_function {
104
+ color: #0000A2;
105
+ }
106
+
107
+
108
+ .ace-tm .ace_heading {
109
+ color: rgb(12, 7, 255);
110
+ }
111
+
112
+ .ace-tm .ace_list {
113
+ color:rgb(185, 6, 144);
114
+ }
115
+
116
+ .ace-tm .ace_meta.ace_tag {
117
+ color:rgb(0, 22, 142);
118
+ }
119
+
120
+ .ace-tm .ace_string.ace_regex {
121
+ color: rgb(255, 0, 0)
122
+ }
123
+
124
+ .ace-tm .ace_marker-layer .ace_selection {
125
+ background: rgb(181, 213, 255);
126
+ }
127
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
128
+ box-shadow: 0 0 3px 0px white;
129
+ }
130
+ .ace-tm .ace_marker-layer .ace_step {
131
+ background: rgb(252, 255, 0);
132
+ }
133
+
134
+ .ace-tm .ace_marker-layer .ace_stack {
135
+ background: rgb(164, 229, 101);
136
+ }
137
+
138
+ .ace-tm .ace_marker-layer .ace_bracket {
139
+ margin: -1px 0 0 -1px;
140
+ border: 1px solid rgb(192, 192, 192);
141
+ }
142
+
143
+ .ace-tm .ace_marker-layer .ace_active-line {
144
+ background: rgba(0, 0, 0, 0.07);
145
+ }
146
+
147
+ .ace-tm .ace_gutter-active-line {
148
+ background-color : #dcdcdc;
149
+ }
150
+
151
+ .ace-tm .ace_marker-layer .ace_selected-word {
152
+ background: rgb(250, 250, 255);
153
+ border: 1px solid rgb(200, 200, 250);
154
+ }
155
+
156
+ .ace-tm .ace_indent-guide {
157
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
158
+ }
159
+
160
+ .ace-tm .ace_indent-guide-active {
161
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
162
+ }
163
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(u,g,E){g.isDark=!1,g.cssClass="ace-tm",g.cssText=u("./textmate-css"),g.$id="ace/theme/textmate";var y=u("../lib/dom");y.importCssString(g.cssText,g.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(u,g,E){"no use strict";var y=u("./lib/lang"),p=u("./lib/net"),v=u("./lib/dom"),s=u("./lib/app_config").AppConfig;E.exports=g=new s;var c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};g.get=function(i){if(!c.hasOwnProperty(i))throw new Error("Unknown config key: "+i);return c[i]},g.set=function(i,e){if(c.hasOwnProperty(i))c[i]=e;else if(this.setDefaultValue("",i,e)==!1)throw new Error("Unknown config key: "+i);i=="useStrictCSP"&&v.useStrictCSP(e)},g.all=function(){return y.copyObject(c)},g.$modes={},g.moduleUrl=function(i,e){if(c.$moduleUrls[i])return c.$moduleUrls[i];var t=i.split("/");e=e||t[t.length-2]||"";var a=e=="snippets"?"/":"-",d=t[t.length-1];if(e=="worker"&&a=="-"){var f=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");d=d.replace(f,"")}(!d||d==e)&&t.length>1&&(d=t[t.length-2]);var S=c[e+"Path"];return S==null?S=c.basePath:a=="/"&&(e=a=""),S&&S.slice(-1)!="/"&&(S+="/"),S+e+a+d+this.get("suffix")},g.setModuleUrl=function(i,e){return c.$moduleUrls[i]=e};var n=function(i,e){if(i==="ace/theme/textmate"||i==="./theme/textmate")return e(null,u("./theme/textmate"));if(o)return o(i,e);console.error("loader is not configured")},o;g.setLoader=function(i){o=i},g.dynamicModules=Object.create(null),g.$loading={},g.$loaded={},g.loadModule=function(i,e){var t;if(Array.isArray(i))var a=i[0],d=i[1];else if(typeof i=="string")var d=i;var f=function(S){if(S&&!g.$loading[d])return e&&e(S);if(g.$loading[d]||(g.$loading[d]=[]),g.$loading[d].push(e),!(g.$loading[d].length>1)){var $=function(){n(d,function(C,w){w&&(g.$loaded[d]=w),g._emit("load.module",{name:d,module:w});var M=g.$loading[d];g.$loading[d]=null,M.forEach(function(R){R&&R(w)})})};if(!g.get("packaged"))return $();p.loadScript(g.moduleUrl(d,a),$),r()}};if(g.dynamicModules[d])g.dynamicModules[d]().then(function(S){S.default?f(S.default):f(S)});else{try{t=this.$require(d)}catch{}f(t||g.$loaded[d])}},g.$require=function(i){if(typeof E.require=="function"){var e="require";return E[e](i)}},g.setModuleLoader=function(i,e){g.dynamicModules[i]=e};var r=function(){!c.basePath&&!c.workerPath&&!c.modePath&&!c.themePath&&!Object.keys(c.$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"),r=function(){})};g.version="1.44.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(u,g,E){u("./lib/fixoldbrowsers");var y=u("./config");y.setLoader(function(c,n){u([c],function(o){n(null,o)})});var p=(function(){return this||typeof window<"u"&&window})();E.exports=function(c){y.init=v,y.$require=u,c.require=u},v(!0);function v(c){if(!(!p||!p.document)){y.set("packaged",c||u.packaged||E.packaged||p.define&&(void 0).packaged);var n={},o="",r=document.currentScript||document._currentScript,i=r&&r.ownerDocument||document;r&&r.src&&(o=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=i.getElementsByTagName("script"),t=0;t<e.length;t++){var a=e[t],d=a.src||a.getAttribute("src");if(d){for(var f=a.attributes,S=0,$=f.length;S<$;S++){var C=f[S];C.name.indexOf("data-ace-")===0&&(n[s(C.name.replace(/^data-ace-/,""))]=C.value)}var w=d.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);w&&(o=w[1])}}o&&(n.base=n.base||o,n.packaged=!0),n.basePath=n.base,n.workerPath=n.workerPath||n.base,n.modePath=n.modePath||n.base,n.themePath=n.themePath||n.base,delete n.base;for(var M in n)typeof n[M]<"u"&&y.set(M,n[M])}}function s(c){return c.replace(/-(.)/g,function(n,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(u,g,E){var y=(function(){function p(v,s,c,n){this.start={row:v,column:s},this.end={row:c,column:n}}return p.prototype.isEqual=function(v){return this.start.row===v.start.row&&this.end.row===v.end.row&&this.start.column===v.start.column&&this.end.column===v.end.column},p.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},p.prototype.contains=function(v,s){return this.compare(v,s)==0},p.prototype.compareRange=function(v){var s,c=v.end,n=v.start;return s=this.compare(c.row,c.column),s==1?(s=this.compare(n.row,n.column),s==1?2:s==0?1:0):s==-1?-2:(s=this.compare(n.row,n.column),s==-1?-1:s==1?42:0)},p.prototype.comparePoint=function(v){return this.compare(v.row,v.column)},p.prototype.containsRange=function(v){return this.comparePoint(v.start)==0&&this.comparePoint(v.end)==0},p.prototype.intersects=function(v){var s=this.compareRange(v);return s==-1||s==0||s==1},p.prototype.isEnd=function(v,s){return this.end.row==v&&this.end.column==s},p.prototype.isStart=function(v,s){return this.start.row==v&&this.start.column==s},p.prototype.setStart=function(v,s){typeof v=="object"?(this.start.column=v.column,this.start.row=v.row):(this.start.row=v,this.start.column=s)},p.prototype.setEnd=function(v,s){typeof v=="object"?(this.end.column=v.column,this.end.row=v.row):(this.end.row=v,this.end.column=s)},p.prototype.inside=function(v,s){return this.compare(v,s)==0?!(this.isEnd(v,s)||this.isStart(v,s)):!1},p.prototype.insideStart=function(v,s){return this.compare(v,s)==0?!this.isEnd(v,s):!1},p.prototype.insideEnd=function(v,s){return this.compare(v,s)==0?!this.isStart(v,s):!1},p.prototype.compare=function(v,s){return!this.isMultiLine()&&v===this.start.row?s<this.start.column?-1:s>this.end.column?1:0:v<this.start.row?-1:v>this.end.row?1:this.start.row===v?s>=this.start.column?0:-1:this.end.row===v?s<=this.end.column?0:1:0},p.prototype.compareStart=function(v,s){return this.start.row==v&&this.start.column==s?-1:this.compare(v,s)},p.prototype.compareEnd=function(v,s){return this.end.row==v&&this.end.column==s?1:this.compare(v,s)},p.prototype.compareInside=function(v,s){return this.end.row==v&&this.end.column==s?1:this.start.row==v&&this.start.column==s?-1:this.compare(v,s)},p.prototype.clipRows=function(v,s){if(this.end.row>s)var c={row:s+1,column:0};else if(this.end.row<v)var c={row:v,column:0};if(this.start.row>s)var n={row:s+1,column:0};else if(this.start.row<v)var n={row:v,column:0};return p.fromPoints(n||this.start,c||this.end)},p.prototype.extend=function(v,s){var c=this.compare(v,s);if(c==0)return this;if(c==-1)var n={row:v,column:s};else var o={row:v,column:s};return p.fromPoints(n||this.start,o||this.end)},p.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},p.prototype.isMultiLine=function(){return this.start.row!==this.end.row},p.prototype.clone=function(){return p.fromPoints(this.start,this.end)},p.prototype.collapseRows=function(){return this.end.column==0?new p(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new p(this.start.row,0,this.end.row,0)},p.prototype.toScreenRange=function(v){var s=v.documentToScreenPosition(this.start),c=v.documentToScreenPosition(this.end);return new p(s.row,s.column,c.row,c.column)},p.prototype.moveBy=function(v,s){this.start.row+=v,this.start.column+=s,this.end.row+=v,this.end.column+=s},p})();y.fromPoints=function(p,v){return new y(p.row,p.column,v.row,v.column)},y.comparePoints=function(p,v){return p.row-v.row||p.column-v.column},g.Range=y}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(u,g,E){for(var y=u("./oop"),p={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:"*"}},v={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},s=0;s<10;s++)v["Digit"+s]=48+s,v["Numpad"+s]=96+s,p.PRINTABLE_KEYS[48+s]=""+s,p.FUNCTION_KEYS[96+s]="Numpad"+s;for(var s=65;s<91;s++){var c=String.fromCharCode(s+32);v["Key"+c.toUpperCase()]=s,p.PRINTABLE_KEYS[s]=c}for(var s=1;s<13;s++)v["F"+s]=111+s,p.FUNCTION_KEYS[111+s]="F"+s;var n={Shift:16,Control:17,Alt:18,Meta:224};for(var o in n)v[o]=v[o+"Left"]=v[o+"Right"]=n[o];g.$codeToKeyCode=v,p.PRINTABLE_KEYS[173]="-";for(var r in p.FUNCTION_KEYS){var i=p.FUNCTION_KEYS[r].toLowerCase();p[i]=parseInt(r,10)}for(var r in p.PRINTABLE_KEYS){var i=p.PRINTABLE_KEYS[r].toLowerCase();p[i]=parseInt(r,10)}y.mixin(p,p.MODIFIER_KEYS),y.mixin(p,p.PRINTABLE_KEYS),y.mixin(p,p.FUNCTION_KEYS),p.enter=p.return,p.escape=p.esc,p.del=p.delete,(function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)p.KEY_MODS[t]=e.filter(function(a){return t&p.KEY_MODS[a]}).join("-")+"-"})(),p.KEY_MODS[0]="",p.KEY_MODS[-1]="input-",y.mixin(g,p),g.default=g,g.keyCodeToString=function(e){var t=p[e];return typeof t!="string"&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(u,g,E){var y=u("./keys"),p=u("./useragent"),v=null,s=0,c;function n(){c=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return c={passive:!1},!0}})}catch{}}function o(){return c==null&&n(),c}function r(S,$,C){this.elem=S,this.type=$,this.callback=C}r.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var i=g.addListener=function(S,$,C,w){S.addEventListener($,C,o()),w&&w.$toDestroy.push(new r(S,$,C))},e=g.removeListener=function(S,$,C){S.removeEventListener($,C,o())};g.stopEvent=function(S){return g.stopPropagation(S),g.preventDefault(S),!1},g.stopPropagation=function(S){S.stopPropagation&&S.stopPropagation()},g.preventDefault=function(S){S.preventDefault&&S.preventDefault()},g.getButton=function(S){return S.type=="dblclick"?0:S.type=="contextmenu"||p.isMac&&S.ctrlKey&&!S.altKey&&!S.shiftKey?2:S.button},g.capture=function(S,$,C){var w=S&&S.ownerDocument||document;function M(R){$&&$(R),C&&C(R),e(w,"mousemove",$),e(w,"mouseup",M),e(w,"dragstart",M)}return i(w,"mousemove",$),i(w,"mouseup",M),i(w,"dragstart",M),M},g.addMouseWheelListener=function(S,$,C){i(S,"wheel",function(w){var M=.15,R=w.deltaX||0,T=w.deltaY||0;switch(w.deltaMode){case w.DOM_DELTA_PIXEL:w.wheelX=R*M,w.wheelY=T*M;break;case w.DOM_DELTA_LINE:var k=15;w.wheelX=R*k,w.wheelY=T*k;break;case w.DOM_DELTA_PAGE:var O=150;w.wheelX=R*O,w.wheelY=T*O;break}$(w)},C)},g.addMultiMouseDownListener=function(S,$,C,w,M){var R=0,T,k,O,A={2:"dblclick",3:"tripleclick",4:"quadclick"};function x(b){if(g.getButton(b)!==0?R=0:b.detail>1?(R++,R>4&&(R=1)):R=1,p.isIE){var m=Math.abs(b.clientX-T)>5||Math.abs(b.clientY-k)>5;(!O||m)&&(R=1),O&&clearTimeout(O),O=setTimeout(function(){O=null},$[R-1]||600),R==1&&(T=b.clientX,k=b.clientY)}if(b._clicks=R,C[w]("mousedown",b),R>4)R=0;else if(R>1)return C[w](A[R],b)}Array.isArray(S)||(S=[S]),S.forEach(function(b){i(b,"mousedown",x,M)})};function t(S){return 0|(S.ctrlKey?1:0)|(S.altKey?2:0)|(S.shiftKey?4:0)|(S.metaKey?8:0)}g.getModifierString=function(S){return y.KEY_MODS[t(S)]};function a(S,$,C){var w=t($);if(!C&&$.code&&(C=y.$codeToKeyCode[$.code]||C),!p.isMac&&v){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(w|=8),v.altGr)if((3&w)!=3)v.altGr=0;else return;if(C===18||C===17){var M=$.location;if(C===17&&M===1)v[C]==1&&(s=$.timeStamp);else if(C===18&&w===3&&M===2){var R=$.timeStamp-s;R<50&&(v.altGr=!0)}}}if(C in y.MODIFIER_KEYS&&(C=-1),!(!w&&C===13&&$.location===3&&(S($,w,-C),$.defaultPrevented))){if(p.isChromeOS&&w&8){if(S($,w,C),$.defaultPrevented)return;w&=-9}return!w&&!(C in y.FUNCTION_KEYS)&&!(C in y.PRINTABLE_KEYS)?!1:S($,w,C)}}g.addCommandKeyListener=function(S,$,C){var w=null;i(S,"keydown",function(M){v[M.keyCode]=(v[M.keyCode]||0)+1;var R=a($,M,M.keyCode);return w=M.defaultPrevented,R},C),i(S,"keypress",function(M){w&&(M.ctrlKey||M.altKey||M.shiftKey||M.metaKey)&&(g.stopEvent(M),w=null)},C),i(S,"keyup",function(M){v[M.keyCode]=null},C),v||(d(),i(window,"focus",d))};function d(){v=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!p.isOldIE){var f=1;g.nextTick=function(S,$){$=$||window;var C="zero-timeout-message-"+f++,w=function(M){M.data==C&&(g.stopPropagation(M),e($,"message",w),S())};i($,"message",w),$.postMessage(C,"*")}}g.$idleBlocked=!1,g.onIdle=function(S,$){return setTimeout(function C(){g.$idleBlocked?setTimeout(C,100):S()},$)},g.$idleBlockId=null,g.blockIdle=function(S){g.$idleBlockId&&clearTimeout(g.$idleBlockId),g.$idleBlocked=!0,g.$idleBlockId=setTimeout(function(){g.$idleBlocked=!1},S||100)},g.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),g.nextFrame?g.nextFrame=g.nextFrame.bind(window):g.nextFrame=function(S){setTimeout(S,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(u,g,E){var y;E.exports={lineMode:!1,pasteCancelled:function(){return y&&y>Date.now()-50?!0:y=!1},cancel:function(){y=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(u,g,E){var y=u("../lib/event"),p=u("../config").nls,v=u("../lib/useragent"),s=u("../lib/dom"),c=u("../lib/lang"),n=u("../clipboard"),o=v.isChrome<18,r=v.isIE,i=v.isChrome>63,e=400,t=u("../lib/keys"),a=t.KEY_MODS,d=v.isIOS,f=d?/\s/:/\n/,S=v.isMobile,$=(function(){function C(w,M){var R=this;this.host=M,this.text=s.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="",S||(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"}),y.addListener(this.text,"blur",function(T){R.ignoreFocusEvents||(M.onBlur(T),R.$isFocused=!1)},M),y.addListener(this.text,"focus",function(T){if(!R.ignoreFocusEvents){if(R.$isFocused=!0,v.isEdge)try{if(!document.hasFocus())return}catch{}M.onFocus(T),v.isEdge?setTimeout(R.resetSelection.bind(R)):R.resetSelection()}},M),this.$focusScroll=!1,M.on("beforeEndOperation",function(){var T=M.curOp,k=T&&T.command&&T.command.name;if(k!="insertstring"){var O=k&&(T.docChanged||T.selectionChanged);R.inComposition&&O&&(R.lastValue=R.text.value="",R.onCompositionEnd()),R.resetSelection()}}),M.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=d?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&M.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,y.addCommandKeyListener(this.text,function(T,k,O){if(!R.inComposition)return M.onCommandKey(T,k,O)},M),y.addListener(this.text,"select",this.onSelect.bind(this),M),y.addListener(this.text,"input",this.onInput.bind(this),M),y.addListener(this.text,"cut",this.onCut.bind(this),M),y.addListener(this.text,"copy",this.onCopy.bind(this),M),y.addListener(this.text,"paste",this.onPaste.bind(this),M),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&y.addListener(w,"keydown",function(T){if(!(v.isMac&&!T.metaKey||!T.ctrlKey))switch(T.keyCode){case 67:R.onCopy(T);break;case 86:R.onPaste(T);break;case 88:R.onCut(T);break}},M),this.syncComposition=c.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),y.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),M),y.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),M),y.addListener(this.text,"keyup",this.onKeyup.bind(this),M),y.addListener(this.text,"keydown",this.syncComposition.bind(this),M),y.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),M),this.closeTimeout,y.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),M),y.addListener(this.text,"mousedown",function(T){T.preventDefault(),R.onContextMenuClose()},M),y.addListener(M.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),M),y.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),M),d&&this.addIosSelectionHandler(w,M,this.text)}return C.prototype.addIosSelectionHandler=function(w,M,R){var T=this,k=null,O=!1;R.addEventListener("keydown",function(x){k&&clearTimeout(k),O=!0},!0),R.addEventListener("keyup",function(x){k=setTimeout(function(){O=!1},100)},!0);var A=function(x){if(document.activeElement===R&&!(O||T.inComposition||M.$mouseHandler.isMousePressed)&&!T.copied){var b=R.selectionStart,m=R.selectionEnd,_=null,L=0;if(b==0?_=t.up:b==1?_=t.home:m>T.lastSelectionEnd&&T.lastValue[m]==`
164
+ `?_=t.end:b<T.lastSelectionStart&&T.lastValue[b-1]==" "?(_=t.left,L=a.option):b<T.lastSelectionStart||b==T.lastSelectionStart&&T.lastSelectionEnd!=T.lastSelectionStart&&b==m?_=t.left:m>T.lastSelectionEnd&&T.lastValue.slice(0,m).split(`
165
+ `).length>2?_=t.down:m>T.lastSelectionEnd&&T.lastValue[m-1]==" "?(_=t.right,L=a.option):(m>T.lastSelectionEnd||m==T.lastSelectionEnd&&T.lastSelectionEnd!=T.lastSelectionStart&&b==m)&&(_=t.right),b!==m&&(L|=a.shift),_){var I=M.onCommandKey({},L,_);if(!I&&M.commands){_=t.keyCodeToString(_);var D=M.commands.findKeyCommand(L,_);D&&M.execCommand(D)}T.lastSelectionStart=b,T.lastSelectionEnd=m,T.resetSelection("")}}};document.addEventListener("selectionchange",A),M.on("destroy",function(){document.removeEventListener("selectionchange",A)})},C.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)},C.prototype.$onContextMenu=function(w){this.host.textInput.onContextMenu(w),this.onContextMenuClose()},C.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()},C.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},C.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 M=this.host.getSelectionRange();M.end.row=M.start.row,M.end.column=M.start.column,this.inComposition.markerRange=M,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()))}},C.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)}}},C.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())},C.prototype.onCut=function(w){this.doCopy(w,!0)},C.prototype.onCopy=function(w){this.doCopy(w,!1)},C.prototype.onPaste=function(w){var M=this.handleClipboardData(w);n.pasteCancelled()||(typeof M=="string"?(M&&this.host.onPaste(M,w),v.isIE&&setTimeout(this.resetSelection),y.preventDefault(w)):(this.text.value="",this.pasted=!0))},C.prototype.doCopy=function(w,M){var R=this,T=this.host.getCopyText();if(!T)return y.preventDefault(w);this.handleClipboardData(w,T)?(d&&(this.resetSelection(T),this.copied=T,setTimeout(function(){R.copied=!1},10)),M?this.host.onCut():this.host.onCopy(),y.preventDefault(w)):(this.copied=!0,this.text.value=T,this.text.select(),setTimeout(function(){R.copied=!1,R.resetSelection(),M?R.host.onCut():R.host.onCopy()}))},C.prototype.handleClipboardData=function(w,M,R){var T=w.clipboardData||window.clipboardData;if(!(!T||o)){var k=r||R?"Text":"text/plain";try{return M?T.setData(k,M)!==!1:T.getData(k)}catch(O){if(!R)return this.handleClipboardData(O,M,!0)}}},C.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 M=this.text.value,R=this.sendText(M,!0);(M.length>e+100||f.test(R)||S&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},C.prototype.sendText=function(w,M){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),w&&this.host.onPaste(w),this.pasted=!1,"";for(var R=this.text.selectionStart,T=this.text.selectionEnd,k=this.lastSelectionStart,O=this.lastValue.length-this.lastSelectionEnd,A=w,x=w.length-R,b=w.length-T,m=0;k>0&&this.lastValue[m]==w[m];)m++,k--;for(A=A.slice(m),m=1;O>0&&this.lastValue.length-m>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-m]==w[w.length-m];)m++,O--;x-=m-1,b-=m-1;var _=A.length-m+1;if(_<0&&(k=-_,_=0),A=A.slice(0,_),!M&&!A&&!x&&!k&&!O&&!b)return"";this.sendingText=!0;var L=!1;return v.isAndroid&&A==". "&&(A=" ",L=!0),A&&!k&&!O&&!x&&!b||this.commandMode?this.host.onTextInput(A):this.host.onTextInput(A,{extendLeft:k,extendRight:O,restoreStart:x,restoreEnd:b}),this.sendingText=!1,this.lastValue=w,this.lastSelectionStart=R,this.lastSelectionEnd=T,this.lastRestoreEnd=b,L?`
166
+ `:A},C.prototype.onSelect=function(w){var M=this;if(!this.inComposition){var R=function(T){return T.selectionStart===0&&T.selectionEnd>=M.lastValue.length&&T.value===M.lastValue&&M.lastValue&&T.selectionEnd!==M.lastSelectionEnd};this.copied?this.copied=!1:R(this.text)?(this.host.selectAll(),this.resetSelection()):S&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},C.prototype.$resetSelectionIOS=function(w){if(!(!this.$isFocused||this.copied&&!w||this.sendingText)){w||(w="");var M=`
167
+ ab`+w+`cde fg
168
+ `;M!=this.text.value&&(this.text.value=this.lastValue=M);var R=4,T=4+(w.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=R||this.lastSelectionEnd!=T)&&this.text.setSelectionRange(R,T),this.lastSelectionStart=R,this.lastSelectionEnd=T}},C.prototype.$resetSelection=function(){var w=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var M=0,R=0,T="",k=function(D,N){for(var F=N,U=1;U<=D-w.rowStart&&U<2*w.numberOfExtraLines+1;U++)F+=w.host.session.getLine(D-U).length+1;return F};if(this.host.session){var O=this.host.selection,A=O.getRange(),x=O.cursor.row;x===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):x===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(x<this.rowStart-1||x>this.rowEnd+1)&&(this.rowStart=x>this.numberOfExtraLines?x-this.numberOfExtraLines:0,this.rowEnd=x>this.numberOfExtraLines?x+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var b=[],m=this.rowStart;m<=this.rowEnd;m++)b.push(this.host.session.getLine(m));if(T=b.join(`
169
+ `),M=k(A.start.row,A.start.column),R=k(A.end.row,A.end.column),A.start.row<this.rowStart){var _=this.host.session.getLine(this.rowStart-1);M=A.start.row<this.rowStart-1?0:M,R+=_.length+1,T=_+`
170
+ `+T}else if(A.end.row>this.rowEnd){var L=this.host.session.getLine(this.rowEnd+1);R=A.end.row>this.rowEnd+1?L.length:A.end.column,R+=T.length+1,T=T+`
171
+ `+L}else S&&x>0&&(T=`
172
+ `+T,R+=1,M+=1);T.length>e&&(M<e&&R<e?T=T.slice(0,e):(T=`
173
+ `,M==R?M=R=0:(M=0,R=1)));var I=T+`
174
+
175
+ `;I!=this.lastValue&&(this.text.value=this.lastValue=I,this.lastSelectionStart=this.lastSelectionEnd=I.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=R||this.lastSelectionStart!=M||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(M,R),this.lastSelectionStart=M,this.lastSelectionEnd=R}catch{}this.inComposition=!1}},C.prototype.setHost=function(w){this.host=w},C.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},C.prototype.setAriaLabel=function(){var w="";if(this.host.$textInputAriaLabel&&(w+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var M=this.host.session.selection.cursor.row;w+=p("text-input.aria-label","Cursor at row $0",[M+1])}this.text.setAttribute("aria-label",w)},C.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",p("text-input.aria-roledescription","editor")),this.setAriaLabel())},C.prototype.focus=function(){var w=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||i||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var M=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var R=this.text.getBoundingClientRect().top!=0}catch{return}var T=[];if(R)for(var k=this.text.parentElement;k&&k.nodeType==1;)T.push(k),k.setAttribute("ace_nocontext","true"),!k.parentElement&&k.getRootNode?k=k.getRootNode().host:k=k.parentElement;this.text.focus({preventScroll:!0}),R&&T.forEach(function(O){O.removeAttribute("ace_nocontext")}),setTimeout(function(){w.text.style.position="",w.text.style.top=="0px"&&(w.text.style.top=M)},0)},C.prototype.blur=function(){this.text.blur()},C.prototype.isFocused=function(){return this.$isFocused},C.prototype.setInputHandler=function(w){this.inputHandler=w},C.prototype.getInputHandler=function(){return this.inputHandler},C.prototype.getElement=function(){return this.text},C.prototype.setCommandMode=function(w){this.commandMode=w,this.text.readOnly=!1},C.prototype.setReadOnly=function(w){this.commandMode||(this.text.readOnly=w)},C.prototype.setCopyWithEmptySelection=function(w){},C.prototype.onContextMenu=function(w){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:w}),this.moveToMouse(w,!0)},C.prototype.moveToMouse=function(w,M){var R=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(M?"z-index:100000;":"")+(v.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var T=this.host.container.getBoundingClientRect(),k=s.computedStyle(this.host.container),O=T.top+(parseInt(k.borderTopWidth)||0),A=T.left+(parseInt(k.borderLeftWidth)||0),x=T.bottom-O-this.text.clientHeight-2,b=function(m){s.translate(R.text,m.clientX-A-2,Math.min(m.clientY-O-2,x))};b(w),w.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),v.isWin&&y.capture(this.host.container,b,this.onContextMenuClose.bind(this)))},C.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},C})();g.TextInput=$,g.$setUserAgentForTests=function(C,w){S=C,d=w}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(u,g,E){var y=u("../lib/useragent"),p=0,v=550,s=(function(){function o(r){r.$clickSelection=null;var i=r.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(r)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(r)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(r)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(r)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(r));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(t){r[t]=this[t]},this),r.selectByLines=this.extendSelectionBy.bind(r,"getLineRange"),r.selectByWords=this.extendSelectionBy.bind(r,"getWordRange")}return o.prototype.onMouseDown=function(r){var i=r.inSelection(),e=r.getDocumentPosition();this.mousedownEvent=r;var t=this.editor,a=r.getButton();if(a!==0){var d=t.getSelectionRange(),f=d.isEmpty();(f||a==1)&&t.selection.moveToPosition(e),a==2&&(t.textInput.onContextMenu(r.domEvent),y.isMozilla||r.preventDefault());return}if(this.mousedownEvent.time=Date.now(),i&&!t.isFocused()&&(t.focus(),this.$focusTimeout&&!this.$clickSelection&&!t.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(r);return}return this.captureMouse(r),this.startSelect(e,r.domEvent._clicks>1),r.preventDefault()},o.prototype.startSelect=function(r,i){r=r||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(r):i||e.selection.moveToPosition(r),i||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var r,i=this.editor,e=i.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var t=this.$clickSelection.comparePoint(e);if(t==-1)r=this.$clickSelection.end;else if(t==1)r=this.$clickSelection.start;else{var a=n(this.$clickSelection,e,i.session);e=a.cursor,r=a.anchor}i.selection.setSelectionAnchor(r.row,r.column)}i.selection.selectToPosition(e),i.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(r){var i,e=this.editor,t=e.renderer.screenToTextCoordinates(this.x,this.y),a=e.selection[r](t.row,t.column);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(a.start),f=this.$clickSelection.comparePoint(a.end);if(d==-1&&f<=0)i=this.$clickSelection.end,(a.end.row!=t.row||a.end.column!=t.column)&&(t=a.start);else if(f==1&&d>=0)i=this.$clickSelection.start,(a.start.row!=t.row||a.start.column!=t.column)&&(t=a.end);else if(d==-1&&f==1)t=a.end,i=a.start;else{var S=n(this.$clickSelection,t,e.session);t=S.cursor,i=S.anchor}e.selection.setSelectionAnchor(i.row,i.column)}e.selection.selectToPosition(t),e.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var r=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),i=Date.now();(r>p||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(r){var i=r.getDocumentPosition(),e=this.editor,t=e.session,a=t.getBracketRange(i);a?(a.isEmpty()&&(a.start.column--,a.end.column++),this.setState("select")):(a=e.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=a,this.select()},o.prototype.onTripleClick=function(r){var i=r.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var t=e.getSelectionRange();t.isMultiLine()&&t.contains(i.row,i.column)?(this.$clickSelection=e.selection.getLineRange(t.start.row),this.$clickSelection.end=e.selection.getLineRange(t.end.row).end):this.$clickSelection=e.selection.getLineRange(i.row),this.select()},o.prototype.onQuadClick=function(r){var i=this.editor;i.selectAll(),this.$clickSelection=i.getSelectionRange(),this.setState("selectAll")},o.prototype.onMouseWheel=function(r){if(!r.getAccelKey()){r.getShiftKey()&&r.wheelY&&!r.wheelX&&(r.wheelX=r.wheelY,r.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,t=r.domEvent.timeStamp,a=t-e.t,d=a?r.wheelX/a:e.vx,f=a?r.wheelY/a:e.vy;a<v&&(d=(d+e.vx)/2,f=(f+e.vy)/2);var S=Math.abs(d/f),$=!1;if(S>=1&&i.renderer.isScrollableBy(r.wheelX*r.speed,0)&&($=!0),S<=1&&i.renderer.isScrollableBy(0,r.wheelY*r.speed)&&($=!0),$)e.allowed=t;else if(t-e.allowed<v){var C=Math.abs(d)<=1.5*Math.abs(e.vx)&&Math.abs(f)<=1.5*Math.abs(e.vy);C?($=!0,e.allowed=t):e.allowed=0}if(e.t=t,e.vx=d,e.vy=f,$)return i.renderer.scrollBy(r.wheelX*r.speed,r.wheelY*r.speed),r.stop()}},o})();s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,g.DefaultHandlers=s;function c(o,r,i,e){return Math.sqrt(Math.pow(i-o,2)+Math.pow(e-r,2))}function n(o,r,i){if(o.start.row==o.end.row)var e=2*r.column-o.start.column-o.end.column;else if(o.start.row==o.end.row-1&&!o.start.column&&!o.end.column)var e=3*r.column-2*i.getLine(o.start.row).length;else var e=2*r.row-o.start.row-o.end.row;return e<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(u,g,E){var y=u("../lib/event"),p=u("../lib/useragent"),v=(function(){function s(c,n){this.speed,this.wheelX,this.wheelY,this.domEvent=c,this.editor=n,this.x=this.clientX=c.clientX,this.y=this.clientY=c.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return s.prototype.stopPropagation=function(){y.stopPropagation(this.domEvent),this.propagationStopped=!0},s.prototype.preventDefault=function(){y.preventDefault(this.domEvent),this.defaultPrevented=!0},s.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},s.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},s.prototype.getGutterRow=function(){var c=this.getDocumentPosition().row,n=this.editor.session.documentToScreenRow(c,0),o=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return n-o},s.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var c=this.editor,n=c.getSelectionRange();if(n.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=n.contains(o.row,o.column)}return this.$inSelection},s.prototype.getButton=function(){return y.getButton(this.domEvent)},s.prototype.getShiftKey=function(){return this.domEvent.shiftKey},s.prototype.getAccelKey=function(){return p.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},s})();g.MouseEvent=v}),ace.define("ace/lib/scroll",["require","exports","module"],function(u,g,E){g.preventParentScroll=function(p){p.stopPropagation();var v=p.currentTarget,s=v.scrollHeight>v.clientHeight;s||p.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(u,g,E){var y=this&&this.__extends||(function(){var t=function(a,d){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,S){f.__proto__=S}||function(f,S){for(var $ in S)Object.prototype.hasOwnProperty.call(S,$)&&(f[$]=S[$])},t(a,d)};return function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");t(a,d);function f(){this.constructor=a}a.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})(),p=this&&this.__values||function(t){var a=typeof Symbol=="function"&&Symbol.iterator,d=a&&t[a],f=0;if(d)return d.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&f>=t.length&&(t=void 0),{value:t&&t[f++],done:!t}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},v=u("./lib/dom");u("./lib/event");var s=u("./range").Range,c=u("./lib/scroll").preventParentScroll,n="ace_tooltip",o=(function(){function t(a){this.isOpen=!1,this.$element=null,this.$parentNode=a}return t.prototype.$init=function(){return this.$element=v.createElement("div"),this.$element.className=n,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},t.prototype.getElement=function(){return this.$element||this.$init()},t.prototype.setText=function(a){this.getElement().textContent=a},t.prototype.setHtml=function(a){this.getElement().innerHTML=a},t.prototype.setPosition=function(a,d){this.getElement().style.left=a+"px",this.getElement().style.top=d+"px"},t.prototype.setClassName=function(a){v.addCssClass(this.getElement(),a)},t.prototype.setTheme=function(a){this.theme&&(this.theme.isDark&&v.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&v.removeCssClass(this.getElement(),this.theme.cssClass)),a.isDark&&v.addCssClass(this.getElement(),"ace_dark"),a.cssClass&&v.addCssClass(this.getElement(),a.cssClass),this.theme={isDark:a.isDark,cssClass:a.cssClass}},t.prototype.show=function(a,d,f){a!=null&&this.setText(a),d!=null&&f!=null&&this.setPosition(d,f),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},t.prototype.hide=function(a){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=n,this.isOpen=!1)},t.prototype.getHeight=function(){return this.getElement().offsetHeight},t.prototype.getWidth=function(){return this.getElement().offsetWidth},t.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},t})(),r=(function(){function t(){this.popups=[]}return t.prototype.addPopup=function(a){this.popups.push(a),this.updatePopups()},t.prototype.removePopup=function(a){var d=this.popups.indexOf(a);d!==-1&&(this.popups.splice(d,1),this.updatePopups())},t.prototype.updatePopups=function(){var a,d,f,S;this.popups.sort(function(A,x){return x.priority-A.priority});var $=[];try{for(var C=p(this.popups),w=C.next();!w.done;w=C.next()){var M=w.value,R=!0;try{for(var T=(f=void 0,p($)),k=T.next();!k.done;k=T.next()){var O=k.value;if(this.doPopupsOverlap(O,M)){R=!1;break}}}catch(A){f={error:A}}finally{try{k&&!k.done&&(S=T.return)&&S.call(T)}finally{if(f)throw f.error}}R?$.push(M):M.hide()}}catch(A){a={error:A}}finally{try{w&&!w.done&&(d=C.return)&&d.call(C)}finally{if(a)throw a.error}}},t.prototype.doPopupsOverlap=function(a,d){var f=a.getElement().getBoundingClientRect(),S=d.getElement().getBoundingClientRect();return f.left<S.right&&f.right>S.left&&f.top<S.bottom&&f.bottom>S.top},t})(),i=new r;g.popupManager=i,g.Tooltip=o;var e=(function(t){y(a,t);function a(d){d===void 0&&(d=document.body);var f=t.call(this,d)||this;f.timeout=void 0,f.lastT=0,f.idleTime=350,f.lastEvent=void 0,f.onMouseOut=f.onMouseOut.bind(f),f.onMouseMove=f.onMouseMove.bind(f),f.waitForHover=f.waitForHover.bind(f),f.hide=f.hide.bind(f);var S=f.getElement();return S.style.whiteSpace="pre-wrap",S.style.pointerEvents="auto",S.addEventListener("mouseout",f.onMouseOut),S.tabIndex=-1,S.addEventListener("blur",(function(){S.contains(document.activeElement)||this.hide()}).bind(f)),S.addEventListener("wheel",c),f}return a.prototype.addToEditor=function(d){d.on("mousemove",this.onMouseMove),d.on("mousedown",this.hide);var f=d.renderer.getMouseEventTarget();f&&typeof f.removeEventListener=="function"&&f.addEventListener("mouseout",this.onMouseOut,!0)},a.prototype.removeFromEditor=function(d){d.off("mousemove",this.onMouseMove),d.off("mousedown",this.hide);var f=d.renderer.getMouseEventTarget();f&&typeof f.removeEventListener=="function"&&f.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},a.prototype.onMouseMove=function(d,f){this.lastEvent=d,this.lastT=Date.now();var S=f.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||S||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||S||(this.lastEvent=d,this.timeout=setTimeout(this.waitForHover,this.idleTime))},a.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var d=Date.now()-this.lastT;if(this.idleTime-d>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-d);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},a.prototype.isOutsideOfText=function(d){var f=d.editor,S=d.getDocumentPosition(),$=f.session.getLine(S.row);if(S.column==$.length){var C=f.renderer.pixelToScreenCoordinates(d.clientX,d.clientY),w=f.session.documentToScreenPosition(S.row,S.column);if(w.column!=C.column||w.row!=C.row)return!0}return!1},a.prototype.setDataProvider=function(d){this.$gatherData=d},a.prototype.showForRange=function(d,f,S,$){if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=d.renderer;this.isOpen||(i.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.range=s.fromPoints(f.start,f.end);var w=C.textToScreenCoordinates(f.start.row,f.start.column),M=C.scroller.getBoundingClientRect();w.pageX<M.left&&(w.pageX=M.left);var R=this.getElement();R.innerHTML="",R.appendChild(S),R.style.maxHeight="",R.style.display="block",this.$setPosition(d,w,!0,f),v.$fixPositionBug(R)}},a.prototype.$setPosition=function(d,f,S,$){var C=10;S&&this.addMarker($,d.session);var w=d.renderer,M=this.getElement(),R=M.offsetHeight,T=M.offsetWidth,k=f.pageY,O=f.pageX,A=window.innerHeight-k-w.lineHeight,x=this.$shouldPlaceAbove(R,k,A-C);M.style.maxHeight=(x?k:A)-C+"px",M.style.top=x?"":k+w.lineHeight+"px",M.style.bottom=x?window.innerHeight-k+"px":"",M.style.left=Math.min(O,window.innerWidth-T-C)+"px"},a.prototype.$shouldPlaceAbove=function(d,f,S){return!(f-d<0&&f<S)},a.prototype.addMarker=function(d,f){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=f,this.marker=f&&f.addMarker(d,"ace_highlight-marker","text")},a.prototype.hide=function(d){d&&this.$fromKeyboard&&d.type=="keydown"&&d.code=="Escape"||!d&&document.activeElement==this.getElement()||d&&d.target&&(d.type!="keydown"||d.ctrlKey||d.metaKey)&&this.$element.contains(d.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,i.removePopup(this)))},a.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},a.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},a.prototype.onMouseOut=function(d){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!d.relatedTarget||this.getElement().contains(d.relatedTarget)||d&&d.currentTarget.contains(d.relatedTarget)||d.relatedTarget.classList.contains("ace_content")||this.hide())},a})(o);g.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(u,g,E){var y=this&&this.__extends||(function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var S in f)Object.prototype.hasOwnProperty.call(f,S)&&(d[S]=f[S])},e(t,a)};return function(t,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(t,a);function d(){this.constructor=t}t.prototype=a===null?Object.create(a):(d.prototype=a.prototype,new d)}})(),p=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,a=t&&e[t],d=0;if(a)return a.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&d>=e.length&&(e=void 0),{value:e&&e[d++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},v=u("../lib/dom"),s=u("./mouse_event").MouseEvent,c=u("../tooltip").HoverTooltip,n=u("../config").nls,o=u("../range").Range;function r(e){var t=e.editor,a=t.renderer.$gutterLayer;e.$tooltip=new i(t),e.$tooltip.addToEditor(t),e.$tooltip.setDataProvider(function(d,f){var S=d.getDocumentPosition().row;e.$tooltip.showTooltip(S)}),e.editor.setDefaultHandler("guttermousedown",function(d){if(!(!t.isFocused()||d.getButton()!=0)){var f=a.getRegion(d);if(f!="foldWidgets"){var S=d.getDocumentPosition().row,$=t.session.selection;if(d.getShiftKey())$.selectTo(S,0);else{if(d.domEvent.detail==2)return t.selectAll(),d.preventDefault();e.$clickSelection=t.selection.getLineRange(S)}return e.setState("selectByLines"),e.captureMouse(d),d.preventDefault()}}})}g.GutterHandler=r;var i=(function(e){y(t,e);function t(a){var d=e.call(this,a.container)||this;d.id="gt"+ ++t.$uid,d.editor=a,d.visibleTooltipRow;var f=d.getElement();return f.setAttribute("role","tooltip"),f.setAttribute("id",d.id),f.style.pointerEvents="auto",d.idleTime=50,d.onDomMouseMove=d.onDomMouseMove.bind(d),d.onDomMouseOut=d.onDomMouseOut.bind(d),d.setClassName("ace_gutter-tooltip"),d}return t.prototype.onDomMouseMove=function(a){var d=new s(a,this.editor);this.onMouseMove(d,this.editor)},t.prototype.onDomMouseOut=function(a){var d=new s(a,this.editor);this.onMouseOut(d)},t.prototype.addToEditor=function(a){var d=a.renderer.$gutter;d.addEventListener("mousemove",this.onDomMouseMove),d.addEventListener("mouseout",this.onDomMouseOut),e.prototype.addToEditor.call(this,a)},t.prototype.removeFromEditor=function(a){var d=a.renderer.$gutter;d.removeEventListener("mousemove",this.onDomMouseMove),d.removeEventListener("mouseout",this.onDomMouseOut),e.prototype.removeFromEditor.call(this,a)},t.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),e.prototype.destroy.call(this)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:n("gutter-tooltip.aria-label.error.singular","error"),plural:n("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:n("gutter-tooltip.aria-label.security.singular","security finding"),plural:n("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:n("gutter-tooltip.aria-label.warning.singular","warning"),plural:n("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:n("gutter-tooltip.aria-label.info.singular","information message"),plural:n("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:n("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:n("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(a){var d,f=this.editor.renderer.$gutterLayer,S=f.$annotations[a],$;S?$={displayText:Array.from(S.displayText),type:Array.from(S.type)}:$={displayText:[],type:[]};var C=f.session.getFoldLine(a);if(C&&f.$showFoldedAnnotations){for(var w={error:[],security:[],warning:[],info:[],hint:[]},M={error:1,security:2,warning:3,info:4,hint:5},R,T=a+1;T<=C.end.row;T++)if(f.$annotations[T])for(var k=0;k<f.$annotations[T].text.length;k++){var O=f.$annotations[T].type[k];w[O].push(f.$annotations[T].text[k]),(!R||M[O]<M[R])&&(R=O)}if(["error","security","warning"].includes(R)){var A="".concat(t.annotationsToSummaryString(w)," in folded code.");$.displayText.push(A),$.type.push(R+"_fold")}}if($.displayText.length===0)return this.hide();for(var x={error:[],security:[],warning:[],info:[],hint:[]},b=f.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",T=0;T<$.displayText.length;T++){var m=v.createElement("span"),_=v.createElement("span");(d=_.classList).add.apply(d,["ace_".concat($.type[T]),b]),_.setAttribute("aria-label","".concat(t.annotationLabels[$.type[T].replace("_fold","")].singular)),_.setAttribute("role","img"),_.appendChild(v.createTextNode(" ")),m.appendChild(_),m.appendChild(v.createTextNode($.displayText[T])),m.appendChild(v.createElement("br")),x[$.type[T].replace("_fold","")].push(m)}var L=v.createElement("span");x.error.forEach(function(N){return L.appendChild(N)}),x.security.forEach(function(N){return L.appendChild(N)}),x.warning.forEach(function(N){return L.appendChild(N)}),x.info.forEach(function(N){return L.appendChild(N)}),x.hint.forEach(function(N){return L.appendChild(N)}),L.setAttribute("aria-live","polite");var I=this.$findLinkedAnnotationNode(a);I&&I.setAttribute("aria-describedby",this.id);var D=o.fromPoints({row:a,column:0},{row:a,column:0});this.showForRange(this.editor,D,L),this.visibleTooltipRow=a,this.editor._signal("showGutterTooltip",this)},t.prototype.$setPosition=function(a,d,f,S){var $=this.$findCellByRow(S.start.row);if($){var C=$&&$.element,w=C&&C.querySelector(".ace_gutter_annotation");if(w){var M=w.getBoundingClientRect();if(M){var R={pageX:M.right,pageY:M.top};return e.prototype.$setPosition.call(this,a,R,!1,S)}}}},t.prototype.$shouldPlaceAbove=function(a,d,f){return f<a},t.prototype.$findLinkedAnnotationNode=function(a){var d=this.$findCellByRow(a);if(d){var f=d.element;if(f.childNodes.length>2)return f.childNodes[2]}},t.prototype.$findCellByRow=function(a){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(d){return d.row===a})},t.prototype.hide=function(a){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var d=this.$findLinkedAnnotationNode(this.visibleTooltipRow);d&&d.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),e.prototype.hide.call(this,a)}},t.annotationsToSummaryString=function(a){var d,f,S=[],$=["error","security","warning","info","hint"];try{for(var C=p($),w=C.next();!w.done;w=C.next()){var M=w.value;if(a[M].length){var R=a[M].length===1?t.annotationLabels[M].singular:t.annotationLabels[M].plural;S.push("".concat(a[M].length," ").concat(R))}}}catch(T){d={error:T}}finally{try{w&&!w.done&&(f=C.return)&&f.call(C)}finally{if(d)throw d.error}}return S.join(", ")},t.prototype.isOutsideOfText=function(a){var d=a.editor,f=d.renderer.$gutter.getBoundingClientRect();return!(a.clientX>=f.left&&a.clientX<=f.right&&a.clientY>=f.top&&a.clientY<=f.bottom)},t})(c);i.$uid=0,g.GutterTooltip=i}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(u,g,E){var y=u("../lib/dom"),p=u("../lib/event"),v=u("../lib/useragent"),s=200,c=200,n=5;function o(i){var e=i.editor,t=y.createElement("div");t.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",t.textContent=" ";var a=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];a.forEach(function(W){i[W]=this[W]},this),e.on("mousedown",this.onMouseDown.bind(i));var d=e.container,f,S,$,C,w,M,R=0,T,k,O,A,x;this.onDragStart=function(W){if(this.cancelDrag||!d.draggable){var z=this;return setTimeout(function(){z.startSelect(),z.captureMouse(W)},0),W.preventDefault()}w=e.getSelectionRange();var H=W.dataTransfer;H.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(t),H.setDragImage&&H.setDragImage(t,0,0),setTimeout(function(){e.container.removeChild(t)}),H.clearData(),H.setData("Text",e.session.getTextRange()),k=!0,this.setState("drag")},this.onDragEnd=function(W){if(d.draggable=!1,k=!1,this.setState(null),!e.getReadOnly()){var z=W.dataTransfer.dropEffect;!T&&z=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(W){if(!(e.getReadOnly()||!F(W.dataTransfer)))return S=W.clientX,$=W.clientY,f||L(),R++,W.dataTransfer.dropEffect=T=U(W),p.preventDefault(W)},this.onDragOver=function(W){if(!(e.getReadOnly()||!F(W.dataTransfer)))return S=W.clientX,$=W.clientY,f||(L(),R++),D!==null&&(D=null),W.dataTransfer.dropEffect=T=U(W),p.preventDefault(W)},this.onDragLeave=function(W){if(R--,R<=0&&f)return I(),T=null,p.preventDefault(W)},this.onDrop=function(W){if(M){var z=W.dataTransfer;if(k)switch(T){case"move":w.contains(M.row,M.column)?w={start:M,end:M}:w=e.moveText(w,M);break;case"copy":w=e.moveText(w,M,!0);break}else{var H=z.getData("Text");w={start:M,end:e.session.insert(M,H)},e.focus(),T=null}return I(),p.preventDefault(W)}},p.addListener(d,"dragstart",this.onDragStart.bind(i),e),p.addListener(d,"dragend",this.onDragEnd.bind(i),e),p.addListener(d,"dragenter",this.onDragEnter.bind(i),e),p.addListener(d,"dragover",this.onDragOver.bind(i),e),p.addListener(d,"dragleave",this.onDragLeave.bind(i),e),p.addListener(d,"drop",this.onDrop.bind(i),e);function b(W,z){var H=Date.now(),B=!z||W.row!=z.row,j=!z||W.column!=z.column;if(!A||B||j)e.moveCursorToPosition(W),A=H,x={x:S,y:$};else{var K=r(x.x,x.y,S,$);K>n?A=null:H-A>=c&&(e.renderer.scrollCursorIntoView(),A=null)}}function m(W,z){var H=Date.now(),B=e.renderer.layerConfig.lineHeight,j=e.renderer.layerConfig.characterWidth,K=e.renderer.scroller.getBoundingClientRect(),Q={x:{left:S-K.left,right:K.right-S},y:{top:$-K.top,bottom:K.bottom-$}},Y=Math.min(Q.x.left,Q.x.right),ee=Math.min(Q.y.top,Q.y.bottom),ie={row:W.row,column:W.column};Y/j<=2&&(ie.column+=Q.x.left<Q.x.right?-3:2),ee/B<=1&&(ie.row+=Q.y.top<Q.y.bottom?-1:1);var ae=W.row!=ie.row,ue=W.column!=ie.column,oe=!z||W.row!=z.row;ae||ue&&!oe?O?H-O>=s&&e.renderer.scrollCursorIntoView(ie):O=H:O=null}function _(){var W=M;M=e.renderer.screenToTextCoordinates(S,$),b(M,W),m(M,W)}function L(){w=e.selection.toOrientedRange(),f=e.session.addMarker(w,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),_(),C=setInterval(_,20),R=0,p.addListener(document,"mousemove",N)}function I(){clearInterval(C),e.session.removeMarker(f),f=null,e.selection.fromOrientedRange(w),e.isFocused()&&!k&&e.$resetCursorStyle(),w=null,M=null,R=0,O=null,A=null,p.removeListener(document,"mousemove",N)}var D=null;function N(){D==null&&(D=setTimeout(function(){D!=null&&f&&I()},20))}function F(W){var z=W.types;return!z||Array.prototype.some.call(z,function(H){return H=="text/plain"||H=="Text"})}function U(W){var z=["copy","copymove","all","uninitialized"],H=["move","copymove","linkmove","all","uninitialized"],B=v.isMac?W.altKey:W.ctrlKey,j="uninitialized";try{j=W.dataTransfer.effectAllowed.toLowerCase()}catch{}var K="none";return B&&z.indexOf(j)>=0?K="copy":H.indexOf(j)>=0?K="move":z.indexOf(j)>=0&&(K="copy"),K}}(function(){this.dragWait=function(){var i=Date.now()-this.mousedownEvent.time;i>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var i=this.editor.container;i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(i){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var i=this.editor,e=i.container;e.draggable=!0,i.renderer.$cursorLayer.setBlinking(!1),i.setStyle("ace_dragging");var t=v.isWin?"default":"move";i.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(i){var e=this.editor.container;if(v.isIE&&this.state=="dragReady"){var t=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);t>3&&e.dragDrop()}if(this.state==="dragWait"){var t=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);t>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(i){if(this.$dragEnabled){this.mousedownEvent=i;var e=this.editor,t=i.inSelection(),a=i.getButton(),d=i.domEvent.detail||1;if(d===1&&a===0&&t){if(i.editor.inMultiSelectMode&&(i.getAccelKey()||i.getShiftKey()))return;this.mousedownEvent.time=Date.now();var f=i.domEvent.target||i.domEvent.srcElement;if("unselectable"in f&&(f.unselectable="on"),e.getDragDelay()){if(v.isWebKit){this.cancelDrag=!0;var S=e.container;S.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(i,this.onMouseDrag.bind(this)),i.defaultPrevented=!0}}}}).call(o.prototype);function r(i,e,t,a){return Math.sqrt(Math.pow(t-i,2)+Math.pow(a-e,2))}g.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(u,g,E){var y=u("./mouse_event").MouseEvent,p=u("../lib/event"),v=u("../lib/dom");g.addTouchListeners=function(s,c){var n="scroll",o,r,i,e,t,a,d=0,f,S=0,$=0,C=0,w,M;function R(){var b=window.navigator&&window.navigator.clipboard,m=!1,_=function(){var D=c.getCopyText(),N=c.session.getUndoManager().hasUndo();M.replaceChild(v.buildDom(m?["span",!D&&L("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],D&&L("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],D&&L("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],b&&L("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],N&&L("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],L("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],L("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),M.firstChild)},L=function(D){return c.commands.canExecute(D,c)},I=function(D){var N=D.target.getAttribute("action");if(N=="more"||!m)return m=!m,_();N=="paste"?b.readText().then(function(F){c.execCommand(N,F)}):N&&((N=="cut"||N=="copy")&&(b?b.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(N)),M.firstChild.style.display="none",m=!1,N!="openCommandPalette"&&c.focus()};M=v.buildDom(["div",{class:"ace_mobile-menu",onclick:I},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container),M.addEventListener("touchstart",function(D){n="menu",D.stopPropagation(),D.preventDefault(),c.textInput.focus()}),M.addEventListener("touchend",function(D){D.stopPropagation(),D.preventDefault(),I(D)})}function T(){if(!c.getOption("enableMobileMenu")){M&&k();return}M||R();var b=c.selection.cursor,m=c.renderer.textToScreenCoordinates(b.row,b.column),_=c.renderer.textToScreenCoordinates(0,0).pageX,L=c.renderer.scrollLeft,I=c.container.getBoundingClientRect();M.style.top=m.pageY-I.top-3+"px",m.pageX-I.left<I.width-70?(M.style.left="",M.style.right="10px"):(M.style.right="",M.style.left=_+L-I.left+"px"),M.style.display="",M.firstChild.style.display="none",c.on("input",k)}function k(b){M&&(M.style.display="none"),c.off("input",k)}function O(){t=null,clearTimeout(t);var b=c.selection.getRange(),m=b.contains(f.row,f.column);(b.isEmpty()||!m)&&(c.selection.moveToPosition(f),c.selection.selectWord()),n="wait",T()}function A(){t=null,clearTimeout(t),c.selection.moveToPosition(f);var b=S>=2?c.selection.getLineRange(f.row):c.session.getBracketRange(f);b&&!b.isEmpty()?c.selection.setRange(b):c.selection.selectWord(),n="wait"}p.addListener(s,"contextmenu",function(b){if(w){var m=c.textInput.getElement();m.focus()}},c),p.addListener(s,"touchstart",function(b){var m=b.touches;if(t||m.length>1){clearTimeout(t),t=null,i=-1,n="zoom";return}w=c.$mouseHandler.isMousePressed=!0;var _=c.renderer.layerConfig.lineHeight,L=c.renderer.layerConfig.lineHeight,I=b.timeStamp;e=I;var D=m[0],N=D.clientX,F=D.clientY;Math.abs(o-N)+Math.abs(r-F)>_&&(i=-1),o=b.clientX=N,r=b.clientY=F,$=C=0;var U=new y(b,c);if(f=U.getDocumentPosition(),I-i<500&&m.length==1&&!d)S++,b.preventDefault(),b.button=0,A();else{S=0;var W=c.selection.cursor,z=c.selection.isEmpty()?W:c.selection.anchor,H=c.renderer.$cursorLayer.getPixelPosition(W,!0),B=c.renderer.$cursorLayer.getPixelPosition(z,!0),j=c.renderer.scroller.getBoundingClientRect(),K=c.renderer.layerConfig.offset,Q=c.renderer.scrollLeft,Y=function(ae,ue){return ae=ae/L,ue=ue/_-.75,ae*ae+ue*ue};if(b.clientX<j.left){n="zoom";return}var ee=Y(b.clientX-j.left-H.left+Q,b.clientY-j.top-H.top+K),ie=Y(b.clientX-j.left-B.left+Q,b.clientY-j.top-B.top+K);ee<3.5&&ie<3.5&&(n=ee>ie?"cursor":"anchor"),ie<3.5?n="anchor":ee<3.5?n="cursor":n="scroll",t=setTimeout(O,450)}i=I},c),p.addListener(s,"touchend",function(b){w=c.$mouseHandler.isMousePressed=!1,a&&clearInterval(a),n=="zoom"?(n="",d=0):t?(c.selection.moveToPosition(f),d=0,T()):n=="scroll"?(x(),k()):T(),clearTimeout(t),t=null},c),p.addListener(s,"touchmove",function(b){t&&(clearTimeout(t),t=null);var m=b.touches;if(!(m.length>1||n=="zoom")){var _=m[0],L=o-_.clientX,I=r-_.clientY;if(n=="wait")if(L*L+I*I>4)n="cursor";else return b.preventDefault();o=_.clientX,r=_.clientY,b.clientX=_.clientX,b.clientY=_.clientY;var D=b.timeStamp,N=D-e;if(e=D,n=="scroll"){var F=new y(b,c);F.speed=1,F.wheelX=L,F.wheelY=I,10*Math.abs(L)<Math.abs(I)&&(L=0),10*Math.abs(I)<Math.abs(L)&&(I=0),N!=0&&($=L/N,C=I/N),c._emit("mousewheel",F),F.propagationStopped||($=C=0)}else{var U=new y(b,c),W=U.getDocumentPosition();n=="cursor"?c.selection.moveCursorToPosition(W):n=="anchor"&&c.selection.setSelectionAnchor(W.row,W.column),c.renderer.scrollCursorIntoView(W),b.preventDefault()}}},c);function x(){d+=60,a=setInterval(function(){d--<=0&&(clearInterval(a),a=null),Math.abs($)<.01&&($=0),Math.abs(C)<.01&&(C=0),d<20&&($=.9*$),d<20&&(C=.9*C);var b=c.session.getScrollTop();c.renderer.scrollBy(10*$,10*C),b==c.session.getScrollTop()&&(d=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(u,g,E){var y=u("../lib/event"),p=u("../lib/useragent"),v=u("./default_handlers").DefaultHandlers,s=u("./default_gutter_handler").GutterHandler,c=u("./mouse_event").MouseEvent,n=u("./dragdrop_handler").DragdropHandler,o=u("./touch_handler").addTouchListeners,r=u("../config"),i=(function(){function e(t){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var a=this;this.editor=t,new v(this),new s(this),new n(this);var d=function($){var C=!document.hasFocus||!document.hasFocus()||!t.isFocused()&&document.activeElement==(t.textInput&&t.textInput.getElement());C&&window.focus(),t.focus(),setTimeout(function(){t.isFocused()||t.focus()})},f=t.renderer.getMouseEventTarget();y.addListener(f,"click",this.onMouseEvent.bind(this,"click"),t),y.addListener(f,"mousemove",this.onMouseMove.bind(this,"mousemove"),t),y.addMultiMouseDownListener([f,t.renderer.scrollBarV&&t.renderer.scrollBarV.inner,t.renderer.scrollBarH&&t.renderer.scrollBarH.inner,t.textInput&&t.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",t),y.addMouseWheelListener(t.container,this.onMouseWheel.bind(this,"mousewheel"),t),o(t.container,t);var S=t.renderer.$gutter;y.addListener(S,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),t),y.addListener(S,"click",this.onMouseEvent.bind(this,"gutterclick"),t),y.addListener(S,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),t),y.addListener(S,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),t),y.addListener(f,"mousedown",d,t),y.addListener(S,"mousedown",d,t),p.isIE&&t.renderer.scrollBarV&&(y.addListener(t.renderer.scrollBarV.element,"mousedown",d,t),y.addListener(t.renderer.scrollBarH.element,"mousedown",d,t)),t.on("mousemove",function($){if(!(a.state||a.$dragDelay||!a.$dragEnabled)){var C=t.renderer.screenToTextCoordinates($.x,$.y),w=t.session.selection.getRange(),M=t.renderer;!w.isEmpty()&&w.insideStart(C.row,C.column)?M.setCursorStyle("default"):M.setCursorStyle("")}},t)}return e.prototype.onMouseEvent=function(t,a){this.editor.session&&this.editor._emit(t,new c(a,this.editor))},e.prototype.onMouseMove=function(t,a){var d=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!d||!d.length||this.editor._emit(t,new c(a,this.editor))},e.prototype.onMouseWheel=function(t,a){var d=new c(a,this.editor);d.speed=this.$scrollSpeed*2,d.wheelX=a.wheelX,d.wheelY=a.wheelY,this.editor._emit(t,d)},e.prototype.setState=function(t){this.state=t},e.prototype.captureMouse=function(t,a){this.x=t.x,this.y=t.y,this.isMousePressed=!0;var d=this.editor,f=this.editor.renderer;f.$isMousePressed=!0;var S=this,$=!0,C=function(k){if(k){if(p.isWebKit&&!k.which&&S.releaseMouse)return S.releaseMouse();S.x=k.clientX,S.y=k.clientY,a&&a(k),S.mouseEvent=new c(k,S.editor),S.$mouseMoved=!0}},w=function(k){d.off("beforeEndOperation",T),$=!1,d.session&&M(),S[S.state+"End"]&&S[S.state+"End"](k),S.state="",S.isMousePressed=f.$isMousePressed=!1,f.$keepTextAreaAtCursor&&f.$moveTextAreaToCursor(),S.$onCaptureMouseMove=S.releaseMouse=null,k&&S.onMouseEvent("mouseup",k),d.endOperation()},M=function(){S[S.state]&&S[S.state](),S.$mouseMoved=!1},R=function(){$&&(M(),y.nextFrame(R))};if(p.isOldIE&&t.domEvent.type=="dblclick")return setTimeout(function(){w(t)});var T=function(k){S.releaseMouse&&d.curOp.command.name&&d.curOp.selectionChanged&&(S[S.state+"End"]&&S[S.state+"End"](),S.state="",S.releaseMouse())};d.on("beforeEndOperation",T),d.startOperation({command:{name:"mouse"}}),S.$onCaptureMouseMove=C,S.releaseMouse=y.capture(this.editor.container,C,w),R()},e.prototype.cancelContextMenu=function(){var t=(function(a){a&&a.domEvent&&a.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",t),a&&a.domEvent&&y.stopEvent(a.domEvent))}).bind(this);setTimeout(t,10),this.editor.on("nativecontextmenu",t)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},e})();i.prototype.releaseMouse=null,r.defineOptions(i.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:p.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),g.MouseHandler=i}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(u,g,E){var y=u("../lib/dom"),p=(function(){function v(s){s.on("click",function(c){var n=c.getDocumentPosition(),o=s.session,r=o.getFoldAt(n.row,n.column,1);r&&(c.getAccelKey()?o.removeFold(r):o.expandFold(r),c.stop());var i=c.domEvent&&c.domEvent.target;i&&y.hasCssClass(i,"ace_inline_button")&&y.hasCssClass(i,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),s.renderer.scrollCursorIntoView())}),s.on("gutterclick",function(c){var n=s.renderer.$gutterLayer.getRegion(c);if(n=="foldWidgets"){var o=c.getDocumentPosition().row,r=s.session;r.foldWidgets&&r.foldWidgets[o]&&s.session.onFoldWidgetClick(o,c),s.isFocused()||s.focus(),c.stop()}}),s.on("gutterdblclick",function(c){var n=s.renderer.$gutterLayer.getRegion(c);if(n=="foldWidgets"){var o=c.getDocumentPosition().row,r=s.session,i=r.getParentFoldRangeData(o,!0),e=i.range||i.firstRange;if(e){o=e.start.row;var t=r.getFoldAt(o,r.getLine(o).length,1);t?r.removeFold(t):(r.addFold("...",e),s.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}c.stop()}})}return v})();g.FoldHandler=p}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(u,g,E){var y=u("../lib/keys"),p=u("../lib/event"),v=(function(){function s(c){this.$editor=c,this.$data={editor:c},this.$handlers=[],this.setDefaultHandler(c.commands)}return s.prototype.setDefaultHandler=function(c){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=c,this.addKeyboardHandler(c,0)},s.prototype.setKeyboardHandler=function(c){var n=this.$handlers;if(n[n.length-1]!=c){for(;n[n.length-1]&&n[n.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(n[n.length-1]);this.addKeyboardHandler(c,1)}},s.prototype.addKeyboardHandler=function(c,n){if(c){typeof c=="function"&&!c.handleKeyboard&&(c.handleKeyboard=c);var o=this.$handlers.indexOf(c);o!=-1&&this.$handlers.splice(o,1),n==null?this.$handlers.push(c):this.$handlers.splice(n,0,c),o==-1&&c.attach&&c.attach(this.$editor)}},s.prototype.removeKeyboardHandler=function(c){var n=this.$handlers.indexOf(c);return n==-1?!1:(this.$handlers.splice(n,1),c.detach&&c.detach(this.$editor),!0)},s.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},s.prototype.getStatusText=function(){var c=this.$data,n=c.editor;return this.$handlers.map(function(o){return o.getStatusText&&o.getStatusText(n,c)||""}).filter(Boolean).join(" ")},s.prototype.$callKeyboardHandlers=function(c,n,o,r){for(var i,e=!1,t=this.$editor.commands,a=this.$handlers.length;a--&&(i=this.$handlers[a].handleKeyboard(this.$data,c,n,o,r),!(!(!i||!i.command)&&(i.command=="null"?e=!0:e=t.exec(i.command,this.$editor,i.args,r),e&&r&&c!=-1&&i.passEvent!=!0&&i.command.passEvent!=!0&&p.stopEvent(r),e))););return!e&&c==-1&&(i={command:"insertstring"},e=t.exec("insertstring",this.$editor,n)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",i),e},s.prototype.onCommandKey=function(c,n,o){var r=y.keyCodeToString(o);return this.$callKeyboardHandlers(n,r,o,c)},s.prototype.onTextInput=function(c){return this.$callKeyboardHandlers(-1,c)},s})();g.KeyBinding=v}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(u,g,E){var y=0,p=0,v=!1,s=!1,c=!1,n=[[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]],r=0,i=1,e=0,t=1,a=2,d=3,f=4,S=5,$=6,C=7,w=8,M=9,R=10,T=11,k=12,O=13,A=14,x=15,b=16,m=17,_=18,L=[_,_,_,_,_,_,_,_,_,$,S,$,w,S,_,_,_,_,_,_,_,_,_,_,_,_,_,_,S,S,S,$,w,f,f,T,T,T,f,f,f,f,f,R,M,R,M,M,a,a,a,a,a,a,a,a,a,a,M,f,f,f,f,f,f,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,f,f,f,f,f,f,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,f,f,f,f,_,_,_,_,_,_,S,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,M,f,T,T,T,T,f,f,f,f,e,f,f,_,f,f,T,T,a,a,f,e,f,f,f,a,e,f,f,f,f,f],I=[w,w,w,w,w,w,w,w,w,w,w,_,_,_,e,t,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,w,S,O,A,x,b,m,M,T,T,T,T,T,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,M,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,w];function D(W,z,H,B){var j=y?o:n,K=null,Q=null,Y=null,ee=0,ie=null,ae=null,ue=-1,oe=null,J=null,me=[];if(!B)for(oe=0,B=[];oe<H;oe++)B[oe]=U(W[oe]);for(p=y,v=!1,s=!1,c=!1,J=0;J<H;J++){if(K=ee,me[J]=Q=F(W,B,me,J),ee=j[K][Q],ie=ee&240,ee&=15,z[J]=Y=j[ee][5],ie>0)if(ie==16){for(oe=ue;oe<J;oe++)z[oe]=1;ue=-1}else ue=-1;if(ae=j[ee][6],ae)ue==-1&&(ue=J);else if(ue>-1){for(oe=ue;oe<J;oe++)z[oe]=Y;ue=-1}B[J]==S&&(z[J]=0),p|=Y}if(c){for(oe=0;oe<H;oe++)if(B[oe]==$){z[oe]=y;for(var ye=oe-1;ye>=0&&B[ye]==w;ye--)z[ye]=y}}}function N(W,z,H){if(!(p<W)){if(W==1&&y==i&&!s){H.reverse();return}for(var B=H.length,j=0,K,Q,Y,ee;j<B;){if(z[j]>=W){for(K=j+1;K<B&&z[K]>=W;)K++;for(Q=j,Y=K-1;Q<Y;Q++,Y--)ee=H[Q],H[Q]=H[Y],H[Y]=ee;j=K}j++}}}function F(W,z,H,B){var j=z[B],K,Q,Y,ee;switch(j){case e:case t:v=!1;case f:case d:return j;case a:return v?d:a;case C:return v=!0,t;case w:return f;case M:return B<1||B+1>=z.length||(K=H[B-1])!=a&&K!=d||(Q=z[B+1])!=a&&Q!=d?f:(v&&(Q=d),Q==K?Q:f);case R:return K=B>0?H[B-1]:S,K==a&&B+1<z.length&&z[B+1]==a?a:f;case T:if(B>0&&H[B-1]==a)return a;if(v)return f;for(ee=B+1,Y=z.length;ee<Y&&z[ee]==T;)ee++;return ee<Y&&z[ee]==a?a:f;case k:for(Y=z.length,ee=B+1;ee<Y&&z[ee]==k;)ee++;if(ee<Y){var ie=W[B],ae=ie>=1425&&ie<=2303||ie==64286;if(K=z[ee],ae&&(K==t||K==C))return t}return B<1||(K=z[B-1])==S?f:H[B-1];case S:return v=!1,s=!0,y;case $:return c=!0,f;case O:case A:case b:case m:case x:v=!1;case _:return f}}function U(W){var z=W.charCodeAt(0),H=z>>8;return H==0?z>191?e:L[z]:H==5?/[\u0591-\u05f4]/.test(W)?t:e:H==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(W)?k:/[\u0660-\u0669\u066b-\u066c]/.test(W)?d:z==1642?T:/[\u06f0-\u06f9]/.test(W)?a:C:H==32&&z<=8287?I[z&255]:H==254&&z>=65136?C:f}g.L=e,g.R=t,g.EN=a,g.ON_R=3,g.AN=4,g.R_H=5,g.B=6,g.RLE=7,g.DOT="·",g.doBidiReorder=function(W,z,H){if(W.length<2)return{};var B=W.split(""),j=new Array(B.length),K=new Array(B.length),Q=[];y=H?i:r,D(B,Q,B.length,z);for(var Y=0;Y<j.length;j[Y]=Y,Y++);N(2,Q,j),N(1,Q,j);for(var Y=0;Y<j.length-1;Y++)z[Y]===d?Q[Y]=g.AN:Q[Y]===t&&(z[Y]>C&&z[Y]<O||z[Y]===f||z[Y]===_)?Q[Y]=g.ON_R:Y>0&&B[Y-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(B[Y])&&(Q[Y-1]=Q[Y]=g.R_H,Y++);B[B.length-1]===g.DOT&&(Q[B.length-1]=g.B),B[0]==="‫"&&(Q[0]=g.RLE);for(var Y=0;Y<j.length;Y++)K[Y]=Q[j[Y]];return{logicalFromVisual:j,bidiLevels:K}},g.hasBidiCharacters=function(W,z){for(var H=!1,B=0;B<W.length;B++)z[B]=U(W.charAt(B)),!H&&(z[B]==t||z[B]==C||z[B]==d)&&(H=!0);return H},g.getVisualFromLogicalIdx=function(W,z){for(var H=0;H<z.logicalFromVisual.length;H++)if(z.logicalFromVisual[H]==W)return H;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(u,g,E){var y=u("./lib/bidiutil"),p=u("./lib/lang"),v=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=(function(){function c(n){this.session=n,this.bidiMap={},this.currentRow=null,this.bidiUtil=y,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=v.test(n.getValue())}return c.prototype.isBidiRow=function(n,o,r){return this.seenBidi?(n!==this.currentRow&&(this.currentRow=n,this.updateRowLine(o,r),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},c.prototype.onChange=function(n){this.seenBidi?this.currentRow=null:n.action=="insert"&&v.test(n.lines.join(`
176
+ `))&&(this.seenBidi=!0,this.currentRow=null)},c.prototype.getDocumentRow=function(){var n=0,o=this.session.$screenRowCache;if(o.length){var r=this.session.$getRowCacheIndex(o,this.currentRow);r>=0&&(n=this.session.$docRowCache[r])}return n},c.prototype.getSplitIndex=function(){var n=0,o=this.session.$screenRowCache;if(o.length)for(var r,i=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-n>0&&(r=this.session.$getRowCacheIndex(o,this.currentRow-n-1),r===i);)i=r,n++;else n=this.currentRow;return n},c.prototype.updateRowLine=function(n,o){n===void 0&&(n=this.getDocumentRow());var r=n===this.session.getLength()-1,i=r?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(n),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[n];e&&(o===void 0&&(o=this.getSplitIndex()),o>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[y.L],this.line=o<e.length?this.line.substring(e[o-1],e[o]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[o]),o==e.length&&(this.line+=this.showInvisibles?i:y.DOT))}else this.line+=this.showInvisibles?i:y.DOT;var t=this.session,a=0,d;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(f,S){return f===" "||t.isFullWidth(f.charCodeAt(0))?(d=f===" "?t.getScreenTabSize(S+a):2,a+=d-1,p.stringRepeat(y.DOT,d)):f}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==y.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},c.prototype.updateBidiMap=function(){var n=[];y.hasBidiCharacters(this.line,n)||this.isRtlDir?this.bidiMap=y.doBidiReorder(this.line,n,this.isRtlDir):this.bidiMap={}},c.prototype.markAsDirty=function(){this.currentRow=null},c.prototype.updateCharacterWidths=function(n){if(this.characterWidth!==n.$characterSize.width){this.fontMetrics=n;var o=this.characterWidth=n.$characterSize.width,r=n.$measureCharWidth("ה");this.charWidths[y.L]=this.charWidths[y.EN]=this.charWidths[y.ON_R]=o,this.charWidths[y.R]=this.charWidths[y.AN]=r,this.charWidths[y.R_H]=r*.45,this.charWidths[y.B]=this.charWidths[y.RLE]=0,this.currentRow=null}},c.prototype.setShowInvisibles=function(n){this.showInvisibles=n,this.currentRow=null},c.prototype.setEolChar=function(n){this.EOL=n},c.prototype.setContentWidth=function(n){this.contentWidth=n},c.prototype.isRtlLine=function(n){return this.$isRtl?!0:n!=null?this.session.getLine(n).charAt(0)==this.RLE:this.isRtlDir},c.prototype.setRtlDirection=function(n,o){for(var r=n.getCursorPosition(),i=n.selection.getSelectionAnchor().row;i<=r.row;i++)!o&&n.session.getLine(i).charAt(0)===n.session.$bidiHandler.RLE?n.session.doc.removeInLine(i,0,1):o&&n.session.getLine(i).charAt(0)!==n.session.$bidiHandler.RLE&&n.session.doc.insert({column:0,row:i},n.session.$bidiHandler.RLE)},c.prototype.getPosLeft=function(n){n-=this.wrapIndent;var o=this.line.charAt(0)===this.RLE?1:0,r=n>o?this.session.getOverwrite()?n:n-1:o,i=y.getVisualFromLogicalIdx(r,this.bidiMap),e=this.bidiMap.bidiLevels,t=0;!this.session.getOverwrite()&&n<=o&&e[i]%2!==0&&i++;for(var a=0;a<i;a++)t+=this.charWidths[e[a]];return!this.session.getOverwrite()&&n>o&&e[i]%2===0&&(t+=this.charWidths[e[i]]),this.wrapIndent&&(t+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(t+=this.rtlLineOffset),t},c.prototype.getSelections=function(n,o){var r=this.bidiMap,i=r.bidiLevels,e,t=[],a=0,d=Math.min(n,o)-this.wrapIndent,f=Math.max(n,o)-this.wrapIndent,S=!1,$=!1,C=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var w,M=0;M<i.length;M++)w=r.logicalFromVisual[M],e=i[M],S=w>=d&&w<f,S&&!$?C=a:!S&&$&&t.push({left:C,width:a-C}),a+=this.charWidths[e],$=S;if(S&&M===i.length&&t.push({left:C,width:a-C}),this.isRtlDir)for(var R=0;R<t.length;R++)t[R].left+=this.rtlLineOffset;return t},c.prototype.offsetToCol=function(r){this.isRtlDir&&(r-=this.rtlLineOffset);var o=0,r=Math.max(r,0),i=0,e=0,t=this.bidiMap.bidiLevels,a=this.charWidths[t[e]];for(this.wrapIndent&&(r-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);r>i+a/2;){if(i+=a,e===t.length-1){a=0;break}a=this.charWidths[t[++e]]}return e>0&&t[e-1]%2!==0&&t[e]%2===0?(r<i&&e--,o=this.bidiMap.logicalFromVisual[e]):e>0&&t[e-1]%2===0&&t[e]%2!==0?o=1+(r>i?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===t.length-1&&a===0&&t[e-1]%2===0||!this.isRtlDir&&e===0&&t[e]%2!==0?o=1+this.bidiMap.logicalFromVisual[e]:(e>0&&t[e-1]%2!==0&&a!==0&&e--,o=this.bidiMap.logicalFromVisual[e]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},c})();g.BidiHandler=s}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(u,g,E){var y=u("./lib/oop"),p=u("./lib/lang"),v=u("./lib/event_emitter").EventEmitter,s=u("./range").Range,c=(function(){function n(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 r=this;this.cursor.on("change",function(i){r.$cursorChanged=!0,r.$silent||r._emit("changeCursor"),!r.$isEmpty&&!r.$silent&&r._emit("changeSelection"),!r.$keepDesiredColumnOnChange&&i.old.column!=i.value.column&&(r.$desiredColumn=null)}),this.anchor.on("change",function(){r.$anchorChanged=!0,!r.$isEmpty&&!r.$silent&&r._emit("changeSelection")})}return n.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},n.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},n.prototype.getCursor=function(){return this.lead.getPosition()},n.prototype.setAnchor=function(o,r){this.$isEmpty=!1,this.anchor.setPosition(o,r)},n.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},n.prototype.getSelectionLead=function(){return this.lead.getPosition()},n.prototype.isBackwards=function(){var o=this.anchor,r=this.lead;return o.row>r.row||o.row==r.row&&o.column>r.column},n.prototype.getRange=function(){var o=this.anchor,r=this.lead;return this.$isEmpty?s.fromPoints(r,r):this.isBackwards()?s.fromPoints(r,o):s.fromPoints(o,r)},n.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},n.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},n.prototype.setRange=function(o,r){var i=r?o.end:o.start,e=r?o.start:o.end;this.$setSelection(i.row,i.column,e.row,e.column)},n.prototype.$setSelection=function(o,r,i,e){if(!this.$silent){var t=this.$isEmpty,a=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,r),this.cursor.setPosition(i,e),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||t!=this.$isEmpty||a)&&this._emit("changeSelection")}},n.prototype.$moveSelection=function(o){var r=this.lead;this.$isEmpty&&this.setSelectionAnchor(r.row,r.column),o.call(this)},n.prototype.selectTo=function(o,r){this.$moveSelection(function(){this.moveCursorTo(o,r)})},n.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},n.prototype.moveTo=function(o,r){this.clearSelection(),this.moveCursorTo(o,r)},n.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},n.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},n.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},n.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},n.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},n.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},n.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},n.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},n.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},n.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},n.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},n.prototype.getWordRange=function(o,r){if(typeof r>"u"){var i=o||this.lead;o=i.row,r=i.column}return this.session.getWordRange(o,r)},n.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},n.prototype.selectAWord=function(){var o=this.getCursor(),r=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(r)},n.prototype.getLineRange=function(o,r){var i=typeof o=="number"?o:this.lead.row,e,t=this.session.getFoldLine(i);return t?(i=t.start.row,e=t.end.row):e=i,r===!0?new s(i,0,e,this.session.getLine(e).length):new s(i,0,e+1,0)},n.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},n.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},n.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},n.prototype.wouldMoveIntoSoftTab=function(o,r,i){var e=o.column,t=o.column+r;return i<0&&(e=o.column-r,t=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(e,t).split(" ").length-1==r},n.prototype.moveCursorLeft=function(){var o=this.lead.getPosition(),r;if(r=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(r.start.row,r.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},n.prototype.moveCursorRight=function(){var o=this.lead.getPosition(),r;if(r=this.session.getFoldAt(o.row,o.column,1))this.moveCursorTo(r.end.row,r.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 i=this.session.getTabSize(),o=this.lead;this.wouldMoveIntoSoftTab(o,i,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,i):this.moveCursorBy(0,1)}},n.prototype.moveCursorLineStart=function(){var o=this.lead.row,r=this.lead.column,i=this.session.documentToScreenRow(o,r),e=this.session.screenToDocumentPosition(i,0),t=this.session.getDisplayLine(o,null,e.row,e.column),a=t.match(/^\s*/);a[0].length!=r&&!this.session.$useEmacsStyleLineStart&&(e.column+=a[0].length),this.moveCursorToPosition(e)},n.prototype.moveCursorLineEnd=function(){var o=this.lead,r=this.session.getDocumentLastRowColumnPosition(o.row,o.column);if(this.lead.column==r.column){var i=this.session.getLine(r.row);if(r.column==i.length){var e=i.search(/\s+$/);e>0&&(r.column=e)}}this.moveCursorTo(r.row,r.column)},n.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,r=this.doc.getLine(o).length;this.moveCursorTo(o,r)},n.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},n.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,r=this.lead.column,i=this.doc.getLine(o),e=i.substring(r);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var t=this.session.getFoldAt(o,r,1);if(t){this.moveCursorTo(t.end.row,t.end.column);return}if(this.session.nonTokenRe.exec(e)&&(r+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=i.substring(r)),r>=i.length){this.moveCursorTo(o,i.length),this.moveCursorRight(),o<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(r+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,r)},n.prototype.moveCursorLongWordLeft=function(){var o=this.lead.row,r=this.lead.column,i;if(i=this.session.getFoldAt(o,r,-1)){this.moveCursorTo(i.start.row,i.start.column);return}var e=this.session.getFoldStringAt(o,r,-1);e==null&&(e=this.doc.getLine(o).substring(0,r));var t=p.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(t)&&(r-=this.session.nonTokenRe.lastIndex,t=t.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),r<=0){this.moveCursorTo(o,0),this.moveCursorLeft(),o>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(t)&&(r-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,r)},n.prototype.$shortWordEndIndex=function(o){var r=0,i,e=/\s/,t=this.session.tokenRe;if(t.lastIndex=0,this.session.tokenRe.exec(o))r=this.session.tokenRe.lastIndex;else{for(;(i=o[r])&&e.test(i);)r++;if(r<1){for(t.lastIndex=0;(i=o[r])&&!t.test(i);)if(t.lastIndex=0,r++,e.test(i))if(r>2){r--;break}else{for(;(i=o[r])&&e.test(i);)r++;if(r>2)break}}}return t.lastIndex=0,r},n.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,r=this.lead.column,i=this.doc.getLine(o),e=i.substring(r),t=this.session.getFoldAt(o,r,1);if(t)return this.moveCursorTo(t.end.row,t.end.column);if(r==i.length){var a=this.doc.getLength();do o++,e=this.doc.getLine(o);while(o<a&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),r=0}var d=this.$shortWordEndIndex(e);this.moveCursorTo(o,r+d)},n.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,r=this.lead.column,i;if(i=this.session.getFoldAt(o,r,-1))return this.moveCursorTo(i.start.row,i.start.column);var e=this.session.getLine(o).substring(0,r);if(r===0){do o--,e=this.doc.getLine(o);while(o>0&&/^\s*$/.test(e));r=e.length,/\s+$/.test(e)||(e="")}var t=p.stringReverse(e),a=this.$shortWordEndIndex(t);return this.moveCursorTo(o,r-a)},n.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},n.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},n.prototype.moveCursorBy=function(o,r){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(r===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var t=this.session.lineWidgets[this.lead.row];o<0?o-=t.rowsAbove||0:o>0&&(o+=t.rowCount-(t.rowsAbove||0))}var a=this.session.screenToDocumentPosition(i.row+o,i.column,e);o!==0&&r===0&&a.row===this.lead.row&&(a.column,this.lead.column),this.moveCursorTo(a.row,a.column+r,r===0)},n.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},n.prototype.moveCursorTo=function(o,r,i){var e=this.session.getFoldAt(o,r,1);e&&(o=e.start.row,r=e.start.column),this.$keepDesiredColumnOnChange=!0;var t=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(t.charAt(r))&&t.charAt(r-1)&&(this.lead.row==o&&this.lead.column==r+1?r=r-1:r=r+1),this.lead.setPosition(o,r),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},n.prototype.moveCursorToScreen=function(o,r,i){var e=this.session.screenToDocumentPosition(o,r);this.moveCursorTo(e.row,e.column,i)},n.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},n.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},n.prototype.toOrientedRange=function(o){var r=this.getRange();return o?(o.start.column=r.start.column,o.start.row=r.start.row,o.end.column=r.end.column,o.end.row=r.end.row):o=r,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},n.prototype.getRangeOfMovements=function(o){var r=this.getCursor();try{o(this);var i=this.getCursor();return s.fromPoints(r,i)}catch{return s.fromPoints(r,r)}finally{this.moveCursorToPosition(r)}},n.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(r){var i=r.clone();return i.isBackwards=r.cursor==r.start,i});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o},n.prototype.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var r=o.length;r--;){var i=s.fromPoints(o[r].start,o[r].end);o[r].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},n.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 r=this.ranges.length;r--;)if(!this.ranges[r].isEqual(o[r]))return!1;return!0},n})();c.prototype.setSelectionAnchor=c.prototype.setAnchor,c.prototype.getSelectionAnchor=c.prototype.getAnchor,c.prototype.setSelectionRange=c.prototype.setRange,y.implement(c.prototype,v),g.Selection=c}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(u,g,E){var y=u("./lib/report_error").reportError,p=2e3,v=(function(){function s(c){this.splitRegex,this.states=c,this.regExps={},this.matchMappings={};for(var n in this.states){for(var o=this.states[n],r=[],i=0,e=this.matchMappings[n]={defaultToken:"text"},t="g",a=[],d=0;d<o.length;d++){var f=o[d];if(f.defaultToken&&(e.defaultToken=f.defaultToken),f.caseInsensitive&&t.indexOf("i")===-1&&(t+="i"),f.unicode&&t.indexOf("u")===-1&&(t+="u"),f.regex!=null){f.regex instanceof RegExp&&(f.regex=f.regex.toString().slice(1,-1));var S=f.regex,$=new RegExp("(?:("+S+")|(.))").exec("a").length-2;Array.isArray(f.token)?f.token.length==1||$==1?f.token=f.token[0]:$-1!=f.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:f,groupCount:$-1}),f.token=f.token[0]):(f.tokenArray=f.token,f.token=null,f.onMatch=this.$arrayTokens):typeof f.token=="function"&&!f.onMatch&&($>1?f.onMatch=this.$applyToken:f.onMatch=f.token),$>1&&(/\\\d/.test(f.regex)?S=f.regex.replace(/\\([0-9]+)/g,function(C,w){return"\\"+(parseInt(w,10)+i+1)}):($=1,S=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&a.push(f)),e[i]=d,i+=$,r.push(S),f.onMatch||(f.onMatch=null)}}r.length||(e[0]=0,r.push("$")),a.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,t)},this),this.regExps[n]=new RegExp("("+r.join(")|(")+")|($)",t)}}return s.prototype.$setMaxTokenCount=function(c){p=c|0},s.prototype.$applyToken=function(c){var n=this.splitRegex.exec(c).slice(1),o=this.token.apply(this,n);if(typeof o=="string")return[{type:o,value:c}];for(var r=[],i=0,e=o.length;i<e;i++)n[i]&&(r[r.length]={type:o[i],value:n[i]});return r},s.prototype.$arrayTokens=function(c){if(!c)return[];var n=this.splitRegex.exec(c);if(!n)return"text";for(var o=[],r=this.tokenArray,i=0,e=r.length;i<e;i++)n[i+1]&&(o[o.length]={type:r[i],value:n[i+1]});return o},s.prototype.removeCapturingGroups=function(c){var n=c.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(o,r){return r?"(?:":o});return n},s.prototype.createSplitterRegexp=function(c,n){if(c.indexOf("(?=")!=-1){var o=0,r=!1,i={};c.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,a,d,f,S){return r?r=f!="]":f?r=!0:d?(o==i.stack&&(i.end=S+1,i.stack=-1),o--):a&&(o++,a.length!=1&&(i.stack=o,i.start=S)),e}),i.end!=null&&/^\)*$/.test(c.substr(i.end))&&(c=c.substring(0,i.start)+c.substr(i.end))}return c.charAt(0)!="^"&&(c="^"+c),c.charAt(c.length-1)!="$"&&(c+="$"),new RegExp(c,(n||"").replace("g",""))},s.prototype.getLineTokens=function(c,n){if(n&&typeof n!="string"){var o=n.slice(0);n=o[0],n==="#tmp"&&(o.shift(),n=o.shift())}else var o=[];var r=n||"start",i=this.states[r];i||(r="start",i=this.states[r]);var e=this.matchMappings[r],t=this.regExps[r];t.lastIndex=0;for(var a,d=[],f=0,S=0,$={type:null,value:""};a=t.exec(c);){var C=e.defaultToken,w=null,M=a[0],R=t.lastIndex;if(R-M.length>f){var T=c.substring(f,R-M.length);$.type==C?$.value+=T:($.type&&d.push($),$={type:C,value:T})}for(var k=0;k<a.length-2;k++)if(a[k+1]!==void 0){w=i[e[k]],w.onMatch?C=w.onMatch(M,r,o,c):C=w.token,w.next&&(typeof w.next=="string"?r=w.next:r=w.next(r,o),i=this.states[r],i||(this.reportError("state doesn't exist",r),r="start",i=this.states[r]),e=this.matchMappings[r],f=R,t=this.regExps[r],t.lastIndex=R),w.consumeLineEnd&&(f=R);break}if(M){if(typeof C=="string")(!w||w.merge!==!1)&&$.type===C?$.value+=M:($.type&&d.push($),$={type:C,value:M});else if(C){$.type&&d.push($),$={type:null,value:""};for(var k=0;k<C.length;k++)d.push(C[k])}}if(f==c.length)break;if(f=R,S++>p){for(S>2*c.length&&this.reportError("infinite loop with in ace tokenizer",{startState:n,line:c});f<c.length;)$.type&&d.push($),$={value:c.substring(f,f+=500),type:"overflow"};r="start",o=[];break}}return $.type&&d.push($),o.length>1&&o[0]!==r&&o.unshift("#tmp",r),{tokens:d,state:o.length?o:r}},s})();v.prototype.reportError=y,g.Tokenizer=v}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(u,g,E){var y=u("../lib/deep_copy").deepCopy,p;p=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(c,n){if(!n){for(var o in c)this.$rules[o]=c[o];return}for(var o in c){for(var r=c[o],i=0;i<r.length;i++){var e=r[i];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(n)!==0&&(e.next=n+e.next),e.nextState&&e.nextState.indexOf(n)!==0&&(e.nextState=n+e.nextState))}this.$rules[n+o]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(c,n,o,r,i){var e=typeof c=="function"?new c().getRules():c;if(r)for(var t=0;t<r.length;t++)r[t]=n+r[t];else{r=[];for(var a in e)r.push(n+a)}if(this.addRules(e,n),o)for(var d=Array.prototype[i?"push":"unshift"],t=0;t<r.length;t++)d.apply(this.$rules[r[t]],y(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(n)},this.getEmbeds=function(){return this.$embeds};var v=function(c,n){return(c!="start"||n.length)&&n.unshift(this.nextState,c),this.nextState},s=function(c,n){return n.shift(),n.shift()||"start"};this.normalizeRules=function(){var c=0,n=this.$rules;function o(r){var i=n[r];i.processed=!0;for(var e=0;e<i.length;e++){var t=i[e],a=null;Array.isArray(t)&&(a=t,t={}),!t.regex&&t.start&&(t.regex=t.start,t.next||(t.next=[]),t.next.push({defaultToken:t.token},{token:t.token+".end",regex:t.end||t.start,next:"pop"}),t.token=t.token+".start",t.push=!0);var d=t.next||t.push;if(d&&Array.isArray(d)){var f=t.stateName;f||(f=t.token,typeof f!="string"&&(f=f[0]||""),n[f]&&(f+=c++)),n[f]=d,t.next=f,o(f)}else d=="pop"&&(t.next=s);if(t.push&&(t.nextState=t.next||t.push,t.next=v,delete t.push),t.rules)for(var S in t.rules)n[S]?n[S].push&&n[S].push.apply(n[S],t.rules[S]):n[S]=t.rules[S];var $=typeof t=="string"?t:t.include;if($&&($==="$self"&&($="start"),Array.isArray($)?a=$.map(function(w){return n[w]}):a=n[$]),a){var C=[e,1].concat(a);t.noEscape&&(C=C.filter(function(w){return!w.next})),i.splice.apply(i,C),e--}t.keywordMap&&(t.token=this.createKeywordMapper(t.keywordMap,t.defaultToken||"text",t.caseInsensitive),delete t.defaultToken)}}Object.keys(n).forEach(o,this)},this.createKeywordMapper=function(c,n,o,r){var i=Object.create(null);return this.$keywordList=[],Object.keys(c).forEach(function(e){for(var t=c[e],a=t.split(r||"|"),d=a.length;d--;){var f=a[d];this.$keywordList.push(f),o&&(f=f.toLowerCase()),i[f]=e}},this),c=null,o?function(e){return i[e.toLowerCase()]||n}:function(e){return i[e]||n}},this.getKeywords=function(){return this.$keywords}}).call(p.prototype),g.TextHighlightRules=p}),ace.define("ace/mode/behaviour",["require","exports","module"],function(u,g,E){var y;y=function(){this.$behaviours={}},(function(){this.add=function(p,v,s){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[p]:this.$behaviours[p]={}}this.$behaviours[p][v]=s},this.addBehaviours=function(p){for(var v in p)for(var s in p[v])this.add(v,s,p[v][s])},this.remove=function(p){this.$behaviours&&this.$behaviours[p]&&delete this.$behaviours[p]},this.inherit=function(p,v){if(typeof p=="function")var s=new p().getBehaviours(v);else var s=p.getBehaviours(v);this.addBehaviours(s)},this.getBehaviours=function(p){if(p){for(var v={},s=0;s<p.length;s++)this.$behaviours[p[s]]&&(v[p[s]]=this.$behaviours[p[s]]);return v}else return this.$behaviours}}).call(y.prototype),g.Behaviour=y}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(u,g,E){var y=u("./range").Range,p=(function(){function v(s,c,n){this.$session=s,this.$row=c,this.$rowTokens=s.getTokens(c);var o=s.getTokenAt(c,n);this.$tokenIndex=o?o.index:-1}return v.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]},v.prototype.stepForward=function(){this.$tokenIndex+=1;for(var s;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,s||(s=this.$session.getLength()),this.$row>=s)return this.$row=s-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},v.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},v.prototype.getCurrentTokenRow=function(){return this.$row},v.prototype.getCurrentTokenColumn=function(){var s=this.$rowTokens,c=this.$tokenIndex,n=s[c].start;if(n!==void 0)return n;for(n=0;c>0;)c-=1,n+=s[c].value.length;return n},v.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},v.prototype.getCurrentTokenRange=function(){var s=this.$rowTokens[this.$tokenIndex],c=this.getCurrentTokenColumn();return new y(this.$row,c,this.$row,c+s.value.length)},v})();g.TokenIterator=p}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(u,g,E){var y=u("../../lib/oop"),p=u("../behaviour").Behaviour,v=u("../../token_iterator").TokenIterator,s=u("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],n=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,r={},i={'"':'"',"'":"'"},e=function(d){var f=-1;if(d.multiSelect&&(f=d.selection.index,r.rangeCount!=d.multiSelect.rangeCount&&(r={rangeCount:d.multiSelect.rangeCount})),r[f])return o=r[f];o=r[f]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},t=function(d,f,S,$){var C=d.end.row-d.start.row;return{text:S+f+$,selection:[0,d.start.column+1,C,d.end.column+(C?0:1)]}},a;a=function(d){d=d||{},this.add("braces","insertion",function(f,S,$,C,w){var M=$.getCursorPosition(),R=C.doc.getLine(M.row);if(w=="{"){e($);var T=$.getSelectionRange(),k=C.doc.getTextRange(T),O=C.getTokenAt(M.row,M.column);if(k!==""&&k!=="{"&&$.getWrapBehavioursEnabled())return t(T,k,"{","}");if(O&&/(?:string)\.quasi|\.xml/.test(O.type)){var A=[/tag\-(?:open|name)/,/attribute\-name/];return A.some(function(D){return D.test(O.type)})||/(string)\.quasi/.test(O.type)&&O.value[M.column-O.start-1]!=="$"?void 0:(a.recordAutoInsert($,C,"}"),{text:"{}",selection:[1,1]})}else if(a.isSaneInsertion($,C))return/[\]\}\)]/.test(R[M.column])||$.inMultiSelectMode||d.braces?(a.recordAutoInsert($,C,"}"),{text:"{}",selection:[1,1]}):(a.recordMaybeInsert($,C,"{"),{text:"{",selection:[1,1]})}else if(w=="}"){e($);var x=R.substring(M.column,M.column+1);if(x=="}"){var b=C.$findOpeningBracket("}",{column:M.column+1,row:M.row});if(b!==null&&a.isAutoInsertedClosing(M,R,w))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(w==`
177
+ `||w==`\r
178
+ `){e($);var m="";a.isMaybeInsertedClosing(M,R)&&(m=s.stringRepeat("}",o.maybeInsertedBrackets),a.clearMaybeInsertedClosing());var x=R.substring(M.column,M.column+1);if(x==="}"){var _=C.findMatchingBracket({row:M.row,column:M.column+1},"}");if(!_)return null;var L=this.$getIndent(C.getLine(_.row))}else if(m)var L=this.$getIndent(R);else{a.clearMaybeInsertedClosing();return}var I=L+C.getTabString();return{text:`
179
+ `+I+`
180
+ `+L+m,selection:[1,I.length,1,I.length]}}else a.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(f,S,$,C,w){var M=C.doc.getTextRange(w);if(!w.isMultiLine()&&M=="{"){e($);var R=C.doc.getLine(w.start.row),T=R.substring(w.end.column,w.end.column+1);if(T=="}")return w.end.column++,w;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(f,S,$,C,w){if(w=="("){e($);var M=$.getSelectionRange(),R=C.doc.getTextRange(M);if(R!==""&&$.getWrapBehavioursEnabled())return t(M,R,"(",")");if(a.isSaneInsertion($,C))return a.recordAutoInsert($,C,")"),{text:"()",selection:[1,1]}}else if(w==")"){e($);var T=$.getCursorPosition(),k=C.doc.getLine(T.row),O=k.substring(T.column,T.column+1);if(O==")"){var A=C.$findOpeningBracket(")",{column:T.column+1,row:T.row});if(A!==null&&a.isAutoInsertedClosing(T,k,w))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(f,S,$,C,w){var M=C.doc.getTextRange(w);if(!w.isMultiLine()&&M=="("){e($);var R=C.doc.getLine(w.start.row),T=R.substring(w.start.column+1,w.start.column+2);if(T==")")return w.end.column++,w}}),this.add("brackets","insertion",function(f,S,$,C,w){if(w=="["){e($);var M=$.getSelectionRange(),R=C.doc.getTextRange(M);if(R!==""&&$.getWrapBehavioursEnabled())return t(M,R,"[","]");if(a.isSaneInsertion($,C))return a.recordAutoInsert($,C,"]"),{text:"[]",selection:[1,1]}}else if(w=="]"){e($);var T=$.getCursorPosition(),k=C.doc.getLine(T.row),O=k.substring(T.column,T.column+1);if(O=="]"){var A=C.$findOpeningBracket("]",{column:T.column+1,row:T.row});if(A!==null&&a.isAutoInsertedClosing(T,k,w))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(f,S,$,C,w){var M=C.doc.getTextRange(w);if(!w.isMultiLine()&&M=="["){e($);var R=C.doc.getLine(w.start.row),T=R.substring(w.start.column+1,w.start.column+2);if(T=="]")return w.end.column++,w}}),this.add("string_dquotes","insertion",function(f,S,$,C,w){var M=C.$mode.$quotes||i;if(w.length==1&&M[w]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(w)!=-1)return;e($);var R=w,T=$.getSelectionRange(),k=C.doc.getTextRange(T);if(k!==""&&(k.length!=1||!M[k])&&$.getWrapBehavioursEnabled())return t(T,k,R,R);if(!k){var O=$.getCursorPosition(),A=C.doc.getLine(O.row),x=A.substring(O.column-1,O.column),b=A.substring(O.column,O.column+1),m=C.getTokenAt(O.row,O.column),_=C.getTokenAt(O.row,O.column+1);if(x=="\\"&&m&&/escape/.test(m.type))return null;var L=m&&/string|escape/.test(m.type),I=!_||/string|escape/.test(_.type),D;if(b==R)D=L!==I,D&&/string\.end/.test(_.type)&&(D=!1);else{if(L&&!I||L&&I)return null;var N=C.$mode.tokenRe;N.lastIndex=0;var F=N.test(x);N.lastIndex=0;var U=N.test(b),W=C.$mode.$pairQuotesAfter,z=W&&W[R]&&W[R].test(x);if(!z&&F||U||b&&!/[\s;,.})\]\\]/.test(b))return null;var H=A[O.column-2];if(x==R&&(H==R||N.test(H)))return null;D=!0}return{text:D?R+R:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(f,S,$,C,w){var M=C.$mode.$quotes||i,R=C.doc.getTextRange(w);if(!w.isMultiLine()&&M.hasOwnProperty(R)){e($);var T=C.doc.getLine(w.start.row),k=T.substring(w.start.column+1,w.start.column+2);if(k==R)return w.end.column++,w}}),d.closeDocComment!==!1&&this.add("doc comment end","insertion",function(f,S,$,C,w){if(f==="doc-start"&&(w===`
181
+ `||w===`\r
182
+ `)&&$.selection.isEmpty()){var M=$.getCursorPosition();if(M.column===0)return;for(var R=C.doc.getLine(M.row),T=C.doc.getLine(M.row+1),k=C.getTokens(M.row),O=0,A=0;A<k.length;A++){O+=k[A].value.length;var x=k[A];if(O>=M.column){if(O===M.column){if(!/\.doc/.test(x.type))return;if(/\*\//.test(x.value)){var b=k[A+1];if(!b||!/\.doc/.test(b.type))return}}var m=M.column-(O-x.value.length),_=x.value.indexOf("*/"),L=x.value.indexOf("/**",_>-1?_+2:0);if(L!==-1&&m>L&&m<L+3||_!==-1&&L!==-1&&m>=_&&m<=L||!/\.doc/.test(x.type))return;break}}var I=this.$getIndent(R);if(/\s*\*/.test(T))return/^\s*\*/.test(R)?{text:w+I+"* ",selection:[1,2+I.length,1,2+I.length]}:{text:w+I+" * ",selection:[1,3+I.length,1,3+I.length]};if(/\/\*\*/.test(R.substring(0,M.column)))return{text:w+I+" * "+w+" "+I+"*/",selection:[1,4+I.length,1,4+I.length]}}})},a.isSaneInsertion=function(d,f){var S=d.getCursorPosition(),$=new v(f,S.row,S.column);if(!this.$matchTokenType($.getCurrentToken()||"text",c)){if(/[)}\]]/.test(d.session.getLine(S.row)[S.column]))return!0;var C=new v(f,S.row,S.column+1);if(!this.$matchTokenType(C.getCurrentToken()||"text",c))return!1}return $.stepForward(),$.getCurrentTokenRow()!==S.row||this.$matchTokenType($.getCurrentToken()||"text",n)},a.$matchTokenType=function(d,f){return f.indexOf(d.type||d)>-1},a.recordAutoInsert=function(d,f,S){var $=d.getCursorPosition(),C=f.doc.getLine($.row);this.isAutoInsertedClosing($,C,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=$.row,o.autoInsertedLineEnd=S+C.substr($.column),o.autoInsertedBrackets++},a.recordMaybeInsert=function(d,f,S){var $=d.getCursorPosition(),C=f.doc.getLine($.row);this.isMaybeInsertedClosing($,C)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=$.row,o.maybeInsertedLineStart=C.substr(0,$.column)+S,o.maybeInsertedLineEnd=C.substr($.column),o.maybeInsertedBrackets++},a.isAutoInsertedClosing=function(d,f,S){return o.autoInsertedBrackets>0&&d.row===o.autoInsertedRow&&S===o.autoInsertedLineEnd[0]&&f.substr(d.column)===o.autoInsertedLineEnd},a.isMaybeInsertedClosing=function(d,f){return o.maybeInsertedBrackets>0&&d.row===o.maybeInsertedRow&&f.substr(d.column)===o.maybeInsertedLineEnd&&f.substr(0,d.column)==o.maybeInsertedLineStart},a.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},a.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},y.inherits(a,p),g.CstyleBehaviour=a}),ace.define("ace/unicode",["require","exports","module"],function(u,g,E){for(var y=[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],p=0,v=[],s=0;s<y.length;s+=2)v.push(p+=y[s]),y[s+1]&&v.push(45,p+=y[s+1]);g.wordChars=String.fromCharCode.apply(null,v)}),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(u,g,E){var y=u("../config"),p=u("../tokenizer").Tokenizer,v=u("./text_highlight_rules").TextHighlightRules,s=u("./behaviour/cstyle").CstyleBehaviour,c=u("../unicode"),n=u("../lib/lang"),o=u("../token_iterator").TokenIterator,r=u("../range").Range,i;i=function(){this.HighlightRules=v},(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+c.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+c.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new p(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,a,d){var f=t.doc,S=!0,$=!0,C=1/0,w=t.getTabSize(),M=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var k=this.lineCommentStart.map(n.escapeRegExp).join("|"),R=this.lineCommentStart[0];else var k=n.escapeRegExp(this.lineCommentStart),R=this.lineCommentStart;k=new RegExp("^(\\s*)(?:"+k+") ?"),M=t.getUseSoftTabs();var x=function(U,W){var z=U.match(k);if(z){var H=z[1].length,B=z[0].length;!_(U,H,B)&&z[0][B-1]==" "&&B--,f.removeInLine(W,H,B)}},m=R+" ",A=function(U,W){(!S||/\S/.test(U))&&(_(U,C,C)?f.insertInLine({row:W,column:C},m):f.insertInLine({row:W,column:C},R))},b=function(U,W){return k.test(U)},_=function(U,W,z){for(var H=0;W--&&U.charAt(W)==" ";)H++;if(H%w!=0)return!1;for(var H=0;U.charAt(z++)==" ";)H++;return w>2?H%w!=w-1:H%w==0}}else{if(!this.blockComment)return!1;var R=this.blockComment.start,T=this.blockComment.end,k=new RegExp("^(\\s*)(?:"+n.escapeRegExp(R)+")"),O=new RegExp("(?:"+n.escapeRegExp(T)+")\\s*$"),A=function(D,N){b(D,N)||(!S||/\S/.test(D))&&(f.insertInLine({row:N,column:D.length},T),f.insertInLine({row:N,column:C},R))},x=function(D,N){var F;(F=D.match(O))&&f.removeInLine(N,D.length-F[0].length,D.length),(F=D.match(k))&&f.removeInLine(N,F[1].length,F[0].length)},b=function(D,N){if(k.test(D))return!0;for(var F=t.getTokens(N),U=0;U<F.length;U++)if(F[U].type==="comment")return!0}}function L(D){for(var N=a;N<=d;N++)D(f.getLine(N),N)}var I=1/0;L(function(D,N){var F=D.search(/\S/);F!==-1?(F<C&&(C=F),$&&!b(D,N)&&($=!1)):I>D.length&&(I=D.length)}),C==1/0&&(C=I,S=!1,$=!1),M&&C%w!=0&&(C=Math.floor(C/w)*w),L($?x:A)},this.toggleBlockComment=function(e,t,a,d){var f=this.blockComment;if(f){!f.start&&f[0]&&(f=f[0]);var S=new o(t,d.row,d.column),$=S.getCurrentToken();t.selection;var C=t.selection.toOrientedRange(),w,M;if($&&/comment/.test($.type)){for(var R,T;$&&/comment/.test($.type);){var k=$.value.indexOf(f.start);if(k!=-1){var O=S.getCurrentTokenRow(),A=S.getCurrentTokenColumn()+k;R=new r(O,A,O,A+f.start.length);break}$=S.stepBackward()}for(var S=new o(t,d.row,d.column),$=S.getCurrentToken();$&&/comment/.test($.type);){var k=$.value.indexOf(f.end);if(k!=-1){var O=S.getCurrentTokenRow(),A=S.getCurrentTokenColumn()+k;T=new r(O,A,O,A+f.end.length);break}$=S.stepForward()}T&&t.remove(T),R&&(t.remove(R),w=R.start.row,M=-f.start.length)}else M=f.start.length,w=a.start.row,t.insert(a.end,f.end),t.insert(a.start,f.start);C.start.row==w&&(C.start.column+=M),C.end.row==w&&(C.end.column+=M),t.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(e,t,a){return this.$getIndent(t)},this.checkOutdent=function(e,t,a){return!1},this.autoOutdent=function(e,t,a){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)if(e[t]){var a=e[t],d=a.prototype.$id,f=y.$modes[d];f||(y.$modes[d]=f=new a),y.$modes[t]||(y.$modes[t]=f),this.$embeds.push(t),this.$modes[t]=f}for(var S=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(w){(function(M){var R=S[w],T=M[R];M[S[w]]=function(){return this.$delegator(R,arguments,T)}})(C)},C=this,t=0;t<S.length;t++)$(t)},this.$delegator=function(e,t,a){var d=t[0]||"start";if(typeof d!="string"){if(Array.isArray(d[2])){var f=d[2][d[2].length-1],S=this.$modes[f];if(S)return S[e].apply(S,[d[1]].concat([].slice.call(t,1)))}d=d[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var C=d.split(this.$embeds[$]);if(!C[0]&&C[1]){t[0]=C[1];var S=this.$modes[this.$embeds[$]];return S[e].apply(S,t)}}var w=a.apply(this,t);return a?w:void 0},this.transformAction=function(e,t,a,d,f){if(this.$behaviour){var S=this.$behaviour.getBehaviours();for(var $ in S)if(S[$][t]){var C=S[$][t].apply(this,arguments);if(C)return C}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,a=[];for(var d in t)for(var f=t[d],S=0,$=f.length;S<$;S++)if(typeof f[S].token=="string")/keyword|support|storage/.test(f[S].token)&&a.push(f[S].regex);else if(typeof f[S].token=="object"){for(var C=0,w=f[S].token.length;C<w;C++)if(/keyword|support|storage/.test(f[S].token[C])){var d=f[S].regex.match(/\(.+?\)/g)[C];a.push(d.substr(1,d.length-2))}}this.completionKeywords=a}return e?a.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,a,d){var f=this.$keywordList||this.$createKeywordList();return f.map(function(S){return{name:S,value:S,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(i.prototype),g.Mode=i}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(u,g,E){var y=u("./lib/dom"),p=(function(){function v(s){this.session=s,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 v.prototype.getRowLength=function(s){var c;return this.lineWidgets?c=this.lineWidgets[s]&&this.lineWidgets[s].rowCount||0:c=0,!this.$useWrapMode||!this.$wrapData[s]?1+c:this.$wrapData[s].length+1+c},v.prototype.$getWidgetScreenLength=function(){var s=0;return this.lineWidgets.forEach(function(c){c&&c.rowCount&&!c.hidden&&(s+=c.rowCount)}),s},v.prototype.$onChangeEditor=function(s){this.attach(s.editor)},v.prototype.attach=function(s){s&&s.widgetManager&&s.widgetManager!=this&&s.widgetManager.detach(),this.editor!=s&&(this.detach(),this.editor=s,s&&(s.widgetManager=this,s.renderer.on("beforeRender",this.measureWidgets),s.renderer.on("afterRender",this.renderWidgets)))},v.prototype.detach=function(s){var c=this.editor;if(c){this.editor=null,c.widgetManager=null,c.renderer.off("beforeRender",this.measureWidgets),c.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(o){o&&o.el&&o.el.parentNode&&(o._inDocument=!1,o.el.parentNode.removeChild(o.el))})}},v.prototype.updateOnFold=function(s,c){var n=c.lineWidgets;if(!(!n||!s.action)){for(var o=s.data,r=o.start.row,i=o.end.row,e=s.action=="add",t=r+1;t<i;t++)n[t]&&(n[t].hidden=e);n[i]&&(e?n[r]?n[i].hidden=e:n[r]=n[i]:(n[r]==n[i]&&(n[r]=void 0),n[i].hidden=e))}},v.prototype.updateOnChange=function(s){var c=this.session.lineWidgets;if(c){var n=s.start.row,o=s.end.row-n;if(o!==0)if(s.action=="remove"){var r=c.splice(n+1,o);!c[n]&&r[r.length-1]&&(c[n]=r.pop()),r.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var i=new Array(o);c[n]&&c[n].column!=null&&s.start.column>c[n].column&&n++,i.unshift(n,0),c.splice.apply(c,i),this.$updateRows()}}},v.prototype.$updateRows=function(){var s=this.session.lineWidgets;if(s){var c=!0;s.forEach(function(n,o){if(n)for(c=!1,n.row=o;n.$oldWidget;)n.$oldWidget.row=o,n=n.$oldWidget}),c&&(this.session.lineWidgets=null)}},v.prototype.$registerLineWidget=function(s){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var c=this.session.lineWidgets[s.row];return c&&(s.$oldWidget=c,c.el&&c.el.parentNode&&(c.el.parentNode.removeChild(c.el),c._inDocument=!1)),this.session.lineWidgets[s.row]=s,s},v.prototype.addLineWidget=function(s){if(this.$registerLineWidget(s),s.session=this.session,!this.editor)return s;var c=this.editor.renderer;s.html&&!s.el&&(s.el=y.createElement("div"),s.el.innerHTML=s.html),s.text&&!s.el&&(s.el=y.createElement("div"),s.el.textContent=s.text),s.el&&(y.addCssClass(s.el,"ace_lineWidgetContainer"),s.className&&y.addCssClass(s.el,s.className),s.el.style.position="absolute",s.el.style.zIndex="5",c.container.appendChild(s.el),s._inDocument=!0,s.coverGutter||(s.el.style.zIndex="3"),s.pixelHeight==null&&(s.pixelHeight=s.el.offsetHeight)),s.rowCount==null&&(s.rowCount=s.pixelHeight/c.layerConfig.lineHeight);var n=this.session.getFoldAt(s.row,0);if(s.$fold=n,n){var o=this.session.lineWidgets;s.row==n.end.row&&!o[n.start.row]?o[n.start.row]=s:s.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows(),this.renderWidgets(null,c),this.onWidgetChanged(s),s},v.prototype.removeLineWidget=function(s){if(s._inDocument=!1,s.session=null,s.el&&s.el.parentNode&&s.el.parentNode.removeChild(s.el),s.editor&&s.editor.destroy)try{s.editor.destroy()}catch{}if(this.session.lineWidgets){var c=this.session.lineWidgets[s.row];if(c==s)this.session.lineWidgets[s.row]=s.$oldWidget,s.$oldWidget&&this.onWidgetChanged(s.$oldWidget);else for(;c;){if(c.$oldWidget==s){c.$oldWidget=s.$oldWidget;break}c=c.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows()},v.prototype.getWidgetsAtRow=function(s){for(var c=this.session.lineWidgets,n=c&&c[s],o=[];n;)o.push(n),n=n.$oldWidget;return o},v.prototype.onWidgetChanged=function(s){this.session._changedWidgets.push(s),this.editor&&this.editor.renderer.updateFull()},v.prototype.measureWidgets=function(s,c){var n=this.session._changedWidgets,o=c.layerConfig;if(!(!n||!n.length)){for(var r=1/0,i=0;i<n.length;i++){var e=n[i];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,c.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/o.characterWidth));var t=e.h/o.lineHeight;e.coverLine&&(t-=this.session.getRowLineCount(e.row),t<0&&(t=0)),e.rowCount!=t&&(e.rowCount=t,e.row<r&&(r=e.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},v.prototype.renderWidgets=function(s,c){var n=c.layerConfig,o=this.session.lineWidgets;if(o){for(var r=Math.min(this.firstRow,n.firstRow),i=Math.max(this.lastRow,n.lastRow,o.length);r>0&&!o[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,c.$cursorLayer.config=n;for(var e=r;e<=i;e++){var t=o[e];if(!(!t||!t.el)){if(t.hidden){t.el.style.top=-100-(t.pixelHeight||0)+"px";continue}t._inDocument||(t._inDocument=!0,c.container.appendChild(t.el));var a=c.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;t.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(t.row)),t.el.style.top=a-n.offset+"px";var d=t.coverGutter?0:c.gutterWidth;t.fixedWidth||(d-=c.scrollLeft),t.el.style.left=d+"px",t.fullWidth&&t.screenWidth&&(t.el.style.minWidth=n.width+2*n.padding+"px"),t.fixedWidth?t.el.style.right=c.scrollBar.getWidth()+"px":t.el.style.right=""}}}},v})();g.LineWidgets=p}),ace.define("ace/apply_delta",["require","exports","module"],function(u,g,E){g.applyDelta=function(y,p,v){var s=p.start.row,c=p.start.column,n=y[s]||"";switch(p.action){case"insert":var o=p.lines;if(o.length===1)y[s]=n.substring(0,c)+p.lines[0]+n.substring(c);else{var r=[s,1].concat(p.lines);y.splice.apply(y,r),y[s]=n.substring(0,c)+y[s],y[s+p.lines.length-1]+=n.substring(c)}break;case"remove":var i=p.end.column,e=p.end.row;s===e?y[s]=n.substring(0,c)+n.substring(i):y.splice(s,e-s+1,n.substring(0,c)+y[e].substring(i));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(u,g,E){var y=u("./lib/oop"),p=u("./lib/event_emitter").EventEmitter,v=(function(){function n(o,r,i){this.$onChange=this.onChange.bind(this),this.attach(o),typeof r!="number"?this.setPosition(r.row,r.column):this.setPosition(r,i)}return n.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},n.prototype.getDocument=function(){return this.document},n.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var r=c(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(r.row,r.column,!0)}},n.prototype.setPosition=function(o,r,i){var e;if(i?e={row:o,column:r}:e=this.$clipPositionToDocument(o,r),!(this.row==e.row&&this.column==e.column)){var t={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:t,value:e})}},n.prototype.detach=function(){this.document.off("change",this.$onChange)},n.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},n.prototype.$clipPositionToDocument=function(o,r){var i={};return o>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):o<0?(i.row=0,i.column=0):(i.row=o,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,r))),r<0&&(i.column=0),i},n})();v.prototype.$insertRight=!1,y.implement(v.prototype,p);function s(n,o,r){var i=r?n.column<=o.column:n.column<o.column;return n.row<o.row||n.row==o.row&&i}function c(n,o,r){var i=n.action=="insert",e=(i?1:-1)*(n.end.row-n.start.row),t=(i?1:-1)*(n.end.column-n.start.column),a=n.start,d=i?a:n.end;return s(o,a,r)?{row:o.row,column:o.column}:s(d,o,!r)?{row:o.row+e,column:o.column+(o.row==d.row?t:0)}:{row:a.row,column:a.column}}g.Anchor=v}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(u,g,E){var y=u("./lib/oop"),p=u("./apply_delta").applyDelta,v=u("./lib/event_emitter").EventEmitter,s=u("./range").Range,c=u("./anchor").Anchor,n=(function(){function o(r){this.$lines=[""],r.length===0?this.$lines=[""]:Array.isArray(r)?this.insertMergedLines({row:0,column:0},r):this.insert({row:0,column:0},r)}return o.prototype.setValue=function(r){var i=this.getLength()-1;this.remove(new s(0,0,i,this.getLine(i).length)),this.insert({row:0,column:0},r||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(r,i){return new c(this,r,i)},o.prototype.$detectNewLine=function(r){var i=r.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=i?i[1]:`
183
+ `,this._signal("changeNewLineMode")},o.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
184
+ `;case"unix":return`
185
+ `;default:return this.$autoNewLine||`
186
+ `}},o.prototype.setNewLineMode=function(r){this.$newLineMode!==r&&(this.$newLineMode=r,this._signal("changeNewLineMode"))},o.prototype.getNewLineMode=function(){return this.$newLineMode},o.prototype.isNewLine=function(r){return r==`\r
187
+ `||r=="\r"||r==`
188
+ `},o.prototype.getLine=function(r){return this.$lines[r]||""},o.prototype.getLines=function(r,i){return this.$lines.slice(r,i+1)},o.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},o.prototype.getLength=function(){return this.$lines.length},o.prototype.getTextRange=function(r){return this.getLinesForRange(r).join(this.getNewLineCharacter())},o.prototype.getLinesForRange=function(r){var i;if(r.start.row===r.end.row)i=[this.getLine(r.start.row).substring(r.start.column,r.end.column)];else{i=this.getLines(r.start.row,r.end.row),i[0]=(i[0]||"").substring(r.start.column);var e=i.length-1;r.end.row-r.start.row==e&&(i[e]=i[e].substring(0,r.end.column))}return i},o.prototype.insertLines=function(r,i){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(r,i)},o.prototype.removeLines=function(r,i){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(r,i)},o.prototype.insertNewLine=function(r){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(r,["",""])},o.prototype.insert=function(r,i){return this.getLength()<=1&&this.$detectNewLine(i),this.insertMergedLines(r,this.$split(i))},o.prototype.insertInLine=function(r,i){var e=this.clippedPos(r.row,r.column),t=this.pos(r.row,r.column+i.length);return this.applyDelta({start:e,end:t,action:"insert",lines:[i]},!0),this.clonePos(t)},o.prototype.clippedPos=function(r,i){var e=this.getLength();r===void 0?r=e:r<0?r=0:r>=e&&(r=e-1,i=void 0);var t=this.getLine(r);return i==null&&(i=t.length),i=Math.min(Math.max(i,0),t.length),{row:r,column:i}},o.prototype.clonePos=function(r){return{row:r.row,column:r.column}},o.prototype.pos=function(r,i){return{row:r,column:i}},o.prototype.$clipPosition=function(r){var i=this.getLength();return r.row>=i?(r.row=Math.max(0,i-1),r.column=this.getLine(i-1).length):(r.row=Math.max(0,r.row),r.column=Math.min(Math.max(r.column,0),this.getLine(r.row).length)),r},o.prototype.insertFullLines=function(r,i){r=Math.min(Math.max(r,0),this.getLength());var e=0;r<this.getLength()?(i=i.concat([""]),e=0):(i=[""].concat(i),r--,e=this.$lines[r].length),this.insertMergedLines({row:r,column:e},i)},o.prototype.insertMergedLines=function(r,i){var e=this.clippedPos(r.row,r.column),t={row:e.row+i.length-1,column:(i.length==1?e.column:0)+i[i.length-1].length};return this.applyDelta({start:e,end:t,action:"insert",lines:i}),this.clonePos(t)},o.prototype.remove=function(r){var i=this.clippedPos(r.start.row,r.start.column),e=this.clippedPos(r.end.row,r.end.column);return this.applyDelta({start:i,end:e,action:"remove",lines:this.getLinesForRange({start:i,end:e})}),this.clonePos(i)},o.prototype.removeInLine=function(r,i,e){var t=this.clippedPos(r,i),a=this.clippedPos(r,e);return this.applyDelta({start:t,end:a,action:"remove",lines:this.getLinesForRange({start:t,end:a})},!0),this.clonePos(t)},o.prototype.removeFullLines=function(r,i){r=Math.min(Math.max(0,r),this.getLength()-1),i=Math.min(Math.max(0,i),this.getLength()-1);var e=i==this.getLength()-1&&r>0,t=i<this.getLength()-1,a=e?r-1:r,d=e?this.getLine(a).length:0,f=t?i+1:i,S=t?0:this.getLine(f).length,$=new s(a,d,f,S),C=this.$lines.slice(r,i+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),C},o.prototype.removeNewLine=function(r){r<this.getLength()-1&&r>=0&&this.applyDelta({start:this.pos(r,this.getLine(r).length),end:this.pos(r+1,0),action:"remove",lines:["",""]})},o.prototype.replace=function(r,i){if(r instanceof s||(r=s.fromPoints(r.start,r.end)),i.length===0&&r.isEmpty())return r.start;if(i==this.getTextRange(r))return r.end;this.remove(r);var e;return i?e=this.insert(r.start,i):e=r.start,e},o.prototype.applyDeltas=function(r){for(var i=0;i<r.length;i++)this.applyDelta(r[i])},o.prototype.revertDeltas=function(r){for(var i=r.length-1;i>=0;i--)this.revertDelta(r[i])},o.prototype.applyDelta=function(r,i){var e=r.action=="insert";(e?r.lines.length<=1&&!r.lines[0]:!s.comparePoints(r.start,r.end))||(e&&r.lines.length>2e4?this.$splitAndapplyLargeDelta(r,2e4):(p(this.$lines,r,i),this._signal("change",r)))},o.prototype.$safeApplyDelta=function(r){var i=this.$lines.length;(r.action=="remove"&&r.start.row<i&&r.end.row<i||r.action=="insert"&&r.start.row<=i)&&this.applyDelta(r)},o.prototype.$splitAndapplyLargeDelta=function(r,i){for(var e=r.lines,t=e.length-i+1,a=r.start.row,d=r.start.column,f=0,S=0;f<t;f=S){S+=i-1;var $=e.slice(f,S);$.push(""),this.applyDelta({start:this.pos(a+f,d),end:this.pos(a+S,d=0),action:r.action,lines:$},!0)}r.lines=e.slice(f),r.start.row=a+f,r.start.column=d,this.applyDelta(r,!0)},o.prototype.revertDelta=function(r){this.$safeApplyDelta({start:this.clonePos(r.start),end:this.clonePos(r.end),action:r.action=="insert"?"remove":"insert",lines:r.lines.slice()})},o.prototype.indexToPosition=function(r,i){for(var e=this.$lines||this.getAllLines(),t=this.getNewLineCharacter().length,a=i||0,d=e.length;a<d;a++)if(r-=e[a].length+t,r<0)return{row:a,column:r+e[a].length+t};return{row:d-1,column:r+e[d-1].length+t}},o.prototype.positionToIndex=function(r,i){for(var e=this.$lines||this.getAllLines(),t=this.getNewLineCharacter().length,a=0,d=Math.min(r.row,e.length),f=i||0;f<d;++f)a+=e[f].length+t;return a+r.column},o.prototype.$split=function(r){return r.split(/\r\n|\r|\n/)},o})();n.prototype.$autoNewLine="",n.prototype.$newLineMode="auto",y.implement(n.prototype,v),g.Document=n}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(u,g,E){var y=u("./lib/oop"),p=u("./lib/event_emitter").EventEmitter,v=(function(){function s(c,n){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=c;var o=this;this.$worker=function(){if(o.running){for(var r=new Date,i=o.currentLine,e=-1,t=o.doc,a=i;o.lines[i];)i++;var d=t.getLength(),f=0;for(o.running=!1;i<d;){o.$tokenizeRow(i),e=i;do i++;while(o.lines[i]);if(f++,f%5===0&&new Date-r>20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=i,e==-1&&(e=i),a<=e&&o.fireUpdateEvent(a,e)}}}return s.prototype.setTokenizer=function(c){this.tokenizer=c,this.lines=[],this.states=[],this.start(0)},s.prototype.setDocument=function(c){this.doc=c,this.lines=[],this.states=[],this.stop()},s.prototype.fireUpdateEvent=function(c,n){var o={first:c,last:n};this._signal("update",{data:o})},s.prototype.start=function(c){this.currentLine=Math.min(c||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)},s.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},s.prototype.$updateOnChange=function(c){var n=c.start.row,o=c.end.row-n;if(o===0)this.lines[n]=null;else if(c.action=="remove")this.lines.splice(n,o+1,null),this.states.splice(n,o+1,null);else{var r=Array(o+1);r.unshift(n,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop()},s.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},s.prototype.getTokens=function(c){return this.lines[c]||this.$tokenizeRow(c)},s.prototype.getState=function(c){return this.currentLine==c&&this.$tokenizeRow(c),this.states[c]||"start"},s.prototype.$tokenizeRow=function(c){var n=this.doc.getLine(c),o=this.states[c-1],r=this.tokenizer.getLineTokens(n,o,c);return this.states[c]+""!=r.state+""?(this.states[c]=r.state,this.lines[c+1]=null,this.currentLine>c+1&&(this.currentLine=c+1)):this.currentLine==c&&(this.currentLine=c+1),this.lines[c]=r.tokens},s.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},s})();y.implement(v.prototype,p),g.BackgroundTokenizer=v}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(u,g,E){var y=u("./lib/lang"),p=u("./range").Range,v=(function(){function s(c,n,o){o===void 0&&(o="text"),this.setRegexp(c),this.clazz=n,this.type=o,this.docLen=0}return s.prototype.setRegexp=function(c){this.regExp+""!=c+""&&(this.regExp=c,this.cache=[])},s.prototype.update=function(c,n,o,r){if(this.regExp){for(var i=r.firstRow,e=r.lastRow,t={},a=o.$editor&&o.$editor.$search,d=a&&a.$isMultilineSearch(o.$editor.getLastSearchOptions()),f=i;f<=e;f++){var S=this.cache[f];if(S==null||o.getValue().length!=this.docLen){if(d){S=[];var $=a.$multiLineForward(o,this.regExp,f,e);if($){var C=$.endRow<=e?$.endRow-1:e;C>f&&(f=C),S.push(new p($.startRow,$.startCol,$.endRow,$.endCol))}S.length>this.MAX_RANGES&&(S=S.slice(0,this.MAX_RANGES))}else S=y.getMatchOffsets(o.getLine(f),this.regExp),S.length>this.MAX_RANGES&&(S=S.slice(0,this.MAX_RANGES)),S=S.map(function(T){return new p(f,T.offset,f,T.offset+T.length)});this.cache[f]=S.length?S:""}if(S.length!==0)for(var w=S.length;w--;){var M=S[w].toScreenRange(o),R=M.toString();t[R]||(t[R]=!0,n.drawSingleLineMarker(c,M,this.clazz,r))}}this.docLen=o.getValue().length}},s})();v.prototype.MAX_RANGES=500,g.SearchHighlight=v}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(u,g,E){var y=(function(){function C(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return C.prototype.addSession=function(w){this.$session=w},C.prototype.add=function(w,M,R){if(!this.$fromUndo&&w!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),M===!1||!this.lastDeltas){this.lastDeltas=[];var T=this.$undoStack.length;T>this.$undoDepth-1&&this.$undoStack.splice(0,T-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)}},C.prototype.addSelection=function(w,M){this.selections.push({value:w,rev:M||this.$rev})},C.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},C.prototype.markIgnored=function(w,M){M==null&&(M=this.$rev+1);for(var R=this.$undoStack,T=R.length;T--;){var k=R[T][0];if(k.id<=w)break;k.id<M&&(k.ignore=!0)}this.lastDeltas=null},C.prototype.getSelection=function(w,M){for(var R=this.selections,T=R.length;T--;){var k=R[T];if(k.rev<w)return M&&(k=R[T+1]),k}},C.prototype.getRevision=function(){return this.$rev},C.prototype.getDeltas=function(w,M){M==null&&(M=this.$rev+1);for(var R=this.$undoStack,T=null,k=0,O=R.length;O--;){var A=R[O][0];if(A.id<M&&!T&&(T=O+1),A.id<=w){k=O+1;break}}return R.slice(k,T)},C.prototype.getChangedRanges=function(w,M){M==null&&(M=this.$rev+1)},C.prototype.getChangedLines=function(w,M){M==null&&(M=this.$rev+1)},C.prototype.undo=function(w,M){this.lastDeltas=null;var R=this.$undoStack;if(p(R,R.length)){w||(w=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var T=R.pop(),k=null;return T&&(k=w.undoChanges(T,M),this.$redoStack.push(T),this.$syncRev()),this.$fromUndo=!1,k}},C.prototype.redo=function(w,M){if(this.lastDeltas=null,w||(w=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var R=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,R),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(O){O[0].id=++this.$maxRev},this)}var T=this.$redoStack.pop(),k=null;return T&&(k=w.redoChanges(T,M),this.$undoStack.push(T),this.$syncRev()),this.$fromUndo=!1,k},C.prototype.$syncRev=function(){var w=this.$undoStack,M=w[w.length-1],R=M&&M[0].id||0;this.$redoStackBaseRev=R,this.$rev=R},C.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=[]},C.prototype.canUndo=function(){return this.$undoStack.length>0},C.prototype.canRedo=function(){return this.$redoStack.length>0},C.prototype.bookmark=function(w){w==null&&(w=this.$rev),this.mark=w},C.prototype.isAtBookmark=function(){return this.$rev===this.mark},C.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},C.prototype.fromJSON=function(w){this.reset(),this.$undoStack=w.$undoStack,this.$redoStack=w.$redoStack},C.prototype.$prettyPrint=function(w){return w?o(w):o(this.$undoStack)+`
189
+ ---
190
+ `+o(this.$redoStack)},C})();y.prototype.hasUndo=y.prototype.canUndo,y.prototype.hasRedo=y.prototype.canRedo,y.prototype.isClean=y.prototype.isAtBookmark,y.prototype.markClean=y.prototype.bookmark;function p(C,w){for(var M=w;M--;){var R=C[M];if(R&&!R[0].ignore){for(;M<w-1;){var T=e(C[M],C[M+1]);C[M]=T[0],C[M+1]=T[1],M++}return!0}}}var v=u("./range").Range,s=v.comparePoints;v.comparePoints;function c(C){return{row:C.row,column:C.column}}function n(C){return{start:c(C.start),end:c(C.end),action:C.action,lines:C.lines.slice()}}function o(C){if(C=C||this,Array.isArray(C))return C.map(o).join(`
191
+ `);var w="";return C.action?(w=C.action=="insert"?"+":"-",w+="["+C.lines+"]"):C.value&&(Array.isArray(C.value)?w=C.value.map(r).join(`
192
+ `):w=r(C.value)),C.start&&(w+=r(C)),(C.id||C.rev)&&(w+=" ("+(C.id||C.rev)+")"),w}function r(C){return C.start.row+":"+C.start.column+"=>"+C.end.row+":"+C.end.column}function i(C,w){var M=C.action=="insert",R=w.action=="insert";if(M&&R)if(s(w.start,C.end)>=0)a(w,C,-1);else if(s(w.start,C.start)<=0)a(C,w,1);else return null;else if(M&&!R)if(s(w.start,C.end)>=0)a(w,C,-1);else if(s(w.end,C.start)<=0)a(C,w,-1);else return null;else if(!M&&R)if(s(w.start,C.start)>=0)a(w,C,1);else if(s(w.start,C.start)<=0)a(C,w,1);else return null;else if(!M&&!R)if(s(w.start,C.start)>=0)a(w,C,1);else if(s(w.end,C.start)<=0)a(C,w,-1);else return null;return[w,C]}function e(C,w){for(var M=C.length;M--;)for(var R=0;R<w.length;R++)if(!i(C[M],w[R])){for(;M<C.length;){for(;R--;)i(w[R],C[M]);R=w.length,M++}return[C,w]}return C.selectionBefore=w.selectionBefore=C.selectionAfter=w.selectionAfter=null,[w,C]}function t(C,w){var M=C.action=="insert",R=w.action=="insert";if(M&&R)s(C.start,w.start)<0?a(w,C,1):a(C,w,1);else if(M&&!R)s(C.start,w.end)>=0?a(C,w,-1):(s(C.start,w.start)<=0||a(C,v.fromPoints(w.start,C.start),-1),a(w,C,1));else if(!M&&R)s(w.start,C.end)>=0?a(w,C,-1):(s(w.start,C.start)<=0||a(w,v.fromPoints(C.start,w.start),-1),a(C,w,1));else if(!M&&!R)if(s(w.start,C.end)>=0)a(w,C,-1);else if(s(w.end,C.start)<=0)a(C,w,-1);else{var T,k;return s(C.start,w.start)<0&&(T=C,C=f(C,w.start)),s(C.end,w.end)>0&&(k=f(C,w.end)),d(w.end,C.start,C.end,-1),k&&!T&&(C.lines=k.lines,C.start=k.start,C.end=k.end,k=C),[w,T,k].filter(Boolean)}return[w,C]}function a(C,w,M){d(C.start,w.start,w.end,M),d(C.end,w.start,w.end,M)}function d(C,w,M,R){C.row==(R==1?w:M).row&&(C.column+=R*(M.column-w.column)),C.row+=R*(M.row-w.row)}function f(C,w){var M=C.lines,R=C.end;C.end=c(w);var T=C.end.row-C.start.row,k=M.splice(T,M.length),O=T?w.column:w.column-C.start.column;M.push(k[0].substring(0,O)),k[0]=k[0].substr(O);var A={start:c(w),end:R,lines:k,action:C.action};return A}function S(C,w){w=n(w);for(var M=C.length;M--;){for(var R=C[M],T=0;T<R.length;T++){var k=R[T],O=t(k,w);w=O[0],O.length!=2&&(O[2]?(R.splice(T+1,1,O[1],O[2]),T++):O[1]||(R.splice(T,1),T--))}R.length||C.splice(M,1)}return C}function $(C,w){for(var M=0;M<w.length;M++)for(var R=w[M],T=0;T<R.length;T++)S(C,R[T])}g.UndoManager=y}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(u,g,E){var y=u("../range").Range,p=(function(){function v(s,c){this.foldData=s,Array.isArray(c)?this.folds=c:c=this.folds=[c];var n=c[c.length-1];this.range=new y(c[0].start.row,c[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(o){o.setFoldLine(this)},this)}return v.prototype.shiftRow=function(s){this.start.row+=s,this.end.row+=s,this.folds.forEach(function(c){c.start.row+=s,c.end.row+=s})},v.prototype.addFold=function(s){if(s.sameRow){if(s.start.row<this.startRow||s.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(s),this.folds.sort(function(c,n){return-c.range.compareEnd(n.start.row,n.start.column)}),this.range.compareEnd(s.start.row,s.start.column)>0?(this.end.row=s.end.row,this.end.column=s.end.column):this.range.compareStart(s.end.row,s.end.column)<0&&(this.start.row=s.start.row,this.start.column=s.start.column)}else if(s.start.row==this.end.row)this.folds.push(s),this.end.row=s.end.row,this.end.column=s.end.column;else if(s.end.row==this.start.row)this.folds.unshift(s),this.start.row=s.start.row,this.start.column=s.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");s.foldLine=this},v.prototype.containsRow=function(s){return s>=this.start.row&&s<=this.end.row},v.prototype.walk=function(s,c,n){var o=0,r=this.folds,i,e,t,a=!0;c==null&&(c=this.end.row,n=this.end.column);for(var d=0;d<r.length;d++){if(i=r[d],e=i.range.compareStart(c,n),e==-1){s(null,c,n,o,a);return}if(t=s(null,i.start.row,i.start.column,o,a),t=!t&&s(i.placeholder,i.start.row,i.start.column,o),t||e===0)return;a=!i.sameRow,o=i.end.column}s(null,c,n,o,a)},v.prototype.getNextFoldTo=function(s,c){for(var n,o,r=0;r<this.folds.length;r++){if(n=this.folds[r],o=n.range.compareEnd(s,c),o==-1)return{fold:n,kind:"after"};if(o===0)return{fold:n,kind:"inside"}}return null},v.prototype.addRemoveChars=function(s,c,n){var o=this.getNextFoldTo(s,c),r,i;if(o){if(r=o.fold,o.kind=="inside"&&r.start.column!=c&&r.start.row!=s)window.console&&window.console.log(s,c,r);else if(r.start.row==s){i=this.folds;var e=i.indexOf(r);for(e===0&&(this.start.column+=n),e;e<i.length;e++){if(r=i[e],r.start.column+=n,!r.sameRow)return;r.end.column+=n}this.end.column+=n}}},v.prototype.split=function(s,c){var n=this.getNextFoldTo(s,c);if(!n||n.kind=="inside")return null;var o=n.fold,r=this.folds,i=this.foldData,e=r.indexOf(o),t=r[e-1];this.end.row=t.end.row,this.end.column=t.end.column,r=r.splice(e,r.length-e);var a=new v(i,r);return i.splice(i.indexOf(this)+1,0,a),a},v.prototype.merge=function(s){for(var c=s.folds,n=0;n<c.length;n++)this.addFold(c[n]);var o=this.foldData;o.splice(o.indexOf(s),1)},v.prototype.toString=function(){var s=[this.range.toString()+": ["];return this.folds.forEach(function(c){s.push(" "+c.toString())}),s.push("]"),s.join(`
193
+ `)},v.prototype.idxToPosition=function(s){for(var c=0,n=0;n<this.folds.length;n++){var o=this.folds[n];if(s-=o.start.column-c,s<0)return{row:o.start.row,column:o.start.column+s};if(s-=o.placeholder.length,s<0)return o.start;c=o.end.column}return{row:this.end.row,column:this.end.column+s}},v})();g.FoldLine=p}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(u,g,E){var y=u("./range").Range,p=y.comparePoints,v=(function(){function s(){this.ranges=[],this.$bias=1}return s.prototype.pointIndex=function(c,n,o){for(var r=this.ranges,i=o||0;i<r.length;i++){var e=r[i],t=p(c,e.end);if(!(t>0)){var a=p(c,e.start);return t===0?n&&a!==0?-i-2:i:a>0||a===0&&!n?i:-i-1}}return-i-1},s.prototype.add=function(c){var n=!c.isEmpty(),o=this.pointIndex(c.start,n);o<0&&(o=-o-1);var r=this.pointIndex(c.end,n,o);return r<0?r=-r-1:r++,this.ranges.splice(o,r-o,c)},s.prototype.addList=function(c){for(var n=[],o=c.length;o--;)n.push.apply(n,this.add(c[o]));return n},s.prototype.substractPoint=function(c){var n=this.pointIndex(c);if(n>=0)return this.ranges.splice(n,1)},s.prototype.merge=function(){var c=[],n=this.ranges;n=n.sort(function(t,a){return p(t.start,a.start)});for(var o=n[0],r,i=1;i<n.length;i++){r=o,o=n[i];var e=p(r.end,o.start);e<0||e==0&&!r.isEmpty()&&!o.isEmpty()||(p(r.end,o.end)<0&&(r.end.row=o.end.row,r.end.column=o.end.column),n.splice(i,1),c.push(o),o=r,i--)}return this.ranges=n,c},s.prototype.contains=function(c,n){return this.pointIndex({row:c,column:n})>=0},s.prototype.containsPoint=function(c){return this.pointIndex(c)>=0},s.prototype.rangeAtPoint=function(c){var n=this.pointIndex(c);if(n>=0)return this.ranges[n]},s.prototype.clipRows=function(c,n){var o=this.ranges;if(o[0].start.row>n||o[o.length-1].start.row<c)return[];var r=this.pointIndex({row:c,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:n,column:0},r);i<0&&(i=-i-1);for(var e=[],t=r;t<i;t++)e.push(o[t]);return e},s.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},s.prototype.attach=function(c){this.session&&this.detach(),this.session=c,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},s.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},s.prototype.$onChange=function(c){for(var n=c.start,o=c.end,r=n.row,i=o.row,e=this.ranges,t=0,a=e.length;t<a;t++){var d=e[t];if(d.end.row>=r)break}if(c.action=="insert")for(var f=i-r,S=-n.column+o.column;t<a;t++){var d=e[t];if(d.start.row>r)break;if(d.start.row==r&&d.start.column>=n.column&&(d.start.column==n.column&&this.$bias<=0||(d.start.column+=S,d.start.row+=f)),d.end.row==r&&d.end.column>=n.column){if(d.end.column==n.column&&this.$bias<0)continue;d.end.column==n.column&&S>0&&t<a-1&&d.end.column>d.start.column&&d.end.column==e[t+1].start.column&&(d.end.column-=S),d.end.column+=S,d.end.row+=f}}else for(var f=r-i,S=n.column-o.column;t<a;t++){var d=e[t];if(d.start.row>i)break;d.end.row<i&&(r<d.end.row||r==d.end.row&&n.column<d.end.column)?(d.end.row=r,d.end.column=n.column):d.end.row==i?d.end.column<=o.column?(f||d.end.column>n.column)&&(d.end.column=n.column,d.end.row=n.row):(d.end.column+=S,d.end.row+=f):d.end.row>i&&(d.end.row+=f),d.start.row<i&&(r<d.start.row||r==d.start.row&&n.column<d.start.column)?(d.start.row=r,d.start.column=n.column):d.start.row==i?d.start.column<=o.column?(f||d.start.column>n.column)&&(d.start.column=n.column,d.start.row=n.row):(d.start.column+=S,d.start.row+=f):d.start.row>i&&(d.start.row+=f)}if(f!=0&&t<a)for(;t<a;t++){var d=e[t];d.start.row+=f,d.end.row+=f}},s})();v.prototype.comparePoints=p,g.RangeList=v}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(u,g,E){var y=this&&this.__extends||(function(){var r=function(i,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(t[d]=a[d])},r(i,e)};return function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}})(),p=u("../range_list").RangeList,v=(function(r){y(i,r);function i(e,t){var a=r.call(this)||this;return a.foldLine=null,a.placeholder=t,a.range=e,a.start=e.start,a.end=e.end,a.sameRow=e.start.row==e.end.row,a.subFolds=a.ranges=[],a}return i.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},i.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},i.prototype.clone=function(){var e=this.range.clone(),t=new i(e,this.placeholder);return this.subFolds.forEach(function(a){t.subFolds.push(a.clone())}),t.collapseChildren=this.collapseChildren,t},i.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){c(e,this.start);for(var S=e.start.row,$=e.start.column,t=0,a=-1;t<this.subFolds.length&&(a=this.subFolds[t].range.compare(S,$),a==1);t++);var d=this.subFolds[t],f=0;if(a==0){if(d.range.containsRange(e))return d.addSubFold(e);f=1}for(var S=e.range.end.row,$=e.range.end.column,C=t,a=-1;C<this.subFolds.length&&(a=this.subFolds[C].range.compare(S,$),a==1);C++);a==0&&C++;for(var w=this.subFolds.splice(t,C-t,e),M=a==0?w.length-1:w.length,R=f;R<M;R++)e.addSubFold(w[R]);return e.setFoldLine(this.foldLine),e}},i.prototype.restoreRange=function(e){return o(e,this.start)},i})(p);function s(r,i){r.row-=i.row,r.row==0&&(r.column-=i.column)}function c(r,i){s(r.start,i),s(r.end,i)}function n(r,i){r.row==0&&(r.column+=i.column),r.row+=i.row}function o(r,i){n(r.start,i),n(r.end,i)}g.Fold=v}),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(u,g,E){var y=u("../range").Range,p=u("./fold_line").FoldLine,v=u("./fold").Fold,s=u("../token_iterator").TokenIterator,c=u("../mouse/mouse_event").MouseEvent;function n(){this.getFoldAt=function(o,r,i){var e=this.getFoldLine(o);if(!e)return null;for(var t=e.folds,a=0;a<t.length;a++){var d=t[a].range;if(d.contains(o,r)){if(i==1&&d.isEnd(o,r)&&!d.isEmpty())continue;if(i==-1&&d.isStart(o,r)&&!d.isEmpty())continue;return t[a]}}},this.getFoldsInRange=function(o){var r=o.start,i=o.end,e=this.$foldData,t=[];r.column+=1,i.column-=1;for(var a=0;a<e.length;a++){var d=e[a].range.compareRange(o);if(d!=2){if(d==-2)break;for(var f=e[a].folds,S=0;S<f.length;S++){var $=f[S];if(d=$.range.compareRange(o),d==-2)break;if(d==2)continue;if(d==42)break;t.push($)}}}return r.column-=1,i.column+=1,t},this.getFoldsInRangeList=function(o){if(Array.isArray(o)){var r=[];o.forEach(function(i){r=r.concat(this.getFoldsInRange(i))},this)}else var r=this.getFoldsInRange(o);return r},this.getAllFolds=function(){for(var o=[],r=this.$foldData,i=0;i<r.length;i++)for(var e=0;e<r[i].folds.length;e++)o.push(r[i].folds[e]);return o},this.getFoldStringAt=function(o,r,i,e){if(e=e||this.getFoldLine(o),!e)return null;for(var t={end:{column:0}},a,d,f=0;f<e.folds.length;f++){d=e.folds[f];var S=d.range.compareEnd(o,r);if(S==-1){a=this.getLine(d.start.row).substring(t.end.column,d.start.column);break}else if(S===0)return null;t=d}return a||(a=this.getLine(d.start.row).substring(t.end.column)),i==-1?a.substring(0,r-t.end.column):i==1?a.substring(r-t.end.column):a},this.getFoldLine=function(o,r){var i=this.$foldData,e=0;for(r&&(e=i.indexOf(r)),e==-1&&(e=0),e;e<i.length;e++){var t=i[e];if(t.start.row<=o&&t.end.row>=o)return t;if(t.end.row>o)return null}return null},this.getNextFoldLine=function(o,r){var i=this.$foldData,e=0;for(r&&(e=i.indexOf(r)),e==-1&&(e=0),e;e<i.length;e++){var t=i[e];if(t.end.row>=o)return t}return null},this.getFoldedRowCount=function(o,r){for(var i=this.$foldData,e=r-o+1,t=0;t<i.length;t++){var a=i[t],d=a.end.row,f=a.start.row;if(d>=r){f<r&&(f>=o?e-=r-f:e=0);break}else d>=o&&(f>=o?e-=d-f:e-=d-o+1)}return e},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(r,i){return r.start.row-i.start.row}),o},this.addFold=function(o,r){var i=this.$foldData,e=!1,t;o instanceof v?t=o:(t=new v(r,o),t.collapseChildren=r.collapseChildren),this.$clipRangeToDocument(t.range);var a=t.start.row,d=t.start.column,f=t.end.row,S=t.end.column,$=this.getFoldAt(a,d,1),C=this.getFoldAt(f,S,-1);if($&&C==$)return $.addSubFold(t);$&&!$.range.isStart(a,d)&&this.removeFold($),C&&!C.range.isEnd(f,S)&&this.removeFold(C);var w=this.getFoldsInRange(t.range);w.length>0&&(this.removeFolds(w),t.collapseChildren||w.forEach(function(k){t.addSubFold(k)}));for(var M=0;M<i.length;M++){var R=i[M];if(f==R.start.row){R.addFold(t),e=!0;break}else if(a==R.end.row){if(R.addFold(t),e=!0,!t.sameRow){var T=i[M+1];if(T&&T.start.row==f){R.merge(T);break}}break}else if(f<=R.start.row)break}return e||(R=this.$addFoldLine(new p(this.$foldData,t))),this.$useWrapMode?this.$updateWrapData(R.start.row,R.start.row):this.$updateRowLengthCache(R.start.row,R.start.row),this.$modified=!0,this._signal("changeFold",{data:t,action:"add"}),t},this.addFolds=function(o){o.forEach(function(r){this.addFold(r)},this)},this.removeFold=function(o){var r=o.foldLine,i=r.start.row,e=r.end.row,t=this.$foldData,a=r.folds;if(a.length==1)t.splice(t.indexOf(r),1);else if(r.range.isEnd(o.end.row,o.end.column))a.pop(),r.end.row=a[a.length-1].end.row,r.end.column=a[a.length-1].end.column;else if(r.range.isStart(o.start.row,o.start.column))a.shift(),r.start.row=a[0].start.row,r.start.column=a[0].start.column;else if(o.sameRow)a.splice(a.indexOf(o),1);else{var d=r.split(o.start.row,o.start.column);a=d.folds,a.shift(),d.start.row=a[0].start.row,d.start.column=a[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(i,e):this.$updateRowLengthCache(i,e)),this.$modified=!0,this._signal("changeFold",{data:o,action:"remove"})},this.removeFolds=function(o){for(var r=[],i=0;i<o.length;i++)r.push(o[i]);r.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(o){this.removeFold(o),o.subFolds.forEach(function(r){o.restoreRange(r),this.addFold(r)},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(r){this.expandFold(r)},this)},this.unfold=function(o,r){var i,e;if(o==null)i=new y(0,0,this.getLength(),0),r==null&&(r=!0);else if(typeof o=="number")i=new y(o,0,o,this.getLine(o).length);else if("row"in o)i=y.fromPoints(o,o);else{if(Array.isArray(o))return e=[],o.forEach(function(a){e=e.concat(this.unfold(a))},this),e;i=o}e=this.getFoldsInRangeList(i);for(var t=e;e.length==1&&y.comparePoints(e[0].start,i.start)<0&&y.comparePoints(e[0].end,i.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(i);if(r!=!1?this.removeFolds(e):this.expandFolds(e),t.length)return t},this.isRowFolded=function(o,r){return!!this.getFoldLine(o,r)},this.getRowFoldEnd=function(o,r){var i=this.getFoldLine(o,r);return i?i.end.row:o},this.getRowFoldStart=function(o,r){var i=this.getFoldLine(o,r);return i?i.start.row:o},this.getFoldDisplayLine=function(o,r,i,e,t){e==null&&(e=o.start.row),t==null&&(t=0),r==null&&(r=o.end.row),i==null&&(i=this.getLine(r).length);var a=this.doc,d="";return o.walk(function(f,S,$,C){if(!(S<e)){if(S==e){if($<t)return;C=Math.max(t,C)}f!=null?d+=f:d+=a.getLine(S).substring(C,$)}},r,i),d},this.getDisplayLine=function(o,r,i,e){var t=this.getFoldLine(o);if(t)return this.getFoldDisplayLine(t,o,r,i,e);var a;return a=this.doc.getLine(o),a.substring(e||0,r||a.length)},this.$cloneFoldData=function(){var o=[];return o=this.$foldData.map(function(r){var i=r.folds.map(function(e){return e.clone()});return new p(o,i)}),o},this.toggleFold=function(o){var r=this.selection,i=r.getRange(),e,t;if(i.isEmpty()){var a=i.start;if(e=this.getFoldAt(a.row,a.column),e){this.expandFold(e);return}else if(o){var d=this.getFoldLine(a.row);d&&this.expandFolds(d.folds);return}else(t=this.findMatchingBracket(a))?i.comparePoint(t)==1?i.end=t:(i.start=t,i.start.column++,i.end.column--):(t=this.findMatchingBracket({row:a.row,column:a.column+1}))?(i.comparePoint(t)==1?i.end=t:i.start=t,i.start.column++):i=this.getCommentFoldRange(a.row,a.column)||i}else{var f=this.getFoldsInRange(i);if(o&&f.length){this.expandFolds(f);return}else f.length==1&&(e=f[0])}if(e||(e=this.getFoldAt(i.start.row,i.start.column)),e&&e.range.toString()==i.toString()){this.expandFold(e);return}var S="...";if(!i.isMultiLine()){if(S=this.getTextRange(i),S.length<4)return;S=S.trim().substring(0,2)+".."}this.addFold(S,i)},this.getCommentFoldRange=function(o,r,i){var e=new s(this,o,r),t=e.getCurrentToken(),a=t&&t.type;if(t&&/^comment|string/.test(a)){a=a.match(/comment|string/)[0],a=="comment"&&(a+="|doc-start|\\.doc");var d=new RegExp(a),f=new y;if(i!=1){do t=e.stepBackward();while(t&&d.test(t.type));t=e.stepForward()}f.start.row=e.getCurrentTokenRow(),f.start.column=e.getCurrentTokenColumn()+t.value.length,e=new s(this,o,r);var S=this.getState(e.$row);if(i!=-1){var $=-1;do if(t=e.stepForward(),$==-1){var C=this.getState(e.$row);S.toString()!==C.toString()&&($=e.$row)}else if(e.$row>$)break;while(t&&d.test(t.type));t=e.stepBackward()}else t=e.getCurrentToken();return f.end.row=e.getCurrentTokenRow(),f.end.column=e.getCurrentTokenColumn(),f.start.row==f.end.row&&f.start.column>f.end.column?void 0:f}},this.foldAll=function(o,r,i,e){i==null&&(i=1e5);var t=this.foldWidgets;if(t){r=r||this.getLength(),o=o||0;for(var a=o;a<r;a++)if(t[a]==null&&(t[a]=this.getFoldWidget(a)),t[a]=="start"&&!(e&&!e(a))){var d=this.getFoldWidgetRange(a);d&&d.isMultiLine()&&d.end.row<=r&&d.start.row>=o&&(a=d.end.row,d.collapseChildren=i,this.addFold("...",d))}}},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(r){for(var i=o.getTokens(r),e=0;e<i.length;e++){var t=i[e];if(!(t.type=="text"&&/^\s+$/.test(t.value)))return!!/comment/.test(t.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 r=this.$foldMode;this.$setFolding(null),this.$setFolding(r)}},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,r){var i=this.foldWidgets;if(!i||r&&i[o])return{};for(var e=o-1,t;e>=0;){var a=i[e];if(a==null&&(a=i[e]=this.getFoldWidget(e)),a=="start"){var d=this.getFoldWidgetRange(e);if(t||(t=d),d&&d.end.row>=o)break}e--}return{range:e!==-1&&d,firstRange:t}},this.onFoldWidgetClick=function(o,r){r instanceof c&&(r=r.domEvent);var i={children:r.shiftKey,all:r.ctrlKey||r.metaKey,siblings:r.altKey},e=this.$toggleFoldWidget(o,i);if(!e){var t=r.target||r.srcElement;t&&/ace_fold-widget/.test(t.className)&&(t.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,r){if(this.getFoldWidget){var i=this.getFoldWidget(o),e=this.getLine(o),t=i==="end"?-1:1,a=this.getFoldAt(o,t===-1?0:e.length,t);if(a)return r.children||r.all?this.removeFold(a):this.expandFold(a),a;var d=this.getFoldWidgetRange(o,!0);if(d&&!d.isMultiLine()&&(a=this.getFoldAt(d.start.row,d.start.column,1),a&&d.isEqual(a.range)))return this.removeFold(a),a;if(r.siblings){var f=this.getParentFoldRangeData(o);if(f.range)var S=f.range.start.row+1,$=f.range.end.row;this.foldAll(S,$,r.all?1e4:0)}else r.children?($=d?d.end.row:this.getLength(),this.foldAll(o+1,$,r.all?1e4:0)):d&&(r.all&&(d.collapseChildren=1e4),this.addFold("...",d));return d}},this.toggleFoldWidget=function(o){var r=this.selection.getCursor().row;r=this.getRowFoldStart(r);var i=this.$toggleFoldWidget(r,{});if(!i){var e=this.getParentFoldRangeData(r,!0);if(i=e.range||e.firstRange,i){r=i.start.row;var t=this.getFoldAt(r,this.getLine(r).length,1);t?this.removeFold(t):this.addFold("...",i)}}},this.updateFoldWidgets=function(o){var r=o.start.row,i=o.end.row-r;if(i===0)this.foldWidgets[r]=null;else if(o.action=="remove")this.foldWidgets.splice(r,i+1,null);else{var e=Array(i+1);e.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(o){var r=o.data;r.first!=r.last&&this.foldWidgets.length>r.first&&this.foldWidgets.splice(r.first,this.foldWidgets.length)}}g.Folding=n}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(u,g,E){var y=u("../token_iterator").TokenIterator,p=u("../range").Range;function v(){this.findMatchingBracket=function(s,c){if(s.column==0)return null;var n=c||this.getLine(s.row).charAt(s.column-1);if(n=="")return null;var o=n.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],s):this.$findOpeningBracket(o[2],s):null},this.getBracketRange=function(s){var c=this.getLine(s.row),n=!0,o,r=c.charAt(s.column-1),i=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(i||(r=c.charAt(s.column),s={row:s.row,column:s.column+1},i=r&&r.match(/([\(\[\{])|([\)\]\}])/),n=!1),!i)return null;if(i[1]){var e=this.$findClosingBracket(i[1],s);if(!e)return null;o=p.fromPoints(s,e),n||(o.end.column++,o.start.column--),o.cursor=o.end}else{var e=this.$findOpeningBracket(i[2],s);if(!e)return null;o=p.fromPoints(e,s),n||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(s,c){var n=this.getLine(s.row),o=/([\(\[\{])|([\)\]\}])/,r=!c&&n.charAt(s.column-1),i=r&&r.match(o);if(i||(r=(c===void 0||c)&&n.charAt(s.column),s={row:s.row,column:s.column+1},i=r&&r.match(o)),!i)return null;var e=new p(s.row,s.column-1,s.row,s.column),t=i[1]?this.$findClosingBracket(i[1],s):this.$findOpeningBracket(i[2],s);if(!t)return[e];var a=new p(t.row,t.column,t.row,t.column+1);return[e,a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(s,c,n){var o=this.$brackets[s],r=1,i=new y(this,c.row,c.column),e=i.getCurrentToken();if(e||(e=i.stepForward()),!!e){n||(n=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var t=c.column-i.getCurrentTokenColumn()-2,a=e.value;;){for(;t>=0;){var d=a.charAt(t);if(d==o){if(r-=1,r==0)return{row:i.getCurrentTokenRow(),column:t+i.getCurrentTokenColumn()}}else d==s&&(r+=1);t-=1}do e=i.stepBackward();while(e&&!n.test(e.type));if(e==null)break;a=e.value,t=a.length-1}return null}},this.$findClosingBracket=function(s,c,n){var o=this.$brackets[s],r=1,i=new y(this,c.row,c.column),e=i.getCurrentToken();if(e||(e=i.stepForward()),!!e){n||(n=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var t=c.column-i.getCurrentTokenColumn();;){for(var a=e.value,d=a.length;t<d;){var f=a.charAt(t);if(f==o){if(r-=1,r==0)return{row:i.getCurrentTokenRow(),column:t+i.getCurrentTokenColumn()}}else f==s&&(r+=1);t+=1}do e=i.stepForward();while(e&&!n.test(e.type));if(e==null)break;t=0}return null}},this.getMatchingTags=function(s){var c=new y(this,s.row,s.column),n=this.$findTagName(c);if(n){var o=c.stepBackward();return o.value==="<"?this.$findClosingTag(c,n):this.$findOpeningTag(c,n)}},this.$findTagName=function(s){var c=s.getCurrentToken(),n=!1,o=!1;if(c&&c.type.indexOf("tag-name")===-1)do o?c=s.stepBackward():c=s.stepForward(),c&&(c.value==="/>"?o=!0:c.type.indexOf("tag-name")!==-1&&(n=!0));while(c&&!n);return c},this.$findClosingTag=function(s,c){var n,o=c.value,r=c.value,i=0,e=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);c=s.stepForward();var t=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+c.value.length),a=!1;do{if(n=c,n.type.indexOf("tag-close")!==-1&&!a){var d=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);a=!0}if(c=s.stepForward(),c){if(c.value===">"&&!a){var d=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);a=!0}if(c.type.indexOf("tag-name")!==-1){if(o=c.value,r===o){if(n.value==="<")i++;else if(n.value==="</"&&(i--,i<0)){s.stepBackward();var f=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2);c=s.stepForward();var S=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+c.value.length);if(c.type.indexOf("tag-close")===-1&&(c=s.stepForward()),c&&c.value===">")var $=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);else return}}}else if(r===o&&c.value==="/>"&&(i--,i<0))var f=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2),S=f,$=S,d=new p(t.end.row,t.end.column,t.end.row,t.end.column+1)}}while(c&&i>=0);if(e&&d&&f&&$&&t&&S)return{openTag:new p(e.start.row,e.start.column,d.end.row,d.end.column),closeTag:new p(f.start.row,f.start.column,$.end.row,$.end.column),openTagName:t,closeTagName:S}},this.$findOpeningTag=function(s,c){var n=s.getCurrentToken(),o=c.value,r=0,i=s.getCurrentTokenRow(),e=s.getCurrentTokenColumn(),t=e+2,a=new p(i,e,i,t);s.stepForward();var d=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+c.value.length);if(c.type.indexOf("tag-close")===-1&&(c=s.stepForward()),!(!c||c.value!==">")){var f=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);s.stepBackward(),s.stepBackward();do if(c=n,i=s.getCurrentTokenRow(),e=s.getCurrentTokenColumn(),t=e+c.value.length,n=s.stepBackward(),c){if(c.type.indexOf("tag-name")!==-1){if(o===c.value)if(n.value==="<"){if(r++,r>0){var S=new p(i,e,i,t),$=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);do c=s.stepForward();while(c&&c.value!==">");var C=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1)}}else n.value==="</"&&r--}else if(c.value==="/>"){for(var w=0,M=n;M;){if(M.type.indexOf("tag-name")!==-1&&M.value===o){r--;break}else if(M.value==="<")break;M=s.stepBackward(),w++}for(var R=0;R<w;R++)s.stepForward()}}while(n&&r<=0);if($&&C&&a&&f&&S&&d)return{openTag:new p($.start.row,$.start.column,C.end.row,C.end.column),closeTag:new p(a.start.row,a.start.column,f.end.row,f.end.column),openTagName:S,closeTagName:d}}}}g.BracketMatch=v}),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(u,g,E){var y=u("./lib/oop"),p=u("./lib/lang"),v=u("./bidihandler").BidiHandler,s=u("./config"),c=u("./lib/event_emitter").EventEmitter,n=u("./selection").Selection,o=u("./mode/text").Mode,r=u("./range").Range,i=u("./line_widgets").LineWidgets,e=u("./document").Document,t=u("./background_tokenizer").BackgroundTokenizer,a=u("./search_highlight").SearchHighlight,d=u("./undomanager").UndoManager,f=(function(){function A(x,b){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"+ ++A.$uid,this.$foldData.toString=function(){return this.join(`
194
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new t(new o().getTokenizer(),this);var m=this;this.bgTokenizer.on("update",function(_){m._signal("tokenizerUpdate",_)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof x!="object"||!x.getLine)&&(x=new e(x)),this.setDocument(x),this.selection=new n(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new v(this),s.resetOptions(this),this.setMode(b),s._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return A.prototype.$initOperationListeners=function(){var x=this;this.curOp=null,this.on("change",function(){x.curOp||(x.startOperation(),x.curOp.selectionBefore=x.$lastSel),x.curOp.docChanged=!0},!0),this.on("changeSelection",function(){x.curOp||(x.startOperation(),x.curOp.selectionBefore=x.$lastSel),x.curOp.selectionChanged=!0},!0),this.$operationResetTimer=p.delayedCall(this.endOperation.bind(this,!0))},A.prototype.startOperation=function(x){if(this.curOp){if(!x||this.curOp.command)return;this.prevOp=this.curOp}x||(x={}),this.$operationResetTimer.schedule(),this.curOp={command:x.command||{},args:x.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",x)},A.prototype.endOperation=function(x){if(this.curOp){if(x&&x.returnValue===!1){this.curOp=null,this._signal("endOperation",x);return}if(x==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var b=this.selection.toJSON();this.curOp.selectionAfter=b,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(b),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",x)}},A.prototype.setDocument=function(x){this.doc&&this.doc.off("change",this.$onChange),this.doc=x,x.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},A.prototype.getDocument=function(){return this.doc},Object.defineProperty(A.prototype,"widgetManager",{get:function(){var x=new i(this);return this.widgetManager=x,this.$editor&&x.attach(this.$editor),x},set:function(x){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:x})},enumerable:!1,configurable:!0}),A.prototype.$resetRowCache=function(x){if(!x){this.$docRowCache=[],this.$screenRowCache=[];return}var b=this.$docRowCache.length,m=this.$getRowCacheIndex(this.$docRowCache,x)+1;b>m&&(this.$docRowCache.splice(m,b),this.$screenRowCache.splice(m,b))},A.prototype.$getRowCacheIndex=function(x,b){for(var m=0,_=x.length-1;m<=_;){var L=m+_>>1,I=x[L];if(b>I)m=L+1;else if(b<I)_=L-1;else return L}return m-1},A.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},A.prototype.onChangeFold=function(x){var b=x.data;this.$resetRowCache(b.start.row)},A.prototype.onChange=function(x){this.$modified=!0,this.$bidiHandler.onChange(x),this.$resetRowCache(x.start.row);var b=this.$updateInternalDataOnChange(x);!this.$fromUndo&&this.$undoManager&&(b&&b.length&&(this.$undoManager.add({action:"removeFolds",folds:b},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(x,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(x),this._signal("change",x)},A.prototype.onSelectionChange=function(){this._signal("changeSelection")},A.prototype.setValue=function(x){this.doc.setValue(x),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},A.fromJSON=function(x){typeof x=="string"&&(x=JSON.parse(x));var b=new d;b.$undoStack=x.history.$undoStack,b.$redoStack=x.history.$redoStack,b.mark=x.history.mark,b.$rev=x.history.rev;var m=new A(x.value);return x.folds.forEach(function(_){m.addFold("...",r.fromPoints(_.start,_.end))}),m.setAnnotations(x.annotations),m.setBreakpoints(x.breakpoints),m.setMode(x.mode),m.setScrollLeft(x.scrollLeft),m.setScrollTop(x.scrollTop),m.setUndoManager(b),m.selection.fromJSON(x.selection),m},A.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(x){return x.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},A.prototype.toString=function(){return this.doc.getValue()},A.prototype.getSelection=function(){return this.selection},A.prototype.getState=function(x){return this.bgTokenizer.getState(x)},A.prototype.getTokens=function(x){return this.bgTokenizer.getTokens(x)},A.prototype.getTokenAt=function(x,b){var m=this.bgTokenizer.getTokens(x),_,L=0;if(b==null){var I=m.length-1;L=this.getLine(x).length}else for(var I=0;I<m.length&&(L+=m[I].value.length,!(L>=b));I++);return _=m[I],_?(_.index=I,_.start=L-_.value.length,_):null},A.prototype.setUndoManager=function(x){if(this.$undoManager=x,this.$informUndoManager&&this.$informUndoManager.cancel(),x){var b=this;x.addSession(this),this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.mergeUndoDeltas=!1},this.$informUndoManager=p.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},A.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},A.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},A.prototype.getTabString=function(){return this.getUseSoftTabs()?p.stringRepeat(" ",this.getTabSize()):" "},A.prototype.setUseSoftTabs=function(x){this.setOption("useSoftTabs",x)},A.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},A.prototype.setTabSize=function(x){this.setOption("tabSize",x)},A.prototype.getTabSize=function(){return this.$tabSize},A.prototype.isTabStop=function(x){return this.$useSoftTabs&&x.column%this.$tabSize===0},A.prototype.setNavigateWithinSoftTabs=function(x){this.setOption("navigateWithinSoftTabs",x)},A.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},A.prototype.setOverwrite=function(x){this.setOption("overwrite",x)},A.prototype.getOverwrite=function(){return this.$overwrite},A.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},A.prototype.addGutterDecoration=function(x,b){this.$decorations[x]||(this.$decorations[x]=""),this.$decorations[x]+=" "+b,this._signal("changeBreakpoint",{})},A.prototype.removeGutterCustomWidget=function(x){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(x)},A.prototype.addGutterCustomWidget=function(x,b){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(x,b)},A.prototype.removeGutterDecoration=function(x,b){this.$decorations[x]=(this.$decorations[x]||"").replace(" "+b,""),this._signal("changeBreakpoint",{})},A.prototype.getBreakpoints=function(){return this.$breakpoints},A.prototype.setBreakpoints=function(x){this.$breakpoints=[];for(var b=0;b<x.length;b++)this.$breakpoints[x[b]]="ace_breakpoint";this._signal("changeBreakpoint",{})},A.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},A.prototype.setBreakpoint=function(x,b){b===void 0&&(b="ace_breakpoint"),b?this.$breakpoints[x]=b:delete this.$breakpoints[x],this._signal("changeBreakpoint",{})},A.prototype.clearBreakpoint=function(x){delete this.$breakpoints[x],this._signal("changeBreakpoint",{})},A.prototype.addMarker=function(x,b,m,_){var L=this.$markerId++,I={range:x,type:m||"line",renderer:typeof m=="function"?m:null,clazz:b,inFront:!!_,id:L};return _?(this.$frontMarkers[L]=I,this._signal("changeFrontMarker")):(this.$backMarkers[L]=I,this._signal("changeBackMarker")),L},A.prototype.addDynamicMarker=function(x,b){if(x.update){var m=this.$markerId++;return x.id=m,x.inFront=!!b,b?(this.$frontMarkers[m]=x,this._signal("changeFrontMarker")):(this.$backMarkers[m]=x,this._signal("changeBackMarker")),x}},A.prototype.removeMarker=function(x){var b=this.$frontMarkers[x]||this.$backMarkers[x];if(b){var m=b.inFront?this.$frontMarkers:this.$backMarkers;delete m[x],this._signal(b.inFront?"changeFrontMarker":"changeBackMarker")}},A.prototype.getMarkers=function(x){return x?this.$frontMarkers:this.$backMarkers},A.prototype.highlight=function(x){if(!this.$searchHighlight){var b=new a(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(b)}this.$searchHighlight.setRegexp(x)},A.prototype.highlightLines=function(x,b,m,_){typeof b!="number"&&(m=b,b=x),m||(m="ace_step");var L=new r(x,0,b,1/0);return L.id=this.addMarker(L,m,"fullLine",_),L},A.prototype.setAnnotations=function(x){this.$annotations=x,this._signal("changeAnnotation",{})},A.prototype.getAnnotations=function(){return this.$annotations||[]},A.prototype.clearAnnotations=function(){this.setAnnotations([])},A.prototype.$detectNewLine=function(x){var b=x.match(/^.*?(\r?\n)/m);b?this.$autoNewLine=b[1]:this.$autoNewLine=`
195
+ `},A.prototype.getWordRange=function(x,b){var m=this.getLine(x),_=!1;if(b>0&&(_=!!m.charAt(b-1).match(this.tokenRe)),_||(_=!!m.charAt(b).match(this.tokenRe)),_)var L=this.tokenRe;else if(/^\s+$/.test(m.slice(b-1,b+1)))var L=/\s/;else var L=this.nonTokenRe;var I=b;if(I>0){do I--;while(I>=0&&m.charAt(I).match(L));I++}for(var D=b;D<m.length&&m.charAt(D).match(L);)D++;return new r(x,I,x,D)},A.prototype.getAWordRange=function(x,b){for(var m=this.getWordRange(x,b),_=this.getLine(m.end.row);_.charAt(m.end.column).match(/[ \t]/);)m.end.column+=1;return m},A.prototype.setNewLineMode=function(x){this.doc.setNewLineMode(x)},A.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},A.prototype.setUseWorker=function(x){this.setOption("useWorker",x)},A.prototype.getUseWorker=function(){return this.$useWorker},A.prototype.onReloadTokenizer=function(x){var b=x.data;this.bgTokenizer.start(b.first),this._signal("tokenizerUpdate",x)},A.prototype.setMode=function(x,b){if(x&&typeof x=="object"){if(x.getTokenizer)return this.$onChangeMode(x);var m=x,_=m.path}else _=x||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[_]&&!m){this.$onChangeMode(this.$modes[_]),b&&b();return}this.$modeId=_,s.loadModule(["mode",_],(function(L){if(!this.destroyed){if(this.$modeId!==_)return b&&b();this.$modes[_]&&!m?this.$onChangeMode(this.$modes[_]):L&&L.Mode&&(L=new L.Mode(m),m||(this.$modes[_]=L,L.$id=_),this.$onChangeMode(L)),b&&b()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},A.prototype.$onChangeMode=function(x,b){if(b||(this.$modeId=x.$id),this.$mode!==x){var m=this.$mode;this.$mode=x,this.$stopWorker(),this.$useWorker&&this.$startWorker();var _=x.getTokenizer();if(_.on!==void 0){var L=this.onReloadTokenizer.bind(this);_.on("update",L)}this.bgTokenizer.setTokenizer(_),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=x.tokenRe,this.nonTokenRe=x.nonTokenRe,b||(x.attachToSession&&x.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(x.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:m,mode:x}))}},A.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},A.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(x){s.warn("Could not load worker",x),this.$worker=null}},A.prototype.getMode=function(){return this.$mode},A.prototype.setScrollTop=function(x){this.$scrollTop===x||isNaN(x)||(this.$scrollTop=x,this._signal("changeScrollTop",x))},A.prototype.getScrollTop=function(){return this.$scrollTop},A.prototype.setScrollLeft=function(x){this.$scrollLeft===x||isNaN(x)||(this.$scrollLeft=x,this._signal("changeScrollLeft",x))},A.prototype.getScrollLeft=function(){return this.$scrollLeft},A.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},A.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var x=0;return this.lineWidgets.forEach(function(b){b&&b.screenWidth>x&&(x=b.screenWidth)}),this.lineWidgetWidth=x},A.prototype.$computeWidth=function(x){if(this.$modified||x){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var b=this.doc.getAllLines(),m=this.$rowLengthCache,_=0,L=0,I=this.$foldData[L],D=I?I.start.row:1/0,N=b.length,F=0;F<N;F++){if(F>D){if(F=I.end.row+1,F>=N)break;I=this.$foldData[L++],D=I?I.start.row:1/0}m[F]==null&&(m[F]=this.$getStringScreenWidth(b[F])[0]),m[F]>_&&(_=m[F])}this.screenWidth=_}},A.prototype.getLine=function(x){return this.doc.getLine(x)},A.prototype.getLines=function(x,b){return this.doc.getLines(x,b)},A.prototype.getLength=function(){return this.doc.getLength()},A.prototype.getTextRange=function(x){return this.doc.getTextRange(x||this.selection.getRange())},A.prototype.insert=function(x,b){return this.doc.insert(x,b)},A.prototype.remove=function(x){return this.doc.remove(x)},A.prototype.removeFullLines=function(x,b){return this.doc.removeFullLines(x,b)},A.prototype.undoChanges=function(x,b){if(x.length){this.$fromUndo=!0;for(var m=x.length-1;m!=-1;m--){var _=x[m];_.action=="insert"||_.action=="remove"?this.doc.revertDelta(_):_.folds&&this.addFolds(_.folds)}!b&&this.$undoSelect&&(x.selectionBefore?this.selection.fromJSON(x.selectionBefore):this.selection.setRange(this.$getUndoSelection(x,!0))),this.$fromUndo=!1}},A.prototype.redoChanges=function(x,b){if(x.length){this.$fromUndo=!0;for(var m=0;m<x.length;m++){var _=x[m];(_.action=="insert"||_.action=="remove")&&this.doc.$safeApplyDelta(_)}!b&&this.$undoSelect&&(x.selectionAfter?this.selection.fromJSON(x.selectionAfter):this.selection.setRange(this.$getUndoSelection(x,!1))),this.$fromUndo=!1}},A.prototype.setUndoSelect=function(x){this.$undoSelect=x},A.prototype.$getUndoSelection=function(x,b){function m(N){return b?N.action!=="insert":N.action==="insert"}for(var _,L,I=0;I<x.length;I++){var D=x[I];if(D.start){if(!_){m(D)?_=r.fromPoints(D.start,D.end):_=r.fromPoints(D.start,D.start);continue}m(D)?(L=D.start,_.compare(L.row,L.column)==-1&&_.setStart(L),L=D.end,_.compare(L.row,L.column)==1&&_.setEnd(L)):(L=D.start,_.compare(L.row,L.column)==-1&&(_=r.fromPoints(D.start,D.start)))}}return _},A.prototype.replace=function(x,b){return this.doc.replace(x,b)},A.prototype.moveText=function(x,b,m){var _=this.getTextRange(x),L=this.getFoldsInRange(x),I=r.fromPoints(b,b);if(!m){this.remove(x);var D=x.start.row-x.end.row,N=D?-x.end.column:x.start.column-x.end.column;N&&(I.start.row==x.end.row&&I.start.column>x.end.column&&(I.start.column+=N),I.end.row==x.end.row&&I.end.column>x.end.column&&(I.end.column+=N)),D&&I.start.row>=x.end.row&&(I.start.row+=D,I.end.row+=D)}if(I.end=this.insert(I.start,_),L.length){var F=x.start,U=I.start,D=U.row-F.row,N=U.column-F.column;this.addFolds(L.map(function(H){return H=H.clone(),H.start.row==F.row&&(H.start.column+=N),H.end.row==F.row&&(H.end.column+=N),H.start.row+=D,H.end.row+=D,H}))}return I},A.prototype.indentRows=function(x,b,m){m=m.replace(/\t/g,this.getTabString());for(var _=x;_<=b;_++)this.doc.insertInLine({row:_,column:0},m)},A.prototype.outdentRows=function(x){for(var b=x.collapseRows(),m=new r(0,0,0,0),_=this.getTabSize(),L=b.start.row;L<=b.end.row;++L){var I=this.getLine(L);m.start.row=L,m.end.row=L;for(var D=0;D<_&&I.charAt(D)==" ";++D);D<_&&I.charAt(D)==" "?(m.start.column=D,m.end.column=D+1):(m.start.column=0,m.end.column=D),this.remove(m)}},A.prototype.$moveLines=function(x,b,m){if(x=this.getRowFoldStart(x),b=this.getRowFoldEnd(b),m<0){var _=this.getRowFoldStart(x+m);if(_<0)return 0;var L=_-x}else if(m>0){var _=this.getRowFoldEnd(b+m);if(_>this.doc.getLength()-1)return 0;var L=_-b}else{x=this.$clipRowToDocument(x),b=this.$clipRowToDocument(b);var L=b-x+1}var I=new r(x,0,b,Number.MAX_VALUE),D=this.getFoldsInRange(I).map(function(F){return F=F.clone(),F.start.row+=L,F.end.row+=L,F}),N=m==0?this.doc.getLines(x,b):this.doc.removeFullLines(x,b);return this.doc.insertFullLines(x+L,N),D.length&&this.addFolds(D),L},A.prototype.moveLinesUp=function(x,b){return this.$moveLines(x,b,-1)},A.prototype.moveLinesDown=function(x,b){return this.$moveLines(x,b,1)},A.prototype.duplicateLines=function(x,b){return this.$moveLines(x,b,0)},A.prototype.$clipRowToDocument=function(x){return Math.max(0,Math.min(x,this.doc.getLength()-1))},A.prototype.$clipColumnToRow=function(x,b){return b<0?0:Math.min(this.doc.getLine(x).length,b)},A.prototype.$clipPositionToDocument=function(x,b){if(b=Math.max(0,b),x<0)x=0,b=0;else{var m=this.doc.getLength();x>=m?(x=m-1,b=this.doc.getLine(m-1).length):b=Math.min(this.doc.getLine(x).length,b)}return{row:x,column:b}},A.prototype.$clipRangeToDocument=function(x){x.start.row<0?(x.start.row=0,x.start.column=0):x.start.column=this.$clipColumnToRow(x.start.row,x.start.column);var b=this.doc.getLength()-1;return x.end.row>b?(x.end.row=b,x.end.column=this.doc.getLine(b).length):x.end.column=this.$clipColumnToRow(x.end.row,x.end.column),x},A.prototype.setUseWrapMode=function(x){if(x!=this.$useWrapMode){if(this.$useWrapMode=x,this.$modified=!0,this.$resetRowCache(0),x){var b=this.getLength();this.$wrapData=Array(b),this.$updateWrapData(0,b-1)}this._signal("changeWrapMode")}},A.prototype.getUseWrapMode=function(){return this.$useWrapMode},A.prototype.setWrapLimitRange=function(x,b){(this.$wrapLimitRange.min!==x||this.$wrapLimitRange.max!==b)&&(this.$wrapLimitRange={min:x,max:b},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},A.prototype.adjustWrapLimit=function(x,b){var m=this.$wrapLimitRange;m.max<0&&(m={min:b,max:b});var _=this.$constrainWrapLimit(x,m.min,m.max);return _!=this.$wrapLimit&&_>1?(this.$wrapLimit=_,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},A.prototype.$constrainWrapLimit=function(x,b,m){return b&&(x=Math.max(b,x)),m&&(x=Math.min(m,x)),x},A.prototype.getWrapLimit=function(){return this.$wrapLimit},A.prototype.setWrapLimit=function(x){this.setWrapLimitRange(x,x)},A.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},A.prototype.$updateInternalDataOnChange=function(x){var b=this.$useWrapMode,m=x.action,_=x.start,L=x.end,I=_.row,D=L.row,N=D-I,F=null;if(this.$updating=!0,N!=0)if(m==="remove"){this[b?"$wrapData":"$rowLengthCache"].splice(I,N);var U=this.$foldData;F=this.getFoldsInRange(x),this.removeFolds(F);var W=this.getFoldLine(L.row),z=0;if(W){W.addRemoveChars(L.row,L.column,_.column-L.column),W.shiftRow(-N);var H=this.getFoldLine(I);H&&H!==W&&(H.merge(W),W=H),z=U.indexOf(W)+1}for(z;z<U.length;z++){var W=U[z];W.start.row>=L.row&&W.shiftRow(-N)}D=I}else{var B=Array(N);B.unshift(I,0);var j=b?this.$wrapData:this.$rowLengthCache;j.splice.apply(j,B);var U=this.$foldData,W=this.getFoldLine(I),z=0;if(W){var K=W.range.compareInside(_.row,_.column);K==0?(W=W.split(_.row,_.column),W&&(W.shiftRow(N),W.addRemoveChars(D,0,L.column-_.column))):K==-1&&(W.addRemoveChars(I,0,L.column-_.column),W.shiftRow(N)),z=U.indexOf(W)+1}for(z;z<U.length;z++){var W=U[z];W.start.row>=I&&W.shiftRow(N)}}else{N=Math.abs(x.start.column-x.end.column),m==="remove"&&(F=this.getFoldsInRange(x),this.removeFolds(F),N=-N);var W=this.getFoldLine(I);W&&W.addRemoveChars(I,_.column,N)}return b&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,b?this.$updateWrapData(I,D):this.$updateRowLengthCache(I,D),F},A.prototype.$updateRowLengthCache=function(x,b){this.$rowLengthCache[x]=null,this.$rowLengthCache[b]=null},A.prototype.$updateWrapData=function(x,b){var m=this.doc.getAllLines(),_=this.getTabSize(),L=this.$wrapData,I=this.$wrapLimit,D,N,F=x;for(b=Math.min(b,m.length-1);F<=b;)N=this.getFoldLine(F,N),N?(D=[],N.walk((function(U,W,z,H){var B;if(U!=null){B=this.$getDisplayTokens(U,D.length),B[0]=C;for(var j=1;j<B.length;j++)B[j]=w}else B=this.$getDisplayTokens(m[W].substring(H,z),D.length);D=D.concat(B)}).bind(this),N.end.row,m[N.end.row].length+1),L[N.start.row]=this.$computeWrapSplits(D,I,_),F=N.end.row+1):(D=this.$getDisplayTokens(m[F]),L[F]=this.$computeWrapSplits(D,I,_),F++)},A.prototype.$computeWrapSplits=function(x,b,m){if(x.length==0)return[];var _=[],L=x.length,I=0,D=0,N=this.$wrapAsCode,F=this.$indentedSoftWrap,U=b<=Math.max(2*m,8)||F===!1?0:Math.floor(b/2);function W(){var K=0;if(U===0)return K;if(F)for(var Q=0;Q<x.length;Q++){var Y=x[Q];if(Y==R)K+=1;else if(Y==T)K+=m;else{if(Y==k)continue;break}}return N&&F!==!1&&(K+=m),Math.min(K,U)}function z(K){for(var Q=K-I,Y=I;Y<K;Y++){var ee=x[Y];(ee===12||ee===2)&&(Q-=1)}_.length||(H=W(),_.indent=H),D+=Q,_.push(D),I=K}for(var H=0;L-I>b-H;){var B=I+b-H;if(x[B-1]>=R&&x[B]>=R){z(B);continue}if(x[B]==C||x[B]==w){for(B;B!=I-1&&x[B]!=C;B--);if(B>I){z(B);continue}for(B=I+b,B;B<x.length&&x[B]==w;B++);if(B==x.length)break;z(B);continue}for(var j=Math.max(B-(b-(b>>2)),I-1);B>j&&x[B]<C;)B--;if(N){for(;B>j&&x[B]<C;)B--;for(;B>j&&x[B]==M;)B--}else for(;B>j&&x[B]<R;)B--;if(B>j){z(++B);continue}B=I+b,x[B]==$&&B--,z(B-H)}return _},A.prototype.$getDisplayTokens=function(x,b){var m=[],_;b=b||0;for(var L=0;L<x.length;L++){var I=x.charCodeAt(L);if(I==9){_=this.getScreenTabSize(m.length+b),m.push(T);for(var D=1;D<_;D++)m.push(k)}else I==32?m.push(R):I>39&&I<48||I>57&&I<64?m.push(M):I>=4352&&O(I)?m.push(S,$):m.push(S)}return m},A.prototype.$getStringScreenWidth=function(x,b,m){if(b==0)return[0,0];b==null&&(b=1/0),m=m||0;var _,L;for(L=0;L<x.length&&(_=x.charCodeAt(L),_==9?m+=this.getScreenTabSize(m):_>=4352&&O(_)?m+=2:m+=1,!(m>b));L++);return[m,L]},A.prototype.getRowLength=function(x){var b=1;return this.lineWidgets&&(b+=this.lineWidgets[x]&&this.lineWidgets[x].rowCount||0),!this.$useWrapMode||!this.$wrapData[x]?b:this.$wrapData[x].length+b},A.prototype.getRowLineCount=function(x){return!this.$useWrapMode||!this.$wrapData[x]?1:this.$wrapData[x].length+1},A.prototype.getRowWrapIndent=function(x){if(this.$useWrapMode){var b=this.screenToDocumentPosition(x,Number.MAX_VALUE),m=this.$wrapData[b.row];return m.length&&m[0]<b.column?m.indent:0}else return 0},A.prototype.getScreenLastRowColumn=function(x){var b=this.screenToDocumentPosition(x,Number.MAX_VALUE);return this.documentToScreenColumn(b.row,b.column)},A.prototype.getDocumentLastRowColumn=function(x,b){var m=this.documentToScreenRow(x,b);return this.getScreenLastRowColumn(m)},A.prototype.getDocumentLastRowColumnPosition=function(x,b){var m=this.documentToScreenRow(x,b);return this.screenToDocumentPosition(m,Number.MAX_VALUE/10)},A.prototype.getRowSplitData=function(x){if(this.$useWrapMode)return this.$wrapData[x]},A.prototype.getScreenTabSize=function(x){return this.$tabSize-(x%this.$tabSize|0)},A.prototype.screenToDocumentRow=function(x,b){return this.screenToDocumentPosition(x,b).row},A.prototype.screenToDocumentColumn=function(x,b){return this.screenToDocumentPosition(x,b).column},A.prototype.screenToDocumentPosition=function(x,b,m){if(x<0)return{row:0,column:0};var _,L=0,I=0,D,N=0,F=0,U=this.$screenRowCache,W=this.$getRowCacheIndex(U,x),z=U.length;if(z&&W>=0)var N=U[W],L=this.$docRowCache[W],H=x>U[z-1];else var H=!z;for(var B=this.getLength()-1,j=this.getNextFoldLine(L),K=j?j.start.row:1/0;N<=x&&(F=this.getRowLength(L),!(N+F>x||L>=B));)N+=F,L++,L>K&&(L=j.end.row+1,j=this.getNextFoldLine(L,j),K=j?j.start.row:1/0),H&&(this.$docRowCache.push(L),this.$screenRowCache.push(N));if(j&&j.start.row<=L)_=this.getFoldDisplayLine(j),L=j.start.row;else{if(N+F<=x||L>B)return{row:B,column:this.getLine(B).length};_=this.getLine(L),j=null}var Q=0,Y=Math.floor(x-N);if(this.$useWrapMode){var ee=this.$wrapData[L];ee&&(D=ee[Y],Y>0&&ee.length&&(Q=ee.indent,I=ee[Y-1]||ee[ee.length-1],_=_.substring(I)))}return m!==void 0&&this.$bidiHandler.isBidiRow(N+Y,L,Y)&&(b=this.$bidiHandler.offsetToCol(m)),I+=this.$getStringScreenWidth(_,b-Q)[1],this.$useWrapMode&&I>=D&&(I=D-1),j?j.idxToPosition(I):{row:L,column:I}},A.prototype.documentToScreenPosition=function(x,b){if(typeof b>"u")var m=this.$clipPositionToDocument(x.row,x.column);else m=this.$clipPositionToDocument(x,b);x=m.row,b=m.column;var _=0,L=null,I=null;I=this.getFoldAt(x,b,1),I&&(x=I.start.row,b=I.start.column);var D,N=0,F=this.$docRowCache,U=this.$getRowCacheIndex(F,x),W=F.length;if(W&&U>=0)var N=F[U],_=this.$screenRowCache[U],z=x>F[W-1];else var z=!W;for(var H=this.getNextFoldLine(N),B=H?H.start.row:1/0;N<x;){if(N>=B){if(D=H.end.row+1,D>x)break;H=this.getNextFoldLine(D,H),B=H?H.start.row:1/0}else D=N+1;_+=this.getRowLength(N),N=D,z&&(this.$docRowCache.push(N),this.$screenRowCache.push(_))}var j="";H&&N>=B?(j=this.getFoldDisplayLine(H,x,b),L=H.start.row):(j=this.getLine(x).substring(0,b),L=x);var K=0;if(this.$useWrapMode){var Q=this.$wrapData[L];if(Q){for(var Y=0;j.length>=Q[Y];)_++,Y++;j=j.substring(Q[Y-1]||0,j.length),K=Y>0?Q.indent:0}}return this.lineWidgets&&this.lineWidgets[N]&&this.lineWidgets[N].rowsAbove&&(_+=this.lineWidgets[N].rowsAbove),{row:_,column:K+this.$getStringScreenWidth(j)[0]}},A.prototype.documentToScreenColumn=function(x,b){return this.documentToScreenPosition(x,b).column},A.prototype.documentToScreenRow=function(x,b){return this.documentToScreenPosition(x,b).row},A.prototype.getScreenLength=function(){var x=0,b=null;if(this.$useWrapMode)for(var L=this.$wrapData.length,I=0,_=0,b=this.$foldData[_++],D=b?b.start.row:1/0;I<L;){var N=this.$wrapData[I];x+=N?N.length+1:1,I++,I>D&&(I=b.end.row+1,b=this.$foldData[_++],D=b?b.start.row:1/0)}else{x=this.getLength();for(var m=this.$foldData,_=0;_<m.length;_++)b=m[_],x-=b.end.row-b.start.row}return this.lineWidgets&&(x+=this.$getWidgetScreenLength()),x},A.prototype.$setFontMetrics=function(x){this.$enableVarChar&&(this.$getStringScreenWidth=function(b,m,_){if(m===0)return[0,0];m||(m=1/0),_=_||0;var L,I;for(I=0;I<b.length&&(L=b.charAt(I),L===" "?_+=this.getScreenTabSize(_):_+=x.getCharacterWidth(L),!(_>m));I++);return[_,I]})},A.prototype.getPrecedingCharacter=function(){var x=this.selection.getCursor();if(x.column===0)return x.row===0?"":this.doc.getNewLineCharacter();var b=this.getLine(x.row);return b[x.column-1]},A.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()},A})();f.$uid=0,f.prototype.$modes=s.$modes,f.prototype.getValue=f.prototype.toString,f.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},f.prototype.$overwrite=!1,f.prototype.$mode=null,f.prototype.$modeId=null,f.prototype.$scrollTop=0,f.prototype.$scrollLeft=0,f.prototype.$wrapLimit=80,f.prototype.$useWrapMode=!1,f.prototype.$wrapLimitRange={min:null,max:null},f.prototype.lineWidgets=null,f.prototype.isFullWidth=O,y.implement(f.prototype,c);var S=1,$=2,C=3,w=4,M=9,R=10,T=11,k=12;function O(A){return A<4352?!1:A>=4352&&A<=4447||A>=4515&&A<=4519||A>=4602&&A<=4607||A>=9001&&A<=9002||A>=11904&&A<=11929||A>=11931&&A<=12019||A>=12032&&A<=12245||A>=12272&&A<=12283||A>=12288&&A<=12350||A>=12353&&A<=12438||A>=12441&&A<=12543||A>=12549&&A<=12589||A>=12593&&A<=12686||A>=12688&&A<=12730||A>=12736&&A<=12771||A>=12784&&A<=12830||A>=12832&&A<=12871||A>=12880&&A<=13054||A>=13056&&A<=19903||A>=19968&&A<=42124||A>=42128&&A<=42182||A>=43360&&A<=43388||A>=44032&&A<=55203||A>=55216&&A<=55238||A>=55243&&A<=55291||A>=63744&&A<=64255||A>=65040&&A<=65049||A>=65072&&A<=65106||A>=65108&&A<=65126||A>=65128&&A<=65131||A>=65281&&A<=65376||A>=65504&&A<=65510}u("./edit_session/folding").Folding.call(f.prototype),u("./edit_session/bracket_match").BracketMatch.call(f.prototype),s.defineOptions(f.prototype,"session",{wrap:{set:function(A){if(!A||A=="off"?A=!1:A=="free"?A=!0:A=="printMargin"?A=-1:typeof A=="string"&&(A=parseInt(A,10)||!1),this.$wrap!=A)if(this.$wrap=A,!A)this.setUseWrapMode(!1);else{var x=typeof A=="number"?A:null;this.setWrapLimitRange(x,x),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(A){A=A=="auto"?this.$mode.type!="text":A!="text",A!=this.$wrapAsCode&&(this.$wrapAsCode=A,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(A){this.$useWorker=A,this.$stopWorker(),A&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(A){A=parseInt(A),A>0&&this.$tabSize!==A&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=A,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(A){this.setFoldStyle(A)},handlesSet:!0},overwrite:{set:function(A){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(A){this.doc.setNewLineMode(A)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(A){this.setMode(A)},get:function(){return this.$modeId},handlesSet:!0}}),g.EditSession=f}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(u,g,E){var y=u("./lib/lang"),p=u("./lib/oop"),v=u("./range").Range,s=(function(){function r(){this.$options={}}return r.prototype.set=function(i){return p.mixin(this.$options,i),this},r.prototype.getOptions=function(){return y.copyObject(this.$options)},r.prototype.setOptions=function(i){this.$options=i},r.prototype.find=function(i){var e=this.$options,t=this.$matchIterator(i,e);if(!t)return!1;var a=null;return t.forEach(function(d,f,S,$){return a=new v(d,f,S,$),f==$&&e.start&&e.start.start&&e.skipCurrent!=!1&&a.isEqual(e.start)?(a=null,!1):!0}),a},r.prototype.findAll=function(i){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var t=e.range,a=t?i.getLines(t.start.row,t.end.row):i.doc.getAllLines(),d=[],f=e.re;if(e.$isMultiLine){var S=f.length,$=a.length-S,C;e:for(var w=f.offset||0;w<=$;w++){for(var M=0;M<S;M++)if(a[w+M].search(f[M])==-1)continue e;var R=a[w],T=a[w+S-1],k=R.length-R.match(f[0])[0].length,O=T.match(f[S-1])[0].length;C&&C.end.row===w&&C.end.column>k||(d.push(C=new v(w,k,w+S-1,O)),S>2&&(w=w+S-2))}}else for(var A,x=0;x<a.length;x++)if(this.$isMultilineSearch(e)){var b=a.length-1;if(A=this.$multiLineForward(i,f,x,b),A){var m=A.endRow<=b?A.endRow-1:b;m>x&&(x=m),d.push(new v(A.startRow,A.startCol,A.endRow,A.endCol))}}else{A=y.getMatchOffsets(a[x],f);for(var M=0;M<A.length;M++){var _=A[M];d.push(new v(x,_.offset,x,_.offset+_.length))}}if(t){for(var L=t.start.column,I=t.end.column,x=0,M=d.length-1;x<M&&d[x].start.column<L&&d[x].start.row==0;)x++;for(var D=t.end.row-t.start.row;x<M&&d[M].end.column>I&&d[M].end.row==D;)M--;for(d=d.slice(x,M+1),x=0,M=d.length;x<M;x++)d[x].start.row+=t.start.row,d[x].end.row+=t.start.row}return d},r.prototype.parseReplaceString=function(i){for(var e={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},t="",a=0,d=i.length;a<d;a++){var f=i.charCodeAt(a);if(f===e.Backslash){if(a++,a>=d){t+="\\";break}var S=i.charCodeAt(a);switch(S){case e.Backslash:t+="\\";break;case e.n:t+=`
196
+ `;break;case e.t:t+=" ";break}continue}if(f===e.DollarSign){if(a++,a>=d){t+="$";break}var $=i.charCodeAt(a);if($===e.DollarSign){t+="$$";continue}if($===e.Digit0||$===e.Ampersand){t+="$&";continue}if(e.Digit1<=$&&$<=e.Digit9){t+="$"+i[a];continue}}t+=i[a]}return t||i},r.prototype.replace=function(i,e){var t=this.$options,a=this.$assembleRegExp(t);if(t.$isMultiLine)return e;if(a){var d=this.$isMultilineSearch(t);d&&(i=i.replace(/\r\n|\r|\n/g,`
197
+ `));var f=a.exec(i);if(!f||!d&&f[0].length!=i.length)return null;if(e=t.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=i.replace(a,e),t.preserveCase){e=e.split("");for(var S=Math.min(i.length,i.length);S--;){var $=i[S];$&&$.toLowerCase()!=$?e[S]=e[S].toUpperCase():e[S]=e[S].toLowerCase()}e=e.join("")}return e}},r.prototype.$assembleRegExp=function(i,e){if(i.needle instanceof RegExp)return i.re=i.needle;var t=i.needle;if(!i.needle)return i.re=!1;i.regExp||(t=y.escapeRegExp(t));var a=i.caseSensitive?"gm":"gmi";try{new RegExp(t,"u"),i.$supportsUnicodeFlag=!0,a+="u"}catch{i.$supportsUnicodeFlag=!1}if(i.wholeWord&&(t=c(t,i)),i.$isMultiLine=!e&&/[\n\r]/.test(t),i.$isMultiLine)return i.re=this.$assembleMultilineRegExp(t,a);try{var d=new RegExp(t,a)}catch{d=!1}return i.re=d},r.prototype.$assembleMultilineRegExp=function(i,e){for(var t=i.replace(/\r\n|\r|\n/g,`$
198
+ ^`).split(`
199
+ `),a=[],d=0;d<t.length;d++)try{a.push(new RegExp(t[d],e))}catch{return!1}return a},r.prototype.$isMultilineSearch=function(i){return i.re&&/\\r\\n|\\r|\\n/.test(i.re.source)&&i.regExp&&!i.$isMultiLine},r.prototype.$multiLineForward=function(i,e,t,a){for(var d,f=o(i,t),S=t;S<=a;){for(var $=0;$<f&&!(S>a);$++){var C=i.getLine(S++);d=d==null?C:d+`
200
+ `+C}var w=e.exec(d);if(e.lastIndex=0,w){var M=d.slice(0,w.index).split(`
201
+ `),R=w[0].split(`
202
+ `),T=t+M.length-1,k=M[M.length-1].length,O=T+R.length-1,A=R.length==1?k+R[0].length:R[R.length-1].length;return{startRow:T,startCol:k,endRow:O,endCol:A}}}return null},r.prototype.$multiLineBackward=function(i,e,t,a,d){for(var f,S=o(i,a),$=i.getLine(a).length-t,C=a;C>=d;){for(var w=0;w<S&&C>=d;w++){var M=i.getLine(C--);f=f==null?M:M+`
203
+ `+f}var R=n(f,e,$);if(R){var T=f.slice(0,R.index).split(`
204
+ `),k=R[0].split(`
205
+ `),O=C+T.length,A=T[T.length-1].length,x=O+k.length-1,b=k.length==1?A+k[0].length:k[k.length-1].length;return{startRow:O,startCol:A,endRow:x,endCol:b}}}return null},r.prototype.$matchIterator=function(i,e){var t=this.$assembleRegExp(e);if(!t)return!1;var a=this.$isMultilineSearch(e),d=this.$multiLineForward,f=this.$multiLineBackward,S=e.backwards==!0,$=e.skipCurrent!=!1,C=t.unicode,w=e.range,M=e.start;M||(M=w?w[S?"end":"start"]:i.selection.getRange()),M.start&&(M=M[$!=S?"end":"start"]);var R=w?w.start.row:0,T=w?w.end.row:i.getLength()-1;if(S)var k=function(x){var b=M.row;if(!A(b,M.column,x)){for(b--;b>=R;b--)if(A(b,Number.MAX_VALUE,x))return;if(e.wrap!=!1){for(b=T,R=M.row;b>=R;b--)if(A(b,Number.MAX_VALUE,x))return}}};else var k=function(b){var m=M.row;if(!A(m,M.column,b)){for(m=m+1;m<=T;m++)if(A(m,0,b))return;if(e.wrap!=!1){for(m=R,T=M.row;m<=T;m++)if(A(m,0,b))return}}};if(e.$isMultiLine)var O=t.length,A=function(x,b,m){var _=S?x-O+1:x;if(!(_<0||_+O>i.getLength())){var L=i.getLine(_),I=L.search(t[0]);if(!(!S&&I<b||I===-1)){for(var D=1;D<O;D++)if(L=i.getLine(_+D),L.search(t[D])==-1)return;var N=L.match(t[O-1])[0].length;if(!(S&&N>b)&&m(_,I,_+O-1,N))return!0}}};else if(S)var A=function(b,m,_){if(a){var L=f(i,t,m,b,R);if(!L)return!1;if(_(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else{var I=i.getLine(b),D=[],N,F=0;for(t.lastIndex=0;N=t.exec(I);){var U=N[0].length;if(F=N.index,!U){if(F>=I.length)break;t.lastIndex=F+=y.skipEmptyMatch(I,F,C)}if(N.index+U>m)break;D.push(N.index,U)}for(var W=D.length-1;W>=0;W-=2){var z=D[W-1],U=D[W];if(_(b,z,b,z+U))return!0}}};else var A=function(b,m,_){if(t.lastIndex=m,a){var L=d(i,t,b,T);if(L){var I=L.endRow<=T?L.endRow-1:T;I>b&&(b=I)}if(!L)return!1;if(_(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else for(var D=i.getLine(b),N,F;F=t.exec(D);){var U=F[0].length;if(N=F.index,_(b,N,b,N+U))return!0;if(!U&&(t.lastIndex=N+=y.skipEmptyMatch(D,N,C),N>=D.length))return!1}};return{forEach:k}},r})();function c(r,i){var e=y.supportsLookbehind();function t(S,$){$===void 0&&($=!0);var C=e&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return C.test(S)||i.regExp?e&&i.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var a=Array.from(r),d=a[0],f=a[a.length-1];return t(d)+r+t(f,!1)}function n(r,i,e){for(var t=null,a=0;a<=r.length;){i.lastIndex=a;var d=i.exec(r);if(!d)break;var f=d.index+d[0].length;if(f>r.length-e)break;(!t||f>t.index+t[0].length)&&(t=d),a=d.index+1}return t}function o(r,i){var e=5e3,t={row:i,column:0},a=r.doc.positionToIndex(t),d=a+e,f=r.doc.indexToPosition(d),S=f.row;return S+1}g.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(u,g,E){var y=this&&this.__extends||(function(){var r=function(i,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(t[d]=a[d])},r(i,e)};return function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}})(),p=u("../lib/keys"),v=u("../lib/useragent"),s=p.KEY_MODS,c=(function(){function r(i,e){this.$init(i,e,!1)}return r.prototype.$init=function(i,e,t){this.platform=e||(v.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(i),this.$singleCommand=t},r.prototype.addCommand=function(i){this.commands[i.name]&&this.removeCommand(i),this.commands[i.name]=i,i.bindKey&&this._buildKeyHash(i)},r.prototype.removeCommand=function(i,e){var t=i&&(typeof i=="string"?i:i.name);i=this.commands[t],e||delete this.commands[t];var a=this.commandKeyBinding;for(var d in a){var f=a[d];if(f==i)delete a[d];else if(Array.isArray(f)){var S=f.indexOf(i);S!=-1&&(f.splice(S,1),f.length==1&&(a[d]=f[0]))}}},r.prototype.bindKey=function(i,e,t){if(typeof i=="object"&&i&&(t==null&&(t=i.position),i=i[this.platform]),!!i){if(typeof e=="function")return this.addCommand({exec:e,bindKey:i,name:e.name||i});i.split("|").forEach(function(a){var d="";if(a.indexOf(" ")!=-1){var f=a.split(/\s+/);a=f.pop(),f.forEach(function(C){var w=this.parseKeys(C),M=s[w.hashId]+w.key;d+=(d?" ":"")+M,this._addCommandToBinding(d,"chainKeys")},this),d+=" "}var S=this.parseKeys(a),$=s[S.hashId]+S.key;this._addCommandToBinding(d+$,e,t)},this)}},r.prototype._addCommandToBinding=function(i,e,t){var a=this.commandKeyBinding,d;if(!e)delete a[i];else if(!a[i]||this.$singleCommand)a[i]=e;else{Array.isArray(a[i])?(d=a[i].indexOf(e))!=-1&&a[i].splice(d,1):a[i]=[a[i]],typeof t!="number"&&(t=n(e));var f=a[i];for(d=0;d<f.length;d++){var S=f[d],$=n(S);if($>t)break}f.splice(d,0,e)}},r.prototype.addCommands=function(i){i&&Object.keys(i).forEach(function(e){var t=i[e];if(t){if(typeof t=="string")return this.bindKey(t,e);typeof t=="function"&&(t={exec:t}),typeof t=="object"&&(t.name||(t.name=e),this.addCommand(t))}},this)},r.prototype.removeCommands=function(i){Object.keys(i).forEach(function(e){this.removeCommand(i[e])},this)},r.prototype.bindKeys=function(i){Object.keys(i).forEach(function(e){this.bindKey(e,i[e])},this)},r.prototype._buildKeyHash=function(i){this.bindKey(i.bindKey,i)},r.prototype.parseKeys=function(i){var e=i.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),t=e.pop(),a=p[t];if(p.FUNCTION_KEYS[a])t=p.FUNCTION_KEYS[a].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:t.toUpperCase(),hashId:-1}}else return{key:t,hashId:-1};for(var d=0,f=e.length;f--;){var S=p.KEY_MODS[e[f]];if(S==null)return typeof console<"u"&&console.error("invalid modifier "+e[f]+" in "+i),!1;d|=S}return{key:t,hashId:d}},r.prototype.findKeyCommand=function(i,e){var t=s[i]+e;return this.commandKeyBinding[t]},r.prototype.handleKeyboard=function(i,e,t,a){if(!(a<0)){var d=s[e]+t,f=this.commandKeyBinding[d];return i.$keyChain&&(i.$keyChain+=" "+d,f=this.commandKeyBinding[i.$keyChain]||f),f&&(f=="chainKeys"||f[f.length-1]=="chainKeys")?(i.$keyChain=i.$keyChain||d,{command:"null"}):(i.$keyChain&&((!e||e==4)&&t.length==1?i.$keyChain=i.$keyChain.slice(0,-d.length-1):(e==-1||a>0)&&(i.$keyChain="")),{command:f})}},r.prototype.getStatusText=function(i,e){return e.$keyChain||""},r})();function n(r){return typeof r=="object"&&r.bindKey&&r.bindKey.position||(r.isDefault?-100:0)}var o=(function(r){y(i,r);function i(e,t){var a=r.call(this,e,t)||this;return a.$singleCommand=!0,a}return i})(c);o.call=function(r,i,e){c.prototype.$init.call(r,i,e,!0)},c.call=function(r,i,e){c.prototype.$init.call(r,i,e,!1)},g.HashHandler=o,g.MultiHashHandler=c}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(u,g,E){var y=this&&this.__extends||(function(){var n=function(o,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,e){i.__proto__=e}||function(i,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(o,r);function i(){this.constructor=o}o.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),p=u("../lib/oop"),v=u("../keyboard/hash_handler").MultiHashHandler,s=u("../lib/event_emitter").EventEmitter,c=(function(n){y(o,n);function o(r,i){var e=n.call(this,i,r)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(t){return t.args?t.command.exec(t.editor,t.args,t.event,!1):t.command.exec(t.editor,{},t.event,!0)}),e}return o.prototype.exec=function(r,i,e){if(Array.isArray(r)){for(var t=r.length;t--;)if(this.exec(r[t],i,e))return!0;return!1}typeof r=="string"&&(r=this.commands[r]);var a={editor:i,command:r,args:e};return this.canExecute(r,i)?(a.returnValue=this._emit("exec",a),this._signal("afterExec",a),a.returnValue!==!1):(this._signal("commandUnavailable",a),!1)},o.prototype.canExecute=function(r,i){return typeof r=="string"&&(r=this.commands[r]),!(!r||i&&i.$readOnly&&!r.readOnly||this.$checkCommandState!=!1&&r.isAvailable&&!r.isAvailable(i))},o.prototype.toggleRecording=function(r){if(!this.$inReplay)return r&&r._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(i){this.macro.push([i.command,i.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},o.prototype.replay=function(r){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(r);try{this.$inReplay=!0,this.macro.forEach(function(i){typeof i=="string"?this.exec(i,r):this.exec(i[0],r,i[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(r){return r.map(function(i){return typeof i[0]!="string"&&(i[0]=i[0].name),i[1]||(i=i[0]),i})},o})(v);p.implement(c.prototype,s),g.CommandManager=c}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(u,g,E){var y=u("../lib/lang"),p=u("../config"),v=u("../range").Range;function s(n,o){return{win:n,mac:o}}g.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(n){p.loadModule("ace/ext/settings_menu",function(o){o.init(n),n.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(n){p.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(n,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(n){p.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(n,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(n){n.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(n){n.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(n,o){typeof o=="number"&&!isNaN(o)&&n.gotoLine(o),n.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(n){n.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(n){n.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(n){n.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(n){n.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(n){n.session.foldAll(),n.session.unfold(n.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(n){n.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(n){n.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(n){n.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(n){p.loadModule("ace/ext/searchbox",function(o){o.Search(n)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(n){n.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(n){n.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(n){n.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(n){n.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(n,o){n.navigateUp(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(n){n.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(n){n.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(n){n.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(n,o){n.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(n){n.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(n){n.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(n){n.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(n){n.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(n,o){n.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(n){n.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(n){n.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(n){n.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(n){n.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(n,o){n.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(n){n.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(n){n.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(n){n.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(n){n.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(n){n.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(n){n.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(n){n.renderer.scrollBy(0,-2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(n){n.renderer.scrollBy(0,2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(n){n.commands.toggleRecording(n)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(n){n.commands.replay(n)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(n){n.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(n){n.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(n){n.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(n){},readOnly:!0},{name:"cut",description:"Cut",exec:function(n){var o=n.$copyWithEmptySelection&&n.selection.isEmpty(),r=o?n.selection.getLineRange():n.selection.getRange();n._emit("cut",r),r.isEmpty()||n.session.remove(r),n.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(n,o){n.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(n){n.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(n){n.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(n){n.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(n){n.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(n){n.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(n){n.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(n){n.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(n){p.loadModule("ace/ext/searchbox",function(o){o.Search(n,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(n){n.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(n){n.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(n){n.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(n){n.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(n){n.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(n){n.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(n){n.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(n){n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(n){if(n.selection.isEmpty())n.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(n){n.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(n){n.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(n){var o=n.selection.getRange();o.start.column=0,n.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(n){var o=n.selection.getRange();o.end.column=Number.MAX_VALUE,n.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(n){n.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(n){n.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(n){n.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(n){n.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(n){n.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(n){n.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(n,o){n.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(n,o){n.insert(y.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(n){n.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(n){n.transposeLetters()},multiSelectAction:function(n){n.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(n){n.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(n){n.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(n){n.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(n){var o=n.selection.getRange();o.start.column=o.end.column=0,o.end.row++,n.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(n){n.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(n){for(var o=n.selection.isBackwards(),r=o?n.selection.getSelectionLead():n.selection.getSelectionAnchor(),i=o?n.selection.getSelectionAnchor():n.selection.getSelectionLead(),e=n.session.doc.getLine(r.row).length,t=n.session.doc.getTextRange(n.selection.getRange()),a=t.replace(/\n\s*/," ").length,d=n.session.doc.getLine(r.row),f=r.row+1;f<=i.row+1;f++){var S=y.stringTrimLeft(y.stringTrimRight(n.session.doc.getLine(f)));S.length!==0&&(S=" "+S),d+=S}i.row+1<n.session.doc.getLength()-1&&(d+=n.session.doc.getNewLineCharacter()),n.clearSelection(),n.session.doc.replace(new v(r.row,0,i.row+2,0),d),a>0?(n.selection.moveCursorTo(r.row,r.column),n.selection.selectTo(r.row,r.column+a)):(e=n.session.doc.getLine(r.row).length>e?e+1:e,n.selection.moveCursorTo(r.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(n){var o=n.session.doc.getLength()-1,r=n.session.doc.getLine(o).length,i=n.selection.rangeList.ranges,e=[];i.length<1&&(i=[n.selection.getRange()]);for(var t=0;t<i.length;t++)t==i.length-1&&(i[t].end.row===o&&i[t].end.column===r||e.push(new v(i[t].end.row,i[t].end.column,o,r))),t===0?i[t].start.row===0&&i[t].start.column===0||e.push(new v(0,0,i[t].start.row,i[t].start.column)):e.push(new v(i[t-1].end.row,i[t-1].end.column,i[t].start.row,i[t].start.column));n.exitMultiSelectMode(),n.clearSelection();for(var t=0;t<e.length;t++)n.selection.addRange(e[t],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(n){n.selection.clearSelection(),n.navigateLineEnd(),n.insert(`
206
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(n){n.selection.clearSelection();var o=n.getCursorPosition();n.selection.moveTo(o.row-1,Number.MAX_VALUE),n.insert(`
207
+ `),o.row===0&&n.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(n){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),n.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:s("F1","F1"),exec:function(n){n.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(n){n.prompt({$type:"modes"})},readOnly:!0}];for(var c=1;c<9;c++)g.commands.push({name:"foldToLevel"+c,description:"Fold To Level "+c,level:c,exec:function(n){n.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(u,g,E){var y=u("../lib/keys"),p=(function(){function s(c){this.editor=c,this.gutterLayer=c.renderer.$gutterLayer,this.element=c.renderer.$gutter,this.lines=c.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return s.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))},s.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))},s.prototype.$onGutterKeyDown=function(c){if(this.annotationTooltip.isOpen){c.preventDefault(),c.keyCode===y.escape&&this.annotationTooltip.hide();return}if(c.target===this.element){if(c.keyCode!=y.enter)return;c.preventDefault();var n=this.editor.getCursorPosition().row;this.editor.isRowVisible(n)||this.editor.scrollToLine(n,!0,!0),setTimeout((function(){var o=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),r=this.$findNearestFoldLaneWidget(o),i=this.$findNearestAnnotation(o);if(!(r===null&&i===null)){var e=this.$findClosestNumber(r,i,o);if(e===r)if(this.activeLane="fold",this.activeRowIndex=r,this.$isCustomWidgetVisible(r)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=i,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(c),setTimeout((function(){this.editor._signal("gutterkeydown",new v(c,this))}).bind(this),10)},s.prototype.$handleGutterKeyboardInteraction=function(c){if(c.keyCode===y.tab){c.preventDefault();return}if(c.keyCode===y.escape){c.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(c.keyCode===y.up){switch(c.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(c.keyCode===y.down){switch(c.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(c.keyCode===y.left){c.preventDefault(),this.$switchLane("annotation");return}if(c.keyCode===y.right){c.preventDefault(),this.$switchLane("fold");return}if(c.keyCode===y.enter||c.keyCode===y.space){switch(c.preventDefault(),this.activeLane){case"fold":var n=this.$rowIndexToRow(this.activeRowIndex),o=this.editor.session.$gutterCustomWidgets[n];if(o)o.callbacks&&o.callbacks.onClick&&o.callbacks.onClick(c,n);else if(this.gutterLayer.session.foldWidgets[n]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),c),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==n&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(n),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}},s.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()},s.prototype.$isFoldWidgetVisible=function(c){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(c)),o=this.$getFoldWidget(c).style.display!=="none";return n&&o},s.prototype.$isCustomWidgetVisible=function(c){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(c)),o=!!this.$getCustomWidget(c);return n&&o},s.prototype.$isAnnotationVisible=function(c){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(c)),o=this.$getAnnotation(c).style.display!=="none";return n&&o},s.prototype.$getFoldWidget=function(c){var n=this.lines.get(c),o=n.element;return o.childNodes[1]},s.prototype.$getCustomWidget=function(c){var n=this.lines.get(c),o=n.element;return o.childNodes[3]},s.prototype.$getAnnotation=function(c){var n=this.lines.get(c),o=n.element;return o.childNodes[2]},s.prototype.$findNearestFoldLaneWidget=function(c){if(this.$isCustomWidgetVisible(c)||this.$isFoldWidgetVisible(c))return c;for(var n=0;c-n>0||c+n<this.lines.getLength()-1;){if(n++,c-n>=0&&this.$isCustomWidgetVisible(c-n))return c-n;if(c+n<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(c+n))return c+n;if(c-n>=0&&this.$isFoldWidgetVisible(c-n))return c-n;if(c+n<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(c+n))return c+n}return null},s.prototype.$findNearestAnnotation=function(c){if(this.$isAnnotationVisible(c))return c;for(var n=0;c-n>0||c+n<this.lines.getLength()-1;){if(n++,c-n>=0&&this.$isAnnotationVisible(c-n))return c-n;if(c+n<=this.lines.getLength()-1&&this.$isAnnotationVisible(c+n))return c+n}return null},s.prototype.$focusFoldWidget=function(c){if(c!=null){var n=this.$getFoldWidget(c);n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus()}},s.prototype.$focusCustomWidget=function(c){if(c!=null){var n=this.$getCustomWidget(c);n&&(n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus())}},s.prototype.$focusAnnotation=function(c){if(c!=null){var n=this.$getAnnotation(c);n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus()}},s.prototype.$blurFoldWidget=function(c){var n=this.$getFoldWidget(c);n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},s.prototype.$blurCustomWidget=function(c){var n=this.$getCustomWidget(c);n&&(n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur())},s.prototype.$blurAnnotation=function(c){var n=this.$getAnnotation(c);n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},s.prototype.$moveFoldWidgetUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isFoldWidgetVisible(c)||this.$isCustomWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=c,this.$isFoldWidgetVisible(c)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},s.prototype.$moveFoldWidgetDown=function(){for(var c=this.activeRowIndex;c<this.lines.getLength()-1;)if(c++,this.$isFoldWidgetVisible(c)||this.$isCustomWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=c,this.$isFoldWidgetVisible(c)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},s.prototype.$moveAnnotationUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},s.prototype.$moveAnnotationDown=function(){for(var c=this.activeRowIndex;c<this.lines.getLength()-1;)if(c++,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},s.prototype.$findClosestNumber=function(c,n,o){return c===null?n:n===null||Math.abs(o-c)<=Math.abs(o-n)?c:n},s.prototype.$switchLane=function(c){switch(c){case"annotation":if(this.activeLane==="annotation")break;var n=this.$findNearestAnnotation(this.activeRowIndex);if(n==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=n,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}},s.prototype.$rowIndexToRow=function(c){var n=this.lines.get(c);return n?n.row:null},s.prototype.$rowToRowIndex=function(c){for(var n=0;n<this.lines.getLength();n++){var o=this.lines.get(n);if(o.row==c)return n}return null},s})();g.GutterKeyboardHandler=p;var v=(function(){function s(c,n){this.gutterKeyboardHandler=n,this.domEvent=c}return s.prototype.getKey=function(){return y.keyCodeToString(this.domEvent.keyCode)},s.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},s.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},s.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},s})();g.GutterKeyboardEvent=v}),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(u,g,E){var y=this&&this.__values||function(b){var m=typeof Symbol=="function"&&Symbol.iterator,_=m&&b[m],L=0;if(_)return _.call(b);if(b&&typeof b.length=="number")return{next:function(){return b&&L>=b.length&&(b=void 0),{value:b&&b[L++],done:!b}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},p=u("./lib/oop"),v=u("./lib/dom"),s=u("./lib/lang"),c=u("./lib/useragent"),n=u("./keyboard/textinput").TextInput,o=u("./mouse/mouse_handler").MouseHandler,r=u("./mouse/fold_handler").FoldHandler,i=u("./keyboard/keybinding").KeyBinding,e=u("./edit_session").EditSession,t=u("./search").Search,a=u("./range").Range,d=u("./lib/event_emitter").EventEmitter,f=u("./commands/command_manager").CommandManager,S=u("./commands/default_commands").commands,$=u("./config"),C=u("./token_iterator").TokenIterator,w=u("./keyboard/gutter_handler").GutterKeyboardHandler,M=u("./config").nls,R=u("./clipboard"),T=u("./lib/keys"),k=u("./lib/event"),O=u("./tooltip").HoverTooltip,A=(function(){function b(m,_,L){this.id="editor"+ ++b.$uid,this.session,this.$toDestroy=[];var I=m.getContainerElement();this.container=I,this.renderer=m,this.commands=new f(c.isMac?"mac":"win",S),typeof document=="object"&&(this.textInput=new n(m.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new r(this)),this.keyBinding=new i(this),this.$search=new t().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(D,N){N._$emitInputEvent.schedule(31)}),this.setSession(_||L&&L.session||new e("")),$.resetOptions(this),L&&this.setOptions(L),$._signal("editor",this)}return b.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},b.prototype.startOperation=function(m){this.session.startOperation(m)},b.prototype.endOperation=function(m){this.session.endOperation(m)},b.prototype.onStartOperation=function(m){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,m||(this.previousCommand=null)},b.prototype.onEndOperation=function(m){if(this.curOp&&this.session){if(m&&m.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var _=this.curOp.command,L=_&&_.scrollIntoView;if(L){switch(L){case"center-animate":L="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var I=this.selection.getRange(),D=this.renderer.layerConfig;(I.start.row>=D.lastRow||I.end.row<=D.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}L=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},b.prototype.$historyTracker=function(m){if(this.$mergeUndoDeltas){var _=this.prevOp,L=this.$mergeableCommands,I=_.command&&m.command.name==_.command.name;if(m.command.name=="insertstring"){var D=m.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),I=I&&this.mergeNextCommand&&(!/\s/.test(D)||/\s/.test(_.args)),this.mergeNextCommand=!0}else I=I&&L.indexOf(m.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(I=!1),I?this.session.mergeUndoDeltas=!0:L.indexOf(m.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},b.prototype.setKeyboardHandler=function(m,_){if(m&&typeof m=="string"&&m!="ace"){this.$keybindingId=m;var L=this;$.loadModule(["keybinding",m],function(I){L.$keybindingId==m&&L.keyBinding.setKeyboardHandler(I&&I.handler),_&&_()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(m),_&&_()},b.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},b.prototype.setSession=function(m){if(this.session!=m){this.curOp&&this.endOperation(),this.curOp={};var _=this.session;if(_){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 L=this.session.getSelection();L.off("changeCursor",this.$onCursorChange),L.off("changeSelection",this.$onSelectionChange)}this.session=m,m?(this.$onDocumentChange=this.onDocumentChange.bind(this),m.on("change",this.$onDocumentChange),this.renderer.setSession(m),this.$onChangeMode=this.onChangeMode.bind(this),m.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),m.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),m.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),m.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),m.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),m.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=m.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(m)),this._signal("changeSession",{session:m,oldSession:_}),this.curOp=null,_&&_._signal("changeEditor",{oldEditor:this}),_&&(_.$editor=null),m&&m._signal("changeEditor",{editor:this}),m&&(m.$editor=this),m&&!m.destroyed&&m.bgTokenizer.scheduleStart()}},b.prototype.getSession=function(){return this.session},b.prototype.setValue=function(m,_){return this.session.doc.setValue(m),_?_==1?this.navigateFileEnd():_==-1&&this.navigateFileStart():this.selectAll(),m},b.prototype.getValue=function(){return this.session.getValue()},b.prototype.getSelection=function(){return this.selection},b.prototype.resize=function(m){this.renderer.onResize(m)},b.prototype.setTheme=function(m,_){this.renderer.setTheme(m,_)},b.prototype.getTheme=function(){return this.renderer.getTheme()},b.prototype.setStyle=function(m,_){this.renderer.setStyle(m,_)},b.prototype.unsetStyle=function(m){this.renderer.unsetStyle(m)},b.prototype.getFontSize=function(){return this.getOption("fontSize")||v.computedStyle(this.container).fontSize},b.prototype.setFontSize=function(m){this.setOption("fontSize",m)},b.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var m=this;this.$highlightPending=!0,setTimeout(function(){m.$highlightPending=!1;var _=m.session;if(!(!_||_.destroyed)){_.$bracketHighlight&&(_.$bracketHighlight.markerIds.forEach(function(H){_.removeMarker(H)}),_.$bracketHighlight=null);var L=m.getCursorPosition(),I=m.getKeyboardHandler(),D=I&&I.$getDirectionForHighlight&&I.$getDirectionForHighlight(m),N=_.getMatchingBracketRanges(L,D);if(!N){var F=new C(_,L.row,L.column),U=F.getCurrentToken();if(U&&/\b(?:tag-open|tag-name)/.test(U.type)){var W=_.getMatchingTags(L);W&&(N=[W.openTagName.isEmpty()?W.openTag:W.openTagName,W.closeTagName.isEmpty()?W.closeTag:W.closeTagName])}}if(!N&&_.$mode.getMatching&&(N=_.$mode.getMatching(m.session)),!N){m.getHighlightIndentGuides()&&m.renderer.$textLayer.$highlightIndentGuide();return}var z="ace_bracket";Array.isArray(N)?N.length==1&&(z="ace_error_bracket"):N=[N],N.length==2&&(a.comparePoints(N[0].end,N[1].start)==0?N=[a.fromPoints(N[0].start,N[1].end)]:a.comparePoints(N[0].start,N[1].end)==0&&(N=[a.fromPoints(N[1].start,N[0].end)])),_.$bracketHighlight={ranges:N,markerIds:N.map(function(H){return _.addMarker(H,z,"text")})},m.getHighlightIndentGuides()&&m.renderer.$textLayer.$highlightIndentGuide()}},50)}},b.prototype.focus=function(){this.textInput.focus()},b.prototype.isFocused=function(){return this.textInput.isFocused()},b.prototype.blur=function(){this.textInput.blur()},b.prototype.onFocus=function(m){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",m))},b.prototype.onBlur=function(m){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",m))},b.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},b.prototype.onDocumentChange=function(m){var _=this.session.$useWrapMode,L=m.start.row==m.end.row?m.end.row:1/0;this.renderer.updateLines(m.start.row,L,_),this._signal("change",m),this.$cursorChange()},b.prototype.onTokenizerUpdate=function(m){var _=m.data;this.renderer.updateLines(_.first,_.last)},b.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},b.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},b.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},b.prototype.$updateHighlightActiveLine=function(){var m=this.getSession(),_;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(_=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(_=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(_=!1)),m.$highlightLineMarker&&!_)m.removeMarker(m.$highlightLineMarker.id),m.$highlightLineMarker=null;else if(!m.$highlightLineMarker&&_){var L=new a(_.row,_.column,_.row,1/0);L.id=m.addMarker(L,"ace_active-line","screenLine"),m.$highlightLineMarker=L}else _&&(m.$highlightLineMarker.start.row=_.row,m.$highlightLineMarker.end.row=_.row,m.$highlightLineMarker.start.column=_.column,m._signal("changeBackMarker"))},b.prototype.onSelectionChange=function(m){var _=this.session;if(_.$selectionMarker&&_.removeMarker(_.$selectionMarker),_.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var L=this.selection.getRange(),I=this.getSelectionStyle();_.$selectionMarker=_.addMarker(L,"ace_selection",I)}var D=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(D),this._signal("changeSelection")},b.prototype.$getSelectionHighLightRegexp=function(){var m=this.session,_=this.getSelectionRange();if(!(_.isEmpty()||_.isMultiLine())){var L=_.start.column,I=_.end.column,D=m.getLine(_.start.row),N=D.substring(L,I);if(!(N.length>5e3||!/[\w\d]/.test(N))){var F=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:N}),U=D.substring(L-1,I+1);if(F.test(U))return F}}},b.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},b.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},b.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},b.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},b.prototype.onChangeMode=function(m){this.renderer.updateText(),this._emit("changeMode",m)},b.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},b.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},b.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},b.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},b.prototype.getCopyText=function(){var m=this.getSelectedText(),_=this.session.doc.getNewLineCharacter(),L=!1;if(!m&&this.$copyWithEmptySelection){L=!0;for(var I=this.selection.getAllRanges(),D=0;D<I.length;D++){var N=I[D];D&&I[D-1].start.row==N.start.row||(m+=this.session.getLine(N.start.row)+_)}}var F={text:m};return this._signal("copy",F),R.lineMode=L?F.text:!1,F.text},b.prototype.onCopy=function(){this.commands.exec("copy",this)},b.prototype.onCut=function(){this.commands.exec("cut",this)},b.prototype.onPaste=function(m,_){var L={text:m,event:_};this.commands.exec("paste",this,L)},b.prototype.$handlePaste=function(m){typeof m=="string"&&(m={text:m}),this._signal("paste",m);var _=m.text,L=_===R.lineMode,I=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)L?I.insert({row:this.selection.lead.row,column:0},_):this.insert(_);else if(L)this.selection.rangeList.ranges.forEach(function(z){I.insert({row:z.start.row,column:0},_)});else{var D=_.split(/\r\n|\r|\n/),N=this.selection.rangeList.ranges,F=D.length==2&&(!D[0]||!D[1]);if(D.length!=N.length||F)return this.commands.exec("insertstring",this,_);for(var U=N.length;U--;){var W=N[U];W.isEmpty()||I.remove(W),I.insert(W.start,D[U])}}},b.prototype.execCommand=function(m,_){return this.commands.exec(m,this,_)},b.prototype.insert=function(m,_){var L=this.session,I=L.getMode(),D=this.getCursorPosition();if(this.getBehavioursEnabled()&&!_){var N=I.transformAction(L.getState(D.row),"insertion",this,L,m);N&&(m!==N.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),m=N.text)}if(m==" "&&(m=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&m.indexOf(`
208
+ `)==-1){var F=a.fromPoints(D,D);F.end.column+=m.length,this.session.remove(F)}}else{var F=this.getSelectionRange();D=this.session.remove(F),this.clearSelection()}if(m==`
209
+ `||m==`\r
210
+ `){var H=L.getLine(D.row);if(D.column>H.search(/\S|$/)){var U=H.substr(D.column).search(/\S|$/);L.doc.removeInLine(D.row,D.column,D.column+U)}}this.clearSelection();var W=D.column,z=L.getState(D.row),H=L.getLine(D.row),B=I.checkOutdent(z,H,m);if(L.insert(D,m),N&&N.selection&&(N.selection.length==2?this.selection.setSelectionRange(new a(D.row,W+N.selection[0],D.row,W+N.selection[1])):this.selection.setSelectionRange(new a(D.row+N.selection[0],N.selection[1],D.row+N.selection[2],N.selection[3]))),this.$enableAutoIndent){if(L.getDocument().isNewLine(m)){var j=I.getNextLineIndent(z,H.slice(0,D.column),L.getTabString());L.insert({row:D.row+1,column:0},j)}B&&I.autoOutdent(z,L,D.row)}},b.prototype.autoIndent=function(){for(var m=this.session,_=m.getMode(),L=this.selection.isEmpty()?[new a(0,0,m.doc.getLength()-1,0)]:this.selection.getAllRanges(),I="",D="",N="",F=m.getTabString(),U=0;U<L.length;U++)for(var W=L[U].start.row,z=L[U].end.row,H=W;H<=z;H++){H>0&&(I=m.getState(H-1),D=m.getLine(H-1),N=_.getNextLineIndent(I,D,F));var B=m.getLine(H),j=_.$getIndent(B);if(N!==j){if(j.length>0){var K=new a(H,0,H,j.length);m.remove(K)}N.length>0&&m.insert({row:H,column:0},N)}_.autoOutdent(I,m,H)}},b.prototype.onTextInput=function(m,_){if(!_)return this.keyBinding.onTextInput(m);this.startOperation({command:{name:"insertstring"}});var L=this.applyComposition.bind(this,m,_);this.selection.rangeCount?this.forEachSelection(L):L(),this.endOperation()},b.prototype.applyComposition=function(m,_){if(_.extendLeft||_.extendRight){var L=this.selection.getRange();L.start.column-=_.extendLeft,L.end.column+=_.extendRight,L.start.column<0&&(L.start.row--,L.start.column+=this.session.getLine(L.start.row).length+1),this.selection.setRange(L),!m&&!L.isEmpty()&&this.remove()}if((m||!this.selection.isEmpty())&&this.insert(m,!0),_.restoreStart||_.restoreEnd){var L=this.selection.getRange();L.start.column-=_.restoreStart,L.end.column-=_.restoreEnd,this.selection.setRange(L)}},b.prototype.onCommandKey=function(m,_,L){return this.keyBinding.onCommandKey(m,_,L)},b.prototype.setOverwrite=function(m){this.session.setOverwrite(m)},b.prototype.getOverwrite=function(){return this.session.getOverwrite()},b.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},b.prototype.setScrollSpeed=function(m){this.setOption("scrollSpeed",m)},b.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},b.prototype.setDragDelay=function(m){this.setOption("dragDelay",m)},b.prototype.getDragDelay=function(){return this.getOption("dragDelay")},b.prototype.setSelectionStyle=function(m){this.setOption("selectionStyle",m)},b.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},b.prototype.setHighlightActiveLine=function(m){this.setOption("highlightActiveLine",m)},b.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},b.prototype.setHighlightGutterLine=function(m){this.setOption("highlightGutterLine",m)},b.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},b.prototype.setHighlightSelectedWord=function(m){this.setOption("highlightSelectedWord",m)},b.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},b.prototype.setAnimatedScroll=function(m){this.renderer.setAnimatedScroll(m)},b.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},b.prototype.setShowInvisibles=function(m){this.renderer.setShowInvisibles(m)},b.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},b.prototype.setDisplayIndentGuides=function(m){this.renderer.setDisplayIndentGuides(m)},b.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},b.prototype.setHighlightIndentGuides=function(m){this.renderer.setHighlightIndentGuides(m)},b.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},b.prototype.setShowPrintMargin=function(m){this.renderer.setShowPrintMargin(m)},b.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},b.prototype.setPrintMarginColumn=function(m){this.renderer.setPrintMarginColumn(m)},b.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},b.prototype.setReadOnly=function(m){this.setOption("readOnly",m)},b.prototype.getReadOnly=function(){return this.getOption("readOnly")},b.prototype.setBehavioursEnabled=function(m){this.setOption("behavioursEnabled",m)},b.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},b.prototype.setWrapBehavioursEnabled=function(m){this.setOption("wrapBehavioursEnabled",m)},b.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},b.prototype.setShowFoldWidgets=function(m){this.setOption("showFoldWidgets",m)},b.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},b.prototype.setFadeFoldWidgets=function(m){this.setOption("fadeFoldWidgets",m)},b.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},b.prototype.remove=function(m){this.selection.isEmpty()&&(m=="left"?this.selection.selectLeft():this.selection.selectRight());var _=this.getSelectionRange();if(this.getBehavioursEnabled()){var L=this.session,I=L.getState(_.start.row),D=L.getMode().transformAction(I,"deletion",this,L,_);if(_.end.column===0){var N=L.getTextRange(_);if(N[N.length-1]==`
211
+ `){var F=L.getLine(_.end.row);/^\s+$/.test(F)&&(_.end.column=F.length)}}D&&(_=D)}this.session.remove(_),this.clearSelection()},b.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},b.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},b.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},b.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var m=this.getSelectionRange();m.start.column==m.end.column&&m.start.row==m.end.row&&(m.end.column=0,m.end.row++),this.session.remove(m),this.clearSelection()},b.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var m=this.getCursorPosition();this.insert(`
212
+ `),this.moveCursorToPosition(m)},b.prototype.setGhostText=function(m,_){this.renderer.setGhostText(m,_)},b.prototype.removeGhostText=function(){this.renderer.removeGhostText()},b.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var m=this.getCursorPosition(),_=m.column;if(_!==0){var L=this.session.getLine(m.row),I,D;_<L.length?(I=L.charAt(_)+L.charAt(_-1),D=new a(m.row,_-1,m.row,_+1)):(I=L.charAt(_-1)+L.charAt(_-2),D=new a(m.row,_-2,m.row,_)),this.session.replace(D,I),this.session.selection.moveToPosition(D.end)}}},b.prototype.toLowerCase=function(){var m=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var _=this.getSelectionRange(),L=this.session.getTextRange(_);this.session.replace(_,L.toLowerCase()),this.selection.setSelectionRange(m)},b.prototype.toUpperCase=function(){var m=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var _=this.getSelectionRange(),L=this.session.getTextRange(_);this.session.replace(_,L.toUpperCase()),this.selection.setSelectionRange(m)},b.prototype.indent=function(){var m=this.session,_=this.getSelectionRange();if(_.start.row<_.end.row){var L=this.$getSelectedRows();m.indentRows(L.first,L.last," ");return}else if(_.start.column<_.end.column){var I=m.getTextRange(_);if(!/^\s+$/.test(I)){var L=this.$getSelectedRows();m.indentRows(L.first,L.last," ");return}}var D=m.getLine(_.start.row),N=_.start,F=m.getTabSize(),U=m.documentToScreenColumn(N.row,N.column);if(this.session.getUseSoftTabs())var W=F-U%F,z=s.stringRepeat(" ",W);else{for(var W=U%F;D[_.start.column-1]==" "&&W;)_.start.column--,W--;this.selection.setSelectionRange(_),z=" "}return this.insert(z)},b.prototype.blockIndent=function(){var m=this.$getSelectedRows();this.session.indentRows(m.first,m.last," ")},b.prototype.blockOutdent=function(){var m=this.session.getSelection();this.session.outdentRows(m.getRange())},b.prototype.sortLines=function(){for(var m=this.$getSelectedRows(),_=this.session,L=[],I=m.first;I<=m.last;I++)L.push(_.getLine(I));L.sort(function(F,U){return F.toLowerCase()<U.toLowerCase()?-1:F.toLowerCase()>U.toLowerCase()?1:0});for(var D=new a(0,0,0,0),I=m.first;I<=m.last;I++){var N=_.getLine(I);D.start.row=I,D.end.row=I,D.end.column=N.length,_.replace(D,L[I-m.first])}},b.prototype.toggleCommentLines=function(){var m=this.session.getState(this.getCursorPosition().row),_=this.$getSelectedRows();this.session.getMode().toggleCommentLines(m,this.session,_.first,_.last)},b.prototype.toggleBlockComment=function(){var m=this.getCursorPosition(),_=this.session.getState(m.row),L=this.getSelectionRange();this.session.getMode().toggleBlockComment(_,this.session,L,m)},b.prototype.getNumberAt=function(m,_){var L=/[\-]?[0-9]+(?:\.[0-9]+)?/g;L.lastIndex=0;for(var I=this.session.getLine(m);L.lastIndex<_;){var D=L.exec(I);if(D.index<=_&&D.index+D[0].length>=_){var N={value:D[0],start:D.index,end:D.index+D[0].length};return N}}return null},b.prototype.modifyNumber=function(m){var _=this.selection.getCursor().row,L=this.selection.getCursor().column,I=new a(_,L-1,_,L),D=this.session.getTextRange(I);if(!isNaN(parseFloat(D))&&isFinite(D)){var N=this.getNumberAt(_,L);if(N){var F=N.value.indexOf(".")>=0?N.start+N.value.indexOf(".")+1:N.end,U=N.start+N.value.length-F,W=parseFloat(N.value);W*=Math.pow(10,U),F!==N.end&&L<F?m*=Math.pow(10,N.end-L-1):m*=Math.pow(10,N.end-L),W+=m,W/=Math.pow(10,U);var z=W.toFixed(U),H=new a(_,N.start,_,N.end);this.session.replace(H,z),this.moveCursorTo(_,Math.max(N.start+1,L+z.length-N.value.length))}}else this.toggleWord()},b.prototype.toggleWord=function(){var m=this.selection.getCursor().row,_=this.selection.getCursor().column;this.selection.selectWord();var L=this.getSelectedText(),I=this.selection.getWordRange().start.column,D=L.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),N=_-I-1;N<0&&(N=0);var F=0,U=0,W=this;L.match(/[A-Za-z0-9_]+/)&&D.forEach(function(ie,ae){U=F+ie.length,N>=F&&N<=U&&(L=ie,W.selection.clearSelection(),W.moveCursorTo(m,F+I),W.selection.selectTo(m,U+I)),F=U});for(var z=this.$toggleWordPairs,H,B=0;B<z.length;B++)for(var j=z[B],K=0;K<=1;K++){var Q=+!K,Y=L.match(new RegExp("^\\s?_?("+s.escapeRegExp(j[K])+")\\s?$","i"));if(Y){var ee=L.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(Y[1])+")($|\\s)","g"));ee&&(H=L.replace(new RegExp(s.escapeRegExp(j[K]),"i"),function(ie){var ae=j[Q];return ie.toUpperCase()==ie?ae=ae.toUpperCase():ie.charAt(0).toUpperCase()==ie.charAt(0)&&(ae=ae.substr(0,0)+j[Q].charAt(0).toUpperCase()+ae.substr(1)),ae}),this.insert(H),H="")}}},b.prototype.findLinkAt=function(m,_){var L,I,D=this.session.getLine(m),N=D.split(/((?:https?|ftp):\/\/[\S]+)/),F=_;F<0&&(F=0);var U=0,W=0,z;try{for(var H=y(N),B=H.next();!B.done;B=H.next()){var j=B.value;if(W=U+j.length,F>=U&&F<=W&&j.match(/((?:https?|ftp):\/\/[\S]+)/)){z=j.replace(/[\s:.,'";}\]]+$/,"");break}U=W}}catch(K){L={error:K}}finally{try{B&&!B.done&&(I=H.return)&&I.call(H)}finally{if(L)throw L.error}}return z},b.prototype.openLink=function(){var m=this.selection.getCursor(),_=this.findLinkAt(m.row,m.column);return _&&window.open(_,"_blank"),_!=null},b.prototype.removeLines=function(){var m=this.$getSelectedRows();this.session.removeFullLines(m.first,m.last),this.clearSelection()},b.prototype.duplicateSelection=function(){var m=this.selection,_=this.session,L=m.getRange(),I=m.isBackwards();if(L.isEmpty()){var D=L.start.row;_.duplicateLines(D,D)}else{var N=I?L.start:L.end,F=_.insert(N,_.getTextRange(L));L.start=N,L.end=F,m.setSelectionRange(L,I)}},b.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},b.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},b.prototype.moveText=function(m,_,L){return this.session.moveText(m,_,L)},b.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},b.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},b.prototype.$moveLines=function(m,_){var L,I,D=this.selection;if(!D.inMultiSelectMode||this.inVirtualSelectionMode){var N=D.toOrientedRange();L=this.$getSelectedRows(N),I=this.session.$moveLines(L.first,L.last,_?0:m),_&&m==-1&&(I=0),N.moveBy(I,0),D.fromOrientedRange(N)}else{var F=D.rangeList.ranges;D.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var U=0,W=0,z=F.length,H=0;H<z;H++){var B=H;F[H].moveBy(U,0),L=this.$getSelectedRows(F[H]);for(var j=L.first,K=L.last;++H<z;){W&&F[H].moveBy(W,0);var Q=this.$getSelectedRows(F[H]);if(_&&Q.first!=K)break;if(!_&&Q.first>K+1)break;K=Q.last}for(H--,U=this.session.$moveLines(j,K,_?0:m),_&&m==-1&&(B=H+1);B<=H;)F[B].moveBy(U,0),B++;_||(U=0),W+=U}D.fromOrientedRange(D.ranges[0]),D.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},b.prototype.$getSelectedRows=function(m){return m=(m||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(m.start.row),last:this.session.getRowFoldEnd(m.end.row)}},b.prototype.onCompositionStart=function(m){this.renderer.showComposition(m)},b.prototype.onCompositionUpdate=function(m){this.renderer.setCompositionText(m)},b.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},b.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},b.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},b.prototype.isRowVisible=function(m){return m>=this.getFirstVisibleRow()&&m<=this.getLastVisibleRow()},b.prototype.isRowFullyVisible=function(m){return m>=this.renderer.getFirstFullyVisibleRow()&&m<=this.renderer.getLastFullyVisibleRow()},b.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},b.prototype.$moveByPage=function(m,_){var L=this.renderer,I=this.renderer.layerConfig,D=m*Math.floor(I.height/I.lineHeight);_===!0?this.selection.$moveSelection(function(){this.moveCursorBy(D,0)}):_===!1&&(this.selection.moveCursorBy(D,0),this.selection.clearSelection());var N=L.scrollTop;L.scrollBy(0,D*I.lineHeight),_!=null&&L.scrollCursorIntoView(null,.5),L.animateScrolling(N)},b.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},b.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},b.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},b.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},b.prototype.scrollPageDown=function(){this.$moveByPage(1)},b.prototype.scrollPageUp=function(){this.$moveByPage(-1)},b.prototype.scrollToRow=function(m){this.renderer.scrollToRow(m)},b.prototype.scrollToLine=function(m,_,L,I){this.renderer.scrollToLine(m,_,L,I)},b.prototype.centerSelection=function(){var m=this.getSelectionRange(),_={row:Math.floor(m.start.row+(m.end.row-m.start.row)/2),column:Math.floor(m.start.column+(m.end.column-m.start.column)/2)};this.renderer.alignCursor(_,.5)},b.prototype.getCursorPosition=function(){return this.selection.getCursor()},b.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},b.prototype.getSelectionRange=function(){return this.selection.getRange()},b.prototype.selectAll=function(){this.selection.selectAll()},b.prototype.clearSelection=function(){this.selection.clearSelection()},b.prototype.moveCursorTo=function(m,_){this.selection.moveCursorTo(m,_)},b.prototype.moveCursorToPosition=function(m){this.selection.moveCursorToPosition(m)},b.prototype.jumpToMatching=function(m,_){var L=this.getCursorPosition(),I=new C(this.session,L.row,L.column),D=I.getCurrentToken(),N=0;D&&D.type.indexOf("tag-name")!==-1&&(D=I.stepBackward());var F=D||I.stepForward();if(F){var U,W=!1,z={},H=L.column-F.start,B,j={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(F.value.match(/[{}()\[\]]/g)){for(;H<F.value.length&&!W;H++)if(j[F.value[H]])switch(B=j[F.value[H]]+"."+F.type.replace("rparen","lparen"),isNaN(z[B])&&(z[B]=0),F.value[H]){case"(":case"[":case"{":z[B]++;break;case")":case"]":case"}":z[B]--,z[B]===-1&&(U="bracket",W=!0);break}}else F.type.indexOf("tag-name")!==-1&&(isNaN(z[F.value])&&(z[F.value]=0),D.value==="<"&&N>1?z[F.value]++:D.value==="</"&&z[F.value]--,z[F.value]===-1&&(U="tag",W=!0));W||(D=F,N++,F=I.stepForward(),H=0)}while(F&&!W);if(U){var K,Q;if(U==="bracket")K=this.session.getBracketRange(L),K||(K=new a(I.getCurrentTokenRow(),I.getCurrentTokenColumn()+H-1,I.getCurrentTokenRow(),I.getCurrentTokenColumn()+H-1),Q=K.start,(_||Q.row===L.row&&Math.abs(Q.column-L.column)<2)&&(K=this.session.getBracketRange(Q)));else if(U==="tag"){if(!F||F.type.indexOf("tag-name")===-1)return;if(K=new a(I.getCurrentTokenRow(),I.getCurrentTokenColumn()-2,I.getCurrentTokenRow(),I.getCurrentTokenColumn()-2),K.compare(L.row,L.column)===0){var Y=this.session.getMatchingTags(L);Y&&(Y.openTag.contains(L.row,L.column)?(K=Y.closeTag,Q=K.start):(K=Y.openTag,Y.closeTag.start.row===L.row&&Y.closeTag.start.column===L.column?Q=K.end:Q=K.start))}Q=Q||K.start}Q=K&&K.cursor||Q,Q&&(m?K&&_?this.selection.setRange(K):K&&K.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Q.row,Q.column):this.selection.moveTo(Q.row,Q.column))}}},b.prototype.gotoLine=function(m,_,L){this.selection.clearSelection(),this.session.unfold({row:m-1,column:_||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(m-1,_||0),this.isRowFullyVisible(m-1)||this.scrollToLine(m-1,!0,L)},b.prototype.navigateTo=function(m,_){this.selection.moveTo(m,_)},b.prototype.navigateUp=function(m){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var _=this.selection.anchor.getPosition();return this.moveCursorToPosition(_)}this.selection.clearSelection(),this.selection.moveCursorBy(-m||-1,0)},b.prototype.navigateDown=function(m){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var _=this.selection.anchor.getPosition();return this.moveCursorToPosition(_)}this.selection.clearSelection(),this.selection.moveCursorBy(m||1,0)},b.prototype.navigateLeft=function(m){if(this.selection.isEmpty())for(m=m||1;m--;)this.selection.moveCursorLeft();else{var _=this.getSelectionRange().start;this.moveCursorToPosition(_)}this.clearSelection()},b.prototype.navigateRight=function(m){if(this.selection.isEmpty())for(m=m||1;m--;)this.selection.moveCursorRight();else{var _=this.getSelectionRange().end;this.moveCursorToPosition(_)}this.clearSelection()},b.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},b.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},b.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},b.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},b.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},b.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},b.prototype.replace=function(m,_){_&&this.$search.set(_);var L=this.$search.find(this.session),I=0;return L&&(this.$tryReplace(L,m)&&(I=1),this.selection.setSelectionRange(L),this.renderer.scrollSelectionIntoView(L.start,L.end)),I},b.prototype.replaceAll=function(m,_){_&&this.$search.set(_);var L=this.$search.findAll(this.session),I=0;if(!L.length)return I;var D=this.getSelectionRange();this.selection.moveTo(0,0);for(var N=L.length-1;N>=0;--N)this.$tryReplace(L[N],m)&&I++;return this.selection.setSelectionRange(D),I},b.prototype.$tryReplace=function(m,_){var L=this.session.getTextRange(m);return _=this.$search.replace(L,_),_!==null?(m.end=this.session.replace(m,_),m):null},b.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},b.prototype.find=function(m,_,L){_||(_={}),typeof m=="string"||m instanceof RegExp?_.needle=m:typeof m=="object"&&p.mixin(_,m);var I=this.selection.getRange();_.needle==null&&(m=this.session.getTextRange(I)||this.$search.$options.needle,m||(I=this.session.getWordRange(I.start.row,I.start.column),m=this.session.getTextRange(I)),this.$search.set({needle:m})),this.$search.set(_),_.start||this.$search.set({start:I});var D=this.$search.find(this.session);if(_.preventScroll)return D;if(D)return this.revealRange(D,L),D;_.backwards?I.start=I.end:I.end=I.start,this.selection.setRange(I)},b.prototype.findNext=function(m,_){this.find({skipCurrent:!0,backwards:!1},m,_)},b.prototype.findPrevious=function(m,_){this.find(m,{skipCurrent:!0,backwards:!0},_)},b.prototype.revealRange=function(m,_){this.session.unfold(m),this.selection.setSelectionRange(m);var L=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(m.start,m.end,.5),_!==!1&&this.renderer.animateScrolling(L)},b.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},b.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},b.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(m){m.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()},b.prototype.setAutoScrollEditorIntoView=function(m){if(m){var _,L=this,I=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var D=this.$scrollAnchor;D.style.cssText="position:absolute",this.container.insertBefore(D,this.container.firstChild);var N=this.on("changeSelection",function(){I=!0}),F=this.renderer.on("beforeRender",function(){I&&(_=L.renderer.container.getBoundingClientRect())}),U=this.renderer.on("afterRender",function(){if(I&&_&&(L.isFocused()||L.searchBox&&L.searchBox.isFocused())){var W=L.renderer,z=W.$cursorLayer.$pixelPos,H=W.layerConfig,B=z.top-H.offset;z.top>=0&&B+_.top<0?I=!0:z.top<H.height&&z.top+_.top+H.lineHeight>window.innerHeight?I=!1:I=null,I!=null&&(D.style.top=B+"px",D.style.left=z.left+"px",D.style.height=H.lineHeight+"px",D.scrollIntoView(I)),I=_=null}});this.setAutoScrollEditorIntoView=function(W){W||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",N),this.renderer.off("afterRender",U),this.renderer.off("beforeRender",F))}}},b.prototype.$resetCursorStyle=function(){var m=this.$cursorStyle||"ace",_=this.renderer.$cursorLayer;_&&(_.setSmoothBlinking(/smooth/.test(m)),_.isBlinking=!this.$readOnly&&m!="wide",v.setCssClass(_.element,"ace_slim-cursors",/slim/.test(m)))},b.prototype.prompt=function(m,_,L){var I=this;$.loadModule("ace/ext/prompt",function(D){D.prompt(I,m,_,L)})},Object.defineProperty(b.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new O(this.container))},set:function(m){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=m},enumerable:!1,configurable:!0}),b})();A.$uid=0,A.prototype.curOp=null,A.prototype.prevOp={},A.prototype.$mergeableCommands=["backspace","del","insertstring"],A.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"],["&&","||"],["==","!="]],p.implement(A.prototype,d),$.defineOptions(A.prototype,"editor",{selectionStyle:{set:function(b){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:b})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(b){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(b){var m=this;if(this.textInput.setReadOnly(b),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(L){var I=!1;if(L&&L.type=="keydown"){if(L&&L.key&&!L.ctrlKey&&!L.metaKey&&(L.key==" "&&L.preventDefault(),I=L.key.length==1),!I)return}else L&&L.type!=="exec"&&(I=!0);if(I){var D=v.createElement("div");D.textContent=M("editor.tooltip.disable-editing","Editing is disabled"),m.hoverTooltip.isOpen||m.hoverTooltip.showForRange(m,m.getSelectionRange(),D)}else m.hoverTooltip&&m.hoverTooltip.isOpen&&m.hoverTooltip.hide()});var _=this.textInput.getElement();b?(k.addListener(_,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(k.removeListener(_,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(b){this.textInput.setCopyWithEmptySelection(b)},initialValue:!1},cursorStyle:{set:function(b){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(b){this.setAutoScrollEditorIntoView(b)}},keyboardHandler:{set:function(b){this.setKeyboardHandler(b)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(b){this.session.setValue(b)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(b){this.setSession(b)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(b){this.renderer.$gutterLayer.setShowLineNumbers(b),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),b&&this.$relativeLineNumbers?x.attach(this):x.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(b){this.$showLineNumbers&&b?x.attach(this):x.detach(this)}},placeholder:{set:function(b){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var m=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(m&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),v.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!m&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),v.addCssClass(this.container,"ace_hasPlaceholder");var _=v.createElement("div");_.className="ace_placeholder",_.textContent=this.$placeholder||"",this.renderer.placeholderNode=_,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!m&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(b){var m={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(I){I.blur(),I.renderer.scroller.focus()},readOnly:!0},_=function(I){if(I.target==this.renderer.scroller&&I.keyCode===T.enter){I.preventDefault();var D=this.getCursorPosition().row;this.isRowVisible(D)||this.scrollToLine(D,!0,!0),this.focus()}},L;b?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(c.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",M("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",M("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",_.bind(this)),this.commands.addCommand(m),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",M("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",M("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),L||(L=new w(this)),L.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",_.bind(this)),this.commands.removeCommand(m),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),L&&L.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(b){this.$textInputAriaLabel=b},initialValue:""},enableMobileMenu:{set:function(b){this.$enableMobileMenu=b},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 x={getText:function(b,m){return(Math.abs(b.selection.lead.row-m)||m+1+(m<9?"·":""))+""},getWidth:function(b,m,_){return Math.max(m.toString().length,(_.lastRow+1).toString().length,2)*_.characterWidth},update:function(b,m){m.renderer.$loop.schedule(m.renderer.CHANGE_GUTTER)},attach:function(b){b.renderer.$gutterLayer.$renderer=this,b.on("changeSelection",this.update),this.update(null,b)},detach:function(b){b.renderer.$gutterLayer.$renderer==this&&(b.renderer.$gutterLayer.$renderer=null),b.off("changeSelection",this.update),this.update(null,b)}};g.Editor=A}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(u,g,E){var y=u("../lib/dom"),p=(function(){function v(s,c){this.element=s,this.canvasHeight=c||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return v.prototype.moveContainer=function(s){y.translate(this.element,0,-(s.firstRowScreen*s.lineHeight%this.canvasHeight)-s.offset*this.$offsetCoefficient)},v.prototype.pageChanged=function(s,c){return Math.floor(s.firstRowScreen*s.lineHeight/this.canvasHeight)!==Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)},v.prototype.computeLineTop=function(s,c,n){var o=c.firstRowScreen*c.lineHeight,r=Math.floor(o/this.canvasHeight),i=n.documentToScreenRow(s,0)*c.lineHeight;return i-r*this.canvasHeight},v.prototype.computeLineHeight=function(s,c,n){return c.lineHeight*n.getRowLineCount(s)},v.prototype.getLength=function(){return this.cells.length},v.prototype.get=function(s){return this.cells[s]},v.prototype.shift=function(){this.$cacheCell(this.cells.shift())},v.prototype.pop=function(){this.$cacheCell(this.cells.pop())},v.prototype.push=function(s){if(Array.isArray(s)){this.cells.push.apply(this.cells,s);for(var c=y.createFragment(this.element),n=0;n<s.length;n++)c.appendChild(s[n].element);this.element.appendChild(c)}else this.cells.push(s),this.element.appendChild(s.element)},v.prototype.unshift=function(s){if(Array.isArray(s)){this.cells.unshift.apply(this.cells,s);for(var c=y.createFragment(this.element),n=0;n<s.length;n++)c.appendChild(s[n].element);this.element.firstChild?this.element.insertBefore(c,this.element.firstChild):this.element.appendChild(c)}else this.cells.unshift(s),this.element.insertAdjacentElement("afterbegin",s.element)},v.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},v.prototype.$cacheCell=function(s){s&&(s.element.remove(),this.cellCache.push(s))},v.prototype.createCell=function(s,c,n,o){var r=this.cellCache.pop();if(!r){var i=y.createElement("div");o&&o(i),this.element.appendChild(i),r={element:i,text:"",row:s}}return r.row=s,r},v})();g.Lines=p}),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(u,g,E){var y=u("../lib/dom"),p=u("../lib/oop"),v=u("../lib/lang"),s=u("../lib/event_emitter").EventEmitter,c=u("./lines").Lines,n=u("../config").nls,o=(function(){function i(e){this.$showCursorMarker=null,this.element=y.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new c(this.element),this.$lines.$offsetCoefficient=1}return i.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},i.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},i.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},i.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var a=e[t],d=a.row,f=this.$annotations[d];f||(f=this.$annotations[d]={text:[],type:[],displayText:[]});var S=a.text,$=a.text,C=a.type;S=S?v.escapeHTML(S):a.html||"",$=$||a.html||"",f.text.indexOf(S)===-1&&(f.text.push(S),f.type.push(C),f.displayText.push($));var w=a.className;w?f.className=w:C==="error"?f.className=" ace_error":C==="security"&&!/\bace_error\b/.test(f.className)?f.className=" ace_security":C==="warning"&&!/\bace_(error|security)\b/.test(f.className)?f.className=" ace_warning":C==="info"&&!f.className?f.className=" ace_info":C==="hint"&&!f.className&&(f.className=" ace_hint")}},i.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,a=e.end.row-t;if(a!==0)if(e.action=="remove")this.$annotations.splice(t,a+1,null);else{var d=new Array(a+1);d.unshift(t,1),this.$annotations.splice.apply(this.$annotations,d)}}},i.prototype.update=function(e){this.config=e;var t=this.session,a=e.firstRow,d=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=d,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var f=t.getNextFoldLine(a),S=f?f.start.row:1/0,$=null,C=-1,w=a;;){if(w>S&&(w=f.end.row+1,f=t.getNextFoldLine(w,f),S=f?f.start.row:1/0),w>d){for(;this.$lines.getLength()>C+1;)this.$lines.pop();break}$=this.$lines.get(++C),$?$.row=w:($=this.$lines.createCell(w,e,this.session,r),this.$lines.push($)),this.$renderCell($,e,f,w),w++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},i.prototype.$updateGutterWidth=function(e){var t=this.session,a=t.gutterRenderer||this.$renderer,d=t.$firstLineNumber,f=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(f=t.getLength()+d-1);var S=a?a.getWidth(t,f,e):f.toString().length*e.characterWidth,$=this.$padding||this.$computePadding();S+=$.left+$.right,S!==this.gutterWidth&&!isNaN(S)&&(this.gutterWidth=S,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",S))},i.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},i.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var a=0;a<t.length;a++){var d=t[a];if(d.row>=this.$cursorRow){if(d.row>this.$cursorRow){var f=this.session.getFoldLine(this.$cursorRow);if(a>0&&f&&f.start.row==t[a-1].row)d=t[a-1];else break}d.element.className="ace_gutter-active-line "+d.element.className,this.$cursorCell=d;break}}}}},i.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=y.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var t=e.selection.cursor,a=this.config,d=this.$lines,f=a.firstRowScreen*a.lineHeight,S=Math.floor(f/d.canvasHeight),$=e.documentToScreenRow(t)*a.lineHeight,C=$-S*d.canvasHeight;y.setStyle(this.$highlightElement.style,"height",a.lineHeight+"px"),y.setStyle(this.$highlightElement.style,"top",C+"px")}},i.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var a=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),d=this.oldLastRow;if(this.oldLastRow=a,!t||d<e.firstRow)return this.update(e);if(a<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var f=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);f>0;f--)this.$lines.shift();if(d>a)for(var f=this.session.getFoldedRowCount(a+1,d);f>0;f--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),a>d&&this.$lines.push(this.$renderLines(e,d+1,a)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},i.prototype.$renderLines=function(e,t,a){for(var d=[],f=t,S=this.session.getNextFoldLine(f),$=S?S.start.row:1/0;f>$&&(f=S.end.row+1,S=this.session.getNextFoldLine(f,S),$=S?S.start.row:1/0),!(f>a);){var C=this.$lines.createCell(f,e,this.session,r);this.$renderCell(C,e,S,f),d.push(C),f++}return d},i.prototype.$renderCell=function(e,t,a,d){var f=e.element,S=this.session,$=f.childNodes[0],C=f.childNodes[1],w=f.childNodes[2],M=f.childNodes[3],R=w.firstChild,T=S.$firstLineNumber,k=S.$breakpoints,O=S.$decorations,A=S.gutterRenderer||this.$renderer,x=this.$showFoldWidgets&&S.foldWidgets,b=a?a.start.row:Number.MAX_VALUE,m=t.lineHeight+"px",_=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",L=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=(A?A.getText(S,d):d+T).toString();if(this.$highlightGutterLine&&(d==this.$cursorRow||a&&d<this.$cursorRow&&d>=b&&this.$cursorRow<=a.end.row)&&(_+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),k[d]&&(_+=k[d]),O[d]&&(_+=O[d]),this.$annotations[d]&&d!==b&&(_+=this.$annotations[d].className),x){var D=x[d];D==null&&(D=x[d]=S.getFoldWidget(d))}if(D){var N="ace_fold-widget ace_"+D,F=D=="start"&&d==b&&d<a.end.row;if(F){N+=" ace_closed";for(var U="",W=!1,z=d+1;z<=a.end.row;z++)if(this.$annotations[z]){if(this.$annotations[z].className===" ace_error"){W=!0,U=" ace_error_fold";break}this.$annotations[z].className===" ace_security"?(W=!0,U=" ace_security_fold"):this.$annotations[z].className===" ace_warning"&&U!==" ace_security_fold"&&(W=!0,U=" ace_warning_fold")}_+=U}else N+=" ace_open";C.className!=N&&(C.className=N),y.setStyle(C.style,"height",m),y.setStyle(C.style,"display","inline-block"),C.setAttribute("role","button"),C.setAttribute("tabindex","-1");var H=S.getFoldWidgetRange(d);H?C.setAttribute("aria-label",n("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[H.start.row+1,H.end.row+1])):a?C.setAttribute("aria-label",n("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[a.start.row+1,a.end.row+1])):C.setAttribute("aria-label",n("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[d+1])),F?(C.setAttribute("aria-expanded","false"),C.setAttribute("title",n("gutter.code-folding.closed.title","Unfold code"))):(C.setAttribute("aria-expanded","true"),C.setAttribute("title",n("gutter.code-folding.open.title","Fold code")))}else C&&(y.setStyle(C.style,"display","none"),C.setAttribute("tabindex","0"),C.removeAttribute("role"),C.removeAttribute("aria-label"));var B=this.session.$gutterCustomWidgets[d];if(B?this.$addCustomWidget(d,B,e):M&&this.$removeCustomWidget(d,e),W&&this.$showFoldedAnnotations){w.className="ace_gutter_annotation",R.className=L,R.className+=U,y.setStyle(R.style,"height",m),y.setStyle(w.style,"display","block"),y.setStyle(w.style,"height",m);var j;switch(U){case" ace_error_fold":j=n("gutter.annotation.aria-label.error","Error, read annotations row $0",[I]);break;case" ace_security_fold":j=n("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[I]);break;case" ace_warning_fold":j=n("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[I]);break}w.setAttribute("aria-label",j),w.setAttribute("tabindex","-1"),w.setAttribute("role","button")}else if(this.$annotations[d]){w.className="ace_gutter_annotation",R.className=L,this.$useSvgGutterIcons?R.className+=this.$annotations[d].className:f.classList.add(this.$annotations[d].className.replace(" ","")),y.setStyle(R.style,"height",m),y.setStyle(w.style,"display","block"),y.setStyle(w.style,"height",m);var j;switch(this.$annotations[d].className){case" ace_error":j=n("gutter.annotation.aria-label.error","Error, read annotations row $0",[I]);break;case" ace_security":j=n("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[I]);break;case" ace_warning":j=n("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[I]);break;case" ace_info":j=n("gutter.annotation.aria-label.info","Info, read annotations row $0",[I]);break;case" ace_hint":j=n("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[I]);break}w.setAttribute("aria-label",j),w.setAttribute("tabindex","-1"),w.setAttribute("role","button")}else y.setStyle(w.style,"display","none"),w.removeAttribute("aria-label"),w.removeAttribute("role"),w.setAttribute("tabindex","0");return I!==$.data&&($.data=I),f.className!=_&&(f.className=_),y.setStyle(e.element.style,"height",this.$lines.computeLineHeight(d,t,S)+"px"),y.setStyle(e.element.style,"top",this.$lines.computeLineTop(d,t,S)+"px"),e.text=I,w.style.display==="none"&&C.style.display==="none"&&!B?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},i.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e,!e&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},i.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},i.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},i.prototype.setShowFoldWidgets=function(e){e?y.addCssClass(this.element,"ace_folding-enabled"):y.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},i.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},i.prototype.$hideFoldWidget=function(e,t){var a=t||this.$getGutterCell(e);if(a&&a.element){var d=a.element.childNodes[1];d&&y.setStyle(d.style,"display","none")}},i.prototype.$showFoldWidget=function(e,t){var a=t||this.$getGutterCell(e);if(a&&a.element){var d=a.element.childNodes[1];d&&this.session.foldWidgets&&this.session.foldWidgets[a.row]&&y.setStyle(d.style,"display","inline-block")}},i.prototype.$getGutterCell=function(e){var t=this.$lines.cells,a=0,d=t.length-1;if(!(e<t[0].row||e>t[d].row)){for(;a<=d;){var f=Math.floor((a+d)/2),S=t[f];if(S.row>e)d=f-1;else if(S.row<e)a=f+1;else return S}return S}},i.prototype.$addCustomWidget=function(e,t,a){var d=t.className,f=t.label,S=t.title,$=t.callbacks;this.session.$gutterCustomWidgets[e]={className:d,label:f,title:S,callbacks:$},this.$hideFoldWidget(e,a);var C=a||this.$getGutterCell(e);if(C&&C.element){var w=C.element.querySelector(".ace_custom-widget");w&&w.remove(),w=y.createElement("span"),w.className="ace_custom-widget ".concat(d),w.setAttribute("tabindex","-1"),w.setAttribute("role","button"),w.setAttribute("aria-label",f),w.setAttribute("title",S),y.setStyle(w.style,"display","inline-block"),y.setStyle(w.style,"height","inherit"),$&&$.onClick&&w.addEventListener("click",function(M){$.onClick(M,e),M.stopPropagation()}),C.element.appendChild(w)}},i.prototype.$removeCustomWidget=function(e,t){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,t);var a=t||this.$getGutterCell(e);if(a&&a.element){var d=a.element.querySelector(".ace_custom-widget");d&&a.element.removeChild(d)}},i.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=y.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},i.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),a=this.element.getBoundingClientRect();if(e.x<t.left+a.left)return"markers";if(this.$showFoldWidgets&&e.x>a.right-t.right)return"foldWidgets"},i})();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer=void 0,o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,p.implement(o.prototype,s);function r(i){var e=document.createTextNode("");i.appendChild(e);var t=y.createElement("span");i.appendChild(t);var a=y.createElement("span");i.appendChild(a);var d=y.createElement("span");return a.appendChild(d),i}g.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(u,g,E){var y=u("../range").Range,p=u("../lib/dom"),v=(function(){function c(n){this.element=p.createElement("div"),this.element.className="ace_layer ace_marker-layer",n.appendChild(this.element)}return c.prototype.setPadding=function(n){this.$padding=n},c.prototype.setSession=function(n){this.session=n},c.prototype.setMarkers=function(n){this.markers=n},c.prototype.elt=function(n,o){var r=this.i!=-1&&this.element.childNodes[this.i];r?this.i++:(r=document.createElement("div"),this.element.appendChild(r),this.i=-1),r.style.cssText=o,r.className=n},c.prototype.update=function(n){if(n){this.config=n,this.i=0;var o;for(var r in this.markers){var i=this.markers[r];if(!i.range){i.update(o,this,this.session,n);continue}var e=i.range.clipRows(n.firstRow,n.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),i.renderer){var t=this.$getTop(e.start.row,n),a=this.$padding+e.start.column*n.characterWidth;i.renderer(o,e,a,t,n)}else i.type=="fullLine"?this.drawFullLineMarker(o,e,i.clazz,n):i.type=="screenLine"?this.drawScreenLineMarker(o,e,i.clazz,n):e.isMultiLine()?i.type=="text"?this.drawTextMarker(o,e,i.clazz,n):this.drawMultiLineMarker(o,e,i.clazz,n):this.drawSingleLineMarker(o,e,i.clazz+" ace_start ace_br15",n)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},c.prototype.$getTop=function(n,o){return(n-o.firstRowScreen)*o.lineHeight},c.prototype.drawTextMarker=function(n,o,r,i,e){for(var t=this.session,a=o.start.row,d=o.end.row,f=a,S=0,$=0,C=t.getScreenLastRowColumn(f),w=new y(f,o.start.column,f,$);f<=d;f++)w.start.row=w.end.row=f,w.start.column=f==a?o.start.column:t.getRowWrapIndent(f),w.end.column=C,S=$,$=C,C=f+1<d?t.getScreenLastRowColumn(f+1):f==d?0:o.end.column,this.drawSingleLineMarker(n,w,r+(f==a?" ace_start":"")+" ace_br"+s(f==a||f==a+1&&o.start.column,S<$,$>C,f==d),i,f==d?0:1,e)},c.prototype.drawMultiLineMarker=function(n,o,r,i,e){var t=this.$padding,a=i.lineHeight,d=this.$getTop(o.start.row,i),f=t+o.start.column*i.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var S=o.clone();S.end.row=S.start.row,S.end.column=this.session.getLine(S.start.row).length,this.drawBidiSingleLineMarker(n,S,r+" ace_br1 ace_start",i,null,e)}else this.elt(r+" ace_br1 ace_start","height:"+a+"px;right:"+t+"px;top:"+d+"px;left:"+f+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var S=o.clone();S.start.row=S.end.row,S.start.column=0,this.drawBidiSingleLineMarker(n,S,r+" ace_br12",i,null,e)}else{d=this.$getTop(o.end.row,i);var $=o.end.column*i.characterWidth;this.elt(r+" ace_br12","height:"+a+"px;width:"+$+"px;top:"+d+"px;left:"+t+"px;"+(e||""))}if(a=(o.end.row-o.start.row-1)*i.lineHeight,!(a<=0)){d=this.$getTop(o.start.row+1,i);var C=(o.start.column?1:0)|(o.end.column?0:8);this.elt(r+(C?" ace_br"+C:""),"height:"+a+"px;right:"+t+"px;top:"+d+"px;left:"+t+"px;"+(e||""))}},c.prototype.drawSingleLineMarker=function(n,o,r,i,e,t){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(n,o,r,i,e,t);var a=i.lineHeight,d=(o.end.column+(e||0)-o.start.column)*i.characterWidth,f=this.$getTop(o.start.row,i),S=this.$padding+o.start.column*i.characterWidth;this.elt(r,"height:"+a+"px;width:"+d+"px;top:"+f+"px;left:"+S+"px;"+(t||""))},c.prototype.drawBidiSingleLineMarker=function(n,o,r,i,e,t){var a=i.lineHeight,d=this.$getTop(o.start.row,i),f=this.$padding,S=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);S.forEach(function($){this.elt(r,"height:"+a+"px;width:"+($.width+(e||0))+"px;top:"+d+"px;left:"+(f+$.left)+"px;"+(t||""))},this)},c.prototype.drawFullLineMarker=function(n,o,r,i,e){var t=this.$getTop(o.start.row,i),a=i.lineHeight;o.start.row!=o.end.row&&(a+=this.$getTop(o.end.row,i)-t),this.elt(r,"height:"+a+"px;top:"+t+"px;left:0;right:0;"+(e||""))},c.prototype.drawScreenLineMarker=function(n,o,r,i,e){var t=this.$getTop(o.start.row,i),a=i.lineHeight;this.elt(r,"height:"+a+"px;top:"+t+"px;left:0;right:0;"+(e||""))},c})();v.prototype.$padding=0;function s(c,n,o,r){return(c?1:0)|(n?2:0)|(o?4:0)|(r?8:0)}g.Marker=v}),ace.define("ace/layer/text_util",["require","exports","module"],function(u,g,E){var y=new Set(["text","rparen","lparen"]);g.isTextToken=function(p){return y.has(p)}}),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(u,g,E){var y=u("../lib/oop"),p=u("../lib/dom"),v=u("../lib/lang"),s=u("./lines").Lines,c=u("../lib/event_emitter").EventEmitter,n=u("../config").nls,o=u("./text_util").isTextToken,r=(function(){function i(e){this.dom=p,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}return i.prototype.$updateEolChar=function(){var e=this.session.doc,t=e.getNewLineCharacter()==`
213
+ `&&e.getNewLineMode()!="windows",a=t?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=a)return this.EOL_CHAR=a,!0},i.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},i.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},i.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},i.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",(function(t){this._signal("changeCharacterSize",t)}).bind(this)),this.$pollSizeChanges()},i.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},i.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},i.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},i.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},i.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},i.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},i.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],a=1;a<e+1;a++)if(this.showTabs){var d=this.dom.createElement("span");d.className="ace_invisible ace_invisible_tab",d.textContent=v.stringRepeat(this.TAB_CHAR,a),t.push(d)}else t.push(this.dom.createTextNode(v.stringRepeat(" ",a),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var f="ace_indent-guide",S=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?v.stringRepeat(this.SPACE_CHAR,this.tabSize):v.stringRepeat(" ",this.tabSize),C=this.showTabs?" ace_invisible ace_invisible_tab":"",w=this.showTabs?v.stringRepeat(this.TAB_CHAR,this.tabSize):$,d=this.dom.createElement("span");d.className=f+S,d.textContent=$,this.$tabStrings[" "]=d;var d=this.dom.createElement("span");d.className=f+C,d.textContent=w,this.$tabStrings[" "]=d}},i.prototype.updateLines=function(e,t,a){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var d=Math.max(t,e.firstRow),f=Math.min(a,e.lastRow),S=this.element.childNodes,$=0,w=e.firstRow;w<d;w++){var M=this.session.getFoldLine(w);if(M)if(M.containsRow(d)){d=M.start.row;break}else w=M.end.row;$++}for(var C=!1,w=d,M=this.session.getNextFoldLine(w),R=M?M.start.row:1/0;w>R&&(w=M.end.row+1,M=this.session.getNextFoldLine(w,M),R=M?M.start.row:1/0),!(w>f);){var T=S[$++];if(T){this.dom.removeChildren(T),this.$renderLine(T,w,w==R?M:!1),C&&(T.style.top=this.$lines.computeLineTop(w,e,this.session)+"px");var k=e.lineHeight*this.session.getRowLength(w)+"px";T.style.height!=k&&(C=!0,T.style.height=k)}w++}if(C)for(;$<this.$lines.cells.length;){var O=this.$lines.cells[$++];O.element.style.top=this.$lines.computeLineTop(O.row,e,this.session)+"px"}},i.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var a=e.lastRow,d=t?t.lastRow:-1;if(!t||d<e.firstRow)return this.update(e);if(a<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var f=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);f>0;f--)this.$lines.shift();if(t.lastRow>e.lastRow)for(var f=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);f>0;f--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},i.prototype.$renderLinesFragment=function(e,t,a){for(var d=[],f=t,S=this.session.getNextFoldLine(f),$=S?S.start.row:1/0;f>$&&(f=S.end.row+1,S=this.session.getNextFoldLine(f,S),$=S?S.start.row:1/0),!(f>a);){var C=this.$lines.createCell(f,e,this.session),w=C.element;this.dom.removeChildren(w),p.setStyle(w.style,"height",this.$lines.computeLineHeight(f,e,this.session)+"px"),p.setStyle(w.style,"top",this.$lines.computeLineTop(f,e,this.session)+"px"),this.$renderLine(w,f,f==$?S:!1),this.$useLineGroups()?w.className="ace_line_group":w.className="ace_line",d.push(C),f++}return d},i.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,a=e.lastRow,d=this.$lines;d.getLength();)d.pop();d.push(this.$renderLinesFragment(e,t,a))},i.prototype.$renderToken=function(e,t,a,d){for(var f=this,S=/(\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,$=this.dom.createFragment(this.element),C,w=0;C=S.exec(d);){var M=C[1],R=C[2],T=C[3],k=C[4],O=C[5];if(!(!f.showSpaces&&R)){var A=w!=C.index?d.slice(w,C.index):"";if(w=C.index+C[0].length,A&&$.appendChild(this.dom.createTextNode(A,this.element)),M){var x=f.session.getScreenTabSize(t+C.index),b=f.$tabStrings[x].cloneNode(!0);b.charCount=1,$.appendChild(b),t+=x-1}else if(R)if(f.showSpaces){var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_space",m.textContent=v.stringRepeat(f.SPACE_CHAR,R.length),$.appendChild(m)}else $.appendChild(this.dom.createTextNode(R,this.element));else if(T){var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_space ace_invalid",m.textContent=v.stringRepeat(f.SPACE_CHAR,T.length),$.appendChild(m)}else if(k){t+=1;var m=this.dom.createElement("span");m.style.width=f.config.characterWidth*2+"px",m.className=f.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",m.textContent=f.showSpaces?f.SPACE_CHAR:k,$.appendChild(m)}else if(O){t+=1;var m=this.dom.createElement("span");m.style.width=f.config.characterWidth*2+"px",m.className="ace_cjk",m.textContent=O,$.appendChild(m)}}}if($.appendChild(this.dom.createTextNode(w?d.slice(w):d,this.element)),o(a.type))e.appendChild($);else{var _="ace_"+a.type.replace(/\./g," ace_"),m=this.dom.createElement("span");a.type=="fold"&&(m.style.width=a.value.length*this.config.characterWidth+"px",m.setAttribute("title",n("inline-fold.closed.title","Unfold code"))),m.className=_,m.appendChild($),e.appendChild(m)}return t+d.length},i.prototype.renderIndentGuide=function(e,t,a){var d=t.search(this.$indentGuideRe);if(d<=0||d>=a)return t;if(t[0]==" "){d-=d%this.tabSize;for(var f=d/this.tabSize,S=0;S<f;S++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(d)}else if(t[0]==" "){for(var S=0;S<d;S++){var $=this.$tabStrings[" "].cloneNode(!0);$.charCount=1,e.appendChild($)}return this.$highlightIndentGuide(),t.substr(d)}return this.$highlightIndentGuide(),t},i.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),a=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,d=Math.floor(a/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:d,start:t.row};var f=this.session.$bracketHighlight;if(f){for(var S=this.session.$bracketHighlight.ranges,$=0;$<S.length;$++)if(t.row!==S[$].start.row){this.$highlightIndentGuideMarker.end=S[$].start.row+1,t.row>S[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[t.row]!==""&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=t.row+1;$<e.length;$++){var C=e[$],w=/^\s*/.exec(C)[0].length;if(C!==""&&(this.$highlightIndentGuideMarker.end=$,w<=a))break}}this.$renderHighlightIndentGuide()}}},i.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),t=0;t<e.length;t++)e[t].classList.remove("ace_indent-guide-active")},i.prototype.$setIndentGuideActive=function(e,t){var a=this.session.doc.getLine(e.row);if(a!==""){var d=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)d=e.element.childNodes[0];else return;var f=d.childNodes;if(f){var S=f[t-1];S&&S.classList&&S.classList.contains("ace_indent-guide")&&S.classList.add("ace_indent-guide-active")}}},i.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(t!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var a=0;a<e.length;a++){var d=e[a];if(this.$highlightIndentGuideMarker.end&&d.row>=this.$highlightIndentGuideMarker.start+1){if(d.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(d,t)}}else for(var a=e.length-1;a>=0;a--){var d=e[a];if(this.$highlightIndentGuideMarker.end&&d.row<this.$highlightIndentGuideMarker.start){if(d.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(d,t)}}}},i.prototype.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},i.prototype.$renderWrappedLine=function(e,t,a){var d=0,f=0,S=a[0],$=0,C=this.$createLineElement();e.appendChild(C);for(var w=0;w<t.length;w++){var M=t[w],R=M.value;if(w==0&&this.displayIndentGuides){if(d=R.length,R=this.renderIndentGuide(C,R,S),!R)continue;d-=R.length}if(d+R.length<S)$=this.$renderToken(C,$,M,R),d+=R.length;else{for(;d+R.length>=S;){$=this.$renderToken(C,$,M,R.substring(0,S-d)),R=R.substring(S-d),d=S,C=this.$createLineElement(),e.appendChild(C);var T=this.dom.createTextNode(v.stringRepeat(" ",a.indent),this.element);T.charCount=0,C.appendChild(T),f++,$=0,S=a[f]||Number.MAX_VALUE}R.length!=0&&(d+=R.length,$=this.$renderToken(C,$,M,R))}}a[a.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,$,null,"",!0)},i.prototype.$renderSimpleLine=function(e,t){for(var a=0,d=0;d<t.length;d++){var f=t[d],S=f.value;if(!(d==0&&this.displayIndentGuides&&(S=this.renderIndentGuide(e,S),!S))){if(a+S.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,a,f,S);a=this.$renderToken(e,a,f,S)}}},i.prototype.$renderOverflowMessage=function(e,t,a,d,f){a&&this.$renderToken(e,t,a,d.slice(0,this.MAX_LINE_LENGTH-t));var S=this.dom.createElement("span");S.className="ace_inline_button ace_keyword ace_toggle_wrap",S.textContent=f?"<hide>":"<click to see more...>",e.appendChild(S)},i.prototype.$renderLine=function(e,t,a){if(!a&&a!=!1&&(a=this.session.getFoldLine(t)),a)var d=this.$getFoldLineTokens(t,a);else var d=this.session.getTokens(t);var f=e;if(d.length){var S=this.session.getRowSplitData(t);if(S&&S.length){this.$renderWrappedLine(e,d,S);var f=e.lastChild}else{var f=e;this.$useLineGroups()&&(f=this.$createLineElement(),e.appendChild(f)),this.$renderSimpleLine(f,d)}}else this.$useLineGroups()&&(f=this.$createLineElement(),e.appendChild(f));if(this.showEOL&&f){a&&(t=a.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,f.appendChild($)}},i.prototype.$getFoldLineTokens=function(e,t){var a=this.session,d=[];function f($,C,w){for(var M=0,R=0;R+$[M].value.length<C;)if(R+=$[M].value.length,M++,M==$.length)return;if(R!=C){var T=$[M].value.substring(C-R);T.length>w-C&&(T=T.substring(0,w-C)),d.push({type:$[M].type,value:T}),R=C+T.length,M+=1}for(;R<w&&M<$.length;){var T=$[M].value;T.length+R>w?d.push({type:$[M].type,value:T.substring(0,w-R)}):d.push($[M]),R+=T.length,M+=1}}var S=a.getTokens(e);return t.walk(function($,C,w,M,R){$!=null?d.push({type:"fold",value:$}):(R&&(S=a.getTokens(C)),S.length&&f(S,M,w))},t.end.row,this.session.getLine(t.end.row).length),d},i.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},i})();r.prototype.EOF_CHAR="¶",r.prototype.EOL_CHAR_LF="¬",r.prototype.EOL_CHAR_CRLF="¤",r.prototype.EOL_CHAR=r.prototype.EOL_CHAR_LF,r.prototype.TAB_CHAR="—",r.prototype.SPACE_CHAR="·",r.prototype.$padding=0,r.prototype.MAX_LINE_LENGTH=1e4,r.prototype.showInvisibles=!1,r.prototype.showSpaces=!1,r.prototype.showTabs=!1,r.prototype.showEOL=!1,r.prototype.displayIndentGuides=!0,r.prototype.$highlightIndentGuides=!0,r.prototype.$tabStrings=[],r.prototype.destroy={},r.prototype.onChangeTabSize=r.prototype.$computeTabString,y.implement(r.prototype,c),g.Text=r}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(u,g,E){var y=u("../lib/dom"),p=(function(){function v(s){this.element=y.createElement("div"),this.element.className="ace_layer ace_cursor-layer",s.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),y.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return v.prototype.$updateOpacity=function(s){for(var c=this.cursors,n=c.length;n--;)y.setStyle(c[n].style,"opacity",s?"":"0")},v.prototype.$startCssAnimation=function(){for(var s=this.cursors,c=s.length;c--;)s[c].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&y.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},v.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,y.removeCssClass(this.element,"ace_animate-blinking")},v.prototype.setPadding=function(s){this.$padding=s},v.prototype.setSession=function(s){this.session=s},v.prototype.setBlinking=function(s){s!=this.isBlinking&&(this.isBlinking=s,this.restartTimer())},v.prototype.setBlinkInterval=function(s){s!=this.blinkInterval&&(this.blinkInterval=s,this.restartTimer())},v.prototype.setSmoothBlinking=function(s){s!=this.smoothBlinking&&(this.smoothBlinking=s,y.setCssClass(this.element,"ace_smooth-blinking",s),this.$updateCursors(!0),this.restartTimer())},v.prototype.addCursor=function(){var s=y.createElement("div");return s.className="ace_cursor",this.element.appendChild(s),this.cursors.push(s),s},v.prototype.removeCursor=function(){if(this.cursors.length>1){var s=this.cursors.pop();return s.parentNode.removeChild(s),s}},v.prototype.hideCursor=function(){this.isVisible=!1,y.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},v.prototype.showCursor=function(){this.isVisible=!0,y.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},v.prototype.restartTimer=function(){var s=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,y.removeCssClass(this.element,"ace_smooth-blinking")),s(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&y.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),y.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var c=(function(){this.timeoutId=setTimeout(function(){s(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){s(!0),c()},this.blinkInterval),c()}},v.prototype.getPixelPosition=function(s,c){if(!this.config||!this.session)return{left:0,top:0};s||(s=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(s),o=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,s.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),r=(n.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:r}},v.prototype.isCursorInView=function(s,c){return s.top>=0&&s.top<c.maxHeight},v.prototype.update=function(s){this.config=s;var c=this.session.$selectionMarkers,n=0,o=0;(c===void 0||c.length===0)&&(c=[{cursor:null}]);for(var n=0,r=c.length;n<r;n++){var i=this.getPixelPosition(c[n].cursor,!0);if(!((i.top>s.height+s.offset||i.top<0)&&n>1)){var e=this.cursors[o++]||this.addCursor(),t=e.style;this.drawCursor?this.drawCursor(e,i,s,c[n],this.session):this.isCursorInView(i,s)?(y.setStyle(t,"display","block"),y.translate(e,i.left,i.top),y.setStyle(t,"width",Math.round(s.characterWidth)+"px"),y.setStyle(t,"height",s.lineHeight+"px")):y.setStyle(t,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=i,this.restartTimer()},v.prototype.$setOverwrite=function(s){s!=this.overwrite&&(this.overwrite=s,s?y.addCssClass(this.element,"ace_overwrite-cursors"):y.removeCssClass(this.element,"ace_overwrite-cursors"))},v.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},v})();p.prototype.$padding=0,p.prototype.drawCursor=null,g.Cursor=p}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(u,g,E){var y=this&&this.__extends||(function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var S in f)Object.prototype.hasOwnProperty.call(f,S)&&(d[S]=f[S])},e(t,a)};return function(t,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(t,a);function d(){this.constructor=t}t.prototype=a===null?Object.create(a):(d.prototype=a.prototype,new d)}})(),p=u("./lib/oop"),v=u("./lib/dom"),s=u("./lib/event"),c=u("./lib/event_emitter").EventEmitter,n=32768,o=(function(){function e(t,a){this.element=v.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+a,this.element.tabIndex=-1,this.inner=v.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return e.prototype.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1},e})();p.implement(o.prototype,c);var r=(function(e){y(t,e);function t(a,d){var f=e.call(this,a,"-v")||this;return f.scrollTop=0,f.scrollHeight=0,d.$scrollbarWidth=f.width=v.scrollbarWidth(a.ownerDocument),f.inner.style.width=f.element.style.width=(f.width||15)+5+"px",f.$minWidth=0,f}return t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var a=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-a)/(this.coeff-a)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(a){this.element.style.height=a+"px"},t.prototype.setScrollHeight=function(a){this.scrollHeight=a,a>n?(this.coeff=n/a,a=n):this.coeff!=1&&(this.coeff=1),this.inner.style.height=a+"px"},t.prototype.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=a,this.element.scrollTop=a*this.coeff)},t})(o);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var i=(function(e){y(t,e);function t(a,d){var f=e.call(this,a,"-h")||this;return f.scrollLeft=0,f.height=d.$scrollbarWidth,f.inner.style.height=f.element.style.height=(f.height||15)+5+"px",f}return t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(a){this.element.style.width=a+"px"},t.prototype.setInnerWidth=function(a){this.inner.style.width=a+"px"},t.prototype.setScrollWidth=function(a){this.inner.style.width=a+"px"},t.prototype.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a)},t})(o);g.ScrollBar=r,g.ScrollBarV=r,g.ScrollBarH=i,g.VScrollBar=r,g.HScrollBar=i}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(u,g,E){var y=this&&this.__extends||(function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__=d}||function(a,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(a[f]=d[f])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function a(){this.constructor=e}e.prototype=t===null?Object.create(t):(a.prototype=t.prototype,new a)}})(),p=u("./lib/oop"),v=u("./lib/dom"),s=u("./lib/event"),c=u("./lib/event_emitter").EventEmitter;v.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
214
+ position: absolute;
215
+ background: rgba(128, 128, 128, 0.6);
216
+ -moz-box-sizing: border-box;
217
+ box-sizing: border-box;
218
+ border: 1px solid #bbb;
219
+ border-radius: 2px;
220
+ z-index: 8;
221
+ }
222
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
223
+ position: absolute;
224
+ z-index: 6;
225
+ background: none;
226
+ overflow: hidden!important;
227
+ }
228
+ .ace_editor>.ace_sb-v {
229
+ z-index: 6;
230
+ right: 0;
231
+ top: 0;
232
+ width: 12px;
233
+ }
234
+ .ace_editor>.ace_sb-v div {
235
+ z-index: 8;
236
+ right: 0;
237
+ width: 100%;
238
+ }
239
+ .ace_editor>.ace_sb-h {
240
+ bottom: 0;
241
+ left: 0;
242
+ height: 12px;
243
+ }
244
+ .ace_editor>.ace_sb-h div {
245
+ bottom: 0;
246
+ height: 100%;
247
+ }
248
+ .ace_editor>.ace_sb_grabbed {
249
+ z-index: 8;
250
+ background: #000;
251
+ }`,"ace_scrollbar.css",!1);var n=(function(){function i(e,t){this.element=v.createElement("div"),this.element.className="ace_sb"+t,this.inner=v.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return i.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},i})();p.implement(n.prototype,c);var o=(function(i){y(e,i);function e(t,a){var d=i.call(this,t,"-v")||this;return d.scrollTop=0,d.scrollHeight=0,d.parent=t,d.width=d.VScrollWidth,d.renderer=a,d.inner.style.width=d.element.style.width=(d.width||15)+"px",d.$minWidth=0,d}return e.prototype.onMouseDown=function(t,a){if(t==="mousedown"&&!(s.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var d=this,f=a.clientY,S=function(k){f=k.clientY},$=function(){clearInterval(R)},C=a.clientY,w=this.thumbTop,M=function(){if(f!==void 0){var k=d.scrollTopFromThumbTop(w+f-C);k!==d.scrollTop&&d._emit("scroll",{data:k})}};s.capture(this.inner,S,$);var R=setInterval(M,20);return s.preventDefault(a)}var T=a.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(T)}),s.preventDefault(a)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(t){var a=t*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return a=a>>0,a<0?a=0:a>this.pageHeight-this.viewHeight&&(a=this.pageHeight-this.viewHeight),a},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(t){this.height=Math.max(0,t),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(t,a){this.pageHeight===t&&!a||(this.pageHeight=t,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})))},e.prototype.setScrollTop=function(t){this.scrollTop=t,t<0&&(t=0),this.thumbTop=t*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e})(n);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var r=(function(i){y(e,i);function e(t,a){var d=i.call(this,t,"-h")||this;return d.scrollLeft=0,d.scrollWidth=0,d.height=d.HScrollHeight,d.inner.style.height=d.element.style.height=(d.height||12)+"px",d.renderer=a,d}return e.prototype.onMouseDown=function(t,a){if(t==="mousedown"&&!(s.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var d=this,f=a.clientX,S=function(k){f=k.clientX},$=function(){clearInterval(R)},C=a.clientX,w=this.thumbLeft,M=function(){if(f!==void 0){var k=d.scrollLeftFromThumbLeft(w+f-C);k!==d.scrollLeft&&d._emit("scroll",{data:k})}};s.capture(this.inner,S,$);var R=setInterval(M,20);return s.preventDefault(a)}var T=a.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(T)}),s.preventDefault(a)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(t){var a=t*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return a=a>>0,a<0?a=0:a>this.pageWidth-this.viewWidth&&(a=this.pageWidth-this.viewWidth),a},e.prototype.setWidth=function(t){this.width=Math.max(0,t),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(t,a){this.pageWidth===t&&!a||(this.pageWidth=t,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})))},e.prototype.setScrollLeft=function(t){this.scrollLeft=t,t<0&&(t=0),this.thumbLeft=t*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e})(n);r.prototype.setInnerWidth=r.prototype.setScrollWidth,g.ScrollBar=o,g.ScrollBarV=o,g.ScrollBarH=r,g.VScrollBar=o,g.HScrollBar=r}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(u,g,E){var y=u("./lib/event"),p=(function(){function v(s,c){this.onRender=s,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=c||window;var n=this;this._flush=function(o){n.pending=!1;var r=n.changes;if(r&&(y.blockIdle(100),n.changes=0,n.onRender(r)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return v.prototype.schedule=function(s){this.changes=this.changes|s,this.changes&&!this.pending&&(y.nextFrame(this._flush),this.pending=!0)},v.prototype.clear=function(s){var c=this.changes;return this.changes=0,c},v})();g.RenderLoop=p}),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(u,g,E){var y=u("../lib/oop"),p=u("../lib/dom"),v=u("../lib/lang"),s=u("../lib/event"),c=u("../lib/useragent"),n=u("../lib/event_emitter").EventEmitter,o=512,r=typeof ResizeObserver=="function",i=200,e=(function(){function t(a){this.el=p.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=p.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=p.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),a.appendChild(this.el),this.$measureNode.textContent=v.stringRepeat("X",o),this.$characterSize={width:0,height:0},r?this.$addObserver():this.checkForSizeChanges()}return t.prototype.$setMeasureNodeStyles=function(a,d){a.width=a.height="auto",a.left=a.top="0px",a.visibility="hidden",a.position="absolute",a.whiteSpace="pre",c.isIE<8?a["font-family"]="inherit":a.font="inherit",a.overflow=d?"hidden":"visible"},t.prototype.checkForSizeChanges=function(a){if(a===void 0&&(a=this.$measureSizes()),a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)){this.$measureNode.style.fontWeight="bold";var d=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.charSizes=Object.create(null),this.allowBoldFonts=d&&d.width===a.width&&d.height===a.height,this._emit("changeCharacterSize",{data:a})}},t.prototype.$addObserver=function(){var a=this;this.$observer=new window.ResizeObserver(function(d){a.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},t.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var a=this;return this.$pollSizeChangesTimer=s.onIdle(function d(){a.checkForSizeChanges(),s.onIdle(d,500)},500)},t.prototype.setPolling=function(a){a?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},t.prototype.$measureSizes=function(a){var d={height:(a||this.$measureNode).clientHeight,width:(a||this.$measureNode).clientWidth/o};return d.width===0||d.height===0?null:d},t.prototype.$measureCharWidth=function(a){this.$main.textContent=v.stringRepeat(a,o);var d=this.$main.getBoundingClientRect();return d.width/o},t.prototype.getCharacterWidth=function(a){var d=this.charSizes[a];return d===void 0&&(d=this.charSizes[a]=this.$measureCharWidth(a)/this.$characterSize.width),d},t.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},t.prototype.$getZoom=function(a){return!a||!a.parentElement?1:(Number(window.getComputedStyle(a).zoom)||1)*this.$getZoom(a.parentElement)},t.prototype.$initTransformMeasureNodes=function(){var a=function(d,f){return["div",{style:"position: absolute;top:"+d+"px;left:"+f+"px;"}]};this.els=p.buildDom([a(0,0),a(i,0),a(0,i),a(i,i)],this.el)},t.prototype.transformCoordinates=function(a,d){if(a){var f=this.$getZoom(this.el);a=w(1/f,a)}function S(N,F,U){var W=N[1]*F[0]-N[0]*F[1];return[(-F[1]*U[0]+F[0]*U[1])/W,(+N[1]*U[0]-N[0]*U[1])/W]}function $(N,F){return[N[0]-F[0],N[1]-F[1]]}function C(N,F){return[N[0]+F[0],N[1]+F[1]]}function w(N,F){return[N*F[0],N*F[1]]}this.els||this.$initTransformMeasureNodes();function M(N){var F=N.getBoundingClientRect();return[F.left,F.top]}var R=M(this.els[0]),T=M(this.els[1]),k=M(this.els[2]),O=M(this.els[3]),A=S($(O,T),$(O,k),$(C(T,k),C(O,R))),x=w(1+A[0],$(T,R)),b=w(1+A[1],$(k,R));if(d){var m=d,_=A[0]*m[0]/i+A[1]*m[1]/i+1,L=C(w(m[0],x),w(m[1],b));return C(w(1/_/i,L),R)}var I=$(a,R),D=S($(x,w(A[0],I)),$(b,w(A[1],I)),I);return w(i,D)},t})();e.prototype.$characterSize={width:0,height:0},y.implement(e.prototype,n),g.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(u,g,E){E.exports=`
252
+ .ace_br1 {border-top-left-radius : 3px;}
253
+ .ace_br2 {border-top-right-radius : 3px;}
254
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
255
+ .ace_br4 {border-bottom-right-radius: 3px;}
256
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
257
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
258
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
259
+ .ace_br8 {border-bottom-left-radius : 3px;}
260
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
261
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
262
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
263
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
264
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
265
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
266
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
267
+
268
+
269
+ .ace_editor {
270
+ position: relative;
271
+ overflow: hidden;
272
+ padding: 0;
273
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
274
+ direction: ltr;
275
+ text-align: left;
276
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
277
+ forced-color-adjust: none;
278
+ }
279
+
280
+ .ace_scroller {
281
+ position: absolute;
282
+ overflow: hidden;
283
+ top: 0;
284
+ bottom: 0;
285
+ background-color: inherit;
286
+ -ms-user-select: none;
287
+ -moz-user-select: none;
288
+ -webkit-user-select: none;
289
+ user-select: none;
290
+ cursor: text;
291
+ }
292
+
293
+ .ace_content {
294
+ position: absolute;
295
+ box-sizing: border-box;
296
+ min-width: 100%;
297
+ contain: style size layout;
298
+ font-variant-ligatures: no-common-ligatures;
299
+ }
300
+ .ace_invisible {
301
+ font-variant-ligatures: none;
302
+ }
303
+
304
+ .ace_keyboard-focus:focus {
305
+ box-shadow: inset 0 0 0 2px #5E9ED6;
306
+ outline: none;
307
+ }
308
+
309
+ .ace_dragging .ace_scroller:before{
310
+ position: absolute;
311
+ top: 0;
312
+ left: 0;
313
+ right: 0;
314
+ bottom: 0;
315
+ content: '';
316
+ background: rgba(250, 250, 250, 0.01);
317
+ z-index: 1000;
318
+ }
319
+ .ace_dragging.ace_dark .ace_scroller:before{
320
+ background: rgba(0, 0, 0, 0.01);
321
+ }
322
+
323
+ .ace_gutter {
324
+ position: absolute;
325
+ overflow : hidden;
326
+ width: auto;
327
+ top: 0;
328
+ bottom: 0;
329
+ left: 0;
330
+ cursor: default;
331
+ z-index: 4;
332
+ -ms-user-select: none;
333
+ -moz-user-select: none;
334
+ -webkit-user-select: none;
335
+ user-select: none;
336
+ contain: style size layout;
337
+ }
338
+
339
+ .ace_gutter-active-line {
340
+ position: absolute;
341
+ left: 0;
342
+ right: 0;
343
+ }
344
+
345
+ .ace_scroller.ace_scroll-left:after {
346
+ content: "";
347
+ position: absolute;
348
+ top: 0;
349
+ right: 0;
350
+ bottom: 0;
351
+ left: 0;
352
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
353
+ pointer-events: none;
354
+ }
355
+
356
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
357
+ position: absolute;
358
+ top: 0;
359
+ left: 0;
360
+ right: 0;
361
+ padding-left: 19px;
362
+ padding-right: 6px;
363
+ background-repeat: no-repeat;
364
+ }
365
+
366
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
367
+ margin-left: -14px;
368
+ float: left;
369
+ }
370
+
371
+ .ace_gutter-cell .ace_gutter_annotation {
372
+ margin-left: -19px;
373
+ float: left;
374
+ }
375
+
376
+ .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 {
377
+ 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==");
378
+ background-repeat: no-repeat;
379
+ background-position: 2px center;
380
+ }
381
+
382
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
383
+ 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==");
384
+ background-repeat: no-repeat;
385
+ background-position: 2px center;
386
+ }
387
+
388
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
389
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
390
+ background-repeat: no-repeat;
391
+ background-position: 2px center;
392
+ }
393
+
394
+ .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 {
395
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
396
+ }
397
+
398
+ .ace_icon_svg.ace_error {
399
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
400
+ background-color: crimson;
401
+ }
402
+ .ace_icon_svg.ace_security {
403
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
404
+ background-color: crimson;
405
+ }
406
+ .ace_icon_svg.ace_warning {
407
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
408
+ background-color: darkorange;
409
+ }
410
+ .ace_icon_svg.ace_info {
411
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
412
+ background-color: royalblue;
413
+ }
414
+ .ace_icon_svg.ace_hint {
415
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
416
+ background-color: silver;
417
+ }
418
+
419
+ .ace_icon_svg.ace_error_fold {
420
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
421
+ background-color: crimson;
422
+ }
423
+ .ace_icon_svg.ace_security_fold {
424
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
425
+ background-color: crimson;
426
+ }
427
+ .ace_icon_svg.ace_warning_fold {
428
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
429
+ background-color: darkorange;
430
+ }
431
+
432
+ .ace_scrollbar {
433
+ contain: strict;
434
+ position: absolute;
435
+ right: 0;
436
+ bottom: 0;
437
+ z-index: 6;
438
+ }
439
+
440
+ .ace_scrollbar-inner {
441
+ position: absolute;
442
+ cursor: text;
443
+ left: 0;
444
+ top: 0;
445
+ }
446
+
447
+ .ace_scrollbar-v{
448
+ overflow-x: hidden;
449
+ overflow-y: scroll;
450
+ top: 0;
451
+ }
452
+
453
+ .ace_scrollbar-h {
454
+ overflow-x: scroll;
455
+ overflow-y: hidden;
456
+ left: 0;
457
+ }
458
+
459
+ .ace_print-margin {
460
+ position: absolute;
461
+ height: 100%;
462
+ }
463
+
464
+ .ace_text-input {
465
+ position: absolute;
466
+ z-index: 0;
467
+ width: 0.5em;
468
+ height: 1em;
469
+ opacity: 0;
470
+ background: transparent;
471
+ -moz-appearance: none;
472
+ appearance: none;
473
+ border: none;
474
+ resize: none;
475
+ outline: none;
476
+ overflow: hidden;
477
+ font: inherit;
478
+ padding: 0 1px;
479
+ margin: 0 -1px;
480
+ contain: strict;
481
+ -ms-user-select: text;
482
+ -moz-user-select: text;
483
+ -webkit-user-select: text;
484
+ user-select: text;
485
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
486
+ white-space: pre!important;
487
+ }
488
+ .ace_text-input.ace_composition {
489
+ background: transparent;
490
+ color: inherit;
491
+ z-index: 1000;
492
+ opacity: 1;
493
+ }
494
+ .ace_composition_placeholder { color: transparent }
495
+ .ace_composition_marker {
496
+ border-bottom: 1px solid;
497
+ position: absolute;
498
+ border-radius: 0;
499
+ margin-top: 1px;
500
+ }
501
+
502
+ [ace_nocontext=true] {
503
+ transform: none!important;
504
+ filter: none!important;
505
+ clip-path: none!important;
506
+ mask : none!important;
507
+ contain: none!important;
508
+ perspective: none!important;
509
+ mix-blend-mode: initial!important;
510
+ z-index: auto;
511
+ }
512
+
513
+ .ace_layer {
514
+ z-index: 1;
515
+ position: absolute;
516
+ overflow: hidden;
517
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
518
+ word-wrap: normal;
519
+ white-space: pre;
520
+ height: 100%;
521
+ width: 100%;
522
+ box-sizing: border-box;
523
+ /* setting pointer-events: auto; on node under the mouse, which changes
524
+ during scroll, will break mouse wheel scrolling in Safari */
525
+ pointer-events: none;
526
+ }
527
+
528
+ .ace_gutter-layer {
529
+ position: relative;
530
+ width: auto;
531
+ text-align: right;
532
+ pointer-events: auto;
533
+ height: 1000000px;
534
+ contain: style size layout;
535
+ }
536
+
537
+ .ace_text-layer {
538
+ font: inherit !important;
539
+ position: absolute;
540
+ height: 1000000px;
541
+ width: 1000000px;
542
+ contain: style size layout;
543
+ }
544
+
545
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
546
+ contain: style size layout;
547
+ position: absolute;
548
+ top: 0;
549
+ left: 0;
550
+ right: 0;
551
+ }
552
+
553
+ .ace_hidpi .ace_text-layer,
554
+ .ace_hidpi .ace_gutter-layer,
555
+ .ace_hidpi .ace_content,
556
+ .ace_hidpi .ace_gutter {
557
+ contain: strict;
558
+ }
559
+ .ace_hidpi .ace_text-layer > .ace_line,
560
+ .ace_hidpi .ace_text-layer > .ace_line_group {
561
+ contain: strict;
562
+ }
563
+
564
+ .ace_cjk {
565
+ display: inline-block;
566
+ text-align: center;
567
+ }
568
+
569
+ .ace_cursor-layer {
570
+ z-index: 4;
571
+ }
572
+
573
+ .ace_cursor {
574
+ z-index: 4;
575
+ position: absolute;
576
+ box-sizing: border-box;
577
+ border-left: 2px solid;
578
+ /* workaround for smooth cursor repaintng whole screen in chrome */
579
+ transform: translatez(0);
580
+ }
581
+
582
+ .ace_multiselect .ace_cursor {
583
+ border-left-width: 1px;
584
+ }
585
+
586
+ .ace_slim-cursors .ace_cursor {
587
+ border-left-width: 1px;
588
+ }
589
+
590
+ .ace_overwrite-cursors .ace_cursor {
591
+ border-left-width: 0;
592
+ border-bottom: 1px solid;
593
+ }
594
+
595
+ .ace_hidden-cursors .ace_cursor {
596
+ opacity: 0.2;
597
+ }
598
+
599
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
600
+ opacity: 0;
601
+ }
602
+
603
+ .ace_smooth-blinking .ace_cursor {
604
+ transition: opacity 0.18s;
605
+ }
606
+
607
+ .ace_animate-blinking .ace_cursor {
608
+ animation-duration: 1000ms;
609
+ animation-timing-function: step-end;
610
+ animation-name: blink-ace-animate;
611
+ animation-iteration-count: infinite;
612
+ }
613
+
614
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
615
+ animation-duration: 1000ms;
616
+ animation-timing-function: ease-in-out;
617
+ animation-name: blink-ace-animate-smooth;
618
+ }
619
+
620
+ @keyframes blink-ace-animate {
621
+ from, to { opacity: 1; }
622
+ 60% { opacity: 0; }
623
+ }
624
+
625
+ @keyframes blink-ace-animate-smooth {
626
+ from, to { opacity: 1; }
627
+ 45% { opacity: 1; }
628
+ 60% { opacity: 0; }
629
+ 85% { opacity: 0; }
630
+ }
631
+
632
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
633
+ position: absolute;
634
+ z-index: 3;
635
+ }
636
+
637
+ .ace_marker-layer .ace_selection {
638
+ position: absolute;
639
+ z-index: 5;
640
+ }
641
+
642
+ .ace_marker-layer .ace_bracket {
643
+ position: absolute;
644
+ z-index: 6;
645
+ }
646
+
647
+ .ace_marker-layer .ace_error_bracket {
648
+ position: absolute;
649
+ border-bottom: 1px solid #DE5555;
650
+ border-radius: 0;
651
+ }
652
+
653
+ .ace_marker-layer .ace_active-line {
654
+ position: absolute;
655
+ z-index: 2;
656
+ }
657
+
658
+ .ace_marker-layer .ace_selected-word {
659
+ position: absolute;
660
+ z-index: 4;
661
+ box-sizing: border-box;
662
+ }
663
+
664
+ .ace_line .ace_fold {
665
+ box-sizing: border-box;
666
+
667
+ display: inline-block;
668
+ height: 11px;
669
+ margin-top: -2px;
670
+ vertical-align: middle;
671
+
672
+ background-image:
673
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
674
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
675
+ background-repeat: no-repeat, repeat-x;
676
+ background-position: center center, top left;
677
+ color: transparent;
678
+
679
+ border: 1px solid black;
680
+ border-radius: 2px;
681
+
682
+ cursor: pointer;
683
+ pointer-events: auto;
684
+ }
685
+
686
+ .ace_dark .ace_fold {
687
+ }
688
+
689
+ .ace_fold:hover{
690
+ background-image:
691
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
692
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
693
+ }
694
+
695
+ .ace_tooltip {
696
+ background-color: #f5f5f5;
697
+ border: 1px solid gray;
698
+ border-radius: 1px;
699
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
700
+ color: black;
701
+ padding: 3px 4px;
702
+ position: fixed;
703
+ z-index: 999999;
704
+ box-sizing: border-box;
705
+ cursor: default;
706
+ white-space: pre-wrap;
707
+ word-wrap: break-word;
708
+ line-height: normal;
709
+ font-style: normal;
710
+ font-weight: normal;
711
+ letter-spacing: normal;
712
+ pointer-events: none;
713
+ overflow: auto;
714
+ max-width: min(33em, 66vw);
715
+ overscroll-behavior: contain;
716
+ }
717
+ .ace_tooltip pre {
718
+ white-space: pre-wrap;
719
+ }
720
+
721
+ .ace_tooltip.ace_dark {
722
+ background-color: #636363;
723
+ color: #fff;
724
+ }
725
+
726
+ .ace_tooltip:focus {
727
+ outline: 1px solid #5E9ED6;
728
+ }
729
+
730
+ .ace_icon {
731
+ display: inline-block;
732
+ width: 18px;
733
+ vertical-align: top;
734
+ }
735
+
736
+ .ace_icon_svg {
737
+ display: inline-block;
738
+ width: 12px;
739
+ vertical-align: top;
740
+ -webkit-mask-repeat: no-repeat;
741
+ -webkit-mask-size: 12px;
742
+ -webkit-mask-position: center;
743
+ }
744
+
745
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
746
+ padding-right: 13px;
747
+ }
748
+
749
+ .ace_fold-widget, .ace_custom-widget {
750
+ box-sizing: border-box;
751
+
752
+ margin: 0 -12px 0 1px;
753
+ display: none;
754
+ width: 11px;
755
+ vertical-align: top;
756
+
757
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
758
+ background-repeat: no-repeat;
759
+ background-position: center;
760
+
761
+ border-radius: 3px;
762
+
763
+ border: 1px solid transparent;
764
+ cursor: pointer;
765
+ pointer-events: auto;
766
+ }
767
+
768
+ .ace_custom-widget {
769
+ background: none;
770
+ }
771
+
772
+ .ace_folding-enabled .ace_fold-widget {
773
+ display: inline-block;
774
+ }
775
+
776
+ .ace_fold-widget.ace_end {
777
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
778
+ }
779
+
780
+ .ace_fold-widget.ace_closed {
781
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
782
+ }
783
+
784
+ .ace_fold-widget:hover {
785
+ border: 1px solid rgba(0, 0, 0, 0.3);
786
+ background-color: rgba(255, 255, 255, 0.2);
787
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
788
+ }
789
+
790
+ .ace_fold-widget:active {
791
+ border: 1px solid rgba(0, 0, 0, 0.4);
792
+ background-color: rgba(0, 0, 0, 0.05);
793
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
794
+ }
795
+ /**
796
+ * Dark version for fold widgets
797
+ */
798
+ .ace_dark .ace_fold-widget {
799
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
800
+ }
801
+ .ace_dark .ace_fold-widget.ace_end {
802
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
803
+ }
804
+ .ace_dark .ace_fold-widget.ace_closed {
805
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
806
+ }
807
+ .ace_dark .ace_fold-widget:hover {
808
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
809
+ background-color: rgba(255, 255, 255, 0.1);
810
+ }
811
+ .ace_dark .ace_fold-widget:active {
812
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
813
+ }
814
+
815
+ .ace_inline_button {
816
+ border: 1px solid lightgray;
817
+ display: inline-block;
818
+ margin: -1px 8px;
819
+ padding: 0 5px;
820
+ pointer-events: auto;
821
+ cursor: pointer;
822
+ }
823
+ .ace_inline_button:hover {
824
+ border-color: gray;
825
+ background: rgba(200,200,200,0.2);
826
+ display: inline-block;
827
+ pointer-events: auto;
828
+ }
829
+
830
+ .ace_fold-widget.ace_invalid {
831
+ background-color: #FFB4B4;
832
+ border-color: #DE5555;
833
+ }
834
+
835
+ .ace_fade-fold-widgets .ace_fold-widget {
836
+ transition: opacity 0.4s ease 0.05s;
837
+ opacity: 0;
838
+ }
839
+
840
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
841
+ transition: opacity 0.05s ease 0.05s;
842
+ opacity:1;
843
+ }
844
+
845
+ .ace_underline {
846
+ text-decoration: underline;
847
+ }
848
+
849
+ .ace_bold {
850
+ font-weight: bold;
851
+ }
852
+
853
+ .ace_nobold .ace_bold {
854
+ font-weight: normal;
855
+ }
856
+
857
+ .ace_italic {
858
+ font-style: italic;
859
+ }
860
+
861
+
862
+ .ace_error-marker {
863
+ background-color: rgba(255, 0, 0,0.2);
864
+ position: absolute;
865
+ z-index: 9;
866
+ }
867
+
868
+ .ace_highlight-marker {
869
+ background-color: rgba(255, 255, 0,0.2);
870
+ position: absolute;
871
+ z-index: 8;
872
+ }
873
+
874
+ .ace_mobile-menu {
875
+ position: absolute;
876
+ line-height: 1.5;
877
+ border-radius: 4px;
878
+ -ms-user-select: none;
879
+ -moz-user-select: none;
880
+ -webkit-user-select: none;
881
+ user-select: none;
882
+ background: white;
883
+ box-shadow: 1px 3px 2px grey;
884
+ border: 1px solid #dcdcdc;
885
+ color: black;
886
+ }
887
+ .ace_dark > .ace_mobile-menu {
888
+ background: #333;
889
+ color: #ccc;
890
+ box-shadow: 1px 3px 2px grey;
891
+ border: 1px solid #444;
892
+
893
+ }
894
+ .ace_mobile-button {
895
+ padding: 2px;
896
+ cursor: pointer;
897
+ overflow: hidden;
898
+ }
899
+ .ace_mobile-button:hover {
900
+ background-color: #eee;
901
+ opacity:1;
902
+ }
903
+ .ace_mobile-button:active {
904
+ background-color: #ddd;
905
+ }
906
+
907
+ .ace_placeholder {
908
+ position: relative;
909
+ font-family: arial;
910
+ transform: scale(0.9);
911
+ transform-origin: left;
912
+ white-space: pre;
913
+ opacity: 0.7;
914
+ margin: 0 10px;
915
+ z-index: 1;
916
+ }
917
+
918
+ .ace_ghost_text {
919
+ opacity: 0.5;
920
+ font-style: italic;
921
+ }
922
+
923
+ .ace_ghost_text_container > div {
924
+ white-space: pre;
925
+ }
926
+
927
+ .ghost_text_line_wrapped::after {
928
+ content: "↩";
929
+ position: absolute;
930
+ }
931
+
932
+ .ace_lineWidgetContainer.ace_ghost_text {
933
+ margin: 0px 4px
934
+ }
935
+
936
+ .ace_screenreader-only {
937
+ position:absolute;
938
+ left:-10000px;
939
+ top:auto;
940
+ width:1px;
941
+ height:1px;
942
+ overflow:hidden;
943
+ }
944
+
945
+ .ace_hidden_token {
946
+ display: none;
947
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(u,g,E){var y=u("../lib/dom"),p=u("../lib/oop"),v=u("../lib/event_emitter").EventEmitter,s=(function(){function c(n,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(n)}return c.prototype.$createCanvas=function(){this.canvas=y.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},c.prototype.setScrollBarV=function(n){this.$createCanvas(),this.scrollbarV=n,n.element.appendChild(this.canvas),this.setDimensions()},c.prototype.$updateDecorators=function(n){if(typeof this.canvas.getContext!="function")return;var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(n);var r=this.canvas.getContext("2d");function i(x,b){return x.priority<b.priority?-1:x.priority>b.priority?1:0}var e=this.renderer.session.$annotations;if(r.clearRect(0,0,this.canvas.width,this.canvas.height),e){var t={info:1,warning:2,error:3};e.forEach(function(x){x.priority=t[x.type]||null}),e=e.sort(i);for(var a=0;a<e.length;a++){var d=e[a].row,f=this.getVerticalOffsetForRow(d),S=f+this.lineHeight,$=Math.round(this.heightRatio*f),C=Math.round(this.heightRatio*S),w=Math.round(($+C)/2),M=C-w;M<this.halfMinDecorationHeight&&(M=this.halfMinDecorationHeight),w-M<0&&(w=M),w+M>this.canvasHeight&&(w=this.canvasHeight-M);var R=w-M,T=w+M,k=T-R;r.fillStyle=o[e[a].type]||null,r.fillRect(0,R,Math.round(this.oneZoneWidth-1),k)}}var O=this.renderer.session.selection.getCursor();if(O){var A=Math.round(this.getVerticalOffsetForRow(O.row)*this.heightRatio);r.fillStyle="rgba(0, 0, 0, 0.5)",r.fillRect(0,A,this.canvasWidth,2)}},c.prototype.getVerticalOffsetForRow=function(n){n=n|0;var o=this.renderer.session.documentToScreenRow(n,0)*this.lineHeight;return o},c.prototype.setDimensions=function(n){n=n||this.renderer.layerConfig,this.maxHeight=n.maxHeight,this.lineHeight=n.lineHeight,this.canvasHeight=n.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},c.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},c.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},c})();p.implement(s.prototype,v),g.Decorator=s}),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(u,g,E){var y=u("./lib/oop"),p=u("./lib/dom"),v=u("./lib/lang"),s=u("./config"),c=u("./layer/gutter").Gutter,n=u("./layer/marker").Marker,o=u("./layer/text").Text,r=u("./layer/cursor").Cursor,i=u("./scrollbar").HScrollBar,e=u("./scrollbar").VScrollBar,t=u("./scrollbar_custom").HScrollBar,a=u("./scrollbar_custom").VScrollBar,d=u("./renderloop").RenderLoop,f=u("./layer/font_metrics").FontMetrics,S=u("./lib/event_emitter").EventEmitter,$=u("./css/editor-css"),C=u("./layer/decorators").Decorator,w=u("./lib/useragent"),M=u("./layer/text_util").isTextToken;p.importCssString($,"ace_editor.css",!1);var R=(function(){function T(k,O){var A=this;this.container=k||p.createElement("div"),p.addCssClass(this.container,"ace_editor"),p.HI_DPI&&p.addCssClass(this.container,"ace_hidpi"),this.setTheme(O),s.get("useStrictCSP")==null&&s.set("useStrictCSP",!1),this.$gutter=p.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=p.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=p.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new c(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new n(this.content);var x=this.$textLayer=new o(this.content);this.canvas=x.element,this.$markerFront=new n(this.content),this.$cursorLayer=new r(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.on("scroll",function(b){A.$scrollAnimation||A.session.setScrollTop(b.data-A.scrollMargin.top)}),this.scrollBarH.on("scroll",function(b){A.$scrollAnimation||A.session.setScrollLeft(b.data-A.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(b){A.updateCharacterSize(),A.onResize(!0,A.gutterWidth,A.$size.width,A.$size.height),A._signal("changeCharacterSize",b)}),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 d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return T.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(),p.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},T.prototype.setSession=function(k){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=k,k&&this.scrollMargin.top&&k.getScrollTop()<=0&&k.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(k),this.$markerBack.setSession(k),this.$markerFront.setSession(k),this.$gutterLayer.setSession(k),this.$textLayer.setSession(k),k&&(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))},T.prototype.updateLines=function(k,O,A){if(O===void 0&&(O=1/0),this.$changedLines?(this.$changedLines.firstRow>k&&(this.$changedLines.firstRow=k),this.$changedLines.lastRow<O&&(this.$changedLines.lastRow=O)):this.$changedLines={firstRow:k,lastRow:O},this.$changedLines.lastRow<this.layerConfig.firstRow)if(A)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},T.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},T.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},T.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},T.prototype.updateFull=function(k){k?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},T.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},T.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},T.prototype.onResize=function(k,O,A,x){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=k?1:0;var b=this.container;x||(x=b.clientHeight||b.scrollHeight),!x&&this.$maxLines&&this.lineHeight>1&&(!b.style.height||b.style.height=="0px")&&(b.style.height="1px",x=b.clientHeight||b.scrollHeight),A||(A=b.clientWidth||b.scrollWidth);var m=this.$updateCachedSize(k,O,A,x);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!A&&!x)return this.resizing=0;k&&(this.$gutterLayer.$padding=null),k?this.$renderChanges(m|this.$changes,!0):this.$loop.schedule(m|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},T.prototype.$updateCachedSize=function(k,O,A,x){x-=this.$extraHeight||0;var b=0,m=this.$size,_={width:m.width,height:m.height,scrollerHeight:m.scrollerHeight,scrollerWidth:m.scrollerWidth};if(x&&(k||m.height!=x)&&(m.height=x,b|=this.CHANGE_SIZE,m.scrollerHeight=m.height,this.$horizScroll&&(m.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(m.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",b=b|this.CHANGE_SCROLL),A&&(k||m.width!=A)){b|=this.CHANGE_SIZE,m.width=A,O==null&&(O=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=O,p.setStyle(this.scrollBarH.element.style,"left",O+"px"),p.setStyle(this.scroller.style,"left",O+this.margin.left+"px"),m.scrollerWidth=Math.max(0,A-O-this.scrollBarV.getWidth()-this.margin.h),p.setStyle(this.$gutter.style,"left",this.margin.left+"px");var L=this.scrollBarV.getWidth()+"px";p.setStyle(this.scrollBarH.element.style,"right",L),p.setStyle(this.scroller.style,"right",L),p.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(m.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||k)&&(b|=this.CHANGE_FULL)}return m.$dirty=!A||!x,b&&this._signal("resize",_),b},T.prototype.onGutterResize=function(k){var O=this.$showGutter?k:0;O!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,O,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()},T.prototype.adjustWrapLimit=function(){var k=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(k/this.characterWidth);return this.session.adjustWrapLimit(O,this.$showPrintMargin&&this.$printMarginColumn)},T.prototype.setAnimatedScroll=function(k){this.setOption("animatedScroll",k)},T.prototype.getAnimatedScroll=function(){return this.$animatedScroll},T.prototype.setShowInvisibles=function(k){this.setOption("showInvisibles",k),this.session.$bidiHandler.setShowInvisibles(k)},T.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},T.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},T.prototype.setDisplayIndentGuides=function(k){this.setOption("displayIndentGuides",k)},T.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},T.prototype.setHighlightIndentGuides=function(k){this.setOption("highlightIndentGuides",k)},T.prototype.setShowPrintMargin=function(k){this.setOption("showPrintMargin",k)},T.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},T.prototype.setPrintMarginColumn=function(k){this.setOption("printMarginColumn",k)},T.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},T.prototype.getShowGutter=function(){return this.getOption("showGutter")},T.prototype.setShowGutter=function(k){return this.setOption("showGutter",k)},T.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},T.prototype.setFadeFoldWidgets=function(k){this.setOption("fadeFoldWidgets",k)},T.prototype.setHighlightGutterLine=function(k){this.setOption("highlightGutterLine",k)},T.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},T.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var k=p.createElement("div");k.className="ace_layer ace_print-margin-layer",this.$printMarginEl=p.createElement("div"),this.$printMarginEl.className="ace_print-margin",k.appendChild(this.$printMarginEl),this.content.insertBefore(k,this.content.firstChild)}var O=this.$printMarginEl.style;O.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",O.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},T.prototype.getContainerElement=function(){return this.container},T.prototype.getMouseEventTarget=function(){return this.scroller},T.prototype.getTextAreaContainer=function(){return this.container},T.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var k=this.textarea.style,O=this.$composition;if(!this.$keepTextAreaAtCursor&&!O){p.translate(this.textarea,-100,0);return}var A=this.$cursorLayer.$pixelPos;if(A){O&&O.markerRange&&(A=this.$cursorLayer.getPixelPosition(O.markerRange.start,!0));var x=this.layerConfig,b=A.top,m=A.left;b-=x.offset;var _=O&&O.useTextareaForIME||w.isMobile?this.lineHeight:1;if(b<0||b>x.height-_){p.translate(this.textarea,0,0);return}var L=1,I=this.$size.height-_;if(!O)b+=this.lineHeight;else if(O.useTextareaForIME){var D=this.textarea.value;L=this.characterWidth*this.session.$getStringScreenWidth(D)[0]}else b+=this.lineHeight+2;m-=this.scrollLeft,m>this.$size.scrollerWidth-L&&(m=this.$size.scrollerWidth-L),m+=this.gutterWidth+this.margin.left,p.setStyle(k,"height",_+"px"),p.setStyle(k,"width",L+"px"),p.translate(this.textarea,Math.min(m,this.$size.scrollerWidth-L),Math.min(b,I))}}},T.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},T.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},T.prototype.getLastFullyVisibleRow=function(){var k=this.layerConfig,O=k.lastRow,A=this.session.documentToScreenRow(O,0)*k.lineHeight;return A-this.session.getScrollTop()>k.height-k.lineHeight?O-1:O},T.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},T.prototype.setPadding=function(k){this.$padding=k,this.$textLayer.setPadding(k),this.$cursorLayer.setPadding(k),this.$markerFront.setPadding(k),this.$markerBack.setPadding(k),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},T.prototype.setScrollMargin=function(k,O,A,x){var b=this.scrollMargin;b.top=k|0,b.bottom=O|0,b.right=x|0,b.left=A|0,b.v=b.top+b.bottom,b.h=b.left+b.right,b.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-b.top),this.updateFull()},T.prototype.setMargin=function(k,O,A,x){var b=this.margin;b.top=k|0,b.bottom=O|0,b.right=x|0,b.left=A|0,b.v=b.top+b.bottom,b.h=b.left+b.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},T.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},T.prototype.setHScrollBarAlwaysVisible=function(k){this.setOption("hScrollBarAlwaysVisible",k)},T.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},T.prototype.setVScrollBarAlwaysVisible=function(k){this.setOption("vScrollBarAlwaysVisible",k)},T.prototype.$updateScrollBarV=function(){var k=this.layerConfig.maxHeight,O=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(k-=(O-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>k-O&&(k=this.scrollTop+O,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(k+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},T.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},T.prototype.freeze=function(){this.$frozen=!0},T.prototype.unfreeze=function(){this.$frozen=!1},T.prototype.$renderChanges=function(k,O){if(this.$changes&&(k|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!k&&!O){this.$changes|=k;return}if(this.$size.$dirty)return this.$changes|=k,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",k),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var A=this.layerConfig;if(k&this.CHANGE_FULL||k&this.CHANGE_SIZE||k&this.CHANGE_TEXT||k&this.CHANGE_LINES||k&this.CHANGE_SCROLL||k&this.CHANGE_H_SCROLL){if(k|=this.$computeLayerConfig()|this.$loop.clear(),A.firstRow!=this.layerConfig.firstRow&&A.firstRowScreen==this.layerConfig.firstRowScreen){var x=this.scrollTop+(A.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;x>0&&(this.scrollTop=x,k=k|this.CHANGE_SCROLL,k|=this.$computeLayerConfig()|this.$loop.clear())}A=this.layerConfig,this.$updateScrollBarV(),k&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),p.translate(this.content,-this.scrollLeft,-A.offset);var b=A.width+2*this.$padding+"px",m=A.minHeight+"px";p.setStyle(this.content.style,"width",b),p.setStyle(this.content.style,"height",m)}if(k&this.CHANGE_H_SCROLL&&(p.translate(this.content,-this.scrollLeft,-A.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),k&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(A),this.$showGutter&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A),this.$markerBack.update(A),this.$markerFront.update(A),this.$cursorLayer.update(A),this.$moveTextAreaToCursor(),this._signal("afterRender",k);return}if(k&this.CHANGE_SCROLL){this.$changedLines=null,k&this.CHANGE_TEXT||k&this.CHANGE_LINES?this.$textLayer.update(A):this.$textLayer.scrollLines(A),this.$showGutter&&(k&this.CHANGE_GUTTER||k&this.CHANGE_LINES?this.$gutterLayer.update(A):this.$gutterLayer.scrollLines(A)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A),this.$markerBack.update(A),this.$markerFront.update(A),this.$cursorLayer.update(A),this.$moveTextAreaToCursor(),this._signal("afterRender",k);return}k&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(A),this.$showGutter&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)):k&this.CHANGE_LINES?((this.$updateLines()||k&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)):k&this.CHANGE_TEXT||k&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)):k&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)),k&this.CHANGE_CURSOR&&(this.$cursorLayer.update(A),this.$moveTextAreaToCursor()),k&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(A),k&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(A),this._signal("afterRender",k)},T.prototype.$autosize=function(){var k=this.session.getScreenLength()*this.lineHeight,O=this.$maxLines*this.lineHeight,A=Math.min(O,Math.max((this.$minLines||1)*this.lineHeight,k))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(A+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&A>this.$maxPixelHeight&&(A=this.$maxPixelHeight);var x=A<=2*this.lineHeight,b=!x&&k>O;if(A!=this.desiredHeight||this.$size.height!=this.desiredHeight||b!=this.$vScroll){b!=this.$vScroll&&(this.$vScroll=b,this.scrollBarV.setVisible(b));var m=this.container.clientWidth;this.container.style.height=A+"px",this.$updateCachedSize(!0,this.$gutterWidth,m,A),this.desiredHeight=A,this._signal("autosize")}},T.prototype.$computeLayerConfig=function(){var k=this.session,O=this.$size,A=O.height<=2*this.lineHeight,x=this.session.getScreenLength(),b=x*this.lineHeight,m=this.$getLongestLine(),_=!A&&(this.$hScrollBarAlwaysVisible||O.scrollerWidth-m-2*this.$padding<0),L=this.$horizScroll!==_;L&&(this.$horizScroll=_,this.scrollBarH.setVisible(_));var I=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),A=O.height<=2*this.lineHeight);var D=O.scrollerHeight+this.lineHeight,N=!this.$maxLines&&this.$scrollPastEnd?(O.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;b+=N;var F=this.scrollMargin;this.session.setScrollTop(Math.max(-F.top,Math.min(this.scrollTop,b-O.scrollerHeight+F.bottom))),this.session.setScrollLeft(Math.max(-F.left,Math.min(this.scrollLeft,m+2*this.$padding-O.scrollerWidth+F.right)));var U=!A&&(this.$vScrollBarAlwaysVisible||O.scrollerHeight-b+N<0||this.scrollTop>F.top),W=I!==U;W&&(this.$vScroll=U,this.scrollBarV.setVisible(U));var z=this.scrollTop%this.lineHeight,H=Math.ceil(D/this.lineHeight)-1,B=Math.max(0,Math.round((this.scrollTop-z)/this.lineHeight)),j=B+H,K,Q,Y=this.lineHeight;B=k.screenToDocumentRow(B,0);var ee=k.getFoldLine(B);ee&&(B=ee.start.row),K=k.documentToScreenRow(B,0),Q=k.getRowLength(B)*Y,j=Math.min(k.screenToDocumentRow(j,0),k.getLength()-1),D=O.scrollerHeight+k.getRowLength(j)*Y+Q,z=this.scrollTop-K*Y,z<0&&K>0&&(K=Math.max(0,K+Math.floor(z/Y)),z=this.scrollTop-K*Y);var ie=0;return(this.layerConfig.width!=m||L)&&(ie=this.CHANGE_H_SCROLL),(L||W)&&(ie|=this.$updateCachedSize(!0,this.gutterWidth,O.width,O.height),this._signal("scrollbarVisibilityChanged"),W&&(m=this.$getLongestLine())),this.layerConfig={width:m,padding:this.$padding,firstRow:B,firstRowScreen:K,lastRow:j,lineHeight:Y,characterWidth:this.characterWidth,minHeight:D,maxHeight:b,offset:z,gutterOffset:Y?Math.max(0,Math.ceil((z+O.height-O.scrollerHeight)/Y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(m-this.$padding),ie},T.prototype.$updateLines=function(){if(this.$changedLines){var k=this.$changedLines.firstRow,O=this.$changedLines.lastRow;this.$changedLines=null;var A=this.layerConfig;if(!(k>A.lastRow+1)&&!(O<A.firstRow)){if(O===1/0){this.$showGutter&&this.$gutterLayer.update(A),this.$textLayer.update(A);return}return this.$textLayer.updateLines(A,k,O),!0}}},T.prototype.$getLongestLine=function(){var k=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(k+=1),this.$textLayer&&k>this.$textLayer.MAX_LINE_LENGTH&&(k=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(k*this.characterWidth))},T.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},T.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},T.prototype.addGutterDecoration=function(k,O){this.$gutterLayer.addGutterDecoration(k,O)},T.prototype.removeGutterDecoration=function(k,O){this.$gutterLayer.removeGutterDecoration(k,O)},T.prototype.updateBreakpoints=function(k){this._rows=k,this.$loop.schedule(this.CHANGE_GUTTER)},T.prototype.setAnnotations=function(k){this.$gutterLayer.setAnnotations(k),this.$loop.schedule(this.CHANGE_GUTTER)},T.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},T.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},T.prototype.showCursor=function(){this.$cursorLayer.showCursor()},T.prototype.scrollSelectionIntoView=function(k,O,A){this.scrollCursorIntoView(k,A),this.scrollCursorIntoView(O,A)},T.prototype.scrollCursorIntoView=function(k,O,A){if(this.$size.scrollerHeight!==0){var x=this.$cursorLayer.getPixelPosition(k),b=x.left,m=x.top,_=A&&A.top||0,L=A&&A.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var I=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;I+_>m?(O&&I+_>m+this.lineHeight&&(m-=O*this.$size.scrollerHeight),m===0&&(m=-this.scrollMargin.top),this.session.setScrollTop(m)):I+this.$size.scrollerHeight-L<m+this.lineHeight&&(O&&I+this.$size.scrollerHeight-L<m-this.lineHeight&&(m+=O*this.$size.scrollerHeight),this.session.setScrollTop(m+this.lineHeight+L-this.$size.scrollerHeight));var D=this.scrollLeft,N=2*this.layerConfig.characterWidth;b-N<D?(b-=N,b<this.$padding+N&&(b=-this.scrollMargin.left),this.session.setScrollLeft(b)):(b+=N,D+this.$size.scrollerWidth<b+this.characterWidth?this.session.setScrollLeft(Math.round(b+this.characterWidth-this.$size.scrollerWidth)):D<=this.$padding&&b-D<this.characterWidth&&this.session.setScrollLeft(0))}},T.prototype.getScrollTop=function(){return this.session.getScrollTop()},T.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},T.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},T.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},T.prototype.scrollToRow=function(k){this.session.setScrollTop(k*this.lineHeight)},T.prototype.alignCursor=function(k,O){typeof k=="number"&&(k={row:k,column:0});var A=this.$cursorLayer.getPixelPosition(k),x=this.$size.scrollerHeight-this.lineHeight,b=A.top-x*(O||0);return this.session.setScrollTop(b),b},T.prototype.$calcSteps=function(k,O){var A=0,x=this.STEPS,b=[],m=function(_,L,I){return I*(Math.pow(_-1,3)+1)+L};for(A=0;A<x;++A)b.push(m(A/this.STEPS,k,O-k));return b},T.prototype.scrollToLine=function(k,O,A,x){var b=this.$cursorLayer.getPixelPosition({row:k,column:0}),m=b.top;O&&(m-=this.$size.scrollerHeight/2);var _=this.scrollTop;this.session.setScrollTop(m),A!==!1&&this.animateScrolling(_,x)},T.prototype.animateScrolling=function(k,O){var A=this.scrollTop;if(!this.$animatedScroll)return;var x=this;if(k==A)return;if(this.$scrollAnimation){var b=this.$scrollAnimation.steps;if(b.length&&(k=b[0],k==A))return}var m=x.$calcSteps(k,A);this.$scrollAnimation={from:k,to:A,steps:m},clearInterval(this.$timer),x.session.setScrollTop(m.shift()),x.session.$scrollTop=A;function _(){x.$timer=clearInterval(x.$timer),x.$scrollAnimation=null,x.$stopAnimation=!1,O&&O()}this.$timer=setInterval(function(){if(x.$stopAnimation){_();return}if(!x.session)return clearInterval(x.$timer);m.length?(x.session.setScrollTop(m.shift()),x.session.$scrollTop=A):A!=null?(x.session.$scrollTop=-1,x.session.setScrollTop(A),A=null):_()},10)},T.prototype.scrollToY=function(k){this.scrollTop!==k&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=k)},T.prototype.scrollToX=function(k){this.scrollLeft!==k&&(this.scrollLeft=k),this.$loop.schedule(this.CHANGE_H_SCROLL)},T.prototype.scrollTo=function(k,O){this.session.setScrollTop(O),this.session.setScrollLeft(k)},T.prototype.scrollBy=function(k,O){O&&this.session.setScrollTop(this.session.getScrollTop()+O),k&&this.session.setScrollLeft(this.session.getScrollLeft()+k)},T.prototype.isScrollableBy=function(k,O){if(O<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||O>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||k<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||k>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},T.prototype.pixelToScreenCoordinates=function(k,O){var A;if(this.$hasCssTransforms){A={top:0,left:0};var x=this.$fontMetrics.transformCoordinates([k,O]);k=x[1]-this.gutterWidth-this.margin.left,O=x[0]}else A=this.scroller.getBoundingClientRect();var b=k+this.scrollLeft-A.left-this.$padding,m=b/this.characterWidth,_=Math.floor((O+this.scrollTop-A.top)/this.lineHeight),L=this.$blockCursor?Math.floor(m):Math.round(m);return{row:_,column:L,side:m-L>0?1:-1,offsetX:b}},T.prototype.screenToTextCoordinates=function(k,O){var A;if(this.$hasCssTransforms){A={top:0,left:0};var x=this.$fontMetrics.transformCoordinates([k,O]);k=x[1]-this.gutterWidth-this.margin.left,O=x[0]}else A=this.scroller.getBoundingClientRect();var b=k+this.scrollLeft-A.left-this.$padding,m=b/this.characterWidth,_=this.$blockCursor?Math.floor(m):Math.round(m),L=(O+this.scrollTop-A.top)/this.lineHeight;return this.session.screenToDocumentPosition(L,Math.max(_,0),b)},T.prototype.textToScreenCoordinates=function(k,O){var A=this.scroller.getBoundingClientRect(),x=this.session.documentToScreenPosition(k,O),b=this.$padding+(this.session.$bidiHandler.isBidiRow(x.row,k)?this.session.$bidiHandler.getPosLeft(x.column):Math.round(x.column*this.characterWidth)),m=x.row*this.lineHeight;return{pageX:A.left+b-this.scrollLeft,pageY:A.top+m-this.scrollTop}},T.prototype.visualizeFocus=function(){p.addCssClass(this.container,"ace_focus")},T.prototype.visualizeBlur=function(){p.removeCssClass(this.container,"ace_focus")},T.prototype.showComposition=function(k){this.$composition=k,k.cssText||(k.cssText=this.textarea.style.cssText),k.useTextareaForIME==null&&(k.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(p.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):k.markerId=this.session.addMarker(k.markerRange,"ace_composition_marker","text")},T.prototype.setCompositionText=function(k){var O=this.session.selection.cursor;this.addToken(k,"composition_placeholder",O.row,O.column),this.$moveTextAreaToCursor()},T.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),p.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var k=this.session.selection.cursor;this.removeExtraToken(k.row,k.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},T.prototype.setGhostText=function(k,O){var A=this.session.selection.cursor,x=O||{row:A.row,column:A.column};this.removeGhostText();var b=this.$calculateWrappedTextChunks(k,x);this.addToken(b[0].text,"ghost_text",x.row,x.column),this.$ghostText={text:k,position:{row:x.row,column:x.column}};var m=p.createElement("div");if(b.length>1){var _=this.hideTokensAfterPosition(x.row,x.column),L;b.slice(1).forEach(function(W){var z=p.createElement("div"),H=p.createElement("span");H.className="ace_ghost_text",W.wrapped&&(z.className="ghost_text_line_wrapped"),W.text.length===0&&(W.text=" "),H.appendChild(p.createTextNode(W.text)),z.appendChild(H),m.appendChild(z),L=z}),_.forEach(function(W){var z=p.createElement("span");M(W.type)||(z.className="ace_"+W.type.replace(/\./g," ace_")),z.appendChild(p.createTextNode(W.value)),L.appendChild(z)}),this.$ghostTextWidget={el:m,row:x.row,column:x.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var I=this.$cursorLayer.getPixelPosition(x,!0),D=this.container,N=D.getBoundingClientRect().height,F=b.length*this.lineHeight,U=F<N-I.top;if(U)return;F<N?this.scrollBy(0,(b.length-1)*this.lineHeight):this.scrollToRow(x.row)}},T.prototype.$calculateWrappedTextChunks=function(k,O){var A=this.$size.scrollerWidth-this.$padding*2,x=Math.floor(A/this.characterWidth)-2;x=x<=0?60:x;for(var b=k.split(/\r?\n/),m=[],_=0;_<b.length;_++){var L=this.session.$getDisplayTokens(b[_],O.column),I=this.session.$computeWrapSplits(L,x,this.session.$tabSize);if(I.length>0){var D=0;I.push(b[_].length);for(var N=0;N<I.length;N++){var F=b[_].slice(D,I[N]);m.push({text:F,wrapped:!0}),D=I[N]}}else m.push({text:b[_],wrapped:!1})}return m},T.prototype.removeGhostText=function(){if(this.$ghostText){var k=this.$ghostText.position;this.removeExtraToken(k.row,k.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},T.prototype.addToken=function(k,O,A,x){var b=this.session;b.bgTokenizer.lines[A]=null;var m={type:O,value:k},_=b.getTokens(A);if(x==null||!_.length)_.push(m);else for(var L=0,I=0;I<_.length;I++){var D=_[I];if(L+=D.value.length,x<=L){var N=D.value.length-(L-x),F=D.value.slice(0,N),U=D.value.slice(N);_.splice(I,1,{type:D.type,value:F},m,{type:D.type,value:U});break}}this.updateLines(A,A)},T.prototype.hideTokensAfterPosition=function(k,O){for(var A=this.session.getTokens(k),x=0,b=!1,m=[],_=0;_<A.length;_++){var L=A[_];if(x+=L.value.length,L.type!=="ghost_text"){if(b){m.push({type:L.type,value:L.value}),L.type="hidden_token";continue}x===O&&(b=!0)}}return this.updateLines(k,k),m},T.prototype.removeExtraToken=function(k,O){this.session.bgTokenizer.lines[k]=null,this.updateLines(k,k)},T.prototype.setTheme=function(k,O){var A=this;if(this.$themeId=k,A._dispatchEvent("themeChange",{theme:k}),!k||typeof k=="string"){var x=k||this.$options.theme.initialValue;s.loadModule(["theme",x],b)}else b(k);function b(m){if(A.$themeId!=k)return O&&O();if(!m||!m.cssClass)throw new Error("couldn't load module "+k+" or it didn't call define");m.$id&&(A.$themeId=m.$id),p.importCssString(m.cssText,m.cssClass,A.container),A.theme&&p.removeCssClass(A.container,A.theme.cssClass);var _="padding"in m?m.padding:"padding"in(A.theme||{})?4:A.$padding;if(A.$padding&&_!=A.$padding&&A.setPadding(_),A.$gutterLayer){var L=m.$showGutterCursorMarker;L&&!A.$gutterLayer.$showCursorMarker?A.$gutterLayer.$showCursorMarker="theme":!L&&A.$gutterLayer.$showCursorMarker=="theme"&&(A.$gutterLayer.$showCursorMarker=null)}A.$theme=m.cssClass,A.theme=m,p.addCssClass(A.container,m.cssClass),p.setCssClass(A.container,"ace_dark",m.isDark),A.$size&&(A.$size.width=0,A.$updateSizeAsync()),A._dispatchEvent("themeLoaded",{theme:m}),O&&O(),w.isSafari&&A.scroller&&(A.scroller.style.background="red",A.scroller.style.background="")}},T.prototype.getTheme=function(){return this.$themeId},T.prototype.setStyle=function(k,O){p.setCssClass(this.container,k,O!==!1)},T.prototype.unsetStyle=function(k){p.removeCssClass(this.container,k)},T.prototype.setCursorStyle=function(k){p.setStyle(this.scroller.style,"cursor",k)},T.prototype.setMouseCursor=function(k){p.setStyle(this.scroller.style,"cursor",k)},T.prototype.attachToShadowRoot=function(){p.importCssString($,"ace_editor.css",this.container)},T.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},T.prototype.$updateCustomScrollbar=function(k){var O=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),k===!0?(this.scrollBarV=new a(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(A){O.$scrollAnimation||O.session.setScrollTop(A.data-O.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(A){O.$scrollAnimation||O.session.setScrollLeft(A.data-O.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new C(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.addEventListener("scroll",function(A){O.$scrollAnimation||O.session.setScrollTop(A.data-O.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(A){O.$scrollAnimation||O.session.setScrollLeft(A.data-O.scrollMargin.left)}))},T.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var k=this;this.$resizeTimer=v.delayedCall(function(){k.destroyed||k.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(O){var A=O[0].contentRect.width,x=O[0].contentRect.height;Math.abs(k.$size.width-A)>1||Math.abs(k.$size.height-x)>1?k.$resizeTimer.delay():k.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},T})();R.prototype.CHANGE_CURSOR=1,R.prototype.CHANGE_MARKER=2,R.prototype.CHANGE_GUTTER=4,R.prototype.CHANGE_SCROLL=8,R.prototype.CHANGE_LINES=16,R.prototype.CHANGE_TEXT=32,R.prototype.CHANGE_SIZE=64,R.prototype.CHANGE_MARKER_BACK=128,R.prototype.CHANGE_MARKER_FRONT=256,R.prototype.CHANGE_FULL=512,R.prototype.CHANGE_H_SCROLL=1024,R.prototype.$changes=0,R.prototype.$padding=null,R.prototype.$frozen=!1,R.prototype.STEPS=8,y.implement(R.prototype,S),s.defineOptions(R.prototype,"renderer",{useResizeObserver:{set:function(T){!T&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):T&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(T){this.$textLayer.setShowInvisibles(T)&&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(T){typeof T=="number"&&(this.$printMarginColumn=T),this.$showPrintMargin=!!T,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(T){this.$gutter.style.display=T?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(T){this.$gutterLayer.$useSvgGutterIcons=T},initialValue:!1},showFoldedAnnotations:{set:function(T){this.$gutterLayer.$showFoldedAnnotations=T},initialValue:!1},fadeFoldWidgets:{set:function(T){p.setCssClass(this.$gutter,"ace_fade-fold-widgets",T)},initialValue:!1},showFoldWidgets:{set:function(T){this.$gutterLayer.setShowFoldWidgets(T),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(T){this.$textLayer.setDisplayIndentGuides(T)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(T){this.$textLayer.setHighlightIndentGuides(T)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(T){this.$gutterLayer.setHighlightGutterLine(T),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(T){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(T){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(T){typeof T=="number"&&(T=T+"px"),this.container.style.fontSize=T,this.updateFontSize()},initialValue:12},fontFamily:{set:function(T){this.container.style.fontFamily=T,this.updateFontSize()}},maxLines:{set:function(T){this.updateFull()}},minLines:{set:function(T){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(T){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(T){T=+T||0,this.$scrollPastEnd!=T&&(this.$scrollPastEnd=T,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(T){this.$gutterLayer.$fixedWidth=!!T,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(T){this.$updateCustomScrollbar(T)},initialValue:!1},theme:{set:function(T){this.setTheme(T)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),g.VirtualRenderer=R}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(u,g,E){var y=u("../lib/oop"),p=u("../lib/net"),v=u("../lib/event_emitter").EventEmitter,s=u("../config");function c(i){var e="importScripts('"+p.qualifyURL(i)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var t=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,a=new t;return a.append(e),a.getBlob("application/javascript")}}function n(i){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var e=c(i),t=window.URL||window.webkitURL,a=t.createObjectURL(e);return new Worker(a)}return new Worker(i)}var o=function(i){i.postMessage||(i=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=i,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(){y.implement(this,v),this.$createWorkerFromOldConfig=function(i,e,t,a,d){if(u.nameToUrl&&!u.toUrl&&(u.toUrl=u.nameToUrl),s.get("packaged")||!u.toUrl)a=a||s.moduleUrl(e,"worker");else{var f=this.$normalizePath;a=a||f(u.toUrl("ace/worker/worker.js",null,"_"));var S={};i.forEach(function($){S[$]=f(u.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=n(a),d&&this.send("importScripts",d),this.$worker.postMessage({init:!0,tlns:S,module:e,classname:t}),this.$worker},this.onMessage=function(i){var e=i.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var t=this.callbacks[e.id];t&&(t(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(i){window.console&&console.error&&console.error(i)},this.$normalizePath=function(i){return p.qualifyURL(i)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(i){i.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(i,e){this.$worker.postMessage({command:i,args:e})},this.call=function(i,e,t){if(t){var a=this.callbackId++;this.callbacks[a]=t,e.push(a)}this.send(i,e)},this.emit=function(i,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:i,data:{data:e.data}})}catch(t){console.error(t.stack)}},this.attachToDocument=function(i){this.$doc&&this.terminate(),this.$doc=i,this.call("setValue",[i.getValue()]),i.on("change",this.changeListener,!0)},this.changeListener=function(i){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),i.action=="insert"?this.deltaQueue.push(i.start,i.lines):this.deltaQueue.push(i.start,i.end)},this.$sendDeltaQueue=function(){var i=this.deltaQueue;i&&(this.deltaQueue=null,i.length>50&&i.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:i}))}}).call(o.prototype);var r=function(i,e,t){var a=null,d=!1,f=Object.create(v),S=[],$=new o({messageBuffer:S,terminate:function(){},postMessage:function(w){S.push(w),a&&(d?setTimeout(C):C())}});$.setEmitSync=function(w){d=w};var C=function(){var w=S.shift();w.command?a[w.command].apply(a,w.args):w.event&&f._signal(w.event,w.data)};return f.postMessage=function(w){$.onMessage({data:w})},f.callback=function(w,M){this.postMessage({type:"call",id:M,data:w})},f.emit=function(w,M){this.postMessage({type:"event",name:w,data:M})},s.loadModule(["worker",e],function(w){for(a=new w[t](f);S.length;)C()}),$};g.UIWorkerClient=r,g.WorkerClient=o,g.createWorker=n}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(u,g,E){var y=u("./range").Range,p=u("./lib/event_emitter").EventEmitter,v=u("./lib/oop"),s=(function(){function c(n,o,r,i,e,t){var a=this;this.length=o,this.session=n,this.doc=n.getDocument(),this.mainClass=e,this.othersClass=t,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange()})},this.$pos=r;var d=n.getUndoManager().$undoStack||n.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=d.length,this.setup(),n.selection.on("changeCursor",this.$onCursorChange)}return c.prototype.setup=function(){var n=this,o=this.doc,r=this.session;this.selectionBefore=r.selection.toJSON(),r.selection.inMultiSelectMode&&r.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=r.addMarker(new y(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var t=o.createAnchor(e.row,e.column);t.$insertRight=!0,t.detach(),n.others.push(t)}),r.setUndoSelect(!1)},c.prototype.showOtherMarkers=function(){if(!this.othersActive){var n=this.session,o=this;this.othersActive=!0,this.others.forEach(function(r){r.markerId=n.addMarker(new y(r.row,r.column,r.row,r.column+o.length),o.othersClass,null,!1)})}},c.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var n=0;n<this.others.length;n++)this.session.removeMarker(this.others[n].markerId)}},c.prototype.onUpdate=function(n){if(this.$updating)return this.updateAnchors(n);var o=n;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var r=n.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,i=o.start.column>=this.pos.column&&o.start.column<=this.pos.column+this.length+1,e=o.start.column-this.pos.column;if(this.updateAnchors(n),i&&(this.length+=r),i&&!this.session.$fromUndo){if(n.action==="insert")for(var t=this.others.length-1;t>=0;t--){var a=this.others[t],d={row:a.row,column:a.column+e};this.doc.insertMergedLines(d,n.lines)}else if(n.action==="remove")for(var t=this.others.length-1;t>=0;t--){var a=this.others[t],d={row:a.row,column:a.column+e};this.doc.remove(new y(d.row,d.column,d.row,d.column-r))}}this.$updating=!1,this.updateMarkers()}},c.prototype.updateAnchors=function(n){this.pos.onChange(n);for(var o=this.others.length;o--;)this.others[o].onChange(n);this.updateMarkers()},c.prototype.updateMarkers=function(){if(!this.$updating){var n=this,o=this.session,r=function(e,t){o.removeMarker(e.markerId),e.markerId=o.addMarker(new y(e.row,e.column,e.row,e.column+n.length),t,null,!1)};r(this.pos,this.mainClass);for(var i=this.others.length;i--;)r(this.others[i],this.othersClass)}},c.prototype.onCursorChange=function(n){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",n)):(this.hideOtherMarkers(),this._emit("cursorLeave",n))}},c.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},c.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var n=this.session.getUndoManager(),o=(n.$undoStack||n.$undostack).length-this.$undoStackDepth,r=0;r<o;r++)n.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},c})();v.implement(s.prototype,p),g.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(u,g,E){var y=u("../lib/event"),p=u("../lib/useragent");function v(c,n){return c.row==n.row&&c.column==n.column}function s(c){var n=c.domEvent,o=n.altKey,r=n.shiftKey,i=n.ctrlKey,e=c.getAccelKey(),t=c.getButton();if(i&&p.isMac&&(t=n.button),c.editor.inMultiSelectMode&&t==2){c.editor.textInput.onContextMenu(c.domEvent);return}if(!i&&!o&&!e){t===0&&c.editor.inMultiSelectMode&&c.editor.exitMultiSelectMode();return}if(t===0){var a=c.editor,d=a.selection,f=a.inMultiSelectMode,S=c.getDocumentPosition(),$=d.getCursor(),C=c.inSelection()||d.isEmpty()&&v(S,$),w=c.x,M=c.y,R=function(F){w=F.clientX,M=F.clientY},T=a.session,k=a.renderer.pixelToScreenCoordinates(w,M),O=k,A;if(a.$mouseHandler.$enableJumpToDef)i&&o||e&&o?A=r?"block":"add":o&&a.$blockSelectEnabled&&(A="block");else if(e&&!o){if(A="add",!f&&r)return}else o&&a.$blockSelectEnabled&&(A="block");if(A&&p.isMac&&n.ctrlKey&&a.$mouseHandler.cancelContextMenu(),A=="add"){if(!f&&C)return;if(!f){var x=d.toOrientedRange();a.addSelectionMarker(x)}var b=d.rangeList.rangeAtPoint(S);a.inVirtualSelectionMode=!0,r&&(b=null,x=d.ranges[0]||x,a.removeSelectionMarker(x)),a.once("mouseup",function(){var F=d.toOrientedRange();b&&F.isEmpty()&&v(b.cursor,F.cursor)?d.substractPoint(F.cursor):(r?d.substractPoint(x.cursor):x&&(a.removeSelectionMarker(x),d.addRange(x)),d.addRange(F)),a.inVirtualSelectionMode=!1})}else if(A=="block"){c.stop(),a.inVirtualSelectionMode=!0;var m,_=[],L=function(){var F=a.renderer.pixelToScreenCoordinates(w,M),U=T.screenToDocumentPosition(F.row,F.column,F.offsetX);v(O,F)&&v(U,d.lead)||(O=F,a.selection.moveToPosition(U),a.renderer.scrollCursorIntoView(),a.removeSelectionMarkers(_),_=d.rectangularRangeBlock(O,k),a.$mouseHandler.$clickSelection&&_.length==1&&_[0].isEmpty()&&(_[0]=a.$mouseHandler.$clickSelection.clone()),_.forEach(a.addSelectionMarker,a),a.updateSelectionMarkers())};f&&!e?d.toSingleRange():!f&&e&&(m=d.toOrientedRange(),a.addSelectionMarker(m)),r?k=T.documentToScreenPosition(d.lead):d.moveToPosition(S),O={row:-1,column:-1};var I=function(F){L(),clearInterval(N),a.removeSelectionMarkers(_),_.length||(_=[d.toOrientedRange()]),m&&(a.removeSelectionMarker(m),d.toSingleRange(m));for(var U=0;U<_.length;U++)d.addRange(_[U]);a.inVirtualSelectionMode=!1,a.$mouseHandler.$clickSelection=null},D=L;y.capture(a.container,R,I);var N=setInterval(function(){D()},20);return c.preventDefault()}}}g.onMouseDown=s}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(u,g,E){g.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(p){p.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(p){p.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(p){p.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(p){p.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(p){p.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(p){p.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(p){p.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(p){p.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(p){p.multiSelect.rangeCount>1?p.multiSelect.joinSelections():p.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(p){p.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(p){p.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(p){p.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],g.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(p){p.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(p){return p&&p.inMultiSelectMode}}];var y=u("../keyboard/hash_handler").HashHandler;g.keyboardHandler=new y(g.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(u,g,E){var y=u("./range_list").RangeList,p=u("./range").Range,v=u("./selection").Selection,s=u("./mouse/multi_select_handler").onMouseDown,c=u("./lib/event"),n=u("./lib/lang"),o=u("./commands/multi_select_commands");g.commands=o.defaultCommands.concat(o.multiSelectCommands);var r=u("./search").Search,i=new r;function e($,C,w){return i.$options.wrap=!0,i.$options.needle=C,i.$options.backwards=w==-1,i.find($)}var t=u("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(t.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,C){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var w=this.toOrientedRange();if(this.rangeList.add(w),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),C||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(w),this.$onAddRange(w)}$.cursor||($.cursor=$.end);var M=this.rangeList.add($);return this.$onAddRange($),M.length&&this.$onRemoveRange(M),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),C||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var C=this.rangeList.removeAll();C.length&&this.$onRemoveRange(C),$&&this.fromOrientedRange($)},this.substractPoint=function($){var C=this.rangeList.substractPoint($);if(C)return this.$onRemoveRange(C),C[0]},this.mergeOverlappingRanges=function(){var $=this.rangeList.merge();$.length&&this.$onRemoveRange($)},this.$onAddRange=function($){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift($),this._signal("addRange",{range:$})},this.$onRemoveRange=function($){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var C=this.rangeList.ranges.pop();$.push(C),this.rangeCount=0}for(var w=$.length;w--;){var M=this.ranges.indexOf($[w]);this.ranges.splice(M,1)}this._signal("removeRange",{ranges:$}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),C=C||this.ranges[0],C&&!C.isEqual(this.getRange())&&this.fromOrientedRange(C)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new y,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],C=[],w=0;w<$.length;w++){var M=$[w],R=M.start.row,T=M.end.row;if(R===T)C.push(M.clone());else{for(C.push(new p(R,M.start.column,R,this.session.getLine(R).length));++R<T;)C.push(this.getLineRange(R,!0));C.push(new p(T,0,T,M.end.column))}w==0&&!this.isBackwards()&&(C=C.reverse())}this.toSingleRange();for(var w=C.length;w--;)this.addRange(C[w])},this.joinSelections=function(){var $=this.rangeList.ranges,C=$[$.length-1],w=p.fromPoints($[0].start,C.end);this.toSingleRange(),this.setSelectionRange(w,C.cursor==C.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,C=$[$.length-1],w=p.fromPoints($[0].start,C.end);this.toSingleRange(),this.setSelectionRange(w,C.cursor==C.start)}else{var M=this.session.documentToScreenPosition(this.cursor),R=this.session.documentToScreenPosition(this.anchor),T=this.rectangularRangeBlock(M,R);T.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,C,w){var M=[],R=$.column<C.column;if(R)var T=$.column,k=C.column,O=$.offsetX,A=C.offsetX;else var T=C.column,k=$.column,O=C.offsetX,A=$.offsetX;var x=$.row<C.row;if(x)var b=$.row,m=C.row;else var b=C.row,m=$.row;T<0&&(T=0),b<0&&(b=0),b==m&&(w=!0);for(var _,L=b;L<=m;L++){var I=p.fromPoints(this.session.screenToDocumentPosition(L,T,O),this.session.screenToDocumentPosition(L,k,A));if(I.isEmpty()){if(_&&d(I.end,_))break;_=I.end}I.cursor=R?I.start:I.end,M.push(I)}if(x&&M.reverse(),!w){for(var D=M.length-1;M[D].isEmpty()&&D>0;)D--;if(D>0)for(var N=0;M[N].isEmpty();)N++;for(var F=D;F>=N;F--)M[F].isEmpty()&&M.splice(F,1)}return M}}).call(v.prototype);var a=u("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var C=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",C),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var C=this.session.$selectionMarkers.indexOf($);C!=-1&&this.session.$selectionMarkers.splice(C,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var C=this.session.$selectionMarkers,w=$.length;w--;){var M=$[w];if(M.marker){this.session.removeMarker(M.marker);var R=C.indexOf(M);R!=-1&&C.splice(R,1)}}this.session.selectionMarkerCount=C.length},this.$onAddRange=function($){this.addSelectionMarker($.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function($){this.removeSelectionMarkers($.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function($){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($){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($){var C=$.command,w=$.editor;if(w.multiSelect){if(C.multiSelectAction)C.multiSelectAction=="forEach"?M=w.forEachSelection(C,$.args):C.multiSelectAction=="forEachLine"?M=w.forEachSelection(C,$.args,!0):C.multiSelectAction=="single"?(w.exitMultiSelectMode(),M=C.exec(w,$.args||{})):M=C.multiSelectAction(w,$.args||{});else{var M=C.exec(w,$.args||{});w.multiSelect.addRange(w.multiSelect.toOrientedRange()),w.multiSelect.mergeOverlappingRanges()}return M}},this.forEachSelection=function($,C,w){if(!this.inVirtualSelectionMode){var M=w&&w.keepOrder,R=w==!0||w&&w.$byLines,T=this.session,k=this.selection,O=k.rangeList,A=(M?k:O).ranges,x;if(!A.length)return $.exec?$.exec(this,C||{}):$(this,C||{});var b=k._eventRegistry;k._eventRegistry={};var m=new v(T);this.inVirtualSelectionMode=!0;for(var _=A.length;_--;){if(R)for(;_>0&&A[_].start.row==A[_-1].end.row;)_--;m.fromOrientedRange(A[_]),m.index=_,this.selection=T.selection=m;var L=$.exec?$.exec(this,C||{}):$(this,C||{});!x&&L!==void 0&&(x=L),m.toOrientedRange(A[_])}m.detach(),this.selection=T.selection=k,this.inVirtualSelectionMode=!1,k._eventRegistry=b,k.mergeOverlappingRanges(),k.ranges[0]&&k.fromOrientedRange(k.ranges[0]);var I=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),I&&I.from==I.to&&this.renderer.animateScrolling(I.from),x}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var C=this.multiSelect.rangeList.ranges,w=[],M=0;M<C.length;M++)w.push(this.session.getTextRange(C[M]));var R=this.session.getDocument().getNewLineCharacter();$=w.join(R),$.length==(w.length-1)*R.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,C){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var w=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&C==this.multiSelect.anchor)return;var M=C==this.multiSelect.anchor?w.cursor==w.start?w.end:w.start:w.cursor;M.row!=C.row||this.session.$clipPositionToDocument(M.row,M.column).column!=C.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,C,w){if(C=C||{},C.needle=$||C.needle,C.needle==null){var M=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();C.needle=this.session.getTextRange(M)}this.$search.set(C);var R=this.$search.findAll(this.session);if(!R.length)return 0;var T=this.multiSelect;w||T.toSingleRange(R[0]);for(var k=R.length;k--;)T.addRange(R[k],!0);return M&&T.rangeList.rangeAtPoint(M.start)&&T.addRange(M,!0),R.length},this.selectMoreLines=function($,C){var w=this.selection.toOrientedRange(),M=w.cursor==w.end,R=this.session.documentToScreenPosition(w.cursor);this.selection.$desiredColumn&&(R.column=this.selection.$desiredColumn);var T=this.session.screenToDocumentPosition(R.row+$,R.column);if(w.isEmpty())var O=T;else var k=this.session.documentToScreenPosition(M?w.end:w.start),O=this.session.screenToDocumentPosition(k.row+$,k.column);if(M){var A=p.fromPoints(T,O);A.cursor=A.start}else{var A=p.fromPoints(O,T);A.cursor=A.end}if(A.desiredColumn=R.column,!this.selection.inMultiSelectMode)this.selection.addRange(w);else if(C)var x=w.cursor;this.selection.addRange(A),x&&this.selection.substractPoint(x)},this.transposeSelections=function($){for(var C=this.session,w=C.multiSelect,M=w.ranges,R=M.length;R--;){var T=M[R];if(T.isEmpty()){var k=C.getWordRange(T.start.row,T.start.column);T.start.row=k.start.row,T.start.column=k.start.column,T.end.row=k.end.row,T.end.column=k.end.column}}w.mergeOverlappingRanges();for(var O=[],R=M.length;R--;){var T=M[R];O.unshift(C.getTextRange(T))}$<0?O.unshift(O.pop()):O.push(O.shift());for(var R=M.length;R--;){var T=M[R],A=T.clone();C.replace(T,O[R]),T.start.row=A.start.row,T.start.column=A.start.column}w.fromOrientedRange(w.ranges[0])},this.selectMore=function($,C,w){var M=this.session,R=M.multiSelect,T=R.toOrientedRange();if(!(T.isEmpty()&&(T=M.getWordRange(T.start.row,T.start.column),T.cursor=$==-1?T.start:T.end,this.multiSelect.addRange(T),w))){var k=M.getTextRange(T),O=e(M,k,$);O&&(O.cursor=$==-1?O.start:O.end,this.session.unfold(O),this.multiSelect.addRange(O),this.renderer.scrollCursorIntoView(null,.5)),C&&this.multiSelect.substractPoint(T.cursor)}},this.alignCursors=function(){var $=this.session,C=$.multiSelect,w=C.ranges,M=-1,R=w.filter(function(D){if(D.cursor.row==M)return!0;M=D.cursor.row});if(!w.length||R.length==w.length-1){var T=this.selection.getRange(),k=T.start.row,O=T.end.row,A=k==O;if(A){var x=this.session.getLength(),b;do b=this.session.getLine(O);while(/[=:]/.test(b)&&++O<x);do b=this.session.getLine(k);while(/[=:]/.test(b)&&--k>0);k<0&&(k=0),O>=x&&(O=x-1)}var m=this.session.removeFullLines(k,O);m=this.$reAlignText(m,A),this.session.insert({row:k,column:0},m.join(`
948
+ `)+`
949
+ `),A||(T.start.column=0,T.end.column=m[m.length-1].length),this.selection.setRange(T)}else{R.forEach(function(D){C.substractPoint(D.cursor)});var _=0,L=1/0,I=w.map(function(D){var N=D.cursor,F=$.getLine(N.row),U=F.substr(N.column).search(/\S/g);return U==-1&&(U=0),N.column>_&&(_=N.column),U<L&&(L=U),U});w.forEach(function(D,N){var F=D.cursor,U=_-F.column,W=I[N]-L;U>W?$.insert(F,n.stringRepeat(" ",U-W)):$.remove(new p(F.row,F.column,F.row,F.column-U+W)),D.start.column=D.end.column=_,D.start.row=D.end.row=F.row,D.cursor=D.end}),C.fromOrientedRange(w[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,C){var w=!0,M=!0,R,T,k;return $.map(function(m){var _=m.match(/(\s*)(.*?)(\s*)([=:].*)/);return _?R==null?(R=_[1].length,T=_[2].length,k=_[3].length,_):(R+T+k!=_[1].length+_[2].length+_[3].length&&(M=!1),R!=_[1].length&&(w=!1),R>_[1].length&&(R=_[1].length),T<_[2].length&&(T=_[2].length),k>_[3].length&&(k=_[3].length),_):[m]}).map(C?A:w?M?x:A:b);function O(m){return n.stringRepeat(" ",m)}function A(m){return m[2]?O(R)+m[2]+O(T-m[2].length+k)+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}function x(m){return m[2]?O(R+T-m[2].length)+m[2]+O(k)+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}function b(m){return m[2]?O(R)+m[2]+O(k)+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}}}).call(a.prototype);function d($,C){return $.row==C.row&&$.column==C.column}g.onSessionChange=function($){var C=$.session;C&&!C.multiSelect&&(C.$selectionMarkers=[],C.selection.$initRangeList(),C.multiSelect=C.selection),this.multiSelect=C&&C.multiSelect;var w=$.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)),C&&(C.multiSelect.on("addRange",this.$onAddRange),C.multiSelect.on("removeRange",this.$onRemoveRange),C.multiSelect.on("multiSelect",this.$onMultiSelect),C.multiSelect.on("singleSelect",this.$onSingleSelect),C.multiSelect.lead.on("change",this.$checkMultiselectChange),C.multiSelect.anchor.on("change",this.$checkMultiselectChange)),C&&this.inMultiSelectMode!=C.selection.inMultiSelectMode&&(C.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function f($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=g.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",s),$.commands.addCommands(o.defaultCommands),S($))}function S($){if(!$.textInput)return;var C=$.textInput.getElement(),w=!1;c.addListener(C,"keydown",function(R){var T=R.keyCode==18&&!(R.ctrlKey||R.shiftKey||R.metaKey);$.$blockSelectEnabled&&T?w||($.renderer.setMouseCursor("crosshair"),w=!0):w&&M()},$),c.addListener(C,"keyup",M,$),c.addListener(C,"blur",M,$);function M(R){w&&($.renderer.setMouseCursor(""),w=!1)}}g.MultiSelect=f,u("./config").defineOptions(a.prototype,"editor",{enableMultiselect:{set:function($){f(this),$?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function($){this.$blockSelectEnabled=$},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(u,g,E){var y=u("../../range").Range,p=g.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(v,s,c){var n=v.getLine(c);return this.foldingStartMarker.test(n)?"start":s=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(v,s,c){return null},this.indentationBlock=function(v,s,c){var n=/\S/,o=v.getLine(s),r=o.search(n);if(r!=-1){for(var i=c||o.length,e=v.getLength(),t=s,a=s;++s<e;){var d=v.getLine(s).search(n);if(d!=-1){if(d<=r){var f=v.getTokenAt(s,0);if(!f||f.type!=="string")break}a=s}}if(a>t){var S=v.getLine(a).length;return new y(t,i,a,S)}}},this.openingBracketBlock=function(v,s,c,n,o){var r={row:c,column:n+1},i=v.$findClosingBracket(s,r,o);if(i){var e=v.foldWidgets[i.row];return e==null&&(e=v.getFoldWidget(i.row)),e=="start"&&i.row>r.row&&(i.row--,i.column=v.getLine(i.row).length),y.fromPoints(r,i)}},this.closingBracketBlock=function(v,s,c,n,o){var r={row:c,column:n},i=v.$findOpeningBracket(s,r);if(i)return i.column++,r.column--,y.fromPoints(i,r)}}).call(p.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(u,g,E){var y=u("../lib/dom"),p=u("../range").Range,v=u("../config").nls;function s(n,o,r){for(var i=0,e=n.length-1;i<=e;){var t=i+e>>1,a=r(o,n[t]);if(a>0)i=t+1;else if(a<0)e=t-1;else return t}return-(i+1)}function c(n,o,r){var i=n.getAnnotations().sort(p.comparePoints);if(i.length){var e=s(i,{row:o,column:-1},p.comparePoints);e<0&&(e=-e-1),e>=i.length?e=r>0?0:i.length-1:e===0&&r<0&&(e=i.length-1);var t=i[e];if(!(!t||!r)){if(t.row===o){do t=i[e+=r];while(t&&t.row===o);if(!t)return i.slice()}var a=[];o=t.row;do a[r<0?"unshift":"push"](t),t=i[e+=r];while(t&&t.row==o);return a.length&&a}}}g.showErrorMarker=function(n,o){var r=n.session,i=n.getCursorPosition(),e=i.row,t=r.widgetManager.getWidgetsAtRow(e).filter(function(R){return R.type=="errorMarker"})[0];t?t.destroy():e-=o;var a=c(r,e,o),d;if(a){var f=a[0];i.column=(f.pos&&typeof f.column!="number"?f.pos.sc:f.column)||0,i.row=f.row,d=n.renderer.$gutterLayer.$annotations[i.row]}else{if(t)return;d={displayText:[v("error-marker.good-state","Looks good!")],className:"ace_ok"}}n.session.unfold(i.row),n.selection.moveToPosition(i);var S={row:i.row,fixedWidth:!0,coverGutter:!0,el:y.createElement("div"),type:"errorMarker"},$=S.el.appendChild(y.createElement("div")),C=S.el.appendChild(y.createElement("div"));C.className="error_widget_arrow "+d.className;var w=n.renderer.$cursorLayer.getPixelPosition(i).left;C.style.left=w+n.renderer.gutterWidth-5+"px",S.el.className="error_widget_wrapper",$.className="error_widget "+d.className,d.displayText.forEach(function(R,T){$.appendChild(y.createTextNode(R)),T<d.displayText.length-1&&$.appendChild(y.createElement("br"))}),$.appendChild(y.createElement("div"));var M=function(R,T,k){if(T===0&&(k==="esc"||k==="return"))return S.destroy(),{command:"null"}};S.destroy=function(){n.$mouseHandler.isMousePressed||(n.keyBinding.removeKeyboardHandler(M),r.widgetManager.removeLineWidget(S),n.off("changeSelection",S.destroy),n.off("changeSession",S.destroy),n.off("mouseup",S.destroy),n.off("change",S.destroy))},n.keyBinding.addKeyboardHandler(M),n.on("changeSelection",S.destroy),n.on("changeSession",S.destroy),n.on("mouseup",S.destroy),n.on("change",S.destroy),n.session.widgetManager.addLineWidget(S),S.el.onmousedown=n.focus.bind(n),n.renderer.scrollCursorIntoView(null,.5,{bottom:S.el.offsetHeight})},y.importCssString(`
950
+ .error_widget_wrapper {
951
+ background: inherit;
952
+ color: inherit;
953
+ border:none
954
+ }
955
+ .error_widget {
956
+ border-top: solid 2px;
957
+ border-bottom: solid 2px;
958
+ margin: 5px 0;
959
+ padding: 10px 40px;
960
+ white-space: pre-wrap;
961
+ }
962
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
963
+ border-color: #ff5a5a
964
+ }
965
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
966
+ border-color: #F1D817
967
+ }
968
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
969
+ border-color: #5a5a5a
970
+ }
971
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
972
+ border-color: #5aaa5a
973
+ }
974
+ .error_widget_arrow {
975
+ position: absolute;
976
+ border: solid 5px;
977
+ border-top-color: transparent!important;
978
+ border-right-color: transparent!important;
979
+ border-left-color: transparent!important;
980
+ top: -5px;
981
+ }
982
+ `,"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(u,g,E){u("./loader_build")(g);var y=u("./lib/dom"),p=u("./range").Range,v=u("./editor").Editor,s=u("./edit_session").EditSession,c=u("./undomanager").UndoManager,n=u("./virtual_renderer").VirtualRenderer;u("./worker/worker_client"),u("./keyboard/hash_handler"),u("./placeholder"),u("./multi_select"),u("./mode/folding/fold_mode"),u("./theme/textmate"),u("./ext/error_marker"),g.config=u("./config"),g.edit=function(r,i){if(typeof r=="string"){var e=r;if(r=document.getElementById(e),!r)throw new Error("ace.edit can't find div #"+e)}if(r&&r.env&&r.env.editor instanceof v)return r.env.editor;var t="";if(r&&/input|textarea/i.test(r.tagName)){var a=r;t=a.value,r=y.createElement("pre"),a.parentNode.replaceChild(r,a)}else r&&(t=r.textContent,r.innerHTML="");var d=g.createEditSession(t),f=new v(new n(r),d,i),S={document:d,editor:f,onResize:f.resize.bind(f,null)};return a&&(S.textarea=a),f.on("destroy",function(){S.editor.container.env=null}),f.container.env=f.env=S,f},g.createEditSession=function(r,i){var e=new s(r,i);return e.setUndoManager(new c),e},g.Range=p,g.Editor=v,g.EditSession=s,g.UndoManager=c,g.VirtualRenderer=n;var o=g.config.version;g.version=o}),(function(){ace.require(["ace/ace"],function(u){u&&(u.config.init(!0),u.define=ace.define);var g=(function(){return this})();!g&&typeof window<"u"&&(g=window),!g&&typeof self<"u"&&(g=self),g.ace||(g.ace=u);for(var E in u)u.hasOwnProperty(E)&&(g.ace[E]=u[E]);g.ace.default=g.ace,l&&(l.exports=g.ace)})})()})(wt)),wt.exports}var On=In(),bt={exports:{}},ni;function Dn(){return ni||(ni=1,(function(l,h){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(u,g,E){var y=u("../lib/oop"),p=u("./text_highlight_rules").TextHighlightRules,v=g.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};g.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},g.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},g.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var s=g.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},c=g.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},n=g.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},o=g.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},r=g.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},i=g.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},e=g.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},t=g.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},a=function(){var d="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",f="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",S="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",$="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",C=this.$keywords=this.createKeywordMapper({keyword:f,"constant.language":S,"variable.language":$,"support.function":d,"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})*})`,M={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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(R,T,k){k.length&&(k=[]);var O=R[R.length-1];return k.unshift(O,T),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(R,T,k){k.length&&(k=[]);var O=R[R.length-1];return k.unshift(O,T),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(R,T,k){k.length&&(k=[]);var O=R[R.length-1];return k.unshift(O,T),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(R,T,k){k.length&&(k=[]);var O=R[R.length-1];return k.unshift(O,T),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(R,T,k){k.length&&(k=[]);var O=R[R.length-1];return k.unshift(O,T),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},t,{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:/\?(?=.+:)/},r,i,v,s,e,c,n,o,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:C,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(R,T,k){var O=R[2]=="-"||R[2]=="~"?"indentedHeredoc":"heredoc",A=R.split(this.splitRegex);return k.push(O,A[3]),[{type:"constant",value:A[1]},{type:"string",value:A[2]},{type:"support.class",value:A[3]},{type:"string",value:A[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(R,T,k){return R===k[1]?(k.shift(),k.shift(),this.next=k[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(R,T,k){return R===k[1]?(k.shift(),k.shift(),this.next=k[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(R,T){return T[0]==="heredoc"||T[0]==="indentedHeredoc"?T[0]:R}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(R,T,k){return this.next="",R=="}"&&k.length>1&&k[1]!="start"&&(k.shift(),this.next=k.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(R,T,k){return k.length&&R===k[0]?(k.unshift(R,T),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(R,T,k){return k.length&&R===M[k[0]]?(k.shift(),this.next=k.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(R,T,k){return k.length&&R===k[0]?(k.unshift(R,T),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(R,T,k){return k.length&&R===M[k[0]]?(k.shift(),this.next=k.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(R,T,k){return k.length&&R===k[0]?(k.unshift(R,T),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(R,T,k){return k.length&&R===M[k[0]]?(k.shift(),this.next=k.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(R,T,k){return k.length&&R===k[0]?(k.unshift(R,T),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(R,T,k){return k.length&&R===M[k[0]]?(k.shift(),this.next=k.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(R,T,k){return k.length&&R===k[0]?(k.unshift(R,T),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(R,T,k){return k.length&&R[0]===M[k[0]]?(k.shift(),this.next=k.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()};y.inherits(a,p),g.RubyHighlightRules=a}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(u,g,E){var y=u("../range").Range,p=function(){};(function(){this.checkOutdent=function(v,s){return/^\s+$/.test(v)?/^\s*\}/.test(s):!1},this.autoOutdent=function(v,s){var c=v.getLine(s),n=c.match(/^(\s*\})/);if(!n)return 0;var o=n[1].length,r=v.findMatchingBracket({row:s,column:o});if(!r||r.row==s)return 0;var i=this.$getIndent(v.getLine(r.row));v.replace(new y(s,0,s,o-1),i)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(p.prototype),g.MatchingBraceOutdent=p}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(u,g,E){var y=u("../../lib/oop"),p=u("./fold_mode").FoldMode,v=u("../../range").Range,s=u("../../token_iterator").TokenIterator,c=g.FoldMode=function(){};y.inherits(c,p),(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(n,o,r){var i=n.getLine(r),e=this.foldingStartMarker.test(i),t=this.foldingStopMarker.test(i);if(e&&!t){var a=i.match(this.foldingStartMarker);if(a[1]){if((a[1]=="if"||a[1]=="else"||a[1]=="while"||a[1]=="until"||a[1]=="unless")&&(a[1]=="else"&&/^\s*else\s*$/.test(i)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(i)===!1)||a[1]=="when"&&/\sthen\s/.test(i)===!0)return;if(n.getTokenAt(r,a.index+2).type==="keyword")return"start"}else if(!a[3]||n.getTokenAt(r,a.index+1).type==="comment.multiline")return"start"}if(o!="markbeginend"||!t||e&&t)return"";var a=i.match(this.foldingStopMarker);if(a[3]==="end"){if(n.getTokenAt(r,a.index+1).type==="keyword")return"end"}else if(!a[1]||n.getTokenAt(r,a.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(n,o,r){var i=n.doc.getLine(r),e=this.foldingStartMarker.exec(i);if(e)return e[1]||e[3]?this.rubyBlock(n,r,e.index+2):this.openingBracketBlock(n,"{",r,e.index);var e=this.foldingStopMarker.exec(i);if(e)return e[3]==="end"&&n.getTokenAt(r,e.index+1).type==="keyword"?this.rubyBlock(n,r,e.index+1):e[1]==="=end"&&n.getTokenAt(r,e.index+1).type==="comment.multiline"?this.rubyBlock(n,r,e.index+1):this.closingBracketBlock(n,"}",r,e.index+e[0].length)},this.rubyBlock=function(n,A,r,i){var e=new s(n,A,r),t=e.getCurrentToken();if(!(!t||t.type!="keyword"&&t.type!="comment.multiline")){var a=t.value,d=n.getLine(A);switch(t.value){case"if":case"unless":case"while":case"until":var f=new RegExp("^\\s*"+t.value);if(!f.test(d))return;var S=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(d))return;case"elsif":case"rescue":case"ensure":var S=1;break;case"else":var f=new RegExp("^\\s*"+t.value+"\\s*$");if(!f.test(d))return;var S=1;break;default:var S=this.indentKeywords[a]}var $=[a];if(S){var C=S===-1?n.getLine(A-1).length:n.getLine(A).length,w=A,M=[];if(M.push(e.getCurrentTokenRange()),e.step=S===-1?e.stepBackward:e.stepForward,t.type=="comment.multiline"){for(;t=e.step();)if(t.type==="comment.multiline"){if(S==1){if(C=6,t.value=="=end")break}else if(t.value=="=begin")break}}else for(;t=e.step();){var R=!1;if(t.type==="keyword"){var T=S*this.indentKeywords[t.value];switch(d=n.getLine(e.getCurrentTokenRow()),t.value){case"do":for(var k=e.$tokenIndex-1;k>=0;k--){var O=e.$rowTokens[k];if(O&&(O.value=="while"||O.value=="until"||O.value=="for")){T=0;break}}break;case"else":var f=new RegExp("^\\s*"+t.value+"\\s*$");(!f.test(d)||a=="case")&&(T=0,R=!0);break;case"if":case"unless":case"while":case"until":var f=new RegExp("^\\s*"+t.value);f.test(d)||(T=0,R=!0);break;case"when":(/\sthen\s/.test(d)||a=="case")&&(T=0,R=!0)}if(T>0)$.unshift(t.value);else if(T<=0&&R===!1){if($.shift(),!$.length&&((a=="while"||a=="until"||a=="for")&&t.value!="do"||t.value=="do"&&S==-1&&T!=0||t.value!="do"))break;T===0&&$.unshift(t.value)}}}if(!t)return null;if(i)return M.push(e.getCurrentTokenRange()),M;var A=e.getCurrentTokenRow();if(S===-1){if(t.type==="comment.multiline")var x=6;else var x=n.getLine(A).length;return new v(A,x,w-1,C)}return new v(w,C,A-1,n.getLine(A-1).length)}}}}).call(c.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(u,g,E){var y=u("../lib/oop"),p=u("./text").Mode,v=u("./ruby_highlight_rules").RubyHighlightRules,s=u("./matching_brace_outdent").MatchingBraceOutdent,c=u("../range").Range,n=u("./folding/ruby").FoldMode,o=function(){this.HighlightRules=v,this.$outdent=new s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new n,this.indentKeywords=this.foldingRules.indentKeywords};y.inherits(o,p),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(r,i,e){var t=this.$getIndent(i),a=this.getTokenizer().getLineTokens(i,r),d=a.tokens;if(d.length&&d[d.length-1].type=="comment")return t;if(r=="start"){var f=i.match(/^.*[\{\(\[]\s*$/),S=i.match(/^\s*(class|def|module)\s.*$/),$=i.match(/.*do(\s*|\s+\|.*\|\s*)$/),C=i.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(f||S||$||C)&&(t+=e)}return t},this.checkOutdent=function(r,i,e){return/^\s+(end|else|rescue|ensure)$/.test(i+e)||this.$outdent.checkOutdent(i,e)},this.autoOutdent=function(r,i,e){var t=i.getLine(e);if(/}/.test(t))return this.$outdent.autoOutdent(i,e);var a=this.$getIndent(t),d=i.getLine(e-1),f=this.$getIndent(d),S=i.getTabString();f.length<=a.length&&a.slice(-S.length)==S&&i.remove(new c(e,a.length-S.length,e,a.length))},this.getMatching=function(r,i,e){if(i==null){var t=r.selection.lead;e=t.column,i=t.row}var a=r.getTokenAt(i,e);if(a&&a.value in this.indentKeywords)return this.foldingRules.rubyBlock(r,i,e,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(o.prototype),g.Mode=o}),(function(){ace.require(["ace/mode/ruby"],function(u){l&&(l.exports=u)})})()})(bt)),bt.exports}Dn();var Ct={exports:{}},ri;function Nn(){return ri||(ri=1,(function(l,h){ace.define("ace/theme/twilight-css",["require","exports","module"],function(u,g,E){E.exports=`.ace-twilight .ace_gutter {
983
+ background: #232323;
984
+ color: #E2E2E2
985
+ }
986
+
987
+ .ace-twilight .ace_print-margin {
988
+ width: 1px;
989
+ background: #232323
990
+ }
991
+
992
+ .ace-twilight {
993
+ background-color: #141414;
994
+ color: #F8F8F8
995
+ }
996
+
997
+ .ace-twilight .ace_cursor {
998
+ color: #A7A7A7
999
+ }
1000
+
1001
+ .ace-twilight .ace_marker-layer .ace_selection {
1002
+ background: rgba(221, 240, 255, 0.20)
1003
+ }
1004
+
1005
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
1006
+ box-shadow: 0 0 3px 0px #141414;
1007
+ }
1008
+
1009
+ .ace-twilight .ace_marker-layer .ace_step {
1010
+ background: rgb(102, 82, 0)
1011
+ }
1012
+
1013
+ .ace-twilight .ace_marker-layer .ace_bracket {
1014
+ margin: -1px 0 0 -1px;
1015
+ border: 1px solid rgba(255, 255, 255, 0.25)
1016
+ }
1017
+
1018
+ .ace-twilight .ace_marker-layer .ace_active-line {
1019
+ background: rgba(255, 255, 255, 0.031)
1020
+ }
1021
+
1022
+ .ace-twilight .ace_gutter-active-line {
1023
+ background-color: rgba(255, 255, 255, 0.031)
1024
+ }
1025
+
1026
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1027
+ border: 1px solid rgba(221, 240, 255, 0.20)
1028
+ }
1029
+
1030
+ .ace-twilight .ace_invisible {
1031
+ color: rgba(255, 255, 255, 0.25)
1032
+ }
1033
+
1034
+ .ace-twilight .ace_keyword,
1035
+ .ace-twilight .ace_meta {
1036
+ color: #CDA869
1037
+ }
1038
+
1039
+ .ace-twilight .ace_constant,
1040
+ .ace-twilight .ace_constant.ace_character,
1041
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1042
+ .ace-twilight .ace_constant.ace_other,
1043
+ .ace-twilight .ace_heading,
1044
+ .ace-twilight .ace_markup.ace_heading,
1045
+ .ace-twilight .ace_support.ace_constant {
1046
+ color: #CF6A4C
1047
+ }
1048
+
1049
+ .ace-twilight .ace_invalid.ace_illegal {
1050
+ color: #F8F8F8;
1051
+ background-color: rgba(86, 45, 86, 0.75)
1052
+ }
1053
+
1054
+ .ace-twilight .ace_invalid.ace_deprecated {
1055
+ text-decoration: underline;
1056
+ font-style: italic;
1057
+ color: #D2A8A1
1058
+ }
1059
+
1060
+ .ace-twilight .ace_support {
1061
+ color: #9B859D
1062
+ }
1063
+
1064
+ .ace-twilight .ace_fold {
1065
+ background-color: #AC885B;
1066
+ border-color: #F8F8F8
1067
+ }
1068
+
1069
+ .ace-twilight .ace_support.ace_function {
1070
+ color: #DAD085
1071
+ }
1072
+
1073
+ .ace-twilight .ace_list,
1074
+ .ace-twilight .ace_markup.ace_list,
1075
+ .ace-twilight .ace_storage {
1076
+ color: #F9EE98
1077
+ }
1078
+
1079
+ .ace-twilight .ace_entity.ace_name.ace_function,
1080
+ .ace-twilight .ace_meta.ace_tag {
1081
+ color: #AC885B
1082
+ }
1083
+
1084
+ .ace-twilight .ace_string {
1085
+ color: #8F9D6A
1086
+ }
1087
+
1088
+ .ace-twilight .ace_string.ace_regexp {
1089
+ color: #E9C062
1090
+ }
1091
+
1092
+ .ace-twilight .ace_comment {
1093
+ font-style: italic;
1094
+ color: #5F5A60
1095
+ }
1096
+
1097
+ .ace-twilight .ace_variable {
1098
+ color: #7587A6
1099
+ }
1100
+
1101
+ .ace-twilight .ace_xml-pe {
1102
+ color: #494949
1103
+ }
1104
+
1105
+ .ace-twilight .ace_indent-guide {
1106
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1107
+ }
1108
+
1109
+ .ace-twilight .ace_indent-guide-active {
1110
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1111
+ }
1112
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(u,g,E){g.isDark=!0,g.cssClass="ace-twilight",g.cssText=u("./twilight-css");var y=u("../lib/dom");y.importCssString(g.cssText,g.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(u){l&&(l.exports=u)})})()})(Ct)),Ct.exports}Nn();function oi(l,h){return function(){return l.apply(h,arguments)}}const{toString:Fn}=Object.prototype,{getPrototypeOf:Me}=Object,{iterator:We,toStringTag:si}=Symbol,tt=(({hasOwnProperty:l})=>(h,u)=>l.call(h,u))(Object.prototype),Pe=(l,h)=>{let u=l;const g=[];for(;u!=null&&u!==Object.prototype;){if(g.indexOf(u)!==-1)return!1;if(g.push(u),tt(u,h))return!0;u=Me(u)}return!1},Wn=(l,h)=>l!=null&&Pe(l,h)?l[h]:void 0,St=(l=>h=>{const u=Fn.call(h);return l[u]||(l[u]=u.slice(8,-1).toLowerCase())})(Object.create(null)),we=l=>(l=l.toLowerCase(),h=>St(h)===l),it=l=>h=>typeof h===l,{isArray:$e}=Array,Te=it("undefined");function Le(l){return l!==null&&!Te(l)&&l.constructor!==null&&!Te(l.constructor)&&ve(l.constructor.isBuffer)&&l.constructor.isBuffer(l)}const ai=we("ArrayBuffer");function Pn(l){let h;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?h=ArrayBuffer.isView(l):h=l&&l.buffer&&ai(l.buffer),h}const Bn=it("string"),ve=it("function"),li=it("number"),Re=l=>l!==null&&typeof l=="object",zn=l=>l===!0||l===!1,nt=l=>{if(!Re(l))return!1;const h=Me(l);return(h===null||h===Object.prototype||Me(h)===null)&&!Pe(l,si)&&!Pe(l,We)},Hn=l=>{if(!Re(l)||Le(l))return!1;try{return Object.keys(l).length===0&&Object.getPrototypeOf(l)===Object.prototype}catch{return!1}},Un=we("Date"),Vn=we("File"),jn=l=>!!(l&&typeof l.uri<"u"),Gn=l=>l&&typeof l.getParts<"u",Kn=we("Blob"),Yn=we("FileList"),Qn=l=>Re(l)&&ve(l.pipe);function Zn(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ci=Zn(),ui=typeof ci.FormData<"u"?ci.FormData:void 0,Xn=l=>{if(!l)return!1;if(ui&&l instanceof ui)return!0;const h=Me(l);if(!h||h===Object.prototype||!ve(l.append))return!1;const u=St(l);return u==="formdata"||u==="object"&&ve(l.toString)&&l.toString()==="[object FormData]"},Jn=we("URLSearchParams"),[qn,er,tr,ir]=["ReadableStream","Request","Response","Headers"].map(we),nr=l=>l.trim?l.trim():l.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Be(l,h,{allOwnKeys:u=!1}={}){if(l===null||typeof l>"u")return;let g,E;if(typeof l!="object"&&(l=[l]),$e(l))for(g=0,E=l.length;g<E;g++)h.call(null,l[g],g,l);else{if(Le(l))return;const y=u?Object.getOwnPropertyNames(l):Object.keys(l),p=y.length;let v;for(g=0;g<p;g++)v=y[g],h.call(null,l[v],v,l)}}function hi(l,h){if(Le(l))return null;h=h.toLowerCase();const u=Object.keys(l);let g=u.length,E;for(;g-- >0;)if(E=u[g],h===E.toLowerCase())return E;return null}const _e=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,di=l=>!Te(l)&&l!==_e;function $t(...l){const{caseless:h,skipUndefined:u}=di(this)&&this||{},g={},E=(y,p)=>{if(p==="__proto__"||p==="constructor"||p==="prototype")return;const v=h&&typeof p=="string"&&hi(g,p)||p,s=tt(g,v)?g[v]:void 0;nt(s)&&nt(y)?g[v]=$t(s,y):nt(y)?g[v]=$t({},y):$e(y)?g[v]=y.slice():(!u||!Te(y))&&(g[v]=y)};for(let y=0,p=l.length;y<p;y++){const v=l[y];if(!v||Le(v)||(Be(v,E),typeof v!="object"||$e(v)))continue;const s=Object.getOwnPropertySymbols(v);for(let c=0;c<s.length;c++){const n=s[c];pr.call(v,n)&&E(v[n],n)}}return g}const rr=(l,h,u,{allOwnKeys:g}={})=>(Be(h,(E,y)=>{u&&ve(E)?Object.defineProperty(l,y,{__proto__:null,value:oi(E,u),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(l,y,{__proto__:null,value:E,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:g}),l),or=l=>(l.charCodeAt(0)===65279&&(l=l.slice(1)),l),sr=(l,h,u,g)=>{l.prototype=Object.create(h.prototype,g),Object.defineProperty(l.prototype,"constructor",{__proto__:null,value:l,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(l,"super",{__proto__:null,value:h.prototype}),u&&Object.assign(l.prototype,u)},ar=(l,h,u,g)=>{let E,y,p;const v={};if(h=h||{},l==null)return h;do{for(E=Object.getOwnPropertyNames(l),y=E.length;y-- >0;)p=E[y],(!g||g(p,l,h))&&!v[p]&&(h[p]=l[p],v[p]=!0);l=u!==!1&&Me(l)}while(l&&(!u||u(l,h))&&l!==Object.prototype);return h},lr=(l,h,u)=>{l=String(l),(u===void 0||u>l.length)&&(u=l.length),u-=h.length;const g=l.indexOf(h,u);return g!==-1&&g===u},cr=l=>{if(!l)return null;if($e(l))return l;let h=l.length;if(!li(h))return null;const u=new Array(h);for(;h-- >0;)u[h]=l[h];return u},ur=(l=>h=>l&&h instanceof l)(typeof Uint8Array<"u"&&Me(Uint8Array)),hr=(l,h)=>{const u=(l&&l[We]).call(l);let g;for(;(g=u.next())&&!g.done;){const E=g.value;h.call(l,E[0],E[1])}},dr=(l,h)=>{let u;const g=[];for(;(u=l.exec(h))!==null;)g.push(u);return g},fr=we("HTMLFormElement"),gr=l=>l.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(h,u,g){return u.toUpperCase()+g}),{propertyIsEnumerable:pr}=Object.prototype,mr=we("RegExp"),fi=(l,h)=>{const u=Object.getOwnPropertyDescriptors(l),g={};Be(u,(E,y)=>{let p;(p=h(E,y,l))!==!1&&(g[y]=p||E)}),Object.defineProperties(l,g)},vr=l=>{fi(l,(h,u)=>{if(ve(l)&&["arguments","caller","callee"].includes(u))return!1;const g=l[u];if(ve(g)){if(h.enumerable=!1,"writable"in h){h.writable=!1;return}h.set||(h.set=()=>{throw Error("Can not rewrite read-only method '"+u+"'")})}})},yr=(l,h)=>{const u={},g=E=>{E.forEach(y=>{u[y]=!0})};return $e(l)?g(l):g(String(l).split(h)),u},wr=()=>{},br=(l,h)=>l!=null&&Number.isFinite(l=+l)?l:h;function Cr(l){return!!(l&&ve(l.append)&&l[si]==="FormData"&&l[We])}const Sr=l=>{const h=new WeakSet,u=g=>{if(Re(g)){if(h.has(g))return;if(Le(g))return g;if(!("toJSON"in g)){h.add(g);const E=$e(g)?[]:{};return Be(g,(y,p)=>{const v=u(y);!Te(v)&&(E[p]=v)}),h.delete(g),E}}return g};return u(l)},$r=we("AsyncFunction"),_r=l=>l&&(Re(l)||ve(l))&&ve(l.then)&&ve(l.catch),gi=((l,h)=>l?setImmediate:h?((u,g)=>(_e.addEventListener("message",({source:E,data:y})=>{E===_e&&y===u&&g.length&&g.shift()()},!1),E=>{g.push(E),_e.postMessage(u,"*")}))(`axios@${Math.random()}`,[]):u=>setTimeout(u))(typeof setImmediate=="function",ve(_e.postMessage)),xr=typeof queueMicrotask<"u"?queueMicrotask.bind(_e):typeof process<"u"&&process.nextTick||gi,pi=l=>l!=null&&ve(l[We]),Ar=l=>l!=null&&Pe(l,We)&&pi(l),P={isArray:$e,isArrayBuffer:ai,isBuffer:Le,isFormData:Xn,isArrayBufferView:Pn,isString:Bn,isNumber:li,isBoolean:zn,isObject:Re,isPlainObject:nt,isEmptyObject:Hn,isReadableStream:qn,isRequest:er,isResponse:tr,isHeaders:ir,isUndefined:Te,isDate:Un,isFile:Vn,isReactNativeBlob:jn,isReactNative:Gn,isBlob:Kn,isRegExp:mr,isFunction:ve,isStream:Qn,isURLSearchParams:Jn,isTypedArray:ur,isFileList:Yn,forEach:Be,merge:$t,extend:rr,trim:nr,stripBOM:or,inherits:sr,toFlatObject:ar,kindOf:St,kindOfTest:we,endsWith:lr,toArray:cr,forEachEntry:hr,matchAll:dr,isHTMLForm:fr,hasOwnProperty:tt,hasOwnProp:tt,hasOwnInPrototypeChain:Pe,getSafeProp:Wn,reduceDescriptors:fi,freezeMethods:vr,toObjectSet:yr,toCamelCase:gr,noop:wr,toFiniteNumber:br,findKey:hi,global:_e,isContextDefined:di,isSpecCompliantForm:Cr,toJSONObject:Sr,isAsyncFn:$r,isThenable:_r,setImmediate:gi,asap:xr,isIterable:pi,isSafeIterable:Ar},kr=P.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"]),Er=l=>{const h={};let u,g,E;return l&&l.split(`
1113
+ `).forEach(function(y){E=y.indexOf(":"),u=y.substring(0,E).trim().toLowerCase(),g=y.substring(E+1).trim(),!(!u||h[u]&&kr[u])&&(u==="set-cookie"?h[u]?h[u].push(g):h[u]=[g]:h[u]=h[u]?h[u]+", "+g:g)}),h};function Mr(l){let h=0,u=l.length;for(;h<u;){const g=l.charCodeAt(h);if(g!==9&&g!==32)break;h+=1}for(;u>h;){const g=l.charCodeAt(u-1);if(g!==9&&g!==32)break;u-=1}return h===0&&u===l.length?l:l.slice(h,u)}const Tr=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Lr=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function _t(l,h){return P.isArray(l)?l.map(u=>_t(u,h)):Mr(String(l).replace(h,""))}const Rr=l=>_t(l,Tr),Ir=l=>_t(l,Lr);function mi(l){const h=Object.create(null);return P.forEach(l.toJSON(),(u,g)=>{h[g]=Ir(u)}),h}const vi=Symbol("internals");function ze(l){return l&&String(l).trim().toLowerCase()}function rt(l){return l===!1||l==null?l:P.isArray(l)?l.map(rt):Rr(String(l))}function Or(l){const h=Object.create(null),u=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let g;for(;g=u.exec(l);)h[g[1]]=g[2];return h}const Dr=l=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(l.trim());function xt(l,h,u,g,E){if(P.isFunction(g))return g.call(this,h,u);if(E&&(h=u),!!P.isString(h)){if(P.isString(g))return h.indexOf(g)!==-1;if(P.isRegExp(g))return g.test(h)}}function Nr(l){return l.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(h,u,g)=>u.toUpperCase()+g)}function Fr(l,h){const u=P.toCamelCase(" "+h);["get","set","has"].forEach(g=>{Object.defineProperty(l,g+u,{__proto__:null,value:function(E,y,p){return this[g].call(this,h,E,y,p)},configurable:!0})})}let ge=class{constructor(l){l&&this.set(l)}set(l,h,u){const g=this;function E(p,v,s){const c=ze(v);if(!c)return;const n=P.findKey(g,c);(!n||g[n]===void 0||s===!0||s===void 0&&g[n]!==!1)&&(g[n||v]=rt(p))}const y=(p,v)=>P.forEach(p,(s,c)=>E(s,c,v));if(P.isPlainObject(l)||l instanceof this.constructor)y(l,h);else if(P.isString(l)&&(l=l.trim())&&!Dr(l))y(Er(l),h);else if(P.isObject(l)&&P.isSafeIterable(l)){let p=Object.create(null),v,s;for(const c of l){if(!P.isArray(c))throw new TypeError("Object iterator must return a key-value pair");s=c[0],P.hasOwnProp(p,s)?(v=p[s],p[s]=P.isArray(v)?[...v,c[1]]:[v,c[1]]):p[s]=c[1]}y(p,h)}else l!=null&&E(h,l,u);return this}get(l,h){if(l=ze(l),l){const u=P.findKey(this,l);if(u){const g=this[u];if(!h)return g;if(h===!0)return Or(g);if(P.isFunction(h))return h.call(this,g,u);if(P.isRegExp(h))return h.exec(g);throw new TypeError("parser must be boolean|regexp|function")}}}has(l,h){if(l=ze(l),l){const u=P.findKey(this,l);return!!(u&&this[u]!==void 0&&(!h||xt(this,this[u],u,h)))}return!1}delete(l,h){const u=this;let g=!1;function E(y){if(y=ze(y),y){const p=P.findKey(u,y);p&&(!h||xt(u,u[p],p,h))&&(delete u[p],g=!0)}}return P.isArray(l)?l.forEach(E):E(l),g}clear(l){const h=Object.keys(this);let u=h.length,g=!1;for(;u--;){const E=h[u];(!l||xt(this,this[E],E,l,!0))&&(delete this[E],g=!0)}return g}normalize(l){const h=this,u={};return P.forEach(this,(g,E)=>{const y=P.findKey(u,E);if(y){h[y]=rt(g),delete h[E];return}const p=l?Nr(E):String(E).trim();p!==E&&delete h[E],h[p]=rt(g),u[p]=!0}),this}concat(...l){return this.constructor.concat(this,...l)}toJSON(l){const h=Object.create(null);return P.forEach(this,(u,g)=>{u!=null&&u!==!1&&(h[g]=l&&P.isArray(u)?u.join(", "):u)}),h}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([l,h])=>l+": "+h).join(`
1114
+ `)}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,...h){const u=new this(l);return h.forEach(g=>u.set(g)),u}static accessor(l){const h=(this[vi]=this[vi]={accessors:{}}).accessors,u=this.prototype;function g(E){const y=ze(E);h[y]||(Fr(u,E),h[y]=!0)}return P.isArray(l)?l.forEach(g):g(l),this}};ge.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),P.reduceDescriptors(ge.prototype,({value:l},h)=>{let u=h[0].toUpperCase()+h.slice(1);return{get:()=>l,set(g){this[u]=g}}}),P.freezeMethods(ge);const Wr="[REDACTED ****]";function Pr(l){if(P.hasOwnProp(l,"toJSON"))return!0;let h=Object.getPrototypeOf(l);for(;h&&h!==Object.prototype;){if(P.hasOwnProp(h,"toJSON"))return!0;h=Object.getPrototypeOf(h)}return!1}function Br(l,h){const u=new Set(h.map(y=>String(y).toLowerCase())),g=[],E=y=>{if(y===null||typeof y!="object"||P.isBuffer(y))return y;if(g.indexOf(y)!==-1)return;y instanceof ge&&(y=y.toJSON()),g.push(y);let p;if(P.isArray(y))p=[],y.forEach((v,s)=>{const c=E(v);P.isUndefined(c)||(p[s]=c)});else{if(!P.isPlainObject(y)&&Pr(y))return g.pop(),y;p=Object.create(null);for(const[v,s]of Object.entries(y)){const c=u.has(v.toLowerCase())?Wr:E(s);P.isUndefined(c)||(p[v]=c)}}return g.pop(),p};return E(l)}let X=class nn extends Error{static from(h,u,g,E,y,p){const v=new nn(h.message,u||h.code,g,E,y);return Object.defineProperty(v,"cause",{__proto__:null,value:h,writable:!0,enumerable:!1,configurable:!0}),v.name=h.name,h.status!=null&&v.status==null&&(v.status=h.status),p&&Object.assign(v,p),v}constructor(h,u,g,E,y){super(h),Object.defineProperty(this,"message",{__proto__:null,value:h,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,u&&(this.code=u),g&&(this.config=g),E&&(this.request=E),y&&(this.response=y,this.status=y.status)}toJSON(){const h=this.config,u=h&&P.hasOwnProp(h,"redact")?h.redact:void 0,g=P.isArray(u)&&u.length>0?Br(h,u):P.toJSONObject(h);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:g,code:this.code,status:this.status}}};X.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",X.ERR_BAD_OPTION="ERR_BAD_OPTION",X.ECONNABORTED="ECONNABORTED",X.ETIMEDOUT="ETIMEDOUT",X.ECONNREFUSED="ECONNREFUSED",X.ERR_NETWORK="ERR_NETWORK",X.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",X.ERR_DEPRECATED="ERR_DEPRECATED",X.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",X.ERR_BAD_REQUEST="ERR_BAD_REQUEST",X.ERR_CANCELED="ERR_CANCELED",X.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",X.ERR_INVALID_URL="ERR_INVALID_URL",X.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const zr=null,yi=100;function At(l){return P.isPlainObject(l)||P.isArray(l)}function wi(l){return P.endsWith(l,"[]")?l.slice(0,-2):l}function kt(l,h,u){return l?l.concat(h).map(function(g,E){return g=wi(g),!u&&E?"["+g+"]":g}).join(u?".":""):h}function Hr(l){return P.isArray(l)&&!l.some(At)}const Ur=P.toFlatObject(P,{},null,function(l){return/^is[A-Z]/.test(l)});function ot(l,h,u){if(!P.isObject(l))throw new TypeError("target must be an object");h=h||new FormData,u=P.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,f){return!P.isUndefined(f[d])});const g=u.metaTokens,E=u.visitor||e,y=u.dots,p=u.indexes,v=u.Blob||typeof Blob<"u"&&Blob,s=u.maxDepth===void 0?yi:u.maxDepth,c=v&&P.isSpecCompliantForm(h),n=[];if(!P.isFunction(E))throw new TypeError("visitor must be a function");function o(d){if(d===null)return"";if(P.isDate(d))return d.toISOString();if(P.isBoolean(d))return d.toString();if(!c&&P.isBlob(d))throw new X("Blob is not supported. Use a Buffer instead.");if(P.isArrayBuffer(d)||P.isTypedArray(d)){if(c&&typeof v=="function")return new v([d]);if(typeof Buffer<"u")return Buffer.from(d);throw new X("Blob is not supported. Use a Buffer instead.",X.ERR_NOT_SUPPORT)}return d}function r(d){if(d>s)throw new X("Object is too deeply nested ("+d+" levels). Max depth: "+s,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function i(d,f){if(s===1/0)return JSON.stringify(d);const S=[];return JSON.stringify(d,function($,C){if(!P.isObject(C))return C;for(;S.length&&S[S.length-1]!==this;)S.pop();return S.push(C),r(f+S.length-1),C})}function e(d,f,S){let $=d;if(P.isReactNative(h)&&P.isReactNativeBlob(d))return h.append(kt(S,f,y),o(d)),!1;if(d&&!S&&typeof d=="object"){if(P.endsWith(f,"{}"))f=g?f:f.slice(0,-2),d=i(d,1);else if(P.isArray(d)&&Hr(d)||(P.isFileList(d)||P.endsWith(f,"[]"))&&($=P.toArray(d)))return f=wi(f),$.forEach(function(C,w){!(P.isUndefined(C)||C===null)&&h.append(p===!0?kt([f],w,y):p===null?f:f+"[]",o(C))}),!1}return At(d)?!0:(h.append(kt(S,f,y),o(d)),!1)}const t=Object.assign(Ur,{defaultVisitor:e,convertValue:o,isVisitable:At});function a(d,f,S=0){if(!P.isUndefined(d)){if(r(S),n.indexOf(d)!==-1)throw new Error("Circular reference detected in "+f.join("."));n.push(d),P.forEach(d,function($,C){(!(P.isUndefined($)||$===null)&&E.call(h,$,P.isString(C)?C.trim():C,f,t))===!0&&a($,f?f.concat(C):[C],S+1)}),n.pop()}}if(!P.isObject(l))throw new TypeError("data must be an object");return a(l),h}function bi(l){const h={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(l).replace(/[!'()~]|%20/g,function(u){return h[u]})}function Et(l,h){this._pairs=[],l&&ot(l,this,h)}const Ci=Et.prototype;Ci.append=function(l,h){this._pairs.push([l,h])},Ci.toString=function(l){const h=l?u=>l.call(this,u,bi):bi;return this._pairs.map(function(u){return h(u[0])+"="+h(u[1])},"").join("&")};function Vr(l){return encodeURIComponent(l).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Si(l,h,u){if(!h)return l;l=l||"";const g=P.isFunction(u)?{serialize:u}:u,E=P.getSafeProp(g,"encode")||Vr,y=P.getSafeProp(g,"serialize");let p;if(y?p=y(h,g):p=P.isURLSearchParams(h)?h.toString():new Et(h,g).toString(E),p){const v=l.indexOf("#");v!==-1&&(l=l.slice(0,v)),l+=(l.indexOf("?")===-1?"?":"&")+p}return l}class $i{constructor(){this.handlers=[]}use(h,u,g){return this.handlers.push({fulfilled:h,rejected:u,synchronous:g?g.synchronous:!1,runWhen:g?g.runWhen:null}),this.handlers.length-1}eject(h){this.handlers[h]&&(this.handlers[h]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(h){P.forEach(this.handlers,function(u){u!==null&&h(u)})}}const Mt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},jr=typeof URLSearchParams<"u"?URLSearchParams:Et,Gr=typeof FormData<"u"?FormData:null,Kr=typeof Blob<"u"?Blob:null,Yr={isBrowser:!0,classes:{URLSearchParams:jr,FormData:Gr,Blob:Kr},protocols:["http","https","file","blob","url","data"]},Tt=typeof window<"u"&&typeof document<"u",Lt=typeof navigator=="object"&&navigator||void 0,Qr=Tt&&(!Lt||["ReactNative","NativeScript","NS"].indexOf(Lt.product)<0),Zr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Xr=Tt&&window.location.href||"http://localhost",Jr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Tt,hasStandardBrowserEnv:Qr,hasStandardBrowserWebWorkerEnv:Zr,navigator:Lt,origin:Xr},Symbol.toStringTag,{value:"Module"})),de={...Jr,...Yr};function qr(l,h){return ot(l,new de.classes.URLSearchParams,{visitor:function(u,g,E,y){return de.isNode&&P.isBuffer(u)?(this.append(g,u.toString("base64")),!1):y.defaultVisitor.apply(this,arguments)},...h})}const _i=yi;function xi(l){if(l>_i)throw new X("FormData field is too deeply nested ("+l+" levels). Max depth: "+_i,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function eo(l){const h=[],u=/\w+|\[(\w*)]/g;let g;for(;(g=u.exec(l))!==null;)xi(h.length),h.push(g[0]==="[]"?"":g[1]||g[0]);return h}function to(l){const h={},u=Object.keys(l);let g;const E=u.length;let y;for(g=0;g<E;g++)y=u[g],h[y]=l[y];return h}function Ai(l){function h(u,g,E,y){xi(y);let p=u[y++];if(p==="__proto__")return!0;const v=Number.isFinite(+p),s=y>=u.length;return p=!p&&P.isArray(E)?E.length:p,s?(P.hasOwnProp(E,p)?E[p]=P.isArray(E[p])?E[p].concat(g):[E[p],g]:E[p]=g,!v):((!P.hasOwnProp(E,p)||!P.isObject(E[p]))&&(E[p]=[]),h(u,g,E[p],y)&&P.isArray(E[p])&&(E[p]=to(E[p])),!v)}if(P.isFormData(l)&&P.isFunction(l.entries)){const u={};return P.forEachEntry(l,(g,E)=>{h(eo(g),E,u,0)}),u}return null}const Ie=(l,h)=>l!=null&&P.hasOwnProp(l,h)?l[h]:void 0;function io(l,h,u){if(P.isString(l))try{return(h||JSON.parse)(l),P.trim(l)}catch(g){if(g.name!=="SyntaxError")throw g}return(u||JSON.stringify)(l)}const He={transitional:Mt,adapter:["xhr","http","fetch"],transformRequest:[function(l,h){const u=h.getContentType()||"",g=u.indexOf("application/json")>-1,E=P.isObject(l);if(E&&P.isHTMLForm(l)&&(l=new FormData(l)),P.isFormData(l))return g?JSON.stringify(Ai(l)):l;if(P.isArrayBuffer(l)||P.isBuffer(l)||P.isStream(l)||P.isFile(l)||P.isBlob(l)||P.isReadableStream(l))return l;if(P.isArrayBufferView(l))return l.buffer;if(P.isURLSearchParams(l))return h.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),l.toString();let y;if(E){const p=Ie(this,"formSerializer");if(u.indexOf("application/x-www-form-urlencoded")>-1)return qr(l,p).toString();if((y=P.isFileList(l))||u.indexOf("multipart/form-data")>-1){const v=Ie(this,"env"),s=v&&v.FormData;return ot(y?{"files[]":l}:l,s&&new s,p)}}return E||g?(h.setContentType("application/json",!1),io(l)):l}],transformResponse:[function(l){const h=Ie(this,"transitional")||He.transitional,u=h&&h.forcedJSONParsing,g=Ie(this,"responseType"),E=g==="json";if(P.isResponse(l)||P.isReadableStream(l))return l;if(l&&P.isString(l)&&(u&&!g||E)){const y=!(h&&h.silentJSONParsing)&&E;try{return JSON.parse(l,Ie(this,"parseReviver"))}catch(p){if(y)throw p.name==="SyntaxError"?X.from(p,X.ERR_BAD_RESPONSE,this,null,Ie(this,"response")):p}}return l}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:de.classes.FormData,Blob:de.classes.Blob},validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch","query"],l=>{He.headers[l]={}});function Rt(l,h){const u=this||He,g=h||u,E=ge.from(g.headers);let y=g.data;return P.forEach(l,function(p){y=p.call(u,y,E.normalize(),h?h.status:void 0)}),E.normalize(),y}function ki(l){return!!(l&&l.__CANCEL__)}let Ue=class extends X{constructor(l,h,u){super(l??"canceled",X.ERR_CANCELED,h,u),this.name="CanceledError",this.__CANCEL__=!0}};function Ei(l,h,u){const g=u.config.validateStatus;!u.status||!g||g(u.status)?l(u):h(new X("Request failed with status code "+u.status,u.status>=400&&u.status<500?X.ERR_BAD_REQUEST:X.ERR_BAD_RESPONSE,u.config,u.request,u))}function no(l){const h=/^([-+\w]{1,25}):(?:\/\/)?/.exec(l);return h&&h[1]||""}function ro(l,h){l=l||10;const u=new Array(l),g=new Array(l);let E=0,y=0,p;return h=h!==void 0?h:1e3,function(v){const s=Date.now(),c=g[y];p||(p=s),u[E]=v,g[E]=s;let n=y,o=0;for(;n!==E;)o+=u[n++],n=n%l;if(E=(E+1)%l,E===y&&(y=(y+1)%l),s-p<h)return;const r=c&&s-c;return r?Math.round(o*1e3/r):void 0}}function oo(l,h){let u=0,g=1e3/h,E,y;const p=(v,s=Date.now())=>{u=s,E=null,y&&(clearTimeout(y),y=null),l(...v)};return[(...v)=>{const s=Date.now(),c=s-u;c>=g?p(v,s):(E=v,y||(y=setTimeout(()=>{y=null,p(E)},g-c)))},()=>E&&p(E)]}const st=(l,h,u=3)=>{let g=0;const E=ro(50,250);return oo(y=>{if(!y||typeof y.loaded!="number")return;const p=y.loaded,v=y.lengthComputable?y.total:void 0,s=v!=null?Math.min(p,v):p,c=Math.max(0,s-g),n=E(c);g=Math.max(g,s);const o={loaded:s,total:v,progress:v?s/v:void 0,bytes:c,rate:n||void 0,estimated:n&&v?(v-s)/n:void 0,event:y,lengthComputable:v!=null,[h?"download":"upload"]:!0};l(o)},u)},Mi=(l,h)=>{const u=l!=null;return[g=>h[0]({lengthComputable:u,total:l,loaded:g}),h[1]]},Ti=l=>(...h)=>P.asap(()=>l(...h)),so=de.hasStandardBrowserEnv?((l,h)=>u=>(u=new URL(u,de.origin),l.protocol===u.protocol&&l.host===u.host&&(h||l.port===u.port)))(new URL(de.origin),de.navigator&&/(msie|trident)/i.test(de.navigator.userAgent)):()=>!0,ao=de.hasStandardBrowserEnv?{write(l,h,u,g,E,y,p){if(typeof document>"u")return;const v=[`${l}=${encodeURIComponent(h)}`];P.isNumber(u)&&v.push(`expires=${new Date(u).toUTCString()}`),P.isString(g)&&v.push(`path=${g}`),P.isString(E)&&v.push(`domain=${E}`),y===!0&&v.push("secure"),P.isString(p)&&v.push(`SameSite=${p}`),document.cookie=v.join("; ")},read(l){if(typeof document>"u")return null;const h=document.cookie.split(";");for(let u=0;u<h.length;u++){const g=h[u].replace(/^\s+/,""),E=g.indexOf("=");if(E!==-1&&g.slice(0,E)===l)try{return decodeURIComponent(g.slice(E+1))}catch{return g.slice(E+1)}}return null},remove(l){this.write(l,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function lo(l){return typeof l!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(l)}function co(l,h){return h?l.replace(/\/?\/$/,"")+"/"+h.replace(/^\/+/,""):l}const uo=/^https?:(?!\/\/)/i,ho=/[\t\n\r]/g;function fo(l){let h=0;for(;h<l.length&&l.charCodeAt(h)<=32;)h++;return l.slice(h)}function go(l){return fo(l).replace(ho,"")}function Li(l,h){if(typeof l=="string"&&uo.test(go(l)))throw new X('Invalid URL: missing "//" after protocol',X.ERR_INVALID_URL,h)}function Ri(l,h,u,g){Li(h,g);let E=!lo(h);return l&&(E||u===!1)?(Li(l,g),co(l,h)):h}const Ii=l=>l instanceof ge?{...l}:l;function xe(l,h){l=l||{},h=h||{};const u=Object.create(null);Object.defineProperty(u,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function g(n,o,r,i){return P.isPlainObject(n)&&P.isPlainObject(o)?P.merge.call({caseless:i},n,o):P.isPlainObject(o)?P.merge({},o):P.isArray(o)?o.slice():o}function E(n,o,r,i){if(P.isUndefined(o)){if(!P.isUndefined(n))return g(void 0,n,r,i)}else return g(n,o,r,i)}function y(n,o){if(!P.isUndefined(o))return g(void 0,o)}function p(n,o){if(P.isUndefined(o)){if(!P.isUndefined(n))return g(void 0,n)}else return g(void 0,o)}function v(n){const o=P.hasOwnProp(h,"transitional")?h.transitional:void 0;if(!P.isUndefined(o))if(P.isPlainObject(o)){if(P.hasOwnProp(o,n))return o[n]}else return;const r=P.hasOwnProp(l,"transitional")?l.transitional:void 0;if(P.isPlainObject(r)&&P.hasOwnProp(r,n))return r[n]}function s(n,o,r){if(P.hasOwnProp(h,r))return g(n,o);if(P.hasOwnProp(l,r))return g(void 0,n)}const c={url:y,method:y,data:y,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,allowedSocketPaths:p,responseEncoding:p,validateStatus:s,headers:(n,o,r)=>E(Ii(n),Ii(o),r,!0)};return P.forEach(Object.keys({...l,...h}),function(n){if(n==="__proto__"||n==="constructor"||n==="prototype")return;const o=P.hasOwnProp(c,n)?c[n]:E,r=P.hasOwnProp(l,n)?l[n]:void 0,i=P.hasOwnProp(h,n)?h[n]:void 0,e=o(r,i,n);P.isUndefined(e)&&o!==s||(u[n]=e)}),P.hasOwnProp(h,"validateStatus")&&P.isUndefined(h.validateStatus)&&v("validateStatusUndefinedResolves")===!1&&(P.hasOwnProp(l,"validateStatus")?u.validateStatus=g(void 0,l.validateStatus):delete u.validateStatus),u}const po=["content-type","content-length"];function mo(l,h,u){if(u!=="content-only"){l.set(h);return}Object.entries(h||{}).forEach(([g,E])=>{po.includes(g.toLowerCase())&&l.set(g,E)})}const vo=l=>encodeURIComponent(l).replace(/%([0-9A-F]{2})/gi,(h,u)=>String.fromCharCode(parseInt(u,16)));function Oi(l){const h=xe({},l),u=r=>P.hasOwnProp(h,r)?h[r]:void 0,g=u("data");let E=u("withXSRFToken");const y=u("xsrfHeaderName"),p=u("xsrfCookieName");let v=u("headers");const s=u("auth"),c=u("baseURL"),n=u("allowAbsoluteUrls"),o=u("url");if(h.headers=v=ge.from(v),h.url=Si(Ri(c,o,n,h),u("params"),u("paramsSerializer")),s){const r=P.getSafeProp(s,"username")||"",i=P.getSafeProp(s,"password")||"";try{v.set("Authorization","Basic "+btoa(r+":"+(i?vo(i):"")))}catch(e){throw X.from(e,X.ERR_BAD_OPTION_VALUE,l)}}if(P.isFormData(g)&&(de.hasStandardBrowserEnv||de.hasStandardBrowserWebWorkerEnv||P.isReactNative(g)?v.setContentType(void 0):P.isFunction(g.getHeaders)&&mo(v,g.getHeaders(),u("formDataHeaderPolicy"))),de.hasStandardBrowserEnv&&(P.isFunction(E)&&(E=E(h)),E===!0||E==null&&so(h.url))){const r=y&&p&&ao.read(p);r&&v.set(y,r)}return h}const yo=typeof XMLHttpRequest<"u",wo=yo&&function(l){return new Promise(function(h,u){const g=Oi(l);let E=g.data;const y=ge.from(g.headers).normalize();let{responseType:p,onUploadProgress:v,onDownloadProgress:s}=g,c,n,o,r,i;function e(){r&&r(),i&&i(),g.cancelToken&&g.cancelToken.unsubscribe(c),g.signal&&g.signal.removeEventListener("abort",c)}let t=new XMLHttpRequest;t.open(g.method.toUpperCase(),g.url,!0),t.timeout=g.timeout;function a(){if(!t)return;const f=ge.from("getAllResponseHeaders"in t&&t.getAllResponseHeaders()),S={data:!p||p==="text"||p==="json"?t.responseText:t.response,status:t.status,statusText:t.statusText,headers:f,config:l,request:t};Ei(function($){h($),e()},function($){u($),e()},S),t=null}"onloadend"in t?t.onloadend=a:t.onreadystatechange=function(){!t||t.readyState!==4||t.status===0&&!(t.responseURL&&t.responseURL.startsWith("file:"))||setTimeout(a)},t.onabort=function(){t&&(u(new X("Request aborted",X.ECONNABORTED,l,t)),e(),t=null)},t.onerror=function(f){const S=f&&f.message?f.message:"Network Error",$=new X(S,X.ERR_NETWORK,l,t);$.event=f||null,u($),e(),t=null},t.ontimeout=function(){let f=g.timeout?"timeout of "+g.timeout+"ms exceeded":"timeout exceeded";const S=g.transitional||Mt;g.timeoutErrorMessage&&(f=g.timeoutErrorMessage),u(new X(f,S.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,l,t)),e(),t=null},E===void 0&&y.setContentType(null),"setRequestHeader"in t&&P.forEach(mi(y),function(f,S){t.setRequestHeader(S,f)}),P.isUndefined(g.withCredentials)||(t.withCredentials=!!g.withCredentials),p&&p!=="json"&&(t.responseType=g.responseType),s&&([o,i]=st(s,!0),t.addEventListener("progress",o)),v&&t.upload&&([n,r]=st(v),t.upload.addEventListener("progress",n),t.upload.addEventListener("loadend",r)),(g.cancelToken||g.signal)&&(c=f=>{t&&(u(!f||f.type?new Ue(null,l,t):f),t.abort(),e(),t=null)},g.cancelToken&&g.cancelToken.subscribe(c),g.signal&&(g.signal.aborted?c():g.signal.addEventListener("abort",c)));const d=no(g.url);if(d&&!de.protocols.includes(d)){u(new X("Unsupported protocol "+d+":",X.ERR_BAD_REQUEST,l)),e();return}t.send(E||null)})},bo=(l,h)=>{if(l=l?l.filter(Boolean):[],!h&&!l.length)return;const u=new AbortController;let g=!1;const E=function(s){if(!g){g=!0,p();const c=s instanceof Error?s:this.reason;u.abort(c instanceof X?c:new Ue(c instanceof Error?c.message:c))}};let y=h&&setTimeout(()=>{y=null,E(new X(`timeout of ${h}ms exceeded`,X.ETIMEDOUT))},h);const p=()=>{l&&(y&&clearTimeout(y),y=null,l.forEach(s=>{s.unsubscribe?s.unsubscribe(E):s.removeEventListener("abort",E)}),l=null)};l.forEach(s=>s.addEventListener("abort",E,{once:!0}));const{signal:v}=u;return v.unsubscribe=()=>P.asap(p),v},Co=function*(l,h){let u=l.byteLength;if(u<h){yield l;return}let g=0,E;for(;g<u;)E=g+h,yield l.slice(g,E),g=E},So=async function*(l,h){for await(const u of $o(l))yield*Co(u,h)},$o=async function*(l){if(l[Symbol.asyncIterator]){yield*l;return}const h=l.getReader();try{for(;;){const{done:u,value:g}=await h.read();if(u)break;yield g}}finally{await h.cancel()}},Di=(l,h,u,g)=>{const E=So(l,h);let y=0,p,v=s=>{p||(p=!0,g&&g(s))};return new ReadableStream({async pull(s){try{const{done:c,value:n}=await E.next();if(c){v(),s.close();return}let o=n.byteLength;if(u){let r=y+=o;u(r)}s.enqueue(new Uint8Array(n))}catch(c){throw v(c),c}},cancel(s){return v(s),E.return()}},{highWaterMark:2})},at=l=>l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102,_o=(l,h,u)=>h+2<u&&at(l.charCodeAt(h+1))&&at(l.charCodeAt(h+2));function xo(l){if(!l||typeof l!="string"||!l.startsWith("data:"))return 0;const h=l.indexOf(",");if(h<0)return 0;const u=l.slice(5,h),g=l.slice(h+1);if(/;base64/i.test(u)){let y=g.length;const p=g.length;for(let o=0;o<p;o++)if(g.charCodeAt(o)===37&&o+2<p){const r=g.charCodeAt(o+1),i=g.charCodeAt(o+2);at(r)&&at(i)&&(y-=2,o+=2)}let v=0,s=p-1;const c=o=>o>=2&&g.charCodeAt(o-2)===37&&g.charCodeAt(o-1)===51&&(g.charCodeAt(o)===68||g.charCodeAt(o)===100);s>=0&&(g.charCodeAt(s)===61?(v++,s--):c(s)&&(v++,s-=3)),v===1&&s>=0&&(g.charCodeAt(s)===61||c(s))&&v++;const n=Math.floor(y/4)*3-(v||0);return n>0?n:0}let E=0;for(let y=0,p=g.length;y<p;y++){const v=g.charCodeAt(y);if(v===37&&_o(g,y,p))E+=1,y+=2;else if(v<128)E+=1;else if(v<2048)E+=2;else if(v>=55296&&v<=56319&&y+1<p){const s=g.charCodeAt(y+1);s>=56320&&s<=57343?(E+=4,y++):E+=3}else E+=3}return E}const It="1.18.1",Ni=64*1024,{isFunction:lt}=P,Ao=l=>encodeURIComponent(l).replace(/%([0-9A-F]{2})/gi,(h,u)=>String.fromCharCode(parseInt(u,16))),Fi=l=>{if(!P.isString(l))return l;try{return decodeURIComponent(l)}catch{return l}},Wi=(l,...h)=>{try{return!!l(...h)}catch{return!1}},ko=l=>{const h=l.indexOf("://");let u=l;return h!==-1&&(u=u.slice(h+3)),u.includes("@")||u.includes(":")},Eo=l=>{const h=P.global!==void 0&&P.global!==null?P.global:globalThis,{ReadableStream:u,TextEncoder:g}=h;l=P.merge.call({skipUndefined:!0},{Request:h.Request,Response:h.Response},l);const{fetch:E,Request:y,Response:p}=l,v=E?lt(E):typeof fetch=="function",s=lt(y),c=lt(p);if(!v)return!1;const n=v&&lt(u),o=v&&(typeof g=="function"?(d=>f=>d.encode(f))(new g):async d=>new Uint8Array(await new y(d).arrayBuffer())),r=s&&n&&Wi(()=>{let d=!1;const f=new y(de.origin,{body:new u,method:"POST",get duplex(){return d=!0,"half"}}),S=f.headers.has("Content-Type");return f.body!=null&&f.body.cancel(),d&&!S}),i=c&&n&&Wi(()=>P.isReadableStream(new p("").body)),e={stream:i&&(d=>d.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!e[d]&&(e[d]=(f,S)=>{let $=f&&f[d];if($)return $.call(f);throw new X(`Response type '${d}' is not supported`,X.ERR_NOT_SUPPORT,S)})});const t=async d=>{if(d==null)return 0;if(P.isBlob(d))return d.size;if(P.isSpecCompliantForm(d))return(await new y(de.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(P.isArrayBufferView(d)||P.isArrayBuffer(d))return d.byteLength;if(P.isURLSearchParams(d)&&(d=d+""),P.isString(d))return(await o(d)).byteLength},a=async(d,f)=>P.toFiniteNumber(d.getContentLength())??t(f);return async d=>{let{url:f,method:S,data:$,signal:C,cancelToken:w,timeout:M,onDownloadProgress:R,onUploadProgress:T,responseType:k,headers:O,withCredentials:A="same-origin",fetchOptions:x,maxContentLength:b,maxBodyLength:m}=Oi(d);const _=P.isNumber(b)&&b>-1,L=P.isNumber(m)&&m>-1,I=B=>P.hasOwnProp(d,B)?d[B]:void 0;let D=E||fetch;k=k?(k+"").toLowerCase():"text";let N=bo([C,w&&w.toAbortSignal()],M),F=null;const U=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let W,z=null;const H=()=>new X("Request body larger than maxBodyLength limit",X.ERR_BAD_REQUEST,d,F);try{let B;const j=I("auth");if(j){const J=P.getSafeProp(j,"username")||"",me=P.getSafeProp(j,"password")||"";B={username:J,password:me}}if(ko(f)){const J=new URL(f,de.origin);if(!B&&(J.username||J.password)){const me=Fi(J.username),ye=Fi(J.password);B={username:me,password:ye}}(J.username||J.password)&&(J.username="",J.password="",f=J.href)}if(B&&(O.delete("authorization"),O.set("Authorization","Basic "+btoa(Ao((B.username||"")+":"+(B.password||""))))),_&&typeof f=="string"&&f.startsWith("data:")&&xo(f)>b)throw new X("maxContentLength size of "+b+" exceeded",X.ERR_BAD_RESPONSE,d,F);if(L&&S!=="get"&&S!=="head"){const J=await t($);if(typeof J=="number"&&isFinite(J)&&(W=J,J>m))throw H()}const K=L&&(P.isReadableStream($)||P.isStream($)),Q=(J,me,ye)=>Di(J,Ni,ke=>{if(L&&ke>m)throw z=H();me&&me(ke)},ye);if(r&&S!=="get"&&S!=="head"&&(T||K)){if(W=W??await a(O,$),W!==0||K){let J=new y(f,{method:"POST",body:$,duplex:"half"}),me;if(P.isFormData($)&&(me=J.headers.get("content-type"))&&O.setContentType(me),J.body){const[ye,ke]=T&&Mi(W,st(Ti(T)))||[];$=Q(J.body,ye,ke)}}}else if(K&&!s&&n&&S!=="get"&&S!=="head")$=Q($);else if(K&&s&&!r&&S!=="get"&&S!=="head")throw new X("Stream request bodies are not supported by the current fetch implementation",X.ERR_NOT_SUPPORT,d,F);P.isString(A)||(A=A?"include":"omit");const Y=s&&"credentials"in y.prototype;if(P.isFormData($)){const J=O.getContentType();J&&/^multipart\/form-data/i.test(J)&&!/boundary=/i.test(J)&&O.delete("content-type")}O.set("User-Agent","axios/"+It,!1);const ee={...x,signal:N,method:S.toUpperCase(),headers:mi(O.normalize()),body:$,duplex:"half",credentials:Y?A:void 0};F=s&&new y(f,ee);let ie=await(s?D(F,x):D(f,ee));const ae=ge.from(ie.headers);if(_){const J=P.toFiniteNumber(ae.getContentLength());if(J!=null&&J>b)throw new X("maxContentLength size of "+b+" exceeded",X.ERR_BAD_RESPONSE,d,F)}const ue=i&&(k==="stream"||k==="response");if(i&&ie.body&&(R||_||ue&&U)){const J={};["status","statusText","headers"].forEach(Ge=>{J[Ge]=ie[Ge]});const me=P.toFiniteNumber(ae.getContentLength()),[ye,ke]=R&&Mi(me,st(Ti(R),!0))||[];let tn=0;const As=Ge=>{if(_&&(tn=Ge,tn>b))throw new X("maxContentLength size of "+b+" exceeded",X.ERR_BAD_RESPONSE,d,F);ye&&ye(Ge)};ie=new p(Di(ie.body,Ni,As,()=>{ke&&ke(),U&&U()}),J)}k=k||"text";let oe=await e[P.findKey(e,k)||"text"](ie,d);if(_&&!i&&!ue){let J;if(oe!=null&&(typeof oe.byteLength=="number"?J=oe.byteLength:typeof oe.size=="number"?J=oe.size:typeof oe=="string"&&(J=typeof g=="function"?new g().encode(oe).byteLength:oe.length)),typeof J=="number"&&J>b)throw new X("maxContentLength size of "+b+" exceeded",X.ERR_BAD_RESPONSE,d,F)}return!ue&&U&&U(),await new Promise((J,me)=>{Ei(J,me,{data:oe,headers:ge.from(ie.headers),status:ie.status,statusText:ie.statusText,config:d,request:F})})}catch(B){if(U&&U(),N&&N.aborted&&N.reason instanceof X){const j=N.reason;throw j.config=d,F&&(j.request=F),B!==j&&Object.defineProperty(j,"cause",{__proto__:null,value:B,writable:!0,enumerable:!1,configurable:!0}),j}if(z)throw F&&!z.request&&(z.request=F),z;if(B instanceof X)throw F&&!B.request&&(B.request=F),B;if(B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)){const j=new X("Network Error",X.ERR_NETWORK,d,F,B&&B.response);throw Object.defineProperty(j,"cause",{__proto__:null,value:B.cause||B,writable:!0,enumerable:!1,configurable:!0}),j}throw X.from(B,B&&B.code,d,F,B&&B.response)}}},Mo=new Map,Pi=l=>{let h=l&&l.env||{};const{fetch:u,Request:g,Response:E}=h,y=[g,E,u];let p=y.length,v=p,s,c,n=Mo;for(;v--;)s=y[v],c=n.get(s),c===void 0&&n.set(s,c=v?new Map:Eo(h)),n=c;return c};Pi();const Ot={http:zr,xhr:wo,fetch:{get:Pi}};P.forEach(Ot,(l,h)=>{if(l){try{Object.defineProperty(l,"name",{__proto__:null,value:h})}catch{}Object.defineProperty(l,"adapterName",{__proto__:null,value:h})}});const Bi=l=>`- ${l}`,To=l=>P.isFunction(l)||l===null||l===!1;function Lo(l,h){l=P.isArray(l)?l:[l];const{length:u}=l;let g,E;const y={};for(let p=0;p<u;p++){g=l[p];let v;if(E=g,!To(g)&&(E=Ot[(v=String(g)).toLowerCase()],E===void 0))throw new X(`Unknown adapter '${v}'`);if(E&&(P.isFunction(E)||(E=E.get(h))))break;y[v||"#"+p]=E}if(!E){const p=Object.entries(y).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let v=u?p.length>1?`since :
1115
+ `+p.map(Bi).join(`
1116
+ `):" "+Bi(p[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+v,X.ERR_NOT_SUPPORT)}return E}const zi={getAdapter:Lo,adapters:Ot};function Dt(l){if(l.cancelToken&&l.cancelToken.throwIfRequested(),l.signal&&l.signal.aborted)throw new Ue(null,l)}function Hi(l){return Dt(l),l.headers=ge.from(l.headers),l.data=Rt.call(l,l.transformRequest),["post","put","patch"].indexOf(l.method)!==-1&&l.headers.setContentType("application/x-www-form-urlencoded",!1),zi.getAdapter(l.adapter||He.adapter,l)(l).then(function(h){Dt(l),l.response=h;try{h.data=Rt.call(l,l.transformResponse,h)}finally{delete l.response}return h.headers=ge.from(h.headers),h},function(h){if(!ki(h)&&(Dt(l),h&&h.response)){l.response=h.response;try{h.response.data=Rt.call(l,l.transformResponse,h.response)}finally{delete l.response}h.response.headers=ge.from(h.response.headers)}return Promise.reject(h)})}const ct={};["object","boolean","number","function","string","symbol"].forEach((l,h)=>{ct[l]=function(u){return typeof u===l||"a"+(h<1?"n ":" ")+l}});const Ui={};ct.transitional=function(l,h,u){function g(E,y){return"[Axios v"+It+"] Transitional option '"+E+"'"+y+(u?". "+u:"")}return(E,y,p)=>{if(l===!1)throw new X(g(y," has been removed"+(h?" in "+h:"")),X.ERR_DEPRECATED);return h&&!Ui[y]&&(Ui[y]=!0,console.warn(g(y," has been deprecated since v"+h+" and will be removed in the near future"))),l?l(E,y,p):!0}},ct.spelling=function(l){return(h,u)=>(console.warn(`${u} is likely a misspelling of ${l}`),!0)};function Ro(l,h,u){if(typeof l!="object"||l===null)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const g=Object.keys(l);let E=g.length;for(;E-- >0;){const y=g[E],p=Object.prototype.hasOwnProperty.call(h,y)?h[y]:void 0;if(p){const v=l[y],s=v===void 0||p(v,y,l);if(s!==!0)throw new X("option "+y+" must be "+s,X.ERR_BAD_OPTION_VALUE);continue}if(u!==!0)throw new X("Unknown option "+y,X.ERR_BAD_OPTION)}}const ut={assertOptions:Ro,validators:ct},pe=ut.validators;let Ae=class{constructor(l){this.defaults=l||{},this.interceptors={request:new $i,response:new $i}}async request(l,h){try{return await this._request(l,h)}catch(u){if(u instanceof Error){let g={};Error.captureStackTrace?Error.captureStackTrace(g):g=new Error;const E=(()=>{if(!g.stack)return"";const y=g.stack.indexOf(`
1117
+ `);return y===-1?"":g.stack.slice(y+1)})();try{if(!u.stack)u.stack=E;else if(E){const y=E.indexOf(`
1118
+ `),p=y===-1?-1:E.indexOf(`
1119
+ `,y+1),v=p===-1?"":E.slice(p+1);String(u.stack).endsWith(v)||(u.stack+=`
1120
+ `+E)}}catch{}}throw u}}_request(l,h){typeof l=="string"?(h=h||{},h.url=l):h=l||{},h=xe(this.defaults,h);const{transitional:u,paramsSerializer:g,headers:E}=h;u!==void 0&&ut.assertOptions(u,{silentJSONParsing:pe.transitional(pe.boolean),forcedJSONParsing:pe.transitional(pe.boolean),clarifyTimeoutError:pe.transitional(pe.boolean),legacyInterceptorReqResOrdering:pe.transitional(pe.boolean),advertiseZstdAcceptEncoding:pe.transitional(pe.boolean),validateStatusUndefinedResolves:pe.transitional(pe.boolean)},!1),g!=null&&(P.isFunction(g)?h.paramsSerializer={serialize:g}:ut.assertOptions(g,{encode:pe.function,serialize:pe.function},!0)),h.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?h.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:h.allowAbsoluteUrls=!0),ut.assertOptions(h,{baseUrl:pe.spelling("baseURL"),withXsrfToken:pe.spelling("withXSRFToken")},!0),h.method=(h.method||this.defaults.method||"get").toLowerCase();let y=E&&P.merge(E.common,E[h.method]);E&&P.forEach(["delete","get","head","post","put","patch","query","common"],i=>{delete E[i]}),h.headers=ge.concat(y,E);const p=[];let v=!0;this.interceptors.request.forEach(function(i){if(typeof i.runWhen=="function"&&i.runWhen(h)===!1)return;v=v&&i.synchronous;const e=h.transitional||Mt;e&&e.legacyInterceptorReqResOrdering?p.unshift(i.fulfilled,i.rejected):p.push(i.fulfilled,i.rejected)});const s=[];this.interceptors.response.forEach(function(i){s.push(i.fulfilled,i.rejected)});let c,n=0,o;if(!v){const i=[Hi.bind(this),void 0];for(i.unshift(...p),i.push(...s),o=i.length,c=Promise.resolve(h);n<o;)c=c.then(i[n++],i[n++]);return c}o=p.length;let r=h;for(;n<o;){const i=p[n++],e=p[n++];try{r=i(r)}catch(t){e.call(this,t);break}}try{c=Hi.call(this,r)}catch(i){return Promise.reject(i)}for(n=0,o=s.length;n<o;)c=c.then(s[n++],s[n++]);return c}getUri(l){l=xe(this.defaults,l);const h=Ri(l.baseURL,l.url,l.allowAbsoluteUrls,l);return Si(h,l.params,l.paramsSerializer)}};P.forEach(["delete","get","head","options"],function(l){Ae.prototype[l]=function(h,u){return this.request(xe(u||{},{method:l,url:h,data:u&&P.hasOwnProp(u,"data")?u.data:void 0}))}}),P.forEach(["post","put","patch","query"],function(l){function h(u){return function(g,E,y){return this.request(xe(y||{},{method:l,headers:u?{"Content-Type":"multipart/form-data"}:{},url:g,data:E}))}}Ae.prototype[l]=h(),l!=="query"&&(Ae.prototype[l+"Form"]=h(!0))});let Io=class rn{constructor(h){if(typeof h!="function")throw new TypeError("executor must be a function.");let u;this.promise=new Promise(function(E){u=E});const g=this;this.promise.then(E=>{if(!g._listeners)return;let y=g._listeners.length;for(;y-- >0;)g._listeners[y](E);g._listeners=null}),this.promise.then=E=>{let y;const p=new Promise(v=>{g.subscribe(v),y=v}).then(E);return p.cancel=function(){g.unsubscribe(y)},p},h(function(E,y,p){g.reason||(g.reason=new Ue(E,y,p),u(g.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(h){if(this.reason){h(this.reason);return}this._listeners?this._listeners.push(h):this._listeners=[h]}unsubscribe(h){if(!this._listeners)return;const u=this._listeners.indexOf(h);u!==-1&&this._listeners.splice(u,1)}toAbortSignal(){const h=new AbortController,u=g=>{h.abort(g)};return this.subscribe(u),h.signal.unsubscribe=()=>this.unsubscribe(u),h.signal}static source(){let h;return{token:new rn(function(u){h=u}),cancel:h}}};function Oo(l){return function(h){return l.apply(null,h)}}function Do(l){return P.isObject(l)&&l.isAxiosError===!0}const Nt={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(Nt).forEach(([l,h])=>{Nt[h]=l});function Vi(l){const h=new Ae(l),u=oi(Ae.prototype.request,h);return P.extend(u,Ae.prototype,h,{allOwnKeys:!0}),P.extend(u,h,null,{allOwnKeys:!0}),u.create=function(g){return Vi(xe(l,g))},u}const ce=Vi(He);ce.Axios=Ae,ce.CanceledError=Ue,ce.CancelToken=Io,ce.isCancel=ki,ce.VERSION=It,ce.toFormData=ot,ce.AxiosError=X,ce.Cancel=ce.CanceledError,ce.all=function(l){return Promise.all(l)},ce.spread=Oo,ce.isAxiosError=Do,ce.mergeConfig=xe,ce.AxiosHeaders=ge,ce.formToJSON=l=>Ai(P.isHTMLForm(l)?new FormData(l):l),ce.getAdapter=zi.getAdapter,ce.HttpStatusCode=Nt,ce.default=ce;const{Axios:Es,AxiosError:Ms,CanceledError:Ts,isCancel:Ls,CancelToken:Rs,VERSION:Is,all:Os,Cancel:Ds,isAxiosError:Ns,spread:Fs,toFormData:Ws,AxiosHeaders:Ps,HttpStatusCode:Bs,formToJSON:zs,getAdapter:Hs,mergeConfig:Us,create:Vs}=ce,Ft=ce.create({baseURL:location.origin,timeout:6e4,params:{}});Ft.interceptors.response.use(l=>l,l=>{if(l.response){if(l.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(g){g&&OpenC3Auth.setTokens()}),l.response.config.headers["Ignore-Errors"]&&l.response.config.headers["Ignore-Errors"].includes(l.response.status.toString()))return Promise.reject(l);let h=`HTTP ${l.response.status} - `;l.response?.statusText&&(h+=`${l.response.statusText} `),l.response?.config?.data&&(h+=`${l.response.config.data} `),l.response?.data?.message?h+=`${l.response.data.message}`:l.response?.data?.exception?h+=`${l.response.data.exception}`:l.response?.data?.error?.message?(l.response.data.error.class&&(h+=`${l.response.data.error.class} `),h+=`${l.response.data.error.message}`):h+=`${l.response?.data}`;const{$cosmosNotify:u}=window;throw u&&u.serious({title:"Network error",body:h}),l}else throw l});const ht=async function(l,h,{data:u,params:g={},headers:E,noAuth:y=!1,noScope:p=!1,onUploadProgress:v=!1}={}){if(!y){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}E.Authorization=localStorage.openc3Token}return E.manual=!0,!p&&!g.scope&&(g.scope=window.openc3Scope),Ft({method:l,url:h,data:u,params:g,headers:E,onUploadProgress:v})},Wt={Accept:"application/json"},ji={...Wt,"Content-Type":"application/json"},Gi={get:function(l,{params:h,headers:u=Wt,noScope:g,noAuth:E,onUploadProgress:y}={}){return ht("get",l,{params:h,headers:u,noScope:g,noAuth:E,onUploadProgress:y})},put:function(l,{data:h,params:u,headers:g=ji,noScope:E,noAuth:y,onUploadProgress:p}={}){return ht("put",l,{data:h,params:u,headers:g,noScope:E,noAuth:y,onUploadProgress:p})},post:function(l,{data:h,params:u,headers:g=ji,noScope:E,noAuth:y,onUploadProgress:p}={}){return ht("post",l,{data:h,params:u,headers:g,noScope:E,noAuth:y,onUploadProgress:p})},delete:function(l,{params:h,headers:u=Wt,noScope:g,noAuth:E,onUploadProgress:y}={}){return ht("delete",l,{params:h,headers:u,noScope:g,noAuth:E,onUploadProgress:y})}};function Ve(l){return No.test(l)}const No=/^-?[0-9]+$/;function Ki(l){return Fo.test(l)}const Fo=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Yi(l,h){if(Ve(l))return Number.isSafeInteger(Number.parseInt(l,10));const u=Number.parseFloat(l),g=String(u);if(l===g)return!0;const E=Qi(l),y=Qi(g);return!!(E===y||h?.approx===!0&&!Ve(l)&&y.length>=14&&E.startsWith(y.substring(0,14)))}let je=(function(l){return l.underflow="underflow",l.overflow="overflow",l.truncate_integer="truncate_integer",l.truncate_float="truncate_float",l})({});function Wo(l){if(Yi(l,{approx:!1}))return;if(Ve(l))return je.truncate_integer;const h=Number.parseFloat(l);return Number.isFinite(h)?h===0?je.underflow:je.truncate_float:je.overflow}function Qi(l){const{start:h,end:u}=Po(l),g=l.substring(h,u),E=g.indexOf(".");return E===-1?g:g.substring(0,E)+g.substring(E+1)}function Po(l){let h=0;for(l[0]==="-"&&h++;l[h]==="0"||l[h]===".";)h++;let u=l.lastIndexOf("e");for(u===-1&&(u=l.lastIndexOf("E")),u===-1&&(u=l.length);(l[u-1]==="0"||l[u-1]===".")&&u>h;)u--;return{start:h,end:u}}class Bo{isLosslessNumber=!0;constructor(h){if(!Ki(h))throw new Error(`Invalid number (value: "${h}")`);this.value=h}valueOf(){const h=Wo(this.value);if(h===void 0||h===je.truncate_float)return Number.parseFloat(this.value);if(Ve(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${h} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function zo(l){return l&&typeof l=="object"&&l.isLosslessNumber||!1}function Ho(l){return new Bo(l)}function Uo(l,h){return Pt({"":l},"",l,h)}function Pt(l,h,u,g){return Array.isArray(u)?g.call(l,h,jo(u,g)):u&&typeof u=="object"&&!zo(u)?g.call(l,h,Vo(u,g)):g.call(l,h,u)}function Vo(l,h){for(const u of Object.keys(l)){const g=Pt(l,u,l[u],h);g!==void 0?l[u]=g:delete l[u]}return l}function jo(l,h){for(let u=0;u<l.length;u++)l[u]=Pt(l,String(u),l[u],h);return l}function Go(l,h,u){const g=typeof u=="function"?{parseNumber:u}:u,E=g?.parseNumber??Ho,y=g?.onDuplicateKey??M;let p=0;const v=n();return d(v),S(),h?Uo(v,h):v;function s(){if(l.charCodeAt(p)===Jo){p++,r();const L={};let I=!0;for(;p<l.length&&l.charCodeAt(p)!==Xi;){I?I=!1:(t(),r());const D=p,N=i();if(N===void 0){w();return}r(),a();const F=n();if(F===void 0){A();return}if(Object.prototype.hasOwnProperty.call(L,N)&&!Bt(F,L[N])){const U=y({key:N,position:D+1,oldValue:L[N],newValue:F});U!==void 0&&(L[N]=U)}else L[N]=F}return l.charCodeAt(p)!==Xi&&R(),p++,L}}function c(){if(l.charCodeAt(p)===qo){p++,r();const L=[];let I=!0;for(;p<l.length&&l.charCodeAt(p)!==Ji;){I?I=!1:t();const D=n();f(D),L.push(D)}return l.charCodeAt(p)!==Ji&&T(),p++,L}}function n(){r();const L=i()??e()??s()??c()??o("true",!0)??o("false",!1)??o("null",null);return r(),L}function o(L,I){if(l.slice(p,p+L.length)===L)return p+=L.length,I}function r(){for(;Ko(l.charCodeAt(p));)p++}function i(){if(l.charCodeAt(p)===zt){p++;let L="";for(;p<l.length&&l.charCodeAt(p)!==zt;){if(l.charCodeAt(p)===Xo){const I=l[p+1],D=Zo[I];D!==void 0?(L+=D,p++):I==="u"?dt(l.charCodeAt(p+2))&&dt(l.charCodeAt(p+3))&&dt(l.charCodeAt(p+4))&&dt(l.charCodeAt(p+5))?(L+=String.fromCharCode(Number.parseInt(l.slice(p+2,p+6),16)),p+=5):x(p):O(p)}else Qo(l.charCodeAt(p))?L+=l[p]:k(l[p]);p++}return C(),p++,L}}function e(){const L=p;if(l.charCodeAt(p)===qi&&(p++,$(L)),l.charCodeAt(p)===Ht)p++;else if(Yo(l.charCodeAt(p)))for(p++;ft(l.charCodeAt(p));)p++;if(l.charCodeAt(p)===as)for(p++,$(L);ft(l.charCodeAt(p));)p++;if(l.charCodeAt(p)===ds||l.charCodeAt(p)===hs)for(p++,(l.charCodeAt(p)===qi||l.charCodeAt(p)===rs)&&p++,$(L);ft(l.charCodeAt(p));)p++;if(p>L)return E(l.slice(L,p))}function t(){if(l.charCodeAt(p)!==ss)throw new SyntaxError(`Comma ',' expected after value ${_()}`);p++}function a(){if(l.charCodeAt(p)!==ls)throw new SyntaxError(`Colon ':' expected after property name ${_()}`);p++}function d(L){if(L===void 0)throw new SyntaxError(`JSON value expected ${_()}`)}function f(L){if(L===void 0)throw new SyntaxError(`Array item expected ${_()}`)}function S(){if(p<l.length)throw new SyntaxError(`Expected end of input ${_()}`)}function $(L){if(!ft(l.charCodeAt(p))){const I=l.slice(L,p);throw new SyntaxError(`Invalid number '${I}', expecting a digit ${_()}`)}}function C(){if(l.charCodeAt(p)!==zt)throw new SyntaxError(`End of string '"' expected ${_()}`)}function w(){throw new SyntaxError(`Quoted object key expected ${_()}`)}function M(L){let{key:I,position:D}=L;throw new SyntaxError(`Duplicate key '${I}' encountered at position ${D}`)}function R(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${_()}`)}function T(){throw new SyntaxError(`Array item or end of array ']' expected ${_()}`)}function k(L){throw new SyntaxError(`Invalid character '${L}' ${b()}`)}function O(L){const I=l.slice(L,L+2);throw new SyntaxError(`Invalid escape character '${I}' ${b()}`)}function A(){throw new SyntaxError(`Object value expected after ':' ${b()}`)}function x(L){const I=l.slice(L,L+6);throw new SyntaxError(`Invalid unicode character '${I}' ${b()}`)}function b(){return`at position ${p}`}function m(){return p<l.length?`but got '${l[p]}'`:"but reached end of input"}function _(){return`${m()} ${b()}`}}function Ko(l){return l===es||l===ts||l===is||l===ns}function dt(l){return l>=Ht&&l<=Ut||l>=cs&&l<=fs||l>=us&&l<=gs}function ft(l){return l>=Ht&&l<=Ut}function Yo(l){return l>=os&&l<=Ut}function Qo(l){return l>=32&&l<=1114111}function Bt(l,h){return l===h?!0:Array.isArray(l)&&Array.isArray(h)?l.length===h.length&&l.every((u,g)=>Bt(u,h[g])):Zi(l)&&Zi(h)?[...new Set([...Object.keys(l),...Object.keys(h)])].every(u=>Bt(l[u],h[u])):!1}function Zi(l){return typeof l=="object"&&l!==null}const Zo={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1121
+ `,r:"\r",t:" "},Xo=92,Jo=123,Xi=125,qo=91,Ji=93,es=32,ts=10,is=9,ns=13,zt=34,rs=43,qi=45,Ht=48,os=49,Ut=57,ss=44,as=46,ls=58,cs=65,us=97,hs=69,ds=101,fs=70,gs=102;function en(l,h,u,g){return E(l);function E(s,c){if(Array.isArray(g)){const n=g.find(o=>o.test(s));if(n){const o=n.stringify(s);if(typeof o!="string"||!Ki(o))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${o})`);return o}}if(typeof s=="boolean"||typeof s=="number"||typeof s=="string"||s===null||s instanceof Date||s instanceof Boolean||s instanceof Number||s instanceof String)return JSON.stringify(s);if(s?.isLosslessNumber||typeof s=="bigint")return s.toString();if(Array.isArray(s))return y(s);if(s&&typeof s=="object")return p(s)}function y(s,c){if(s.length===0)return"[]";let n="[";for(let o=0;o<s.length;o++){const r=s[o];typeof r<"u"&&typeof r!="function"?n+=E(r):n+="null",o<s.length-1&&(n+=",")}return n+="]",n}function p(s,c){if(typeof s.toJSON=="function")return en(s.toJSON(),h,u,void 0);const n=Array.isArray(h)?h.map(String):Object.keys(s);if(n.length===0)return"{}";let o=!0,r="{";for(const i of n){const e=s[i];if(v(i,e)){o?o=!1:r+=",";const t=JSON.stringify(i);r+=`${t}:`,r+=E(e)}}return r+="}",r}function v(s,c){return typeof c<"u"&&typeof c!="function"&&typeof c!="symbol"}}function ps(l){return Ve(l)&&!Yi(l)?BigInt(l):parseFloat(l)}class ms{id=1;constructor(){}async exec(h,u,g={},E={},y=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return g.scope=window.openc3Scope,E.manual=!0,(await Ft.post("/openc3-api/api",{jsonrpc:"2.0",method:h,params:u,id:this.id,keyword_params:g},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...E},timeout:y,transformRequest:[(p,v)=>en(p)],transformResponse:[p=>{try{return Go(p,void 0,ps)}catch{const v=typeof p=="string"?p.substring(0,200):String(p),s=new Error(`Server returned non-JSON response: ${v}`);throw s.name="ServerError",s}}]})).data.result}catch(p){let v=new Error;throw p.response?(v.name=p.response.data.error.data.class,v.message=p.response.data.error.data.message,v.object=p.response.data.error):p.request?(v.name="Request error",v.message="Request error, no response received"):v=p,v}}decode_openc3_type(h){if(h!==null&&typeof h=="object"&&h.json_class=="Float"&&h.raw){if(h.raw=="NaN")return NaN;if(h.raw=="Infinity")return 1/0;if(h.raw=="-Infinity")return-1/0}return null}encode_openc3_type(h){return Number.isNaN(h)?{json_class:"Float",raw:"NaN"}:h==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:h==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(h=>{h&&(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(h){return this.exec("set_offline_access",[h])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(h,u,g,E,y){return this.exec("map_target_to_interface",[h,u],{cmd_only:g,tlm_only:E,unmap_old:y})}unmap_target_from_interface(h,u,g,E){return this.exec("unmap_target_from_interface",[h,u],{cmd_only:g,tlm_only:E})}connect_interface(h,...u){return u.length>0?this.exec("connect_interface",[h,...u]):this.exec("connect_interface",[h])}disconnect_interface(h){return this.exec("disconnect_interface",[h])}interface_cmd(h,u,...g){return this.exec("interface_cmd",[h,u,...g])}interface_target_enable(h,u,g=!1,E=!1){return this.exec("interface_target_enable",[h,u],{cmd_only:g,tlm_only:E})}interface_target_disable(h,u,g=!1,E=!1){return this.exec("interface_target_disable",[h,u],{cmd_only:g,tlm_only:E})}interface_details(h){return this.exec("interface_details",[h])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(h,u,g,E,y){return this.exec("map_target_to_router",[h,u],{cmd_only:g,tlm_only:E,unmap_old:y})}unmap_target_from_router(h,u,g,E){return this.exec("unmap_target_from_router",[h,u],{cmd_only:g,tlm_only:E})}connect_router(h){return this.exec("connect_router",[h])}disconnect_router(h){return this.exec("disconnect_router",[h])}router_target_enable(h,u,g=!1,E=!1){return this.exec("router_target_enable",[h,u],{cmd_only:g,tlm_only:E})}router_target_disable(h,u,g=!1,E=!1){return this.exec("router_target_disable",[h,u],{cmd_only:g,tlm_only:E})}router_details(h){return this.exec("router_details",[h])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(h){return this.exec("get_tlm_cnts",[h])}get_item(h,u,g){return this.exec("get_item",[h,u,g])}get_param(h,u,g){return this.exec("get_param",[h,u,g])}get_parameter(h,u,g){return this.exec("get_param",[h,u,g])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(h){return this.exec("set_limits_set",[h])}delete_limits_set(h){return this.exec("delete_limits_set",[h])}get_target(h){return this.exec("get_target",[h])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(h,u){return this.exec("get_tlm",[h,u])}get_telemetry(h,u){return this.exec("get_tlm",[h,u])}get_all_tlm(h){return this.exec("get_all_tlm",[h])}get_all_telemetry(h){return this.exec("get_all_tlm",[h])}get_all_tlm_names(h,u=!1){return this.exec("get_all_tlm_names",[h],{hidden:u})}get_all_telemetry_names(h){return this.exec("get_all_tlm_names",[h])}get_all_tlm_item_names(h){return this.exec("get_all_tlm_item_names",[h])}async get_tlm_packet(h,u,g,E=30){const y=await this.exec("get_tlm_packet",[h,u],{type:g,stale_time:E});if(y!=null){let p=y.length,v=null;for(let s=0;s<p;s++)v=this.decode_openc3_type(y[s][1]),v!==null&&(y[s][1]=v)}return y}get_packet_derived_items(h,u){return this.exec("get_packet_derived_items",[h,u])}get_tlm_buffer(h,u){return this.exec("get_tlm_buffer",[h,u])}get_tlm_available(h){return this.exec("get_tlm_available",[h])}async get_tlm_values(h,u=30,g=null,E=null,y=null){let p={stale_time:u};g!==null&&(p.cache_timeout=g),E!==null&&(p.start_time=E.toISOString()),y!==null&&(p.end_time=y.toISOString());const v=await this.exec("get_tlm_values",[h],p,{},1e4);if(v&&v.length>0){let s=v.length,c=null;for(let n=0;n<s;n++)c=this.decode_openc3_type(v[n][0]),c!==null&&(v[n][0]=c)}return v}get_limits(h,u,g){return this.exec("get_limits",[h,u,g])}async tlm(h,u,g,E="CONVERTED"){let y=null;if(u===void 0)y=await this.exec("tlm",[h]);else if(g===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(u))y=await this.exec("tlm",[h],{type:u});else{let v=new Error;throw v.name="TypeError",v.message=`Invalid data type ${u}. Valid options are RAW, CONVERTED or FORMATTED.`,v}else y=await this.exec("tlm",[h,u,g],{type:E});let p=this.decode_openc3_type(y);return p!==null&&(y=p),y}async inject_tlm(h,u,g=null,E="CONVERTED",y=!1){await this.exec("inject_tlm",[h,u,g],{type:E,stored:y})}set_tlm(h,u,g,E){return this.exec("set_tlm",[h,u,g],{type:E})}override_tlm(h,u,g,E){return this.exec("override_tlm",[h,u,g],{type:E})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(h,u,g,E){return this.exec("normalize_tlm",[h,u,g],{type:E})}get_all_cmds(h){return this.exec("get_all_cmds",[h])}get_all_commands(h){return this.exec("get_all_cmds",[h])}get_all_cmd_names(h,u=!1){return this.exec("get_all_cmd_names",[h],{hidden:u})}get_all_command_names(h){return this.exec("get_all_cmd_names",[h])}get_cmd(h,u){return this.exec("get_cmd",[h,u])}get_command(h,u){return this.exec("get_cmd",[h,u])}get_cmd_cnts(h){return this.exec("get_cmd_cnts",[h])}get_cmd_value(h,u,g,E="CONVERTED"){return this.exec("get_cmd_value",[h,u,g,E])}get_cmd_buffer(h,u){return this.exec("get_cmd_buffer",[h,u])}_cmd(h,u,g,E,y,p={}){let v=null;for(let s in E)Object.prototype.hasOwnProperty.call(E,s)&&(v=this.encode_openc3_type(E[s]),v!==null&&(E[s]=v));return this.exec(h,[u,g,E],p,y)}get_cmd_hazardous(h,u,g,E={}){return u===void 0?this.exec("get_cmd_hazardous",h,{},E):this._cmd("get_cmd_hazardous",h,u,g,E)}cmd(h,u,g,E={},y={}){return u===void 0?this.exec("cmd",h,y,E):this._cmd("cmd",h,u,g,E,y)}cmd_no_range_check(h,u,g,E={},y={}){return u===void 0?this.exec("cmd_no_range_check",h,y,E):this._cmd("cmd_no_range_check",h,u,g,E,y)}cmd_raw(h,u,g,E={},y={}){return u===void 0?this.exec("cmd_raw",h,y,E):this._cmd("cmd_raw",h,u,g,E,y)}cmd_raw_no_range_check(h,u,g,E={},y={}){return u===void 0?this.exec("cmd_raw_no_range_check",h,y,E):this._cmd("cmd_raw_no_range_check",h,u,g,E,y)}cmd_no_hazardous_check(h,u,g,E={},y={}){return u===void 0?this.exec("cmd_no_hazardous_check",h,y,E):this._cmd("cmd_no_hazardous_check",h,u,g,E,y)}cmd_no_checks(h,u,g,E={},y={}){return u===void 0?this.exec("cmd_no_checks",h,y,E):this._cmd("cmd_no_checks",h,u,g,E,y)}cmd_raw_no_hazardous_check(h,u,g,E={},y={}){return u===void 0?this.exec("cmd_raw_no_hazardous_check",h,y,E):this._cmd("cmd_raw_no_hazardous_check",h,u,g,E,y)}cmd_raw_no_checks(h,u,g,E={},y={}){return u===void 0?this.exec("cmd_raw_no_checks",h,y,E):this._cmd("cmd_raw_no_checks",h,u,g,E,y)}build_cmd(h,u,g,E={},y={}){return u===void 0?this.exec("build_cmd",h,y,E):this._cmd("build_cmd",h,u,g,E,y)}build_command(h,u,g,E={},y={}){return u===void 0?this.exec("build_cmd",h,y,E):this._cmd("build_cmd",h,u,g,E,y)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(h,u){return this.exec("send_raw",[h,u])}list_configs(h){return this.exec("list_configs",[h])}load_config(h,u){return this.exec("load_config",[h,u])}save_config(h,u,g){return this.exec("save_config",[h,u,g])}delete_config(h,u){return this.exec("delete_config",[h,u])}enable_limits(h,u,g){return this.exec("enable_limits",[h,u,g])}disable_limits(h,u,g){return this.exec("disable_limits",[h,u,g])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(h){return this.exec("get_overall_limits_state",[h])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(h,u){return this.exec("get_setting",[h],u)}get_settings(h,u){return this.exec("get_settings",h,u)}set_setting(h,u){return this.exec("set_setting",[h,u])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(h,u){return this.exec("set_setting",[h,u])}get_metrics(){return this.exec("get_metrics",[])}open_tab(h){window.open(h,"_blank")}async hashString(h){if(window.isSecureContext){const u=new TextEncoder().encode(h),g=await crypto.subtle.digest("SHA-256",u),E=new Uint8Array(g);return Array.from(E).map(y=>y.toString(16).padStart(2,"0")).join("")}}}const vs={components:{CriticalCmdDialog:qt,CommandEditor:Rn,TopBar:un,Openc3Screen:_n},mixins:[yt],data(){return{title:"Command Sender",editor:null,targetName:"",commandName:"",commandDescription:"",hazardousDescription:"",paramList:"",queueName:null,validateParameter:null,lastTargetName:"",lastCommandName:"",lastParamList:"",lastQueueName:null,ignoreRangeChecks:!1,statesInHex:!1,showIgnoredParams:!1,cmdRaw:!1,disableCommandValidation:!1,interfaces:[],selectedInterface:"",rawCmdFile:null,status:"",history:"",hazardousCommand:"",displaySendHazardous:!1,displayErrorDialog:!1,displaySendRaw:!1,displayCriticalCmd:!1,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,sendDisabled:!1,api:null,keywords:[],screenTarget:null,screenName:null,screenDefinition:null,screenCount:0}},computed:{menus:function(){return[{label:"Mode",items:[{label:"Ignore Range Checks",checkbox:!0,checked:this.ignoreRangeChecks,command:()=>{this.ignoreRangeChecks=!this.ignoreRangeChecks}},{label:"Display State Values in Hex",checkbox:!0,checked:this.statesInHex,command:()=>{this.statesInHex=!this.statesInHex}},{label:"Show Ignored Parameters",checkbox:!0,checked:this.showIgnoredParams,command:()=>{this.showIgnoredParams=!this.showIgnoredParams,this.$refs.commandEditor.triggerUpdateCmdParams()}},{label:"Disable Parameter Conversions",checkbox:!0,checked:this.cmdRaw,command:()=>{this.cmdRaw=!this.cmdRaw}},{label:"Disable Command Validation",checkbox:!0,checked:this.disableCommandValidation,command:()=>{this.disableCommandValidation=!this.disableCommandValidation}}]}]}},created(){this.api=new ms,this.$route.params.target&&this.$route.params.packet&&this.commandChanged({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase()}),Gi.get("/openc3-api/autocomplete/keywords/screen").then(l=>{this.keywords=l.data})},mounted(){this.editor=On.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode("ace/mode/ruby"),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.setHighlightActiveLine(!1),this.editor.setValue(localStorage.command_sender__history),this.history=this.editor.getValue().trim(),this.editor.clearSelection(),this.editor.focus(),this.editor.setAutoScrollEditorIntoView(!0),this.editor.setOption("maxLines",30),this.editor.setOption("minLines",1),this.editor.container.addEventListener("keydown",l=>{if(l.key==="Enter"){l.preventDefault();let h=this.editor.session.getLine(this.editor.getCursorPosition().row);if(h==="")return;this.queueName=null;const u=h.match(/,\s*queue(?::|\s*=)\s*(?:"([^"]+)"|([f|F]alse))/);u&&(u[1]?this.queueName=u[1]:this.queueName=!1,h=h.replace(/,\s*queue(?::|\s*=)\s*(?:"([^"]+)"|([f|F]alse))/,"")),this.validateParameter=null;const g=h.match(/,\s*validate(?::|\s*=)\s*(false|true)/i);g&&(this.validateParameter=g[1],h=h.replace(/,\s*validate(?::|\s*=)\s*(false|true)/i,""));let E=h.indexOf('"'),y=h.lastIndexOf('"');h=h.substr(E+1,y-E-1),this.sendCmd(h)}})},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{commandChanged(l){(this.targetName!==l.targetName||this.commandName!==l.packetName)&&(this.targetName=l.targetName,this.commandName=l.packetName,this.targetName&&this.commandName?this.$router.replace({name:"CommandSender",params:{target:this.targetName,packet:this.commandName}}).catch(h=>{}):this.$router.replace({name:"CommandSender"}).catch(h=>{})),l.queueName!==void 0&&(this.queueName=l.queueName)},onCommandLoaded(l){if(l)if(this.commandDescription=l.description,this.hazardousDescription=l.hazardous_description||"",l.screen)this.loadScreen(l.screen[0],l.screen[1]).then(h=>{this.screenTarget=l.screen[0],this.screenName=l.screen[1],this.screenDefinition=h.data,this.screenCount+=1});else{if(l.related_items){this.screenTarget="LOCAL",this.screenName="CMDSENDER";let h=`SCREEN AUTO AUTO 1.0
1122
+ `;for(const u of l.related_items)h+=`LABELVALUE '${u[0]}' '${u[1]}' '${u[2]}' FORMATTED 20
1123
+ `;this.screenDefinition=h}else this.screenTarget=null,this.screenName=null,this.screenDefinition=null;this.screenCount+=1}else this.commandDescription="",this.hazardousDescription="",this.screenTarget=null,this.screenName=null,this.screenDefinition=null,this.screenCount+=1},createParamList(){let l={};for(const h of this.$refs.commandEditor.getRows())l[h.parameter_name]=this.convertToValue(h);return l},buildCmd(){let l;try{l=this.createParamList()}catch(h){this.status=h.message,this.displayErrorDialog=!0;return}this.sendCmd(this.targetName,this.commandName,l)},sendCmd(l,h,u){this.lastTargetName=l,this.lastCommandName=h,this.lastParamList=u,this.lastQueueName=this.queueName,this.sendDisabled=!0;let g=!1,E="";this.api.get_cmd_hazardous(l,h,u).then(y=>{if(g=y,g)h===void 0?this.hazardousCommand=l.split(" ").slice(0,2).join(" "):this.hazardousCommand=`${l} ${h}`,this.displaySendHazardous=!0;else{let p,v={};this.validateParameter!==null?v.validate=this.validateParameter.toLowerCase()==="true":this.disableCommandValidation&&(v.validate=!1),this.queueName!==null&&(v.queue=this.queueName),this.cmdRaw?this.ignoreRangeChecks?(E="cmd_raw_no_range_check",p=this.api.cmd_raw_no_range_check(l,h,u,{"Ignore-Errors":"428"},v)):(E="cmd_raw",p=this.api.cmd_raw(l,h,u,{"Ignore-Errors":"428 500"},v)):this.ignoreRangeChecks?(E="cmd_no_range_check",p=this.api.cmd_no_range_check(l,h,u,{"Ignore-Errors":"428"},v)):(E="cmd",p=this.api.cmd(l,h,u,{"Ignore-Errors":"428 500"},v)),p.then(s=>{this.processCmdResponse(!0,l,h,E,s)},s=>{this.processCmdResponse(!1,l,h,E,s)})}},y=>{this.processCmdResponse(!1,l,h,E,y)})},sendHazardousCmd(){this.displaySendHazardous=!1;let l="",h="",u={};this.validateParameter!==null?u.validate=this.validateParameter.toLowerCase()==="true":this.disableCommandValidation&&(u.validate=!1),this.lastQueueName!==null&&(u.queue=this.lastQueueName),this.cmdRaw?this.ignoreRangeChecks?(h="cmd_raw_no_range_check",l=this.api.cmd_raw_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"},u)):(h="cmd_raw",l=this.api.cmd_raw_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"},u)):this.ignoreRangeChecks?(h="cmd_no_range_check",l=this.api.cmd_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"},u)):(h="cmd",l=this.api.cmd_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"},u)),l.then(g=>{this.processCmdResponse(!0,this.lastTargetName,this.lastCommandName,h,g)},g=>{this.processCmdResponse(!1,this.lastTargetName,this.lastCommandName,h,g)})},cancelHazardousCmd(){this.displaySendHazardous=!1,this.status="Hazardous command not sent",this.sendDisabled=!1},processCmdResponse(l,h,u,g,E){u===void 0&&([h,u]=h.split(" ").slice(0,2));let y="";if(l){y=`${g}("${E.target_name} ${E.cmd_name}`;let p=Object.keys(E.cmd_params);if(p.length>0){y+=" with ";for(let s=0;s<p.length;s++){let c=p[s],n="";E.obfuscated_items.includes(c)?n="*****":n=this.convertToString(E.cmd_params[c]),typeof E.cmd_params[c]=="string"&&n.charAt(0)!=="'"&&n.charAt(0)!=='"'&&(n=`'${n}'`),y+=c+" "+n,s<p.length-1&&(y+=", ")}}let v=[];if(this.lastQueueName!==null&&(et.getDefaultScriptingLanguage()==="python"?this.lastQueueName===!1?v.push("queue=False"):v.push(`queue="${this.lastQueueName}"`):this.lastQueueName===!1?v.push("queue: false"):v.push(`queue: "${this.lastQueueName}"`)),this.disableCommandValidation||this.validateParameter!==null){const s=et.getDefaultScriptingLanguage();this.validateParameter!==null?s==="python"?v.push(`validate=${this.validateParameter}`):v.push(`validate: ${this.validateParameter}`):s==="python"?v.push("validate=False"):v.push("validate: false")}if(v.length>0?y+='", '+v.join(", ")+")":y+='")',!this.history.includes(y)){let s=y;this.history.length!==0&&(s+=`
1124
+ ${this.history}`),this.editor.setValue(s),this.editor.moveCursorTo(0,0)}if(y+=" sent.",this.status.includes(y)){let s=this.status.split("sent.");if(s[1].includes("(")){let c=Number.parseInt(s[1].substr(2,s[1].indexOf(")")-2));y=s[0]+"sent. ("+(c+1)+")"}else y+=" (2)"}this.status=y}else{let p="sending "+h+" "+u;this.displayError(p,E,!0)}this.history=this.editor.getValue(),localStorage.command_sender__history=this.editor.getValue(),this.sendDisabled=!1},clearHistory(){this.editor.setValue(""),this.history="",localStorage.removeItem("command_sender__history")},displayError(l,h,u=!1){this.status=`Error ${l} due to ${h.name}`,h.message&&h.message!==""&&(this.status+=": ",this.status+=h.message),this.status.includes("CriticalCmdError")&&(this.status="Critical Command Queued For Approval"),u&&(h.message.includes("CriticalCmdError")?(this.criticalCmdUuid=h.object.data.instance_variables["@uuid"],this.criticalCmdString=h.object.data.instance_variables["@command"].cmd_string,this.criticalCmdUser=h.object.data.instance_variables["@command"].username,this.displayCriticalCmd=!0):this.displayErrorDialog=!0)},loadScreen(l,h){return Gi.get("/openc3-api/screen/"+l+"/"+h,{headers:{Accept:"text/plain"}})},cancelRawCmd(){this.displaySendRaw=!1,this.status="Raw command not sent"}}},ys={ref:"editor",class:"editor","data-test":"sender-history"},ws={style:{position:"relative"}},bs={class:"mx-1"},Cs=["textContent"],Ss={class:"mt-1"},$s={key:0,class:"openc3-yellow font-weight-bold mt-2","data-test":"hazardous-description"},_s={class:"mx-1"};function xs(l,h,u,g,E,y){const p=Z("top-bar"),v=Z("command-editor"),s=Z("v-card"),c=Z("v-col"),n=Z("v-btn"),o=Z("v-tooltip"),r=Z("v-row"),i=Z("v-card-subtitle"),e=Z("openc3-screen"),t=Z("critical-cmd-dialog"),a=Z("v-spacer"),d=Z("v-toolbar"),f=Z("v-card-text"),S=Z("v-dialog"),$=Z("v-icon"),C=Z("v-card-actions"),w=Z("v-select");return q(),he("div",null,[V(p,{menus:y.menus,title:E.title},null,8,["menus","title"]),V(v,{ref:"commandEditor","initial-target-name":l.$route.params.target,"initial-packet-name":l.$route.params.packet,"send-disabled":E.sendDisabled,"states-in-hex":E.statesInHex,"show-ignored-params":E.showIgnoredParams,"cmd-raw":E.cmdRaw,"ignore-range-checks":E.ignoreRangeChecks,onCommandChanged:h[0]||(h[0]=M=>y.commandChanged(M)),onCommandLoaded:h[1]||(h[1]=M=>y.onCommandLoaded(M)),onBuildCmd:h[2]||(h[2]=M=>y.buildCmd(M))},null,8,["initial-target-name","initial-packet-name","send-disabled","states-in-hex","show-ignored-params","cmd-raw","ignore-range-checks"]),V(s,{class:"pa-3"},{default:G(()=>[se("Status: "+le(E.status),1)]),_:1}),h[23]||(h[23]=re("div",{style:{height:"15px"}},null,-1)),V(r,{"no-gutters":""},{default:G(()=>[V(c,{class:"pr-4"},{default:G(()=>[V(s,{class:"pb-2"},{default:G(()=>[V(i,null,{default:G(()=>[V(r,null,{default:G(()=>[V(c,{class:"pt-6"},{default:G(()=>[...h[10]||(h[10]=[se(" Editable Command History: (Pressing Enter on the line re-executes the command) ",-1)])]),_:1}),V(c,null,{default:G(()=>[V(o,{"open-delay":600,location:"top"},{activator:G(({props:M})=>[re("div",Ne(M,{class:"float-right"}),[V(n,{icon:"mdi-delete-sweep",variant:"text","data-test":"clear-history",onClick:y.clearHistory},null,8,["onClick"])],16)]),default:G(()=>[h[11]||(h[11]=re("span",null," Clear History ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),V(r,{"no-gutters":"",class:"mt-2 mb-2"},{default:G(()=>[V(c,null,{default:G(()=>[re("pre",ys,null,512)]),_:1})]),_:1})]),_:1})]),_:1}),E.screenDefinition?(q(),ne(c,{key:0,md:"auto"},{default:G(()=>[re("div",ws,[V(e,{target:E.screenTarget,screen:E.screenName,definition:E.screenDefinition,keywords:E.keywords,count:E.screenCount,"show-close":!1},null,8,["target","screen","definition","keywords","count"])])]),_:1})):fe("",!0)]),_:1}),h[24]||(h[24]=re("div",{style:{height:"15px"}},null,-1)),V(t,{modelValue:E.displayCriticalCmd,"onUpdate:modelValue":h[3]||(h[3]=M=>E.displayCriticalCmd=M),uuid:E.criticalCmdUuid,"cmd-string":E.criticalCmdString,"cmd-user":E.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"]),V(S,{modelValue:E.displayErrorDialog,"onUpdate:modelValue":h[5]||(h[5]=M=>E.displayErrorDialog=M),"max-width":"600"},{default:G(()=>[V(s,null,{default:G(()=>[V(d,{height:"24"},{default:G(()=>[V(a),h[12]||(h[12]=re("span",null," Error ",-1)),V(a)]),_:1}),V(f,null,{default:G(()=>[re("div",bs,[V(r,{class:"my-2"},{default:G(()=>[V(f,null,{default:G(()=>[re("span",{textContent:le(E.status)},null,8,Cs)]),_:1})]),_:1}),V(r,null,{default:G(()=>[V(a),V(n,{color:"primary","data-test":"error-dialog-ok",onClick:h[4]||(h[4]=M=>E.displayErrorDialog=!1)},{default:G(()=>[...h[13]||(h[13]=[se(" Ok ",-1)])]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),V(S,{modelValue:E.displaySendHazardous,"onUpdate:modelValue":h[6]||(h[6]=M=>E.displaySendHazardous=M),"max-width":"600",persistent:"",onKeydown:Je(y.cancelHazardousCmd,["esc"])},{default:G(()=>[V(s,null,{default:G(()=>[V(d,{height:"24"},{default:G(()=>[V(a),h[14]||(h[14]=re("span",null," Hazardous Warning ",-1)),V(a)]),_:1}),V(f,{class:"mt-6"},{default:G(()=>[se(" Warning: Command "+le(E.hazardousCommand)+" is Hazardous. Send? ",1),re("div",Ss,"Description: "+le(E.commandDescription),1),E.hazardousDescription?(q(),he("div",$s,[V($,{class:"mr-1"},{default:G(()=>[...h[15]||(h[15]=[se("mdi-alert",-1)])]),_:1}),se(" Hazardous: "+le(E.hazardousDescription),1)])):fe("",!0)]),_:1}),V(C,{class:"px-2"},{default:G(()=>[V(a),V(n,{variant:"outlined",onClick:y.cancelHazardousCmd},{default:G(()=>[...h[16]||(h[16]=[se(" Cancel ",-1)])]),_:1},8,["onClick"]),V(n,{variant:"flat",onClick:y.sendHazardousCmd},{default:G(()=>[...h[17]||(h[17]=[se(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"]),V(S,{modelValue:E.displaySendRaw,"onUpdate:modelValue":h[9]||(h[9]=M=>E.displaySendRaw=M),"max-width":"600",persistent:"",onKeydown:Je(y.cancelRawCmd,["esc"])},{default:G(()=>[V(s,null,{default:G(()=>[V(d,{height:"24"},{default:G(()=>[V(a),h[18]||(h[18]=re("span",null," Send Raw ",-1)),V(a)]),_:1}),V(f,null,{default:G(()=>[re("div",_s,[V(r,{class:"my-2"},{default:G(()=>[V(c,null,{default:G(()=>[...h[19]||(h[19]=[se("Interface:",-1)])]),_:1}),V(c,null,{default:G(()=>[V(w,{modelValue:E.selectedInterface,"onUpdate:modelValue":h[7]||(h[7]=M=>E.selectedInterface=M),variant:"solo","hide-details":"",density:"compact",items:E.interfaces,"item-title":"label","item-value":"value"},null,8,["modelValue","items"])]),_:1})]),_:1}),V(r,{"no-gutters":""},{default:G(()=>[V(c,null,{default:G(()=>[...h[20]||(h[20]=[se("Filename:",-1)])]),_:1}),V(c,null,{default:G(()=>[re("input",{type:"file",onChange:h[8]||(h[8]=M=>l.selectRawCmdFile(M))},null,32)]),_:1})]),_:1}),V(r,null,{default:G(()=>[V(a),V(n,{variant:"outlined","data-test":"raw-cancel",onClick:y.cancelRawCmd},{default:G(()=>[...h[21]||(h[21]=[se(" Cancel ",-1)])]),_:1},8,["onClick"]),V(n,{class:"bg-primary","data-test":"raw-ok",onClick:l.sendRawCmd},{default:G(()=>[...h[22]||(h[22]=[se(" Ok ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])])}const js=on("default",Kt(vs,[["render",xs],["__scopeId","data-v-35e893f1"]]))})}}));